webapp

package
v0.0.0-...-bd13ba8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

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 Args

type Args struct {
	Command string
}

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL