Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cfg ¶
func Cfg() *cfg.ServerConfiguration
func DevelopmentMode ¶
func DevelopmentMode() bool
func Environment ¶
func ReloadConfig ¶
func ReloadConfig()
Types ¶
type Application ¶
type Application struct { Name string Desc string Version version.Info Mode mode.AppMode // 用于加载不同环境变量和配置文件 Port int DebugLog bool VerboseLog bool // contains filtered or unexported fields }
func New ¶
func New(name string, desc string) *Application
func (*Application) AddBoot ¶
func (a *Application) AddBoot(fn BootFunc)
func (*Application) AddBoots ¶
func (a *Application) AddBoots(boots ...Bootstrapper)
func (*Application) Route ¶
func (a *Application) Route(fn RouteFunc)
func (*Application) Run ¶
func (a *Application) Run(arguments []string) (err error)
func (*Application) SetConfigPath ¶
func (a *Application) SetConfigPath(path string)
type Bootstrapper ¶
type Bootstrapper interface { // Name() string Boot() error }
type Launcher ¶
type Launcher struct {
Boots []Bootstrapper
}
func (*Launcher) Add ¶
func (l *Launcher) Add(boots ...Bootstrapper)
func (*Launcher) Prepend ¶
func (l *Launcher) Prepend(boots ...Bootstrapper)
Click to show internal directories.
Click to hide internal directories.