Documentation ¶
Index ¶
- func GetOrm() *persistence.OrmContext
- func RecordRequest(costTime time.Duration)
- type Application
- type ApplicationBuilder
- func (h *ApplicationBuilder) ComponentAfter(component func(context.Context) (err error)) *ApplicationBuilder
- func (h *ApplicationBuilder) ComponentBefore(component func(context.Context) (err error)) *ApplicationBuilder
- func (h *ApplicationBuilder) EnableDatabase(config persistence.BaseConfig, models ...interface{}) *ApplicationBuilder
- func (h *ApplicationBuilder) EnableStaticWeb(vdir, home string, assetInfo func(name string) (os.FileInfo, error), ...) *ApplicationBuilder
- func (h *ApplicationBuilder) EnableWeb(listen string, components ...server.Component) *ApplicationBuilder
- func (h *ApplicationBuilder) LoadConfig(config interface{}, callback func(etc.Loader)) (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 interface {
Start(buildHandler func(ctx context.Context, builder *ApplicationBuilder) error, onTerminate func(string)) error
}
func New ¶
func New() (instance Application)
type ApplicationBuilder ¶ added in v1.2.1
type ApplicationBuilder struct {
// contains filtered or unexported fields
}
func (*ApplicationBuilder) ComponentAfter ¶ added in v1.2.1
func (h *ApplicationBuilder) ComponentAfter(component func(context.Context) (err error)) *ApplicationBuilder
func (*ApplicationBuilder) ComponentBefore ¶ added in v1.2.1
func (h *ApplicationBuilder) ComponentBefore(component func(context.Context) (err error)) *ApplicationBuilder
func (*ApplicationBuilder) EnableDatabase ¶ added in v1.2.1
func (h *ApplicationBuilder) EnableDatabase(config persistence.BaseConfig, models ...interface{}) *ApplicationBuilder
func (*ApplicationBuilder) EnableStaticWeb ¶ added in v1.2.1
func (*ApplicationBuilder) EnableWeb ¶ added in v1.2.1
func (h *ApplicationBuilder) EnableWeb(listen string, components ...server.Component) *ApplicationBuilder
func (*ApplicationBuilder) LoadConfig ¶ added in v1.2.1
func (h *ApplicationBuilder) LoadConfig(config interface{}, callback func(etc.Loader)) (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.