Documentation
¶
Index ¶
- Variables
- func InstallModule()
- func JsConfigureServer(serverPort int, params httpServer.StartParams) bool
- func JsGetHost(rc *progpAPI.SharedResourceContainer, 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(rc *progpAPI.SharedResourceContainer, serverPort int) error
- func JsVerbWithFunction(rc *progpAPI.SharedResourceContainer, resHost *progpAPI.SharedResource, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var NoResponseSendError = errors.New("no response send")
Functions ¶
func InstallModule ¶
func InstallModule()
func JsConfigureServer ¶
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(rc *progpAPI.SharedResourceContainer, serverPort int, hostName string) *progpAPI.SharedResource
JsGetHost returns an HttpHost object from a port and a hostname.
func JsRequestCookie ¶
func JsRequestCookies ¶
func JsRequestHeaders ¶
func JsRequestHost ¶
func JsRequestIP ¶
func JsRequestMethod ¶
func JsRequestPath ¶
func JsRequestPostArgs ¶
func JsRequestQueryArgs ¶
func JsRequestSetCookie ¶
func JsRequestSetHeader ¶
func JsRequestURI ¶
func JsRequestWildcards ¶
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(rc *progpAPI.SharedResourceContainer, resHost *progpAPI.SharedResource, verb string, requestPath string, callback progpAPI.JsFunction) 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.