labels

package
v3.15.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// OpaqueResources is a JSON list of resource IDs, each in the form <storage_id>!<opaque_id>.
	OpaqueResources = "resources"
	// OpaqueLabels is a JSON object from each requested resource ID to its labels.
	OpaqueLabels = "labels"
)

The CS3 labels API has no call yet for the labels of given resources. Until it has one, ListLabels takes the resources in its request opaque and returns their labels in its response opaque.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// List the unique labels that a user has attached to resources
	ListLabels(ctx context.Context) ([]string, error)
	// ListLabelsForResources returns the labels of the user for each given resource, keyed
	// on <storage_id>!<opaque_id>. A resource without labels has no key.
	ListLabelsForResources(ctx context.Context, ids []*provider.ResourceId) (map[string][]string, error)
	// List the resources which have a given label attached for a given user
	ListResourcesForLabel(ctx context.Context, label string) ([]*provider.ResourceId, error)
	// SetLabel qttaches a label to a resource for a user..
	SetLabel(ctx context.Context, label string, resourceId *provider.ResourceId) error
	// UnsetLabel removes a label from a resource for a user..
	UnsetLabel(ctx context.Context, label string, resourceId *provider.ResourceId) error
}

Manager defines an interface for a labels manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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