Documentation ¶
Index ¶
- Constants
- Variables
- func NewApoch() uint32
- func NewUnique() uint32
- func TimeNow() time.Time
- type ID
- func (id ID) Contract() uint32
- func (id ID) Encode(mac *crypto.MAC) string
- func (id ID) Epoch() uint32
- func (id ID) IsPrimary() bool
- func (id ID) Permissions() uint32
- func (id ID) Primary() uint16
- func (id ID) SetContract(value uint32)
- func (id ID) SetEpoch(value uint32)
- func (id ID) SetPermissions(value uint32)
- func (id ID) SetPrimary(value uint16)
- type LID
Constants ¶
View Source
const ( AllowNone = uint32(0) // ID has no privileges. AllowMaster = uint32(1 << 0) // ID should be allowed to generate other IDs. )
View Source
const (
Offset = 1555770000
)
Variables ¶
Functions ¶
Types ¶
type ID ¶
type ID []byte
ID represents a unique ID for client connection.
func CachedClientID ¶
CachedClientID return cached client Id
func NewClientID ¶
NewClientID generates a new primary client Id.
func NewSecondaryClientID ¶
NewSecondaryClientID generates a secondary client Id.
func (ID) SetPermissions ¶
SetPermissions sets the permission flags.
Click to show internal directories.
Click to hide internal directories.