package
0.0.2
Repository: https://github.com/3scale/3scale-authorizer.git
Documentation: pkg.go.dev

# Functions

FailClosedPolicy denies authorization requests when the upstream 3scale is unavailable.
FailOpenPolicy authorizes requests when the upstream 3scale is unavailable.
NewBackend returns a cached backend which uses an in-memory cache.
NewLocalCache returns a LocalCache with its data store initialised.

# Constants

RejectionReasonHeader - This is used by authorization endpoints to provide a header that provides an error code describing the different reasons an authorization can be denied.

# Structs

Application defined under a 3scale service It is the responsibility of creator of an application to ensure that the counters for both remote and local state is sorted by ascending granularity.
Backend defines the connection to a single backend and maintains a cache for multiple services and applications per backend.
LocalCache is an implementation of Cacheable providing an in-memory cache.

# Interfaces

Cacheable defines the required behaviour of a Backend cache The cache key should be in the format of '<serviceID>_<applicationID>'.

# Type aliases

FailurePolicy is a function will be called when we have a cache miss and an error reaching the upstream 3scale.
LimitCounter keeps a count of limits for a given period.
UnlimitedCounter keeps a count of metrics without limits.