idx

package
v0.0.0-...-8ffcee5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Differ         = time.Second * 10
	DefaultPayload = []byte("0000000000000000")
)

Functions

func AfterTime

func AfterTime(t time.Time) string

AfterTime uses SafeUnixDiff as factor to make sure we can get an id that is always greater than the given time

func BeforeTime

func BeforeTime(t time.Time) string

AfterTime uses SafeUnixDiff as factor to make sure we can get an id that is always less than the given time

func Build

func Build(ns, id string) string

func FromTime

func FromTime(ns string, t time.Time) string

func New

func New(ns string) string

@TODO: consider usinghttps://github.com/jetify-com/typeid

func ToTime

func ToTime(nsId string) (time.Time, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳