Documentation ¶
Index ¶
- func GetCache() (c cache.C)
- func GetOrm() *persistence.OrmContext
- 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) EnableCache(redisOpts cache.RedisOptions, cacheOpts cache.Options) *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) HealthyHandler(handler func() int) *ApplicationBuilder
- func (h *ApplicationBuilder) LoadConfig(config interface{}, callback func(etc.Loader)) (err error)
- func (h *ApplicationBuilder) ReadyHandler(handler func() int) *ApplicationBuilder
- func (h *ApplicationBuilder) SetMonitorPrefix(prefix string) *ApplicationBuilder
- func (h *ApplicationBuilder) SetWebLogLevel(lvl string) *ApplicationBuilder
- type Pager
- type PagerResponse
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) EnableCache ¶ added in v1.4.0
func (h *ApplicationBuilder) EnableCache(redisOpts cache.RedisOptions, cacheOpts cache.Options) *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) HealthyHandler ¶ added in v1.5.0
func (h *ApplicationBuilder) HealthyHandler(handler func() int) *ApplicationBuilder
func (*ApplicationBuilder) LoadConfig ¶ added in v1.2.1
func (h *ApplicationBuilder) LoadConfig(config interface{}, callback func(etc.Loader)) (err error)
func (*ApplicationBuilder) ReadyHandler ¶ added in v1.5.0
func (h *ApplicationBuilder) ReadyHandler(handler func() int) *ApplicationBuilder
func (*ApplicationBuilder) SetMonitorPrefix ¶ added in v1.5.0
func (h *ApplicationBuilder) SetMonitorPrefix(prefix string) *ApplicationBuilder
func (*ApplicationBuilder) SetWebLogLevel ¶ added in v1.3.3
func (h *ApplicationBuilder) SetWebLogLevel(lvl string) *ApplicationBuilder
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.