Documentation ¶
Index ¶
- func Compare(a, b UUID) int
- type UUID
- func (u UUID) Bytes() []byte
- func (u UUID) Bytes16() [16]byte
- func (u UUID) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (u UUID) MarshalJSON() ([]byte, error)
- func (u UUID) MarshalText() ([]byte, error)
- func (u UUID) String() string
- func (u *UUID) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (u *UUID) UnmarshalJSON(data []byte) error
- func (u *UUID) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UUID ¶
type UUID struct {
// contains filtered or unexported fields
}
UUID is a wrapper for a UUID type.
var Nil UUID
Nil UUID is special form of UUID that is specified to have all 128 bits set to zero (see https://tools.ietf.org/html/rfc4122#section-4.1.7).
func NewFromUint64 ¶
NewFromUint64 creates a UUID from a uint64 pair.
func NewRandom ¶
NewRandom returns a random (Version 4) UUID and error if it fails to read from it's random source.
func NewTime ¶
func NewTime() UUID
NewTime generates a new time based UUID (version 1) using the current time as the timestamp.
func (UUID) Bytes ¶
Bytes returns the raw byte slice for this UUID. A UUID is always 128 bits (16 bytes) long.
func (UUID) MarshalCQL ¶
MarshalCQL implements gocql.Marshaler.
func (UUID) MarshalJSON ¶
MarshalJSON implements json.Marshaller.
func (UUID) MarshalText ¶
MarshalText implements text.Marshaller.
func (UUID) String ¶
String returns the UUID in it's canonical form, a 32 digit hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
func (*UUID) UnmarshalCQL ¶
UnmarshalCQL implements gocql.Unmarshaler.
func (*UUID) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*UUID) UnmarshalText ¶
UnmarshalText implements text.Marshaller.