_api

package
v0.0.0-...-b23f6f9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PreCheckWhiteListWithFE = []string{
	"/api/passport/login",
	"/api/passport/signup",
	"/api/passport/reset/password",

	"/api/config/page/login",
}
View Source
var PreCheckWhiteListWithoutFE = []string{
	"/",
	"/*",
	"/favicon.ico",
	"/robots.txt",
	"/passport/login",
	"/passport/signup",
	"/passport/reset/password",

	"/config/page/login",
}
View Source
var RoleList = []string{"deleted", "banned", "user", "vip", "admin"}

Functions

func AddTieba

func AddTieba(c echo.Context) error

func AddTiebaAccount

func AddTiebaAccount(c echo.Context) error

func AdminDeleteAccountToken

func AdminDeleteAccountToken(c echo.Context) error

func AdminDeleteTiebaAccountList

func AdminDeleteTiebaAccountList(c echo.Context) error

func AdminModifyAccountInfo

func AdminModifyAccountInfo(c echo.Context) error

func AdminResetTiebaList

func AdminResetTiebaList(c echo.Context) error

func Api

func Api(address string, args ...any)

func CheckIsManager

func CheckIsManager(c echo.Context) error

func CheckTiebaAccount

func CheckTiebaAccount(c echo.Context) error

func CleanTiebaList

func CleanTiebaList(c echo.Context) error

func DeleteAccount

func DeleteAccount(c echo.Context) error

func ExportAccountData

func ExportAccountData(c echo.Context) error

func GetAccountInfo

func GetAccountInfo(c echo.Context) error

func GetAccountsList

func GetAccountsList(c echo.Context) error

func GetAdminSettings

func GetAdminSettings(c echo.Context) error

func GetBDUSS

func GetBDUSS(c echo.Context) error

func GetFidByFname

func GetFidByFname(c echo.Context) error

func GetLoginPageConfig

func GetLoginPageConfig(c echo.Context) error

func GetLoginQRCode

func GetLoginQRCode(c echo.Context) error

func GetNotifications

func GetNotifications(c echo.Context) error

func GetPluginsList

func GetPluginsList(c echo.Context) error

func GetServerStatus

func GetServerStatus(c echo.Context) error

func GetSettings

func GetSettings(c echo.Context) error

func GetTiebaAccountItem

func GetTiebaAccountItem(c echo.Context) error

func GetTiebaAccountList

func GetTiebaAccountList(c echo.Context) error

func GetTiebaList

func GetTiebaList(c echo.Context) error

func GetUserByTiebaUID

func GetUserByTiebaUID(c echo.Context) error

func GetUserByUsernameOrPortrait

func GetUserByUsernameOrPortrait(c echo.Context) error

func IgnoreTieba

func IgnoreTieba(c echo.Context) error

func Login

func Login(c echo.Context) error

func Logout

func Logout(c echo.Context) error

func PluginPathPrecheck

func PluginPathPrecheck(next echo.HandlerFunc) echo.HandlerFunc

func PluginSwitch

func PluginSwitch(c echo.Context) error

func PluginUninstall

func PluginUninstall(c echo.Context) error

func PreCheck

func PreCheck(next echo.HandlerFunc) echo.HandlerFunc

func PreCheckWhiteListExists

func PreCheckWhiteListExists(path string) bool

func RefreshTiebaList

func RefreshTiebaList(c echo.Context) error

func RemoveTieba

func RemoveTieba(c echo.Context) error

func RemoveTiebaAccount

func RemoveTiebaAccount(c echo.Context) error

func ResetPassword

func ResetPassword(c echo.Context) error

func ResetTieba

func ResetTieba(c echo.Context) error

func SendTestMessage

func SendTestMessage(c echo.Context) error

func SetHeaders

func SetHeaders(next echo.HandlerFunc) echo.HandlerFunc

func ShutdownSystem

func ShutdownSystem(c echo.Context) error

func Signup

func Signup(c echo.Context) error

func UpdateAccountInfo

func UpdateAccountInfo(c echo.Context) error

func UpdateAdminSettings

func UpdateAdminSettings(c echo.Context) error

func UpdatePassword

func UpdatePassword(c echo.Context) error

func UpdateSettings

func UpdateSettings(c echo.Context) error

TODO verify password

func UpgradeSystem

func UpgradeSystem(c echo.Context) error

Types

type PluginListContent

type PluginListContent struct {
	Name   string `json:"name"`
	Ver    string `json:"ver"`
	Status bool   `json:"status"`

	PluginNameCN      string `json:"plugin_name_cn"`
	PluginNameCNShort string `json:"plugin_name_cn_short"`
	PluginNameFE      string `json:"plugin_name_fe"`

	SettingOptions []PluginListSettingOption `json:"setting_options,omitempty"`
}

type PluginListSettingOption

type PluginListSettingOption struct {
	OptionName   string `json:"option_name"`
	OptionNameCN string `json:"option_name_cn"`
}

type SiteAccountsResponse

type SiteAccountsResponse struct {
	ID    int32  `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
	Role  string `json:"role"`
	T     string `json:"t"`

	BaiduAccountCount int `json:"baidu_account_count"`
	ForumCount        int `json:"forum_count"`

	// checkin status
	CheckinSuccess int `json:"checkin_success"`
	CheckinFailed  int `json:"checkin_failed"`
	CheckinWaiting int `json:"checkin_waiting"`
	CheckinIgnore  int `json:"checkin_ignore"`
}

Jump to

Keyboard shortcuts

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