acl

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Overview

Package acl implements ACL functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRules added in v0.11.1

func ApplyRules(ctx context.Context, request interface{}, rules []RejectFunc) error

func NewACLMiddleware

func NewACLMiddleware(rules []RejectFunc) endpoint.Middleware

NewACLMiddleware creates a new ACL middleware using the provided reject funcs.

Types

type RejectFunc

type RejectFunc func(ctx context.Context, request interface{}) (reason error)

RejectFunc judges if to reject a request by the given context and request. Returns a reason if rejected, otherwise returns nil.

Jump to

Keyboard shortcuts

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