services

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth is a service for authentication it breaks into 2 "modes" - allowed and trusted allowed mode is for "read" requests (GET, HEAD, OPTIONS) trusted mode is for "write" requests (PATCH, POST, PUT, DELETE)

func NewAuth

func NewAuth(allowedIPs, allowedUAs, trustedIPs []string, cacheTTL, cacheSize int, psdc *psd.Client) *Auth

NewAuth creates a new Auth service

func (*Auth) Middleware

func (a *Auth) Middleware() echo.MiddlewareFunc

Middleware returns a middleware for echo

type Cache

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

Cache is a middleware that caches responses according to the Docker Registry API v2 specification, cacheable endpoints and status codes.

func NewCache

func NewCache(ttl, size int) *Cache

NewCache returns a new Cache instance.

func (*Cache) Middleware

func (cache *Cache) Middleware() echo.MiddlewareFunc

Middleware returns a new echo.MiddlewareFunc that caches responses according to the Docker Registry API v2 specification, cacheable endpoints and status codes.

Jump to

Keyboard shortcuts

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