models

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigGetRequest

type ConfigGetRequest struct {
	// Key 使用目录方式获取指定yaml key内容
	//   [暂不支持] 如 setting/save_path, advanced/download/queue_max_num
	//   all 获取所有配置项,json格式
	//   raw 获取所有配置项,yaml文本格式
	//   comment 获取所有配置项的注释文本
	Key string `json:"key" form:"key" default:"all"`
}

type ConfigResponse

type ConfigResponse struct {
	Config *configs.Config `json:"config,omitempty"`
	Data   string          `json:"data,omitempty"`
}

type PluginConfigDownloadRequest

type PluginConfigDownloadRequest struct {
	PluginRequest
}

type PluginConfigResponse

type PluginConfigResponse struct {
	PluginResponse
	Data string `json:"data"` //base64编码后的数据
}

type PluginConfigUploadRequest

type PluginConfigUploadRequest struct {
	PluginRequest
	Data string `json:"data" binding:"required"` //base64格式的文本数据
}

type PluginRequest

type PluginRequest struct {
	Name string `json:"name" form:"name" binding:"required"` //插件文件名
}

func (PluginRequest) FindFile

func (p PluginRequest) FindFile() (string, error)

type PluginResponse

type PluginResponse struct {
	Name string `json:"name"`
}

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

Response format

func ErrDeny

func ErrDeny(msg string, data ...interface{}) (int, Response)

ErrDeny 返回一个没有权限的结果格式

func ErrIpt

func ErrIpt(msg string, data ...interface{}) (int, Response)

ErrIpt 返回一个输入错误的结果格式

func ErrJwt

func ErrJwt(msg string, data ...interface{}) (int, Response)

ErrJwt 返回一个通过验证的结果格式

func ErrOpt

func ErrOpt(msg string, data ...interface{}) (int, Response)

ErrOpt 返回一个输出错误的结果格式

func ErrSvr

func ErrSvr(msg string, data ...interface{}) (int, Response)

ErrSvr 返回一个服务端错误的结果格式

func Ext

func Ext(msg string, data ...interface{}) (int, Response)

Ext 返回一个其他约定的结果格式

func Fail

func Fail(msg string, data ...interface{}) (int, Response)

Fail 返回一个失败标识的结果格式

func Page

func Page(msg string, items interface{}, count int) (int, Response)

Page 返回一个带有分页数据的结果格式

func Succ

func Succ(msg string, data ...interface{}) (int, Response)

Succ 返回一个成功标识的结果格式

type SelectEpRequest

type SelectEpRequest struct {
	Source string `json:"source" binding:"required"`
	Rss    struct {
		Url string `json:"url" binding:"required"`
	} `json:"rss" binding:"required"`
	IsSelectEp bool     `json:"is_select_ep" default:"false"`
	EpLinks    []string `json:"ep_links"`
}

Jump to

Keyboard shortcuts

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