idwrap

package
v0.0.0-...-110f058 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTimeFromULID

func GetTimeFromULID(idwrap IDWrap) time.Time

func GetUlid

func GetUlid(id IDWrap) ulid.ULID

func GetUnixMilliFromULID

func GetUnixMilliFromULID(idwrap IDWrap) int64

Types

type IDWrap

type IDWrap struct {
	// contains filtered or unexported fields
}

func New

func New(ulid ulid.ULID) IDWrap

func NewFromBytes

func NewFromBytes(data []byte) (IDWrap, error)

func NewFromBytesMust

func NewFromBytesMust(data []byte) IDWrap

func NewMonotonic

func NewMonotonic() IDWrap

NewMonotonic generates a ULID that is guaranteed to be greater than the previous one if generated within the same monotonic horizon (1 second).

func NewNow

func NewNow() IDWrap

func NewText

func NewText(ulidString string) (IDWrap, error)

func NewTextMust

func NewTextMust(ulidString string) IDWrap

func (IDWrap) Bytes

func (u IDWrap) Bytes() []byte

func (IDWrap) Compare

func (u IDWrap) Compare(id IDWrap) int

func (IDWrap) GetUlid

func (u IDWrap) GetUlid() ulid.ULID

func (IDWrap) MarshalYAML

func (id IDWrap) MarshalYAML() (interface{}, error)

MarshalYAML implements the yaml.Marshaler interface.

func (*IDWrap) Scan

func (u *IDWrap) Scan(value interface{}) error

func (IDWrap) String

func (u IDWrap) String() string

func (IDWrap) Time

func (u IDWrap) Time() time.Time

func (*IDWrap) UnmarshalYAML

func (id *IDWrap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

func (IDWrap) Value

func (u IDWrap) Value() (driver.Value, error)

SQL driver value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL