hbtype

package
v0.0.0-...-8b6722b Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroValueULID ulid.ULID = ulid.ULID{}

Functions

This section is empty.

Types

type NullULID

type NullULID struct {
	ULID  ulid.ULID
	Valid bool // Valid is true if ULID is not null.
}

func NewNullULID

func NewNullULID() NullULID

Creates a new nullable ULID.

func (NullULID) MarshalBinary

func (nu NullULID) MarshalBinary() ([]byte, error)

Marshals a NullULID value into binary.

func (NullULID) MarshalJSON

func (nu NullULID) MarshalJSON() ([]byte, error)

Marshals a NullULID value into a JSON value.

func (NullULID) MarshalText

func (nu NullULID) MarshalText() ([]byte, error)

Marshals a NullULID into a string value.

func (*NullULID) Scan

func (nu *NullULID) Scan(value interface{}) error

Scans a database value to a NullULID Go type.

func (NullULID) String

func (nu NullULID) String() string

Returns a NullULID value as a string.

func (*NullULID) UnmarshalBinary

func (nu *NullULID) UnmarshalBinary(data []byte) error

Unmarshals a binary value into a NullULID.

func (*NullULID) UnmarshalJSON

func (nu *NullULID) UnmarshalJSON(data []byte) error

Unmarshal a JSON value into a NullULID value.

func (*NullULID) UnmarshalText

func (nu *NullULID) UnmarshalText(data []byte) error

Unmarshals a string value into a NullULID Go Value.

func (NullULID) Value

func (nu NullULID) Value() (driver.Value, error)

Transforms a NullULID type to database value.

type ULID

type ULID struct {
	ULID ulid.ULID
}

func NewULID

func NewULID() ULID

Creates a new ULID.

func (ULID) MarshalBinary

func (u ULID) MarshalBinary() ([]byte, error)

Marshals a ULID value into binary.

func (ULID) MarshalJSON

func (u ULID) MarshalJSON() ([]byte, error)

Marshals a ULID value into a JSON value.

func (ULID) MarshalText

func (u ULID) MarshalText() ([]byte, error)

Marshals a ULID into a string value.

func (*ULID) Scan

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

Scans a database value to a ULID Go type.

func (ULID) String

func (u ULID) String() string

Returns a ULID value as a string.

func (*ULID) UnmarshalBinary

func (u *ULID) UnmarshalBinary(data []byte) error

Unmarshals a binary value into a ULID.

func (*ULID) UnmarshalJSON

func (u *ULID) UnmarshalJSON(data []byte) error

Unmarshal a JSON value into a ULID value.

func (*ULID) UnmarshalText

func (u *ULID) UnmarshalText(data []byte) error

Unmarshals a string value into a ULID Go Value.

func (ULID) Value

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

Transforms a ULID type to database value.

Jump to

Keyboard shortcuts

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