Documentation ¶
Index ¶
- func GetArrayObject(jsonObject map[string]interface{}, property string) []interface{}
- func GetJSONObject(jsonObject map[string]interface{}, property string) map[string]interface{}
- func GetRequestAsMap(request *http.Request) (map[string]interface{}, error)
- func GetResponseAsJSONArray(response *http.Response) ([]interface{}, error)
- func GetResponseAsJSONObject(response *http.Response) (map[string]interface{}, error)
- func RewriteAccessDeniedResponse(response *http.Response) error
- func RewriteRequest(request *http.Request, newData interface{}) error
- func RewriteResponse(response *http.Response, newResponseData interface{}, statusCode int) error
- func WriteAccessDeniedResponse() (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArrayObject ¶
GetArrayObject will extract an array from a specific property of another JSON object. Returns nil if nothing is associated to the specified key.
func GetJSONObject ¶
GetJSONObject will extract an object from a specific property of another JSON object. Returns nil if nothing is associated to the specified key.
func GetRequestAsMap ¶
GetRequestAsMap returns the response content as a generic JSON object
func GetResponseAsJSONArray ¶
GetResponseAsJSONArray returns the response content as an array of generic JSON object
func GetResponseAsJSONObject ¶
GetResponseAsJSONObject returns the response content as a generic JSON object
func RewriteAccessDeniedResponse ¶
RewriteAccessDeniedResponse will overwrite the existing response with an access denied response
func RewriteRequest ¶
RewriteRequest will replace the existing request body with the one specified in parameters
func RewriteResponse ¶
RewriteResponse will replace the existing response body and status code with the one specified in parameters
func WriteAccessDeniedResponse ¶
WriteAccessDeniedResponse will create a new access denied response
Types ¶
This section is empty.