authz

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequireRoleMiddleware

type RequireRoleMiddleware struct {
	// contains filtered or unexported fields
}

func NewRequireRoleMiddleware

func NewRequireRoleMiddleware(role string, rolesFromCtx RolesFromContext) *RequireRoleMiddleware

func (*RequireRoleMiddleware) Handler

func (m *RequireRoleMiddleware) Handler(next http.Handler) http.Handler

type RolesFromContext

type RolesFromContext func(ctx context.Context) []string

RolesFromContext returns the roles associated with the current request context. Callers should return a stable slice (copy if needed) if the backing store is mutable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL