Documentation
¶
Index ¶
- type Time
- func (*Time) Descriptor() ([]byte, []int)
- func (m *Time) GetNanos() int32
- func (m *Time) GetSeconds() int64
- func (*Time) ProtoMessage()
- func (m *Time) Reset()
- func (t *Time) Scan(src interface{}) error
- func (m *Time) String() string
- func (t *Time) ToTime() (time.Time, error)
- func (t *Time) Value() (driver.Value, error)
- func (m *Time) XXX_DiscardUnknown()
- func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Time) XXX_Merge(src proto.Message)
- func (m *Time) XXX_Size() int
- func (m *Time) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Time ¶
type Time struct { // Seconds is the number of seconds since 1970-01-01T00:00:00Z. Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Nanos is the number of nanoseconds since the time identified by the seconds. // Negative second values with fractions must still have non-negative nanos values // that count forward in time. The valid range is from 0 to 999,999,999, inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A Time is a point in time, represented as the number of seconds and nanoseconds since the Unix Epoch of January 1, 1970 UTC.
The valid range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
func TimeProto ¶
TimeProto converts the time.Time to a Time as defined in this package. An error is returned if the resulting Time is invalid. If the error returned is not nil, then the Time is invalid.
func (*Time) Descriptor ¶
func (*Time) GetSeconds ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()
func (*Time) ToTime ¶
ToTime converts a Time as defined in this package to a time.Time. If the error returned is not nil, then the time.Time returned is invalid. A nil Time returns an error.
func (*Time) XXX_DiscardUnknown ¶
func (m *Time) XXX_DiscardUnknown()
func (*Time) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.