controller

package
v0.0.0-...-7873db6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDbPath = viper.GetString("main.db.sqlite.path")

DefaultDbPath 数据库地址

Functions

func Log

func Log(c *gin.Context)

Log 通过ws查看xray实时日志

func TimeCost

func TimeCost(start time.Time, body *ResponseBody)

TimeCost web函数执行用时统计方法

Types

type ResponseBody

type ResponseBody struct {
	Duration string
	Data     interface{}
	Msg      string
}

ResponseBody 结构体

func CancelExpire

func CancelExpire(id string) *ResponseBody

CancelExpire 取消设置用户过期

func CreateUser

func CreateUser(username string, password string) *ResponseBody

CreateUser 创建用户

func DelUser

func DelUser(id string) *ResponseBody

DelUser 删除用户

func PageUserList

func PageUserList(curPage int, pageSize int) *ResponseBody

PageUserList 分页查询获取用户列表

func Restart

func Restart() *ResponseBody

Restart 重启xray

func SetExpire

func SetExpire(id string, useDays uint) *ResponseBody

SetExpire 设置用户过期

func Start

func Start() *ResponseBody

Start 启动xray

func Stop

func Stop() *ResponseBody

Stop 停止xray

func UpdateUser

func UpdateUser(id string, username string, password string) *ResponseBody

UpdateUser 更新用户

func UserList

func UserList(findUser string) *ResponseBody

UserList 查询用户

Jump to

Keyboard shortcuts

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