uuid

package module
v0.0.0-...-a4a9e94 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zero = UUID{}

Functions

This section is empty.

Types

type UUID

type UUID [16]byte

swagger:strfmt uuid

func FromBytes

func FromBytes(input []byte) (u UUID, err error)

FromBytes returns UUID converted from raw byte slice input. It will return error if the slice isn't 16 bytes long.

func FromString

func FromString(input string) (u UUID, err error)

func NewV1

func NewV1() (UUID, error)

func NewV4

func NewV4() (UUID, error)

func NewV7

func NewV7() (UUID, error)

func (UUID) Bytes

func (u UUID) Bytes() []byte

func (UUID) IsZero

func (u UUID) IsZero() bool

func (UUID) MarshalBinary

func (u UUID) MarshalBinary() (data []byte, err error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (UUID) MarshalText

func (u UUID) MarshalText() (data []byte, err error)

func (*UUID) Scan

func (u *UUID) Scan(src interface{}) error

Scan implements the sql.Scanner interface. A 16-byte slice is handled by UnmarshalBinary, while a longer byte slice or a string is handled by UnmarshalText.

func (UUID) String

func (u UUID) String() string

func (*UUID) UnmarshalBinary

func (u *UUID) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. It will return error if the slice isn't 16 bytes long.

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(text []byte) (err error)

func (UUID) Value

func (u UUID) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

Jump to

Keyboard shortcuts

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