...

Package middleware

import "github.com/docker/distribution/registry/middleware/repository"
Overview
Index

Overview ▾

func Get

func Get(ctx context.Context, name string, options map[string]interface{}, repository distribution.Repository) (distribution.Repository, error)

Get constructs a RepositoryMiddleware with the given options using the named backend.

func Register

func Register(name string, initFunc InitFunc) error

Register is used to register an InitFunc for a RepositoryMiddleware backend with the given name.

type InitFunc

InitFunc is the type of a RepositoryMiddleware factory function and is used to register the constructor for different RepositoryMiddleware backends.

type InitFunc func(ctx context.Context, repository distribution.Repository, options map[string]interface{}) (distribution.Repository, error)