Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MachineQuery ¶
MachineQuery indicate that the query to filter the machine instance.
type MachineUsecase ¶
type MachineUsecase interface { // GetAllMachines returns all machines. GetAllMachines(ctx context.Context) ([]*models.Machine, error) // GetMachineByName returns the machine whose name is matched with the given name. GetMachineByName(ctx context.Context, name string) (*models.Machine, error) // GetMachineByQuery returns the machine which is filtered by given query. GetMachineByQuery(ctx context.Context, query *MachineQuery) ([]*models.Machine, error) // RegisterMachine register the machine if it has not been registered. RegisterOrUpdateMachine(ctx context.Context, machine *models.Machine) error }
MachineUsecase is the interface to manipulate the machine data.
func NewMachineUseCase ¶
func NewMachineUseCase(repo repositories.MachineRepository) MachineUsecase
Click to show internal directories.
Click to hide internal directories.