Documentation ¶
Index ¶
- Constants
- Variables
- func ApiANY(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) []*echo.Route
- func ApiDELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func ApiGET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func ApiPOST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func ExportCsv(c echo.Context, v interface{}, name string) error
- func ExportData(c echo.Context, data []map[string]interface{}, sheet string) error
- func ExportJson(c echo.Context, v interface{}, name string) error
- func GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func GetCurrUser(c echo.Context) *models.SysOpr
- func GetCurrUserlevel(c echo.Context) string
- func ImportData(c echo.Context, sheet string) ([]map[string]interface{}, error)
- func Init()
- func Listen() error
- func POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
- func PubOpLog(c echo.Context, message string)
- func ServerRecover(debug bool) echo.MiddlewareFunc
- type AdminServer
Constants ¶
View Source
const ConstCookieName = "toughradius_cookie"
View Source
const UserSession = "toughradius_user_session"
View Source
const UserSessionLevel = "toughradius_user_session_level"
View Source
const UserSessionName = "toughradius_user_session_name"
Variables ¶
View Source
var ( SessionSkipPrefix = []string{ "/ready", "/realip", "/api", "/login", "/admin/login", "/static", } JwtSkipPrefix = []string{ "/ready", "/realip", "/login", "/admin/login", "/static", } )
Functions ¶
func ApiDELETE ¶
func ApiDELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
func ExportData ¶
func ExportJson ¶
func GetCurrUser ¶
func GetCurrUserlevel ¶
func GetCurrUserlevel(c echo.Context) string
func ImportData ¶
ImportData Import the file contents
Types ¶
type AdminServer ¶
type AdminServer struct {
// contains filtered or unexported fields
}
func (*AdminServer) ParseJwtToken ¶
func (s *AdminServer) ParseJwtToken(tokenstr string) (jwt.MapClaims, error)
ParseJwtToken 解析 Jwt Token
func (*AdminServer) WrapJwtHandler ¶
func (s *AdminServer) WrapJwtHandler(h http.Handler) echo.HandlerFunc
Click to show internal directories.
Click to hide internal directories.