eventid

package
v1.2.28 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	// contains filtered or unexported fields
}

T is the SHA256 hash in hexadecimal of the canonical form of an event as produced by the output of T.ToCanonical().Bytes().

func Gen

func Gen() (ei *T)

Gen creates a fake pseudorandom generated event ID for tests.

func New

func New() (ei *T)

func NewFromBytes

func NewFromBytes(b by) (ei *T, err er)

func NewFromString

func NewFromString(s st) (ei *T, err er)

NewFromString inspects a string and ensures it is a valid, 64 character long hexadecimal string, returns the string coerced to the type.

func NewWith

func NewWith[V st | by](s V) (ei *T)

func (*T) ByteString

func (ei *T) ByteString(src by) (b by)

func (*T) Bytes

func (ei *T) Bytes() (b by)

func (*T) Equal

func (ei *T) Equal(ei2 *T) bo

func (*T) Len

func (ei *T) Len() no

func (*T) MarshalJSON added in v1.0.0

func (ei *T) MarshalJSON() (b by, err er)

func (*T) Set

func (ei *T) Set(b by) (err er)

func (*T) String

func (ei *T) String() st

func (*T) UnmarshalJSON added in v1.0.0

func (ei *T) UnmarshalJSON(b by) (err er)

Jump to

Keyboard shortcuts

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