capsulehttp

package
v0.0.0-...-d76bbf2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FiberServe

func FiberServe(httpPort string, wasmFileModule []byte, crt, key string)

func GetBodyAndHeaders

func GetBodyAndHeaders(bytes []byte, c *fiber.Ctx) (body string, headers map[string]string)

func GetBodyString

func GetBodyString(str string) string

func GetContentType

func GetContentType(headers map[string]string) string

func GetHeadersMapFromString

func GetHeadersMapFromString(headersStr string) map[string]string

func GetReloadTokenFromHeadersRequest

func GetReloadTokenFromHeadersRequest(c *fiber.Ctx) string

func IsBodyString

func IsBodyString(str string) bool

func IsHtmlContentType

func IsHtmlContentType(headers map[string]string) bool

IsHtmlContentType : Content-Type: text/html; charset=UTF-8

func IsJsonArray

func IsJsonArray(str string) bool

func IsJsonContentType

func IsJsonContentType(headers map[string]string) bool

func IsTxtContentType

func IsTxtContentType(headers map[string]string) bool

IsTxtContentType : Content-Type: text/plain; charset=UTF-8

func SendErrorMessage

func SendErrorMessage(str string, headers map[string]string, c *fiber.Ctx) error

func SendJsonMessage

func SendJsonMessage(str string, headers map[string]string, c *fiber.Ctx) error

Types

type RemoteWasmModule

type RemoteWasmModule struct {
	Url  string `json:"url"`
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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