77 "github.com/gofrs/uuid"
88
99 "userclouds.com/infra/namespace/region"
10- "userclouds.com/infra/pagination"
1110 "userclouds.com/infra/ucdb"
1211 "userclouds.com/infra/ucerr"
1312)
@@ -19,16 +18,6 @@ type ObjectType struct {
1918 TypeName string `db:"type_name" json:"type_name" validate:"notempty" required:"true"`
2019}
2120
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-
3221// EqualsIgnoringID returns true if two object types are equal, ignoring the ID field
3322func (ot * ObjectType ) EqualsIgnoringID (other * ObjectType ) bool {
3423 return ot .TypeName == other .TypeName
@@ -140,19 +129,6 @@ func (e *EdgeType) EqualsIgnoringID(other *EdgeType) bool {
140129
141130//go:generate genvalidate EdgeType
142131
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-
156132// Object represents an instance of an AuthZ object used for modeling permissions.
157133type Object struct {
158134 ucdb.BaseModel
@@ -176,18 +152,6 @@ func (o *Object) EqualsIgnoringID(other *Object) bool {
176152
177153//go:generate genvalidate Object
178154
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-
191155// Edge represents a directional relationship between a "source"
192156// object and a "target" object.
193157type Edge struct {
@@ -207,17 +171,6 @@ func (e *Edge) EqualsIgnoringID(other *Edge) bool {
207171
208172//go:generate genvalidate Edge
209173
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-
221174// Organization defines a collection of objects inside of a single AuthZ namespace.
222175// Uniqueness (of eg. Object aliases) is enforced by organization, rather than globally in a tenant
223176type Organization struct {
@@ -229,16 +182,6 @@ type Organization struct {
229182
230183//go:generate genvalidate Organization
231184
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-
242185//go:generate genvalidate CreateObjectTypeRequest
243186
244187//go:generate genvalidate CreateEdgeTypeRequest
0 commit comments