123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- package response
- //// Data struct represents the nested structure in the JSON data
- //type SmmData struct {
- // QuotaID string `json:"quota_id"`
- // QuotaName string `json:"quota_name"`
- // Mark string `json:"mark"`
- // Unit string `json:"unit"`
- // ValueType string `json:"value_type"`
- // Source string `json:"source"`
- // ListOrder int `json:"list_order"`
- // DataStart string `json:"data_start"`
- // DataEnd string `json:"data_end"`
- // Frequency string `json:"frequency"`
- // Precision int `json:"precision"`
- // TypeCode string `json:"type_code"`
- // TypeName string `json:"type_name"`
- // TypeCodeAll string `json:"type_code_all"`
- // TypeAll string `json:"type_all"`
- // Tags string `json:"tags"`
- // AuthStart string `json:"auth_start"`
- // AuthFinish string `json:"auth_finish"`
- // AuthLang string `json:"auth_lang"`
- // AuthModule string `json:"auth_module"`
- // DataDur string `json:"data_dur"`
- // Spec string `json:"spec"`
- // Area string `json:"area"`
- // DataState string `json:"data_state"`
- // UpdateRule UpdateRule `json:"update_rule"`
- //}
- //
- //// ResponseData struct represents the structure of the "data" field in the JSON data
- //type SmmList struct {
- // Total int `json:"total"`
- // CurrentPage int `json:"current_page"`
- // PageSize int `json:"page_size"`
- // PageCount int `json:"page_count"`
- // Data []SmmData `json:"data"`
- //}
- //
- //// Response struct represents the overall structure of the JSON data
- //type SmmListResponse struct {
- // Code int `json:"code"`
- // Msg string `json:"msg"`
- // Data SmmList `json:"data"`
- //}
- // Data is a struct that represents the data field in the JSON string
- type Data struct {
- Date string `json:"date"`
- Value string `json:"value"`
- Create string `json:"create"`
- }
- // Quota is a struct that represents the quota information in the JSON string
- type Quota struct {
- QuotaID string `json:"quota_id"`
- QuotaName string `json:"quota_name"`
- Unit string `json:"unit"`
- Frequency string `json:"frequency"`
- ValueType string `json:"value_type"`
- Precision int `json:"precision"`
- PermState int `json:"perm_state"`
- Data []Data `json:"data"`
- }
- // Response is a struct that represents the whole JSON string
- type SmmResponse struct {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Quota []Quota `json:"data"`
- }
- type UpdateRule struct {
- RuleDesc string `json:"rule_desc"`
- Notice string `json:"notice"`
- ReleaseTime string `json:"release_time"`
- RuleInfo UpdateRuleInfo `json:"rule_info"`
- }
- type UpdateRuleInfo struct {
- UpdCal string `json:"upd_cal"`
- UpdCalUnit string `json:"upd_cal_unit"`
- PeriodOffset int `json:"period_offset"`
- UpdCount int `json:"upd_count"`
- }
- type DataItem struct {
- QuotaID string `json:"quota_id"`
- QuotaName string `json:"quota_name"`
- Mark string `json:"mark"`
- Unit string `json:"unit"`
- ValueType string `json:"value_type"`
- Source string `json:"source"`
- ListOrder int `json:"list_order"`
- DataStart string `json:"data_start"`
- DataEnd string `json:"data_end"`
- Frequency string `json:"frequency"`
- TypeAll string `json:"type_all"`
- Tags string `json:"tags"`
- AuthStart string `json:"auth_start"`
- AuthFinish string `json:"auth_finish"`
- AuthLang string `json:"auth_lang"`
- AuthModule string `json:"auth_module"`
- DataDur string `json:"data_dur"`
- DataState string `json:"data_state"`
- UpdateRule UpdateRule `json:"update_rule"`
- }
- type ListData struct {
- Total int `json:"total"`
- CurrentPage int `json:"current_page"`
- PageSize int `json:"page_size"`
- PageCount int `json:"page_count"`
- Data []DataItem `json:"data"`
- }
- type SmmIndexListResponse struct {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data ListData `json:"data"`
- }
- type SmmLatestDataResponse struct {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data SmmLatestData `json:"data"`
- }
- type SmmLatestData struct {
- DataLen int `json:"data_len"`
- DataList []Datum `json:"data_list"`
- }
- type Datum struct {
- QuotaID string `json:"quota_id"`
- Date string `json:"date"`
- Value string `json:"value"`
- Mark string `json:"mark"`
- Create string `json:"create"`
- Update string `json:"update"`
- }
|