namespace

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNamespaceNotFound      = errors.New("namespace not found")
	ErrNamespaceAlreadyExists = errors.New("namespace already exists")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	CreateNamespace(ctx context.Context, ns *corev1.Namespace) (*corev1.Namespace, error)
	UpdateNamespace(ctx context.Context, ns *corev1.Namespace) (*corev1.Namespace, error)
	ListNamespaces(ctx context.Context, opts services.ListOptions) (*services.ListResult[corev1.Namespace], error)
	GetNamespace(ctx context.Context, namespaceName string) (*corev1.Namespace, error)
	DeleteNamespace(ctx context.Context, namespaceName string) error
}

Service defines the namespace service interface.

func NewService

func NewService(k8sClient client.Client, logger *slog.Logger) Service

NewService creates a new namespace service without authorization.

func NewServiceWithAuthz

func NewServiceWithAuthz(k8sClient client.Client, authzPDP authz.PDP, logger *slog.Logger) Service

NewServiceWithAuthz creates a namespace service with authorization checks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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