CheckInterval represents how often we check for changes in htpasswd file.
NewHandler returns the master HTTP multiplexer/router.
Blob represents a single blob, its name and its size.
HtpasswdFile is a map for usernames to passwords.
NewHtpasswdFromFile reads the users and passwords from a htpasswd file and returns them. If an error is encountered, it is returned, together with a nil-Pointer for the HtpasswdFile.
Reload reloads the htpasswd file. If the reload fails, the Users map is not changed and the error is returned.
ReloadCheck checks at most once per CheckInterval if the file changed and will reload the file if it did. It logs errors and successful reloads, and returns an error if any was encountered.
Validate returns true if password matches the stored password for user. If no password for user is stored, or the password is wrong, false is returned.
Server determines how a Mux's handlers behave.
AuthHandler wraps h with a http.HandlerFunc that performs basic authentication against the user/passwords pairs stored in f and returns the http.HandlerFunc.
CheckBlob tests whether a blob exists.
CheckConfig checks whether a configuration exists.
CreateRepo creates repository directories.
DeleteBlob deletes a blob from the repository.
DeleteConfig removes a config.
GetBlob retrieves a blob from the repository.
GetConfig allows for a config to be retrieved.
ListBlobs lists all blobs of a given type in an arbitrary order.
ListBlobsV1 lists all blobs of a given type in an arbitrary order.
ListBlobsV2 lists all blobs of a given type, together with their sizes, in an arbitrary order.
SaveBlob saves a blob to the repository.
SaveConfig allows for a config to be saved.