Documentation
¶
Index ¶
- func AccountCreatePOST(w http.ResponseWriter, r *http.Request)
- func AccountDeletePOST(w http.ResponseWriter, r *http.Request)
- func AccountEditPOST(w http.ResponseWriter, r *http.Request)
- func AdminDashboardGET(w http.ResponseWriter, r *http.Request)
- func AdminLoginGET(sessionStore data.SessionStore) http.HandlerFunc
- func AdminLoginPOST(sessionStore data.SessionStore, userLocker *utils.LockedOutRateLimiter) http.HandlerFunc
- func ApologyHandler(w http.ResponseWriter, r *http.Request)
- func DefaultHandler(w http.ResponseWriter, r *http.Request)
- func Hello(w http.ResponseWriter, r *http.Request)
- func RedirectToHTTPSHandler(w http.ResponseWriter, r *http.Request)
- func ServerIPHandlerGET(w http.ResponseWriter, r *http.Request)
- func ServerRestartPOST(w http.ResponseWriter, r *http.Request)
- type RestartRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountCreatePOST ¶
func AccountCreatePOST(w http.ResponseWriter, r *http.Request)
AccountCreatePOST is to create an new user account and add it to the v2ray server configuration file.
func AccountDeletePOST ¶
func AccountDeletePOST(w http.ResponseWriter, r *http.Request)
func AccountEditPOST ¶
func AccountEditPOST(w http.ResponseWriter, r *http.Request)
func AdminDashboardGET ¶
func AdminDashboardGET(w http.ResponseWriter, r *http.Request)
AdminDashboardGET is to show the admin dashboard.
func AdminLoginGET ¶
func AdminLoginGET(sessionStore data.SessionStore) http.HandlerFunc
AdminLoginGET is to show the admin login page.
func AdminLoginPOST ¶
func AdminLoginPOST(sessionStore data.SessionStore, userLocker *utils.LockedOutRateLimiter) http.HandlerFunc
AdminLoginPOST is a handler for logging into the admin dashboard.
func ApologyHandler ¶
func ApologyHandler(w http.ResponseWriter, r *http.Request)
ApologyHandler is to handle for the undefind paths with an apology.
func DefaultHandler ¶
func DefaultHandler(w http.ResponseWriter, r *http.Request)
DefaultHandler is to handle all routes and redirect to the main page.
func RedirectToHTTPSHandler ¶
func RedirectToHTTPSHandler(w http.ResponseWriter, r *http.Request)
func ServerIPHandlerGET ¶
func ServerIPHandlerGET(w http.ResponseWriter, r *http.Request)
func ServerRestartPOST ¶
func ServerRestartPOST(w http.ResponseWriter, r *http.Request)
ServerRestartPOST handles to restart the v2ray server when invoked with correct password.
Types ¶
type RestartRequest ¶
type RestartRequest struct { AdminUsername string `json:"adminUsername"` AdminPassword string `json:"adminPassword"` }
Request body structure
Click to show internal directories.
Click to hide internal directories.