guid

package
v0.0.0-...-7c4d03a Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectID

type ObjectID string

ObjectID is a unique ID identifying a BSON value. It must be exactly 12 bytes long. MongoDB objects by default have such a property set in their "_id" property.

http://www.mongodb.org/display/DOCS/Object+IDs

func NewObjectID

func NewObjectID() ObjectID

NewObjectID returns a new unique ObjectID. 4byte 时间, 3byte 机器ID 2byte pid 3byte 自增ID

func (ObjectID) Hex

func (id ObjectID) Hex() string

Hex returns a hex representation of the ObjectID. 返回16进制对应的字符串

Jump to

Keyboard shortcuts

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