Documentation
¶
Index ¶
- type Storage
- func (s *Storage) AddTarget(missionID int64, name, country, notes string) (int64, error)
- func (s *Storage) AssignCatToMission(missionID, catID int64) error
- func (s *Storage) CatExists(id int64) (bool, error)
- func (s *Storage) CreateCat(name string, yearsOfExperience int, breed string, salary float64) (int64, error)
- func (s *Storage) CreateMission(catID sql.NullInt64, targets []common.Target, complete bool) (int64, error)
- func (s *Storage) DeleteCat(id int64) error
- func (s *Storage) DeleteMission(missionIDs []int64) error
- func (s *Storage) DeleteTarget(targetID int64) error
- func (s *Storage) DeleteUnassignedMission(missionIDs []int64) error
- func (s *Storage) GetAllCats() ([]spycat.SpyCat, error)
- func (s *Storage) GetAllMissions() ([]common.Mission, error)
- func (s *Storage) GetCatByID(id int64) (*spycat.SpyCat, error)
- func (s *Storage) GetMission(id int64) (*common.Mission, error)
- func (s *Storage) MissionExists(id int64) (bool, error)
- func (s *Storage) TargetExists(targetID int64) (bool, error)
- func (s *Storage) UpdateCatSalary(id int64, salary float64) error
- func (s *Storage) UpdateCompleteStatus(targetID int64, complete bool) error
- func (s *Storage) UpdateMissionCompleteStatus(id int64, complete bool) error
- func (s *Storage) UpdateNotes(targetID int64, notes string) error
- func (s *Storage) UpdateTarget(id int64, target common.Target) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) AssignCatToMission ¶
func (*Storage) CreateMission ¶
func (*Storage) DeleteMission ¶
DeleteMission always deletes the mission, regardless of whether it is assigned to a cat.
func (*Storage) DeleteTarget ¶
func (*Storage) DeleteUnassignedMission ¶
DeleteUnassignedMission only deletes the mission if it is not assigned to a cat.
func (*Storage) UpdateCompleteStatus ¶
func (*Storage) UpdateMissionCompleteStatus ¶
Click to show internal directories.
Click to hide internal directories.