package ulid
import "git.sr.ht/~pingoo/stdx/ulid"
Index ¶
- Constants
- type ULID
- func New() ULID
- func NewErr() (ULID, error)
- func Parse(input string) (ret ULID, err error)
- func ParseBytes(input []byte) (ret ULID, err error)
- func (ulid ULID) Bytes() []byte
- func (ulid ULID) Equal(other ULID) bool
- func (ulid ULID) MarshalBinary() ([]byte, error)
- func (ulid ULID) MarshalText() ([]byte, error)
- func (ulid *ULID) Scan(src interface{}) (err error)
- func (ulid ULID) String() string
- func (ulid ULID) UUIDString() string
- func (ulid *ULID) UnmarshalText(data []byte) error
- func (ulid ULID) Value() (driver.Value, error)
Constants ¶
const ( Size = 16 StringSize = 26 )
Types ¶
type ULID ¶
type ULID [Size]byte
TODO
var ( Nil ULID )
func New ¶
func New() ULID
func NewErr ¶
func Parse ¶
func ParseBytes ¶
func (ULID) Bytes ¶
func (ULID) Equal ¶
func (ULID) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (ULID) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*ULID) Scan ¶
TODO: improve Scan implements sql.Scanner so ULIDs can be read from databases transparently. Currently, database types that map to string and []byte are supported. Please consult database-specific driver documentation for matching types.
func (ULID) String ¶
String returns the string form of ulid
func (ULID) UUIDString ¶
UUIDString returns the UUID string form of ulid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
func (*ULID) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (ULID) Value ¶
Value implements sql.Valuer so that ULIDs can be written to databases transparently. Currently, ULIDs map to strings. Please consult database-specific driver documentation for matching types.
Source Files ¶
ulid.go
- Version
- v0.0.0-20240218134121-094174641f6e (latest)
- Published
- Feb 18, 2024
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 months ago –
Tools for package owners.