Documentation
¶
Index ¶
- Variables
- func AuthHandler(f *HtpasswdFile, h http.Handler) http.HandlerFunc
- func CheckBlob(w http.ResponseWriter, r *http.Request)
- func CheckConfig(w http.ResponseWriter, r *http.Request)
- func CreateRepo(w http.ResponseWriter, r *http.Request)
- func DeleteBlob(w http.ResponseWriter, r *http.Request)
- func DeleteConfig(w http.ResponseWriter, r *http.Request)
- func GetBlob(w http.ResponseWriter, r *http.Request)
- func GetConfig(w http.ResponseWriter, r *http.Request)
- func ListBlobs(w http.ResponseWriter, r *http.Request)
- func NewMux() *goji.Mux
- func SaveBlob(w http.ResponseWriter, r *http.Request)
- func SaveConfig(w http.ResponseWriter, r *http.Request)
- type HtpasswdFile
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AuthHandler ¶
func AuthHandler(f *HtpasswdFile, h http.Handler) http.HandlerFunc
AuthHandler wraps h with a http.HandlerFunc that performs basic authentication against the user/passwords pairs stored in f and returns the http.HandlerFunc.
func CheckBlob ¶
func CheckBlob(w http.ResponseWriter, r *http.Request)
CheckBlob tests whether a blob exists.
func CheckConfig ¶
func CheckConfig(w http.ResponseWriter, r *http.Request)
CheckConfig checks whether a configuration exists.
func CreateRepo ¶
func CreateRepo(w http.ResponseWriter, r *http.Request)
CreateRepo creates repository directories.
func DeleteBlob ¶
func DeleteBlob(w http.ResponseWriter, r *http.Request)
DeleteBlob deletes a blob from the repository.
func DeleteConfig ¶
func DeleteConfig(w http.ResponseWriter, r *http.Request)
DeleteConfig removes a config.
func GetBlob ¶
func GetBlob(w http.ResponseWriter, r *http.Request)
GetBlob retrieves a blob from the repository.
func GetConfig ¶
func GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig allows for a config to be retrieved.
func ListBlobs ¶
func ListBlobs(w http.ResponseWriter, r *http.Request)
ListBlobs lists all blobs of a given type in an arbitrary order.
func SaveBlob ¶
func SaveBlob(w http.ResponseWriter, r *http.Request)
SaveBlob saves a blob to the repository.
func SaveConfig ¶
func SaveConfig(w http.ResponseWriter, r *http.Request)
SaveConfig allows for a config to be saved.
Types ¶
type HtpasswdFile ¶
HtpasswdFile is a map for usernames to passwords.
func NewHtpasswd ¶
func NewHtpasswd(file io.Reader) (*HtpasswdFile, error)
NewHtpasswd reads the users and passwords from a htpasswd datastream in file and returns them. If an error is encountered, it is returned, together with a nil-Pointer for the HtpasswdFile.
func NewHtpasswdFromFile ¶
func NewHtpasswdFromFile(path string) (*HtpasswdFile, error)
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.