Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParamPaths = `paths` ParamPathsSourceRelative = `source_relative` ParamEmbedSwagger = `embed_swagger` ParamChaincodeMethodServicePrefix = `service_name_method_prefix` ParamServiceChaincodeResolver = `service_resolver` )
Variables ¶
View Source
var (
ErrNoTargetService = errors.New("no target service defined in the file")
)
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { Opts Opts // contains filtered or unexported fields }
func New ¶
func New(reg *descriptor.Registry) *Generator
New returns a new generator which generates handler wrappers.
func (*Generator) Generate ¶
func (g *Generator) Generate(targets []*descriptor.File) ([]*plugin.CodeGeneratorResponse_File, error)
type Opts ¶
type Opts struct { PathsSourceRelative bool EmbedSwagger bool // generate var with embed annotation to include generated swagger fie ChaincodeMethodServicePrefix bool // add prefix with service name to chaincode methdod ServiceChaincodeResolver bool }
Opts by default all opts are disabled
func OptsFromParams ¶
type TemplateParams ¶
type TemplateParams struct { *descriptor.File Imports []descriptor.GoPackage Opts Opts }
Click to show internal directories.
Click to hide internal directories.