puller

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCache cacher = &noopCache{}

Functions

func CleanRootCache added in v0.3.0

func CleanRootCache(path string) error

CleanRootCache removes any existing entries in the cache

func InitRootCache added in v0.3.0

func InitRootCache(cacheMode bool, path string) error

InitRootCache initializes a cache at the repository's root to be used, if it does not currently exist

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) CacheKey added in v0.3.0

func (r GithubRepository) CacheKey() string

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) IsCacheable added in v0.3.0

func (r GithubRepository) IsCacheable() bool

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

type Registry added in v0.5.3

type Registry struct {
	// URL represents the link to the chart registry including the chart version
	URL string `yaml:"url"`
}

func (Registry) GetOptions added in v0.5.3

func (r Registry) GetOptions() options.UpstreamOptions

func (Registry) IsWithinPackage added in v0.5.3

func (r Registry) IsWithinPackage() bool

func (Registry) Pull added in v0.5.3

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

Jump to

Keyboard shortcuts

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