webui

package
v0.0.0-...-c7e21b0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBName          = "cookie.db"
	CookieBucket    = "cookies"
	ExpirationKey   = "expiration"
	ExpirationHours = 24 // Cookie 有效期为24小时
)

Variables

View Source
var ErrCookieExpired = errors.New("cookie has expired")
View Source
var ErrCookieNotFound = errors.New("cookie not found")

Functions

func AccountConfigReadHandler

func AccountConfigReadHandler(c *gin.Context)

AccountConfigReadHandler 是用来处理读取配置文件的HTTP请求的

func CloseDB

func CloseDB()

func CombinedMiddleware

func CombinedMiddleware(api openapi.OpenAPI, apiV2 openapi.OpenAPI) gin.HandlerFunc

NewCombinedMiddleware 创建并返回一个带有依赖的中间件闭包

func GenerateCookie

func GenerateCookie() (string, error)

func HandleAccountsRequest

func HandleAccountsRequest(c *gin.Context)

func HandleAppIDRequest

func HandleAppIDRequest(c *gin.Context)

func HandleCheckLoginStatusRequest

func HandleCheckLoginStatusRequest(c *gin.Context)

HandleCheckLoginStatusRequest 检查登录状态的处理函数

func HandleLoginRequest

func HandleLoginRequest(c *gin.Context)

HandleLoginRequest处理登录请求

func HandleProcessStatusRequest

func HandleProcessStatusRequest(c *gin.Context)

func InitializeDB

func InitializeDB()

func ValidateCookie

func ValidateCookie(cookie string) (bool, error)

Types

type RequestData

type RequestData struct {
	Password string `json:"password"`
}

type ResponseData

type ResponseData struct {
	UIN      int64  `json:"uin"`
	Password string `json:"password"`
	Protocol int    `json:"protocol"`
}

type SendMessageRequest

type SendMessageRequest struct {
	Message string `json:"message"`
	ID      string `json:"id"`
}

SendMessageRequest 定义了发送消息请求的数据结构

Jump to

Keyboard shortcuts

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