20 lines
354 B
Go
20 lines
354 B
Go
package rbac
|
|
|
|
type (
|
|
effective struct {
|
|
Resource Resource `json:"resource"`
|
|
Operation Operation `json:"operation"`
|
|
Allow bool `json:"allow"`
|
|
}
|
|
|
|
EffectiveSet []effective
|
|
)
|
|
|
|
func (ee *EffectiveSet) Push(res Resource, op Operation, allow bool) {
|
|
*ee = append(*ee, effective{
|
|
Resource: res,
|
|
Operation: op,
|
|
Allow: allow,
|
|
})
|
|
}
|