server

package
v0.9.34-fix1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: AGPL-3.0 Imports: 30 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Console = make(chan os.Signal, 1)
View Source
var Debug = false
View Source
var HttpServer = &httpServer{}
View Source
var HttpuriAdmin = map[string]func(s *webServer, c *gin.Context){
	"do_restart":         AdminDoRestart,
	"do_process_restart": AdminProcessRestart,
	"get_web_write":      AdminWebWrite,
	"do_web_write":       AdminDoWebWrite,
	"do_restart_docker":  AdminDoRestartDocker,
	"do_config_base":     AdminDoConfigBase,
	"do_config_http":     AdminDoConfigHttp,
	"do_config_ws":       AdminDoConfigWs,
	"do_config_reverse":  AdminDoConfigReverse,
	"do_config_json":     AdminDoConfigJson,
	"get_config_json":    AdminGetConfigJson,
}

admin 子站的 路由映射

View Source
var JsonConfig *global.JsonConfig
View Source
var Restart = make(chan struct{}, 1)
View Source
var WebInput = make(chan string, 1) //长度1,用于阻塞
View Source
var WebServer = &webServer{}
View Source
var WebsocketServer = &websocketServer{}

Functions

func AdminDoConfigBase added in v0.9.27

func AdminDoConfigBase(s *webServer, c *gin.Context)

普通配置修改

func AdminDoConfigHttp added in v0.9.27

func AdminDoConfigHttp(s *webServer, c *gin.Context)

http配置修改

func AdminDoConfigJson added in v0.9.27

func AdminDoConfigJson(s *webServer, c *gin.Context)

config.json配置修改

func AdminDoConfigReverse added in v0.9.27

func AdminDoConfigReverse(s *webServer, c *gin.Context)

反向ws配置修改

func AdminDoConfigWs added in v0.9.27

func AdminDoConfigWs(s *webServer, c *gin.Context)

ws配置修改

func AdminDoRestart added in v0.9.27

func AdminDoRestart(s *webServer, c *gin.Context)

热重启

func AdminDoRestartDocker added in v0.9.27

func AdminDoRestartDocker(s *webServer, c *gin.Context)

冷重启

func AdminDoWebWrite added in v0.9.27

func AdminDoWebWrite(s *webServer, c *gin.Context)

web输入 处理

func AdminGetConfigJson added in v0.9.27

func AdminGetConfigJson(s *webServer, c *gin.Context)

拉取config.json配置

func AdminProcessRestart added in v0.9.32

func AdminProcessRestart(s *webServer, c *gin.Context)

进程重启

func AdminWebWrite added in v0.9.27

func AdminWebWrite(s *webServer, c *gin.Context)

web输入 html 页面

func AuthMiddleWare added in v0.9.27

func AuthMiddleWare() gin.HandlerFunc

admin 控制器 登录验证

func CanSendImage added in v0.9.31

func CanSendImage(s *httpServer, c *gin.Context)

func CanSendRecord added in v0.9.31

func CanSendRecord(s *httpServer, c *gin.Context)

func DeleteMessage added in v0.9.31

func DeleteMessage(s *httpServer, c *gin.Context)

func Failed added in v0.9.27

func Failed(code int, msg string) coolq.MSG

func GetConf added in v0.9.27

func GetConf() *global.JsonConfig

获取当前配置文件信息

func GetForwardMessage added in v0.9.31

func GetForwardMessage(s *httpServer, c *gin.Context)

func GetFriendList added in v0.9.31

func GetFriendList(s *httpServer, c *gin.Context)

func GetGroupFileSystemInfo added in v0.9.31

func GetGroupFileSystemInfo(s *httpServer, c *gin.Context)

func GetGroupFileUrl added in v0.9.31

func GetGroupFileUrl(s *httpServer, c *gin.Context)

func GetGroupFilesByFolderId added in v0.9.31

func GetGroupFilesByFolderId(s *httpServer, c *gin.Context)

func GetGroupHonorInfo added in v0.9.31

func GetGroupHonorInfo(s *httpServer, c *gin.Context)

func GetGroupInfo added in v0.9.31

func GetGroupInfo(s *httpServer, c *gin.Context)

func GetGroupList added in v0.9.31

func GetGroupList(s *httpServer, c *gin.Context)

func GetGroupMemberInfo added in v0.9.31

func GetGroupMemberInfo(s *httpServer, c *gin.Context)

func GetGroupMemberList added in v0.9.31

func GetGroupMemberList(s *httpServer, c *gin.Context)

func GetGroupRootFiles added in v0.9.31

func GetGroupRootFiles(s *httpServer, c *gin.Context)

func GetGroupSystemMessage added in v0.9.31

func GetGroupSystemMessage(s *httpServer, c *gin.Context)

func GetImage added in v0.9.31

func GetImage(s *httpServer, c *gin.Context)

func GetLoginInfo added in v0.9.31

func GetLoginInfo(s *httpServer, c *gin.Context)

func GetMessage added in v0.9.31

func GetMessage(s *httpServer, c *gin.Context)

func GetStatus added in v0.9.31

func GetStatus(s *httpServer, c *gin.Context)

func GetStrangerInfo added in v0.9.31

func GetStrangerInfo(s *httpServer, c *gin.Context)

func GetVersionInfo added in v0.9.31

func GetVersionInfo(s *httpServer, c *gin.Context)

func GetVipInfo added in v0.9.31

func GetVipInfo(s *httpServer, c *gin.Context)

func GetWordSlices added in v0.9.31

func GetWordSlices(s *httpServer, c *gin.Context)

func HandleQuickOperation added in v0.9.31

func HandleQuickOperation(s *httpServer, c *gin.Context)

func NewHttpClient added in v0.9.2

func NewHttpClient() *httpClient

func NewWebsocketClient added in v0.9.2

func NewWebsocketClient(conf *global.GoCQReverseWebsocketConfig, authToken string, b *coolq.CQBot) *websocketClient

func OcrImage added in v0.9.31

func OcrImage(s *httpServer, c *gin.Context)

func ProcessFriendRequest added in v0.9.31

func ProcessFriendRequest(s *httpServer, c *gin.Context)

func ProcessGroupRequest added in v0.9.31

func ProcessGroupRequest(s *httpServer, c *gin.Context)

func ReloadEventFilter added in v0.9.31

func ReloadEventFilter(s *httpServer, c *gin.Context)

func SendGroupForwardMessage added in v0.9.31

func SendGroupForwardMessage(s *httpServer, c *gin.Context)

func SendGroupMessage added in v0.9.31

func SendGroupMessage(s *httpServer, c *gin.Context)

func SendGroupNotice added in v0.9.31

func SendGroupNotice(s *httpServer, c *gin.Context)

func SendMessage added in v0.9.31

func SendMessage(s *httpServer, c *gin.Context)

func SendPrivateMessage added in v0.9.31

func SendPrivateMessage(s *httpServer, c *gin.Context)

func SetGroupAdmin added in v0.9.31

func SetGroupAdmin(s *httpServer, c *gin.Context)

func SetGroupBan added in v0.9.31

func SetGroupBan(s *httpServer, c *gin.Context)

func SetGroupCard added in v0.9.31

func SetGroupCard(s *httpServer, c *gin.Context)

func SetGroupKick added in v0.9.31

func SetGroupKick(s *httpServer, c *gin.Context)

func SetGroupLeave added in v0.9.31

func SetGroupLeave(s *httpServer, c *gin.Context)

func SetGroupName added in v0.9.31

func SetGroupName(s *httpServer, c *gin.Context)

func SetGroupPortrait added in v0.9.31

func SetGroupPortrait(s *httpServer, c *gin.Context)

func SetRestart added in v0.9.32

func SetRestart(s *httpServer, c *gin.Context)

func SetSpecialTitle added in v0.9.31

func SetSpecialTitle(s *httpServer, c *gin.Context)

func SetWholeBan added in v0.9.31

func SetWholeBan(s *httpServer, c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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