service

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: 14 Imported by: 0

Documentation

Overview

Package service is a package that provides methods for manipulating host informations

Package service is a package that provides methods for manipulating host informations

Package service is a package that provides methods for manipulating host informations

Package service is a package that provides methods for manipulating host informations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchivedHostCleaningJob

type ArchivedHostCleaningJob struct {
	// Database contains the database layer
	Database database.MongoDatabaseInterface
	// TimeNow contains a function that return the current time
	TimeNow func() time.Time
	// Config contains the dataservice global configuration
	Config config.Configuration

	// Log contains logger formatted
	Log *logrus.Logger
	// contains filtered or unexported fields
}

ArchivedHostCleaningJob is the job used to clean and remove old archived host

func (*ArchivedHostCleaningJob) Run

func (job *ArchivedHostCleaningJob) Run()

Run archive every archived hostdata that is older than a amount

type CurrentHostCleaningJob

type CurrentHostCleaningJob struct {
	// Database contains the database layer
	Database database.MongoDatabaseInterface
	// TimeNow contains a function that return the current time
	TimeNow func() time.Time
	// Config contains the dataservice global configuration
	Config config.Configuration

	// Log contains logger formatted
	Log *logrus.Logger
	// contains filtered or unexported fields
}

CurrentHostCleaningJob is the job used to clean and archive old current host

func (*CurrentHostCleaningJob) Run

func (job *CurrentHostCleaningJob) Run()

Run archive every hostdata that is older than a amount

type HostDataService

type HostDataService struct {
	// Config contains the dataservice global configuration
	Config config.Configuration
	// Version of the saved data
	Version string
	// 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
}

HostDataService is the concrete implementation of HostDataServiceInterface. It saves data to a MongoDB database

func (*HostDataService) Init

func (hds *HostDataService) Init()

func (*HostDataService) PatchHostData

PatchHostData patch the hostdata using the pf stored in the db

func (*HostDataService) UpdateHostInfo

func (hds *HostDataService) UpdateHostInfo(hostdata model.HostDataBE) (interface{}, utils.AdvancedErrorInterface)

UpdateHostInfo saves the hostdata TODO move in its hosts.go file

type HostDataServiceInterface

type HostDataServiceInterface interface {
	// Init initialize the service
	Init()

	// UpdateHostInfo update the host informations using the provided hostdata
	UpdateHostInfo(hostdata model.HostDataBE) (interface{}, utils.AdvancedErrorInterface)
}

HostDataServiceInterface is a interface that wrap methods used to manipulate and save data

type OracleDbsLicensesHistory

type OracleDbsLicensesHistory struct {
	Database database.MongoDatabaseInterface
	TimeNow  func() time.Time
	Config   config.Configuration

	Log *logrus.Logger
	// contains filtered or unexported fields
}

Save historical data of Oracle Databases licenses

func (*OracleDbsLicensesHistory) Run

func (job *OracleDbsLicensesHistory) Run()

Run archive every archived hostdata that is older than a amount

Jump to

Keyboard shortcuts

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