routers

package
v0.0.0-...-a968f5f Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActiveUserEmail string

ActiveUserEmail "global" var within routers package

View Source
var ActiveUserID string

ActiveUserID "global" var within routers package

View Source
var AppDB = database.MongoConnection.Database("twittAppDB")

AppDB is the database for our app

View Source
var UsersCollection = AppDB.Collection("users")

UsersCollection is the "users" collection within DB

Functions

func Login

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

Login initializes logIn process for user, with their email/password

func Profile

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

Profile returns user's profile

func Register

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

Register sets new users into DB

func ValidateJWT

func ValidateJWT(token string) (models.Claim, bool, string, error)

ValidateJWT decodes JWT & checks if it is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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