Documentation
¶
Overview ¶
Package tenant provides Registry interface and it's REST implementation for storing Tenant api objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StatusStrategy = tenantStatusStrategy{Strategy}
View Source
var Strategy = tenantStrategy{api.Scheme, api.SimpleNameGenerator}
Strategy is the default logic that applies when creating and updating Tenant objects via the REST API.
Functions ¶
func MatchTenant ¶
MatchTenant returns a generic matcher for a given label and field selector.
Types ¶
type Registry ¶
type Registry interface { // ListTenants obtains a list of tenants having labels which match selector. ListTenants(ctx api.Context, selector labels.Selector) (*api.TenantList, error) // Watch for new/changed/deleted tenants WatchTenants(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) // Get a specific tenant GetTenant(ctx api.Context, tenantID string) (*api.Tenant, error) // Create a tenant based on a specification. CreateTenant(ctx api.Context, tenant *api.Tenant) error // Update an existing tenant UpdateTenant(ctx api.Context, tenant *api.Tenant) error // Delete an existing tenant DeleteTenant(ctx api.Context, tenantID string) error }
Registry is an interface implemented by things that know how to store Tenant objects.
func NewRegistry ¶
func NewRegistry(s rest.StandardStorage) Registry
NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.
Click to show internal directories.
Click to hide internal directories.