7
7
"github.com/gofrs/uuid"
8
8
9
9
"userclouds.com/infra/namespace/region"
10
- "userclouds.com/infra/pagination"
11
10
"userclouds.com/infra/ucdb"
12
11
"userclouds.com/infra/ucerr"
13
12
)
@@ -19,16 +18,6 @@ type ObjectType struct {
19
18
TypeName string `db:"type_name" json:"type_name" validate:"notempty" required:"true"`
20
19
}
21
20
22
- // GetPaginationKeys is part of the pagination.PageableType interface
23
- func (ObjectType ) GetPaginationKeys () pagination.KeyTypes {
24
- return pagination.KeyTypes {
25
- "id" : pagination .UUIDKeyType ,
26
- "type_name" : pagination .StringKeyType ,
27
- "created" : pagination .TimestampKeyType ,
28
- "updated" : pagination .TimestampKeyType ,
29
- }
30
- }
31
-
32
21
// EqualsIgnoringID returns true if two object types are equal, ignoring the ID field
33
22
func (ot * ObjectType ) EqualsIgnoringID (other * ObjectType ) bool {
34
23
return ot .TypeName == other .TypeName
@@ -140,19 +129,6 @@ func (e *EdgeType) EqualsIgnoringID(other *EdgeType) bool {
140
129
141
130
//go:generate genvalidate EdgeType
142
131
143
- // GetPaginationKeys is part of the pagination.PageableType interface
144
- func (EdgeType ) GetPaginationKeys () pagination.KeyTypes {
145
- return pagination.KeyTypes {
146
- "id" : pagination .UUIDKeyType ,
147
- "type_name" : pagination .StringKeyType ,
148
- "organization_id" : pagination .UUIDKeyType ,
149
- "source_object_type_id" : pagination .UUIDKeyType ,
150
- "target_object_type_id" : pagination .UUIDKeyType ,
151
- "created" : pagination .TimestampKeyType ,
152
- "updated" : pagination .TimestampKeyType ,
153
- }
154
- }
155
-
156
132
// Object represents an instance of an AuthZ object used for modeling permissions.
157
133
type Object struct {
158
134
ucdb.BaseModel
@@ -176,18 +152,6 @@ func (o *Object) EqualsIgnoringID(other *Object) bool {
176
152
177
153
//go:generate genvalidate Object
178
154
179
- // GetPaginationKeys is part of the pagination.PageableType interface
180
- func (Object ) GetPaginationKeys () pagination.KeyTypes {
181
- return pagination.KeyTypes {
182
- "id" : pagination .UUIDKeyType ,
183
- "alias" : pagination .StringKeyType ,
184
- "organization_id" : pagination .UUIDKeyType ,
185
- "type_id" : pagination .UUIDKeyType ,
186
- "created" : pagination .TimestampKeyType ,
187
- "updated" : pagination .TimestampKeyType ,
188
- }
189
- }
190
-
191
155
// Edge represents a directional relationship between a "source"
192
156
// object and a "target" object.
193
157
type Edge struct {
@@ -207,17 +171,6 @@ func (e *Edge) EqualsIgnoringID(other *Edge) bool {
207
171
208
172
//go:generate genvalidate Edge
209
173
210
- // GetPaginationKeys is part of the pagination.PageableType interface
211
- func (Edge ) GetPaginationKeys () pagination.KeyTypes {
212
- return pagination.KeyTypes {
213
- "id" : pagination .UUIDKeyType ,
214
- "source_object_id" : pagination .UUIDKeyType ,
215
- "target_object_id" : pagination .UUIDKeyType ,
216
- "created" : pagination .TimestampKeyType ,
217
- "updated" : pagination .TimestampKeyType ,
218
- }
219
- }
220
-
221
174
// Organization defines a collection of objects inside of a single AuthZ namespace.
222
175
// Uniqueness (of eg. Object aliases) is enforced by organization, rather than globally in a tenant
223
176
type Organization struct {
@@ -229,16 +182,6 @@ type Organization struct {
229
182
230
183
//go:generate genvalidate Organization
231
184
232
- // GetPaginationKeys is part of the pagination.PageableType interface
233
- func (Organization ) GetPaginationKeys () pagination.KeyTypes {
234
- return pagination.KeyTypes {
235
- "id" : pagination .UUIDKeyType ,
236
- "name" : pagination .StringKeyType ,
237
- "created" : pagination .TimestampKeyType ,
238
- "updated" : pagination .TimestampKeyType ,
239
- }
240
- }
241
-
242
185
//go:generate genvalidate CreateObjectTypeRequest
243
186
244
187
//go:generate genvalidate CreateEdgeTypeRequest
0 commit comments