Documentation ¶
Index ¶
- Variables
- func ChartExistInIndex(name string, version string, index *helmRepo.IndexFile) (bool, error)
- func CopyFile(destPath string, srcPath string) error
- func EncodeSha1(s string) string
- func FetchAndCache(name, version string, cache cache.Cacher, fopts ...FetchOption) (string, error)
- func FileExists(f string) (bool, error)
- func FindChartURL(name string, version string, index *helmRepo.IndexFile, sourceURL string) (string, error)
- func GetDateThreshold(date string) (time.Time, error)
- func GetFileContentType(filepath string) (string, error)
- func GetListenAddress() (string, error)
- func HTTPResponseBody(res *http.Response) string
- func LoadIndexFromRepo(repo *api.Repo) (*helmRepo.IndexFile, error)
- func NormalizeChartURL(repoURL, chartURL string) (string, error)
- func Untar(tarball, targetDir string) error
- type FetchOption
Constants ¶
This section is empty.
Variables ¶
var ( // UnixEpoch is the number of seconds that have elapsed since January 1, 1970 UnixEpoch = time.Unix(0, 0) DefaultClient = &http.Client{Transport: &http.Transport{Proxy: http.ProxyFromEnvironment}} InsecureClient = &http.Client{Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}, } )
Functions ¶
func ChartExistInIndex ¶
ChartExistInIndex checks if a specific chart version is present in the index file.
func CopyFile ¶
CopyFile copies a file from srcPath to destPath, ensuring the destPath directory exists.
func EncodeSha1 ¶
EncodeSha1 returns a SHA1 representation of the provided string
func FetchAndCache ¶
FetchAndCache fetches a chart and stores it in provided cache
func FindChartURL ¶
func FindChartURL(name string, version string, index *helmRepo.IndexFile, sourceURL string) (string, error)
FindChartURL will return the chart url
func GetDateThreshold ¶
GetDateThreshold will parse a string date agains a fixed layout and return a time.Date value
func GetFileContentType ¶
GetFileContentType returns the content type of a file.
func GetListenAddress ¶
GetListenAddress returns a free local direction
func HTTPResponseBody ¶
HTTPResponseBody returns the body of an HTTP response
func LoadIndexFromRepo ¶
LoadIndexFromRepo get the index.yaml from a Helm repo and returns an index object
func NormalizeChartURL ¶
NormalizeChartURL forms the full download URL in case we pass a relative URL
Types ¶
type FetchOption ¶
type FetchOption func(opts *fetchOptions)
func WithFetchInsecure ¶
func WithFetchInsecure(insecure bool) FetchOption
WithFetchInsecure enables insecure connection for fetch operations
func WithFetchPassword ¶
func WithFetchPassword(pass string) FetchOption
WithFetchPassword configures a password for fetch operations
func WithFetchStatusHandler ¶
func WithFetchStatusHandler(h statusHandler) FetchOption
WithFetchStatusHandler configures a status handler for fetch operations
func WithFetchURLBuilder ¶
func WithFetchURLBuilder(h urlBuilder) FetchOption
WithFetchURLBuilder configures a URL builder for fetch operations
func WithFetchUsername ¶
func WithFetchUsername(user string) FetchOption
WithFetchUsername configures a username for fetch operations