Documentation
¶
Index ¶
- func SetUUIDFactory(f *UUIDFactory)
- type TypeID
- type UUID
- func (id UUID) IsEmpty() bool
- func (id UUID) MarshalBinary() ([]byte, error)
- func (id UUID) MarshalJSON() ([]byte, error)
- func (id UUID) MarshalText() ([]byte, error)
- func (id UUID) String() string
- func (id UUID) TypeName() string
- func (id UUID) UUID() uuid.UUID
- func (id *UUID) UnmarshalBinary(data []byte) error
- func (id *UUID) UnmarshalJSON(data []byte) error
- func (id *UUID) UnmarshalText(data []byte) error
- func (id UUID) Value() string
- type UUIDFactory
- type UUIDParserOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetUUIDFactory ¶
func SetUUIDFactory(f *UUIDFactory)
Types ¶
type UUID ¶
type UUID struct {
// contains filtered or unexported fields
}
A UUID is a TypeID with a UUID value.
func (UUID) MarshalBinary ¶
func (UUID) MarshalJSON ¶
func (UUID) MarshalText ¶
func (*UUID) UnmarshalBinary ¶
func (*UUID) UnmarshalJSON ¶
func (*UUID) UnmarshalText ¶
type UUIDFactory ¶
type UUIDFactory struct {
// contains filtered or unexported fields
}
UUIDFactory is a TypeID parser that generates and parses TypeIDs with UUIDs as values.
func NewUUIDFactory ¶
func NewUUIDFactory(opts ...UUIDParserOption) *UUIDFactory
func (*UUIDFactory) From ¶
func (p *UUIDFactory) From(typ string, id uuid.UUID) UUID
type UUIDParserOption ¶
type UUIDParserOption func(*UUIDFactory)
func WithUUIDGenerator ¶
func WithUUIDGenerator(fn func() (uuid.UUID, error)) UUIDParserOption
func WithUUIDParser ¶
func WithUUIDParser(fn func(string) (uuid.UUID, error)) UUIDParserOption
func WithUUIDSeparator ¶
func WithUUIDSeparator(chars string) UUIDParserOption
Click to show internal directories.
Click to hide internal directories.