Documentation ¶
Index ¶
- func Routes(h *Handler) chi.Router
- type Handler
- type Plant
- type PlantService
- func (ps *PlantService) CreatePlant(ctx context.Context, p *db.Plant) (*db.Plant, error)
- func (ps *PlantService) DeletePlant(ctx context.Context, plantID string) error
- func (ps *PlantService) ListPlants(ctx context.Context) ([]*Plant, error)
- func (ps *PlantService) UpdatePlant(ctx context.Context, p db.Plant) (*db.Plant, error)
- type Planter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
NewHandler returns an instance of the Product handler
type PlantService ¶
type PlantService struct {
// contains filtered or unexported fields
}
func NewPlantService ¶
func NewPlantService(db db.DataStore) (*PlantService, error)
func (*PlantService) CreatePlant ¶
func (*PlantService) DeletePlant ¶
func (ps *PlantService) DeletePlant(ctx context.Context, plantID string) error
func (*PlantService) ListPlants ¶
func (ps *PlantService) ListPlants(ctx context.Context) ([]*Plant, error)
ListProducts returns a list of all products available for sale
func (*PlantService) UpdatePlant ¶
Click to show internal directories.
Click to hide internal directories.