Documentation ¶
Index ¶
- Variables
- type QueryResolver
- func (r *QueryResolver) Check(ctx context.Context, name string, key, targetID, idKey *string) (*string, error)
- func (r *QueryResolver) CreateRole(ctx context.Context, input *gqlmodels.RBACRoleInput) (*gqlmodels.RBACRolePayload, error)
- func (r *QueryResolver) DeleteRole(ctx context.Context, id uint64, msg *string) (*gqlmodels.RBACRolePayload, error)
- func (r *QueryResolver) ListMyPermissions(ctx context.Context, patterns []string) ([]*gqlmodels.RBACPermission, error)
- func (r *QueryResolver) ListPermissions(ctx context.Context, patterns []string) ([]*gqlmodels.RBACPermission, error)
- func (r *QueryResolver) ListRoles(ctx context.Context, filter *gqlmodels.RBACRoleListFilter, ...) (*connectors.RBACRoleConnection, error)
- func (r *QueryResolver) Role(ctx context.Context, id uint64) (*gqlmodels.RBACRolePayload, error)
- func (r *QueryResolver) UpdateRole(ctx context.Context, id uint64, input *gqlmodels.RBACRoleInput) (*gqlmodels.RBACRolePayload, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUndefinedPermissionKey = errors.New("undefined permission key") ErrInvalidTargetValue = errors.New("invalid target value") )
Functions ¶
This section is empty.
Types ¶
type QueryResolver ¶
type QueryResolver struct {
// contains filtered or unexported fields
}
QueryResolver implements GQL API methods
func NewQueryResolver ¶
func NewQueryResolver() *QueryResolver
NewQueryResolver returns new API resolver
func (*QueryResolver) Check ¶
func (r *QueryResolver) Check(ctx context.Context, name string, key, targetID, idKey *string) (*string, error)
Check the permission for the given role and target object
func (*QueryResolver) CreateRole ¶
func (r *QueryResolver) CreateRole(ctx context.Context, input *gqlmodels.RBACRoleInput) (*gqlmodels.RBACRolePayload, error)
CreateRole is the resolver for the createRole field.
func (*QueryResolver) DeleteRole ¶
func (r *QueryResolver) DeleteRole(ctx context.Context, id uint64, msg *string) (*gqlmodels.RBACRolePayload, error)
DeleteRole is the resolver for the deleteRole field.
func (*QueryResolver) ListMyPermissions ¶
func (r *QueryResolver) ListMyPermissions(ctx context.Context, patterns []string) ([]*gqlmodels.RBACPermission, error)
func (*QueryResolver) ListPermissions ¶
func (r *QueryResolver) ListPermissions(ctx context.Context, patterns []string) ([]*gqlmodels.RBACPermission, error)
ListPermissions is the resolver for the listPermissions field.
func (*QueryResolver) ListRoles ¶
func (r *QueryResolver) ListRoles(ctx context.Context, filter *gqlmodels.RBACRoleListFilter, order *gqlmodels.RBACRoleListOrder, page *gqlmodels.Page) (*connectors.RBACRoleConnection, error)
ListRoles is the resolver for the listRoles field.
func (*QueryResolver) Role ¶
func (r *QueryResolver) Role(ctx context.Context, id uint64) (*gqlmodels.RBACRolePayload, error)
Role is the resolver for the Role field.
func (*QueryResolver) UpdateRole ¶
func (r *QueryResolver) UpdateRole(ctx context.Context, id uint64, input *gqlmodels.RBACRoleInput) (*gqlmodels.RBACRolePayload, error)
UpdateRole is the resolver for the updateRole field.
Click to show internal directories.
Click to hide internal directories.