helpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGatewayErrorHandler

func APIGatewayErrorHandler(err error) *events.APIGatewayProxyResponse

APIGatewayErrorHandler : Handle api gateway errors

func BuildHttpRequest

func BuildHttpRequest(api base.ScoutrBase, r *http.Request, params httprouter.Params) types.Request

func GetUserFromOIDC

func GetUserFromOIDC(req *http.Request, api base.ScoutrBase) types.RequestUser

GetUserFromOIDC : Get user information from OIDC headers

func HTTPErrorHandler

func HTTPErrorHandler(err error, w http.ResponseWriter) bool

HTTPErrorHandler : Handle HTTP errors

func InitAPIGateway

func InitAPIGateway(event events.APIGatewayProxyRequest, config config.Config) (dynamo.DynamoAPI, types.Request)

InitAPIGateway : Initialize API Gateway

func InitHTTPServer

func InitHTTPServer(api base.ScoutrBase, primaryListEndpoint string) (*httprouter.Router, error)

InitHTTPServer : Initialize the HTTP server

func ProcessAPIGatewayResponse

func ProcessAPIGatewayResponse(data interface{}) (events.APIGatewayProxyResponse, error)

ProcessAPIGatewayResponse : Process response for api gateway

Types

This section is empty.

Jump to

Keyboard shortcuts

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