logid
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package logid contains ID types for interacting with the log service.
Index¶
- type PrivateID
- func (id PrivateID) Add(i int64) PrivateID
- func (id PrivateID) AppendText(b []byte) ([]byte, error)
- func (id1 PrivateID) Compare(id2 PrivateID) int
- func (id PrivateID) IsZero() bool
- func (id1 PrivateID) Less(id2 PrivateID) bool
- func (id PrivateID) MarshalText() ([]byte, error)
- func (id PrivateID) Public() (pub PublicID)
- func (id PrivateID) String() string
- func (id *PrivateID) UnmarshalText(in []byte) error
- type PublicID
- func (id PublicID) Add(i int64) PublicID
- func (id PublicID) AppendText(b []byte) ([]byte, error)
- func (id1 PublicID) Compare(id2 PublicID) int
- func (id PublicID) IsZero() bool
- func (id1 PublicID) Less(id2 PublicID) bool
- func (id PublicID) MarshalText() ([]byte, error)
- func (id PublicID) Prefix64() uint64
- func (id PublicID) String() string
- func (id *PublicID) UnmarshalText(in []byte) error
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typePrivateID¶
type PrivateID [32]byte
PrivateID represents a log steam for writing.Private IDs are only shared with the server when writing logs.
funcNewPrivateID¶
NewPrivateID generates a new random PrivateID.This should persist across runs of an instance of the application,so that it can append to the same log stream for each invocation.
funcParsePrivateID¶
ParsePrivateID returns a PrivateID from its hex representation.
func (PrivateID)Add¶added inv1.70.0
Add adds i to the id, treating it as an unsigned 256-bit big-endian integer,and returns the resulting ID.
func (PrivateID)MarshalText¶
func (PrivateID)Public¶
Public returns the public ID of the private ID,which is the SHA-256 hash of the private ID.
func (*PrivateID)UnmarshalText¶
typePublicID¶
PublicID represents a log stream for reading.The PrivateID cannot be feasibly reversed from the PublicID.
funcParsePublicID¶
ParsePublicID returns a PublicID from its hex representation.
func (PublicID)Add¶added inv1.70.0
Add adds i to the id, treating it as an unsigned 256-bit big-endian integer,and returns the resulting ID.