web

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 19 Imported by: 0

README

AnimeGo WEB Api接口文档

响应代码

code值所代码含义

200 成功
300 失败
403 鉴权失败
500 服务端未知错误

鉴权

HTPP请求Header中,Access-Key为SHA256后的access_key

测试连通

GET /ping

响应
pong bool 默认为true
time int64 AnimeGo所在主机当前时间

下载项目

POST /api/rss

请求
source string 来源
rss object 订阅信息
    url string 订阅链接
is_select_ep bool 是否选中部分ep
ep_links []string 选中的ep链接数组

上传插件配置

POST /api/plugin/config

请求
name string 插件名,如`filter/default.js`
data string 配置文件数据,json格式转成的base64字符串

获取插件配置

GET /api/plugin/config

请求
name string 插件名,如`filter/default.js`
响应
name string 插件名,如`filter/default.js`
data string 配置文件数据,json格式转成的base64字符串

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors() gin.HandlerFunc

Cors 跨域中间件

func GinLogger

func GinLogger(logger *zap.SugaredLogger) gin.HandlerFunc

GinLogger 接收gin框架默认的日志

func GinRecovery

func GinRecovery(logger *zap.SugaredLogger, stack bool, response func(*gin.Context, interface{})) gin.HandlerFunc

GinRecovery recover掉项目可能出现的panic

func Init

func Init(opt *InitOptions)

func InitSwagger added in v0.4.3

func InitSwagger(r *gin.Engine)

func KeyAuth

func KeyAuth() gin.HandlerFunc

KeyAuth 鉴权

func Run

func Run(ctx context.Context)

Types

type InitOptions

type InitOptions struct {
	Debug bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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