Documentation ¶
Index ¶
- func NewRobot(name, kind string) simulations.Robot
- func NewSimulation(groupID simulations.GroupID, status simulations.Status, kind simulations.Kind, ...) simulations.Simulation
- type Service
- func (s *Service) Create(input simulations.CreateSimulationInput) (simulations.Simulation, error)
- func (s *Service) Get(groupID simulations.GroupID) (simulations.Simulation, error)
- func (s *Service) GetParent(groupID simulations.GroupID) (simulations.Simulation, error)
- func (s *Service) GetRobots(groupID simulations.GroupID) ([]simulations.Robot, error)
- func (s *Service) GetWebsocketToken(groupID simulations.GroupID) (string, error)
- func (s *Service) MarkCharged(groupID simulations.GroupID) error
- func (s *Service) MarkStopped(groupID simulations.GroupID) error
- func (s *Service) Reject(groupID simulations.GroupID) (simulations.Simulation, error)
- func (s *Service) Update(groupID simulations.GroupID, simulation simulations.Simulation) error
- func (s *Service) UpdateScore(groupID simulations.GroupID, score *float64) error
- func (s *Service) UpdateStatus(groupID simulations.GroupID, status simulations.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRobot ¶
func NewRobot(name, kind string) simulations.Robot
NewRobot initializes a new fake robot.
func NewSimulation ¶
func NewSimulation(groupID simulations.GroupID, status simulations.Status, kind simulations.Kind, err *simulations.Error, image string, validFor time.Duration, owner *string, launchedAt *time.Time) simulations.Simulation
NewSimulation initializes a new fake simulation.
Types ¶
type Service ¶
Service is a fake simulations.Service implementation.
func NewService ¶
func NewService() *Service
NewService initializes a new fake service implementation.
func (*Service) Create ¶
func (s *Service) Create(input simulations.CreateSimulationInput) (simulations.Simulation, error)
Create mocks the Create method.
func (*Service) Get ¶
func (s *Service) Get(groupID simulations.GroupID) (simulations.Simulation, error)
Get is a mock for the Get method.
func (*Service) GetParent ¶
func (s *Service) GetParent(groupID simulations.GroupID) (simulations.Simulation, error)
GetParent is a mock for the GetParent method.
func (*Service) GetRobots ¶
func (s *Service) GetRobots(groupID simulations.GroupID) ([]simulations.Robot, error)
GetRobots is a mock for the GetRobots method.
func (*Service) GetWebsocketToken ¶
func (s *Service) GetWebsocketToken(groupID simulations.GroupID) (string, error)
GetWebsocketToken mocks the GetWebsocketToken method.
func (*Service) MarkCharged ¶
func (s *Service) MarkCharged(groupID simulations.GroupID) error
MarkCharged marks a simulation identified with the given Group ID as charged.
func (*Service) MarkStopped ¶
func (s *Service) MarkStopped(groupID simulations.GroupID) error
MarkStopped is a mock for the MarkStopped method.
func (*Service) Reject ¶
func (s *Service) Reject(groupID simulations.GroupID) (simulations.Simulation, error)
Reject is a mock for the Reject method.
func (*Service) Update ¶
func (s *Service) Update(groupID simulations.GroupID, simulation simulations.Simulation) error
Update is a mock for the Update method.
func (*Service) UpdateScore ¶
func (s *Service) UpdateScore(groupID simulations.GroupID, score *float64) error
UpdateScore mocks the UpdateScore method.
func (*Service) UpdateStatus ¶
func (s *Service) UpdateStatus(groupID simulations.GroupID, status simulations.Status) error
UpdateStatus is a mock for the UpdateStatus method.