Documentation
¶
Index ¶
Constants ¶
View Source
const ( KeyTemplateRootDir = "TEMPLATES_ROOT_DIR" KeyTargetRootPath = "TARGET_ROOT_PATH" KeyModulePrefix = "MODULE_PREFIX" KeyOnceFiles = "ONCE_FILES" KeyThirdPartyProtoPath = "THIRD_PARTY_PROTO_PATH" KeyProtoCentralRepoPath = "PROTO_CENTRAL_REPO_PATH" // Store proto files centrally in one repository KeyDefaultServiceGroup = "DEFAULT_SERVICE_GROUP" KeyDbDSN = "DB_DSN" KeySvcGroupInitPortMap = "SVC_GROUP_INIT_PORT_MAP" KeySvcPortInterval = "SVC_PORT_INTERVAL" // Port interval between services KeyEnableAssignPort = "ENABLE_ALLOC_PORT" KeySvcGroupInitErrcodeMap = "SVC_GROUP_INIT_ERRCODE_MAP" KeySvcErrcodeInterval = "SVC_ERRCODE_INTERVAL" // Errcode range of the service KeyEnableAssignErrcode = "ENABLE_ALLOC_ERRCODE" )
Variables ¶
View Source
var ( DbDSN string EnableAssignPort bool SvcPortInterval int SvcGroupInitPortMap map[string]interface{} EnableAssignErrcode bool SvcErrcodeInterval int SvcGroupInitErrcodeMap map[string]interface{} DefaultSvcGroup string TmplRootDir string TmplConfigFile *TemplateConfigFile GoModulePrefix string TargetRootPath string OnceFiles []string ThirdPartyProtoPath []string ProtoCentralRepoPath string )
Functions ¶
func GetHomeDir ¶
func GetHomeDir() string
func InitGlobalVar ¶
func InitGlobalVar() error
func PrintImportantVars ¶
func PrintImportantVars()
func SetDefaults ¶
func SetDefaults()
Types ¶
type TemplateConfigFile ¶
type TemplateConfigFile struct {
Target struct {
RelativeDir struct {
Proto []string `yaml:"proto"`
Client []string `yaml:"client"`
Server []string `yaml:"server"`
} `yaml:"relativeDir"`
} `yaml:"target"`
Template struct {
FilesFormatSuffix string `yaml:"filesFormatSuffix"`
ProtoFilename string `yaml:"protoFilename"`
RelativeDir struct {
Proto []string `yaml:"proto"`
Client []string `yaml:"client"`
Server []string `yaml:"server"`
} `yaml:"relativeDir"`
} `yaml:"template"`
}
Click to show internal directories.
Click to hide internal directories.