Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegistryServer ¶
type RegistryServer struct { Repos []Repository // contains filtered or unexported fields }
func NewServer ¶
func NewServer(bind string) (*RegistryServer, error)
NewServer returns a new instance of the fake server.
It receives the bind address (use 127.0.0.1:0 for getting an available port on the host)
func (*RegistryServer) AddRepo ¶
func (s *RegistryServer) AddRepo(r Repository)
func (*RegistryServer) Addr ¶
func (s *RegistryServer) Addr() string
Addr returns the Address of the server.
func (*RegistryServer) Reset ¶
func (s *RegistryServer) Reset()
Reset resets all internal information of the server.
func (*RegistryServer) ServeHTTP ¶
func (s *RegistryServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handler HTTP requests, dealing with prepared failures before dispatching the request to the proper internal handler.
func (*RegistryServer) SetStorageDelete ¶
func (s *RegistryServer) SetStorageDelete(sd bool)
func (*RegistryServer) Stop ¶
func (s *RegistryServer) Stop() error
Stop stops the server, cleaning the internal listener and freeing the allocated port.
type Repository ¶
Click to show internal directories.
Click to hide internal directories.