Documentation ¶
Index ¶
- Variables
- type Duration
- func (x *Duration) AsDuration() time.Duration
- func (x *Duration) CheckValid() error
- func (*Duration) Descriptor() ([]byte, []int)deprecated
- func (x *Duration) GetNanos() int32
- func (x *Duration) GetSeconds() int64
- func (x *Duration) IsValid() bool
- func (*Duration) ProtoMessage()
- func (x *Duration) ProtoReflect() protoreflect.Message
- func (x *Duration) Reset()
- func (x *Duration) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_google_duration_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Duration ¶
type Duration struct { Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` // contains filtered or unexported fields }
func (*Duration) AsDuration ¶
AsDuration converts x to a time.Duration, returning the closest duration value in the event of overflow.
func (*Duration) CheckValid ¶
CheckValid returns an error if the duration is invalid. In particular, it checks whether the value is within the range of -10000 years to +10000 years inclusive. An error is reported for a nil Duration.
func (*Duration) Descriptor
deprecated
func (*Duration) GetSeconds ¶
func (*Duration) IsValid ¶
IsValid reports whether the duration is valid. It is equivalent to CheckValid == nil.
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
func (*Duration) ProtoReflect ¶
func (x *Duration) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.