Debian Codegraph @

pvtz/changeLogs.go

raw symbols SCIP
1 package pvtz
2
3 import (
4 "github.com/denverdino/aliyungo/common"
5 "github.com/denverdino/aliyungo/util"
6 )
7
8 type DescribeChangeLogsArgs struct {
9 StartTime int64
10 EndTime int64
11 EntityType string
12 Keyword string
13 Lang string
14 UserClientIp string
15 common.Pagination
16 }
17
18 //
19 type ChangeLogType struct {
20 OperTimestamp int64
21 OperAction string
22 OperObject string
23 EntityId string
24 EntityName string
25 OperIp string
26 OperTime util.ISO6801Time
27 Id int64
28 Content string
29 IsPtr bool
30 RecordCount int
31 }
32
33 type DescribeChangeLogsResponse struct {
34 common.Response
35 common.PaginationResult
36 ChangeLogs struct {
37 ChangeLog []ChangeLogType
38 }
39 }
40
41 // DescribeChangeLogs describes change logs
42 //
43 // You can read doc at https://help.aliyun.com/document_detail/66253.html
44 func (client *Client) DescribeChangeLogs(args *DescribeChangeLogsArgs) (logs []ChangeLogType, err error) {
45
46 result := []ChangeLogType{}
47
48 for {
49 response := DescribeChangeLogsResponse{}
50 err = client.Invoke("DescribeChangeLogs", args, &response)
51
52 if err != nil {
53 return result, err
54 }
55
56 result = append(result, response.ChangeLogs.ChangeLog...)
57
58 nextPage := response.PaginationResult.NextPage()
59 if nextPage == nil {
60 break
61 }
62 args.Pagination = *nextPage
63 }
64
65 return result, nil
66 }