auth

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB            *sql.DB
	TokenAuth     *jwtauth.JWTAuth
	EmailAuth     *jwtauth.JWTAuth
	PostalEnabled bool
	PostalKey     string
	PostalAPI     string
	PostalEmail   string
)

Functions

func Init

func Init()

func Routes

func Routes() *chi.Mux

Types

type Claims

type Claims struct {
	Username string `json:"username", db:"username"`
	Admin    bool   `json:"admin", db:"admin"`
	Verified bool   `json:"verified", db:"verified"`
}

type ComposedEmail added in v1.1.0

type ComposedEmail struct {
	To         [1]string `json:"to"`
	From       string    `json:"from"`
	Subject    string    `json:"subject"`
	Plain_body string    `json:"plain_body"`
}

type JWT

type JWT struct {
	JWT string `json:"jwt"`
}

type ReturnMessage added in v1.1.0

type ReturnMessage struct {
	Message string `json:"msg"`
	Error   bool   `json:"error"`
}

type SignUpCredentials

type SignUpCredentials struct {
	Username string `json:"username", db:"username"`
	Email    string `json:"email", db:"email"`
	Password string `json:"password", db:"password"`
}

type UserCredentials added in v1.1.0

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

Jump to

Keyboard shortcuts

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