acl

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package acl provides access to Fastly ACLs.

See the Fastly ACL documentation for details.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates the requested ACL was not found.
	ErrNotFound = errors.New("acl: not found")

	// ErrInvalidHandle indicatest the ACL handle was invalid.
	ErrInvalidHandle = errors.New("acl: invalid handle")

	// ErrInvalidResponseBody indicates the looup response body was invalid.
	ErrInvalidResponseBody = errors.New("acl: invalid response body")

	// ErrInvalidArgument indicates the IP address was invalid.
	ErrInvalidArgument = errors.New("acl: invalid argument")

	// ErrNoContent indicates there was no entry for the provided IP address.
	ErrNoContent = errors.New("acl: no content")

	// ErrTooManyRequests indicates too many requests were made.
	ErrTooManyRequests = errors.New("acl: too many requests")

	// ErrUnexpected indicates an unexpected error occurred.
	ErrUnexpected = errors.New("acl: unexepected error")
)

Functions

This section is empty.

Types

type Handle

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

Handle is a handle for an ACL

func Open

func Open(name string) (*Handle, error)

Open returns a handle to the named ACL.

func (*Handle) Lookup

func (h *Handle) Lookup(ip net.IP) (Response, error)

Lookup the given IP in the ACL and returns the response. If no match was found, returns ErrNoContent.

type Response

type Response struct {
	Prefix string // Matching prefix in CIDR notation
	Action string // Associated prefix's action
}

Response is an ACL lookup response

Jump to

Keyboard shortcuts

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