Documentation ¶
Index ¶
- func GetOrm() *persistence.OrmContext
- func GetServer()
- func RecordRequest(costTime time.Duration)
- type Application
- func (h *Application) ComponentAfter(component func(context.Context) (err error)) *Application
- func (h *Application) ComponentBefore(component func(context.Context) (err error)) *Application
- func (h *Application) EnableDatabase(config persistence.BaseConfig, models ...interface{}) *Application
- func (h *Application) EnableStaticWeb(home string, asset func(string) ([]byte, error), assetNames func() []string) *Application
- func (h *Application) EnableWeb(listen string, components ...server.Component) *Application
- func (h *Application) LoadConfig(config interface{}, name string, path ...string) error
- func (h *Application) Start() (err error)
- type M
- type Monitor
- type Pager
- type PagerResponse
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordRequest ¶ added in v1.1.6
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context) (instance *Application)
func (*Application) ComponentAfter ¶ added in v1.1.6
func (h *Application) ComponentAfter(component func(context.Context) (err error)) *Application
func (*Application) ComponentBefore ¶ added in v1.1.6
func (h *Application) ComponentBefore(component func(context.Context) (err error)) *Application
func (*Application) EnableDatabase ¶
func (h *Application) EnableDatabase(config persistence.BaseConfig, models ...interface{}) *Application
func (*Application) EnableStaticWeb ¶ added in v1.0.2
func (h *Application) EnableStaticWeb(home string, asset func(string) ([]byte, error), assetNames func() []string) *Application
func (*Application) EnableWeb ¶
func (h *Application) EnableWeb(listen string, components ...server.Component) *Application
func (*Application) LoadConfig ¶
func (h *Application) LoadConfig(config interface{}, name string, path ...string) error
func (*Application) Start ¶
func (h *Application) Start() (err error)
type Monitor ¶ added in v1.1.6
type PagerResponse ¶ added in v1.1.3
type Response ¶ added in v1.1.3
type Response struct { Code interface{} `json:"code,omitempty"` Success interface{} `json:"success,omitempty"` Message string `json:"message,omitempty"` }
func (*Response) SetSuccess ¶ added in v1.1.3
Source Files ¶
Click to show internal directories.
Click to hide internal directories.