generator

package
v0.0.0-...-3fcbef7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachingKeyerFileSpec

func CachingKeyerFileSpec(g *Generator)

func CachingMiddlewareFileSpec

func CachingMiddlewareFileSpec(g *Generator)

func ConvertersFileSpec

func ConvertersFileSpec(g *Generator)

func DockerfileFileSpec

func DockerfileFileSpec(g *Generator)

func GRPCClientFileSpec

func GRPCClientFileSpec(g *Generator)

func GRPCDecodersFileSpec

func GRPCDecodersFileSpec(g *Generator)

func GRPCEncodersFileSpec

func GRPCEncodersFileSpec(g *Generator)

func GRPCServerFileSpec

func GRPCServerFileSpec(g *Generator)

func GlobalGRPCClientFileSpec

func GlobalGRPCClientFileSpec(g *Generator)

func GlobalHTTPClientFileSpec

func GlobalHTTPClientFileSpec(g *Generator)

func GoFileCreator

func GoFileCreator(base string, path string, name string, overwrite bool, merge bool) file.File

func HTTPClientFileSpec

func HTTPClientFileSpec(g *Generator)

func HTTPDecodersFileSpec

func HTTPDecodersFileSpec(g *Generator)

func HTTPEncodersFileSpec

func HTTPEncodersFileSpec(g *Generator)

func HTTPRequestsFileSpec

func HTTPRequestsFileSpec(g *Generator)

func HTTPResponsesFileSpec

func HTTPResponsesFileSpec(g *Generator)

func HTTPServerFileSpec

func HTTPServerFileSpec(g *Generator)

func HandlersFileSpec

func HandlersFileSpec(g *Generator)

func LoggingMiddlewareFileSpec

func LoggingMiddlewareFileSpec(g *Generator)

func ProtoBufServiceDefinitionsFileSpec

func ProtoBufServiceDefinitionsFileSpec(g *Generator)

func ProtoFileCreator

func ProtoFileCreator(base string, path string, name string, overwrite bool, merge bool) file.File

func ProtoRequestsConvertersFileSpec

func ProtoRequestsConvertersFileSpec(g *Generator)

func ProtoResponsesConvertersFileSpec

func ProtoResponsesConvertersFileSpec(g *Generator)

func RecoveringMiddlewareFileSpec

func RecoveringMiddlewareFileSpec(g *Generator)

func RequestsFileSpec

func RequestsFileSpec(g *Generator)

func ResponseFileSpec

func ResponseFileSpec(g *Generator)

func ServiceImplementationFileSpec

func ServiceImplementationFileSpec(g *Generator)

func ServiceImplementationMiddlewareFileSpec

func ServiceImplementationMiddlewareFileSpec(g *Generator)

func ServiceImplementationValidatorFileSpec

func ServiceImplementationValidatorFileSpec(g *Generator)

func ServiceMainFileSpec

func ServiceMainFileSpec(g *Generator)

func ServiceMiddlewareFileSpec

func ServiceMiddlewareFileSpec(g *Generator)

func ServiceStartCMDFileSpec

func ServiceStartCMDFileSpec(g *Generator)

func ServiceTransportEndpointsFileSpec

func ServiceTransportEndpointsFileSpec(g *Generator)

func ServiceTypesDefinitionsFileSpec

func ServiceTypesDefinitionsFileSpec(g *Generator)

func TextFileCreator

func TextFileCreator(ext string) file.Creator

func ValidatingMiddlewareFileSpec

func ValidatingMiddlewareFileSpec(g *Generator)

Types

type Files

type Files []file.File

func (Files) Save

func (fs Files) Save() error

type Generator

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

func Default

func Default(opts ...GeneratorOption) *Generator

func New

func New(opts ...GeneratorOption) *Generator

func (*Generator) AddArgumentsGroupGenerator

func (g *Generator) AddArgumentsGroupGenerator(name string, generatorName string, generator file.ArgumentsGroupGenerator)

func (*Generator) AddArgumentsGroupGeneratorWithConditions

func (g *Generator) AddArgumentsGroupGeneratorWithConditions(name string, generatorName string, generator file.ArgumentsGroupGenerator, conds ...file.ArgumentsGroupCondition)

func (*Generator) AddCreator

func (g *Generator) AddCreator(fileType string, creator file.Creator)

func (*Generator) AddEntityGenerator

func (g *Generator) AddEntityGenerator(name string, generatorName string, generator file.EntityGenerator)

func (*Generator) AddEntityGeneratorWithConditions

func (g *Generator) AddEntityGeneratorWithConditions(name string, generatorName string, generator file.EntityGenerator, conds ...file.EntityCondition)

func (*Generator) AddEnumGenerator

func (g *Generator) AddEnumGenerator(name string, generatorName string, generator file.EnumGenerator)

func (*Generator) AddEnumGeneratorWithConditions

func (g *Generator) AddEnumGeneratorWithConditions(name string, generatorName string, generator file.EnumGenerator, conds ...file.EnumCondition)

func (*Generator) AddMethodGenerator

func (g *Generator) AddMethodGenerator(name string, generatorName string, generator file.MethodGenerator)

func (*Generator) AddMethodGeneratorWithConditions

func (g *Generator) AddMethodGeneratorWithConditions(name string, generatorName string, generator file.MethodGenerator, conds ...file.MethodCondition)

func (*Generator) AddMethodGeneratorWithExtractor

func (g *Generator) AddMethodGeneratorWithExtractor(name string, generatorName string, generator file.MethodGenerator, extractor file.MethodsExtractor)

func (*Generator) AddMethodGeneratorWithExtractorAndConditions

func (g *Generator) AddMethodGeneratorWithExtractorAndConditions(name string, generatorName string, generator file.MethodGenerator, extractor file.MethodsExtractor, conds ...file.MethodCondition)

func (*Generator) AddServiceGenerator

func (g *Generator) AddServiceGenerator(name string, generatorName string, generator file.ServiceGenerator)

func (*Generator) AddServiceGeneratorWithConditions

func (g *Generator) AddServiceGeneratorWithConditions(name string, generatorName string, generator file.ServiceGenerator, conds ...file.ServiceCondition)

func (*Generator) AddSpec

func (g *Generator) AddSpec(name string, spec file.Spec)

func (*Generator) Generate

func (g *Generator) Generate(service types.Service) (files Files, err error)

func (*Generator) GetSpec

func (g *Generator) GetSpec(name string) file.Spec

func (*Generator) RemoveGenerator

func (g *Generator) RemoveGenerator(name string, generatorName string)

func (*Generator) RemoveSpec

func (g *Generator) RemoveSpec(name string)

type GeneratorOption

type GeneratorOption func(generator *Generator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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