Documentation
¶
Index ¶
- type MockHealthHandler
- type MockHealthRepository
- type MockHealthService
- type MockHostHandler
- type MockHostRepository
- func (mock *MockHostRepository) Create(host *entities.Host) (int64, error)
- func (mock *MockHostRepository) Delete(id int64) error
- func (mock *MockHostRepository) FindByFilters(params *entities.HostQueryParams) ([]entities.Host, error)
- func (mock *MockHostRepository) Update(id int64, host *entities.Host) error
- type MockHostService
- type MockMetricHandler
- type MockMetricRepository
- type MockMetricService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockHealthHandler ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
type MockHostService ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m *MockMetricService) GetMetrics(params *entities.MetricQueryParams) ([]entities.SystemMetric, error)
GetMetrics mocks getting metrics based on query parameters