Documentation
¶
Overview ¶
Package asset contains Go implementations C4 asset identification.
Creating IDs ¶
To create a C4 ID, use the IDEncoder type as a hash writer.
e := asset.NewIDEncoder() io.Copy(e, src) id := e.ID()
Parsing IDs ¶
To parse an ID from a string, use the ParseID function.
asset.ParseID(src)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ID ¶
ID represents a C4 Asset ID.
func ParseBytesID ¶
ParseBytesID parses a C4 ID as []byte into an ID.
type IDEncoder ¶
type IDEncoder struct {
// contains filtered or unexported fields
}
IDEncoder generates C4 Asset IDs.
func (*IDEncoder) Reset ¶
func (e *IDEncoder) Reset()
Reset resets the underlying sha512 hash object.
Click to show internal directories.
Click to hide internal directories.