fleet

package
v0.0.0-...-8a7be7b Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_protobuf_schema_fleet_proto protoreflect.FileDescriptor
View Source
var FleetService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "fleet.FleetService",
	HandlerType: (*FleetServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListVehicles",
			Handler:    _FleetService_ListVehicles_Handler,
		},
		{
			MethodName: "AddVehicle",
			Handler:    _FleetService_AddVehicle_Handler,
		},
		{
			MethodName: "GetVehiclesByOpStatus",
			Handler:    _FleetService_GetVehiclesByOpStatus_Handler,
		},
		{
			MethodName: "GetVehiclesByYear",
			Handler:    _FleetService_GetVehiclesByYear_Handler,
		},
		{
			MethodName: "GetFleetStats",
			Handler:    _FleetService_GetFleetStats_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/protobuf/schema/fleet.proto",
}

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

Functions

func RegisterFleetServiceServer

func RegisterFleetServiceServer(s grpc.ServiceRegistrar, srv FleetServiceServer)

Types

type FleetServiceClient

type FleetServiceClient interface {
	ListVehicles(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VehicleList, error)
	AddVehicle(ctx context.Context, in *VehicleRequest, opts ...grpc.CallOption) (*VehicleResponse, error)
	GetVehiclesByOpStatus(ctx context.Context, in *GetVehiclesByOpStatusRequest, opts ...grpc.CallOption) (*VehicleList, error)
	GetVehiclesByYear(ctx context.Context, in *GetVehiclesByYearRequest, opts ...grpc.CallOption) (*VehicleList, error)
	GetFleetStats(ctx context.Context, in *GetFleetStatsRequest, opts ...grpc.CallOption) (*GetFleetStatsResponse, error)
}

FleetServiceClient is the client API for FleetService 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.

type FleetServiceServer

type FleetServiceServer interface {
	ListVehicles(context.Context, *emptypb.Empty) (*VehicleList, error)
	AddVehicle(context.Context, *VehicleRequest) (*VehicleResponse, error)
	GetVehiclesByOpStatus(context.Context, *GetVehiclesByOpStatusRequest) (*VehicleList, error)
	GetVehiclesByYear(context.Context, *GetVehiclesByYearRequest) (*VehicleList, error)
	GetFleetStats(context.Context, *GetFleetStatsRequest) (*GetFleetStatsResponse, error)
	// contains filtered or unexported methods
}

FleetServiceServer is the server API for FleetService service. All implementations must embed UnimplementedFleetServiceServer for forward compatibility

type GetFleetStatsRequest

type GetFleetStatsRequest struct {
	Year *int32  `protobuf:"varint,1,opt,name=year,proto3,oneof" json:"year,omitempty"`
	Make *string `protobuf:"bytes,2,opt,name=make,proto3,oneof" json:"make,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFleetStatsRequest) Descriptor deprecated

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

Deprecated: Use GetFleetStatsRequest.ProtoReflect.Descriptor instead.

func (*GetFleetStatsRequest) GetMake

func (x *GetFleetStatsRequest) GetMake() string

func (*GetFleetStatsRequest) GetYear

func (x *GetFleetStatsRequest) GetYear() int32

func (*GetFleetStatsRequest) ProtoMessage

func (*GetFleetStatsRequest) ProtoMessage()

func (*GetFleetStatsRequest) ProtoReflect

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

func (*GetFleetStatsRequest) Reset

func (x *GetFleetStatsRequest) Reset()

func (*GetFleetStatsRequest) String

func (x *GetFleetStatsRequest) String() string

type GetFleetStatsResponse

type GetFleetStatsResponse struct {
	Active     int32   `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
	Reserve    int32   `protobuf:"varint,2,opt,name=reserve,proto3" json:"reserve,omitempty"`
	Training   int32   `protobuf:"varint,3,opt,name=training,proto3" json:"training,omitempty"`
	AverageAge float32 `protobuf:"fixed32,4,opt,name=average_age,json=averageAge,proto3" json:"average_age,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFleetStatsResponse) Descriptor deprecated

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

Deprecated: Use GetFleetStatsResponse.ProtoReflect.Descriptor instead.

func (*GetFleetStatsResponse) GetActive

func (x *GetFleetStatsResponse) GetActive() int32

func (*GetFleetStatsResponse) GetAverageAge

func (x *GetFleetStatsResponse) GetAverageAge() float32

func (*GetFleetStatsResponse) GetReserve

func (x *GetFleetStatsResponse) GetReserve() int32

func (*GetFleetStatsResponse) GetTraining

func (x *GetFleetStatsResponse) GetTraining() int32

func (*GetFleetStatsResponse) ProtoMessage

func (*GetFleetStatsResponse) ProtoMessage()

func (*GetFleetStatsResponse) ProtoReflect

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

func (*GetFleetStatsResponse) Reset

func (x *GetFleetStatsResponse) Reset()

func (*GetFleetStatsResponse) String

func (x *GetFleetStatsResponse) String() string

type GetVehiclesByOpStatusRequest

type GetVehiclesByOpStatusRequest struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVehiclesByOpStatusRequest) Descriptor deprecated

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

Deprecated: Use GetVehiclesByOpStatusRequest.ProtoReflect.Descriptor instead.

func (*GetVehiclesByOpStatusRequest) GetStatus

func (x *GetVehiclesByOpStatusRequest) GetStatus() string

func (*GetVehiclesByOpStatusRequest) ProtoMessage

func (*GetVehiclesByOpStatusRequest) ProtoMessage()

func (*GetVehiclesByOpStatusRequest) ProtoReflect

func (*GetVehiclesByOpStatusRequest) Reset

func (x *GetVehiclesByOpStatusRequest) Reset()

func (*GetVehiclesByOpStatusRequest) String

type GetVehiclesByYearRequest

type GetVehiclesByYearRequest struct {
	Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVehiclesByYearRequest) Descriptor deprecated

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

Deprecated: Use GetVehiclesByYearRequest.ProtoReflect.Descriptor instead.

func (*GetVehiclesByYearRequest) GetYear

func (x *GetVehiclesByYearRequest) GetYear() int32

func (*GetVehiclesByYearRequest) ProtoMessage

func (*GetVehiclesByYearRequest) ProtoMessage()

func (*GetVehiclesByYearRequest) ProtoReflect

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

func (*GetVehiclesByYearRequest) Reset

func (x *GetVehiclesByYearRequest) Reset()

func (*GetVehiclesByYearRequest) String

func (x *GetVehiclesByYearRequest) String() string

type UnimplementedFleetServiceServer

type UnimplementedFleetServiceServer struct {
}

UnimplementedFleetServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFleetServiceServer) AddVehicle

func (UnimplementedFleetServiceServer) GetFleetStats

func (UnimplementedFleetServiceServer) GetVehiclesByOpStatus

func (UnimplementedFleetServiceServer) GetVehiclesByYear

func (UnimplementedFleetServiceServer) ListVehicles

type UnsafeFleetServiceServer

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

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

type Vehicle

type Vehicle struct {
	FleetNumber       string `protobuf:"bytes,1,opt,name=fleet_number,json=fleetNumber,proto3" json:"fleet_number,omitempty"`
	OperationalStatus string `protobuf:"bytes,2,opt,name=operational_status,json=operationalStatus,proto3" json:"operational_status,omitempty"`
	Lfb               string `protobuf:"bytes,3,opt,name=lfb,proto3" json:"lfb,omitempty"`
	Make              string `protobuf:"bytes,4,opt,name=make,proto3" json:"make,omitempty"`
	Model             string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`
	Type              string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
	Category          string `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"`
	RegistrationYear  int32  `protobuf:"varint,8,opt,name=registration_year,json=registrationYear,proto3" json:"registration_year,omitempty"`
	Life              int32  `protobuf:"varint,9,opt,name=life,proto3" json:"life,omitempty"`
	// contains filtered or unexported fields
}

func (*Vehicle) Descriptor deprecated

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

Deprecated: Use Vehicle.ProtoReflect.Descriptor instead.

func (*Vehicle) GetCategory

func (x *Vehicle) GetCategory() string

func (*Vehicle) GetFleetNumber

func (x *Vehicle) GetFleetNumber() string

func (*Vehicle) GetLfb

func (x *Vehicle) GetLfb() string

func (*Vehicle) GetLife

func (x *Vehicle) GetLife() int32

func (*Vehicle) GetMake

func (x *Vehicle) GetMake() string

func (*Vehicle) GetModel

func (x *Vehicle) GetModel() string

func (*Vehicle) GetOperationalStatus

func (x *Vehicle) GetOperationalStatus() string

func (*Vehicle) GetRegistrationYear

func (x *Vehicle) GetRegistrationYear() int32

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

type VehicleList

type VehicleList struct {
	Vehicles []*Vehicle `protobuf:"bytes,1,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
	// contains filtered or unexported fields
}

func (*VehicleList) Descriptor deprecated

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

Deprecated: Use VehicleList.ProtoReflect.Descriptor instead.

func (*VehicleList) GetVehicles

func (x *VehicleList) GetVehicles() []*Vehicle

func (*VehicleList) ProtoMessage

func (*VehicleList) ProtoMessage()

func (*VehicleList) ProtoReflect

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

func (*VehicleList) Reset

func (x *VehicleList) Reset()

func (*VehicleList) String

func (x *VehicleList) String() string

type VehicleRequest

type VehicleRequest struct {
	OperationalStatus string `protobuf:"bytes,2,opt,name=operational_status,json=operationalStatus,proto3" json:"operational_status,omitempty"`
	Lfb               string `protobuf:"bytes,3,opt,name=lfb,proto3" json:"lfb,omitempty"`
	Make              string `protobuf:"bytes,4,opt,name=make,proto3" json:"make,omitempty"`
	Model             string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`
	Type              string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
	Category          string `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"`
	RegistrationYear  int32  `protobuf:"varint,8,opt,name=registration_year,json=registrationYear,proto3" json:"registration_year,omitempty"`
	Life              int32  `protobuf:"varint,9,opt,name=life,proto3" json:"life,omitempty"`
	// contains filtered or unexported fields
}

func (*VehicleRequest) Descriptor deprecated

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

Deprecated: Use VehicleRequest.ProtoReflect.Descriptor instead.

func (*VehicleRequest) GetCategory

func (x *VehicleRequest) GetCategory() string

func (*VehicleRequest) GetLfb

func (x *VehicleRequest) GetLfb() string

func (*VehicleRequest) GetLife

func (x *VehicleRequest) GetLife() int32

func (*VehicleRequest) GetMake

func (x *VehicleRequest) GetMake() string

func (*VehicleRequest) GetModel

func (x *VehicleRequest) GetModel() string

func (*VehicleRequest) GetOperationalStatus

func (x *VehicleRequest) GetOperationalStatus() string

func (*VehicleRequest) GetRegistrationYear

func (x *VehicleRequest) GetRegistrationYear() int32

func (*VehicleRequest) GetType

func (x *VehicleRequest) GetType() string

func (*VehicleRequest) ProtoMessage

func (*VehicleRequest) ProtoMessage()

func (*VehicleRequest) ProtoReflect

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

func (*VehicleRequest) Reset

func (x *VehicleRequest) Reset()

func (*VehicleRequest) String

func (x *VehicleRequest) String() string

type VehicleResponse

type VehicleResponse struct {
	Vehicle *Vehicle `protobuf:"bytes,1,opt,name=vehicle,proto3" json:"vehicle,omitempty"`
	Created bool     `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
	// contains filtered or unexported fields
}

func (*VehicleResponse) Descriptor deprecated

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

Deprecated: Use VehicleResponse.ProtoReflect.Descriptor instead.

func (*VehicleResponse) GetCreated

func (x *VehicleResponse) GetCreated() bool

func (*VehicleResponse) GetVehicle

func (x *VehicleResponse) GetVehicle() *Vehicle

func (*VehicleResponse) ProtoMessage

func (*VehicleResponse) ProtoMessage()

func (*VehicleResponse) ProtoReflect

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

func (*VehicleResponse) Reset

func (x *VehicleResponse) Reset()

func (*VehicleResponse) String

func (x *VehicleResponse) String() string

Jump to

Keyboard shortcuts

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