Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbRepository ¶
DbRepository is a Repository to operate a User encapsulating a Database connection.
func (*DbRepository) CreatePlant ¶
func (r *DbRepository) CreatePlant(p *Plant) (int64, error)
CreatePlant creates a Plant.
func (*DbRepository) FindPlantByID ¶
func (r *DbRepository) FindPlantByID(plantID string) (*Plant, error)
FindPlantByID finds a Plant from its ID.
type Repository ¶
type Repository interface { CreatePlant(p *Plant) (int64, error) FindPlantByID(plantID string) (*Plant, error) }
Repository interface for operating a Plant
type Service ¶
type Service struct {
PlantRepository Repository
}
Service is the plant Service.
func (Service) CreatePlant ¶
CreatePlant creates a new Plant It returns Plant ID.
Click to show internal directories.
Click to hide internal directories.