timestamp

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_controller_storage_timestamp_v1_timestamp_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Timestamp

type Timestamp struct {
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Timestamp for storage messages. We've defined a new local type wrapper of google.protobuf.Timestamp so we can implement sql.Scanner and sql.Valuer interfaces. See: https://golang.org/pkg/database/sql/#Scanner https://golang.org/pkg/database/sql/driver/#Valuer

func New added in v0.4.0

func New(t time.Time) *Timestamp

New constructs a new Timestamp from the provided time.Time.

func Now added in v0.4.0

func Now() *Timestamp

Now constructs a new Timestamp from the current time.

func (*Timestamp) AsTime added in v0.4.0

func (x *Timestamp) AsTime() time.Time

AsTime converts x to a time.Time.

func (*Timestamp) Descriptor deprecated

func (*Timestamp) Descriptor() ([]byte, []int)

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetTimestamp

func (x *Timestamp) GetTimestamp() *timestamppb.Timestamp

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

func (x *Timestamp) ProtoReflect() protoreflect.Message

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) Scan

func (ts *Timestamp) Scan(value interface{}) error

Scan implements sql.Scanner for protobuf Timestamp.

func (*Timestamp) String

func (x *Timestamp) String() string

func (*Timestamp) Value

func (ts *Timestamp) Value() (driver.Value, error)

Scan implements driver.Valuer for protobuf Timestamp.

Jump to

Keyboard shortcuts

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