auth

package
v0.0.0-...-74179fa Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuth

func CheckAuth(db *gorm.DB) func(next http.Handler) http.Handler

func CreateAccount

func CreateAccount(w http.ResponseWriter, r *http.Request, db *gorm.DB) error

func ShowCreateAccount

func ShowCreateAccount(w http.ResponseWriter, r *http.Request) error

func ShowSignIn

func ShowSignIn(w http.ResponseWriter, r *http.Request) error

func SignIn

func SignIn(w http.ResponseWriter, r *http.Request, db *gorm.DB) error

Types

type User

type User struct {
	Username string `json:"username" gorm:"primaryKey"`
	Password string `json:"password"`
	Admin    bool   `json:"admin"`
}

Jump to

Keyboard shortcuts

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