time

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_cherry_protobuf_time_time_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Date

type Date struct {
	T int64 `protobuf:"varint,1,opt,name=t,proto3" json:"t,omitempty"`
	// contains filtered or unexported fields
}

func (*Date) Descriptor deprecated

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

Deprecated: Use Date.ProtoReflect.Descriptor instead.

func (*Date) GetT

func (x *Date) GetT() int64

func (*Date) ProtoMessage

func (*Date) ProtoMessage()

func (*Date) ProtoReflect

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

func (*Date) Reset

func (x *Date) Reset()

func (*Date) String

func (x *Date) String() string

type Duration added in v1.5.11

type Duration struct {

	// Signed seconds of the span of time. Must be from -315,576,000,000
	// to +315,576,000,000 inclusive. Note: these bounds are computed from:
	// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Signed fractions of a second at nanosecond resolution of the span
	// of time. Durations less than one second are represented with a 0
	// `seconds` field and a positive or negative `nanos` field. For durations
	// of one second or more, a non-zero value for the `nanos` field must be
	// of the same sign as the `seconds` field. Must be from -999,999,999
	// to +999,999,999 inclusive.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// contains filtered or unexported fields
}

func (*Duration) Descriptor deprecated added in v1.5.11

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

Deprecated: Use Duration.ProtoReflect.Descriptor instead.

func (*Duration) GetNanos added in v1.6.15

func (x *Duration) GetNanos() int32

func (*Duration) GetSeconds added in v1.6.15

func (x *Duration) GetSeconds() int64

func (*Duration) ProtoMessage added in v1.5.11

func (*Duration) ProtoMessage()

func (*Duration) ProtoReflect added in v1.5.11

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

func (*Duration) Reset added in v1.5.11

func (x *Duration) Reset()

func (*Duration) String added in v1.5.11

func (x *Duration) String() string

type Model

type Model struct {
	CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty" gorm:"type:timestamptz(6);default:now();index"`
	UpdateAt  string `protobuf:"bytes,2,opt,name=updateAt,proto3" json:"updateAt,omitempty" gorm:"type:timestamptz(6);default:now();index"`
	DeletedAt string `protobuf:"bytes,3,opt,name=deletedAt,proto3" json:"deletedAt,omitempty" gorm:"<-:false;type:timestamptz(6);index"`
	// contains filtered or unexported fields
}

func (*Model) Descriptor deprecated

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

Deprecated: Use Model.ProtoReflect.Descriptor instead.

func (*Model) GetCreatedAt

func (x *Model) GetCreatedAt() string

func (*Model) GetDeletedAt

func (x *Model) GetDeletedAt() string

func (*Model) GetUpdateAt

func (x *Model) GetUpdateAt() string

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) ProtoReflect

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

func (*Model) Reset

func (x *Model) Reset()

func (*Model) String

func (x *Model) String() string

type Time

type Time struct {
	T int64 `protobuf:"varint,1,opt,name=t,proto3" json:"t,omitempty"`
	// contains filtered or unexported fields
}

func (*Time) Descriptor deprecated

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

Deprecated: Use Time.ProtoReflect.Descriptor instead.

func (Time) Format

func (ts Time) Format(foramt string) string

func (*Time) GetT

func (x *Time) GetT() int64

func (*Time) GobDecode

func (ts *Time) GobDecode(data []byte) error

func (Time) GobEncode

func (ts Time) GobEncode() ([]byte, error)

func (Time) GormDataType

func (ts Time) GormDataType() string

GormDataType gorm common data type

func (Time) MarshalBinary

func (ts Time) MarshalBinary() ([]byte, error)

func (Time) MarshalJSON

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

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) ProtoReflect

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

func (*Time) Reset

func (x *Time) Reset()

func (*Time) Scan

func (ts *Time) Scan(value interface{}) (err error)

func (*Time) String

func (x *Time) String() string

func (*Time) UnmarshalBinary

func (ts *Time) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Time) UnmarshalJSON

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

func (Time) Value

func (ts Time) Value() (driver.Value, error)

type Timestamp added in v1.5.11

type Timestamp struct {

	// Represents seconds of UTC time since Unix epoch
	// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
	// 9999-12-31T23:59:59Z inclusive.
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Non-negative fractions of a second at nanosecond resolution. Negative
	// second values with fractions must still have non-negative nanos values
	// that count forward in time. Must be from 0 to 999,999,999
	// inclusive.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// contains filtered or unexported fields
}

func (*Timestamp) Descriptor deprecated added in v1.5.11

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

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetNanos added in v1.6.15

func (x *Timestamp) GetNanos() int32

func (*Timestamp) GetSeconds added in v1.6.15

func (x *Timestamp) GetSeconds() int64

func (*Timestamp) ProtoMessage added in v1.5.11

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect added in v1.5.11

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

func (*Timestamp) Reset added in v1.5.11

func (x *Timestamp) Reset()

func (*Timestamp) String added in v1.5.11

func (x *Timestamp) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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