acl

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package acl implements ACL functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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