generator

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagMark         = template.TagMark
	MicrogenMainTag = template.MicrogenMainTag
	ProtobufTag     = "protobuf"
	GRPCClientAddr  = "grpc-addr"

	MiddlewareTag             = template.MiddlewareTag
	LoggingMiddlewareTag      = template.LoggingMiddlewareTag
	RecoveringMiddlewareTag   = template.RecoveringMiddlewareTag
	HttpTag                   = template.HttpTag
	HttpServerTag             = template.HttpServerTag
	HttpClientTag             = template.HttpClientTag
	GrpcTag                   = template.GrpcTag
	GrpcServerTag             = template.GrpcServerTag
	GrpcClientTag             = template.GrpcClientTag
	MainTag                   = template.MainTag
	ErrorLoggingMiddlewareTag = template.ErrorLoggingMiddlewareTag
	TracingMiddlewareTag      = template.TracingMiddlewareTag
	CachingMiddlewareTag      = template.CachingMiddlewareTag
	JSONRPCTag                = template.JSONRPCTag
	JSONRPCServerTag          = template.JSONRPCServerTag
	JSONRPCClientTag          = template.JSONRPCClientTag
	Transport                 = template.Transport
	TransportClient           = template.TransportClient
	TransportServer           = template.TransportServer
	MetricsMiddlewareTag      = template.MetricsMiddlewareTag
	ServiceDiscoveryTag       = template.ServiceDiscoveryTag

	HttpMethodTag  = template.HttpMethodTag
	HttpMethodPath = template.HttpMethodPath
)
View Source
const (
	Version = "0.9.1"
)

Variables

View Source
var (
	EmptyTemplateError = errors.New("empty template")
	EmptyStrategyError = errors.New("empty strategy")
)

Functions

func ValidateInterface added in v0.3.0

func ValidateInterface(iface *types.Interface) error

Types

type GenerationUnit added in v0.9.0

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

func ListTemplatesForGen added in v0.3.0

func ListTemplatesForGen(ctx context.Context, iface *types.Interface, absOutPath, sourcePath string, genProto string, genMain bool) (units []*GenerationUnit, err error)

func NewGenUnit added in v0.3.0

func NewGenUnit(ctx context.Context, tmpl template.Template, outPath string) (*GenerationUnit, error)

func (*GenerationUnit) Generate added in v0.9.0

func (g *GenerationUnit) Generate(ctx context.Context) error

func (GenerationUnit) Path added in v0.9.0

func (g GenerationUnit) Path() string

type Generator

type Generator interface {
	Generate() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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