datatypes

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UUID

type UUID uuid.UUID

func NewUUIDv1

func NewUUIDv1() UUID

NewUUIDv1 generates a UUID version 1, panics on generation failure.

func NewUUIDv4

func NewUUIDv4() UUID

NewUUIDv4 generates a UUID version 4, panics on generation failure.

func (UUID) Equals

func (u UUID) Equals(other UUID) bool

Equals returns true if string form of UUID matches other, false otherwise.

func (UUID) GormDBDataType

func (UUID) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type.

func (UUID) GormDataType

func (UUID) GormDataType() string

GormDataType gorm common data type.

func (UUID) IsEmpty

func (u UUID) IsEmpty() bool

IsEmpty returns true if UUID is nil UUID or of zero length, false otherwise.

func (*UUID) IsEmptyPtr

func (u *UUID) IsEmptyPtr() bool

IsEmptyPtr returns true if caller UUID ptr is nil or it's value is empty.

func (UUID) IsNil

func (u UUID) IsNil() bool

IsNil returns true if the UUID is a nil UUID (all zeroes), false otherwise.

func (*UUID) IsNilPtr

func (u *UUID) IsNilPtr() bool

IsNilPtr returns true if caller UUID ptr is nil, false otherwise.

func (UUID) Length

func (u UUID) Length() int

Length returns the number of characters in string form of UUID.

func (*UUID) Scan

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

Scan is the scanner function for this datatype.

func (UUID) String

func (u UUID) String() string

String returns the string form of the UUID.

func (UUID) Value

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

Value is the valuer function for this datatype.

Jump to

Keyboard shortcuts

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