Documentation
¶
Index ¶
- Constants
- func CSRFCookie(event *events.APIGatewayProxyRequest) string
- func CSRFCookie2(event *events.APIGatewayV2HTTPRequest) string
- func Cookie(headers map[string][]string, name string) *http.Cookie
- func Cookie2(cookies []string, name string) *http.Cookie
- func Cookies(headers map[string][]string) []*http.Cookie
- func Cookies2(cookies []string) []*http.Cookie
- func ErrorResponse(err error) (*events.APIGatewayProxyResponse, error)
- func ErrorResponse2(err error) (*events.APIGatewayV2HTTPResponse, error)
- func ErrorResponseJSON(statusCode int, err error) (*events.APIGatewayProxyResponse, error)
- func ErrorResponseJSON2(statusCode int, err error) (*events.APIGatewayV2HTTPResponse, error)
- func EventBody(event *events.APIGatewayProxyRequest) (string, error)
- func EventBody2(event *events.APIGatewayV2HTTPRequest) (string, error)
- func EventBodyBuffer(event *events.APIGatewayProxyRequest) (*bytes.Buffer, error)
- func EventBodyBuffer2(event *events.APIGatewayV2HTTPRequest) (*bytes.Buffer, error)
- func Location(event *events.APIGatewayV2HTTPRequest, query url.Values) string
- func PreventCSRF(body url.Values, event *events.APIGatewayProxyRequest) error
- func PreventCSRF2(body url.Values, event *events.APIGatewayV2HTTPRequest) error
- func RenderHTML(html string, v interface{}) (string, error)
- func SingleToMultiValue(m map[string]string) url.Values
- func Static(contentType, body string) (*events.APIGatewayV2HTTPResponse, error)
- func StaticHandler(contentType, body string) ...
- type CSRFError
Constants ¶
View Source
const ( CookieName = "csrf" FieldName = "csrf" )
Variables ¶
This section is empty.
Functions ¶
func CSRFCookie ¶
func CSRFCookie(event *events.APIGatewayProxyRequest) string
func CSRFCookie2 ¶
func CSRFCookie2(event *events.APIGatewayV2HTTPRequest) string
func ErrorResponse ¶
func ErrorResponse(err error) (*events.APIGatewayProxyResponse, error)
func ErrorResponse2 ¶
func ErrorResponse2(err error) (*events.APIGatewayV2HTTPResponse, error)
func ErrorResponseJSON ¶
func ErrorResponseJSON(statusCode int, err error) (*events.APIGatewayProxyResponse, error)
func ErrorResponseJSON2 ¶
func ErrorResponseJSON2(statusCode int, err error) (*events.APIGatewayV2HTTPResponse, error)
func EventBody2 ¶
func EventBody2(event *events.APIGatewayV2HTTPRequest) (string, error)
func EventBodyBuffer ¶
func EventBodyBuffer(event *events.APIGatewayProxyRequest) (*bytes.Buffer, error)
func EventBodyBuffer2 ¶
func EventBodyBuffer2(event *events.APIGatewayV2HTTPRequest) (*bytes.Buffer, error)
func PreventCSRF ¶
func PreventCSRF(body url.Values, event *events.APIGatewayProxyRequest) error
func PreventCSRF2 ¶
func PreventCSRF2(body url.Values, event *events.APIGatewayV2HTTPRequest) error
func RenderHTML ¶
func SingleToMultiValue ¶
SingleToMultiValue takes the API Gateway-provided map[string]string representations of headers, query string parameters, etc. and turns them into url.Values (which is a map[string][]string with more methods) that is actually useful for constructing and manipulating URLs and requests.
func StaticHandler ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.