time

package
v0.0.0-...-1d33cbc Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: Apache-2.0 Imports: 6 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 {
	// 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

func TimeProto(t time.Time) (*Time, error)

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) Descriptor() ([]byte, []int)

func (*Time) GetNanos

func (m *Time) GetNanos() int32

func (*Time) GetSeconds

func (m *Time) GetSeconds() int64

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) Reset

func (m *Time) Reset()

func (*Time) Scan

func (t *Time) Scan(src interface{}) error

Scan implements database/sql.Scanner for the *Time type.

func (*Time) String

func (m *Time) String() string

func (*Time) ToTime

func (t *Time) ToTime() (time.Time, error)

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) Value

func (t *Time) Value() (driver.Value, error)

Value implements database/sql/driver.Valuer for the *Time type.

func (*Time) XXX_DiscardUnknown

func (m *Time) XXX_DiscardUnknown()

func (*Time) XXX_Marshal

func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Time) XXX_Merge

func (m *Time) XXX_Merge(src proto.Message)

func (*Time) XXX_Size

func (m *Time) XXX_Size() int

func (*Time) XXX_Unmarshal

func (m *Time) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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