Versions in this module Expand all Collapse all v2 v2.1.0 Dec 11, 2025 Changes in this version + var DefaultProcessTimeout time.Duration = time.Second * 10 + var DefaultReadTimeout time.Duration = time.Second * 10 + var DefaultWriteTimeout time.Duration = time.Second * 10 + type CORSHeader struct + AllowCORSHeader map[string][]string + func NewAllowCORSHeader() *CORSHeader + func (slf *CORSHeader) AddAllowHeader(key string, val string) + type HTTP_METHOD int + const METHOD_GET + const METHOD_INVALID + const METHOD_NONE + const METHOD_POST + type HttpFiltrate func(session *HttpSession) bool + type HttpHandle func(session *HttpSession) + type HttpRedirectData struct + CookieList []*http.Cookie + Url string + type HttpRouter struct + func (slf *HttpRouter) AddHttpFiltrate(FiltrateFun HttpFiltrate) bool + func (slf *HttpRouter) GET(url string, handle HttpHandle) bool + func (slf *HttpRouter) GetFormFileKey() string + func (slf *HttpRouter) POST(url string, handle HttpHandle) bool + func (slf *HttpRouter) Router(session *HttpSession) + func (slf *HttpRouter) SetFormFileKey(formFileKey string) + func (slf *HttpRouter) SetServeFile(method HTTP_METHOD, urlPath string, dirname string) error + type HttpService struct + func (httpService *HttpService) AddFiltrate(FiltrateFun HttpFiltrate) bool + func (httpService *HttpService) HttpEventHandler(ev event.IEvent) + func (httpService *HttpService) OnInit() error + func (httpService *HttpService) ProcessFile(session *HttpSession) + func (httpService *HttpService) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (httpService *HttpService) SetAllowCORS(corsHeader *CORSHeader) + func (httpService *HttpService) SetHttpRouter(httpRouter IHttpRouter, eventHandler event.IEventHandler) + func (httpService *HttpService) StartListen() + type HttpSession struct + func (slf *HttpSession) AddHeader(key, value string) + func (slf *HttpSession) DelHeader(key string) + func (slf *HttpSession) Done() + func (slf *HttpSession) GetBody() []byte + func (slf *HttpSession) GetHeader(key string) string + func (slf *HttpSession) GetMethod() HTTP_METHOD + func (slf *HttpSession) GetPath() string + func (slf *HttpSession) GetRawQuery() string + func (slf *HttpSession) Handle() + func (slf *HttpSession) Query(key string) (string, bool) + func (slf *HttpSession) Redirect(url string, cookieList []*http.Cookie) + func (slf *HttpSession) SetHeader(key, value string) + func (slf *HttpSession) Write(msg []byte) + func (slf *HttpSession) WriteJsonDone(statusCode int, msgJson interface{}) error + func (slf *HttpSession) WriteStatusCode(statusCode int) + type IHttpRouter interface + AddHttpFiltrate func(FiltrateFun HttpFiltrate) bool + GET func(url string, handle HttpHandle) bool + GetFormFileKey func() string + POST func(url string, handle HttpHandle) bool + Router func(session *HttpSession) + SetFormFileKey func(formFileKey string) + SetServeFile func(method HTTP_METHOD, urlPath string, dirname string) error + func NewHttpHttpRouter() IHttpRouter