puller

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	// URL represents a download link for an archive
	URL string `yaml:"url"`
	// Subdirectory represents a specific directory within the upstream pointed to by the URL to treat as the root
	Subdirectory *string `yaml:"subdirectory"`
}

Archive represents a URL pointing to a .tgz file

func (Archive) GetOptions

func (u Archive) GetOptions() options.UpstreamOptions

GetOptions returns the path used to construct this upstream

func (Archive) IsWithinPackage

func (u Archive) IsWithinPackage() bool

IsWithinPackage returns whether this upstream already exists within the package

func (Archive) Pull

func (u Archive) Pull(rootFs, fs billy.Filesystem, path string) error

Pull grabs the archive

func (Archive) String

func (u Archive) String() string

type GithubRepository

type GithubRepository struct {
	// Subdirectory represents a specific directory within the upstream pointed to by the URL to treat as the root
	Subdirectory *string `yaml:"subdirectory"`
	// Commit represents a specific commit hash to treat as the head
	Commit *string `yaml:"commit"`
	// contains filtered or unexported fields
}

GithubRepository represents a repository hosted on Github

func GetGithubRepository

func GetGithubRepository(upstreamOptions options.UpstreamOptions, branch *string) (GithubRepository, error)

GetGithubRepository gets a Github repository from options

func (GithubRepository) GetHTTPSURL

func (r GithubRepository) GetHTTPSURL() string

GetHTTPSURL returns the HTTPS URL of the repository

func (GithubRepository) GetOptions

func (r GithubRepository) GetOptions() options.UpstreamOptions

GetOptions returns the path used to construct this upstream

func (GithubRepository) GetSSHURL

func (r GithubRepository) GetSSHURL() string

GetSSHURL returns the SSH URL of the repository

func (GithubRepository) IsWithinPackage

func (r GithubRepository) IsWithinPackage() bool

IsWithinPackage returns whether this upstream already exists within the package

func (GithubRepository) Pull

func (r GithubRepository) Pull(rootFs, fs billy.Filesystem, path string) error

Pull grabs the repository

func (GithubRepository) String

func (r GithubRepository) String() string

type Puller

type Puller interface {
	// Pull grabs the Helm chart and places it on a path in the filesystem
	Pull(rootFs, fs billy.Filesystem, path string) error
	// GetOptions returns the options used to construct this Upstream
	GetOptions() options.UpstreamOptions
	// IsWithinPackage returns whether this upstream already exists within the package
	IsWithinPackage() bool
}

Puller represents an interface that is able to pull a directory from a remote source

Jump to

Keyboard shortcuts

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