Skeleton files for setup process & user (new) management

This commit is contained in:
gmemstr 2017-09-21 12:10:59 -07:00
parent 18267d0362
commit a5f6cf3219
2 changed files with 52 additions and 0 deletions

20
src/setup.go Normal file
View file

@ -0,0 +1,20 @@
package main
import (
"fmt"
)
// Serve setup.html and config parameters
func ServeSetup(w http.ResponseWriter, r *http.Request) {
}
// Write JSON config to file
func WriteConfig() {
}
// Connect to SQL and create admin user
func CreateAdmin() {
}

32
src/usermanagement.go Normal file
View file

@ -0,0 +1,32 @@
package main
import (
"database/sql"
"fmt"
)
// Translate POST requests into more basic parameters
// and pass to specific function
func RequestTranslator(w http.ResponseWriter, r *http.Request) {
}
// Check username and password, pass back secure cookie
func Login() {
}
// Called to verify cookie token
func VerifyLogin() {
}
// Unregister cookie - clear cached token from database
func Logout() {
}
// Insert new user into database
func CreateUser() {
}