7 Star 24 Fork 30

go-course / go8

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
operate.pb.go 13.43 KB
一键复制 编辑 原始数据 按行查看 历史
Mr.Yu 提交于 2022-10-29 09:43 . 补充maudit审计中间件
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: apps/operate/pb/operate.proto
package operate
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 操作日志
// Who When What(操作)
type OperateLog struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 用户域
// @gotags: json:"domain" bson:"domain" validate:"required"
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain" bson:"domain" validate:"required"`
// 用户所处空间
// @gotags: json:"namespace" bson:"namespace" validate:"required"
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace" bson:"namespace" validate:"required"`
// 操作人
// @gotags: json:"username" bson:"username" validate:"required"
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username" bson:"username" validate:"required"`
// 操作人
// @gotags: json:"user_agent" bson:"user_agent"
UserAgent string `protobuf:"bytes,4,opt,name=user_agent,json=userAgent,proto3" json:"user_agent" bson:"user_agent"`
// 操作时间, 毫秒的时间戳
// @gotags: json:"time" bson:"time"
Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time" bson:"time"`
// 操作资源类型
// @gotags: json:"resource_type" bson:"resource_type" validate:"required"
ResourceType string `protobuf:"bytes,6,opt,name=resource_type,json=resourceType,proto3" json:"resource_type" bson:"resource_type" validate:"required"`
// 操作资源类型
// @gotags: json:"resource_id" bson:"resource_id"
ResourceId string `protobuf:"bytes,7,opt,name=resource_id,json=resourceId,proto3" json:"resource_id" bson:"resource_id"`
// 执行的操作
// @gotags: json:"action" bson:"action" validate:"required"
Action string `protobuf:"bytes,8,opt,name=action,proto3" json:"action" bson:"action" validate:"required"`
// 执行的操作
// @gotags: json:"detail" bson:"detail"
Detail string `protobuf:"bytes,9,opt,name=detail,proto3" json:"detail" bson:"detail"`
// 请求参数 json string
// @gotags: json:"request" bson:"request"
Request string `protobuf:"bytes,11,opt,name=request,proto3" json:"request" bson:"request"`
// 响应参数 json string
// @gotags: json:"response" bson:"response"
Response string `protobuf:"bytes,12,opt,name=response,proto3" json:"response" bson:"response"`
// 执行的操作
// @gotags: json:"external" bson:"external"
External map[string]string `protobuf:"bytes,10,rep,name=external,proto3" json:"external" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"external"`
}
func (x *OperateLog) Reset() {
*x = OperateLog{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_operate_pb_operate_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OperateLog) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OperateLog) ProtoMessage() {}
func (x *OperateLog) ProtoReflect() protoreflect.Message {
mi := &file_apps_operate_pb_operate_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OperateLog.ProtoReflect.Descriptor instead.
func (*OperateLog) Descriptor() ([]byte, []int) {
return file_apps_operate_pb_operate_proto_rawDescGZIP(), []int{0}
}
func (x *OperateLog) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *OperateLog) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *OperateLog) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *OperateLog) GetUserAgent() string {
if x != nil {
return x.UserAgent
}
return ""
}
func (x *OperateLog) GetTime() int64 {
if x != nil {
return x.Time
}
return 0
}
func (x *OperateLog) GetResourceType() string {
if x != nil {
return x.ResourceType
}
return ""
}
func (x *OperateLog) GetResourceId() string {
if x != nil {
return x.ResourceId
}
return ""
}
func (x *OperateLog) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
func (x *OperateLog) GetDetail() string {
if x != nil {
return x.Detail
}
return ""
}
func (x *OperateLog) GetRequest() string {
if x != nil {
return x.Request
}
return ""
}
func (x *OperateLog) GetResponse() string {
if x != nil {
return x.Response
}
return ""
}
func (x *OperateLog) GetExternal() map[string]string {
if x != nil {
return x.External
}
return nil
}
type OperateLogSet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 总量
// @gotags: json:"total" bson:"total"
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
// 数据
// @gotags: json:"items" bson:"items"
Items []*OperateLog `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
}
func (x *OperateLogSet) Reset() {
*x = OperateLogSet{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_operate_pb_operate_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OperateLogSet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OperateLogSet) ProtoMessage() {}
func (x *OperateLogSet) ProtoReflect() protoreflect.Message {
mi := &file_apps_operate_pb_operate_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OperateLogSet.ProtoReflect.Descriptor instead.
func (*OperateLogSet) Descriptor() ([]byte, []int) {
return file_apps_operate_pb_operate_proto_rawDescGZIP(), []int{1}
}
func (x *OperateLogSet) GetTotal() int64 {
if x != nil {
return x.Total
}
return 0
}
func (x *OperateLogSet) GetItems() []*OperateLog {
if x != nil {
return x.Items
}
return nil
}
var File_apps_operate_pb_operate_proto protoreflect.FileDescriptor
var file_apps_operate_pb_operate_proto_rawDesc = []byte{
0x0a, 0x1d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2f, 0x70,
0x62, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x1b, 0x67, 0x6f, 0x38, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61,
0x75, 0x64, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x22, 0xcd, 0x03, 0x0a,
0x0a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x64,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a,
0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65,
0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x08,
0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35,
0x2e, 0x67, 0x6f, 0x38, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61,
0x75, 0x64, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x1a,
0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, 0x0a, 0x0d,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x12, 0x3d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x38, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75,
0x64, 0x2e, 0x6d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65,
0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x65, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x38, 0x2f, 0x70, 0x72,
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f,
0x6d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_apps_operate_pb_operate_proto_rawDescOnce sync.Once
file_apps_operate_pb_operate_proto_rawDescData = file_apps_operate_pb_operate_proto_rawDesc
)
func file_apps_operate_pb_operate_proto_rawDescGZIP() []byte {
file_apps_operate_pb_operate_proto_rawDescOnce.Do(func() {
file_apps_operate_pb_operate_proto_rawDescData = protoimpl.X.CompressGZIP(file_apps_operate_pb_operate_proto_rawDescData)
})
return file_apps_operate_pb_operate_proto_rawDescData
}
var file_apps_operate_pb_operate_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_apps_operate_pb_operate_proto_goTypes = []interface{}{
(*OperateLog)(nil), // 0: go8.devcloud.maudit.operate.OperateLog
(*OperateLogSet)(nil), // 1: go8.devcloud.maudit.operate.OperateLogSet
nil, // 2: go8.devcloud.maudit.operate.OperateLog.ExternalEntry
}
var file_apps_operate_pb_operate_proto_depIdxs = []int32{
2, // 0: go8.devcloud.maudit.operate.OperateLog.external:type_name -> go8.devcloud.maudit.operate.OperateLog.ExternalEntry
0, // 1: go8.devcloud.maudit.operate.OperateLogSet.items:type_name -> go8.devcloud.maudit.operate.OperateLog
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_apps_operate_pb_operate_proto_init() }
func file_apps_operate_pb_operate_proto_init() {
if File_apps_operate_pb_operate_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_apps_operate_pb_operate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OperateLog); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_operate_pb_operate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OperateLogSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_apps_operate_pb_operate_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_apps_operate_pb_operate_proto_goTypes,
DependencyIndexes: file_apps_operate_pb_operate_proto_depIdxs,
MessageInfos: file_apps_operate_pb_operate_proto_msgTypes,
}.Build()
File_apps_operate_pb_operate_proto = out.File
file_apps_operate_pb_operate_proto_rawDesc = nil
file_apps_operate_pb_operate_proto_goTypes = nil
file_apps_operate_pb_operate_proto_depIdxs = nil
}
Go
1
https://gitee.com/go-course/go8.git
git@gitee.com:go-course/go8.git
go-course
go8
go8
6a8978f41a84

搜索帮助