identifier

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewIDString

func GetNewIDString() string

GetNewULIDString get Lowercase ulid

func IsNil

func IsNil(id ID) bool

GetNewULIDString get Lowercase ulid

Types

type ID

type ID ulid.ULID
var (
	Nil ID
)

func FromString

func FromString(s string) (id ID, err error)

FromString ulid wrapper method for converting to ulid

func GetNewID

func GetNewID() ID

GetNewULIDString get Lowercase ulid

func (ID) GormDataType

func (ID) GormDataType() string

Gorm Interface GormDataType -> sql data type for gorm TODO ID?

func (ID) MarshalJSON

func (id ID) MarshalJSON() ([]byte, error)

MarshalJSON -> convert to json string

func (*ID) Scan

func (id *ID) Scan(value interface{}) error

Scan -> scan value into BinaryID

func (ID) String

func (id ID) String() string

String convert to string

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(by []byte) error

UnmarshalJSON -> convert from json string

func (ID) Value

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

Value -> return BinaryID to []bytes binary(16)

Jump to

Keyboard shortcuts

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