Documentation ¶
Index ¶
- Constants
- type Option
- type Options
- type Service
- func (g Service) AddSettingToBundle(ctx context.Context, req *proto.AddSettingToBundleRequest, ...) error
- func (g Service) AssignRoleToUser(ctx context.Context, req *proto.AssignRoleToUserRequest, ...) error
- func (g Service) GetBundle(ctx context.Context, req *proto.GetBundleRequest, res *proto.GetBundleResponse) error
- func (g Service) GetPermissionByID(ctx context.Context, req *proto.GetPermissionByIDRequest, ...) error
- func (g Service) GetValue(ctx context.Context, req *proto.GetValueRequest, res *proto.GetValueResponse) error
- func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *proto.GetValueByUniqueIdentifiersRequest, ...) error
- func (g Service) ListBundles(ctx context.Context, req *proto.ListBundlesRequest, ...) error
- func (g Service) ListPermissionsByResource(ctx context.Context, req *proto.ListPermissionsByResourceRequest, ...) error
- func (g Service) ListRoleAssignments(ctx context.Context, req *proto.ListRoleAssignmentsRequest, ...) error
- func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, ...) error
- func (g Service) ListValues(ctx context.Context, req *proto.ListValuesRequest, ...) error
- func (g Service) RegisterDefaultRoles()
- func (g Service) RemoveRoleFromUser(ctx context.Context, req *proto.RemoveRoleFromUserRequest, _ *empty.Empty) error
- func (g Service) RemoveSettingFromBundle(ctx context.Context, req *proto.RemoveSettingFromBundleRequest, _ *empty.Empty) error
- func (g Service) SaveBundle(ctx context.Context, req *proto.SaveBundleRequest, ...) error
- func (g Service) SaveValue(ctx context.Context, req *proto.SaveValueRequest, res *proto.SaveValueResponse) error
Constants ¶
const ( // BundleUUIDRoleAdmin represents the admin role BundleUUIDRoleAdmin = "71881883-1768-46bd-a24d-a356a2afdf7f" // BundleUUIDRoleUser represents the user role. BundleUUIDRoleUser = "d7beeea8-8ff4-406b-8fb6-ab2dd81e6b11" // BundleUUIDRoleGuest represents the guest role. BundleUUIDRoleGuest = "38071a68-456a-4553-846a-fa67bf5596cc" // RoleManagementPermissionID is the hardcoded setting UUID for the role management permission RoleManagementPermissionID string = "a53e601e-571f-4f86-8fec-d4576ef49c62" // RoleManagementPermissionName is the hardcoded setting name for the role management permission RoleManagementPermissionName string = "role-management" // SettingsManagementPermissionID is the hardcoded setting UUID for the settings management permission SettingsManagementPermissionID string = "79e13b30-3e22-11eb-bc51-0b9f0bad9a58" // SettingsManagementPermissionName is the hardcoded setting name for the settings management permission SettingsManagementPermissionName string = "settings-management" // 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 ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler }
Options defines the available options for this package.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service.
func NewInstrument ¶
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
NewLogging returns a service that logs messages.
func NewService ¶
NewService returns a service implementation for Service.
func NewTracing ¶
NewTracing returns a service that instruments traces.
func (Service) AddSettingToBundle ¶
func (g Service) AddSettingToBundle(ctx context.Context, req *proto.AddSettingToBundleRequest, res *proto.AddSettingToBundleResponse) error
AddSettingToBundle implements the BundleServiceHandler interface
func (Service) AssignRoleToUser ¶
func (g Service) AssignRoleToUser(ctx context.Context, req *proto.AssignRoleToUserRequest, res *proto.AssignRoleToUserResponse) error
AssignRoleToUser implements the RoleServiceHandler interface
func (Service) GetBundle ¶
func (g Service) GetBundle(ctx context.Context, req *proto.GetBundleRequest, res *proto.GetBundleResponse) error
GetBundle implements the BundleServiceHandler interface
func (Service) GetPermissionByID ¶
func (g Service) GetPermissionByID(ctx context.Context, req *proto.GetPermissionByIDRequest, res *proto.GetPermissionByIDResponse) error
GetPermissionByID implements the PermissionServiceHandler interface
func (Service) GetValue ¶
func (g Service) GetValue(ctx context.Context, req *proto.GetValueRequest, res *proto.GetValueResponse) error
GetValue implements the ValueServiceHandler interface
func (Service) GetValueByUniqueIdentifiers ¶
func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *proto.GetValueByUniqueIdentifiersRequest, res *proto.GetValueResponse) error
GetValueByUniqueIdentifiers implements the ValueService interface
func (Service) ListBundles ¶
func (g Service) ListBundles(ctx context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error
ListBundles implements the BundleServiceHandler interface
func (Service) ListPermissionsByResource ¶
func (g Service) ListPermissionsByResource(ctx context.Context, req *proto.ListPermissionsByResourceRequest, res *proto.ListPermissionsByResourceResponse) error
ListPermissionsByResource implements the PermissionServiceHandler interface
func (Service) ListRoleAssignments ¶
func (g Service) ListRoleAssignments(ctx context.Context, req *proto.ListRoleAssignmentsRequest, res *proto.ListRoleAssignmentsResponse) error
ListRoleAssignments implements the RoleServiceHandler interface
func (Service) ListRoles ¶
func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error
ListRoles implements the RoleServiceHandler interface
func (Service) ListValues ¶
func (g Service) ListValues(ctx context.Context, req *proto.ListValuesRequest, res *proto.ListValuesResponse) error
ListValues implements the ValueServiceHandler interface
func (Service) RegisterDefaultRoles ¶
func (g Service) RegisterDefaultRoles()
RegisterDefaultRoles composes default roles and saves them. Skipped if the roles already exist.
func (Service) RemoveRoleFromUser ¶
func (g Service) RemoveRoleFromUser(ctx context.Context, req *proto.RemoveRoleFromUserRequest, _ *empty.Empty) error
RemoveRoleFromUser implements the RoleServiceHandler interface
func (Service) RemoveSettingFromBundle ¶
func (g Service) RemoveSettingFromBundle(ctx context.Context, req *proto.RemoveSettingFromBundleRequest, _ *empty.Empty) error
RemoveSettingFromBundle implements the BundleServiceHandler interface