v1

package
v0.77.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MPL-2.0 Imports: 27 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 struct {
	// contains filtered or unexported fields
}

func NewEndpoints

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

func (Endpoints) Apply

func (e Endpoints) Apply(ctx context.Context, objects []manifest.Object) error

func (Endpoints) Delete

func (e Endpoints) Delete(ctx context.Context, objects []manifest.Object) error

func (Endpoints) DeleteByName

func (e Endpoints) DeleteByName(
	ctx context.Context,
	kind manifest.Kind,
	project string,
	names ...string,
) error

func (Endpoints) Get

func (e Endpoints) Get(
	ctx context.Context,
	kind manifest.Kind,
	header http.Header,
	query url.Values,
) ([]manifest.Object, error)

func (Endpoints) GetAlerts

func (e Endpoints) GetAlerts(
	ctx context.Context,
	header http.Header,
	query url.Values,
) ([]manifest.Object, int, error)

GetAlerts is exported for internal usage, use methods returning concrete manifest.Version instead, like GetV1alphaAlerts

func (Endpoints) GetV1alphaAgents

func (e Endpoints) GetV1alphaAgents(
	ctx context.Context,
	params GetAgentsRequest,
) ([]v1alphaAgent.Agent, error)

func (Endpoints) GetV1alphaAlertMethods

func (e Endpoints) GetV1alphaAlertMethods(
	ctx context.Context,
	params GetAlertMethodsRequest,
) ([]v1alphaAlertMethod.AlertMethod, error)

func (Endpoints) GetV1alphaAlertPolicies

func (e Endpoints) GetV1alphaAlertPolicies(
	ctx context.Context,
	params GetAlertPolicyRequest,
) ([]v1alphaAlertPolicy.AlertPolicy, error)

func (Endpoints) GetV1alphaAlertSilences

func (e Endpoints) GetV1alphaAlertSilences(
	ctx context.Context,
	params GetAlertSilencesRequest,
) ([]v1alphaAlertSilence.AlertSilence, error)

func (Endpoints) GetV1alphaAlerts

func (e Endpoints) GetV1alphaAlerts(ctx context.Context, params GetAlertsRequest) (*GetAlertsResponse, error)

func (Endpoints) GetV1alphaAnnotations

func (e Endpoints) GetV1alphaAnnotations(
	ctx context.Context,
	params GetAnnotationsRequest,
) ([]v1alphaAnnotation.Annotation, error)

func (Endpoints) GetV1alphaDataExports

func (e Endpoints) GetV1alphaDataExports(
	ctx context.Context,
	params GetDataExportsRequest,
) ([]v1alphaDataExport.DataExport, error)

func (Endpoints) GetV1alphaDirects

func (e Endpoints) GetV1alphaDirects(
	ctx context.Context,
	params GetDirectsRequest,
) ([]v1alphaDirect.Direct, error)

func (Endpoints) GetV1alphaProjects

func (e Endpoints) GetV1alphaProjects(
	ctx context.Context,
	params GetProjectsRequest,
) ([]v1alphaProject.Project, error)

func (Endpoints) GetV1alphaRoleBindings

func (e Endpoints) GetV1alphaRoleBindings(
	ctx context.Context,
	params GetRoleBindingsRequest,
) ([]v1alphaRoleBinding.RoleBinding, error)

func (Endpoints) GetV1alphaSLOs

func (e Endpoints) GetV1alphaSLOs(
	ctx context.Context,
	params GetSLOsRequest,
) ([]v1alphaSLO.SLO, error)

func (Endpoints) GetV1alphaServices

func (e Endpoints) GetV1alphaServices(
	ctx context.Context,
	params GetServicesRequest,
) ([]v1alphaService.Service, error)

func (Endpoints) GetV1alphaUserGroups

func (e Endpoints) GetV1alphaUserGroups(
	ctx context.Context,
	params GetAnnotationsRequest,
) ([]v1alphaUserGroup.UserGroup, error)

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 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 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