service

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 12 Imported by: 0

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

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

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

Jump to

Keyboard shortcuts

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