umid

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = UMID{}

Functions

This section is empty.

Types

type UMID

type UMID uuid.UUID

func FromBytes

func FromBytes(b []byte) (id UMID, err error)

func Must

func Must(id UMID, err error) UMID

func MustParse

func MustParse(s string) UMID

func New

func New() UMID

func Parse

func Parse(s string) (UMID, error)

func ParseBytes

func ParseBytes(b []byte) (UMID, error)

func (UMID) ClockSequence

func (id UMID) ClockSequence() int

func (UMID) MarshalBinary

func (id UMID) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (UMID) MarshalMUS

func (v UMID) MarshalMUS(buf []byte) int

MarshalMUS fills buf with the MUS encoding of v.

func (UMID) MarshalText

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

func (*UMID) Scan

func (id *UMID) Scan(src interface{}) error

func (UMID) SizeMUS

func (v UMID) SizeMUS() int

SizeMUS returns the size of the MUS-encoded v.

func (UMID) String

func (id UMID) String() string

String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , or "" if uuid is invalid.

func (*UMID) UnmarshalBinary

func (id *UMID) UnmarshalBinary(data []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*UMID) UnmarshalMUS

func (v *UMID) UnmarshalMUS(buf []byte) (int, error)

UnmarshalMUS parses the MUS-encoded buf, and sets the result to *v.

func (*UMID) UnmarshalText

func (id *UMID) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (UMID) Value

func (id UMID) Value() (driver.Value, error)

func (UMID) Variant

func (id UMID) Variant() byte

func (UMID) Version

func (id UMID) Version() byte

Version returns the version of uuid.

Jump to

Keyboard shortcuts

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