organization

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrResourceDeleting is raised when the resource is being deleted.
	ErrResourceDeleting = goerrors.New("resource is being deleted")

	// ErrNamespaceUnset is raised when the namespace hasn't been created
	// yet.
	ErrNamespaceUnset = goerrors.New("resource namespace is unset")
)

Functions

This section is empty.

Types

type Client

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

Client wraps up organization related management handling.

func NewClient

func NewClient(client client.Client) *Client

NewClient returns a new client with required parameters.

func (*Client) Create

func (c *Client) Create(ctx context.Context, name string) error

Create creates the implicit organization indentified by the JTW claims.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name string) error

Delete deletes the implicit organization indentified by the JTW claims.

func (*Client) GetMetadata

func (c *Client) GetMetadata(ctx context.Context, name string) (*Meta, error)

GetMetadata retrieves the organization metadata. Clients should consult at least the Active status before doing anything with the organization.

func (*Client) GetOrCreateMetadata

func (c *Client) GetOrCreateMetadata(ctx context.Context, name string) (*Meta, error)

type Meta

type Meta struct {
	// Name is the organization's Kubernetes name, so a higher level resource
	// can reference it.
	Name string

	// Namespace is the namespace that is provisioned by the organization.
	// Should be usable set when the organization is active.
	Namespace string

	// Deleting tells us if we should allow new child objects to be created
	// in this resource's namespace.
	Deleting bool
}

Meta describes the organization.

Jump to

Keyboard shortcuts

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