Documentation ¶
Index ¶
- func NotifyImageChange(i dim.RegistryIndex, w http.ResponseWriter, r *http.Request)
- func Search(i dim.RegistryIndex, w http.ResponseWriter, r *http.Request)
- func Version(ctx context.Context, w http.ResponseWriter, r *http.Request)
- type Authorization
- type Config
- type Credentials
- type DimHandlerFunc
- type RegistryProxy
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotifyImageChange ¶
func NotifyImageChange(i dim.RegistryIndex, w http.ResponseWriter, r *http.Request)
NotifyImageChange handles docker registry events
Types ¶
type Authorization ¶
type Authorization struct { Path string Method string Users []*Credentials // contains filtered or unexported fields }
Authorization defines restrictions to call a given URL
func GetAuthorization ¶
func GetAuthorization(req *http.Request, auths []*Authorization) *Authorization
GetAuthorization finds the first Authorization matching the request
func (*Authorization) Applies ¶
func (auth *Authorization) Applies(req *http.Request) bool
Applies indicates this Authorization matches the given request
func (*Authorization) CompilePath ¶
func (auth *Authorization) CompilePath() error
CompilePath compiles this Authorization Path member as a regexp
type Config ¶
type Config struct { Port string Authorizations []*Authorization }
Config holds server configuration
type Credentials ¶
type Credentials struct {
Username, Password string
}
Credentials define a user credentials who can be granted authorizations
type DimHandlerFunc ¶
type DimHandlerFunc func(i dim.RegistryIndex, w http.ResponseWriter, r *http.Request)
DimHandlerFunc injects index into a HandlerFunc function
type RegistryProxy ¶
type RegistryProxy struct {
// contains filtered or unexported fields
}
RegistryProxy controls access to registry endpoints and forwards request when user is granted
func NewRegistryProxy ¶
func NewRegistryProxy(registryURL *url.URL, username, password string) *RegistryProxy
NewRegistryProxy creates a RegistryProxy instance
func (*RegistryProxy) Forwards ¶
func (rp *RegistryProxy) Forwards(w http.ResponseWriter, r *http.Request)
Forwards sends request to the actual docker registry
type Server ¶
type Server struct { *manners.GracefulServer // contains filtered or unexported fields }
Server type handle indexation of a docker registry and serves the search endpoint