vehicles

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Vehicle.ProtoReflect.Descriptor instead.

func (*Vehicle) GetModel

func (x *Vehicle) GetModel() string

func (*Vehicle) GetOwner

func (x *Vehicle) GetOwner() *users.UserShort

func (*Vehicle) GetPlate

func (x *Vehicle) GetPlate() string

func (*Vehicle) GetType

func (x *Vehicle) GetType() string

func (*Vehicle) ProtoMessage

func (*Vehicle) ProtoMessage()

func (*Vehicle) ProtoReflect

func (x *Vehicle) ProtoReflect() protoreflect.Message

func (*Vehicle) Reset

func (x *Vehicle) Reset()

func (*Vehicle) String

func (x *Vehicle) String() string

func (*Vehicle) Validate

func (m *Vehicle) Validate() error

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

func (m *Vehicle) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL