import "github.com/docker/docker/testutil/registry"
ops.go registry.go registry_mock.go
const ( // V2binary is the name of the registry v2 binary V2binary = "registry-v2" // V2binarySchema1 is the name of the registry that serve schema1 V2binarySchema1 = "registry-v2-schema1" // DefaultURL is the default url that will be used by the registry (if not specified otherwise) DefaultURL = "127.0.0.1:5000" )
Htpasswd sets the auth method with htpasswd
Schema1 sets the registry to serve v1 api
Token sets the auth method to token, with the specified token url
URL sets the registry url
WithStderr sets the stdout of the registry command to the passed in writer.
WithStdout sets the stdout of the registry command to the passed in writer.
type Config struct {
// contains filtered or unexported fields
}
Config contains the test registry configuration
type Mock struct {
// contains filtered or unexported fields
}
Mock represent a registry mock
NewMock creates a registry mock
Close closes mock and releases resources
RegisterHandler register the specified handler for the registry mock
URL returns the url of the registry
type V2 struct {
// contains filtered or unexported fields
}
V2 represent a registry version 2
NewV2 creates a v2 registry server
Close kills the registry server
Email returns the configured email of the server
Password returns the configured password of the server
Path returns the path where the registry write data
Ping sends an http request to the current registry, and fail if it doesn't respond correctly
ReadBlobContents read the file corresponding to the specified digest
TempMoveBlobData moves the existing data file aside, so that we can replace it with a malicious blob of data for example.
Username returns the configured user name of the server
WaitReady waits for the registry to be ready to serve requests (or fail after a while)
WriteBlobContents write the file corresponding to the specified digest with the given content
Package registry imports 15 packages (graph). Updated 2020-04-29. Refresh now. Tools for package owners.