Documentation ¶
Index ¶
- Variables
- type Timestamp
- func (x *Timestamp) AsTime() time.Time
- func (*Timestamp) Descriptor() ([]byte, []int)deprecated
- func (x *Timestamp) GetTimestamp() *timestamppb.Timestamp
- func (*Timestamp) ProtoMessage()
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (x *Timestamp) Reset()
- func (ts *Timestamp) Scan(value any) error
- func (x *Timestamp) String() string
- func (m *Timestamp) Validate() error
- func (m *Timestamp) ValidateAll() error
- func (ts *Timestamp) Value() (driver.Value, error)
- type TimestampMultiError
- type TimestampValidationError
Constants ¶
This section is empty.
Variables ¶
var ( NegativeInfinityTS = time.Date(math.MinInt32, time.January, 1, 0, 0, 0, 0, time.UTC) PositiveInfinityTS = time.Date(math.MaxInt32, time.December, 31, 23, 59, 59, 1e9-1, time.UTC) )
var File_resources_timestamp_timestamp_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Timestamp ¶
type Timestamp struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
Timestamp for storage messages. We've defined a new local type wrapper of google.protobuf.Timestamp so we can implement sql.Scanner and sql.Valuer interfaces. See: https://golang.org/pkg/database/sql/#Scanner https://golang.org/pkg/database/sql/driver/#Valuer
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) GetTimestamp ¶
func (x *Timestamp) GetTimestamp() *timestamppb.Timestamp
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
func (*Timestamp) Validate ¶
Validate checks the field values on Timestamp 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 (*Timestamp) ValidateAll ¶
ValidateAll checks the field values on Timestamp 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 TimestampMultiError, or nil if none found.
type TimestampMultiError ¶
type TimestampMultiError []error
TimestampMultiError is an error wrapping multiple validation errors returned by Timestamp.ValidateAll() if the designated constraints aren't met.
func (TimestampMultiError) AllErrors ¶
func (m TimestampMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TimestampMultiError) Error ¶
func (m TimestampMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TimestampValidationError ¶
type TimestampValidationError struct {
// contains filtered or unexported fields
}
TimestampValidationError is the validation error returned by Timestamp.Validate if the designated constraints aren't met.
func (TimestampValidationError) Cause ¶
func (e TimestampValidationError) Cause() error
Cause function returns cause value.
func (TimestampValidationError) Error ¶
func (e TimestampValidationError) Error() string
Error satisfies the builtin error interface
func (TimestampValidationError) ErrorName ¶
func (e TimestampValidationError) ErrorName() string
ErrorName returns error name.
func (TimestampValidationError) Field ¶
func (e TimestampValidationError) Field() string
Field function returns field value.
func (TimestampValidationError) Key ¶
func (e TimestampValidationError) Key() bool
Key function returns key value.
func (TimestampValidationError) Reason ¶
func (e TimestampValidationError) Reason() string
Reason function returns reason value.