admin

package
v0.0.0-...-2727cdd Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

admin:后台管理接口

Index

Constants

View Source
const (
	RespSuccess       = 0
	RespInternalErr   = 1
	RespTokenErr      = 2
	RespUserOrPassErr = 3
	RespParamErr      = 4
)

返回码

Variables

View Source
var RespMap = map[int]string{
	RespTokenErr:      "客户端TOKEN错误",
	RespUserOrPassErr: "用户名或密码错误",
}

Functions

func GetJwtData

func GetJwtData(jwtToken string) (map[string]interface{}, error)

func GroupDel

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

func GroupDetail

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

func GroupList

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

func GroupNames

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

func GroupSet

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

func Login

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

Login 登陆接口

func RespData

func RespData(w http.ResponseWriter, data interface{}, err error)

func RespError

func RespError(w http.ResponseWriter, respCode int, errS ...interface{})

func RespSucess

func RespSucess(w http.ResponseWriter, data interface{})

func SendMail

func SendMail(subject, to, htmlBody string) error

func SetHome

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

func SetJwtData

func SetJwtData(data map[string]interface{}, expiresAt int64) (string, error)

func SetOther

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

func SetOtherEdit

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

func SetOtherSmtp

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

func SetOtherSmtpEdit

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

func SetSoft

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

func StartAdmin

func StartAdmin()

开启服务

func UserDel

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

func UserDetail

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

func UserIpMapDel

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

func UserIpMapDetail

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

func UserIpMapList

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

func UserIpMapSet

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

func UserList

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

func UserOffline

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

func UserOnline

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

在线用户

func UserOtpQr

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

func UserReline

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

func UserSet

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

Types

type Resp

type Resp struct {
	Code     int         `json:"code"`
	Msg      string      `json:"msg"`
	Location string      `json:"location"`
	Data     interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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