Documentation ¶
Index ¶
- Constants
- func RegisterPermissions(l *olog.Logger)
- type Option
- type Options
- type Service
- func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *proto.Group) (err error)
- func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, out *proto.Account) (err error)
- func (s Service) CreateGroup(c context.Context, in *proto.CreateGroupRequest, out *proto.Group) (err error)
- func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, out *empty.Empty) (err error)
- func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, out *empty.Empty) (err error)
- func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, out *proto.Account) (err error)
- func (s Service) GetGroup(c context.Context, in *proto.GetGroupRequest, out *proto.Group) (err error)
- func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, ...) (err error)
- func (s Service) ListGroups(ctx context.Context, in *proto.ListGroupsRequest, ...) (err error)
- func (s Service) ListMembers(c context.Context, in *proto.ListMembersRequest, ...) (err error)
- func (s Service) RebuildIndex(ctx context.Context, request *proto.RebuildIndexRequest, ...) error
- func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, out *proto.Group) (err error)
- func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, out *proto.Account) (err error)
- func (s Service) UpdateGroup(c context.Context, in *proto.UpdateGroupRequest, out *proto.Group) (err error)
Constants ¶
const ( // AccountManagementPermissionID is the hardcoded setting UUID for the account management permission AccountManagementPermissionID string = "8e587774-d929-4215-910b-a317b1e80f73" // AccountManagementPermissionName is the hardcoded setting name for the account management permission AccountManagementPermissionName string = "account-management" // GroupManagementPermissionID is the hardcoded setting UUID for the group management permission GroupManagementPermissionID string = "522adfbe-5908-45b4-b135-41979de73245" // GroupManagementPermissionName is the hardcoded setting name for the group management permission GroupManagementPermissionName string = "group-management" // SelfManagementPermissionID is the hardcoded setting UUID for the self management permission SelfManagementPermissionID string = "e03070e9-4362-4cc6-a872-1c7cb2eb2b8e" // SelfManagementPermissionName is the hardcoded setting name for the self management permission SelfManagementPermissionName string = "self-management" )
Variables ¶
This section is empty.
Functions ¶
func RegisterPermissions ¶
RegisterPermissions registers permissions for account management and group management with the settings service.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func RoleManager ¶
RoleManager provides a function to set the RoleManager option.
func RoleService ¶
func RoleService(val settings.RoleService) Option
RoleService provides a function to set the RoleService option.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config RoleService settings.RoleService RoleManager *roles.Manager }
Options defines the available options for this package.
type Service ¶
type Service struct { Config *config.Config RoleService settings.RoleService RoleManager *roles.Manager // contains filtered or unexported fields }
Service implements the AccountsServiceHandler interface
func (Service) AddMember ¶
func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *proto.Group) (err error)
AddMember implements the GroupsServiceHandler interface
func (Service) CreateAccount ¶
func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, out *proto.Account) (err error)
CreateAccount implements the AccountsServiceHandler interface
func (Service) CreateGroup ¶
func (s Service) CreateGroup(c context.Context, in *proto.CreateGroupRequest, out *proto.Group) (err error)
CreateGroup implements the GroupsServiceHandler interface
func (Service) DeleteAccount ¶
func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, out *empty.Empty) (err error)
DeleteAccount implements the AccountsServiceHandler interface
func (Service) DeleteGroup ¶
func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, out *empty.Empty) (err error)
DeleteGroup implements the GroupsServiceHandler interface
func (Service) GetAccount ¶
func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, out *proto.Account) (err error)
GetAccount implements the AccountsServiceHandler interface
func (Service) GetGroup ¶
func (s Service) GetGroup(c context.Context, in *proto.GetGroupRequest, out *proto.Group) (err error)
GetGroup implements the GroupsServiceHandler interface
func (Service) ListAccounts ¶
func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, out *proto.ListAccountsResponse) (err error)
ListAccounts implements the AccountsServiceHandler interface the query contains account properties
func (Service) ListGroups ¶
func (s Service) ListGroups(ctx context.Context, in *proto.ListGroupsRequest, out *proto.ListGroupsResponse) (err error)
ListGroups implements the GroupsServiceHandler interface
func (Service) ListMembers ¶
func (s Service) ListMembers(c context.Context, in *proto.ListMembersRequest, out *proto.ListMembersResponse) (err error)
ListMembers implements the GroupsServiceHandler interface
func (Service) RebuildIndex ¶
func (s Service) RebuildIndex(ctx context.Context, request *proto.RebuildIndexRequest, response *proto.RebuildIndexResponse) error
RebuildIndex deletes all indices (in memory and on storage) and rebuilds them from scratch.
func (Service) RemoveMember ¶
func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, out *proto.Group) (err error)
RemoveMember implements the GroupsServiceHandler interface