Documentation
¶
Overview ¶
Package service provides the business logic for the Wits application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StrainService ¶
type StrainService interface {
AddStrain(s *can.Strain) error
GetStrains() []*can.Strain
FindStrainByProduct(p string) (*can.Strain, error)
}
StrainService provides operations on strains.
type StrainServiceType ¶
type StrainServiceType struct {
// contains filtered or unexported fields
}
StrainServiceType provides operations on strains, accessing a store.
func NewStrainService ¶
func NewStrainService(s storage.StrainStore) *StrainServiceType
NewStrainService creates a new service layer for strains.
func (*StrainServiceType) AddStrain ¶
func (svc *StrainServiceType) AddStrain(s *can.Strain) error
AddStrain adds a strain to the store.
func (*StrainServiceType) FindStrainByProduct ¶ added in v0.1.1
func (svc *StrainServiceType) FindStrainByProduct(p string) (*can.Strain, error)
FindStrainByProduct looks up a strain by its prodcut name.
func (*StrainServiceType) GetStrains ¶
func (svc *StrainServiceType) GetStrains() []*can.Strain
GetStrains retrieves all strains from the store.
Click to show internal directories.
Click to hide internal directories.