Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessWithLabel ¶
type AccessWithLabel struct { model.Permission `pg:",override"` Label string `sql:"label"` }
type DB ¶
type DB interface { UserAccesses(ctx context.Context, userID string) ([]AccessWithLabel, error) SetUserAccesses(ctx context.Context, userID string, level kubeClientModel.AccessLevel) error SetNamespaceAccess(ctx context.Context, ns model.Namespace, accessLevel kubeClientModel.AccessLevel, toUserID string) error DeleteNamespaceAccess(ctx context.Context, ns model.Namespace, userID string) error NamespaceByID(ctx context.Context, userID, id string) (ret model.NamespaceWithPermissions, err error) NamespacePermissions(ctx context.Context, ns *model.NamespaceWithPermissions) error UserNamespaces(ctx context.Context, userID string, filter NamespaceFilter) (ret []model.NamespaceWithPermissions, err error) AllNamespaces(ctx context.Context, filter NamespaceFilter) (ret []model.Namespace, err error) CreateNamespace(ctx context.Context, namespace *model.Namespace) error RenameNamespace(ctx context.Context, namespace *model.Namespace, newLabel string) error ResizeNamespace(ctx context.Context, namespace model.Namespace) error DeleteNamespace(ctx context.Context, namespace *model.Namespace) error DeleteAllUserNamespaces(ctx context.Context, userID string) (deleted []model.Namespace, err error) Transactional(fn func(tx DB) error) error io.Closer }
type NamespaceFilter ¶
type NamespaceFilter struct { orm.Pager NotDeleted bool `filter:"not_deleted"` Deleted bool `filter:"deleted"` NotLimited bool `filter:"not_limited"` Limited bool `filter:"limited"` Owned bool `filter:"owner"` NotOwned bool `filter:"not_owner"` }
func ParseNamespaceFilter ¶
func ParseNamespaceFilter(filters ...string) NamespaceFilter
Click to show internal directories.
Click to hide internal directories.