ktime

package module
v0.0.0-...-ceddce8 Latest Latest
Warning

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

Go to latest
Published: May 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time struct {
	time.Time
}

Time is milliseconds in JSON, otherwise - time.Time

func FromMS

func FromMS(ms int64) Time

FromMS creates new Time with initial value, that equals milliseconds from ms param

func (Time) GetBSON

func (t Time) GetBSON() (interface{}, error)

GetBSON bson Getter interface implementation

func (Time) MS

func (t Time) MS() int64

MS representation in milliseconds

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON json Marshaler interface implementation

func (*Time) SetBSON

func (t *Time) SetBSON(raw bson.Raw) error

SetBSON bson Setter interface implementation

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON json Unmarshaler interface implementation

Jump to

Keyboard shortcuts

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