Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
T is the SHA256 hash in hexadecimal of the canonical form of an event as produced by the output of T.ToCanonical().Bytes().
func New ¶
func New() (ei *T)
New creates a new eventid.T. This is actually more wordy than simply creating a &T{} via slice literal.
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)
NewWith creates an eventid.T out of bytes or string but assumes it is binary and that it is the right length. The result is either truncated or padded automatically by the use of the "copy" operation.
func (*T) ByteString ¶
func (ei *T) ByteString(src by) (b by)
func (*T) MarshalJSON ¶
func (ei *T) MarshalJSON() (b by, err er)
func (*T) Set ¶
func (ei *T) Set(b by) (err er)
Set the value of an eventid.T with checking of the length before copying it.
func (*T) UnmarshalJSON ¶
func (ei *T) UnmarshalJSON(b by) (err er)