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, provider *AuthProvider) *Auth
NewAuth creates a new Auth service
func (*Auth) Middleware ¶
func (a *Auth) Middleware() echo.MiddlewareFunc
Middleware returns a middleware for echo
type AuthProvider ¶ added in v1.1.0
type AuthProvider struct {
// contains filtered or unexported fields
}
AuthProvider is an interface for authorization providers
func NewAuthProvider ¶ added in v1.1.0
func NewAuthProvider(url, login, password string) *AuthProvider
NewAuthProvider creates a new AuthProvider
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 (*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.