api

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelloHandler

func HelloHandler(ctx context.Context) http.HandlerFunc

HelloHandler returns function containing a simple hello world example of an api handler

Types

type API

type API struct {
	Router         *mux.Router
	CognitoClient  cognito.Client
	UserPoolId     string
	ClientId       string
	ClientSecret   string
	ClientAuthFlow string
}

API provides a struct to wrap the api around

func Setup

func Setup(ctx context.Context, r *mux.Router, cognitoClient cognito.Client, userPoolId string, clientId string, clientSecret string, clientAuthFlow string) *API

Setup function sets up the api and returns an api

func (*API) SignOutHandler added in v1.5.0

func (api *API) SignOutHandler(ctx context.Context) http.HandlerFunc

func (*API) TokensHandler added in v1.6.0

func (api *API) TokensHandler(ctx context.Context) http.HandlerFunc

type AuthParams added in v1.5.0

type AuthParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type HelloResponse

type HelloResponse struct {
	Message string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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