testing

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDB

type MockDB struct {
	GetServiceByInstanceIDFunc func(string) (*models.ServiceConfiguration, error)
	GetAllServicesFunc         func() ([]models.ServiceConfiguration, error)
	CreateServiceFunc          func(*models.ServiceConfiguration) error
	UpdateServiceFunc          func(*models.ServiceConfiguration) error
	DeleteServiceFunc          func(string) error
}

MockDB implements database operations for testing

func (*MockDB) CreateService

func (m *MockDB) CreateService(config *models.ServiceConfiguration) error

CreateService implements the database method

func (*MockDB) DeleteService

func (m *MockDB) DeleteService(instanceID string) error

DeleteService implements the database method

func (*MockDB) GetAllServices

func (m *MockDB) GetAllServices() ([]models.ServiceConfiguration, error)

GetAllServices implements the database method

func (*MockDB) GetServiceByInstanceID

func (m *MockDB) GetServiceByInstanceID(id string) (*models.ServiceConfiguration, error)

GetServiceByInstanceID implements the database method

func (*MockDB) UpdateService

func (m *MockDB) UpdateService(config *models.ServiceConfiguration) error

UpdateService implements the database method

Jump to

Keyboard shortcuts

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