Documentation
¶
Index ¶
- Variables
- func InstallModule()
- func JsConfigureServer(serverPort int, params libHttpServer.HttpServerStartParams) bool
- func JsGetHost(serverPort int, hostName string) *progpAPI.SharedResource
- func JsRequestCookie(resHttpRequest *progpAPI.SharedResource, cookieName string) (error, map[string]any)
- func JsRequestCookies(resHttpRequest *progpAPI.SharedResource) (error, map[string]map[string]any)
- func JsRequestHeaders(resHttpRequest *progpAPI.SharedResource) (error, map[string]string)
- func JsRequestHost(resHttpRequest *progpAPI.SharedResource) (error, string)
- func JsRequestIP(resHttpRequest *progpAPI.SharedResource) (error, string)
- func JsRequestMethod(resHttpRequest *progpAPI.SharedResource) (error, string)
- func JsRequestPath(resHttpRequest *progpAPI.SharedResource) (error, string)
- func JsRequestPostArgs(resHttpRequest *progpAPI.SharedResource) (error, map[string]any)
- func JsRequestQueryArgs(resHttpRequest *progpAPI.SharedResource) (error, map[string]string)
- func JsRequestReadFormFileAsync(resHttpRequest *progpAPI.SharedResource, fieldName string, fileOffset int, ...)
- func JsRequestRemainingSegments(resHttpRequest *progpAPI.SharedResource) (error, []string)
- func JsRequestSaveFormFileAsync(resHttpRequest *progpAPI.SharedResource, fieldName string, fileOffset int, ...)
- func JsRequestSetCookie(resHttpRequest *progpAPI.SharedResource, key string, value string, ...) error
- func JsRequestSetHeader(resHttpRequest *progpAPI.SharedResource, key string, value string) error
- func JsRequestURI(resHttpRequest *progpAPI.SharedResource) (error, string)
- func JsRequestWildcards(resHttpRequest *progpAPI.SharedResource) (error, []string)
- func JsReturnString(resHttpRequest *progpAPI.SharedResource, responseCode int, contentType string, ...) error
- func JsStartServer(serverPort int) error
- func JsVerbWithFunction(resHost *progpAPI.SharedResource, verb string, requestPath string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var NoResponseSendError = errors.New("no response send")
Functions ¶
func InstallModule ¶
func InstallModule()
func JsConfigureServer ¶
func JsConfigureServer(serverPort int, params libHttpServer.HttpServerStartParams) bool
JsConfigureServer configure a server designed by his port. It does nothing if the server is already started, but returns false if the configuration can't be applied.
func JsGetHost ¶
func JsGetHost(serverPort int, hostName string) *progpAPI.SharedResource
JsGetHost returns an HttpHost object from a port and a hostname.
func JsRequestCookie ¶
func JsRequestCookies ¶
func JsRequestHeaders ¶
func JsRequestHeaders(resHttpRequest *progpAPI.SharedResource) (error, map[string]string)
func JsRequestHost ¶
func JsRequestHost(resHttpRequest *progpAPI.SharedResource) (error, string)
func JsRequestIP ¶
func JsRequestIP(resHttpRequest *progpAPI.SharedResource) (error, string)
func JsRequestMethod ¶
func JsRequestMethod(resHttpRequest *progpAPI.SharedResource) (error, string)
func JsRequestPath ¶
func JsRequestPath(resHttpRequest *progpAPI.SharedResource) (error, string)
func JsRequestPostArgs ¶
func JsRequestPostArgs(resHttpRequest *progpAPI.SharedResource) (error, map[string]any)
func JsRequestQueryArgs ¶
func JsRequestQueryArgs(resHttpRequest *progpAPI.SharedResource) (error, map[string]string)
func JsRequestReadFormFileAsync ¶
func JsRequestReadFormFileAsync(resHttpRequest *progpAPI.SharedResource, fieldName string, fileOffset int, callback progpAPI.ScriptFunction)
func JsRequestRemainingSegments ¶
func JsRequestRemainingSegments(resHttpRequest *progpAPI.SharedResource) (error, []string)
func JsRequestSaveFormFileAsync ¶
func JsRequestSaveFormFileAsync(resHttpRequest *progpAPI.SharedResource, fieldName string, fileOffset int, saveFilePath string, callback progpAPI.ScriptFunction)
func JsRequestSetCookie ¶
func JsRequestSetCookie(resHttpRequest *progpAPI.SharedResource, key string, value string, options libHttpServer.HttpCookieOptions) error
func JsRequestSetHeader ¶
func JsRequestSetHeader(resHttpRequest *progpAPI.SharedResource, key string, value string) error
func JsRequestURI ¶
func JsRequestURI(resHttpRequest *progpAPI.SharedResource) (error, string)
func JsRequestWildcards ¶
func JsRequestWildcards(resHttpRequest *progpAPI.SharedResource) (error, []string)
func JsReturnString ¶
func JsReturnString(resHttpRequest *progpAPI.SharedResource, responseCode int, contentType string, responseText string) error
JsReturnString set the response to returns.
func JsStartServer ¶
JsStartServer starts the server designed by his port. This server must have been configured before, otherwise it uses the default configuration.
func JsVerbWithFunction ¶
func JsVerbWithFunction(resHost *progpAPI.SharedResource, verb string, requestPath string, callback progpAPI.ScriptFunction) error
JsVerbWithFunction bind a GET/POST/... call to a function inside a context. This function is executed when the GET request match.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.