Documentation ¶
Index ¶
- Variables
- type Date
- func (t *Date) AsTime() time.Time
- func (*Date) Descriptor() ([]byte, []int)deprecated
- func (x *Date) GetDay() int32
- func (x *Date) GetMonth() int32
- func (x *Date) GetYear() int32
- func (*Date) ProtoMessage()
- func (x *Date) ProtoReflect() protoreflect.Message
- func (x *Date) Reset()
- func (x *Date) String() string
- func (m *Date) Validate() error
- func (m *Date) ValidateAll() error
- type DateMultiError
- type DateValidationError
Constants ¶
This section is empty.
Variables ¶
var File_gommerce_types_v1_date_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Date ¶
type Date struct { // Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"` // Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"` // Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year // and month where the day is not significant. Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` // contains filtered or unexported fields }
Date represents a year, month, and day in the Gregorian calendar. https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
func (*Date) Descriptor
deprecated
func (*Date) ProtoMessage ¶
func (*Date) ProtoMessage()
func (*Date) ProtoReflect ¶
func (x *Date) ProtoReflect() protoreflect.Message
func (*Date) Validate ¶
Validate checks the field values on Date 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 (*Date) ValidateAll ¶
ValidateAll checks the field values on Date 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 DateMultiError, or nil if none found.
type DateMultiError ¶
type DateMultiError []error
DateMultiError is an error wrapping multiple validation errors returned by Date.ValidateAll() if the designated constraints aren't met.
func (DateMultiError) AllErrors ¶
func (m DateMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DateMultiError) Error ¶
func (m DateMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DateValidationError ¶
type DateValidationError struct {
// contains filtered or unexported fields
}
DateValidationError is the validation error returned by Date.Validate if the designated constraints aren't met.
func (DateValidationError) Cause ¶
func (e DateValidationError) Cause() error
Cause function returns cause value.
func (DateValidationError) Error ¶
func (e DateValidationError) Error() string
Error satisfies the builtin error interface
func (DateValidationError) ErrorName ¶
func (e DateValidationError) ErrorName() string
ErrorName returns error name.
func (DateValidationError) Field ¶
func (e DateValidationError) Field() string
Field function returns field value.
func (DateValidationError) Key ¶
func (e DateValidationError) Key() bool
Key function returns key value.
func (DateValidationError) Reason ¶
func (e DateValidationError) Reason() string
Reason function returns reason value.