api

package
v0.0.0-...-fca8513 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotFoundMsg         = `The path you are requesting is not allowed!`
	MethodNotAllowedMsg = `Your access method is not allowed!`
	NotAuthorizationMsg = `Your request not authorization! add auth and password to your request header!`
)

Variables

View Source
var (
	Root *mux.Router
)

Functions

func DashboardHandler

func DashboardHandler(w http.ResponseWriter, r *http.Request)

func HandleStatus

func HandleStatus(w http.ResponseWriter, _ *http.Request)

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request)

func MethodNotAllowHandler

func MethodNotAllowHandler(w http.ResponseWriter, _ *http.Request)

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, _ *http.Request)

Types

type AdminTemplates

type AdminTemplates struct {
	Login     *template.Template
	Dashboard *template.Template
}

AdminTemplates 结构体用于存储所有后台模板

type ResponseData

type ResponseData struct {
	Code    int           `json:"code"`
	Status  string        `json:"status"`
	Time    string        `json:"time"`
	Result  []interface{} `json:"result"`
	Message string        `json:"messages"`
}

type Set

type Set struct {
	Key  string
	Data []interface{}
}

Jump to

Keyboard shortcuts

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