Documentation ¶
Index ¶
- Constants
- func NewChecksService(db *gorm.DB, premiumDetectionService PremiumDetectionService) *checksService
- func NewClustersService(db *gorm.DB, checksService ChecksService) *clustersService
- func NewCollectorService(db *gorm.DB, projectorsChannel chan *datapipeline.DataCollectedEvent) *collectorService
- func NewHostsService(db *gorm.DB, promService PrometheusService) *hostsService
- func NewPremiumDetectionService(flavor string, subscriptions SubscriptionsService, settings SettingsService) *premiumDetectionService
- func NewPrometheusService(db *gorm.DB, promApi prometheusInternal.PrometheusAPI) *prometheusService
- func NewSAPSystemsService(db *gorm.DB) *sapSystemsService
- func NewSubscriptionsService(db *gorm.DB) *subscriptionsService
- func NewTagsService(db *gorm.DB) *tagsService
- func Paginate(p *Page) func(db *gorm.DB) *gorm.DB
- type ChecksService
- type ClustersFilter
- type ClustersService
- type CollectorService
- type HealthSummaryService
- type HostsFilter
- type HostsService
- type MockChecksService
- func (_m *MockChecksService) CreateChecksCatalog(checkList models.ChecksCatalog) error
- func (_m *MockChecksService) CreateChecksCatalogEntry(check *models.Check) error
- func (_m *MockChecksService) CreateChecksResult(checksResult *models.ChecksResult) error
- func (_m *MockChecksService) CreateConnectionSettings(node string, cluster string, user string) error
- func (_m *MockChecksService) CreateSelectedChecks(id string, selectedChecksList []string) error
- func (_m *MockChecksService) GetAggregatedChecksResultByCluster(clusterId string) (*models.AggregatedCheckData, error)
- func (_m *MockChecksService) GetAggregatedChecksResultByHost(clusterId string) (map[string]*models.AggregatedCheckData, error)
- func (_m *MockChecksService) GetChecksCatalog() (models.ChecksCatalog, error)
- func (_m *MockChecksService) GetChecksCatalogByGroup() (models.GroupedCheckList, error)
- func (_m *MockChecksService) GetChecksResultAndMetadataByCluster(clusterId string) (*models.ChecksResultAsList, error)
- func (_m *MockChecksService) GetChecksResultByCluster(clusterId string) (*models.ChecksResult, error)
- func (_m *MockChecksService) GetConnectionSettingsById(id string) (map[string]models.ConnectionSettings, error)
- func (_m *MockChecksService) GetConnectionSettingsByNode(node string) (models.ConnectionSettings, error)
- func (_m *MockChecksService) GetLastExecutionByGroup() ([]*models.ChecksResult, error)
- func (_m *MockChecksService) GetSelectedChecksById(id string) (models.SelectedChecks, error)
- type MockClustersService
- func (_m *MockClustersService) GetAll(_a0 *ClustersFilter, _a1 *Page) (models.ClusterList, error)
- func (_m *MockClustersService) GetAllClusterNames() ([]string, error)
- func (_m *MockClustersService) GetAllClusterTypes() ([]string, error)
- func (_m *MockClustersService) GetAllClustersSettings() (models.ClustersSettings, error)
- func (_m *MockClustersService) GetAllSIDs() ([]string, error)
- func (_m *MockClustersService) GetAllTags() ([]string, error)
- func (_m *MockClustersService) GetByID(_a0 string) (*models.Cluster, error)
- func (_m *MockClustersService) GetClusterSettingsByID(id string) (*models.ClusterSettings, error)
- func (_m *MockClustersService) GetCount() (int, error)
- type MockCollectorService
- type MockHealthSummaryService
- type MockHostsService
- func (_m *MockHostsService) GetAll(_a0 *HostsFilter, _a1 *Page) (models.HostList, error)
- func (_m *MockHostsService) GetAllBySAPSystemID(_a0 string) (models.HostList, error)
- func (_m *MockHostsService) GetAllSIDs() ([]string, error)
- func (_m *MockHostsService) GetAllTags() ([]string, error)
- func (_m *MockHostsService) GetByID(_a0 string) (*models.Host, error)
- func (_m *MockHostsService) GetCount() (int, error)
- func (_m *MockHostsService) GetExportersState(hostname string) (map[string]string, error)
- func (_m *MockHostsService) Heartbeat(agentID string) error
- type MockPremiumDetectionService
- type MockPrometheusService
- type MockSAPSystemsService
- func (_m *MockSAPSystemsService) GetAllApplications(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error)
- func (_m *MockSAPSystemsService) GetAllApplicationsSIDs() ([]string, error)
- func (_m *MockSAPSystemsService) GetAllApplicationsTags() ([]string, error)
- func (_m *MockSAPSystemsService) GetAllDatabases(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error)
- func (_m *MockSAPSystemsService) GetAllDatabasesSIDs() ([]string, error)
- func (_m *MockSAPSystemsService) GetAllDatabasesTags() ([]string, error)
- func (_m *MockSAPSystemsService) GetApplicationsCount() (int, error)
- func (_m *MockSAPSystemsService) GetByID(ID string) (*models.SAPSystem, error)
- func (_m *MockSAPSystemsService) GetDatabasesCount() (int, error)
- type MockSettingsService
- type MockSubscriptionsService
- type MockTagsService
- func (_m *MockTagsService) Create(value string, resourceType string, resourceId string) error
- func (_m *MockTagsService) Delete(value string, resourceType string, resourceId string) error
- func (_m *MockTagsService) GetAll(resourceTypeFilter ...string) ([]string, error)
- func (_m *MockTagsService) GetAllByResource(resourceType string, resourceId string) ([]string, error)
- type Page
- type PremiumDetectionService
- type PrometheusService
- type SAPSystemFilter
- type SAPSystemsService
- type SettingsService
- type SubscriptionsService
- type TagsService
Constants ¶
const HeartbeatTreshold = internal.HeartbeatInterval * 2
const (
SlesIdentifier string = "SLES_SAP"
)
Variables ¶
This section is empty.
Functions ¶
func NewChecksService ¶
func NewChecksService(db *gorm.DB, premiumDetectionService PremiumDetectionService) *checksService
func NewClustersService ¶
func NewClustersService(db *gorm.DB, checksService ChecksService) *clustersService
func NewCollectorService ¶
func NewCollectorService(db *gorm.DB, projectorsChannel chan *datapipeline.DataCollectedEvent) *collectorService
func NewHostsService ¶
func NewHostsService(db *gorm.DB, promService PrometheusService) *hostsService
func NewPremiumDetectionService ¶
func NewPremiumDetectionService(flavor string, subscriptions SubscriptionsService, settings SettingsService) *premiumDetectionService
func NewPrometheusService ¶
func NewPrometheusService(db *gorm.DB, promApi prometheusInternal.PrometheusAPI) *prometheusService
func NewSAPSystemsService ¶
func NewSubscriptionsService ¶
func NewTagsService ¶
Types ¶
type ChecksService ¶
type ChecksService interface { // Check catalog services GetChecksCatalog() (models.ChecksCatalog, error) GetChecksCatalogByGroup() (models.GroupedCheckList, error) CreateChecksCatalogEntry(check *models.Check) error // seems to be never used CreateChecksCatalog(checkList models.ChecksCatalog) error // Check result services CreateChecksResult(checksResult *models.ChecksResult) error GetLastExecutionByGroup() ([]*models.ChecksResult, error) GetChecksResultByCluster(clusterId string) (*models.ChecksResult, error) GetChecksResultAndMetadataByCluster(clusterId string) (*models.ChecksResultAsList, error) GetAggregatedChecksResultByHost(clusterId string) (map[string]*models.AggregatedCheckData, error) GetAggregatedChecksResultByCluster(clusterId string) (*models.AggregatedCheckData, error) // Selected checks services GetSelectedChecksById(id string) (models.SelectedChecks, error) CreateSelectedChecks(id string, selectedChecksList []string) error // Connection data services GetConnectionSettingsById(id string) (map[string]models.ConnectionSettings, error) GetConnectionSettingsByNode(node string) (models.ConnectionSettings, error) CreateConnectionSettings(node, cluster, user string) error }
type ClustersFilter ¶
type ClustersService ¶
type ClustersService interface { GetAll(*ClustersFilter, *Page) (models.ClusterList, error) GetByID(string) (*models.Cluster, error) GetCount() (int, error) GetAllClusterNames() ([]string, error) GetAllClusterTypes() ([]string, error) GetAllSIDs() ([]string, error) GetAllTags() ([]string, error) GetAllClustersSettings() (models.ClustersSettings, error) GetClusterSettingsByID(id string) (*models.ClusterSettings, error) }
type CollectorService ¶
type CollectorService interface {
StoreEvent(dataCollected *datapipeline.DataCollectedEvent) error
}
type HealthSummaryService ¶
type HealthSummaryService interface {
GetHealthSummary() (models.HealthSummary, error)
}
func NewHealthSummaryService ¶
func NewHealthSummaryService(sapSystemsService SAPSystemsService, clustersService ClustersService, hostsService HostsService) HealthSummaryService
type HostsFilter ¶
type HostsService ¶
type HostsService interface { GetAll(*HostsFilter, *Page) (models.HostList, error) GetByID(string) (*models.Host, error) GetAllBySAPSystemID(string) (models.HostList, error) GetCount() (int, error) GetAllSIDs() ([]string, error) GetAllTags() ([]string, error) Heartbeat(agentID string) error GetExportersState(hostname string) (map[string]string, error) }
type MockChecksService ¶
MockChecksService is an autogenerated mock type for the ChecksService type
func (*MockChecksService) CreateChecksCatalog ¶
func (_m *MockChecksService) CreateChecksCatalog(checkList models.ChecksCatalog) error
CreateChecksCatalog provides a mock function with given fields: checkList
func (*MockChecksService) CreateChecksCatalogEntry ¶
func (_m *MockChecksService) CreateChecksCatalogEntry(check *models.Check) error
CreateChecksCatalogEntry provides a mock function with given fields: check
func (*MockChecksService) CreateChecksResult ¶
func (_m *MockChecksService) CreateChecksResult(checksResult *models.ChecksResult) error
CreateChecksResult provides a mock function with given fields: checksResult
func (*MockChecksService) CreateConnectionSettings ¶
func (_m *MockChecksService) CreateConnectionSettings(node string, cluster string, user string) error
CreateConnectionSettings provides a mock function with given fields: node, cluster, user
func (*MockChecksService) CreateSelectedChecks ¶
func (_m *MockChecksService) CreateSelectedChecks(id string, selectedChecksList []string) error
CreateSelectedChecks provides a mock function with given fields: id, selectedChecksList
func (*MockChecksService) GetAggregatedChecksResultByCluster ¶
func (_m *MockChecksService) GetAggregatedChecksResultByCluster(clusterId string) (*models.AggregatedCheckData, error)
GetAggregatedChecksResultByCluster provides a mock function with given fields: clusterId
func (*MockChecksService) GetAggregatedChecksResultByHost ¶
func (_m *MockChecksService) GetAggregatedChecksResultByHost(clusterId string) (map[string]*models.AggregatedCheckData, error)
GetAggregatedChecksResultByHost provides a mock function with given fields: clusterId
func (*MockChecksService) GetChecksCatalog ¶
func (_m *MockChecksService) GetChecksCatalog() (models.ChecksCatalog, error)
GetChecksCatalog provides a mock function with given fields:
func (*MockChecksService) GetChecksCatalogByGroup ¶
func (_m *MockChecksService) GetChecksCatalogByGroup() (models.GroupedCheckList, error)
GetChecksCatalogByGroup provides a mock function with given fields:
func (*MockChecksService) GetChecksResultAndMetadataByCluster ¶
func (_m *MockChecksService) GetChecksResultAndMetadataByCluster(clusterId string) (*models.ChecksResultAsList, error)
GetChecksResultAndMetadataByCluster provides a mock function with given fields: clusterId
func (*MockChecksService) GetChecksResultByCluster ¶
func (_m *MockChecksService) GetChecksResultByCluster(clusterId string) (*models.ChecksResult, error)
GetChecksResultByCluster provides a mock function with given fields: clusterId
func (*MockChecksService) GetConnectionSettingsById ¶
func (_m *MockChecksService) GetConnectionSettingsById(id string) (map[string]models.ConnectionSettings, error)
GetConnectionSettingsById provides a mock function with given fields: id
func (*MockChecksService) GetConnectionSettingsByNode ¶
func (_m *MockChecksService) GetConnectionSettingsByNode(node string) (models.ConnectionSettings, error)
GetConnectionSettingsByNode provides a mock function with given fields: node
func (*MockChecksService) GetLastExecutionByGroup ¶
func (_m *MockChecksService) GetLastExecutionByGroup() ([]*models.ChecksResult, error)
GetLastExecutionByGroup provides a mock function with given fields:
func (*MockChecksService) GetSelectedChecksById ¶
func (_m *MockChecksService) GetSelectedChecksById(id string) (models.SelectedChecks, error)
GetSelectedChecksById provides a mock function with given fields: id
type MockClustersService ¶
MockClustersService is an autogenerated mock type for the ClustersService type
func (*MockClustersService) GetAll ¶
func (_m *MockClustersService) GetAll(_a0 *ClustersFilter, _a1 *Page) (models.ClusterList, error)
GetAll provides a mock function with given fields: _a0, _a1
func (*MockClustersService) GetAllClusterNames ¶
func (_m *MockClustersService) GetAllClusterNames() ([]string, error)
GetAllClusterNames provides a mock function with given fields:
func (*MockClustersService) GetAllClusterTypes ¶
func (_m *MockClustersService) GetAllClusterTypes() ([]string, error)
GetAllClusterTypes provides a mock function with given fields:
func (*MockClustersService) GetAllClustersSettings ¶
func (_m *MockClustersService) GetAllClustersSettings() (models.ClustersSettings, error)
GetAllClustersSettings provides a mock function with given fields:
func (*MockClustersService) GetAllSIDs ¶
func (_m *MockClustersService) GetAllSIDs() ([]string, error)
GetAllSIDs provides a mock function with given fields:
func (*MockClustersService) GetAllTags ¶
func (_m *MockClustersService) GetAllTags() ([]string, error)
GetAllTags provides a mock function with given fields:
func (*MockClustersService) GetByID ¶
func (_m *MockClustersService) GetByID(_a0 string) (*models.Cluster, error)
GetByID provides a mock function with given fields: _a0
func (*MockClustersService) GetClusterSettingsByID ¶
func (_m *MockClustersService) GetClusterSettingsByID(id string) (*models.ClusterSettings, error)
GetClusterSettingsByID provides a mock function with given fields: id
func (*MockClustersService) GetCount ¶
func (_m *MockClustersService) GetCount() (int, error)
GetCount provides a mock function with given fields:
type MockCollectorService ¶
MockCollectorService is an autogenerated mock type for the CollectorService type
func (*MockCollectorService) StoreEvent ¶
func (_m *MockCollectorService) StoreEvent(dataCollected *datapipeline.DataCollectedEvent) error
StoreEvent provides a mock function with given fields: dataCollected
type MockHealthSummaryService ¶
MockHealthSummaryService is an autogenerated mock type for the HealthSummaryService type
func (*MockHealthSummaryService) GetHealthSummary ¶
func (_m *MockHealthSummaryService) GetHealthSummary() (models.HealthSummary, error)
GetHealthSummary provides a mock function with given fields:
type MockHostsService ¶
MockHostsService is an autogenerated mock type for the HostsService type
func (*MockHostsService) GetAll ¶
func (_m *MockHostsService) GetAll(_a0 *HostsFilter, _a1 *Page) (models.HostList, error)
GetAll provides a mock function with given fields: _a0, _a1
func (*MockHostsService) GetAllBySAPSystemID ¶
func (_m *MockHostsService) GetAllBySAPSystemID(_a0 string) (models.HostList, error)
GetAllBySAPSystemID provides a mock function with given fields: _a0
func (*MockHostsService) GetAllSIDs ¶
func (_m *MockHostsService) GetAllSIDs() ([]string, error)
GetAllSIDs provides a mock function with given fields:
func (*MockHostsService) GetAllTags ¶
func (_m *MockHostsService) GetAllTags() ([]string, error)
GetAllTags provides a mock function with given fields:
func (*MockHostsService) GetByID ¶
func (_m *MockHostsService) GetByID(_a0 string) (*models.Host, error)
GetByID provides a mock function with given fields: _a0
func (*MockHostsService) GetCount ¶
func (_m *MockHostsService) GetCount() (int, error)
GetCount provides a mock function with given fields:
func (*MockHostsService) GetExportersState ¶
func (_m *MockHostsService) GetExportersState(hostname string) (map[string]string, error)
GetExportersState provides a mock function with given fields: hostname
func (*MockHostsService) Heartbeat ¶
func (_m *MockHostsService) Heartbeat(agentID string) error
Heartbeat provides a mock function with given fields: agentID
type MockPremiumDetectionService ¶
MockPremiumDetectionService is an autogenerated mock type for the PremiumDetectionService type
func (*MockPremiumDetectionService) CanPublishTelemetry ¶
func (_m *MockPremiumDetectionService) CanPublishTelemetry() (bool, error)
CanPublishTelemetry provides a mock function with given fields:
func (*MockPremiumDetectionService) IsPremiumActive ¶
func (_m *MockPremiumDetectionService) IsPremiumActive() (bool, error)
IsPremiumActive provides a mock function with given fields:
func (*MockPremiumDetectionService) RequiresEulaAcceptance ¶
func (_m *MockPremiumDetectionService) RequiresEulaAcceptance() (bool, error)
RequiresEulaAcceptance provides a mock function with given fields:
type MockPrometheusService ¶
MockPrometheusService is an autogenerated mock type for the PrometheusService type
func (*MockPrometheusService) GetHttpSDTargets ¶
func (_m *MockPrometheusService) GetHttpSDTargets() (models.PrometheusTargetsList, error)
GetHttpSDTargets provides a mock function with given fields:
type MockSAPSystemsService ¶
MockSAPSystemsService is an autogenerated mock type for the SAPSystemsService type
func (*MockSAPSystemsService) GetAllApplications ¶
func (_m *MockSAPSystemsService) GetAllApplications(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error)
GetAllApplications provides a mock function with given fields: filter, page
func (*MockSAPSystemsService) GetAllApplicationsSIDs ¶
func (_m *MockSAPSystemsService) GetAllApplicationsSIDs() ([]string, error)
GetAllApplicationsSIDs provides a mock function with given fields:
func (*MockSAPSystemsService) GetAllApplicationsTags ¶
func (_m *MockSAPSystemsService) GetAllApplicationsTags() ([]string, error)
GetAllApplicationsTags provides a mock function with given fields:
func (*MockSAPSystemsService) GetAllDatabases ¶
func (_m *MockSAPSystemsService) GetAllDatabases(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error)
GetAllDatabases provides a mock function with given fields: filter, page
func (*MockSAPSystemsService) GetAllDatabasesSIDs ¶
func (_m *MockSAPSystemsService) GetAllDatabasesSIDs() ([]string, error)
GetAllDatabasesSIDs provides a mock function with given fields:
func (*MockSAPSystemsService) GetAllDatabasesTags ¶
func (_m *MockSAPSystemsService) GetAllDatabasesTags() ([]string, error)
GetAllDatabasesTags provides a mock function with given fields:
func (*MockSAPSystemsService) GetApplicationsCount ¶
func (_m *MockSAPSystemsService) GetApplicationsCount() (int, error)
GetApplicationsCount provides a mock function with given fields:
func (*MockSAPSystemsService) GetByID ¶
func (_m *MockSAPSystemsService) GetByID(ID string) (*models.SAPSystem, error)
GetByID provides a mock function with given fields: ID
func (*MockSAPSystemsService) GetDatabasesCount ¶
func (_m *MockSAPSystemsService) GetDatabasesCount() (int, error)
GetDatabasesCount provides a mock function with given fields:
type MockSettingsService ¶
MockSettingsService is an autogenerated mock type for the SettingsService type
func (*MockSettingsService) AcceptEula ¶
func (_m *MockSettingsService) AcceptEula() error
AcceptEula provides a mock function with given fields:
func (*MockSettingsService) InitializeIdentifier ¶
func (_m *MockSettingsService) InitializeIdentifier() (uuid.UUID, error)
InitializeIdentifier provides a mock function with given fields:
func (*MockSettingsService) IsEulaAccepted ¶
func (_m *MockSettingsService) IsEulaAccepted() (bool, error)
IsEulaAccepted provides a mock function with given fields:
type MockSubscriptionsService ¶
MockSubscriptionsService is an autogenerated mock type for the SubscriptionsService type
func (*MockSubscriptionsService) GetHostSubscriptions ¶
func (_m *MockSubscriptionsService) GetHostSubscriptions(host string) ([]*models.SlesSubscription, error)
GetHostSubscriptions provides a mock function with given fields: host
func (*MockSubscriptionsService) GetPremiumData ¶
func (_m *MockSubscriptionsService) GetPremiumData() (*models.PremiumData, error)
GetPremiumData provides a mock function with given fields:
func (*MockSubscriptionsService) IsTrentoPremium ¶
func (_m *MockSubscriptionsService) IsTrentoPremium() (bool, error)
IsTrentoPremium provides a mock function with given fields:
type MockTagsService ¶
MockTagsService is an autogenerated mock type for the TagsService type
func (*MockTagsService) Create ¶
func (_m *MockTagsService) Create(value string, resourceType string, resourceId string) error
Create provides a mock function with given fields: value, resourceType, resourceId
func (*MockTagsService) Delete ¶
func (_m *MockTagsService) Delete(value string, resourceType string, resourceId string) error
Delete provides a mock function with given fields: value, resourceType, resourceId
func (*MockTagsService) GetAll ¶
func (_m *MockTagsService) GetAll(resourceTypeFilter ...string) ([]string, error)
GetAll provides a mock function with given fields: resourceTypeFilter
func (*MockTagsService) GetAllByResource ¶
func (_m *MockTagsService) GetAllByResource(resourceType string, resourceId string) ([]string, error)
GetAllByResource provides a mock function with given fields: resourceType, resourceId
type PremiumDetectionService ¶
type PrometheusService ¶
type PrometheusService interface { GetHttpSDTargets() (models.PrometheusTargetsList, error) Query(query string, ts time.Time) (prometheusModel.Value, error) }
type SAPSystemFilter ¶
type SAPSystemsService ¶
type SAPSystemsService interface { GetAllApplications(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error) GetAllDatabases(filter *SAPSystemFilter, page *Page) (models.SAPSystemList, error) GetByID(ID string) (*models.SAPSystem, error) GetApplicationsCount() (int, error) GetDatabasesCount() (int, error) GetAllApplicationsSIDs() ([]string, error) GetAllDatabasesSIDs() ([]string, error) GetAllApplicationsTags() ([]string, error) GetAllDatabasesTags() ([]string, error) }
type SettingsService ¶
type SettingsService interface { InitializeIdentifier() (uuid.UUID, error) IsEulaAccepted() (bool, error) AcceptEula() error }
func NewSettingsService ¶
func NewSettingsService(db *gorm.DB) SettingsService
type SubscriptionsService ¶
type SubscriptionsService interface { IsTrentoPremium() (bool, error) GetPremiumData() (*models.PremiumData, error) GetHostSubscriptions(host string) ([]*models.SlesSubscription, error) }
type TagsService ¶
Source Files ¶
- checks.go
- checks_mock.go
- clusters.go
- clusters_mock.go
- collector.go
- collector_mock.go
- health_summary_service.go
- health_summary_service_mock.go
- hosts.go
- hosts_mock.go
- pagination.go
- premium_detection.go
- premium_detection_mock.go
- prometheus.go
- prometheus_mock.go
- sap_systems.go
- sap_systems_service_mock.go
- settings.go
- settings_mock.go
- subscriptions.go
- subscriptions_mock.go
- tags.go
- tags_mock.go