12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package data
- import "time"
- type EdbBridge interface {
- GetIndex(GetIndexFromBridgeReq) (BridgeIndexItem, error)
-
- }
- type GetIndexFromBridgeReq struct {
- IndexCode string `description:"指标编码"`
- Source int `description:"指标来源ID"`
- SourceExtend string `description:"指标来源(用作查询条件)"`
- IndexCodeRequired int `description:"指标编码是否必填: 0-否; 1-是"`
- }
- type GetIndexAndDataFromBridgeReq struct {
- IndexCode string `description:"指标编码"`
- Source int `description:"指标来源ID"`
- SourceExtend string `description:"指标来源(用作查询条件)"`
- StartDate string `description:"数据开始日期"`
- EndDate string `description:"数据结束日期"`
- }
- type BridgeIndexItem struct {
- Id int `description:"自增ID"`
- IndexCode string `description:"指标编码"`
- IndexName string `description:"指标名称"`
- Unit string `description:"单位"`
- Frequency string `description:"频度"`
- Data []BridgeIndexDataItem `description:"数据值"`
- }
- type BridgeIndexDataItem struct {
- Val float64 `description:"数据值"`
- DataTime time.Time `description:"数据日期"`
- UpdateTime time.Time `description:"更新时间"`
- }
- func InitBridgeOB(bridgeKey string) EdbBridge {
- switch bridgeKey {
- case "bridge_jiayue":
- return new(EdbBridgeJiaYue)
- }
- return nil
- }
|