operations

package
v0.0.0-...-5e1c9fb Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message   string `json:"message"`
	ErrorCode int    `json:"errorCode"`
}

Error godoc

type Event

type Event struct {
	Contenttype    string      `json:"contenttype,omitempty"`
	Data           KeptnBase   `json:"data"`
	Extensions     interface{} `json:"extensions,omitempty"`
	ID             string      `json:"id,omitempty"`
	Shkeptncontext string      `json:"shkeptncontext,omitempty"`
	Source         string      `json:"source"`
	Specversion    string      `json:"specversion,omitempty"`
	Time           string      `json:"time,omitempty"`
	Triggeredid    string      `json:"triggeredid,omitempty"`
	Type           string      `json:"type"`
}

Event godoc

type GetStatisticsParams

type GetStatisticsParams struct {
	// From godoc
	From time.Time `form:"from" json:"from" time_format:"unix"`
	// To godoc
	To time.Time `form:"to" json:"to" time_format:"unix"`
}

GetStatisticsParams godoc

type GetStatisticsResponse

type GetStatisticsResponse struct {
	// From godoc
	From time.Time `json:"from" bson:"from"`
	// To godoc
	To time.Time `json:"to" bson:"to"`
	// Projects godoc
	Projects []GetStatisticsResponseProject `json:"projects" bson:"projects"`
}

GetStatisticsResponse godoc

type GetStatisticsResponseEvent

type GetStatisticsResponseEvent struct {
	// Type godoc
	Type string `json:"type" bson:"type"`
	// Count
	Count int `json:"count" bson:"count"`
}

GetStatisticsResponseEvent godoc+

type GetStatisticsResponseKeptnService

type GetStatisticsResponseKeptnService struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// Executions godoc
	Executions []GetStatisticsResponseEvent `json:"executions" bson:"executions"`
}

GetStatisticsResponseKeptnService godoc

type GetStatisticsResponseProject

type GetStatisticsResponseProject struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// Services godoc
	Services []GetStatisticsResponseService `json:"services" bson:"services"`
}

GetStatisticsResponseProject godoc

type GetStatisticsResponseService

type GetStatisticsResponseService struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// Events godoc
	Events []GetStatisticsResponseEvent `json:"events" bson:"events"`
	// KeptnServiceExecutions godoc
	KeptnServiceExecutions []GetStatisticsResponseKeptnService `json:"keptnServiceExecutions" bson:"keptnServiceExecutions"`
	// ExecutedSequencesPerType godoc
	ExecutedSequencesPerType []GetStatisticsResponseEvent `json:"executedSequencesPerType,omitempty" bson:"executedSequencesPerType"`
}

GetStatisticsResponseService godoc

type KeptnBase

type KeptnBase struct {
	Project string `json:"project"`
	Service string `json:"service"`
}

type KeptnService

type KeptnService struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// Executions godoc
	Executions map[string]int `json:"executions" bson:"executions"`
}

KeptnService godoc

type Project

type Project struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// Services godoc
	Services map[string]*Service `json:"services" bson:"services"`
}

Project godoc

type Service

type Service struct {
	// Name godoc
	Name string `json:"name" bson:"name"`
	// ExecutedSequences godoc
	ExecutedSequences int `json:"executedSequences" bson:"executedSequences"`
	// ExecutedSequencesPerType godoc
	ExecutedSequencesPerType map[string]int `json:"executedSequencesPerType" bson:"executedSequencesPerType"`
	// Events godoc
	Events map[string]int `json:"events" bson:"events"`
	// KeptnServiceExecutions godoc
	KeptnServiceExecutions map[string]*KeptnService `json:"keptnServiceExecutions" bson:"keptnServiceExecutions"`
}

Service godoc

type Statistics

type Statistics struct {
	// From godoc
	From time.Time `json:"from" bson:"from"`
	// To godoc
	To time.Time `json:"to" bson:"to"`
	// Projects godoc
	Projects map[string]*Project `json:"projects" bson:"projects"`
}

Statistics godoc

func MergeStatistics

func MergeStatistics(target Statistics, statistics []Statistics) Statistics

MergeStatistics godoc

func (*Statistics) IncreaseEventTypeCount

func (s *Statistics) IncreaseEventTypeCount(projectName, serviceName, eventType string, increment int)

IncreaseEventTypeCount godoc

func (*Statistics) IncreaseExecutedSequenceCountForType

func (s *Statistics) IncreaseExecutedSequenceCountForType(projectName string, serviceName string, eventType string, increment int)

IncreaseExecutedSequenceCountForType godoc

func (*Statistics) IncreaseExecutedSequencesCount

func (s *Statistics) IncreaseExecutedSequencesCount(projectName, serviceName string, increment int)

IncreaseExecutedSequencesCount godoc

func (*Statistics) IncreaseKeptnServiceExecutionCount

func (s *Statistics) IncreaseKeptnServiceExecutionCount(projectName, serviceName, keptnServiceName, eventType string, increment int)

IncreaseKeptnServiceExecutionCount godoc

Jump to

Keyboard shortcuts

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