Documentation ¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func False() *bool
- func Int(n int) *int
- func String(s string) *string
- func True() *bool
- func Uint(u uint) *uint
- type A
- type Bytes
- type D
- type E
- type M
- type Map
- type ObjectID
- type Time
- func (t Time) MarshalBSON() ([]byte, error)
- func (t Time) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (t Time) MarshalJSON() ([]byte, error)
- func (t *Time) UnmarshalBSON(data []byte) error
- func (t *Time) UnmarshalBSONValue(btype bsontype.Type, data []byte) error
- func (t *Time) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UseLocalTimeZone = true //是否使用本地时区 DefaultTimeFormat = "2006-01-02 15:04:05" //默认时间格式化字符串 )
View Source
var Base64Encoding = base64.StdEncoding
default base64 encoder
View Source
var NilObjectID = primitive.NilObjectID
Functions ¶
Types ¶
type Bytes ¶ added in v0.0.5
type Bytes []byte
func (*Bytes) FromBase64 ¶ added in v0.0.5
func (*Bytes) FromString ¶ added in v0.0.5
type ObjectID ¶
func NewObjectID ¶
func NewObjectID() ObjectID
func ObjectIDFrom ¶ added in v0.0.6
func ObjectIDFromHex ¶
func ObjectIDSliceFrom ¶ added in v0.0.8
type Time ¶ added in v0.0.8
Time extension time
func (Time) MarshalBSON ¶ added in v0.0.8
MarshalBSON marshal bson
func (Time) MarshalBSONValue ¶ added in v0.0.8
MarshalBSONValue marshal bson value
func (Time) MarshalJSON ¶ added in v0.0.8
MarshalJSON marshal json
func (*Time) UnmarshalBSON ¶ added in v0.0.8
UnmarshalBSON unmarshal bson
func (*Time) UnmarshalBSONValue ¶ added in v0.0.8
func (*Time) UnmarshalJSON ¶ added in v0.0.8
UnmarshalJSON unmarshal json
Click to show internal directories.
Click to hide internal directories.