timestamp

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NegativeInfinityTS = time.Date(math.MinInt32, time.January, 1, 0, 0, 0, 0, time.UTC)
	PositiveInfinityTS = time.Date(math.MaxInt32, time.December, 31, 23, 59, 59, 1e9-1, time.UTC)
)
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) GormDataType added in v0.7.0

func (ts *Timestamp) GormDataType() string

GormDataType gorm common data type (required)

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