Documentation ¶
Overview ¶
Package dgoflake provides utilities for fast handling of Discord snowflakes.
Index ¶
Constants ¶
View Source
const DiscordEpoch uint64 = 1420070400000
DiscordEpoch is Discord's epoch in milliseconds.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snowflake ¶
type Snowflake struct {
// contains filtered or unexported fields
}
Snowflake is the type for a Discord snowflake.
func ParseEpochMilli ¶
ParseEpochMilli parses an epoch milliseconds timestamp to a snowflake.
func ParseEpochSec ¶
ParseEpochSec parses an epoch seconds timestamp to a snowflake.
func ParseString ¶
ParseString parses a string to a snowflake.
func (*Snowflake) InternalProcessID ¶
InternalProcessID gets the internal process ID for this snowflake.
func (*Snowflake) InternalWorkerID ¶
InternalWorkerID gets the internal worker ID for this snowflake.
Click to show internal directories.
Click to hide internal directories.