label

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package label contains the label command. The label command is used to list or modify the labels of a resource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(builder Builder) *cobra.Command

Command returns the BindPlane label resource cobra command.

Types

type Builder

type Builder interface {
	// Build returns a new Labeler.
	BuildLabeler(ctx context.Context) (Labeler, error)
}

Builder is an interface for building a Labeler.

type Labeler

type Labeler interface {
	// GetAgentLabels returns the labels for an agent.
	GetAgentLabels(ctx context.Context, id string) (*model.Labels, error)
	// ApplyAgentLabels applies labels to an agent.
	ApplyAgentLabels(ctx context.Context, id string, labels map[string]string, overwrite bool) (*model.Labels, error)
}

Labeler is an interface for labeling resources.

func NewLabeler

func NewLabeler(client client.BindPlane) Labeler

NewLabeler returns a new Labeler.

Jump to

Keyboard shortcuts

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