Documentation
¶
Overview ¶
Package helmrepo provides functionality for managing Helm chart repositories.
This package handles repository operations such as adding, updating, and fetching from Helm chart repositories. It supports authentication, TLS, and other repository configuration options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultManager = NewManager() ErrRepoNameEmpty = errors.New("repo name cannot be empty") ErrRepoURLEmpty = errors.New("repo URL cannot be empty") ErrFailedToResolveURL = errors.New("failed to resolve URL") ErrFailedToResolveFile = errors.New("failed to resolve file path") ErrInvalidRepoURL = errors.New("invalid repository URL") )
Functions ¶
This section is empty.
Types ¶
type DuplicateRepoError ¶
type DuplicateRepoError struct {
Name string
}
func (DuplicateRepoError) Error ¶
func (err DuplicateRepoError) Error() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages a collection of [Repo]s.
func (*Manager) Add ¶
Add uses RepoOpts to create and add a new Repo to the Manager. An error is returned if the Repo could not be generated, or if a Repo with the same Name and/or URL already exists.
func (*Manager) Get ¶
Get returns a repo by its name or URL. It calls Manager.GetByName or Manager.GetByURL depending on the input.
type ManagerOpt ¶
type ManagerOpt func(*Manager)
ManagerOpt is a functional option for Manager.
func WithAllowedPaths ¶
func WithAllowedPaths(currentPath, repoRoot string) ManagerOpt
func WithAllowedURLSchemes ¶
func WithAllowedURLSchemes(schemes ...string) ManagerOpt
WithAllowedURLSchemes sets the allowed URL schemes for the Manager.
type Repo ¶
type Repo struct {
// Helm chart repository name for reference by `@name`.
Name string
URL paths.ResolvedFilePath
Username string
Password string
CAPath paths.ResolvedFileOrDirectoryPath
TLSClientCertDataPath paths.ResolvedFileOrDirectoryPath
TLSClientCertKeyPath paths.ResolvedFileOrDirectoryPath
InsecureSkipVerify bool
PassCredentials bool
}
type RepoNotFoundError ¶
type RepoNotFoundError struct {
Name string
}
func (RepoNotFoundError) Error ¶
func (err RepoNotFoundError) Error() string
type RepoOpts ¶
type RepoOpts struct {
// Helm chart repository name for reference by `@name`.
Name string `json:"name"`
URL string `json:"url"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
CAPath string `json:"caPath,omitempty"`
TLSClientCertDataPath string `json:"tlsClientCertDataPath,omitempty"`
TLSClientCertKeyPath string `json:"tlsClientCertKeyPath,omitempty"`
InsecureSkipVerify bool `json:"insecureSkipVerify"`
PassCredentials bool `json:"passCredentials"`
}