Add Enforcer interface
This commit is contained in:
parent
10df8d51b1
commit
930b84b557
@ -16,7 +16,7 @@ import (
|
||||
// The RestreamHandler type provides functions to interact with a Restreamer instance
|
||||
type RestreamHandler struct {
|
||||
restream restream.Restreamer
|
||||
iam iam.IAM
|
||||
iam iam.Enforcer
|
||||
}
|
||||
|
||||
// NewRestream return a new Restream type. You have to provide a valid Restreamer instance.
|
||||
|
||||
@ -5,8 +5,12 @@ import (
|
||||
"github.com/datarhei/core/v16/log"
|
||||
)
|
||||
|
||||
type IAM interface {
|
||||
type Enforcer interface {
|
||||
Enforce(name, domain, resource, action string) bool
|
||||
}
|
||||
|
||||
type IAM interface {
|
||||
Enforcer
|
||||
|
||||
HasDomain(domain string) bool
|
||||
ListDomains() []string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user