mirror of
https://github.com/gmemstr/pogo.git
synced 2024-09-20 01:31:09 +01:00
Skeleton files for setup process & user (new) management
This commit is contained in:
parent
18267d0362
commit
a5f6cf3219
20
src/setup.go
Normal file
20
src/setup.go
Normal 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
32
src/usermanagement.go
Normal 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() {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue