logid

package
v1.36.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: BSD-3-Clause Imports: 6 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateID

type PrivateID [32]byte

PrivateID represents an instance that write logs. Private IDs are only shared with the server when writing logs.

func NewPrivateID

func NewPrivateID() (id PrivateID, err error)

Safely generate a new PrivateId for use in Config objects. You should persist this across runs of an instance of your app, so that it can append to the same log file on each run.

func ParsePrivateID

func ParsePrivateID(s string) (PrivateID, error)

ParsePrivateID returns a PrivateID from its hex (String) representation.

func (PrivateID) IsZero

func (id PrivateID) IsZero() bool

IsZero reports whether id is the zero value.

func (PrivateID) MarshalText

func (id PrivateID) MarshalText() ([]byte, error)

func (PrivateID) Public

func (id PrivateID) Public() (pub PublicID)

func (PrivateID) String

func (id PrivateID) String() string

func (*PrivateID) UnmarshalText

func (id *PrivateID) UnmarshalText(s []byte) error

type PublicID

type PublicID [sha256.Size]byte

PublicID represents an instance in the logs service for reading and adoption. The public ID value is a SHA-256 hash of a private ID.

func MustParsePublicID

func MustParsePublicID(s string) PublicID

MustParsePublicID calls ParsePublicID and panics in case of an error. It is intended for use with constant strings, typically in tests.

func ParsePublicID

func ParsePublicID(s string) (PublicID, error)

ParsePublicID returns a PublicID from its hex (String) representation.

func (PublicID) IsZero

func (id PublicID) IsZero() bool

func (PublicID) Less

func (id1 PublicID) Less(id2 PublicID) bool

func (PublicID) MarshalText

func (id PublicID) MarshalText() ([]byte, error)

func (PublicID) Prefix64

func (id PublicID) Prefix64() uint64

func (PublicID) String

func (id PublicID) String() string

func (*PublicID) UnmarshalText

func (id *PublicID) UnmarshalText(s []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL