Documentation
¶
Index ¶
- Variables
- func AddAPIFunc(pathAPI string, handler func(rep *global.Request) *jsons.JSONObject)
- func AddModuleFunc(pathTag string, ...)
- func AddSocketFunc(pathSocket string, handler func(rep *global.Request, ws *websocket.Conn))
- func FlushSession(rep *global.Request)
- func GetPathExt(path string) string
- func Index(rep *global.Request)
- func InitGet(rep *global.Request)
- func InitPost(rep *global.Request)
- func InitPostMultipart(rep *global.Request)
- func InitSession(rep *global.Request) string
- func Listen(port int)
- func ModuleTagMap(rep *global.Request, buffer string) string
- func ModuleTagRender(pathTag string, rep *global.Request, params *jsons.JSONObject) string
- func NewRequest(w http.ResponseWriter, r *http.Request) *global.Request
- func Process(rep *global.Request)
- func SetMimeType(rep *global.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomSessionIDHandler interface{} = func(rep *global.Request) { txtUUID, err := uuid.NewV4() if golog.Error(err, true) { txtUUID = hash.SHA256([]byte(fmt.Sprint(time.Now().Unix()))) } rep.SessionID = txtUUID }
CustomSessionIDHandler is custom session id for all request
View Source
var FilterHandler interface{} = func(rep *global.Request) bool { return true }
View Source
var LoadSessionHandler interface{} = func(rep *global.Request) { filename := fmt.Sprint(rep.SessionID, ".session") pathfile := fmt.Sprint(utility.GetAppDir(), global.DS, "sessions", global.DS, filename) rep.SESSION.FromFile(pathfile) }
LoadSessionHandler is start session of all request
View Source
var SaveSessionHandler interface{} = func(rep *global.Request) { filename := fmt.Sprint(rep.SessionID, ".session") pathfile := fmt.Sprint(utility.GetAppDir(), global.DS, "sessions", global.DS, filename) rep.SESSION.ToFile(pathfile) }
SaveSessionHandler is flush session of all request
Functions ¶
func AddAPIFunc ¶ added in v0.0.8
func AddAPIFunc(pathAPI string, handler func(rep *global.Request) *jsons.JSONObject)
AddAPIFunc is add api function
func AddModuleFunc ¶ added in v0.0.9
func AddModuleFunc(pathTag string, handler func(rep *global.Request, params *jsons.JSONObject) string)
AddModuleFunc is add tag function
func AddSocketFunc ¶ added in v0.0.8
AddSocketFunc is add socket function
func InitPostMultipart ¶ added in v0.2.0
InitPostMultipart is load post multipart form for api
func ModuleTagMap ¶ added in v0.0.9
ModuleTagMap is change tag in file to system info
func ModuleTagRender ¶ added in v0.0.9
ModuleTagRender is add tag function
func NewRequest ¶ added in v0.0.6
func SetMimeType ¶
SetMimeType is set header type for response
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.