Documentation
¶
Index ¶
Constants ¶
const ( CmdUpdate = "update" CmdNew = "new" CmdModel = "model" CmdClient = "client" CmdClientSet = "clientset" )
cft Commands
const ( IdlThrift = "thrift" IdlProto = "proto" )
cft IDLs
const ( TpCompilerThrift = "thriftgo" TpCompilerProto = "protoc" )
Third-party Compilers
const ( ProtocPluginName = "protoc-gen-crafter" ThriftPluginName = "thrift-gen-crafter" )
cft Plugins
const ( LoadError = 1 GenerateLayoutError = 2 PersistError = 3 PluginError = 4 )
cft Errors
const ( ModelDir = "biz/model" RouterDir = "biz/router" HandlerDir = "biz/handler" )
Package Dir
const AddThriftReplace = "do not generate 'go.mod', please add 'replace github.com/apache/thrift => github.com/apache/thrift v0.13.0' to your 'go.mod'"
const DefaultServiceName = "crafter_service"
const EnvPluginMode = "CRAFTER_PLUGIN_MODE"
const ManifestFile = ".cft"
const (
SetBodyParam = "SetBodyParam(req).\n"
)
template const value
const SysType = runtime.GOOS
SysType is the running program's operating system type
const TheUseOptionMessage = "'model code' is not generated due to the '-use' option"
TheUseOptionMessage indicates that the generating of 'model code' is aborted due to the -use option for thrift IDL.
const Version = "v0.0.1"
Version cft version
const WindowsOS = "windows"
Variables ¶
var GoVersion *gv.Version
Functions ¶
This section is empty.
Types ¶
type GeneratedJSON ¶
type GeneratedJSON struct {
ServiceGroup string `json:"serviceGroup"`
Module string `json:"module"`
Clients []string `json:"clients"`
}
func LoadGeneratedJson ¶
func LoadGeneratedJson(filename string, generatedJson *GeneratedJSON) (*GeneratedJSON, error)