artifact

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(path string) error

func DownloadUrl

func DownloadUrl(publicRepoUrl, regex, url string) (string, error)

func FilepathOnDisk

func FilepathOnDisk(url string) (string, error)

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
}

func (Apt) Preserve

func (a Apt) Preserve(urlStrings ...string) error

func (Apt) Read

func (a Apt) Read() error

type Generic

type Generic struct {
	Request     *http.Request
	RequestBody io.ReadCloser
	RequestURI  string

	ResponseWriter http.ResponseWriter
}

func (Generic) Publish

func (g Generic) Publish() error

func (Generic) Read

func (g Generic) Read() error

type Maven

type Maven struct {
	ResponseWriter http.ResponseWriter
	RequestBody    io.ReadCloser
	RequestURI     string
}

func (Maven) Preserve

func (m Maven) Preserve(urlStrings ...string) error

func (Maven) Publish

func (m Maven) Publish() error

func (Maven) Read

func (m Maven) Read() error

func (Maven) Unify

func (m Maven) Unify(name string) error

type Npm

type Npm struct {
	ResponseWriter http.ResponseWriter
	RequestBody    io.ReadCloser
	RequestURI     string
}

func (Npm) Preserve

func (n Npm) Preserve(urlStrings ...string) error

func (Npm) Publish

func (n Npm) Publish() error

func (Npm) Read

func (n Npm) Read() error

type Preserver

type Preserver interface {
	Preserve(urlStrings ...string) error
}

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.

type Reader

type Reader interface {
	Read() error
}

Reader is the interface that wraps the basic Read method.

Reader reads an artifact from disk.

type Unifier

type Unifier interface {
	Unify(name string) error
}

Unifier is the interface that wraps the basic Unify method.

Unify groups multiple repositories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL