|
@@ -2,6 +2,21 @@ package datacenter_client
|
|
|
|
|
|
type (
|
|
type (
|
|
// 公共部分
|
|
// 公共部分
|
|
|
|
+ Pagination struct {
|
|
|
|
+ Current uint32 `json:"current"`
|
|
|
|
+ PageSize uint32 `json:"pageSize"`
|
|
|
|
+ Total uint32 `json:"total"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ AppInfo struct {
|
|
|
|
+ Id int64 `json:"id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ ProjectIds []int64 `json:"project_ids"`
|
|
|
|
+ Secret string `json:"secret"`
|
|
|
|
+ Status int64 `json:"status"`
|
|
|
|
+ ExpireAt string `json:"expire_at"`
|
|
|
|
+ CTime string `json:"c_time"`
|
|
|
|
+ }
|
|
|
|
|
|
ItemHistoryResp struct {
|
|
ItemHistoryResp struct {
|
|
ProjectId int `json:"project_id"`
|
|
ProjectId int `json:"project_id"`
|
|
@@ -205,6 +220,57 @@ type (
|
|
MaxVal float64 `json:"max_val"`
|
|
MaxVal float64 `json:"max_val"`
|
|
MinVal float64 `json:"min_val"`
|
|
MinVal float64 `json:"min_val"`
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ FindAppListReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ Page int64 `json:"page"`
|
|
|
|
+ PageSize int64 `json:"page_size"`
|
|
|
|
+ Order string `json:"order"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ GetAppInfoReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ CreateAppInfoReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ ProjectIds []int64 `json:"project_ids"`
|
|
|
|
+ Expire int64 `json:"expire"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ RemoveAppInfoReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DisableAppInfoReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ EnableAppInfoReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ResetAppSecretReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ExpireAppSecretReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ Expire int64 `json:"expire"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ResetAppProjectReq struct {
|
|
|
|
+ ProjectId int64 `json:"project_id"`
|
|
|
|
+ AppName string `json:"app_name"`
|
|
|
|
+ ProjectIds []int64 `json:"project_ids"`
|
|
|
|
+ }
|
|
)
|
|
)
|
|
|
|
|
|
type (
|
|
type (
|
|
@@ -291,6 +357,79 @@ type (
|
|
Msg string `json:"msg"`
|
|
Msg string `json:"msg"`
|
|
Data ItemHistoryListRespList `json:"data"`
|
|
Data ItemHistoryListRespList `json:"data"`
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ FindAppListResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ List []*AppInfo `json:"list"`
|
|
|
|
+ Pagination *Pagination `json:"pagination"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ GetAppInfoResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ AppInfo *AppInfo `json:"app_info"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ CreateAppInfoResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ AppInfo *AppInfo `json:"app_info"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ RemoveAppInfoResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ Ok bool `json:"ok"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DisableAppInfoResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ Ok bool `json:"ok"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ EnableAppInfoResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ Ok bool `json:"ok"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ResetAppSecretResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ Secret string `json:"secret"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ExpireAppSecretResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ ExpireAt string `json:"expire_at"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ResetAppProjectResp struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Msg string `json:"msg"`
|
|
|
|
+ Data struct {
|
|
|
|
+ RemoveProjectIds []int64 `json:"remove_project_ids"`
|
|
|
|
+ } `json:"data"`
|
|
|
|
+ }
|
|
)
|
|
)
|
|
|
|
|
|
type (
|
|
type (
|
|
@@ -319,5 +458,15 @@ type (
|
|
GetWorkingPumpByCode(DcWorkingReq) (*GetWorkingPumpByCodeResp, error)
|
|
GetWorkingPumpByCode(DcWorkingReq) (*GetWorkingPumpByCodeResp, error)
|
|
// 平替双胞胎图表接口(时间区间内按要求聚合)
|
|
// 平替双胞胎图表接口(时间区间内按要求聚合)
|
|
GetItemHistoryList(ItemHistoryListReq) (resp []ItemHistoryListResp, err error)
|
|
GetItemHistoryList(ItemHistoryListReq) (resp []ItemHistoryListResp, err error)
|
|
|
|
+
|
|
|
|
+ FindAppList(FindAppListReq) (*FindAppListResp, error)
|
|
|
|
+ GetAppInfo(GetAppInfoReq) (*GetAppInfoResp, error)
|
|
|
|
+ CreateAppInfo(CreateAppInfoReq) (*CreateAppInfoResp, error)
|
|
|
|
+ RemoveAppInfo(RemoveAppInfoReq) (*RemoveAppInfoResp, error)
|
|
|
|
+ DisableAppInfo(DisableAppInfoReq) (*DisableAppInfoResp, error)
|
|
|
|
+ EnableAppInfo(EnableAppInfoReq) (*EnableAppInfoResp, error)
|
|
|
|
+ ResetAppSecret(ResetAppSecretReq) (*ResetAppSecretResp, error)
|
|
|
|
+ ExpireAppSecret(ExpireAppSecretReq) (*ExpireAppSecretResp, error)
|
|
|
|
+ ResetAppProject(ResetAppProjectReq) (*ResetAppProjectResp, error)
|
|
}
|
|
}
|
|
)
|
|
)
|