mocks

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHealthHandler

type MockHealthHandler struct {
	mock.Mock
}

MockHealthHandler is a mock implementation of HealthHandlerInterface

func (*MockHealthHandler) GetDetailedHealth

func (m *MockHealthHandler) GetDetailedHealth(ctx *gin.Context)

GetDetailedHealth mocks the GetDetailedHealth handler method

func (*MockHealthHandler) GetHealth

func (m *MockHealthHandler) GetHealth(ctx *gin.Context)

GetHealth mocks the GetHealth handler method

type MockHealthRepository

type MockHealthRepository struct {
	mock.Mock
}

MockHealthRepository is a mock implementation of HealthRepositoryInterface

func (*MockHealthRepository) CheckDatabaseConnection

func (mock *MockHealthRepository) CheckDatabaseConnection() error

CheckDatabaseConnection mocks the database connection check

func (*MockHealthRepository) GetDatabaseStats

func (mock *MockHealthRepository) GetDatabaseStats() (map[string]interface{}, error)

GetDatabaseStats mocks getting database statistics

func (*MockHealthRepository) GetTableCounts

func (mock *MockHealthRepository) GetTableCounts() (map[string]int, error)

GetTableCounts mocks getting table counts

type MockHealthService

type MockHealthService struct {
	mock.Mock
}

MockHealthService is a mock implementation of HealthServiceInterface

func (*MockHealthService) CheckHealth

func (m *MockHealthService) CheckHealth() error

CheckHealth mocks the health check

func (*MockHealthService) GetDetailedHealth

func (m *MockHealthService) GetDetailedHealth() (map[string]interface{}, error)

GetDetailedHealth mocks getting detailed health information

type MockHostHandler

type MockHostHandler struct {
	mock.Mock
}

MockHostHandler is a mock implementation of HostHandlerInterface

func (*MockHostHandler) Create

func (m *MockHostHandler) Create(ctx *gin.Context)

Create mocks the Create handler method

func (*MockHostHandler) Delete

func (m *MockHostHandler) Delete(ctx *gin.Context)

Delete mocks the Delete handler method

func (*MockHostHandler) Get

func (m *MockHostHandler) Get(ctx *gin.Context)

Get mocks the Get handler method

func (*MockHostHandler) Update

func (m *MockHostHandler) Update(ctx *gin.Context)

Update mocks the Update handler method

type MockHostRepository

type MockHostRepository struct {
	mock.Mock
}

MockHostRepository is a mock implementation of HostRepositoryInterface

func (*MockHostRepository) Create

func (mock *MockHostRepository) Create(host *entities.Host) (int64, error)

Create mocks creating a new host

func (*MockHostRepository) Delete

func (mock *MockHostRepository) Delete(id int64) error

Delete mocks deleting a host

func (*MockHostRepository) FindByFilters

func (mock *MockHostRepository) FindByFilters(params *entities.HostQueryParams) ([]entities.Host, error)

FindByFilters mocks finding hosts by filters

func (*MockHostRepository) Update

func (mock *MockHostRepository) Update(id int64, host *entities.Host) error

Update mocks updating a host

type MockHostService

type MockHostService struct {
	mock.Mock
}

MockHostService is a mock implementation of HostServiceInterface

func (*MockHostService) CreateHost

func (m *MockHostService) CreateHost(host *entities.Host) (int64, error)

CreateHost mocks creating a new host

func (*MockHostService) DeleteHost

func (m *MockHostService) DeleteHost(id int64) error

DeleteHost mocks deleting a host

func (*MockHostService) GetHosts

func (m *MockHostService) GetHosts(params *entities.HostQueryParams) ([]entities.Host, error)

GetHosts mocks getting a host by ID

func (*MockHostService) UpdateHost

func (m *MockHostService) UpdateHost(id int64, host *entities.Host) error

UpdateHost mocks updating a host

type MockMetricHandler

type MockMetricHandler struct {
	mock.Mock
}

MockMetricHandler is a mock implementation of MetricHandlerInterface

func (*MockMetricHandler) Create

func (m *MockMetricHandler) Create(ctx *gin.Context)

Create mocks the Create handler method

func (*MockMetricHandler) Get

func (m *MockMetricHandler) Get(ctx *gin.Context)

Get mocks the Get handler method

func (*MockMetricHandler) GetLatest

func (m *MockMetricHandler) GetLatest(ctx *gin.Context)

GetLatest mocks the GetLatest handler method

type MockMetricRepository

type MockMetricRepository struct {
	mock.Mock
}

MockMetricRepository is a mock implementation of MetricRepositoryInterface

func (*MockMetricRepository) Create

func (mock *MockMetricRepository) Create(metric *entities.SystemMetric) (int64, error)

Create mocks creating a new metric

func (*MockMetricRepository) FindByFilters

func (mock *MockMetricRepository) FindByFilters(params *entities.MetricQueryParams) ([]entities.SystemMetric, error)

FindByFilters mocks finding metrics by filters

func (*MockMetricRepository) FindLatest

func (mock *MockMetricRepository) FindLatest(hostID *int64) (*entities.SystemMetric, error)

FindLatest mocks finding the latest metric

type MockMetricService

type MockMetricService struct {
	mock.Mock
}

MockMetricService is a mock implementation of MetricServiceInterface

func (*MockMetricService) CreateMetric

func (m *MockMetricService) CreateMetric(metric *entities.SystemMetric) (int64, error)

CreateMetric mocks creating a new metric

func (*MockMetricService) GetLatestMetric

func (m *MockMetricService) GetLatestMetric(hostID *int64) (*entities.SystemMetric, error)

GetLatestMetric mocks getting the latest metric for a specific host or all hosts

func (*MockMetricService) GetMetrics

GetMetrics mocks getting metrics based on query parameters

Jump to

Keyboard shortcuts

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