idwrap

package
v0.0.0-...-820be1f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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