Documentation
¶
Index ¶
- type NamespaceManager
- func (m *NamespaceManager) AddUserToNamespace(ctx context.Context, role security.Role, id, user uuid.UUID) error
- func (m *NamespaceManager) RemoveUserFromNamespace(ctx context.Context, id, user uuid.UUID) error
- func (m *NamespaceManager) RolesFor(ctx context.Context, globalNamespace, namespace, user uuid.UUID) ([]security.NamespaceRole, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespaceManager ¶
type NamespaceManager struct {
// contains filtered or unexported fields
}
NamespaceManager is an abstraction that writes and retrieves data from memory
func NewNamespaceManager ¶
func NewNamespaceManager() *NamespaceManager
NewNamespaceManager creates a new manager that stores everything in memory
func (*NamespaceManager) AddUserToNamespace ¶
func (m *NamespaceManager) AddUserToNamespace(ctx context.Context, role security.Role, id, user uuid.UUID) error
AddUserToNamespace sets the role of a user in the given namespace
func (*NamespaceManager) RemoveUserFromNamespace ¶
RemoveUserFromNamespace removes the role of a user in the given namespace
func (*NamespaceManager) RolesFor ¶
func (m *NamespaceManager) RolesFor(ctx context.Context, globalNamespace, namespace, user uuid.UUID) ([]security.NamespaceRole, error)
RolesFor is used in gathering all of the roles for both the global and given namespace for a given user
Click to show internal directories.
Click to hide internal directories.