api

package module
v0.0.0-...-afc12eb Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AUTH_AUDIENCE string = os.Getenv("AUTH_AUDIENCE")
)

"Global" variables.

Functions

func InitLambda

func InitLambda()

InitServer gets and sets the routes for the http server before it starts listening. It also uses the AWS negroniadapter which is required for Lambda.

func InitServer

func InitServer()

InitServer gets and sets the routes for the http server before it starts listening. It is a function so we can use this or Lambda which requires a wrapper.

Types

type DynamoInt

type DynamoInt struct {
	Client dynamodbiface.DynamoDBAPI
}

Create the DynamoDB struct which we will use to house the DynamoDB client. This also means that we can mock the interface.

var DynaDB *DynamoInt

Initialise the DynamoDB struct.

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

JSONWebKeys is a struct that contains all of the information required to parse and authenticate with Auth0

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

Jwks is a struct that holds an array of JWKS

type Response

type Response struct {
	Message string `json:"message"`
}

All of this was lifted from Auth0.

Jump to

Keyboard shortcuts

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