labels

package
v0.15.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const APIPathLabelResource = "/labels/%s/resources/%s/%s"
View Source
const APIPathLabelResources = "/labels/%s/resources"
View Source
const APIPathLabels = "/labels"

Variables

This section is empty.

Functions

func AddLabelFailErrMocked

func AddLabelFailErrMocked(
	t *testing.T,
	labelIn *types.Label,
	labeledResourcesOut []*types.LabeledResource,
) []*types.LabeledResource

AddLabelFailErrMocked test mocked function

func AddLabelFailJSONMocked

func AddLabelFailJSONMocked(
	t *testing.T,
	labelIn *types.Label,
	labeledResourcesOut []*types.LabeledResource,
) []*types.LabeledResource

AddLabelFailJSONMocked test mocked function

func AddLabelFailStatusMocked

func AddLabelFailStatusMocked(
	t *testing.T,
	labelIn *types.Label,
	labeledResourcesOut []*types.LabeledResource,
) []*types.LabeledResource

AddLabelFailStatusMocked test mocked function

func AddLabelMocked

func AddLabelMocked(
	t *testing.T,
	labelIn *types.Label,
	labeledResourcesOut []*types.LabeledResource,
) []*types.LabeledResource

AddLabelMocked test mocked function

func CreateLabelFailErrMocked

func CreateLabelFailErrMocked(t *testing.T, labelIn *types.Label) *types.Label

CreateLabelFailErrMocked test mocked function

func CreateLabelFailJSONMocked

func CreateLabelFailJSONMocked(t *testing.T, labelIn *types.Label) *types.Label

CreateLabelFailJSONMocked test mocked function

func CreateLabelFailStatusMocked

func CreateLabelFailStatusMocked(t *testing.T, labelIn *types.Label) *types.Label

CreateLabelFailStatusMocked test mocked function

func CreateLabelMocked

func CreateLabelMocked(t *testing.T, labelIn *types.Label) *types.Label

CreateLabelMocked test mocked function

func ListLabelsFailErrMocked added in v0.12.0

func ListLabelsFailErrMocked(t *testing.T, labelsIn []*types.Label) []*types.Label

ListLabelsFailErrMocked test mocked function

func ListLabelsFailJSONMocked added in v0.12.0

func ListLabelsFailJSONMocked(t *testing.T, labelsIn []*types.Label) []*types.Label

ListLabelsFailJSONMocked test mocked function

func ListLabelsFailStatusMocked added in v0.12.0

func ListLabelsFailStatusMocked(t *testing.T, labelsIn []*types.Label) []*types.Label

ListLabelsFailStatusMocked test mocked function

func ListLabelsMocked added in v0.12.0

func ListLabelsMocked(t *testing.T, labelsIn []*types.Label) []*types.Label

ListLabelsMocked test mocked function

func ListLabelsMockedWithNamespace added in v0.12.0

func ListLabelsMockedWithNamespace(t *testing.T, labelsIn []*types.Label) []*types.Label

ListLabelsMockedWithNamespace test mocked function

func RemoveLabelFailErrMocked

func RemoveLabelFailErrMocked(t *testing.T, labelIn *types.Label)

RemoveLabelFailErrMocked test mocked function

func RemoveLabelFailStatusMocked

func RemoveLabelFailStatusMocked(t *testing.T, labelIn *types.Label)

RemoveLabelFailStatusMocked test mocked function

func RemoveLabelMocked

func RemoveLabelMocked(t *testing.T, labelIn *types.Label)

RemoveLabelMocked test mocked function

Types

type LabelService

type LabelService struct {
	// contains filtered or unexported fields
}

LabelService manages label operations

func NewLabelService

func NewLabelService(concertoService utils.ConcertoService) (*LabelService, error)

NewLabelService returns a Concerto labels service

func (*LabelService) AddLabel

func (ls *LabelService) AddLabel(
	labelID string,
	labelParams *map[string]interface{},
) (labeledResources []*types.LabeledResource, err error)

AddLabel assigns a single label from a single labelable resource

func (*LabelService) CreateLabel

func (ls *LabelService) CreateLabel(labelParams *map[string]interface{}) (label *types.Label, err error)

CreateLabel creates a label

func (*LabelService) ListLabels added in v0.12.0

func (ls *LabelService) ListLabels() (labels []*types.Label, err error)

ListLabels returns the list of labels as an array of Label

func (*LabelService) RemoveLabel

func (ls *LabelService) RemoveLabel(labelID string, resourceType string, resourceID string) error

RemoveLabel de-assigns a single label from a single labelable resource

Jump to

Keyboard shortcuts

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