Documentation
¶
Index ¶
- func NewVehicleRepository(s *store.Store, mappers VehicleRepositoryMappers) storage.VehicleRepository
- func WithDescription(description string) entities.EntityFunc[entities.Vehicle]
- func WithNumberPlate(numberPlate string) entities.EntityFunc[entities.Vehicle]
- func WithWaterCapacity(waterCapacity float64) entities.EntityFunc[entities.Vehicle]
- type VehicleRepository
- func (r *VehicleRepository) Create(ctx context.Context, vFn ...entities.EntityFunc[entities.Vehicle]) (*entities.Vehicle, error)
- func (r *VehicleRepository) Delete(ctx context.Context, id int32) error
- func (r *VehicleRepository) GetAll(ctx context.Context) ([]*entities.Vehicle, error)
- func (r *VehicleRepository) GetByID(ctx context.Context, id int32) (*entities.Vehicle, error)
- func (r *VehicleRepository) GetByPlate(ctx context.Context, plate string) (*entities.Vehicle, error)
- func (r *VehicleRepository) Update(ctx context.Context, id int32, vFn ...entities.EntityFunc[entities.Vehicle]) (*entities.Vehicle, error)
- type VehicleRepositoryMappers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewVehicleRepository ¶
func NewVehicleRepository(s *store.Store, mappers VehicleRepositoryMappers) storage.VehicleRepository
func WithDescription ¶
func WithDescription(description string) entities.EntityFunc[entities.Vehicle]
func WithNumberPlate ¶
func WithNumberPlate(numberPlate string) entities.EntityFunc[entities.Vehicle]
func WithWaterCapacity ¶
func WithWaterCapacity(waterCapacity float64) entities.EntityFunc[entities.Vehicle]
Types ¶
type VehicleRepository ¶
type VehicleRepository struct { VehicleRepositoryMappers // contains filtered or unexported fields }
func (*VehicleRepository) Create ¶
func (r *VehicleRepository) Create(ctx context.Context, vFn ...entities.EntityFunc[entities.Vehicle]) (*entities.Vehicle, error)
func (*VehicleRepository) Delete ¶
func (r *VehicleRepository) Delete(ctx context.Context, id int32) error
func (*VehicleRepository) GetByPlate ¶
type VehicleRepositoryMappers ¶
type VehicleRepositoryMappers struct {
// contains filtered or unexported fields
}
func NewVehicleRepositoryMappers ¶
func NewVehicleRepositoryMappers(vMapper mapper.InternalVehicleRepoMapper) VehicleRepositoryMappers
Click to show internal directories.
Click to hide internal directories.