Versions in this module Expand all Collapse all v1 v1.0.1 Feb 3, 2021 v1.0.0 Jan 18, 2021 Changes in this version + const TopicAuthorization + const TopicResource + const TopicUser + type Authorization struct + IsDeletable bool + IsHeritable bool + IsOwner bool + IsUpdatable bool + Operations string + Resource Resource + ResourceId int + UserId int + type Model interface + CreateAuthorization func(userCode, userType, resourceCode, resourceType, operations string, ...) error + CreateResource func(userCode, userType, resourceCode, resourceType, parentCode, parentType string) error + CreateUser func(userCode, userType, parentCode, parentType string) error + DeleteAuthorization func(userCode, userType, resourceCode, resourceType string) error + DeleteResource func(resourceCode, resourceType string) error + DeleteUser func(userCode, userType string) error + GetAuthorization func(userCode, userType, resourceCode, resourceType string) (*Authorization, error) + GetAuthorizationList func(userCode, userType string) ([]*Authorization, error) + GetAuthorizationListByResourceType func(userCode, userType, resourceType string) ([]*Authorization, error) + GetResource func(resourceCode, resourceType string) (*Resource, error) + GetUser func(userCode, userType string) (*User, error) + GetUserListByResource func(resourceCode, resourceType string) ([]*User, error) + func New(db database.Database) (Model, error) + type Resource struct + ParentId int + ResourceCode string + ResourceType string + type User struct + ParentId int + UserCode string + UserType string + type UserWithAuthorization struct + AuthorizationMap map[int]*Authorization