Documentation
¶
Index ¶
- Constants
- func IsContextFirst(fields []types.Variable) bool
- func IsErrorLast(fields []types.Variable) bool
- func RemoveAlreadyExistingFunctions(existing []types.Function, generating *[]*types.Function, ...)
- type GenerationInfo
- type Template
- func NewEndpointsTemplate(info *GenerationInfo) Template
- func NewExchangeTemplate(info *GenerationInfo) Template
- func NewGRPCClientTemplate(info *GenerationInfo) Template
- func NewGRPCEndpointConverterTemplate(info *GenerationInfo) Template
- func NewGRPCServerTemplate(info *GenerationInfo) Template
- func NewLoggingTemplate(info *GenerationInfo) Template
- func NewMiddlewareTemplate(info *GenerationInfo) Template
- func NewStubGRPCTypeConverterTemplate(info *GenerationInfo) Template
- func NewStubInterfaceTemplate(info *GenerationInfo) Template
- type WriteStrategyState
Constants ¶
View Source
const ( PackagePathGoKitEndpoint = "github.com/go-kit/kit/endpoint" PackagePathContext = "context" PackagePathGoKitLog = "github.com/go-kit/kit/log" PackagePathTime = "time" PackagePathGoogleGRPC = "google.golang.org/grpc" PackagePathGoogleGRPCCodes = "google.golang.org/grpc/codes" PackagePathNetContext = "golang.org/x/net/context" PackagePathGoKitTransportGRPC = "github.com/go-kit/kit/transport/grpc" TagMark = "// @" FileHeader = `This file was automatically generated by "microgen" utility.` )
View Source
const ( GolangProtobufPtypesTimestamp = "github.com/golang/protobuf/ptypes/timestamp" JsonbPackage = "github.com/sas1024/gorm-jsonb/jsonb" GolangProtobufPtypes = "github.com/golang/protobuf/ptypes" )
View Source
const (
MiddlewareTypeName = "Middleware"
)
Variables ¶
This section is empty.
Functions ¶
func IsContextFirst ¶ added in v0.3.0
func IsErrorLast ¶ added in v0.3.0
Types ¶
type GenerationInfo ¶ added in v0.3.0
type Template ¶ added in v0.3.0
type Template interface { // Do all preparing actions, e.g. scan file. // Should be called first. Prepare() error // Default relative path for template (=file) DefaultPath() string // Template chooses generation strategy, e.g. appends to file or create new. ChooseStrategy() (write_strategy.Strategy, error) // Main render function, where template produce code. Render() write_strategy.Renderer }
func NewEndpointsTemplate ¶ added in v0.3.0
func NewEndpointsTemplate(info *GenerationInfo) Template
func NewExchangeTemplate ¶ added in v0.3.0
func NewExchangeTemplate(info *GenerationInfo) Template
func NewGRPCClientTemplate ¶ added in v0.3.0
func NewGRPCClientTemplate(info *GenerationInfo) Template
func NewGRPCEndpointConverterTemplate ¶ added in v0.3.0
func NewGRPCEndpointConverterTemplate(info *GenerationInfo) Template
func NewGRPCServerTemplate ¶ added in v0.3.0
func NewGRPCServerTemplate(info *GenerationInfo) Template
func NewLoggingTemplate ¶ added in v0.3.0
func NewLoggingTemplate(info *GenerationInfo) Template
func NewMiddlewareTemplate ¶ added in v0.3.0
func NewMiddlewareTemplate(info *GenerationInfo) Template
func NewStubGRPCTypeConverterTemplate ¶ added in v0.3.0
func NewStubGRPCTypeConverterTemplate(info *GenerationInfo) Template
func NewStubInterfaceTemplate ¶ added in v0.3.0
func NewStubInterfaceTemplate(info *GenerationInfo) Template
type WriteStrategyState ¶ added in v0.3.0
type WriteStrategyState int
const ( FileStrat WriteStrategyState = iota + 1 AppendStrat )
Click to show internal directories.
Click to hide internal directories.