Documentation ¶
Index ¶
- Variables
- type Date
- func (*Date) Descriptor() ([]byte, []int)deprecated
- func (x *Date) GetSeconds() int64
- func (ts *Date) GobDecode(data []byte) error
- func (ts *Date) GobEncode() ([]byte, error)
- func (ts *Date) GormDataType() string
- func (ts *Date) MarshalBinary() ([]byte, error)
- func (x *Date) MarshalGQL(w io.Writer)
- func (ts *Date) MarshalJSON() ([]byte, error)
- func (*Date) ProtoMessage()
- func (x *Date) ProtoReflect() protoreflect.Message
- func (x *Date) Reset()
- func (ts *Date) Scan(value interface{}) (err error)
- func (x *Date) String() string
- func (ts *Date) Time() time.Time
- func (ts *Date) UnmarshalBinary(data []byte) error
- func (x *Date) UnmarshalGQL(v interface{}) error
- func (ts *Date) UnmarshalJSON(data []byte) error
- func (ts *Date) Value() (driver.Value, error)
- type DateInput
- type Duration
- type MacroTime
- type MilliTime
- type NanoTime
- type SecondTime
- type Time
- func (x *Time) AsTime() time.Time
- func (x *Time) CheckValid() error
- func (*Time) Descriptor() ([]byte, []int)deprecated
- func (x *Time) GetNanos() int32
- func (x *Time) GetSeconds() int64
- func (ts *Time) GobDecode(data []byte) error
- func (ts *Time) GobEncode() ([]byte, error)
- func (ts *Time) GormDataType() string
- func (x *Time) IsValid() bool
- func (ts *Time) MarshalBinary() ([]byte, error)
- func (x *Time) MarshalGQL(w io.Writer)
- func (ts *Time) MarshalJSON() ([]byte, error)
- func (*Time) ProtoMessage()
- func (x *Time) ProtoReflect() protoreflect.Message
- func (x *Time) Reset()
- func (ts *Time) Scan(value interface{}) (err error)
- func (x *Time) String() string
- func (ts *Time) Time() time.Time
- func (ts *Time) UnmarshalBinary(data []byte) error
- func (x *Time) UnmarshalGQL(v interface{}) error
- func (ts *Time) UnmarshalJSON(data []byte) error
- func (ts *Time) Value() (driver.Value, error)
- type TimeInput
- type Timestamp
- func (*Timestamp) Descriptor() ([]byte, []int)deprecated
- func (x *Timestamp) GetMillis() int64
- func (ts *Timestamp) GobDecode(data []byte) error
- func (ts *Timestamp) GobEncode() ([]byte, error)
- func (ts *Timestamp) GormDataType() string
- func (ts *Timestamp) MarshalBinary() ([]byte, error)
- func (ts *Timestamp) MarshalJSON() ([]byte, error)
- func (*Timestamp) ProtoMessage()
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (x *Timestamp) Reset()
- func (ts *Timestamp) Scan(value interface{}) (err error)
- func (x *Timestamp) String() string
- func (ts *Timestamp) Time() time.Time
- func (ts *Timestamp) UnmarshalBinary(data []byte) error
- func (ts *Timestamp) UnmarshalJSON(data []byte) error
- func (ts *Timestamp) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_hopeio_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) GetSeconds ¶
func (*Date) GormDataType ¶
func (*Date) MarshalBinary ¶
func (*Date) MarshalGQL ¶
func (*Date) MarshalJSON ¶
func (*Date) ProtoMessage ¶
func (*Date) ProtoMessage()
func (*Date) ProtoReflect ¶
func (x *Date) ProtoReflect() protoreflect.Message
func (*Date) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
func (*Date) UnmarshalGQL ¶
func (*Date) UnmarshalJSON ¶
type Duration ¶
type Duration struct { Duration int64 `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*Duration) Descriptor
deprecated
func (*Duration) GetDuration ¶
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
func (*Duration) ProtoReflect ¶
func (x *Duration) ProtoReflect() protoreflect.Message
type MacroTime ¶
type MacroTime struct { Macros int64 `protobuf:"varint,1,opt,name=macros,proto3" json:"macros,omitempty"` // contains filtered or unexported fields }
func (*MacroTime) Descriptor
deprecated
func (*MacroTime) ProtoMessage ¶
func (*MacroTime) ProtoMessage()
func (*MacroTime) ProtoReflect ¶
func (x *MacroTime) ProtoReflect() protoreflect.Message
type MilliTime ¶
type MilliTime struct { Millis int64 `protobuf:"varint,1,opt,name=millis,proto3" json:"millis,omitempty"` // contains filtered or unexported fields }
func (*MilliTime) Descriptor
deprecated
func (*MilliTime) ProtoMessage ¶
func (*MilliTime) ProtoMessage()
func (*MilliTime) ProtoReflect ¶
func (x *MilliTime) ProtoReflect() protoreflect.Message
type NanoTime ¶
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
func (*NanoTime) ProtoMessage ¶
func (*NanoTime) ProtoMessage()
func (*NanoTime) ProtoReflect ¶
func (x *NanoTime) ProtoReflect() protoreflect.Message
type SecondTime ¶
type SecondTime struct { Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // contains filtered or unexported fields }
func (*SecondTime) Descriptor
deprecated
func (*SecondTime) Descriptor() ([]byte, []int)
Deprecated: Use SecondTime.ProtoReflect.Descriptor instead.
func (*SecondTime) GetSeconds ¶
func (x *SecondTime) GetSeconds() int64
func (*SecondTime) ProtoMessage ¶
func (*SecondTime) ProtoMessage()
func (*SecondTime) ProtoReflect ¶
func (x *SecondTime) ProtoReflect() protoreflect.Message
func (*SecondTime) Reset ¶
func (x *SecondTime) Reset()
func (*SecondTime) String ¶
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) CheckValid ¶
CheckValid returns an error if the timestamp is invalid. In particular, it checks whether the value represents a date that is in the range of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. An error is reported for a nil Timestamp.
func (*Time) Descriptor
deprecated
func (*Time) GetSeconds ¶
func (*Time) GormDataType ¶
func (*Time) IsValid ¶
IsValid reports whether the timestamp is valid. It is equivalent to CheckValid == nil.
func (*Time) MarshalBinary ¶
func (*Time) MarshalGQL ¶
func (*Time) MarshalJSON ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()
func (*Time) ProtoReflect ¶
func (x *Time) ProtoReflect() protoreflect.Message
func (*Time) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
func (*Time) UnmarshalGQL ¶
func (*Time) UnmarshalJSON ¶
type Timestamp ¶
type Timestamp struct { Millis int64 `protobuf:"varint,1,opt,name=millis,proto3" json:"millis,omitempty"` // contains filtered or unexported fields }
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) GormDataType ¶
func (*Timestamp) MarshalBinary ¶
func (*Timestamp) MarshalJSON ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
func (*Timestamp) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
func (*Timestamp) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.