dmv

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DMVService_ListVehicles_FullMethodName = "/services.dmv.DMVService/ListVehicles"
)

Variables

View Source
var DMVService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.dmv.DMVService",
	HandlerType: (*DMVServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListVehicles",
			Handler:    _DMVService_ListVehicles_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/dmv/vehicles.proto",
}

DMVService_ServiceDesc is the grpc.ServiceDesc for DMVService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_services_dmv_vehicles_proto protoreflect.FileDescriptor

Functions

func RegisterDMVServiceServer

func RegisterDMVServiceServer(s grpc.ServiceRegistrar, srv DMVServiceServer)

Types

type DMVServiceClient

type DMVServiceClient interface {
	// @perm
	ListVehicles(ctx context.Context, in *ListVehiclesRequest, opts ...grpc.CallOption) (*ListVehiclesResponse, error)
}

DMVServiceClient is the client API for DMVService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDMVServiceClient

func NewDMVServiceClient(cc grpc.ClientConnInterface) DMVServiceClient

type DMVServiceServer

type DMVServiceServer interface {
	// @perm
	ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesResponse, error)
	// contains filtered or unexported methods
}

DMVServiceServer is the server API for DMVService service. All implementations must embed UnimplementedDMVServiceServer for forward compatibility

type ListVehiclesRequest

type ListVehiclesRequest struct {
	Pagination *database.PaginationRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	OrderBy    []*database.OrderBy         `protobuf:"bytes,2,rep,name=orderBy,proto3" json:"orderBy,omitempty"`
	// Search params
	Search *string `protobuf:"bytes,3,opt,name=search,proto3,oneof" json:"search,omitempty"`
	Model  *string `protobuf:"bytes,4,opt,name=model,proto3,oneof" json:"model,omitempty"`
	UserId *int32  `protobuf:"varint,5,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListVehiclesRequest) Descriptor deprecated

func (*ListVehiclesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListVehiclesRequest.ProtoReflect.Descriptor instead.

func (*ListVehiclesRequest) GetModel

func (x *ListVehiclesRequest) GetModel() string

func (*ListVehiclesRequest) GetOrderBy

func (x *ListVehiclesRequest) GetOrderBy() []*database.OrderBy

func (*ListVehiclesRequest) GetPagination

func (x *ListVehiclesRequest) GetPagination() *database.PaginationRequest

func (*ListVehiclesRequest) GetSearch

func (x *ListVehiclesRequest) GetSearch() string

func (*ListVehiclesRequest) GetUserId

func (x *ListVehiclesRequest) GetUserId() int32

func (*ListVehiclesRequest) ProtoMessage

func (*ListVehiclesRequest) ProtoMessage()

func (*ListVehiclesRequest) ProtoReflect

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

func (*ListVehiclesRequest) Reset

func (x *ListVehiclesRequest) Reset()

func (*ListVehiclesRequest) String

func (x *ListVehiclesRequest) String() string

func (*ListVehiclesRequest) Validate

func (m *ListVehiclesRequest) Validate() error

Validate checks the field values on ListVehiclesRequest 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 (*ListVehiclesRequest) ValidateAll

func (m *ListVehiclesRequest) ValidateAll() error

ValidateAll checks the field values on ListVehiclesRequest 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 ListVehiclesRequestMultiError, or nil if none found.

type ListVehiclesRequestMultiError

type ListVehiclesRequestMultiError []error

ListVehiclesRequestMultiError is an error wrapping multiple validation errors returned by ListVehiclesRequest.ValidateAll() if the designated constraints aren't met.

func (ListVehiclesRequestMultiError) AllErrors

func (m ListVehiclesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListVehiclesRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListVehiclesRequestValidationError

type ListVehiclesRequestValidationError struct {
	// contains filtered or unexported fields
}

ListVehiclesRequestValidationError is the validation error returned by ListVehiclesRequest.Validate if the designated constraints aren't met.

func (ListVehiclesRequestValidationError) Cause

Cause function returns cause value.

func (ListVehiclesRequestValidationError) Error

Error satisfies the builtin error interface

func (ListVehiclesRequestValidationError) ErrorName

ErrorName returns error name.

func (ListVehiclesRequestValidationError) Field

Field function returns field value.

func (ListVehiclesRequestValidationError) Key

Key function returns key value.

func (ListVehiclesRequestValidationError) Reason

Reason function returns reason value.

type ListVehiclesResponse

type ListVehiclesResponse struct {
	Pagination *database.PaginationResponse `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	Vehicles   []*vehicles.Vehicle          `protobuf:"bytes,2,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
	// contains filtered or unexported fields
}

func (*ListVehiclesResponse) Descriptor deprecated

func (*ListVehiclesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListVehiclesResponse.ProtoReflect.Descriptor instead.

func (*ListVehiclesResponse) GetPagination

func (x *ListVehiclesResponse) GetPagination() *database.PaginationResponse

func (*ListVehiclesResponse) GetVehicles

func (x *ListVehiclesResponse) GetVehicles() []*vehicles.Vehicle

func (*ListVehiclesResponse) ProtoMessage

func (*ListVehiclesResponse) ProtoMessage()

func (*ListVehiclesResponse) ProtoReflect

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

func (*ListVehiclesResponse) Reset

func (x *ListVehiclesResponse) Reset()

func (*ListVehiclesResponse) String

func (x *ListVehiclesResponse) String() string

func (*ListVehiclesResponse) Validate

func (m *ListVehiclesResponse) Validate() error

Validate checks the field values on ListVehiclesResponse 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 (*ListVehiclesResponse) ValidateAll

func (m *ListVehiclesResponse) ValidateAll() error

ValidateAll checks the field values on ListVehiclesResponse 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 ListVehiclesResponseMultiError, or nil if none found.

type ListVehiclesResponseMultiError

type ListVehiclesResponseMultiError []error

ListVehiclesResponseMultiError is an error wrapping multiple validation errors returned by ListVehiclesResponse.ValidateAll() if the designated constraints aren't met.

func (ListVehiclesResponseMultiError) AllErrors

func (m ListVehiclesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListVehiclesResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListVehiclesResponseValidationError

type ListVehiclesResponseValidationError struct {
	// contains filtered or unexported fields
}

ListVehiclesResponseValidationError is the validation error returned by ListVehiclesResponse.Validate if the designated constraints aren't met.

func (ListVehiclesResponseValidationError) Cause

Cause function returns cause value.

func (ListVehiclesResponseValidationError) Error

Error satisfies the builtin error interface

func (ListVehiclesResponseValidationError) ErrorName

ErrorName returns error name.

func (ListVehiclesResponseValidationError) Field

Field function returns field value.

func (ListVehiclesResponseValidationError) Key

Key function returns key value.

func (ListVehiclesResponseValidationError) Reason

Reason function returns reason value.

type Server

type Server struct {
	DMVServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db *sql.DB, p perms.Permissions, c *mstlystcdata.Enricher, aud audit.IAuditer) *Server

func (*Server) ListVehicles

func (s *Server) ListVehicles(ctx context.Context, req *ListVehiclesRequest) (*ListVehiclesResponse, error)

func (*Server) RegisterServer added in v0.8.0

func (s *Server) RegisterServer(srv *grpc.Server)

type UnimplementedDMVServiceServer

type UnimplementedDMVServiceServer struct {
}

UnimplementedDMVServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDMVServiceServer) ListVehicles

type UnsafeDMVServiceServer

type UnsafeDMVServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDMVServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DMVServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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