Version: v0.0.0-...-c118757 Latest Latest

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

Go to latest
Published: Nov 14, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0




This section is empty.


View Source
var NoResolverError = NewResolverError(errors.New(`No valid resolvers found`))

NoResolverError is a default message when resolvers can't be found


This section is empty.


type Resolver

type Resolver struct {
	// contains filtered or unexported fields

Resolver struct holds a database connection

func New

func New(db *postgres.Db) *Resolver

New returns a new resolver

func (*Resolver) AddUserMutation

func (r *Resolver) AddUserMutation(p graphql.ResolveParams) (interface{}, error)

AddUserMutation adds a user with the given graphql query

func (*Resolver) AuthResolver

func (r *Resolver) AuthResolver(p graphql.ResolveParams) (interface{}, error)

AuthResolver verifies the auth token

func (*Resolver) GroupResolver

func (r *Resolver) GroupResolver(p graphql.ResolveParams) (interface{}, error)

GroupResolver find groups with given parameters

func (*Resolver) ImageResolver

func (r *Resolver) ImageResolver(p graphql.ResolveParams) (interface{}, error)

ImageResolver resolves a single image

func (*Resolver) ImagesResolver

func (r *Resolver) ImagesResolver(p graphql.ResolveParams) (interface{}, error)

ImagesResolver returns a list of images

func (*Resolver) LoginResolver

func (r *Resolver) LoginResolver(p graphql.ResolveParams) (interface{}, error)

LoginResolver logs in a user and sets the auth token for the session

func (*Resolver) RoleResolver

func (r *Resolver) RoleResolver(p graphql.ResolveParams) (interface{}, error)

RoleResolver finds roles with given information

func (*Resolver) UpdateUserToken

func (r *Resolver) UpdateUserToken(p graphql.ResolveParams) (interface{}, error)

UpdateUserToken updates the given user with a new token

func (*Resolver) UserGroupsResolver

func (r *Resolver) UserGroupsResolver(p graphql.ResolveParams) (interface{}, error)

UserGroupsResolver gets user groups

func (*Resolver) UserImagesResolver

func (r *Resolver) UserImagesResolver(p graphql.ResolveParams) (interface{}, error)

UserImagesResolver gets a users images

func (*Resolver) UserResolver

func (r *Resolver) UserResolver(p graphql.ResolveParams) (interface{}, error)

UserResolver resolves a user by username

func (*Resolver) UserRolesResolver

func (r *Resolver) UserRolesResolver(p graphql.ResolveParams) (interface{}, error)

UserRolesResolver gets a users roles

type ResolverError

type ResolverError struct {
	// contains filtered or unexported fields

ResolverError is a type for resolver errors

func NewResolverError

func NewResolverError(err error) *ResolverError

NewResolverError generates a resolver error message

func (*ResolverError) Error

func (r *ResolverError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL