Documentation ¶
Index ¶
Constants ¶
View Source
const ( Prod = "prod" // 线上 Stage = "stage" // 预上线 Test = "test" // 测试 Dev = "dev" // 开发 )
app env type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { Env string `yaml:"env" env:"GINX_ENV"` LocalIP string `yaml:"-"` Hostname string `yaml:"-"` IdcName string `yaml:"-"` Name string `yaml:"name" env:"GINX_NAME"` Summary string `yaml:"summary" env:"GINX_SUMMARY"` HomeDir string `yaml:"home_dir" env:"GINX_HOME_DIR"` Mysql mysqlDbModel `yaml:"mysql_db"` Elastic elasticSearch `yaml:"elastic"` Redis redisConfig `yaml:"redis"` WebServerLog webServerLogConf `yaml:"web_server_log"` Log logConf `yaml:"log"` Grpc grpcConfig `yaml:"grpc"` HTTP httpConfig `yaml:"http"` HTTPS httpsConfig `yaml:"https"` ServerName []string `yaml:"server_name" env:"GINX_SERVER_NAME"` Task taskConfig `yaml:"task"` Tpl tpl `yaml:"tpl"` Auth auth `yaml:"auth"` Trace Trace `yaml:"trace"` PProf pprof `yaml:"pprof"` Metrics metrics `yaml:"metrics"` Cors cors `yaml:"cors"` APICallbackRegExp string `yaml:"api_callback_reg_exp"` }
Model app global config model.
func (Model) GetHTTPSCertFile ¶
GetHTTPSCertFile get project https cert file content.
func (Model) GetHTTPSKeyFile ¶
GetHTTPSKeyFile get https cert key file content.
type Trace ¶
type Trace struct { Enable bool `yaml:"enable" env:"GINX_TRACE_ENABLE"` AgentServer string `yaml:"agent_server" env:"GINX_TRACE_AGENT_SERVER"` Logger string `yaml:"logger" env:"GINX_TRACE_LOGGER"` SampleType string `yaml:"sample_type" env:"GINX_TRACE_SAMPLE_TYPE"` SampleParam float64 `yaml:"sample_param" env:"GINX_TRACE_SAMPLE_PARAM"` SkipPaths []string `yaml:"skip_paths" env:"GINX_TRACE_SKIP_PATHS"` }
Click to show internal directories.
Click to hide internal directories.