Documentation ¶
Index ¶
Constants ¶
View Source
const ( AdminPermission = "ADMIN" AuthenticatedPermission = "AUTHENTICATED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlwaysAllow ¶
type AlwaysAllow struct{}
func Always ¶
func Always() *AlwaysAllow
func (*AlwaysAllow) IsAllowed ¶
func (a *AlwaysAllow) IsAllowed(_ ...string) bool
type RequireAdmin ¶
type RequireAdmin struct{}
func IsAdmin ¶
func IsAdmin() *RequireAdmin
func (*RequireAdmin) IsAllowed ¶
func (ia *RequireAdmin) IsAllowed(identityPerms ...string) bool
type RequireAll ¶
type RequireAll struct {
// contains filtered or unexported fields
}
func NewRequireAll ¶
func NewRequireAll(perms ...string) *RequireAll
func (*RequireAll) IsAllowed ¶
func (ra *RequireAll) IsAllowed(identityPerms ...string) bool
type RequireAuthenticated ¶
type RequireAuthenticated struct{}
func IsAuthenticated ¶
func IsAuthenticated() *RequireAuthenticated
func (*RequireAuthenticated) IsAllowed ¶
func (ir *RequireAuthenticated) IsAllowed(identityPerms ...string) bool
type RequireOne ¶
type RequireOne struct {
// contains filtered or unexported fields
}
func NewRequireOne ¶
func NewRequireOne(perms ...string) *RequireOne
func (*RequireOne) IsAllowed ¶
func (ro *RequireOne) IsAllowed(identityPerms ...string) bool
Click to show internal directories.
Click to hide internal directories.