-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.go
48 lines (40 loc) · 1.85 KB
/
domain.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
package acl
import (
"time"
)
type Categories []*Category
type Category struct {
Name string `json:"name" db:"name"`
Key string `json:"key" db:"key"`
Description string `json:"description" db:"description"`
ParentResourceCategoryKey *string `json:"parent_resource_category_key,omitempty" db:"parent_resource_category_key"`
Active bool `json:"active" db:"active"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type Pages []*Page
type Page struct {
Name string `json:"name" db:"name"`
Key string `json:"key" db:"key"`
Description string `json:"description" db:"description"`
ParentResourcePageKey *string `json:"parent_resource_page_key,omitempty" db:"parent_resource_page_key"`
Active bool `json:"active" db:"active"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type Resources []*Resource
type Resource struct {
Name string `json:"name" db:"name"`
Key string `json:"key" db:"key"`
ResourceCategoryKey string `json:"resource_category_key" db:"resource_category_key"`
ResourcePageKey string `json:"resource_page_key" db:"resource_page_key"`
ResourceTypeKey string `json:"resource_type_key" db:"resource_type_key"`
Description string `json:"description" db:"description"`
Active bool `json:"active" db:"active"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type Allowed struct {
Check bool `db:"check"`
Allow bool `db:"allow"`
}