Documentation ¶
Index ¶
- Constants
- Variables
- func DataNode(s int64) int64
- func Init(opts ...Option) (err error)
- func IsMIDHex(s string) bool
- func Next() int64
- func Sequence(s int64) int64
- func Time(s int64) int64
- type MID
- func (m MID) Counter() int32
- func (m MID) Hex() string
- func (m MID) Machine() []byte
- func (m MID) MarshalJSON() ([]byte, error)
- func (m MID) MarshalText() ([]byte, error)
- func (m MID) Pid() uint16
- func (m *MID) Scan(value interface{}) (err error)
- func (m MID) String() string
- func (m MID) Time() int64
- func (m *MID) UnmarshalJSON(data []byte) error
- func (m *MID) UnmarshalText(data []byte) error
- func (m MID) Valid() bool
- func (m MID) Value() (driver.Value, error)
- type Option
- type XID
Constants ¶
View Source
const (
MaxDataNode = kMaxDataNode
)
Variables ¶
View Source
var (
ErrDataNodeNotAllowed = errors.New(fmt.Sprintf("xid: data node can't be greater than %d or less than 0", kMaxDataNode))
)
Functions ¶
Types ¶
type MID ¶
type MID string
MID 从 mgo.bson 复制
func (MID) MarshalJSON ¶
func (MID) MarshalText ¶
func (*MID) UnmarshalJSON ¶
func (*MID) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.