uid

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UID

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

UID is an identifier that can be initialized with a custom length composed of a user specified time, hash, and random bits

func FromBase64

func FromBase64(ustring string) (*UID, error)

FromBase64 creates a new UID from a base64 encoded string

func FromBytes

func FromBytes(b []byte) *UID

FromBytes creates a new UID from an existing byte slice

func New

func New(size int) (*UID, error)

New creates a new UID

func (*UID) Base64

func (u *UID) Base64() string

Base64 returns the full raw bytes of an UID encoded in standard padded base64

func (*UID) Bytes

func (u *UID) Bytes() []byte

Bytes returns the full raw bytes of an UID

Jump to

Keyboard shortcuts

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