-
Notifications
You must be signed in to change notification settings - Fork 1
/
permission.pb.go
149 lines (133 loc) · 5.78 KB
/
permission.pb.go
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
139
140
141
142
143
144
145
146
147
148
149
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: permission.proto
package permission
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
//
//权限点
type Permission struct {
//
//权限点id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" form:"id"`
//
//系统名
System string `protobuf:"bytes,2,opt,name=system,proto3" json:"system" form:"system"`
//
//需要鉴权的动作, 全局唯一
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action" form:"action"`
//
//权限备注
Remark string `protobuf:"bytes,4,opt,name=remark,proto3" json:"remark" form:"remark"`
//
//权限角色
Roles []string `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles" form:"roles"`
//
//单个资源结构参考PermissionResource. 如果依赖多个资源,资源间判定逻辑条件用%and或者%or来扩住。 比如: { "%or":[ { "system":"flow", "condition":{ "executeAuthorizers":"%user" }, "name":"flow" }, { "system":"tool", "condition":{ "executeAuthorizers":"%user" }, "name":"tool" } ] } 表示这个权限点依赖流程的执行授权白名单和工具的执行授权白名单才能鉴权成功。
Resource *types.Value `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource" form:"resource"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Permission) Reset() { *m = Permission{} }
func (m *Permission) String() string { return proto.CompactTextString(m) }
func (*Permission) ProtoMessage() {}
func (*Permission) Descriptor() ([]byte, []int) {
return fileDescriptor_c837ef01cbda0ad8, []int{0}
}
func (m *Permission) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Permission.Unmarshal(m, b)
}
func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Permission.Marshal(b, m, deterministic)
}
func (m *Permission) XXX_Merge(src proto.Message) {
xxx_messageInfo_Permission.Merge(m, src)
}
func (m *Permission) XXX_Size() int {
return xxx_messageInfo_Permission.Size(m)
}
func (m *Permission) XXX_DiscardUnknown() {
xxx_messageInfo_Permission.DiscardUnknown(m)
}
var xxx_messageInfo_Permission proto.InternalMessageInfo
func (m *Permission) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Permission) GetSystem() string {
if m != nil {
return m.System
}
return ""
}
func (m *Permission) GetAction() string {
if m != nil {
return m.Action
}
return ""
}
func (m *Permission) GetRemark() string {
if m != nil {
return m.Remark
}
return ""
}
func (m *Permission) GetRoles() []string {
if m != nil {
return m.Roles
}
return nil
}
func (m *Permission) GetResource() *types.Value {
if m != nil {
return m.Resource
}
return nil
}
func init() {
proto.RegisterType((*Permission)(nil), "permission.Permission")
}
func init() { proto.RegisterFile("permission.proto", fileDescriptor_c837ef01cbda0ad8) }
var fileDescriptor_c837ef01cbda0ad8 = []byte{
// 366 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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