que_str

package
v0.0.0-...-79ed5b9 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTable

func BuildTable(name string, dataResource []map[string]interface{}, data ComputeData) string

func DecodeJSON

func DecodeJSON(str string, v interface{}) error

func GetDisplayKeys

func GetDisplayKeys() []string

func GetKeyName

func GetKeyName(key string) string

func JSONStr

func JSONStr(v interface{}) string

func ReqStr

func ReqStr() string

func SaveReqStr

func SaveReqStr() string

func SaveTable

func SaveTable(filename string, dataResource []map[string]interface{}) error

Types

type ComputeData

type ComputeData struct {
	Huanshou    [][]float64 `toml:"huanshou"`
	Liangbi     [][]float64 `toml:"liangbi"`
	Jingzhanzuo [][]float64 `toml:"jingzhanzuo"`
	Weipipei    [][]float64 `toml:"weipipei"`
	Jingjiajine [][]float64 `toml:"jingjiajine"`
	Zhuli       [][]float64 `toml:"zhuli"`
	Zhangfu     [][]float64 `toml:"zhangfu"`
}

type Config

type Config struct {
	Input InputStruct
}

type InputStruct

type InputStruct struct {
	Cookie      string      `toml:"Cookie"`
	Reqs        []ReqQuery  `toml:"reqs"`
	Result      ReqQuery    `toml:"result"`
	ComputeData ComputeData `toml:"computedata"`
}

type One

type One struct {
	Name string
	Num  float64
}

type OneList

type OneList []*One

func (OneList) Len

func (this OneList) Len() int

func (OneList) Less

func (this OneList) Less(i, j int) bool

func (OneList) Swap

func (this OneList) Swap(i, j int)

type Piao

type Piao struct {
	Code             string
	Gupiaojiancheng  string
	Zuixinzhangdiefu float64
	Huanshou         float64
	Liangbi          float64
	Jingzhanzuo      float64
	Weipipei         float64
	Jingjiajine      float64
	Zhulizengcang    float64
	Zhangfu          float64
	Weibi            float64
	Jiban            float64
	Shijian          string

	HuanshouScore      float64
	LiangbiScore       float64
	JingzhanzuoScore   float64
	WeipipeiScore      float64
	JingjiajineScore   float64
	ZhulizengcangScore float64
	ZhangfuScore       float64
	TotalScore         float64
}

func BuildPiaos

func BuildPiaos(dataResource []map[string]interface{}) []*Piao

func ComputePiaos

func ComputePiaos(piaos []*Piao, computeData ComputeData) []*Piao

func (*Piao) GetTotalScore

func (p *Piao) GetTotalScore() float64

func (*Piao) Input

func (p *Piao) Input(row map[string]interface{})

type ReqQuery

type ReqQuery struct {
	Name string `toml:"name"`
	Ques string `toml:"ques"`
}

type RequestData

type RequestData struct {
	Question        string `json:"question"`
	Perpage         int    `json:"perpage"`
	Page            int    `json:"page"`
	SecondaryIntent string `json:"secondary_intent"`
	LogInfo         string `json:"log_info"`
	Iwcpro          int    `json:"iwcpro"`
	Source          string `json:"source"`
	Version         string `json:"version"`
	QueryArea       string `json:"query_area"`
	BlockList       string `json:"block_list"`
	AddInfo         string `json:"add_info"`
}

type ResData

type ResData struct {
	StatusCode int `json:"status_code"`
	Data       struct {
		Answer []struct {
			Txt []struct {
				Content struct {
					Components []struct {
						Data struct {
							Datas []map[string]interface{} `json:"datas"`
						} `json:"data"`
					} `json:"components"`
				} `json:"content"`
			} `json:"txt"`
		} `json:"answer"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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