service

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2025 License: Unlicense Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL