generated

package
Version: v0.0.0-...-caf6f44 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Mutation struct {
		CreateNode   func(childComplexity int, input model.NodeInput) int
		Login        func(childComplexity int, input model.LoginInput) int
		Logout       func(childComplexity int) int
		RegisterUser func(childComplexity int, input model.UserInput) int
		ShareNode    func(childComplexity int, input model.ShareInput) int
	}

	MutationResult struct {
		Success func(childComplexity int) int
	}

	Node struct {
		Created    func(childComplexity int) int
		Files      func(childComplexity int) int
		FullPath   func(childComplexity int) int
		ID         func(childComplexity int) int
		IsStarred  func(childComplexity int) int
		MimeType   func(childComplexity int) int
		Name       func(childComplexity int) int
		Owner      func(childComplexity int) int
		ParentNode func(childComplexity int) int
		Path       func(childComplexity int) int
		Size       func(childComplexity int) int
		Type       func(childComplexity int) int
		Updated    func(childComplexity int) int
	}

	NodeCreationResult struct {
		Created func(childComplexity int) int
		Node    func(childComplexity int) int
	}

	NodeShareResult struct {
		Created func(childComplexity int) int
		Share   func(childComplexity int) int
	}

	Query struct {
		Health func(childComplexity int) int
		Node   func(childComplexity int, input model.NodeIdentifierInput) int
		User   func(childComplexity int, userID *string) int
	}

	Session struct {
		Token      func(childComplexity int) int
		User       func(childComplexity int) int
		ValidUntil func(childComplexity int) int
	}

	Share struct {
		Mode       func(childComplexity int) int
		Node       func(childComplexity int) int
		SharedWith func(childComplexity int) int
	}

	User struct {
		Created   func(childComplexity int) int
		Email     func(childComplexity int) int
		FirstName func(childComplexity int) int
		ID        func(childComplexity int) int
		IsAdmin   func(childComplexity int) int
		LastName  func(childComplexity int) int
		Password  func(childComplexity int) int
		Updated   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	Login(ctx context.Context, input model.LoginInput) (*models.Session, error)
	Logout(ctx context.Context) (*model.MutationResult, error)
	CreateNode(ctx context.Context, input model.NodeInput) (*model.NodeCreationResult, error)
	ShareNode(ctx context.Context, input model.ShareInput) (*model.NodeShareResult, error)
	RegisterUser(ctx context.Context, input model.UserInput) (*models.User, error)
}

type NodeResolver

type NodeResolver interface {
	ID(ctx context.Context, obj *models.Node) (string, error)

	MimeType(ctx context.Context, obj *models.Node) (string, error)

	Owner(ctx context.Context, obj *models.Node) (*models.User, error)
	ParentNode(ctx context.Context, obj *models.Node) (*models.Node, error)

	Files(ctx context.Context, obj *models.Node) ([]*models.Node, error)
}

type QueryResolver

type QueryResolver interface {
	Health(ctx context.Context) (*model.MutationResult, error)
	Node(ctx context.Context, input model.NodeIdentifierInput) (*models.Node, error)
	User(ctx context.Context, userID *string) (*models.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Node() NodeResolver
	Query() QueryResolver
	Session() SessionResolver
	Share() ShareResolver
	User() UserResolver
}

type SessionResolver

type SessionResolver interface {
	Token(ctx context.Context, obj *models.Session) (string, error)
	User(ctx context.Context, obj *models.Session) (*models.User, error)
}

type ShareResolver

type ShareResolver interface {
	Node(ctx context.Context, obj *models.Share) (*models.Node, error)
	SharedWith(ctx context.Context, obj *models.Share) (*models.User, error)
}

type UserResolver

type UserResolver interface {
	ID(ctx context.Context, obj *models.User) (string, error)
}

Source Files

Jump to

Keyboard shortcuts

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