fake

package
v0.0.0-...-a4d1c61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type Service struct {
	*mock.Mock
}

Service is a fake simulations.Service implementation.

func NewService

func NewService() *Service

NewService initializes a new fake service implementation.

func (*Service) Create

Create mocks the Create method.

func (*Service) Get

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.

Jump to

Keyboard shortcuts

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