Documentation
¶
Index ¶
- type CatBreedChecker
- type CatsRepository
- type MissionsRepository
- type NotesRepository
- type Service
- func (s Service) AddCat(ctx context.Context, params dto.CreateCatParams) (catID int, err error)
- func (s Service) AddMissionTargets(ctx context.Context, missionID int, newTargets []dto.CreateTargetParams) (err error)
- func (s Service) AddTargetNote(ctx context.Context, missionID, targetID int, contents []string) (err error)
- func (s Service) CompleteTargetByID(ctx context.Context, missionID, targetID int) (err error)
- func (s Service) CreateMission(ctx context.Context, params dto.CreateMissionParams) (missionID int, err error)
- func (s Service) DeleteCatByID(ctx context.Context, catID int) error
- func (s Service) DeleteMissionByID(ctx context.Context, missionID int) (err error)
- func (s Service) DeleteTargetByID(ctx context.Context, missionID, targetID int) (err error)
- func (s Service) GetCatByID(ctx context.Context, catID int) (*models.Cat, error)
- func (s Service) GetCats(ctx context.Context) ([]*models.Cat, error)
- func (s Service) GetMissionByID(ctx context.Context, missionID int) (out *models.MissionFull, err error)
- func (s Service) GetMissions(ctx context.Context, params dto.GetMissionsParams) ([]*models.Mission, error)
- func (s Service) GetTargetByID(ctx context.Context, missionID, targetID int) (out *models.TargetFull, err error)
- func (s Service) GetTargetsByMissionID(ctx context.Context, missionID int) (out []*models.TargetFull, err error)
- func (s Service) UpdateCatByID(ctx context.Context, params dto.UpdateCatParams) error
- func (s Service) UpdateMissionByID(ctx context.Context, params dto.UpdateMissionParams) (err error)
- type TargetsRepository
- type Transactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatBreedChecker ¶
type CatsRepository ¶
type CatsRepository interface { Create(ctx context.Context, params dto.CreateCatParams) (catID int, err error) Delete(ctx context.Context, catID int) (err error) Update(ctx context.Context, params dto.UpdateCatParams) (err error) One(ctx context.Context, catID int) (*models.Cat, error) All(ctx context.Context) ([]*models.Cat, error) }
type MissionsRepository ¶
type MissionsRepository interface { Create(ctx context.Context) (missionID int, err error) Delete(ctx context.Context, missionID int) (err error) Update(ctx context.Context, params dto.UpdateMissionParams) (err error) One(ctx context.Context, missionID int) (*models.Mission, error) All(ctx context.Context, params dto.GetMissionsParams) ([]*models.Mission, error) }
type NotesRepository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(catBreedChecker CatBreedChecker, catsRepository CatsRepository, missionsRepository MissionsRepository, targetsRepository TargetsRepository, notesRepository NotesRepository, transactor Transactor) *Service
func (Service) AddMissionTargets ¶
func (Service) AddTargetNote ¶
func (Service) CompleteTargetByID ¶
func (Service) CreateMission ¶
func (Service) DeleteMissionByID ¶
func (Service) DeleteTargetByID ¶
func (Service) GetCatByID ¶
func (Service) GetMissionByID ¶
func (Service) GetMissions ¶
func (Service) GetTargetByID ¶
func (Service) GetTargetsByMissionID ¶
func (Service) UpdateCatByID ¶
func (Service) UpdateMissionByID ¶
type TargetsRepository ¶
type TargetsRepository interface { Create(ctx context.Context, missionID int, lastTargetID int, targets []dto.CreateTargetParams) error Delete(ctx context.Context, missionID int, targetID int) (err error) Update(ctx context.Context, missionID int, targetID int, completed *bool) (err error) All(ctx context.Context, missionID int) ([]*models.Target, error) One(ctx context.Context, missionID int, targetID int) (*models.Target, error) }
Click to show internal directories.
Click to hide internal directories.