api

package
v0.0.0-...-6f40e4d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(w http.ResponseWriter, r *http.Request)

We check for the recaptcha response and proceed Covert the response body into appropriate models Create a new user using our dynamodb adapter A event message it sent to the queues which are consumed by the relevant services

func CredentialsFromMap

func CredentialsFromMap(m map[string]interface{}, u string, p string) (string, string)

Get the string value of a key

func DeleteUser

func DeleteUser(w http.ResponseWriter, r *http.Request)

SUPER USER operation

func ExtractValue

func ExtractValue(w http.ResponseWriter, r *http.Request) string

to avoid duplication, this method is re-used Gets the unique identifier from the response body This unique identifier is set under the API configs For this context, it would be mail TODO: move to dynamodb library?

func GetUser

func GetUser(w http.ResponseWriter, r *http.Request)

func HandleError

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

Custom made error

func Login

func Login(w http.ResponseWriter, r *http.Request)

func SetupEndpoints

func SetupEndpoints()

func TestFunc

func TestFunc(w http.ResponseWriter, r *http.Request)

func UpdateUser

func UpdateUser(w http.ResponseWriter, r *http.Request)

Creating a new user with same ID replaces the record Temporary solution

Types

This section is empty.

Jump to

Keyboard shortcuts

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