namespace

package
v0.0.0-...-b6dd5f9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package namespace provides a namespace.

Package namespace provides a namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) (string, error)

FromContext returns the namespace from the context.

func WithNamespace

func WithNamespace(ctx context.Context, ns string) context.Context

WithNamespace returns a new context with the namespace.

Types

type Key

type Key string

Key represents a context key.

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

Namespace represents a namespace.

func (*Namespace) Create

func (ns *Namespace) Create(env, domain, service string) (string, error)

Create creates a new namespace.

func (*Namespace) Delete

func (ns *Namespace) Delete(env, domain, service string) error

Delete deletes a namespace.

func (*Namespace) Exists

func (ns *Namespace) Exists(env, domain, service string) bool

Exists checks if a namespace exists.

func (*Namespace) List

func (ns *Namespace) List() []string

List returns a list of all namespaces.

func (*Namespace) Validate

func (ns *Namespace) Validate(env, domain, service string) error

Validate validates a namespace.

Jump to

Keyboard shortcuts

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