v1

package
v0.85.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MPL-2.0 Imports: 29 Imported by: 1

Documentation

Overview

Package v1 defines methods for managing manifest.Object. V1 of the API is not tied to any particular manifest.Version.

Index

Constants

View Source
const (
	QueryKeyName              = "name"
	QueryKeyFrom              = "from"
	QueryKeyTo                = "to"
	QueryKeySLOName           = "slo"
	QueryKeyLabels            = "labels"
	QueryKeyServiceName       = "service_name"
	QueryKeyDryRun            = "dry_run"
	QueryKeyAlertPolicyName   = "alert_policy"
	QueryKeyObjectiveName     = "objective"
	QueryKeyObjectiveValue    = "objective_value"
	QueryKeyResolved          = "resolved"
	QueryKeyTriggered         = "triggered"
	QueryKeySystemAnnotations = "system_annotations"
	QueryKeyUserAnnotations   = "user_annotations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints interface {
	Apply(ctx context.Context, objects []manifest.Object) error
	Delete(ctx context.Context, objects []manifest.Object) error
	DeleteByName(ctx context.Context, kind manifest.Kind, project string, names ...string) error
	Get(ctx context.Context, kind manifest.Kind, header http.Header, query url.Values) ([]manifest.Object, error)
	GetV1alphaProjects(ctx context.Context, params GetProjectsRequest) ([]v1alphaProject.Project, error)
	GetV1alphaServices(ctx context.Context, params GetServicesRequest) ([]v1alphaService.Service, error)
	GetV1alphaSLOs(ctx context.Context, params GetSLOsRequest) ([]v1alphaSLO.SLO, error)
	GetV1alphaAgents(ctx context.Context, params GetAgentsRequest) ([]v1alphaAgent.Agent, error)
	GetV1alphaAlertPolicies(ctx context.Context, params GetAlertPolicyRequest) ([]v1alphaAlertPolicy.AlertPolicy, error)
	GetV1alphaAlertSilences(ctx context.Context, params GetAlertSilencesRequest) ([]v1alphaAlertSilence.AlertSilence, error)
	GetV1alphaAlertMethods(ctx context.Context, params GetAlertMethodsRequest) ([]v1alphaAlertMethod.AlertMethod, error)
	GetV1alphaAlerts(ctx context.Context, params GetAlertsRequest) (*GetAlertsResponse, error)
	GetV1alphaDirects(ctx context.Context, params GetDirectsRequest) ([]v1alphaDirect.Direct, error)
	GetV1alphaDataExports(ctx context.Context, params GetDataExportsRequest) ([]v1alphaDataExport.DataExport, error)
	GetV1alphaRoleBindings(ctx context.Context, params GetRoleBindingsRequest) ([]v1alphaRoleBinding.RoleBinding, error)
	GetV1alphaAnnotations(ctx context.Context, params GetAnnotationsRequest) ([]v1alphaAnnotation.Annotation, error)
	GetV1alphaUserGroups(ctx context.Context, params GetAnnotationsRequest) ([]v1alphaUserGroup.UserGroup, error)
	// GetAlerts is exported for internal usage, use methods returning
	// concrete manifest.Version instead, like GetV1alphaAlerts
	GetAlerts(ctx context.Context, header http.Header, query url.Values) ([]manifest.Object, int, error)
	GetBudgetAdjustments(ctx context.Context, params GetBudgetAdjustmentRequest) ([]v1alphaBudgetAdjustment.BudgetAdjustment, error)
	GetReports(ctx context.Context, params GetReportsRequest) ([]v1alphaReport.Report, error)
}

func NewEndpoints

func NewEndpoints(
	client endpointsHelpers.Client,
	orgGetter endpointsHelpers.OrganizationGetter,
	readObjects endpointsHelpers.ReadObjectsFunc,
	dryRun bool,
) Endpoints

type GetAgentsRequest

type GetAgentsRequest struct {
	Project string
	Names   []string
}

type GetAlertMethodsRequest

type GetAlertMethodsRequest struct {
	Project string
	Names   []string
}

type GetAlertPolicyRequest

type GetAlertPolicyRequest struct {
	Project string
	Names   []string
	Labels  v1alpha.Labels
}

type GetAlertSilencesRequest

type GetAlertSilencesRequest struct {
	Project string
	Names   []string
}

type GetAlertsRequest

type GetAlertsRequest struct {
	Project          string
	Names            []string
	SLONames         []string
	ServiceNames     []string
	AlertPolicyNames []string
	ObjectiveNames   []string
	ObjectiveValues  []float64
	Resolved         *bool
	Triggered        *bool
	From             time.Time
	To               time.Time
}

type GetAlertsResponse

type GetAlertsResponse struct {
	Alerts       []alert.Alert
	TruncatedMax int
}

type GetAnnotationsRequest

type GetAnnotationsRequest struct {
	Project           string
	Names             []string
	SLOName           string
	From              time.Time
	To                time.Time
	SystemAnnotations *bool
	UserAnnotations   *bool
}

type GetBudgetAdjustmentRequest added in v0.79.0

type GetBudgetAdjustmentRequest struct {
	Names []string
}

type GetDataExportsRequest

type GetDataExportsRequest struct {
	Project string
	Names   []string
}

type GetDirectsRequest

type GetDirectsRequest struct {
	Project string
	Names   []string
}

type GetProjectsRequest

type GetProjectsRequest struct {
	Names  []string
	Labels v1alpha.Labels
}

type GetReportsRequest added in v0.84.0

type GetReportsRequest struct {
	Names []string
}

type GetRoleBindingsRequest

type GetRoleBindingsRequest struct {
	Project string
	Names   []string
}

type GetSLOsRequest

type GetSLOsRequest struct {
	Project string
	Names   []string
	Labels  v1alpha.Labels
}

type GetServicesRequest

type GetServicesRequest struct {
	Project string
	Names   []string
	Labels  v1alpha.Labels
}

type GetUserGroupsRequest

type GetUserGroupsRequest struct {
	Project string
	Names   []string
}

Jump to

Keyboard shortcuts

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