Documentation ¶
Index ¶
- Variables
- type ID
- func (id ID) MarshalBinary() ([]byte, error)
- func (id ID) MarshalText() (text []byte, err error)
- func (id *ID) Scan(src interface{}) error
- func (id ID) String() string
- func (id *ID) UnmarshalBinary(data []byte) error
- func (id *ID) UnmarshalText(text []byte) error
- func (id ID) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidIDError = errors.New("invalid ID")
)
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID [20]byte
ID is a unique identifier.
func (ID) MarshalBinary ¶
MarshalBinary returns a slice of bytes.
func (ID) MarshalText ¶
MarshalText returns a hex-encoded slice of bytes.
func (*ID) UnmarshalBinary ¶
UnmarshalText sets the value of the ID based on a slice of bytes.
func (*ID) UnmarshalText ¶
UnmarshalText sets the value of the ID based on a hex-encoded slice of bytes.
Click to show internal directories.
Click to hide internal directories.