service

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 39 Imported by: 1

Documentation

Index

Constants

View Source
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"
)

Variables

This section is empty.

Functions

func RegisterPermissions

func RegisterPermissions(l *olog.Logger)

RegisterPermissions registers permissions for account management and group management with the settings service.

func RegisterSettingsBundles

func RegisterSettingsBundles(l *olog.Logger)

RegisterSettingsBundles pushes the settings bundle definitions for this extension to the ocis-settings service.

Types

type Option

type Option func(o *Options)

Option defines a single option function.

func Config

func Config(val *config.Config) Option

Config provides a function to set the Config option.

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the Logger option.

func RoleManager

func RoleManager(val *roles.Manager) Option

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 New

func New(opts ...Option) (s *Service, err error)

New returns a new instance of Service

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(c 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) RemoveMember

func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, out *proto.Group) (err error)

RemoveMember implements the GroupsServiceHandler interface

func (Service) UpdateAccount

func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, out *proto.Account) (err error)

UpdateAccount implements the AccountsServiceHandler interface read only fields are ignored TODO how can we unset specific values? using the update mask

func (Service) UpdateGroup

func (s Service) UpdateGroup(c context.Context, in *proto.UpdateGroupRequest, out *proto.Group) (err error)

UpdateGroup implements the GroupsServiceHandler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL