export

package
v0.0.0-...-f07dfbc Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Export

type Export struct {
	Database *mongo.DadMongo
}

Export contains APIs entrypoints needed for accessing users

func (*Export) Export

func (e *Export) Export(language string, projects []types.Project, projectToUsageIndicators map[string][]types.UsageIndicator) (*bytes.Reader, error)

Export exports some business data as a file

type ServiceProjectEntry

type ServiceProjectEntry struct {
	ProjectName string
	ServiceName string
}

ServiceProjectEntry contains a specific service name for a specific project name

type Status

type Status int

Status represents the different status possible for a service (like Jenkins)

const (
	// Empty means that a the service does not have any project configuration. e.g. jenkins doesn't have a job
	Empty Status = iota
	// Undetermined means that a there is an incompatibilty in indicators results. e.g jenkins has jobs but no CPU activity is available
	Undetermined
	// Inactive means that a the service is configured but not used recently. e.g. jenkins has at least one job but its CPU usage is below the defined threshold
	Inactive
	// Active means that a the service is configured and used recently. e.g. jenkins has at least one job and its CPU usage is above the defined threshold
	Active
)

func GetStatus

func GetStatus(status string) (Status, error)

GetStatus will return the enum representation of a service Status (e.g. Jenkins) returns an error if string status is unrecognized

func (Status) String

func (status Status) String() string

String function will return the string representation of a service Status (e.g. Jenkins)

Jump to

Keyboard shortcuts

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