shortuuid

package module
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 4 Imported by: 0

README

Description

This package is a simple Go port of the PHP shortuuid library https://github.com/pascaldevink/shortuuid

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortUUID

type ShortUUID string

ShortUUID type for working with ShortUUIDs.

func FromString

func FromString(s string) (ShortUUID, error)

FromString returns a ShortUUID from a string representation.

func FromUUID

func FromUUID(u uuid.UUID) ShortUUID

FromUUID converts a UUID into a ShortUUID.

func NewV1

func NewV1() (ShortUUID, error)

NewV1 returns a ShortUUID based on a V1 UUID.

func NewV3

func NewV3(ns uuid.UUID, name string) ShortUUID

NewV3 returns a ShortUUID based on a V3 UUID.

func NewV4

func NewV4() (ShortUUID, error)

NewV4 returns a ShortUUID based on a V4 UUID.

func NewV5

func NewV5(ns uuid.UUID, name string) ShortUUID

NewV5 returns a ShortUUID based on a V5 UUID.

func (ShortUUID) String

func (s ShortUUID) String() string

func (ShortUUID) UUID

func (s ShortUUID) UUID() uuid.UUID

UUID converts a ShortUUID into a UUID.

Jump to

Keyboard shortcuts

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