graphql

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

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

ListRoles is the resolver for the listRoles field.

func (*QueryResolver) Role

Role is the resolver for the Role field.

func (*QueryResolver) UpdateRole

UpdateRole is the resolver for the updateRole field.

Jump to

Keyboard shortcuts

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