Documentation ¶
Index ¶
- func AddLabelFailErrMocked(t *testing.T, labelIn *types.Label, ...) []*types.LabeledResource
- func AddLabelFailJSONMocked(t *testing.T, labelIn *types.Label, ...) []*types.LabeledResource
- func AddLabelFailStatusMocked(t *testing.T, labelIn *types.Label, ...) []*types.LabeledResource
- func AddLabelMocked(t *testing.T, labelIn *types.Label, ...) []*types.LabeledResource
- func CreateLabelFailErrMocked(t *testing.T, labelIn *types.Label) *types.Label
- func CreateLabelFailJSONMocked(t *testing.T, labelIn *types.Label) *types.Label
- func CreateLabelFailStatusMocked(t *testing.T, labelIn *types.Label) *types.Label
- func CreateLabelMocked(t *testing.T, labelIn *types.Label) *types.Label
- func ListLabelsFailErrMocked(t *testing.T, labelsIn []*types.Label) []*types.Label
- func ListLabelsFailJSONMocked(t *testing.T, labelsIn []*types.Label) []*types.Label
- func ListLabelsFailStatusMocked(t *testing.T, labelsIn []*types.Label) []*types.Label
- func ListLabelsMocked(t *testing.T, labelsIn []*types.Label) []*types.Label
- func ListLabelsMockedWithNamespace(t *testing.T, labelsIn []*types.Label) []*types.Label
- func RemoveLabelFailErrMocked(t *testing.T, labelIn *types.Label)
- func RemoveLabelFailStatusMocked(t *testing.T, labelIn *types.Label)
- func RemoveLabelMocked(t *testing.T, labelIn *types.Label)
- type LabelService
- func (ls *LabelService) AddLabel(labelID string, labelParams *map[string]interface{}) (labeledResources []*types.LabeledResource, err error)
- func (ls *LabelService) CreateLabel(labelParams *map[string]interface{}) (label *types.Label, err error)
- func (ls *LabelService) ListLabels() (labels []*types.Label, err error)
- func (ls *LabelService) RemoveLabel(labelID string, resourceType string, resourceID string) error
Constants ¶
This section is empty.
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 ¶
CreateLabelFailErrMocked test mocked function
func CreateLabelFailJSONMocked ¶
CreateLabelFailJSONMocked test mocked function
func CreateLabelFailStatusMocked ¶
CreateLabelFailStatusMocked test mocked function
func CreateLabelMocked ¶
CreateLabelMocked test mocked function
func ListLabelsFailErrMocked ¶ added in v0.12.0
ListLabelsFailErrMocked test mocked function
func ListLabelsFailJSONMocked ¶ added in v0.12.0
ListLabelsFailJSONMocked test mocked function
func ListLabelsFailStatusMocked ¶ added in v0.12.0
ListLabelsFailStatusMocked test mocked function
func ListLabelsMocked ¶ added in v0.12.0
ListLabelsMocked test mocked function
func ListLabelsMockedWithNamespace ¶ added in v0.12.0
ListLabelsMockedWithNamespace test mocked function
func RemoveLabelFailErrMocked ¶
RemoveLabelFailErrMocked test mocked function
func RemoveLabelFailStatusMocked ¶
RemoveLabelFailStatusMocked 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