generate

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestEncoderPartial  = "grpc_request_encoder"
	RequestDecoderPartial  = "grpc_request_decoder"
	ResponseEncoderPartial = "grpc_response_encoder"
	ResponseDecoderPartial = "grpc_response_decoder"
)
View Source
const (
	EncodeRequestPartial  = "grpc_encode_request"
	EncodeResponsePartial = "grpc_encode_response"
	DecodeRequestPartial  = "grpc_decode_request"
	DecodeResponsePartial = "grpc_decode_response"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpEncodeDecode added in v0.5.0

type AmqpEncodeDecode struct {
	BaseGenerator
}

func NewAMQPEncodeDecode added in v0.5.0

func NewAMQPEncodeDecode(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *AmqpEncodeDecode

func (*AmqpEncodeDecode) GenerateMissing added in v0.5.0

func (s *AmqpEncodeDecode) GenerateMissing() error

func (*AmqpEncodeDecode) Update added in v0.5.0

func (s *AmqpEncodeDecode) Update() error

Update will call GenerateFull

type AmqpPublisher added in v0.5.0

type AmqpPublisher struct {
	BaseGenerator
}

func NewAMQPPublisher added in v0.5.0

func NewAMQPPublisher(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *AmqpPublisher

func (*AmqpPublisher) Update added in v0.5.0

func (s *AmqpPublisher) Update() error

Update will call GenerateFull

type AmqpSubscriber added in v0.5.0

type AmqpSubscriber struct {
	BaseGenerator
}

func NewAMQPSubscriber added in v0.5.0

func NewAMQPSubscriber(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *AmqpSubscriber

func (*AmqpSubscriber) Update added in v0.5.0

func (s *AmqpSubscriber) Update() error

Update will call GenerateFull

type AmqpSubscriberHandler added in v0.5.0

type AmqpSubscriberHandler struct {
	BaseGenerator
	// contains filtered or unexported fields
}

func NewAMQPSubscriberHandler added in v0.5.0

func NewAMQPSubscriberHandler(sub template.Subscriber, box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *AmqpSubscriberHandler

func (*AmqpSubscriberHandler) Update added in v0.5.0

func (s *AmqpSubscriberHandler) Update() error

type BaseGenerator

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

func (*BaseGenerator) GenerateFile

func (g *BaseGenerator) GenerateFile(box packr.Box) error

func (*BaseGenerator) GenerateFull

func (g *BaseGenerator) GenerateFull() error

func (*BaseGenerator) TargetExists

func (g *BaseGenerator) TargetExists() bool

func (*BaseGenerator) TargetPath

func (g *BaseGenerator) TargetPath() string

type CmdMain

type CmdMain struct {
	BaseGenerator
}

func NewCmdMain

func NewCmdMain(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *CmdMain

func (*CmdMain) Update

func (s *CmdMain) Update() error

Update will call GenerateFull. The cmd/main.go cannot be updated.

type EndpointSet

type EndpointSet struct {
	BaseGenerator
}

func NewEndpointSet

func NewEndpointSet(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *EndpointSet

func (*EndpointSet) Update

func (s *EndpointSet) Update() error

Update will call GenerateFull. The endpointSet cannot be updated.

type Endpoints

type Endpoints struct {
	BaseGenerator
}

func NewEndpoints

func NewEndpoints(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *Endpoints

func (*Endpoints) GenerateMissing

func (e *Endpoints) GenerateMissing() error

func (*Endpoints) Update

func (e *Endpoints) Update() error

type Generator

type Generator interface {
	GenerateFull() error
	Update() error
}

type GrpcEncodeDecode

type GrpcEncodeDecode struct {
	BaseGenerator
}

func NewGrpcEncodeDecode

func NewGrpcEncodeDecode(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *GrpcEncodeDecode

func (*GrpcEncodeDecode) GenerateMissing

func (r *GrpcEncodeDecode) GenerateMissing() error

func (*GrpcEncodeDecode) Update

func (r *GrpcEncodeDecode) Update() error

Update is disabled for this file, it will only proxy the call to GenerateFull()

type GrpcRequestResponse

type GrpcRequestResponse struct {
	BaseGenerator
}

func NewGrpcRequestResponse

func NewGrpcRequestResponse(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *GrpcRequestResponse

func (*GrpcRequestResponse) GenerateMissing

func (r *GrpcRequestResponse) GenerateMissing() error

GenerateMissing will generate all missing encode/decode functions and append them to the existing file

func (*GrpcRequestResponse) Update

func (r *GrpcRequestResponse) Update() error

Update is disabled for this file, it will only proxy the call to GenerateFull()

type GrpcServer

type GrpcServer struct {
	BaseGenerator
}

func NewGrpcServer

func NewGrpcServer(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *GrpcServer

func (*GrpcServer) Update

func (s *GrpcServer) Update() error

Update will call GenerateFull. The grpc/server cannot be updated.

type Implementation

type Implementation struct {
	BaseGenerator
}

func NewImplementation

func NewImplementation(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *Implementation

func (*Implementation) GenerateMissing

func (i *Implementation) GenerateMissing() error

func (*Implementation) Update

func (i *Implementation) Update() error

type LoggingMiddleware

type LoggingMiddleware struct {
	BaseGenerator
}

func NewLoggingMiddleware

func NewLoggingMiddleware(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *LoggingMiddleware

func (*LoggingMiddleware) GenerateMissing

func (i *LoggingMiddleware) GenerateMissing() error

func (*LoggingMiddleware) Update

func (i *LoggingMiddleware) Update() error

type Middleware

type Middleware struct {
	BaseGenerator
}

func NewMiddleware

func NewMiddleware(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *Middleware

func (*Middleware) Update

func (m *Middleware) Update() error

type Option

type Option func(*Options)

func Context

func Context(ctx template.Context) Option

func IsGoSource

func IsGoSource(isGoSource bool) Option

func Overwrite

func Overwrite(overwrite bool) Option

func TargetFile

func TargetFile(file string) Option

func Template

func Template(template string) Option

type Options

type Options struct {
	Template   string
	IsGoSource bool
	Context    template.Context
	TargetFile string
	Overwrite  bool
}

type Readme added in v0.5.0

type Readme struct {
	BaseGenerator
}

func NewReadme added in v0.5.0

func NewReadme(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *Readme

func (*Readme) Update added in v0.5.0

func (s *Readme) Update() error

type RequestResponse

type RequestResponse struct {
	BaseGenerator
}

func NewRequestResponse

func NewRequestResponse(box packr.Box, serviceInterface *types.Interface, ctx template.Context, options ...Option) *RequestResponse

func (*RequestResponse) Update

func (r *RequestResponse) Update() error

Update is disabled for this file, it will only proxy the call to GenerateFull()

Jump to

Keyboard shortcuts

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