time

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 11 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 {
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// contains filtered or unexported fields
}

func (*Date) Descriptor deprecated

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

Deprecated: Use Date.ProtoReflect.Descriptor instead.

func (*Date) GetSeconds added in v1.5.11

func (x *Date) GetSeconds() int64

func (*Date) GobDecode added in v1.5.11

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

func (*Date) GobEncode added in v1.5.11

func (ts *Date) GobEncode() ([]byte, error)

func (*Date) GormDataType added in v1.5.11

func (ts *Date) GormDataType() string

func (*Date) MarshalBinary added in v1.5.11

func (ts *Date) MarshalBinary() ([]byte, error)

func (*Date) MarshalGQL added in v1.5.11

func (x *Date) MarshalGQL(w io.Writer)

func (*Date) MarshalJSON added in v1.5.11

func (ts *Date) MarshalJSON() ([]byte, error)

func (*Date) ProtoMessage

func (*Date) ProtoMessage()

func (*Date) ProtoReflect

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

func (*Date) Reset

func (x *Date) Reset()

func (*Date) Scan added in v1.5.11

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

func (*Date) String

func (x *Date) String() string

func (*Date) Time added in v1.5.11

func (ts *Date) Time() time.Time

func (*Date) UnmarshalBinary added in v1.5.11

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

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Date) UnmarshalGQL added in v1.5.11

func (x *Date) UnmarshalGQL(v interface{}) error

func (*Date) UnmarshalJSON added in v1.5.11

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

func (*Date) Value added in v1.5.11

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

type Duration added in v1.5.11

type Duration struct {
	Duration int64 `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,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) GetDuration added in v1.5.11

func (x *Duration) GetDuration() 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 MacroTime added in v1.5.11

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

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

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

Deprecated: Use MacroTime.ProtoReflect.Descriptor instead.

func (*MacroTime) GetMacros added in v1.5.11

func (x *MacroTime) GetMacros() int64

func (*MacroTime) ProtoMessage added in v1.5.11

func (*MacroTime) ProtoMessage()

func (*MacroTime) ProtoReflect added in v1.5.11

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

func (*MacroTime) Reset added in v1.5.11

func (x *MacroTime) Reset()

func (*MacroTime) String added in v1.5.11

func (x *MacroTime) String() string

type MilliTime added in v1.5.11

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

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

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

Deprecated: Use MilliTime.ProtoReflect.Descriptor instead.

func (*MilliTime) GetMillis added in v1.5.11

func (x *MilliTime) GetMillis() int64

func (*MilliTime) ProtoMessage added in v1.5.11

func (*MilliTime) ProtoMessage()

func (*MilliTime) ProtoReflect added in v1.5.11

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

func (*MilliTime) Reset added in v1.5.11

func (x *MilliTime) Reset()

func (*MilliTime) String added in v1.5.11

func (x *MilliTime) String() string

type NanoTime added in v1.5.11

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

js不选择支持纳秒级时间戳,都是浮点数,最大53位

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

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

Deprecated: Use NanoTime.ProtoReflect.Descriptor instead.

func (*NanoTime) GetNanos added in v1.5.11

func (x *NanoTime) GetNanos() int64

func (*NanoTime) ProtoMessage added in v1.5.11

func (*NanoTime) ProtoMessage()

func (*NanoTime) ProtoReflect added in v1.5.11

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

func (*NanoTime) Reset added in v1.5.11

func (x *NanoTime) Reset()

func (*NanoTime) String added in v1.5.11

func (x *NanoTime) String() string

type SecondTime added in v1.5.11

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

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

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

Deprecated: Use SecondTime.ProtoReflect.Descriptor instead.

func (*SecondTime) GetSeconds added in v1.5.11

func (x *SecondTime) GetSeconds() int64

func (*SecondTime) ProtoMessage added in v1.5.11

func (*SecondTime) ProtoMessage()

func (*SecondTime) ProtoReflect added in v1.5.11

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

func (*SecondTime) Reset added in v1.5.11

func (x *SecondTime) Reset()

func (*SecondTime) String added in v1.5.11

func (x *SecondTime) String() string

type Time

type Time 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 (*Time) Descriptor deprecated

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

Deprecated: Use Time.ProtoReflect.Descriptor instead.

func (*Time) GetNanos added in v1.5.11

func (x *Time) GetNanos() int32

func (*Time) GetSeconds added in v1.5.11

func (x *Time) GetSeconds() int64

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) ProtoReflect

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

func (*Time) Reset

func (x *Time) Reset()

func (*Time) String

func (x *Time) String() string

type Timestamp added in v1.5.11

type Timestamp struct {
	Millis int64 `protobuf:"varint,1,opt,name=millis,proto3" json:"millis,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) GetMillis added in v1.5.11

func (x *Timestamp) GetMillis() int64

func (*Timestamp) GobDecode added in v1.5.11

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

func (*Timestamp) GobEncode added in v1.5.11

func (ts *Timestamp) GobEncode() ([]byte, error)

func (*Timestamp) GormDataType added in v1.5.11

func (ts *Timestamp) GormDataType() string

func (*Timestamp) MarshalBinary added in v1.5.11

func (ts *Timestamp) MarshalBinary() ([]byte, error)

func (*Timestamp) MarshalJSON added in v1.5.11

func (ts *Timestamp) MarshalJSON() ([]byte, error)

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) Scan added in v1.5.11

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

func (*Timestamp) String added in v1.5.11

func (x *Timestamp) String() string

func (*Timestamp) Time added in v1.5.11

func (ts *Timestamp) Time() time.Time

func (*Timestamp) UnmarshalBinary added in v1.5.11

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

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Timestamp) UnmarshalJSON added in v1.5.11

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

func (*Timestamp) Value added in v1.5.11

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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