Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrInvalidDuration = Error("invalid duration") ErrInvalidValueType = Error("invalid bson value type") ErrInvalidString = Error("invalid bson string") )
helpers errors
Variables ¶
View Source
var DefaultContextExpireTime time.Duration = 2 * time.Second
DefaultContextExpireTime defines duration in which context expires, which is used in GetCtx() The default value is `10 * time.Second`
Functions ¶
Types ¶
type Duration ¶
Duration is needed because default time.Duration does not support marshalling.
func (Duration) MarshalBSONValue ¶
func (Duration) MarshalJSON ¶
MarshalJSON implements json marshaller interface
func (*Duration) UnmarshalBSONValue ¶
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements json unmarshaller interface
Click to show internal directories.
Click to hide internal directories.