types

package
v0.0.0-...-bc98e09 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UidGenerator

type UidGenerator struct {
	// contains filtered or unexported fields
}

RethinkDB generates UUIDs as primary keys. Using snowflake-generated uint64 instead.

func (*UidGenerator) Get

func (uid *UidGenerator) Get() Uid

Get generates a unique weakly encryped id it so ids are random-looking.

func (*UidGenerator) GetStr

func (uid *UidGenerator) GetStr() string

GetStr generates a unique id then returns it as base64-encrypted string.

func (*UidGenerator) Init

func (uid *UidGenerator) Init(workerId uint, key []byte) error

Init initialises the Uid generator

Jump to

Keyboard shortcuts

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