generators

package
v0.0.0-...-f2905ed Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ContextModule = "resolvers"
View Source
const ResolverModule = "resolvers"

Variables

This section is empty.

Functions

func Add

func Add(b, a interface{}) (interface{}, error)

func Args

func Args(values ...interface{}) (map[string]interface{}, error)

func CamelCase

func CamelCase(values ...interface{}) (string, error)

func Comment

func Comment(values ...interface{}) (string, error)

func Divide

func Divide(b, a interface{}) (interface{}, error)

divide returns the division of b from a.

func ExecuteTemplate

func ExecuteTemplate(w io.Writer, name string, data interface{}) error

func Find

func Find(values ...interface{}) (interface{}, error)

func GenerateFile

func GenerateFile(filename, template string, data interface{}) error

func GenerateGoFile

func GenerateGoFile(filename, template string, data interface{}) error

func Go2GraphQLType

func Go2GraphQLType(values ...interface{}) (string, error)

func GoType

func GoType(values ...interface{}) (string, error)

func GraphQL2GoType

func GraphQL2GoType(values ...interface{}) (string, error)

func GraphQLInputType

func GraphQLInputType(values ...interface{}) (string, error)

func GraphQLType

func GraphQLType(values ...interface{}) (string, error)

func GraphQLTypeInternal

func GraphQLTypeInternal(typ, primative string) string

func ImportSplit

func ImportSplit(str interface{}) (interface{}, error)

func IsMany2Many

func IsMany2Many(value interface{}) (bool, error)

func Join

func Join(values ...interface{}) ([]string, error)

func LowerCamelCase

func LowerCamelCase(values ...interface{}) (string, error)

func MethodReturn

func MethodReturn(values ...interface{}) (interface{}, error)

func Multiply

func Multiply(b, a interface{}) (interface{}, error)

multiply returns the product of a and b.

func Now

func Now() (interface{}, error)

func ReactPath

func ReactPath(path, module, name string) string

func Safe

func Safe(values ...interface{}) (interface{}, error)

func SafeHasPrefix

func SafeHasPrefix(str *string, s string) bool

func SafeHasSuffix

func SafeHasSuffix(str *string, s string) bool

func SafeString

func SafeString(str *string) string

func SchemaPath

func SchemaPath(path, module, name string) string

func SnakeCase

func SnakeCase(values ...interface{}) (string, error)

func Subtract

func Subtract(b, a interface{}) (interface{}, error)

subtract returns the difference of b from a.

func TemplatePath

func TemplatePath(path, module, name string) string

func Unique

func Unique(values ...interface{}) ([]string, error)

Types

type AggregatorGenerator

type AggregatorGenerator struct {
	// contains filtered or unexported fields
}

func NewAggregatorGenerator

func NewAggregatorGenerator(path string) *AggregatorGenerator

func (*AggregatorGenerator) Generate

func (t *AggregatorGenerator) Generate(cfg *config.Config) error

type AggregatorTemplate

type AggregatorTemplate struct {
	Imports []string
	Models  []domain.Model
}

type ContextGenerator

type ContextGenerator struct {
	// contains filtered or unexported fields
}

func NewContextGenerator

func NewContextGenerator(path string) *ContextGenerator

func (*ContextGenerator) Generate

func (t *ContextGenerator) Generate(cfg *config.Config) error

type ContextTemplate

type ContextTemplate struct {
	Imports []string
}

type DomainGenerator

type DomainGenerator struct {
	// contains filtered or unexported fields
}

func NewDomainGenerator

func NewDomainGenerator(path string) *DomainGenerator

func (*DomainGenerator) Generate

func (t *DomainGenerator) Generate(cfg *config.Config) error

type DomainTemplate

type DomainTemplate struct {
	Imports []string
	Model   domain.Model
}

type Generator

type Generator interface {
	Generate(config *config.Config) error
}

type GraphQLGenerator

type GraphQLGenerator struct {
	// contains filtered or unexported fields
}

func NewGraphQLGenerator

func NewGraphQLGenerator(path string) *GraphQLGenerator

func (*GraphQLGenerator) Generate

func (t *GraphQLGenerator) Generate(cfg *config.Config) error

type GraphQLTemplate

type GraphQLTemplate struct {
	Models []domain.Model
}

type HttpGenerator

type HttpGenerator struct {
	// contains filtered or unexported fields
}

func NewHttpGenerator

func NewHttpGenerator(path string) *HttpGenerator

func (*HttpGenerator) Generate

func (t *HttpGenerator) Generate(cfg *config.Config) error

type HttpTemplate

type HttpTemplate struct {
	Imports []string
}

type InteractorGenerator

type InteractorGenerator struct {
	// contains filtered or unexported fields
}

func NewInteractorGenerator

func NewInteractorGenerator(path string) *InteractorGenerator

func (*InteractorGenerator) Generate

func (t *InteractorGenerator) Generate(cfg *config.Config) error

type InteractorTemplate

type InteractorTemplate struct {
	Imports []string
	Models  []domain.Model
}

type MainGenerator

type MainGenerator struct {
	// contains filtered or unexported fields
}

func NewMainGenerator

func NewMainGenerator(path string) *MainGenerator

func (*MainGenerator) Generate

func (t *MainGenerator) Generate(cfg *config.Config) error

type MainTemplate

type MainTemplate struct {
	Models  []domain.Model
	Imports []string
}

type QueryGenerator

type QueryGenerator struct {
	// contains filtered or unexported fields
}

func NewQueryGenerator

func NewQueryGenerator(path string) *QueryGenerator

func (*QueryGenerator) Filename

func (t *QueryGenerator) Filename(name string) string

type QueryTemplate

type QueryTemplate struct {
	Imports []string
	Types   []domain.Type
	Models  []domain.Model
}

type ResolverGenerator

type ResolverGenerator struct {
	// contains filtered or unexported fields
}

func NewResolverGenerator

func NewResolverGenerator(path string) *ResolverGenerator

func (*ResolverGenerator) Generate

func (t *ResolverGenerator) Generate(cfg *config.Config) error

type ResolverTemplate

type ResolverTemplate struct {
	Imports []string
	Model   domain.Model
}

type SQLGenerator

type SQLGenerator struct {
	// contains filtered or unexported fields
}

func NewSQLGenerator

func NewSQLGenerator(path string) *SQLGenerator

func (*SQLGenerator) Generate

func (t *SQLGenerator) Generate(cfg *config.Config) error

type SQLTemplate

type SQLTemplate struct {
	Imports []string
	Model   domain.Model
}

type TypesTemplate

type TypesTemplate struct {
	Imports []string
	Types   []domain.Type
	Models  []domain.Model
}

Jump to

Keyboard shortcuts

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