controller

package
v0.0.0-...-312c5a9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(c *gin.Context)

Log 通过ws查看trojan实时日志

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 CleanData

func CleanData(id uint) *ResponseBody

CleanData 清空流量

func CreateUser

func CreateUser(username string, password string) *ResponseBody

CreateUser 创建用户

func DelUser

func DelUser(id uint) *ResponseBody

DelUser 删除用户

func GetLogLevel

func GetLogLevel() *ResponseBody

GetLogLevel 获取trojan日志等级

func PageUserList

func PageUserList(curPage int, pageSize int) *ResponseBody

PageUserList 分页查询获取用户列表

func Restart

func Restart() *ResponseBody

Restart 重启trojan

func ServerInfo

func ServerInfo() *ResponseBody

ServerInfo 获取服务器信息

func SetData

func SetData(id uint, quota int) *ResponseBody

SetData 设置流量限制

func SetDomain

func SetDomain(domain string) *ResponseBody

SetDomain 设置域名

func SetLogLevel

func SetLogLevel(level int) *ResponseBody

SetLogLevel 修改trojan日志等级

func SetLoginInfo

func SetLoginInfo(title string) *ResponseBody

SetLoginInfo 设置登录页信息

func SetTrojanType

func SetTrojanType(tType string) *ResponseBody

SetTrojanType 设置trojan类型

func Start

func Start() *ResponseBody

Start 启动trojan

func Stop

func Stop() *ResponseBody

Stop 停止trojan

func Update

func Update() *ResponseBody

Update trojan更新

func UpdateUser

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

UpdateUser 更新用户

func UserList

func UserList(findUser string) *ResponseBody

UserList 获取用户列表

func Version

func Version() *ResponseBody

Version 获取版本信息

Jump to

Keyboard shortcuts

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