Documentation ¶
Index ¶
- Variables
- type Vehicle
- func (*Vehicle) Descriptor() ([]byte, []int)deprecated
- func (x *Vehicle) GetModel() string
- func (x *Vehicle) GetOwner() *users.UserShort
- func (x *Vehicle) GetPlate() string
- func (x *Vehicle) GetType() string
- func (*Vehicle) ProtoMessage()
- func (x *Vehicle) ProtoReflect() protoreflect.Message
- func (x *Vehicle) Reset()
- func (x *Vehicle) String() string
- func (m *Vehicle) Validate() error
- func (m *Vehicle) ValidateAll() error
- type VehicleMultiError
- type VehicleValidationError
Constants ¶
This section is empty.
Variables ¶
var File_resources_vehicles_vehicles_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Vehicle ¶
type Vehicle struct { Plate string `protobuf:"bytes,1,opt,name=plate,proto3" json:"plate,omitempty"` Model *string `protobuf:"bytes,2,opt,name=model,proto3,oneof" json:"model,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Owner *users.UserShort `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` // contains filtered or unexported fields }
func (*Vehicle) Descriptor
deprecated
func (*Vehicle) ProtoMessage ¶
func (*Vehicle) ProtoMessage()
func (*Vehicle) ProtoReflect ¶
func (x *Vehicle) ProtoReflect() protoreflect.Message
func (*Vehicle) Validate ¶
Validate checks the field values on Vehicle 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 (*Vehicle) ValidateAll ¶
ValidateAll checks the field values on Vehicle 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 VehicleMultiError, or nil if none found.
type VehicleMultiError ¶
type VehicleMultiError []error
VehicleMultiError is an error wrapping multiple validation errors returned by Vehicle.ValidateAll() if the designated constraints aren't met.
func (VehicleMultiError) AllErrors ¶
func (m VehicleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VehicleMultiError) Error ¶
func (m VehicleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VehicleValidationError ¶
type VehicleValidationError struct {
// contains filtered or unexported fields
}
VehicleValidationError is the validation error returned by Vehicle.Validate if the designated constraints aren't met.
func (VehicleValidationError) Cause ¶
func (e VehicleValidationError) Cause() error
Cause function returns cause value.
func (VehicleValidationError) Error ¶
func (e VehicleValidationError) Error() string
Error satisfies the builtin error interface
func (VehicleValidationError) ErrorName ¶
func (e VehicleValidationError) ErrorName() string
ErrorName returns error name.
func (VehicleValidationError) Field ¶
func (e VehicleValidationError) Field() string
Field function returns field value.
func (VehicleValidationError) Key ¶
func (e VehicleValidationError) Key() bool
Key function returns key value.
func (VehicleValidationError) Reason ¶
func (e VehicleValidationError) Reason() string
Reason function returns reason value.