api

package
v0.0.0-...-a9a0011 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(db *sql.DB, cache redis.Conn) http.HandlerFunc

func Refresh

func Refresh(db *sql.DB, cache redis.Conn) http.HandlerFunc

func Signup

func Signup(db *sql.DB) http.HandlerFunc

func Welcome

func Welcome(db *sql.DB, cache redis.Conn) http.HandlerFunc

Types

type Credentials

type Credentials struct {
	Password string `json:"password" db:"password"`
	Username string `json:"username" db:"username"`
}

Create a struct that models the structure of a user, both in the request body, and in the DB

Jump to

Keyboard shortcuts

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