ip

package
v0.53.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ip provides IP-based authorization middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFunc

func HandlerFunc(cfg authz.NetworkACLConfig, next http.Handler) http.HandlerFunc

HandlerFunc creates an IP-based authorization-wrapped HTTP handler function.

Types

type Handler added in v0.37.0

type Handler struct {
	Authoriser *authz.NetworkACL
}

Handler implements IP-based authorization for HTTP servers.

func NewHandler added in v0.37.0

func NewHandler(cfg authz.NetworkACLConfig) *Handler

NewHandler creates a new IP-based authorization handler.

func (*Handler) AuthRequest added in v0.37.0

func (h *Handler) AuthRequest(r *http.Request) (stdctx.Context, error)

AuthRequest checks if an HTTP request is authorized based on the remote IP address.

func (*Handler) Wrap added in v0.37.0

func (h *Handler) Wrap(handler http.Handler) http.Handler

Wrap wraps an HTTP handler with IP-based authorization middleware.

Jump to

Keyboard shortcuts

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