uuid

package
v0.0.0-...-150877d Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 3 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

UUID 封装的google uuid

func New

func New() UUID

New 生成UUIDv4

func NewOrderedUUID

func NewOrderedUUID() (ou UUID, err error)

NewOrderedUUID 生成有序UUID

func NewUUID1

func NewUUID1() (u1 UUID, err error)

NewUUID1 生成UUIDv1

func Parse

func Parse(s string) (UUID, error)

Parse 将字符串解析为 UUID

func (UUID) Format

func (b UUID) Format() string

Format 返回uuid字符串, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

func (UUID) GormDataType

func (b UUID) GormDataType() string

GormDataType 数据库的数据类型

func (UUID) MarshalJSON

func (b UUID) MarshalJSON() ([]byte, error)

func (*UUID) Scan

func (b *UUID) Scan(value interface{}) (err error)

Scan scan uuid

func (UUID) String

func (b UUID) String() string

String 返回uuid字符串

func (*UUID) UnmarshalJSON

func (b *UUID) UnmarshalJSON(by []byte) (err error)

func (UUID) Value

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

Value get uuid value

Jump to

Keyboard shortcuts

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