organization

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOrganizationLabelMissing is returned when the organization label is not found on the cluster's namespace
	// or if the label value is empty.
	ErrOrganizationLabelMissing = errors.New("cluster namespace missing organization label or label value is empty")
	ErrNamespaceNotFound        = errors.New("namespace not found")
)

Functions

This section is empty.

Types

type NamespaceOrganizationRepository

type NamespaceOrganizationRepository struct {
	client.Client
}

NamespaceOrganizationRepository implements OrganizationRepository by reading the organization from the cluster's namespace labels.

func (NamespaceOrganizationRepository) Read

Read fetches the organization ID from the labels of the namespace where the given CAPI cluster resides. It returns ErrOrganizationLabelMissing if the label is not present or its value is empty.

type OrganizationRepository

type OrganizationRepository interface {
	Read(ctx context.Context, cluster *clusterv1.Cluster) (string, error)
}

OrganizationRepository defines an interface for reading organization information.

func NewNamespaceRepository

func NewNamespaceRepository(client client.Client) OrganizationRepository

NewNamespaceRepository creates a new NamespaceOrganizationRepository.

Jump to

Keyboard shortcuts

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