directives

package
v0.0.0-...-e467057 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(ctx context.Context, obj any, next graphql.Resolver) (any, error)

Auth directive checks that user is authenticated

func HasPermissions

func HasPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)

HasPermissions for this user to the particular permission of the object Every module have the list of permissions ["list", "view", "create", "update", "delete", etc] This method checks, first of all, that object belongs to the user or have manager access and secondly that the user has the requested permissions of the module or several modules

func SkipNoPermissions

func SkipNoPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)

SkipNoPermissions directive to skip resolver if no permissions

Types

This section is empty.

Jump to

Keyboard shortcuts

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