github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/internal/test/registry/ops.go (about)

     1  package registry
     2  
     3  // Schema1 sets the registry to serve v1 api
     4  func Schema1(c *Config) {
     5  	c.schema1 = true
     6  }
     7  
     8  // Htpasswd sets the auth method with htpasswd
     9  func Htpasswd(c *Config) {
    10  	c.auth = "htpasswd"
    11  }
    12  
    13  // Token sets the auth method to token, with the specified token url
    14  func Token(tokenURL string) func(*Config) {
    15  	return func(c *Config) {
    16  		c.auth = "token"
    17  		c.tokenURL = tokenURL
    18  	}
    19  }
    20  
    21  // URL sets the registry url
    22  func URL(registryURL string) func(*Config) {
    23  	return func(c *Config) {
    24  		c.registryURL = registryURL
    25  	}
    26  }