Documentation ¶
Index ¶
- Variables
- type TimestampOffset
- func (t *TimestampOffset) AsTime() time.Time
- func (*TimestampOffset) Descriptor() ([]byte, []int)deprecated
- func (x *TimestampOffset) GetNanos() int32
- func (x *TimestampOffset) GetOffset() int32
- func (x *TimestampOffset) GetSeconds() int64
- func (t *TimestampOffset) Local() *TimestampOffset
- func (*TimestampOffset) ProtoMessage()
- func (x *TimestampOffset) ProtoReflect() protoreflect.Message
- func (x *TimestampOffset) Reset()
- func (x *TimestampOffset) String() string
- func (t *TimestampOffset) UTC() *TimestampOffset
- func (m *TimestampOffset) Validate() error
- func (m *TimestampOffset) ValidateAll() error
- type TimestampOffsetMultiError
- type TimestampOffsetValidationError
- func (e TimestampOffsetValidationError) Cause() error
- func (e TimestampOffsetValidationError) Error() string
- func (e TimestampOffsetValidationError) ErrorName() string
- func (e TimestampOffsetValidationError) Field() string
- func (e TimestampOffsetValidationError) Key() bool
- func (e TimestampOffsetValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_gommerce_types_v1_tsoffset_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type TimestampOffset ¶
type TimestampOffset struct { // Seconds is the number of seconds since the Unix epoch. Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Nanos is the number of nanoseconds offset within the second. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` // Offset is the offset in seconds from UTC. Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
TimestampOffset is a timestamp with an offset in seconds and nanoseconds.
func New ¶
func New(t time.Time) *TimestampOffset
func Now ¶
func Now() *TimestampOffset
func (*TimestampOffset) AsTime ¶
func (t *TimestampOffset) AsTime() time.Time
func (*TimestampOffset) Descriptor
deprecated
func (*TimestampOffset) Descriptor() ([]byte, []int)
Deprecated: Use TimestampOffset.ProtoReflect.Descriptor instead.
func (*TimestampOffset) GetNanos ¶
func (x *TimestampOffset) GetNanos() int32
func (*TimestampOffset) GetOffset ¶
func (x *TimestampOffset) GetOffset() int32
func (*TimestampOffset) GetSeconds ¶
func (x *TimestampOffset) GetSeconds() int64
func (*TimestampOffset) Local ¶
func (t *TimestampOffset) Local() *TimestampOffset
func (*TimestampOffset) ProtoMessage ¶
func (*TimestampOffset) ProtoMessage()
func (*TimestampOffset) ProtoReflect ¶
func (x *TimestampOffset) ProtoReflect() protoreflect.Message
func (*TimestampOffset) Reset ¶
func (x *TimestampOffset) Reset()
func (*TimestampOffset) String ¶
func (x *TimestampOffset) String() string
func (*TimestampOffset) UTC ¶
func (t *TimestampOffset) UTC() *TimestampOffset
func (*TimestampOffset) Validate ¶
func (m *TimestampOffset) Validate() error
Validate checks the field values on TimestampOffset with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TimestampOffset) ValidateAll ¶
func (m *TimestampOffset) ValidateAll() error
ValidateAll checks the field values on TimestampOffset with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TimestampOffsetMultiError, or nil if none found.
type TimestampOffsetMultiError ¶
type TimestampOffsetMultiError []error
TimestampOffsetMultiError is an error wrapping multiple validation errors returned by TimestampOffset.ValidateAll() if the designated constraints aren't met.
func (TimestampOffsetMultiError) AllErrors ¶
func (m TimestampOffsetMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TimestampOffsetMultiError) Error ¶
func (m TimestampOffsetMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TimestampOffsetValidationError ¶
type TimestampOffsetValidationError struct {
// contains filtered or unexported fields
}
TimestampOffsetValidationError is the validation error returned by TimestampOffset.Validate if the designated constraints aren't met.
func (TimestampOffsetValidationError) Cause ¶
func (e TimestampOffsetValidationError) Cause() error
Cause function returns cause value.
func (TimestampOffsetValidationError) Error ¶
func (e TimestampOffsetValidationError) Error() string
Error satisfies the builtin error interface
func (TimestampOffsetValidationError) ErrorName ¶
func (e TimestampOffsetValidationError) ErrorName() string
ErrorName returns error name.
func (TimestampOffsetValidationError) Field ¶
func (e TimestampOffsetValidationError) Field() string
Field function returns field value.
func (TimestampOffsetValidationError) Key ¶
func (e TimestampOffsetValidationError) Key() bool
Key function returns key value.
func (TimestampOffsetValidationError) Reason ¶
func (e TimestampOffsetValidationError) Reason() string
Reason function returns reason value.