Documentation ¶
Index ¶
- func Dir(path string) error
- func DownloadUrl(publicRepoUrl, regex, url string) (string, error)
- func FilepathOnDisk(url string) (string, error)
- func ReadFromDisk(w http.ResponseWriter, reqURL string) error
- func StoreOnDisk(requestURI string, requestBody io.ReadCloser) error
- type Apt
- type Generic
- type Maven
- type Npm
- type Preserver
- type PublicRepository
- type Publisher
- type Reader
- type Unifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadUrl ¶
func FilepathOnDisk ¶
func ReadFromDisk ¶
func ReadFromDisk(w http.ResponseWriter, reqURL string) error
func StoreOnDisk ¶
func StoreOnDisk(requestURI string, requestBody io.ReadCloser) error
Types ¶
type Apt ¶
type Apt struct { ResponseWriter http.ResponseWriter RequestBody io.ReadCloser RequestURI string }
type Generic ¶
type Generic struct { Request *http.Request RequestBody io.ReadCloser RequestURI string ResponseWriter http.ResponseWriter }
type Maven ¶
type Maven struct { ResponseWriter http.ResponseWriter RequestBody io.ReadCloser RequestURI string }
type Npm ¶
type Npm struct { ResponseWriter http.ResponseWriter RequestBody io.ReadCloser RequestURI string }
type Preserver ¶
Preserver is the interface that wraps the basic Preserve method.
Preserve downloads an artifact from an external repository and writes it to disk.
type PublicRepository ¶
type PublicRepository struct {
Name, Regex, Url, User, Pass string
}
func RepoInConfigFile ¶
func RepoInConfigFile(w http.ResponseWriter, urlString, artifactType string) (PublicRepository, error)
ReadRepositoriesAndUrlsFromConfigFileAndCacheArtifact reads a repositories yaml file that contains repositories and their URLs. If a request is attempted to download a file, it will look up the name in the config file and find the public URLs so it can download the file from the public maven repository and cache it on disk.
type Publisher ¶
type Publisher interface {
Publish() error
}
Publisher is the interface that wraps the basic Publish method.
Publish writes an artifact to disk.
Click to show internal directories.
Click to hide internal directories.