Documentation ¶
Index ¶
- Constants
- type Option
- type Options
- type Service
- func (g Service) AddSettingToBundle(c context.Context, req *proto.AddSettingToBundleRequest, ...) error
- func (g Service) AssignRoleToUser(c context.Context, req *proto.AssignRoleToUserRequest, ...) error
- func (g Service) GetBundle(c context.Context, req *proto.GetBundleRequest, res *proto.GetBundleResponse) error
- func (g Service) GetValue(c context.Context, req *proto.GetValueRequest, res *proto.GetValueResponse) error
- func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, in *proto.GetValueByUniqueIdentifiersRequest, ...) error
- func (g Service) ListBundles(c context.Context, req *proto.ListBundlesRequest, ...) error
- func (g Service) ListPermissionsByResource(c context.Context, req *proto.ListPermissionsByResourceRequest, ...) error
- func (g Service) ListRoleAssignments(c context.Context, req *proto.ListRoleAssignmentsRequest, ...) error
- func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, ...) error
- func (g Service) ListValues(c context.Context, req *proto.ListValuesRequest, res *proto.ListValuesResponse) error
- func (g Service) RegisterDefaultRoles()
- func (g Service) RemoveRoleFromUser(c context.Context, req *proto.RemoveRoleFromUserRequest, _ *empty.Empty) error
- func (g Service) RemoveSettingFromBundle(c context.Context, req *proto.RemoveSettingFromBundleRequest, _ *empty.Empty) error
- func (g Service) SaveBundle(c context.Context, req *proto.SaveBundleRequest, res *proto.SaveBundleResponse) error
- func (g Service) SaveValue(c 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" )
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 ¶ added in v0.2.0
func (g Service) AddSettingToBundle(c context.Context, req *proto.AddSettingToBundleRequest, res *proto.AddSettingToBundleResponse) error
AddSettingToBundle implements the BundleServiceHandler interface
func (Service) AssignRoleToUser ¶ added in v0.2.0
func (g Service) AssignRoleToUser(c context.Context, req *proto.AssignRoleToUserRequest, res *proto.AssignRoleToUserResponse) error
AssignRoleToUser implements the RoleServiceHandler interface
func (Service) GetBundle ¶ added in v0.2.0
func (g Service) GetBundle(c context.Context, req *proto.GetBundleRequest, res *proto.GetBundleResponse) error
GetBundle implements the BundleServiceHandler interface
func (Service) GetValue ¶ added in v0.2.0
func (g Service) GetValue(c context.Context, req *proto.GetValueRequest, res *proto.GetValueResponse) error
GetValue implements the ValueServiceHandler interface
func (Service) GetValueByUniqueIdentifiers ¶ added in v0.2.0
func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, in *proto.GetValueByUniqueIdentifiersRequest, res *proto.GetValueResponse) error
GetValueByUniqueIdentifiers implements the ValueService interface
func (Service) ListBundles ¶ added in v0.2.0
func (g Service) ListBundles(c context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error
ListBundles implements the BundleServiceHandler interface
func (Service) ListPermissionsByResource ¶ added in v0.3.0
func (g Service) ListPermissionsByResource(c context.Context, req *proto.ListPermissionsByResourceRequest, res *proto.ListPermissionsByResourceResponse) error
ListPermissionsByResource implements the PermissionServiceHandler interface
func (Service) ListRoleAssignments ¶ added in v0.2.0
func (g Service) ListRoleAssignments(c context.Context, req *proto.ListRoleAssignmentsRequest, res *proto.ListRoleAssignmentsResponse) error
ListRoleAssignments implements the RoleServiceHandler interface
func (Service) ListRoles ¶ added in v0.2.0
func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error
ListRoles implements the RoleServiceHandler interface
func (Service) ListValues ¶ added in v0.2.0
func (g Service) ListValues(c context.Context, req *proto.ListValuesRequest, res *proto.ListValuesResponse) error
ListValues implements the ValueServiceHandler interface
func (Service) RegisterDefaultRoles ¶ added in v0.3.0
func (g Service) RegisterDefaultRoles()
RegisterDefaultRoles composes default roles and saves them. Skipped if the roles already exist.
func (Service) RemoveRoleFromUser ¶ added in v0.2.0
func (g Service) RemoveRoleFromUser(c context.Context, req *proto.RemoveRoleFromUserRequest, _ *empty.Empty) error
RemoveRoleFromUser implements the RoleServiceHandler interface
func (Service) RemoveSettingFromBundle ¶ added in v0.2.0
func (g Service) RemoveSettingFromBundle(c context.Context, req *proto.RemoveSettingFromBundleRequest, _ *empty.Empty) error
RemoveSettingFromBundle implements the BundleServiceHandler interface