iden

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoTime = errors.New("id contains no time component")

Functions

This section is empty.

Types

type TaskID

type TaskID [16]byte
var (
	// Min is the smallest possible task ID.
	Min TaskID = New(time.Unix(0, 0), 0)

	// Max is the largest possible task ID.
	Max TaskID = New(time.Unix(math.MaxInt64, 0).UTC(), math.MaxUint64)
)

func MustParseString

func MustParseString(v string) TaskID

func New

func New(ts time.Time, index uint64) TaskID

func ParseString

func ParseString(v string) (TaskID, error)

func (TaskID) Index

func (t TaskID) Index() uint64

func (TaskID) MustTime

func (t TaskID) MustTime() time.Time

func (TaskID) String

func (t TaskID) String() string

func (TaskID) Time

func (t TaskID) Time() (time.Time, error)

Jump to

Keyboard shortcuts

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