routes

package
v0.0.0-...-83c0583 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DisableGinSwaggerEnvkey 设置该环境变量时关闭 swagger 文档
	DisableGinSwaggerEnvkey = "DISABLE_GIN_SWAGGER"
)

Variables

This section is empty.

Functions

func About

func About(c *gin.Context)

About godoc

func Comment

func Comment(c *gin.Context)

Comment godoc

func FundCheck

func FundCheck(c *gin.Context)

FundCheck godoc

func FundFilter

func FundFilter(c *gin.Context)

FundFilter godoc

func FundIndex

func FundIndex(c *gin.Context)

FundIndex godoc

func FundManagers

func FundManagers(c *gin.Context)

FundManagers godoc

func FundSimilarity

func FundSimilarity(c *gin.Context)

FundSimilarity 基金持仓相似度

func Index

func Index(c *gin.Context)

Index godoc

func Ping

func Ping(c *gin.Context)

Ping godoc @Summary 默认的 Ping 接口 @Description 返回 server 相关信息,可以用于健康检查 @Tags x @Accept json @Produce json @Success 200 {object} response.Response @Security ApiKeyAuth @Security BasicAuth @Param trace_id header string false "you can set custom trace id in header" @Router /x/ping [get]

func QueryFundByStock

func QueryFundByStock(c *gin.Context)

QueryFundByStock 股票选基

func Register

func Register(httpHandler http.Handler)

Register 在 gin engine 上注册 url 对应的 HandlerFunc

func Routes

func Routes(app *gin.Engine)

Routes 注册 API URL 路由

func StockChecker

func StockChecker(c *gin.Context)

StockChecker 处理个股检测

func StockIndex

func StockIndex(c *gin.Context)

StockIndex 股票页面

func StockSelector

func StockSelector(c *gin.Context)

StockSelector 返回基本面筛选结果json

func SyncFund

func SyncFund(c *gin.Context)

SyncFund godoc

func SyncFundManagers

func SyncFundManagers(c *gin.Context)

SyncFundManagers godoc

func SyncIndustryList

func SyncIndustryList(c *gin.Context)

SyncIndustryList godoc

Types

type ParamFundCheck

type ParamFundCheck struct {
	// 基金代码
	Code string `json:"fundcode"                 form:"fundcode"`
	// 基金规模最小值(亿)
	MinScale float64 `json:"min_scale"                form:"min_scale"`
	// 基金规模最大值(亿)
	MaxScale float64 `json:"max_scale"                form:"max_scale"`
	// 基金经理管理该基金最低年限
	MinManagerYears float64 `json:"min_manager_years"        form:"min_manager_years"`
	// 最近一年收益率排名比
	Year1RankRatio float64 `json:"year_1_rank_ratio"        form:"year_1_rank_ratio"`
	// 今年来、最近两年、最近三年、最近五年收益率排名比
	ThisYear235RankRatio float64 `json:"this_year_235_rank_ratio" form:"this_year_235_rank_ratio"`
	// 最近六月收益率排名比
	Month6RankRatio float64 `json:"month_6_rank_ratio"       form:"month_6_rank_ratio"`
	// 最近三月收益率排名比
	Month3RankRatio float64 `json:"month_3_rank_ratio"       form:"month_3_rank_ratio"`
	// 1,3,5年波动率平均值的最大值
	Max135AvgStddev float64 `json:"max_135_avg_stddev"       form:"max_135_avg_stddev"`
	// 1,3,5年夏普比率平均值的最小值
	Min135AvgSharp float64 `json:"min_135_avg_sharp"        form:"min_135_avg_sharp"`
	// 1,3,5年最大回撤率平均值的最大值
	Max135AvgRetr float64 `json:"max_135_avg_retr"         form:"max_135_avg_retr"`
	// 是否检测持仓个股
	CheckStocks bool `json:"check_stocks"             form:"check_stocks"`
	// 股票检测参数
	StockCheckerOptions core.CheckerOptions
}

ParamFundCheck FundCheck 请求参数

type ParamFundFilter

type ParamFundFilter struct {
	ParamFundListFilter models.ParamFundListFilter
	ParamFundIndex      ParamFundIndex
}

ParamFundFilter FundFilter 请求参数

type ParamFundIndex

type ParamFundIndex struct {
	PageNum  int    `json:"page_num"  form:"page_num"`
	PageSize int    `json:"page_size" form:"page_size"`
	Sort     int    `json:"sort"      form:"sort"`
	Type     string `json:"type"      form:"type"`
}

ParamFundIndex FundIndex 请求参数

type ParamFundManagers

type ParamFundManagers struct {
	// 指定名字搜索
	Name string `json:"name" form:"name"`
	// 最低从业年限
	MinWorkingYears int `json:"min_working_years" form:"min_working_years"`
	// 最低年化回报(%)
	MinYieldse float64 `json:"min_yieldse" form:"min_yieldse"`
	// 最大现任基金数量
	MaxCurrentFundCount int `json:"max_current_fund_count" form:"max_current_fund_count"`
	// 最小管理规模(亿)
	MinScale float64 `json:"min_scale" form:"min_scale"`
	PageNum  int     `json:"page_num" form:"page_num"`
	PageSize int     `json:"page_size" form:"page_size"`
	Sort     string  `json:"sort" form:"sort"`
	FundType string  `json:"fund_type" form:"fund_type"`
}

ParamFundManagers 基金经理筛选参数

type ParamFundSimilarity

type ParamFundSimilarity struct {
	Codes string `json:"codes" form:"codes"`
}

ParamFundSimilarity FundSimilarity 请求参数

type ParamQueryFundByStock

type ParamQueryFundByStock struct {
	Keywords string `form:"keywords" binding:"required"`
}

ParamQueryFundByStock QueryFundByStock 请求参数

type ParamStockChecker

type ParamStockChecker struct {
	Keyword        string `form:"checker_keyword"`
	CheckerOptions core.CheckerOptions
}

ParamStockChecker StockChecker 请求参数

type ParamStockSelector

type ParamStockSelector struct {
	Filter            eastmoney.Filter
	CheckerOptions    core.CheckerOptions
	FilterWithChecker bool `form:"selector_with_checker"`
}

ParamStockSelector StockSelector 请求参数

Directories

Path Synopsis
Package response 提供统一的 JSON 返回结构,可以通过配置设置具体返回的 code 字段为 int 或者 string
Package response 提供统一的 JSON 返回结构,可以通过配置设置具体返回的 code 字段为 int 或者 string

Jump to

Keyboard shortcuts

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