|
|
@@ -0,0 +1,127 @@
|
|
|
+package aegis
|
|
|
+
|
|
|
+//Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
+//you may not use this file except in compliance with the License.
|
|
|
+//You may obtain a copy of the License at
|
|
|
+//
|
|
|
+//http://www.apache.org/licenses/LICENSE-2.0
|
|
|
+//
|
|
|
+//Unless required by applicable law or agreed to in writing, software
|
|
|
+//distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
+//See the License for the specific language governing permissions and
|
|
|
+//limitations under the License.
|
|
|
+//
|
|
|
+// Code generated by Alibaba Cloud SDK Code Generator.
|
|
|
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
|
+
|
|
|
+import (
|
|
|
+ "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
|
|
+ "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
|
+)
|
|
|
+
|
|
|
+func (client *Client) DescribeVulDetails(request *DescribeVulDetailsRequest) (response *DescribeVulDetailsResponse, err error) {
|
|
|
+ response = CreateDescribeVulDetailsResponse()
|
|
|
+ err = client.DoAction(request, response)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+func (client *Client) DescribeVulDetailsWithChan(request *DescribeVulDetailsRequest) (<-chan *DescribeVulDetailsResponse, <-chan error) {
|
|
|
+ responseChan := make(chan *DescribeVulDetailsResponse, 1)
|
|
|
+ errChan := make(chan error, 1)
|
|
|
+ err := client.AddAsyncTask(func() {
|
|
|
+ defer close(responseChan)
|
|
|
+ defer close(errChan)
|
|
|
+ response, err := client.DescribeVulDetails(request)
|
|
|
+ if err != nil {
|
|
|
+ errChan <- err
|
|
|
+ } else {
|
|
|
+ responseChan <- response
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if err != nil {
|
|
|
+ errChan <- err
|
|
|
+ close(responseChan)
|
|
|
+ close(errChan)
|
|
|
+ }
|
|
|
+ return responseChan, errChan
|
|
|
+}
|
|
|
+
|
|
|
+func (client *Client) DescribeVulDetailsWithCallback(request *DescribeVulDetailsRequest, callback func(response *DescribeVulDetailsResponse, err error)) <-chan int {
|
|
|
+ result := make(chan int, 1)
|
|
|
+ err := client.AddAsyncTask(func() {
|
|
|
+ var response *DescribeVulDetailsResponse
|
|
|
+ var err error
|
|
|
+ defer close(result)
|
|
|
+ response, err = client.DescribeVulDetails(request)
|
|
|
+ callback(response, err)
|
|
|
+ result <- 1
|
|
|
+ })
|
|
|
+ if err != nil {
|
|
|
+ defer close(result)
|
|
|
+ callback(nil, err)
|
|
|
+ result <- 0
|
|
|
+ }
|
|
|
+ return result
|
|
|
+}
|
|
|
+
|
|
|
+type DescribeVulDetailsRequest struct {
|
|
|
+ *requests.RpcRequest
|
|
|
+ SourceIp string `position:"Query" name:"SourceIp"`
|
|
|
+ ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
|
|
|
+ Type string `position:"Query" name:"Type"`
|
|
|
+ Uuids string `position:"Query" name:"Uuids"`
|
|
|
+ Name string `position:"Query" name:"Name"`
|
|
|
+ PatchId requests.Integer `position:"Query" name:"PatchId"`
|
|
|
+ Level string `position:"Query" name:"Level"`
|
|
|
+ Product string `position:"Query" name:"Product"`
|
|
|
+ LastTsStart requests.Integer `position:"Query" name:"LastTsStart"`
|
|
|
+ LastTsEnd requests.Integer `position:"Query" name:"LastTsEnd"`
|
|
|
+ StatusList string `position:"Query" name:"StatusList"`
|
|
|
+ OrderBy string `position:"Query" name:"OrderBy"`
|
|
|
+ Direction string `position:"Query" name:"Direction"`
|
|
|
+ AliasName string `position:"Query" name:"AliasName"`
|
|
|
+ BatchName string `position:"Query" name:"BatchName"`
|
|
|
+ Resource string `position:"Query" name:"Resource"`
|
|
|
+ Necessity string `position:"Query" name:"Necessity"`
|
|
|
+ Dealed string `position:"Query" name:"Dealed"`
|
|
|
+ Lang string `position:"Query" name:"Lang"`
|
|
|
+ CurrentPage requests.Integer `position:"Query" name:"CurrentPage"`
|
|
|
+ PageSize requests.Integer `position:"Query" name:"PageSize"`
|
|
|
+}
|
|
|
+
|
|
|
+type DescribeVulDetailsResponse struct {
|
|
|
+ *responses.BaseResponse
|
|
|
+ RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
+ Name string `json:"Name" xml:"Name"`
|
|
|
+ AliasName string `json:"AliasName" xml:"AliasName"`
|
|
|
+ Level string `json:"Level" xml:"Level"`
|
|
|
+ VulPublishTs int `json:"VulPublishTs" xml:"VulPublishTs"`
|
|
|
+ Type string `json:"Type" xml:"Type"`
|
|
|
+ Product string `json:"Product" xml:"Product"`
|
|
|
+ HasPatch bool `json:"HasPatch" xml:"HasPatch"`
|
|
|
+ PatchPublishTs int `json:"PatchPublishTs" xml:"PatchPublishTs"`
|
|
|
+ PatchSource string `json:"PatchSource" xml:"PatchSource"`
|
|
|
+ Cvss string `json:"Cvss" xml:"Cvss"`
|
|
|
+ CveIds string `json:"CveIds" xml:"CveIds"`
|
|
|
+ Advice string `json:"Advice" xml:"Advice"`
|
|
|
+ Description string `json:"Description" xml:"Description"`
|
|
|
+ PendingCount int `json:"PendingCount" xml:"PendingCount"`
|
|
|
+ HandledCount int `json:"HandledCount" xml:"HandledCount"`
|
|
|
+ CveLists []string `json:"CveLists" xml:"CveLists"`
|
|
|
+}
|
|
|
+
|
|
|
+func CreateDescribeVulDetailsRequest() (request *DescribeVulDetailsRequest) {
|
|
|
+ request = &DescribeVulDetailsRequest{
|
|
|
+ RpcRequest: &requests.RpcRequest{},
|
|
|
+ }
|
|
|
+ request.InitWithApiInfo("aegis", "2016-11-11", "DescribeVulDetails", "vipaegis", "openAPI")
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+func CreateDescribeVulDetailsResponse() (response *DescribeVulDetailsResponse) {
|
|
|
+ response = &DescribeVulDetailsResponse{
|
|
|
+ BaseResponse: &responses.BaseResponse{},
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|