generated

package
v0.0.0-...-2b4ca68 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 14 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 {
		CreateShop   func(childComplexity int, params model.NewShop) int
		GenerateOtp  func(childComplexity int) int
		Login        func(childComplexity int, params model.Login) int
		RegisterUser func(childComplexity int, params model.NewUser) int
		ValidateOtp  func(childComplexity int, code string) int
	}

	Otp struct {
		ImgData   func(childComplexity int) int
		SecretKey func(childComplexity int) int
	}

	Query struct {
		Users func(childComplexity int) int
	}

	Shop struct {
		City        func(childComplexity int) int
		Country     func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		Region      func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UserID      func(childComplexity int) int
	}

	User struct {
		CreatedAt func(childComplexity int) int
		ID        func(childComplexity int) int
		Token     func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		Username  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 {
	RegisterUser(ctx context.Context, params model.NewUser) (*auth.User, error)
	Login(ctx context.Context, params model.Login) (*auth.User, error)
	GenerateOtp(ctx context.Context) (*model.Otp, error)
	ValidateOtp(ctx context.Context, code string) (*auth.User, error)
	CreateShop(ctx context.Context, params model.NewShop) (*shop.Shop, error)
}

type QueryResolver

type QueryResolver interface {
	Users(ctx context.Context) ([]*auth.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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