types

package
v2.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NilObjectID = ObjectID{
	ObjectID: primitive.NilObjectID,
}

Functions

This section is empty.

Types

type CQLUUID

type CQLUUID gocql.UUID

func (CQLUUID) Bytes

func (u CQLUUID) Bytes() []byte

Bytes returns the raw byte slice for this UUID. A CQLUUID is always 128 bits (16 bytes) long.

func (CQLUUID) Clock

func (u CQLUUID) Clock() uint32

Clock extracts the clock sequence of this CQLUUID. It will return zero if the CQLUUID is not a time based UUID (version 1).

func (*CQLUUID) DecodeMsg

func (u *CQLUUID) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*CQLUUID) EncodeMsg

func (u *CQLUUID) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (CQLUUID) MarshalCQL

func (u CQLUUID) MarshalCQL(info gocql.TypeInfo) ([]byte, error)

func (CQLUUID) MarshalJSON

func (u CQLUUID) MarshalJSON() ([]byte, error)

func (*CQLUUID) MarshalMsg

func (u *CQLUUID) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (CQLUUID) MarshalText

func (u CQLUUID) MarshalText() ([]byte, error)

func (*CQLUUID) Msgsize

func (u *CQLUUID) Msgsize() int

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (CQLUUID) Node

func (u CQLUUID) Node() []byte

Node extracts the MAC address of the node who generated this CQLUUID. It will return nil if the CQLUUID is not a time based UUID (version 1).

func (CQLUUID) String

func (u CQLUUID) String() string

func (CQLUUID) Time

func (u CQLUUID) Time() time.Time

Time is like Timestamp, except that it returns a time.Time.

func (CQLUUID) Timestamp

func (u CQLUUID) Timestamp() int64

Timestamp extracts the timestamp information from a time based CQLUUID (version 1).

func (*CQLUUID) UnmarshalCQL

func (u *CQLUUID) UnmarshalCQL(info gocql.TypeInfo, data []byte) error

func (*CQLUUID) UnmarshalJSON

func (u *CQLUUID) UnmarshalJSON(data []byte) error

func (*CQLUUID) UnmarshalMsg

func (u *CQLUUID) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*CQLUUID) UnmarshalText

func (u *CQLUUID) UnmarshalText(text []byte) error

func (CQLUUID) UnsafeString

func (u CQLUUID) UnsafeString() string

String returns the CQLUUID in it's canonical form, a 32 digit hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

func (CQLUUID) Variant

func (u CQLUUID) Variant() int

Variant returns the variant of this CQLUUID. This package will only generate UUIDs in the IETF variant.

func (CQLUUID) Version

func (u CQLUUID) Version() int

Version extracts the version of this CQLUUID variant. The RFC 4122 describes five kinds of UUIDs.

type NullBool

type NullBool sql.NullBool

func (NullBool) MarshalBSONValue

func (o NullBool) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullBool) MarshalJSON

func (o NullBool) MarshalJSON() ([]byte, error)

func (*NullBool) UnmarshalBSONValue

func (o *NullBool) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullBool) UnmarshalJSON

func (o *NullBool) UnmarshalJSON(data []byte) error

type NullByte

type NullByte sql.NullByte

func (NullByte) MarshalBSONValue

func (o NullByte) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullByte) MarshalJSON

func (o NullByte) MarshalJSON() ([]byte, error)

func (*NullByte) UnmarshalBSONValue

func (o *NullByte) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullByte) UnmarshalJSON

func (o *NullByte) UnmarshalJSON(value []byte) error

type NullFloat32

type NullFloat32 struct {
	Float32 float32
	Valid   bool
}

func (*NullFloat32) MarshalBSONValue

func (o *NullFloat32) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullFloat32) MarshalJSON

func (o NullFloat32) MarshalJSON() ([]byte, error)

func (*NullFloat32) Scan

func (n *NullFloat32) Scan(value any) error

func (*NullFloat32) UnmarshalBSONValue

func (o *NullFloat32) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullFloat32) UnmarshalJSON

func (o *NullFloat32) UnmarshalJSON(value []byte) error

func (NullFloat32) Value

func (n NullFloat32) Value() (driver.Value, error)

type NullFloat64

type NullFloat64 sql.NullFloat64

func (NullFloat64) MarshalBSONValue

func (o NullFloat64) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullFloat64) MarshalJSON

func (o NullFloat64) MarshalJSON() ([]byte, error)

func (*NullFloat64) UnmarshalBSONValue

func (o *NullFloat64) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullFloat64) UnmarshalJSON

func (o *NullFloat64) UnmarshalJSON(value []byte) error

type NullInt16

type NullInt16 sql.NullInt16

func (NullInt16) MarshalBSONValue

func (o NullInt16) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullInt16) MarshalJSON

func (o NullInt16) MarshalJSON() ([]byte, error)

func (*NullInt16) UnmarshalBSONValue

func (o *NullInt16) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullInt16) UnmarshalJSON

func (o *NullInt16) UnmarshalJSON(value []byte) error

type NullInt32

type NullInt32 sql.NullInt32

func (NullInt32) MarshalBSONValue

func (o NullInt32) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullInt32) MarshalJSON

func (o NullInt32) MarshalJSON() ([]byte, error)

func (*NullInt32) UnmarshalBSONValue

func (o *NullInt32) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullInt32) UnmarshalJSON

func (o *NullInt32) UnmarshalJSON(value []byte) error

type NullInt64

type NullInt64 sql.NullInt64

func (NullInt64) MarshalBSONValue

func (o NullInt64) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullInt64) MarshalJSON

func (o NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) UnmarshalBSONValue

func (o *NullInt64) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullInt64) UnmarshalJSON

func (o *NullInt64) UnmarshalJSON(value []byte) error

type NullString

type NullString sql.NullString

func (NullString) MarshalBSONValue

func (o NullString) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullString) MarshalJSON

func (o NullString) MarshalJSON() ([]byte, error)

func (*NullString) UnmarshalBSONValue

func (o *NullString) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullString) UnmarshalJSON

func (o *NullString) UnmarshalJSON(value []byte) error

type NullTime

type NullTime sql.NullTime

func (NullTime) MarshalJSON

func (o NullTime) MarshalJSON() ([]byte, error)

func (*NullTime) UnmarshalJSON

func (o *NullTime) UnmarshalJSON(value []byte) error

type NullUint16

type NullUint16 struct {
	Uint16 uint16
	Valid  bool
}

func (NullUint16) MarshalBSONValue

func (o NullUint16) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullUint16) MarshalJSON

func (o NullUint16) MarshalJSON() ([]byte, error)

func (*NullUint16) Scan

func (n *NullUint16) Scan(value any) error

func (*NullUint16) UnmarshalBSONValue

func (o *NullUint16) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullUint16) UnmarshalJSON

func (o *NullUint16) UnmarshalJSON(value []byte) error

func (NullUint16) Value

func (n NullUint16) Value() (driver.Value, error)

type NullUint32

type NullUint32 struct {
	Uint32 uint32
	Valid  bool
}

func (NullUint32) MarshalBSONValue

func (o NullUint32) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullUint32) MarshalJSON

func (o NullUint32) MarshalJSON() ([]byte, error)

func (*NullUint32) Scan

func (n *NullUint32) Scan(value any) error

func (*NullUint32) UnmarshalBSONValue

func (o *NullUint32) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullUint32) UnmarshalJSON

func (o *NullUint32) UnmarshalJSON(value []byte) error

func (NullUint32) Value

func (n NullUint32) Value() (driver.Value, error)

type NullUint64

type NullUint64 struct {
	Uint64 uint64
	Valid  bool
}

func (NullUint64) MarshalBSONValue

func (o NullUint64) MarshalBSONValue() (bsontype.Type, []byte, error)

func (NullUint64) MarshalJSON

func (o NullUint64) MarshalJSON() ([]byte, error)

func (*NullUint64) UnmarshalBSONValue

func (o *NullUint64) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

func (*NullUint64) UnmarshalJSON

func (o *NullUint64) UnmarshalJSON(value []byte) error

type ObjectID

type ObjectID struct {
	primitive.ObjectID
}

func NewObjectID

func NewObjectID() ObjectID

func NewObjectIDFromTimestamp

func NewObjectIDFromTimestamp(t time.Time) ObjectID

func ObjectIDFromHex

func ObjectIDFromHex(hex string) (ObjectID, error)

func (ObjectID) IsNull

func (o ObjectID) IsNull() bool

func (ObjectID) MarshalBSONValue

func (o ObjectID) MarshalBSONValue() (bsontype.Type, []byte, error)

func (ObjectID) MarshalJSON

func (o ObjectID) MarshalJSON() ([]byte, error)

func (*ObjectID) UnmarshalBSONValue

func (o *ObjectID) UnmarshalBSONValue(t bsontype.Type, bytes []byte) error

Jump to

Keyboard shortcuts

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