Documentation ¶
Index ¶
- Constants
- Variables
- func InitDefaultConvertFunction(appContext *appcontext.AppContext)
- func InitRequestAndResponseAppContext(request *webhttp.HttpRequest, response *webhttp.HttpResponse) *appcontext.AppContext
- func MergeMapInterceptorFuncMap(dest map[string]interceptor.InterceptorFunc, ...)
- func MergeMapSessionProviderMap(dest map[string]session.SessionProvider, ...)
- func MergeMapTemplateFuncMap(dest template.TemplateFuncMap, src template.TemplateFuncMap)
- func StartCommanListener(web *WebApplication)
- type Args
- type CommandInterface
- type ConfigMap
- type WebApplication
- func (web *WebApplication) AddAutoRoute(urlPattern string, controller controller.ControllerMethod, form interface{})
- func (web *WebApplication) AddAutoRouteWithViewPath(urlPattern string, controller controller.ControllerMethod, form interface{}, ...)
- func (web *WebApplication) AddRoute(urlPattern string, controller controller.ControllerMethod, method string, ...)
- func (web *WebApplication) AddRouteWithViewPath(urlPattern string, controller controller.ControllerMethod, method string, ...)
- func (web *WebApplication) Addinterceptor(interceptorfunc interceptor.InterceptorFunc, interceptorType interceptorType)
- func (web *WebApplication) GetDBByName(dbname string) *moudle.Moudle
- func (web *WebApplication) GetDefaultDB() *moudle.Moudle
- func (web *WebApplication) InitDB()
- func (web *WebApplication) ReStart()
- func (web *WebApplication) SetTemplateWorkDictionary(folerpath string)
- func (web *WebApplication) Start()
- func (web *WebApplication) StartForever()
- func (web *WebApplication) Stop()
Constants ¶
View Source
const ( STOP_COMMAND = "stop" RESTART_COMMAND = "restart" )
View Source
const ( Beforeinterceptor interceptorType = iota Afterinterceptor )
Variables ¶
View Source
var Default_TimeOut int = 180
Functions ¶
func InitDefaultConvertFunction ¶
func InitDefaultConvertFunction(appContext *appcontext.AppContext)
func InitRequestAndResponseAppContext ¶
func InitRequestAndResponseAppContext(request *webhttp.HttpRequest, response *webhttp.HttpResponse) *appcontext.AppContext
func MergeMapInterceptorFuncMap ¶
func MergeMapInterceptorFuncMap(dest map[string]interceptor.InterceptorFunc, src map[string]interceptor.InterceptorFunc)
func MergeMapSessionProviderMap ¶
func MergeMapSessionProviderMap(dest map[string]session.SessionProvider, src map[string]session.SessionProvider)
func MergeMapTemplateFuncMap ¶
func MergeMapTemplateFuncMap(dest template.TemplateFuncMap, src template.TemplateFuncMap)
func StartCommanListener ¶
func StartCommanListener(web *WebApplication)
Types ¶
type CommandInterface ¶
type CommandInterface struct {
// contains filtered or unexported fields
}
func (*CommandInterface) SendCommand ¶
func (t *CommandInterface) SendCommand(cmd *Args, reply *int) error
type ConfigMap ¶
type ConfigMap struct { InterceptoFuncmap map[string]interceptor.InterceptorFunc Sessionprovidermap map[string]session.SessionProvider Templatefuncmap template.TemplateFuncMap }
type WebApplication ¶
type WebApplication struct { WorkProcess *process.WorkProcess RouteProcess *route.RouteProcess AppContext *appcontext.AppContext IsStart bool InitAppContext *appcontext.AppContext InitConfigMap ConfigMap // contains filtered or unexported fields }
func New ¶
func New(appContext *appcontext.AppContext, configMap ConfigMap) *WebApplication
func (*WebApplication) AddAutoRoute ¶
func (web *WebApplication) AddAutoRoute(urlPattern string, controller controller.ControllerMethod, form interface{})
func (*WebApplication) AddAutoRouteWithViewPath ¶
func (web *WebApplication) AddAutoRouteWithViewPath(urlPattern string, controller controller.ControllerMethod, form interface{}, viewPath string)
func (*WebApplication) AddRoute ¶
func (web *WebApplication) AddRoute(urlPattern string, controller controller.ControllerMethod, method string, form interface{})
func (*WebApplication) AddRouteWithViewPath ¶
func (web *WebApplication) AddRouteWithViewPath(urlPattern string, controller controller.ControllerMethod, method string, form interface{}, viewPath string)
func (*WebApplication) Addinterceptor ¶
func (web *WebApplication) Addinterceptor(interceptorfunc interceptor.InterceptorFunc, interceptorType interceptorType)
func (*WebApplication) GetDBByName ¶
func (web *WebApplication) GetDBByName(dbname string) *moudle.Moudle
func (*WebApplication) GetDefaultDB ¶
func (web *WebApplication) GetDefaultDB() *moudle.Moudle
func (*WebApplication) InitDB ¶
func (web *WebApplication) InitDB()
func (*WebApplication) ReStart ¶
func (web *WebApplication) ReStart()
func (*WebApplication) SetTemplateWorkDictionary ¶
func (web *WebApplication) SetTemplateWorkDictionary(folerpath string)
func (*WebApplication) Start ¶
func (web *WebApplication) Start()
func (*WebApplication) StartForever ¶
func (web *WebApplication) StartForever()
func (*WebApplication) Stop ¶
func (web *WebApplication) Stop()
Click to show internal directories.
Click to hide internal directories.