Documentation ¶
Index ¶
Constants ¶
View Source
const ( AdminPermission = "ADMIN" AuthenticatedPermission = "AUTHENTICATED" PartiallyAuthenticatePermission = "PARTIAL_AUTH" )
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
type RequireOneOf ¶ added in v0.17.52
type RequireOneOf struct {
// contains filtered or unexported fields
}
func HasOneOf ¶ added in v0.17.52
func HasOneOf(resolvers ...Resolver) *RequireOneOf
func (*RequireOneOf) IsAllowed ¶ added in v0.17.52
func (ia *RequireOneOf) IsAllowed(identityPerms ...string) bool
type RequirePartiallyAuthenticated ¶ added in v0.17.52
type RequirePartiallyAuthenticated struct{}
func IsPartiallyAuthenticated ¶ added in v0.17.52
func IsPartiallyAuthenticated() *RequirePartiallyAuthenticated
func (*RequirePartiallyAuthenticated) IsAllowed ¶ added in v0.17.52
func (ir *RequirePartiallyAuthenticated) IsAllowed(identityPerms ...string) bool
Click to show internal directories.
Click to hide internal directories.