basicly implement acl crud ops with roles and resources
This commit is contained in:
21
internal/acl/errors.go
Normal file
21
internal/acl/errors.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package acl
|
||||
|
||||
// TODO: add more specific errors
|
||||
|
||||
import "fmt"
|
||||
|
||||
var (
|
||||
ErrNotInitialized = fmt.Errorf("acl service is not initialized")
|
||||
|
||||
ErrRoleNotFound = fmt.Errorf("role not found")
|
||||
ErrRoleAlreadyExists = fmt.Errorf("role already exists")
|
||||
ErrInvalidRoleName = fmt.Errorf("role name is invalid")
|
||||
ErrSameRoleName = fmt.Errorf("role name is the same as another role")
|
||||
ErrRoleInUse = fmt.Errorf("role is in use")
|
||||
|
||||
ErrResourceNotFound = fmt.Errorf("resource not found")
|
||||
ErrResourceAlreadyExists = fmt.Errorf("resource already exists")
|
||||
ErrInvalidResourceKey = fmt.Errorf("invalid resource key")
|
||||
ErrResourceInUse = fmt.Errorf("resource is in use")
|
||||
ErrSameResourceKey = fmt.Errorf("resource key is the same as another resource")
|
||||
)
|
||||
Reference in New Issue
Block a user