-
-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathapi_apaas_application_audit_log_audit_log_list.go
More file actions
138 lines (126 loc) · 12 KB
/
Copy pathapi_apaas_application_audit_log_audit_log_list.go
File metadata and controls
138 lines (126 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
* Copyright 2022 chyroc
*
* 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.
*/
package lark
import (
"context"
)
// ListAPaaSApplicationAuditLogAuditLog 根据搜索/筛选条件, 查询审计日志列表
//
// 每次最多可查询 10, 000 条数据
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/audit_log_list
// new doc: https://open.feishu.cn/document/apaas-v1/application-audit_log/audit_log_list
func (r *APaaSService) ListAPaaSApplicationAuditLogAuditLog(ctx context.Context, request *ListAPaaSApplicationAuditLogAuditLogReq, options ...MethodOptionFunc) (*ListAPaaSApplicationAuditLogAuditLogResp, *Response, error) {
if r.cli.mock.mockAPaaSListAPaaSApplicationAuditLogAuditLog != nil {
r.cli.Log(ctx, LogLevelDebug, "[lark] APaaS#ListAPaaSApplicationAuditLogAuditLog mock enable")
return r.cli.mock.mockAPaaSListAPaaSApplicationAuditLogAuditLog(ctx, request, options...)
}
req := &RawRequestReq{
Scope: "APaaS",
API: "ListAPaaSApplicationAuditLogAuditLog",
Method: "GET",
URL: r.cli.openBaseURL + "/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list",
Body: request,
MethodOption: newMethodOption(options),
NeedUserAccessToken: true,
}
resp := new(listAPaaSApplicationAuditLogAuditLogResp)
response, err := r.cli.RawRequest(ctx, req, resp)
return resp.Data, response, err
}
// MockAPaaSListAPaaSApplicationAuditLogAuditLog mock APaaSListAPaaSApplicationAuditLogAuditLog method
func (r *Mock) MockAPaaSListAPaaSApplicationAuditLogAuditLog(f func(ctx context.Context, request *ListAPaaSApplicationAuditLogAuditLogReq, options ...MethodOptionFunc) (*ListAPaaSApplicationAuditLogAuditLogResp, *Response, error)) {
r.mockAPaaSListAPaaSApplicationAuditLogAuditLog = f
}
// UnMockAPaaSListAPaaSApplicationAuditLogAuditLog un-mock APaaSListAPaaSApplicationAuditLogAuditLog method
func (r *Mock) UnMockAPaaSListAPaaSApplicationAuditLogAuditLog() {
r.mockAPaaSListAPaaSApplicationAuditLogAuditLog = nil
}
// ListAPaaSApplicationAuditLogAuditLogReq ...
type ListAPaaSApplicationAuditLogAuditLogReq struct {
Namespace string `path:"namespace" json:"-"` // 应用命名空间示例值: "package_aa_bb" 长度范围: `0` ~ `30` 字符
PageSize int64 `query:"page_size" json:"-"` // 分页大小示例值: 10
Offset string `query:"offset" json:"-"` // 翻页数量示例值: 0 长度范围: `0` ~ `100` 字符
QuickQuery *string `query:"quick_query" json:"-"` // 模糊查询示例值: Intel Mac OS 长度范围: `0` ~ `1000` 字符
From string `query:"from" json:"-"` // 查询时间范围: 开始时间(单位为毫秒级时间戳)示例值: 1723691857002 长度范围: `0` ~ `1000` 字符
To string `query:"to" json:"-"` // 查询时间范围: 结束时间(单位为毫秒级时间戳)示例值: 1724296657002 长度范围: `0` ~ `1000` 字符
LogType string `query:"log_type" json:"-"` // 日志类型: 10000: 全部日志- 10001: 企业管理日志- 10002: 登录日志- 10003: 应用管理日志示例值: 10000 长度范围: `0` ~ `1000` 字符
Filter *string `query:"filter" json:"-"` // 日志查询: 筛选能力示例值: {"items":[{"left":"eventName", "operator":"=", "right":[19001]}]} 长度范围: `0` ~ `1000` 字符
Columns []string `query:"columns" json:"-"` // 日志列表: 选择展示行信息, 例如["opTime", "appName", "eventName", "clientIP", "operator", "status"]示例值: operator 长度范围: `0` ~ `1000`
SortBy *string `query:"sort_by" json:"-"` // 查询排序字段: 可选项为操作时间(opTime)示例值: opTime 长度范围: `0` ~ `1000` 字符
SortOrder *string `query:"sort_order" json:"-"` // 查询排序: 默认按时间从大到小;从小到大使用 asc示例值: asc 长度范围: `0` ~ `1000` 字符
AppType *string `query:"app_type" json:"-"` // 应用类型, 0为apaas类型, 1为aily类型示例值: 0 长度范围: `0` ~ `1000` 字符
}
// ListAPaaSApplicationAuditLogAuditLogResp ...
type ListAPaaSApplicationAuditLogAuditLogResp struct {
Items []*ListAPaaSApplicationAuditLogAuditLogRespItem `json:"items,omitempty"` // 审计日志查询结果列表详情信息
Total int64 `json:"total,omitempty"` // 审计日志查询总条数
}
// ListAPaaSApplicationAuditLogAuditLogRespItem ...
type ListAPaaSApplicationAuditLogAuditLogRespItem struct {
LogID string `json:"log_id,omitempty"` // 审计日志ID
OpTime string `json:"op_time,omitempty"` // 操作时间
LogType string `json:"log_type,omitempty"` // 日志类型: 10000: 全部日志- 10001: 企业管理日志- 10002: 登录日志- 10003: 应用管理日志
Operator *ListAPaaSApplicationAuditLogAuditLogRespItemOperator `json:"operator,omitempty"` // 操作人
Outsider bool `json:"outsider,omitempty"` // 是否为外部用户, true代表是外部用户
LoginType string `json:"login_type,omitempty"` // 登录类型:-11001: 飞书登录-11003: 账号密码登录
LarkTenantID string `json:"lark_tenant_id,omitempty"` // 飞书租户ID
ApaasTenantID string `json:"apaas_tenant_id,omitempty"` // apaas租户ID
UserGeo string `json:"user_geo,omitempty"` // 用户地理信息
ClientIp string `json:"client_ip,omitempty"` // 客户端IP
IpLoc string `json:"ip_loc,omitempty"` // IP位置
IpProvider string `json:"ip_provider,omitempty"` // IP提供商
Referer string `json:"referer,omitempty"` // 引用页面
Origin string `json:"origin,omitempty"` // 源页面
ApiPath string `json:"api_path,omitempty"` // 路由路径
FullPath string `json:"full_path,omitempty"` // 网关路径
UserAgent string `json:"user_agent,omitempty"` // 用户代理
DeviceID string `json:"device_id,omitempty"` // 设备ID
WebDeviceID string `json:"web_device_id,omitempty"` // web端设备ID
TerminalType string `json:"terminal_type,omitempty"` // 终端类型:- 13002: PC类型- 13003: Web类型
OsType string `json:"os_type,omitempty"` // 系统类型:- 14002: window- 14001: 未知
OsVersion string `json:"os_version,omitempty"` // 系统版本
Module string `json:"module,omitempty"` // 功能模块
DataObject string `json:"data_object,omitempty"` // 数据对象
AuditScope string `json:"audit_scope,omitempty"` // 审计域:- 15001: 企业管理后台- 15002: 应用管理后台- 15003: 应用开发平台
TenantID string `json:"tenant_id,omitempty"` // 租户ID
Namespace string `json:"namespace,omitempty"` // 应用唯一标识
EnvType string `json:"env_type,omitempty"` // 环境类型:- 16001: 沙箱环境- 16003: 线上环境
OpType string `json:"op_type,omitempty"` // 事件类型
OpDetail interface{} `json:"op_detail,omitempty"` // 操作详情内容
OpSource string `json:"op_source,omitempty"` // 操作源:- 20001: 前端- 20004: openapi
Status string `json:"status,omitempty"` // 操作状态:- 18001: 成功- 18002: 失败
FailedReasonI18n interface{} `json:"failed_reason_i18n,omitempty"` // 失败原因
DataChanges []string `json:"data_changes,omitempty"` // 数据变化(旧值和新值)
AppName interface{} `json:"app_name,omitempty"` // 应用名称
KeywordFieldAppVersion string `json:"keyword_field_app_version,omitempty"` // 应用版本号
KeywordFieldFunctionalSubModule string `json:"keyword_field_functional_sub_module,omitempty"` // 审计日志事件子模块
}
// ListAPaaSApplicationAuditLogAuditLogRespItemOperator ...
type ListAPaaSApplicationAuditLogAuditLogRespItemOperator struct {
ID string `json:"id,omitempty"` // 用户ID
Name string `json:"name,omitempty"` // 用户名称
TenantID string `json:"tenant_id,omitempty"` // 租户ID
Email string `json:"email,omitempty"` // 用户邮箱
}
// listAPaaSApplicationAuditLogAuditLogResp ...
type listAPaaSApplicationAuditLogAuditLogResp struct {
Code int64 `json:"code,omitempty"` // 错误码, 非 0 表示失败
Msg string `json:"msg,omitempty"` // 错误描述
Data *ListAPaaSApplicationAuditLogAuditLogResp `json:"data,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
}