Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDMVServiceServer(s grpc.ServiceRegistrar, srv DMVServiceServer)
- type DMVServiceClient
- type DMVServiceServer
- type ListVehiclesRequest
- func (*ListVehiclesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListVehiclesRequest) GetModel() string
- func (x *ListVehiclesRequest) GetOrderBy() []*database.OrderBy
- func (x *ListVehiclesRequest) GetPagination() *database.PaginationRequest
- func (x *ListVehiclesRequest) GetSearch() string
- func (x *ListVehiclesRequest) GetUserId() int32
- func (*ListVehiclesRequest) ProtoMessage()
- func (x *ListVehiclesRequest) ProtoReflect() protoreflect.Message
- func (x *ListVehiclesRequest) Reset()
- func (x *ListVehiclesRequest) String() string
- func (m *ListVehiclesRequest) Validate() error
- func (m *ListVehiclesRequest) ValidateAll() error
- type ListVehiclesRequestMultiError
- type ListVehiclesRequestValidationError
- func (e ListVehiclesRequestValidationError) Cause() error
- func (e ListVehiclesRequestValidationError) Error() string
- func (e ListVehiclesRequestValidationError) ErrorName() string
- func (e ListVehiclesRequestValidationError) Field() string
- func (e ListVehiclesRequestValidationError) Key() bool
- func (e ListVehiclesRequestValidationError) Reason() string
- type ListVehiclesResponse
- func (*ListVehiclesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListVehiclesResponse) GetPagination() *database.PaginationResponse
- func (x *ListVehiclesResponse) GetVehicles() []*vehicles.Vehicle
- func (*ListVehiclesResponse) ProtoMessage()
- func (x *ListVehiclesResponse) ProtoReflect() protoreflect.Message
- func (x *ListVehiclesResponse) Reset()
- func (x *ListVehiclesResponse) String() string
- func (m *ListVehiclesResponse) Validate() error
- func (m *ListVehiclesResponse) ValidateAll() error
- type ListVehiclesResponseMultiError
- type ListVehiclesResponseValidationError
- func (e ListVehiclesResponseValidationError) Cause() error
- func (e ListVehiclesResponseValidationError) Error() string
- func (e ListVehiclesResponseValidationError) ErrorName() string
- func (e ListVehiclesResponseValidationError) Field() string
- func (e ListVehiclesResponseValidationError) Key() bool
- func (e ListVehiclesResponseValidationError) Reason() string
- type Server
- type UnimplementedDMVServiceServer
- type UnsafeDMVServiceServer
Constants ¶
const (
DMVService_ListVehicles_FullMethodName = "/services.dmv.DMVService/ListVehicles"
)
Variables ¶
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)
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
func NewTestDMVServiceClient ¶
func NewTestDMVServiceClient(srv DMVServiceServer) (DMVServiceClient, context.Context, context.CancelFunc)
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 ¶
func (m ListVehiclesRequestMultiError) Error() string
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 ¶
func (e ListVehiclesRequestValidationError) Cause() error
Cause function returns cause value.
func (ListVehiclesRequestValidationError) Error ¶
func (e ListVehiclesRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListVehiclesRequestValidationError) ErrorName ¶
func (e ListVehiclesRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListVehiclesRequestValidationError) Field ¶
func (e ListVehiclesRequestValidationError) Field() string
Field function returns field value.
func (ListVehiclesRequestValidationError) Key ¶
func (e ListVehiclesRequestValidationError) Key() bool
Key function returns key value.
func (ListVehiclesRequestValidationError) Reason ¶
func (e ListVehiclesRequestValidationError) Reason() string
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 ¶
func (m ListVehiclesResponseMultiError) Error() string
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 ¶
func (e ListVehiclesResponseValidationError) Cause() error
Cause function returns cause value.
func (ListVehiclesResponseValidationError) Error ¶
func (e ListVehiclesResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListVehiclesResponseValidationError) ErrorName ¶
func (e ListVehiclesResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListVehiclesResponseValidationError) Field ¶
func (e ListVehiclesResponseValidationError) Field() string
Field function returns field value.
func (ListVehiclesResponseValidationError) Key ¶
func (e ListVehiclesResponseValidationError) Key() bool
Key function returns key value.
func (ListVehiclesResponseValidationError) Reason ¶
func (e ListVehiclesResponseValidationError) Reason() string
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
type UnimplementedDMVServiceServer ¶
type UnimplementedDMVServiceServer struct { }
UnimplementedDMVServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDMVServiceServer) ListVehicles ¶
func (UnimplementedDMVServiceServer) ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesResponse, error)
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.