model

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyHash = Hash("")

EmptyHash ...

Variables

This section is empty.

Functions

func IsHashedString

func IsHashedString(input string) bool

IsHashedString ...

func IsUUIDString added in v0.2.0

func IsUUIDString(input string) bool

IsUUIDString ...

Types

type Hash

type Hash string

Hash is the hexadecimal string representation of a hash, ie. a string of even length only made out of 0 to 9 and a to f characters.

func ToHash

func ToHash(bytes []byte) Hash

ToHash ...

func (Hash) Bytes

func (h Hash) Bytes() ([]byte, error)

Bytes ...

func (Hash) IsEmpty added in v1.2.0

func (h Hash) IsEmpty() bool

IsEmpty ...

func (Hash) NonEmpty

func (h Hash) NonEmpty() bool

NonEmpty ...

func (Hash) String

func (h Hash) String() (str string, err error)

String ...

type Hashes added in v1.2.0

type Hashes []Hash

Hashes is an array of Hash.

func (Hashes) Contains added in v1.2.0

func (h Hashes) Contains(item Hash) bool

Contains ...

func (*Hashes) Equals added in v1.2.0

func (h *Hashes) Equals(to *Hashes) bool

Equals ...

func (Hashes) Len added in v1.2.0

func (h Hashes) Len() int

func (Hashes) Less added in v1.2.0

func (h Hashes) Less(i, j int) bool

func (Hashes) Swap added in v1.2.0

func (h Hashes) Swap(i, j int)

type UUID added in v0.2.0

type UUID string

UUID is the string representation of a UUID, eg 'e05572b3-230a-45fd-a779-604c2b8ceb24'

func GenerateUUID added in v0.2.0

func GenerateUUID() (id UUID, err error)

GenerateUUID ...

func ToUUID added in v0.2.0

func ToUUID(bytes []byte) UUID

ToUUID ...

func (UUID) Bytes added in v0.2.0

func (u UUID) Bytes() ([]byte, error)

Bytes ...

func (UUID) IsEmpty added in v1.2.0

func (u UUID) IsEmpty() bool

IsEmpty ...

func (UUID) NonEmpty added in v0.2.0

func (u UUID) NonEmpty() bool

NonEmpty ...

func (UUID) String added in v0.2.0

func (u UUID) String() (str string, err error)

String ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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