Documentation ¶
Index ¶
- Constants
- Variables
- func SetEnvDesc(env int, key, desc string) bool
- type AppConfig
- type Application
- type CmdFunc
- type Component
- type Service
- type TestCmdService
- func (c *TestCmdService) AddCmdHandle(name string, handle CmdFunc) *TestCmdService
- func (c *TestCmdService) CliFlags() []cli.Flag
- func (c *TestCmdService) Close()
- func (c *TestCmdService) Init(cfg *AppConfig, _ *cli.Context) (logger.Interface, error)
- func (c *TestCmdService) Run(l logger.Interface, _ *AppConfig) error
- type TestWebService
- type WebConfig
Constants ¶
View Source
const ( EnvDev = 0 // 本地 EnvTest = 1 // 测试 EnvPrev = 2 // 预发布 EnvProd = 3 // 线上 CliAppEnv = "app-env" CliAppVer = "app-version" CliAppLogMore = "app-log-more" )
View Source
const ( CliWebIP = "web-ip" CliWebPort = "web-port" CliWebReadTimeout = "web-r-timeout" CliWebWriteTimeout = "web-w-timeout" CliWebIdleTimeout = "web-idle-timeout" )
View Source
const (
CliAppCmd = "app-cmd"
)
Variables ¶
View Source
var (
AppCmdNoFind = errors.New(" Command No Find")
)
View Source
var (
EnvVersion = "1.0.0"
)
Functions ¶
func SetEnvDesc ¶ added in v0.1.2
Types ¶
type Application ¶ added in v0.2.0
type Application struct { Component map[string]Component Log logger.Interface Cfg AppConfig Ser Service }
func (*Application) Start ¶ added in v0.2.0
func (app *Application) Start(cmd *cli.App, args []string, service Service)
type TestCmdService ¶ added in v0.2.0
func (*TestCmdService) AddCmdHandle ¶ added in v0.2.0
func (c *TestCmdService) AddCmdHandle(name string, handle CmdFunc) *TestCmdService
func (*TestCmdService) CliFlags ¶ added in v0.2.0
func (c *TestCmdService) CliFlags() []cli.Flag
func (*TestCmdService) Close ¶ added in v0.2.0
func (c *TestCmdService) Close()
type TestWebService ¶ added in v0.2.0
func (*TestWebService) CliFlags ¶ added in v0.2.0
func (c *TestWebService) CliFlags() []cli.Flag
func (*TestWebService) Close ¶ added in v0.2.0
func (c *TestWebService) Close()
Click to show internal directories.
Click to hide internal directories.