generated

package
v0.0.0-...-861173f Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 17 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 {
	Client struct {
		ID       func(childComplexity int) int
		Invoices func(childComplexity int) int
	}

	Company struct {
		ID                  func(childComplexity int) int
		InvoiceTaxInclusive func(childComplexity int) int
	}

	Entity struct {
		FindClientByID  func(childComplexity int, id hide.ID) int
		FindCompanyByID func(childComplexity int, id hide.ID) int
	}

	Invoice struct {
		Client        func(childComplexity int) int
		CreatedBy     func(childComplexity int) int
		DateDue       func(childComplexity int) int
		ID            func(childComplexity int) int
		LineItems     func(childComplexity int) int
		Number        func(childComplexity int) int
		PaymentStatus func(childComplexity int) int
		Status        func(childComplexity int) int
		SubTotal      func(childComplexity int) int
		Total         func(childComplexity int) int
		TotalTax      func(childComplexity int) int
	}

	LineItem struct {
		Description  func(childComplexity int) int
		Name         func(childComplexity int) int
		Quantity     func(childComplexity int) int
		Tax          func(childComplexity int) int
		TaxInclusive func(childComplexity int) int
		TaxRate      func(childComplexity int) int
		Total        func(childComplexity int) int
		UnitCost     func(childComplexity int) int
	}

	Mutation struct {
		CreateInvoice             func(childComplexity int, invoice model.InvoiceInput) int
		CreateInvoicePdf          func(childComplexity int, id hide.ID) int
		UpdateCompanyTaxInclusive func(childComplexity int, invoiceTaxInclusive bool) int
		UpdateInvoice             func(childComplexity int, id hide.ID, invoice model.InvoiceInput) int
	}

	Query struct {
		Invoice        func(childComplexity int, id hide.ID) int
		Invoices       func(childComplexity int, page *int) int
		PreviewInvoice func(childComplexity int, invoice model.InvoiceInput) int
		// contains filtered or unexported fields
	}

	User struct {
		ID func(childComplexity int) int
	}

	Service struct {
		SDL func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	HasPerm               func(ctx context.Context, obj interface{}, next graphql.Resolver, perm string) (res interface{}, err error)
	HasPerms              func(ctx context.Context, obj interface{}, next graphql.Resolver, perms []string) (res interface{}, err error)
	IsAuthenticated       func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	IsSecureAuthenticated func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type EntityResolver

type EntityResolver interface {
	FindClientByID(ctx context.Context, id hide.ID) (*model.Client, error)
	FindCompanyByID(ctx context.Context, id hide.ID) (*model.Company, error)
}

type InvoiceResolver

type InvoiceResolver interface {
	Status(ctx context.Context, obj *model.Invoice) (model.InvoiceStatus, error)
	PaymentStatus(ctx context.Context, obj *model.Invoice) (*model.InvoicePaymentStatus, error)
	Number(ctx context.Context, obj *model.Invoice) (string, error)
	CreatedBy(ctx context.Context, obj *model.Invoice) (*model.User, error)
	Client(ctx context.Context, obj *model.Invoice) (*model.Client, error)

	SubTotal(ctx context.Context, obj *model.Invoice) (float64, error)
	TotalTax(ctx context.Context, obj *model.Invoice) (float64, error)
	Total(ctx context.Context, obj *model.Invoice) (float64, error)
}

type LineItemResolver

type LineItemResolver interface {
	UnitCost(ctx context.Context, obj *model.LineItem) (float64, error)
	TaxRate(ctx context.Context, obj *model.LineItem) (float64, error)

	Tax(ctx context.Context, obj *model.LineItem) (float64, error)
	Total(ctx context.Context, obj *model.LineItem) (float64, error)
}

type MutationResolver

type MutationResolver interface {
	CreateInvoice(ctx context.Context, invoice model.InvoiceInput) (*model.Invoice, error)
	UpdateInvoice(ctx context.Context, id hide.ID, invoice model.InvoiceInput) (*model.Invoice, error)
	CreateInvoicePdf(ctx context.Context, id hide.ID) (string, error)
	UpdateCompanyTaxInclusive(ctx context.Context, invoiceTaxInclusive bool) (*model.Company, error)
}

type QueryResolver

type QueryResolver interface {
	Invoice(ctx context.Context, id hide.ID) (*model.Invoice, error)
	Invoices(ctx context.Context, page *int) ([]*model.Invoice, error)
	PreviewInvoice(ctx context.Context, invoice model.InvoiceInput) (string, error)
}

type ResolverRoot

type ResolverRoot interface {
	Entity() EntityResolver
	Invoice() InvoiceResolver
	LineItem() LineItemResolver
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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