Documentation ¶
Index ¶
- Variables
- type Filter
- type Filters
- type MemberCount
- type Policy
- type RelationService
- type Repository
- type RoleService
- type Service
- func (s Service) AssignRole(ctx context.Context, pol Policy) error
- func (s Service) Count(ctx context.Context, f Filter) (int64, error)
- func (s Service) Create(ctx context.Context, policy Policy) (Policy, error)
- func (s Service) Delete(ctx context.Context, id string) error
- func (s Service) Get(ctx context.Context, id string) (Policy, error)
- func (s Service) GroupMemberCount(ctx context.Context, ids []string) ([]MemberCount, error)
- func (s Service) List(ctx context.Context, f Filter) ([]Policy, error)
- func (s Service) ListRoles(ctx context.Context, ...) ([]role.Role, error)
- func (s Service) OrgMemberCount(ctx context.Context, id string) (MemberCount, error)
- func (s Service) ProjectMemberCount(ctx context.Context, ids []string) ([]MemberCount, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MemberCount ¶ added in v0.8.8
type RelationService ¶
type Repository ¶
type Repository interface { Get(ctx context.Context, id string) (Policy, error) List(ctx context.Context, f Filter) ([]Policy, error) Count(ctx context.Context, f Filter) (int64, error) Upsert(ctx context.Context, pol Policy) (Policy, error) Delete(ctx context.Context, id string) error GroupMemberCount(ctx context.Context, IDs []string) ([]MemberCount, error) ProjectMemberCount(ctx context.Context, IDs []string) ([]MemberCount, error) OrgMemberCount(ctx context.Context, ID string) (MemberCount, error) }
type RoleService ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository, relationService RelationService, roleService RoleService) *Service
func (Service) AssignRole ¶
AssignRole Note: ideally this should be in a single transaction read more about how user defined roles work in spicedb https://authzed.com/blog/user-defined-roles
func (Service) GroupMemberCount ¶ added in v0.8.8
func (Service) ListRoles ¶ added in v0.8.0
func (s Service) ListRoles(ctx context.Context, principalType, principalID, objectNamespace, objectID string) ([]role.Role, error)
ListRoles lists roles assigned via policies to a user
func (Service) OrgMemberCount ¶ added in v0.8.13
func (Service) ProjectMemberCount ¶ added in v0.8.8
Click to show internal directories.
Click to hide internal directories.