guid

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Overview

Package guid is a globally unique id generator. Code inspired from mgo/bson ObjectId.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID [12]byte

func New

func New() (id ID)

New returns a new unique id, see mgo package

func (ID) Hex

func (id ID) Hex() string

Hex encodes ID as base32 string.

func (ID) MarshalText

func (id ID) MarshalText() ([]byte, error)

MarshalText implements encoding/text TextMarshaler interface

func (ID) Slice

func (id ID) Slice() []byte

Slice encodes ID with base32.

func (ID) String

func (id ID) String() string

String encodes ID as base32 string.

Jump to

Keyboard shortcuts

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