Documentation ¶
Index ¶
- func GetAftermarketDeviceByVehicleID(ctx context.Context, vehicleID int) (*model.AftermarketDevice, error)
- func GetDCNByVehicleID(ctx context.Context, vehicleID int) (*gmodel.Dcn, error)
- func GetManufacturerID(ctx context.Context, manufacturerID int) (*model.Manufacturer, error)
- func GetSyntheticDeviceByVehicleID(ctx context.Context, vehicleID int) (*gmodel.SyntheticDevice, error)
- func GetVehicleByID(ctx context.Context, vehicleID int) (*model.Vehicle, error)
- func Middleware(db db.Store, next http.Handler) http.Handler
- type AftermarketDeviceLoader
- type DCNLoader
- type Loaders
- type ManufacturerLoader
- type SyntheticDeviceLoader
- type VehicleLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDCNByVehicleID ¶
func GetManufacturerID ¶
func GetVehicleByID ¶
Types ¶
type AftermarketDeviceLoader ¶
type AftermarketDeviceLoader struct {
// contains filtered or unexported fields
}
func (*AftermarketDeviceLoader) BatchGetLinkedAftermarketDeviceByVehicleID ¶
func (ad *AftermarketDeviceLoader) BatchGetLinkedAftermarketDeviceByVehicleID(ctx context.Context, vehicleIDs []int) []*dataloader.Result[*model.AftermarketDevice]
BatchGetLinkedAftermarketDeviceByVehicleID implements the dataloader for finding aftermarket devices linked to vehicles and returns them in the order requested
type Loaders ¶
type Loaders struct { VehicleByID dataloader.Interface[int, *model.Vehicle] AftermarketDeviceByVehicleID dataloader.Interface[int, *model.AftermarketDevice] SyntheticDeviceByVehicleID dataloader.Interface[int, *model.SyntheticDevice] DCNByVehicleID dataloader.Interface[int, *model.Dcn] ManufacturerByID dataloader.Interface[int, *model.Manufacturer] }
func NewDataLoader ¶
NewDataLoader returns the instantiated Loaders struct for use in a request
type ManufacturerLoader ¶
type ManufacturerLoader struct {
// contains filtered or unexported fields
}
func (*ManufacturerLoader) BatchGetManufacturerByID ¶
func (v *ManufacturerLoader) BatchGetManufacturerByID(ctx context.Context, manufacturerIDs []int) []*dataloader.Result[*model.Manufacturer]
type SyntheticDeviceLoader ¶
type SyntheticDeviceLoader struct {
// contains filtered or unexported fields
}
func (*SyntheticDeviceLoader) BatchGetSyntheticDeviceByVehicleID ¶
func (sd *SyntheticDeviceLoader) BatchGetSyntheticDeviceByVehicleID(ctx context.Context, vehicleIDs []int) []*dataloader.Result[*gmodel.SyntheticDevice]
BatchGetSyntheticDeviceByVehicleID implements the dataloader for finding synthetic devices linked to vehicles and returns them in the order requested
type VehicleLoader ¶
type VehicleLoader struct {
// contains filtered or unexported fields
}
func (*VehicleLoader) BatchGetLinkedVehicleByAftermarketID ¶
func (v *VehicleLoader) BatchGetLinkedVehicleByAftermarketID(ctx context.Context, vehicleIDs []int) []*dataloader.Result[*model.Vehicle]
BatchGetLinkedVehicleByAftermarketID implements the dataloader for finding vehicles linked to aftermarket devices and returns them in the order requested
Click to show internal directories.
Click to hide internal directories.