controller

package
v0.0.0-...-cc99bfc 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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRoutesForChartController

func SetupRoutesForChartController(router *mux.Router, ctrl ChartControllerInterface, auth auth.AuthenticationProvider)

SetupRoutesForChartController setup the routes of the router using the handler in the controller as http handler

Types

type ChartController

type ChartController struct {
	// Config contains the dataservice global configuration
	Config config.Configuration
	// Service contains the underlying service used to perform various logical and store operations
	Service service.ChartServiceInterface
	// TimeNow contains a function that return the current time
	TimeNow func() time.Time
	// Log contains logger formatted
	Log *logrus.Logger
	// Authenticator contains the authenticator
	Authenticator auth.AuthenticationProvider
}

ChartController is the struct used to handle the requests from agents and contains the concrete implementation of ChartControllerInterface

func (*ChartController) GetChangeChart

func (ctrl *ChartController) GetChangeChart(w http.ResponseWriter, r *http.Request)

GetChangeChart return the chart data related to changes

func (*ChartController) GetOracleDatabaseChart

func (ctrl *ChartController) GetOracleDatabaseChart(w http.ResponseWriter, r *http.Request)

GetOracleDatabaseChart return the list of techonlogies

func (*ChartController) GetOracleDbLicenseHistory

func (ctrl *ChartController) GetOracleDbLicenseHistory(w http.ResponseWriter, r *http.Request)

func (*ChartController) GetTechnologiesMetrics

func (ctrl *ChartController) GetTechnologiesMetrics(w http.ResponseWriter, r *http.Request)

GetTechnologiesMetrics return metrics of all technologies

func (*ChartController) GetTechnologyTypes

func (ctrl *ChartController) GetTechnologyTypes(w http.ResponseWriter, r *http.Request)

GetTechnologyTypes return the types of techonlogies

type ChartControllerInterface

type ChartControllerInterface interface {
	// GetOracleDatabaseChart return the chart data related to oracle databases
	GetOracleDatabaseChart(w http.ResponseWriter, r *http.Request)
	GetOracleDbLicenseHistory(w http.ResponseWriter, r *http.Request)

	// GetChangeChart return the chart data related to changes
	GetChangeChart(w http.ResponseWriter, r *http.Request)
	// GetTechnologyTypes return the types of techonlogies
	GetTechnologyTypes(w http.ResponseWriter, r *http.Request)

	// GetTechnologiesMetrics return metrics of all technologies
	GetTechnologiesMetrics(w http.ResponseWriter, r *http.Request)
}

ChartControllerInterface 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