Documentation ¶
Index ¶
- Constants
- Variables
- func Base62Decode(s string) ([]byte, error)
- func Base62Encode(data []byte) string
- type KSUID
- func (id KSUID) GoString() string
- func (id KSUID) IsZero() bool
- func (id KSUID) MarshalJSON() ([]byte, error)
- func (id *KSUID) Parse(s string) error
- func (id *KSUID) Scan(src interface{}) error
- func (id KSUID) String() string
- func (id KSUID) Time() time.Time
- func (id KSUID) Timestamp() uint32
- func (id *KSUID) UnmarshalJSON(data []byte) error
- func (id KSUID) Value() (driver.Value, error)
- func (id *KSUID) ValueOrZero() KSUID
- type KSUIDs
Constants ¶
View Source
const Epoch = 1_400_000_000
Variables ¶
View Source
var ErrInvalidFormat = errors.New("invalid format")
View Source
var Zero = KSUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
Functions ¶
func Base62Decode ¶
func Base62Encode ¶
Types ¶
type KSUID ¶
type KSUID [20]byte
func GenerateWithTime ¶
func GenerateWithTimestamp ¶
func (KSUID) MarshalJSON ¶
func (*KSUID) UnmarshalJSON ¶
func (*KSUID) ValueOrZero ¶
Click to show internal directories.
Click to hide internal directories.