service

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FleetHandler

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

func NewFleetHandler

func NewFleetHandler(r *repository.Repository) (*FleetHandler, error)

func (*FleetHandler) Filter

func (h *FleetHandler) Filter(fs []*repository.Filter) (bool, error)

func (*FleetHandler) GetStats

func (h *FleetHandler) GetStats(fs []*repository.Filter) (*FleetStats, error)

func (*FleetHandler) GetVehicles

func (h *FleetHandler) GetVehicles() ([]*fleet.Vehicle, error)

func (*FleetHandler) GetVehiclesByOperationalStatus

func (h *FleetHandler) GetVehiclesByOperationalStatus(status string) ([]*fleet.Vehicle, error)

func (*FleetHandler) GetVehiclesByYear

func (h *FleetHandler) GetVehiclesByYear(year int32) ([]*fleet.Vehicle, error)

func (*FleetHandler) SaveVehicle

func (h *FleetHandler) SaveVehicle(v *fleet.Vehicle) (bool, error)

type FleetServer

type FleetServer struct {
	fleet.UnimplementedFleetServiceServer
	Repository *repository.Repository
}

func NewFleetServer

func NewFleetServer(f string) (*FleetServer, error)

func (*FleetServer) AddVehicle

func (*FleetServer) GetFleetStats

func (*FleetServer) GetVehiclesByOpStatus

func (s *FleetServer) GetVehiclesByOpStatus(ctx context.Context, req *fleet.GetVehiclesByOpStatusRequest) (*fleet.VehicleList, error)

func (*FleetServer) GetVehiclesByYear

func (s *FleetServer) GetVehiclesByYear(ctx context.Context, req *fleet.GetVehiclesByYearRequest) (*fleet.VehicleList, error)

func (*FleetServer) ListVehicles

func (s *FleetServer) ListVehicles(ctx context.Context, in *emptypb.Empty) (*fleet.VehicleList, error)

type FleetStats

type FleetStats struct {
	Active     int32
	Reserve    int32
	Training   int32
	AverageAge float32
}

type GroupStats

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

type IncidentHandler

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

func NewIncidentHandler

func NewIncidentHandler(r *repository.Repository) (*IncidentHandler, error)

func (*IncidentHandler) Filter

func (h *IncidentHandler) Filter(fs []*repository.Filter) (bool, error)

func (*IncidentHandler) GetIncidents

func (h *IncidentHandler) GetIncidents() ([]*incident.Incident, error)

func (*IncidentHandler) GetIncidentsByAnimalGroup

func (h *IncidentHandler) GetIncidentsByAnimalGroup(group string) ([]*incident.Incident, error)

func (*IncidentHandler) GetYearStats

func (h *IncidentHandler) GetYearStats(year int32) (*Stats, error)

type IncidentServer

type IncidentServer struct {
	incident.UnimplementedIncidentServiceServer
	Repository *repository.Repository
}

func NewIncidentServer

func NewIncidentServer(f string) (*IncidentServer, error)

func (*IncidentServer) GetIncidentsByAnimalGroup

func (*IncidentServer) ListIncidents

func (s *IncidentServer) ListIncidents(ctx context.Context, in *emptypb.Empty) (*incident.IncidentList, error)

type Stats

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

Jump to

Keyboard shortcuts

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