Documentation
¶
Index ¶
- func BuildPluginCmd(opt *Option) (*exec.Cmd, error)
- func IdlTypeToCompiler(idlType string) (string, error)
- type Option
- func (arg *Option) Fork() *Option
- func (arg *Option) GetClientDir() (string, error)
- func (arg *Option) GetGoPackage() (string, error)
- func (arg *Option) GetHandlerDir() (string, error)
- func (arg *Option) GetModelDir() (string, error)
- func (arg *Option) GetRouterDir() (string, error)
- func (opt *Option) GetThriftgoOptions() (string, error)
- func (arg *Option) InitManifest(m *meta.Manifest)
- func (arg *Option) IsNew() bool
- func (arg *Option) IsUpdate() bool
- func (arg *Option) ModelOutDir() string
- func (arg *Option) ModelPackagePrefix() (string, error)
- func (arg *Option) Pack() ([]string, error)
- func (arg *Option) Parse(c *cli.Context, cmd string) (*Option, error)
- func (arg *Option) Unpack(data []string) error
- func (arg *Option) UpdateByManifest(m *meta.Manifest)
- func (arg *Option) UpdateManifest(m *meta.Manifest)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdlTypeToCompiler ¶
Types ¶
type Option ¶
type Option struct {
// Mode meta.Mode // operating mode(0-compiler, 1-plugin)
ServiceGroup string
CmdType string // command type
Verbose bool // print verbose log
Cwd string // execution path
OutDir string // output path
HandlerDir string // handler path
ModelDir string // model path
RouterDir string // router path
ClientDir string // client path
BaseDomain string // request domain
ForceClientDir string // client dir (not use namespace as a subpath)
IdlType string // idl type
IdlPaths []string // master idl path
RawOptPkg []string // user-specified package import path
OptPkgMap map[string]string
Includes []string
PkgPrefix string
TrimGoPackage string // trim go_package for protobuf, avoid to generate multiple directory
Gopath string // $GOPATH
Gosrc string // $GOPATH/src
Gomod string
Gopkg string // $GOPATH/src/{{gopkg}}
ServiceName string // service name
Use string
NeedGoMod bool
JSONEnumStr bool
QueryEnumAsInt bool
UnsetOmitempty bool
ProtobufCamelJSONTag bool
ProtocOptions []string // options to pass through to protoc
ThriftOptions []string // options to pass through to thriftgo for go flag
ProtobufPlugins []string
ThriftPlugins []string
SnakeName bool
RmTags []string
Excludes []string
NoRecurse bool
HandlerByMethod bool
ForceNew bool
ForceUpdateClient bool
SnakeStyleMiddleware bool
EnableExtends bool
SortRouter bool
CustomizeLayout string
CustomizeLayoutData string
CustomizePackage string
ModelBackend string
}
func (*Option) GetClientDir ¶
func (*Option) GetGoPackage ¶
func (*Option) GetHandlerDir ¶
func (*Option) GetModelDir ¶
func (*Option) GetRouterDir ¶
func (*Option) GetThriftgoOptions ¶
func (*Option) InitManifest ¶
func (*Option) ModelOutDir ¶
func (*Option) ModelPackagePrefix ¶
func (*Option) UpdateByManifest ¶
func (*Option) UpdateManifest ¶
Click to show internal directories.
Click to hide internal directories.