Documentation ¶
Overview ¶
Package service is a package that provides methods for querying data
Package service is a package that provides methods for querying data ¶
Package service is a package that provides methods for querying data
Index ¶
- type ChartService
- func (as *ChartService) GetChangeChart(from time.Time, location string, environment string, olderThan time.Time) (dto.ChangeChart, utils.AdvancedErrorInterface)
- func (as *ChartService) GetOracleDatabaseChart(metric string, location string, environment string, olderThan time.Time) (dto.Chart, utils.AdvancedErrorInterface)
- func (as *ChartService) GetOracleDbLicenseHistory() ([]dto.OracleDatabaseLicenseHistory, error)
- func (as *ChartService) GetTechnologiesMetrics() (map[string]model.TechnologySupportedMetrics, utils.AdvancedErrorInterface)
- func (as *ChartService) GetTechnologyTypesChart(location string, environment string, olderThan time.Time) (dto.TechnologyTypesChart, utils.AdvancedErrorInterface)
- func (as *ChartService) Init()
- type ChartServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartService ¶
type ChartService struct { // Config contains the dataservice global configuration Config config.Configuration // Database contains the database layer Database database.MongoDatabaseInterface // TimeNow contains a function that return the current time TimeNow func() time.Time // Log contains logger formatted Log *logrus.Logger // Random contains the generator used to generate colors Random *rand.Rand }
ChartService is the concrete implementation of APIServiceInterface.
func (*ChartService) GetChangeChart ¶
func (as *ChartService) GetChangeChart(from time.Time, location string, environment string, olderThan time.Time) (dto.ChangeChart, utils.AdvancedErrorInterface)
GetChangeChart return the chart data related to changes to databases
func (*ChartService) GetOracleDatabaseChart ¶
func (as *ChartService) GetOracleDatabaseChart(metric string, location string, environment string, olderThan time.Time) (dto.Chart, utils.AdvancedErrorInterface)
GetOracleDatabaseChart return a chart associated to teh
func (*ChartService) GetOracleDbLicenseHistory ¶
func (as *ChartService) GetOracleDbLicenseHistory() ([]dto.OracleDatabaseLicenseHistory, error)
func (*ChartService) GetTechnologiesMetrics ¶
func (as *ChartService) GetTechnologiesMetrics() (map[string]model.TechnologySupportedMetrics, utils.AdvancedErrorInterface)
GetTechnologiesMetrics return the list of technologies
func (*ChartService) GetTechnologyTypesChart ¶
func (as *ChartService) GetTechnologyTypesChart(location string, environment string, olderThan time.Time) (dto.TechnologyTypesChart, utils.AdvancedErrorInterface)
GetTechnologyTypesChart return the types of techonlogies
func (*ChartService) Init ¶
func (as *ChartService) Init()
Init initializes the service and database
type ChartServiceInterface ¶
type ChartServiceInterface interface { // Init initialize the service Init() // GetChangeChart return the chart data related to changes to databases GetChangeChart(from time.Time, location string, environment string, olderThan time.Time) (dto.ChangeChart, utils.AdvancedErrorInterface) // GetOracleDatabaseChart return a chart associated to teh GetOracleDatabaseChart(metric string, location string, environment string, olderThan time.Time) (dto.Chart, utils.AdvancedErrorInterface) GetOracleDbLicenseHistory() ([]dto.OracleDatabaseLicenseHistory, error) // GetTechnologiesMetrics return metrics of all technologies GetTechnologiesMetrics() (map[string]model.TechnologySupportedMetrics, utils.AdvancedErrorInterface) // GetTechnologyTypes return the types of techonlogies GetTechnologyTypesChart(location string, environment string, olderThan time.Time) (dto.TechnologyTypesChart, utils.AdvancedErrorInterface) }
ChartServiceInterface is a interface that wrap methods used to querying data
Click to show internal directories.
Click to hide internal directories.