Documentation ¶
Index ¶
- Constants
- Variables
- func SyncChartsToChartmuseum(ctx context.Context, remote RepositoryConfig, ...) error
- func SyncChartsToChartmuseumWithProcess(ctx context.Context, remote RepositoryConfig, ...) error
- type Auth
- type ChartmuseumClient
- func (c *ChartmuseumClient) GetChartBufferedFiles(ctx context.Context, repo, name, version string) ([]*loader.BufferedFile, error)
- func (c *ChartmuseumClient) GetChartFile(ctx context.Context, repo, filename string) ([]byte, error)
- func (c *ChartmuseumClient) GetChartVersion(ctx context.Context, repo, name, version string) (*helm_repo.ChartVersion, error)
- func (c *ChartmuseumClient) GetIndex(ctx context.Context, repo string) (*helm_repo.IndexFile, error)
- func (c *ChartmuseumClient) HeadChartVersion(ctx context.Context, repo, name, version string) error
- func (c *ChartmuseumClient) Health(ctx context.Context) error
- func (c *ChartmuseumClient) ListAllChartVersions(ctx context.Context, repo string) (map[string]helm_repo.ChartVersions, error)
- func (c *ChartmuseumClient) ListChartVersions(ctx context.Context, repo string, name string) (*helm_repo.ChartVersions, error)
- func (c *ChartmuseumClient) NewLegencyRepositoryClientFrom(ctx context.Context, repo string) (*LegencyRepository, error)
- func (c *ChartmuseumClient) UploadChart(ctx context.Context, repo string, chartContent io.Reader) error
- type CommonClient
- type ErrorResponse
- type Errors
- type Goconcurrent
- type LegencyRepository
- type Options
- type ProcessEvent
- type RepositoryConfig
Constants ¶
View Source
const MaxSyncVerionCount = 3
MaxSyncVerionCount 最大同步版本,仅同步某个chart的最近的 n 个版本
Variables ¶
View Source
var ErrSynchronizing = errors.New("synchronizing")
Functions ¶
func SyncChartsToChartmuseum ¶
func SyncChartsToChartmuseum(ctx context.Context, remote RepositoryConfig, localChartMuseum RepositoryConfig) error
func SyncChartsToChartmuseumWithProcess ¶
func SyncChartsToChartmuseumWithProcess(ctx context.Context, remote RepositoryConfig, localChartMuseum RepositoryConfig, onProcess func(ProcessEvent)) error
Types ¶
type ChartmuseumClient ¶
type ChartmuseumClient struct { *CommonClient // contains filtered or unexported fields }
func MustNewChartMuseumClient ¶
func MustNewChartMuseumClient(cfg *RepositoryConfig) *ChartmuseumClient
func NewChartMuseumClient ¶
func NewChartMuseumClient(cfg *RepositoryConfig) (*ChartmuseumClient, error)
func (*ChartmuseumClient) GetChartBufferedFiles ¶
func (c *ChartmuseumClient) GetChartBufferedFiles(ctx context.Context, repo, name, version string) ([]*loader.BufferedFile, error)
func (*ChartmuseumClient) GetChartFile ¶
func (*ChartmuseumClient) GetChartVersion ¶
func (c *ChartmuseumClient) GetChartVersion(ctx context.Context, repo, name, version string) (*helm_repo.ChartVersion, error)
func (*ChartmuseumClient) HeadChartVersion ¶
func (c *ChartmuseumClient) HeadChartVersion(ctx context.Context, repo, name, version string) error
func (*ChartmuseumClient) ListAllChartVersions ¶
func (c *ChartmuseumClient) ListAllChartVersions(ctx context.Context, repo string) (map[string]helm_repo.ChartVersions, error)
func (*ChartmuseumClient) ListChartVersions ¶
func (c *ChartmuseumClient) ListChartVersions(ctx context.Context, repo string, name string) (*helm_repo.ChartVersions, error)
func (*ChartmuseumClient) NewLegencyRepositoryClientFrom ¶
func (c *ChartmuseumClient) NewLegencyRepositoryClientFrom(ctx context.Context, repo string) (*LegencyRepository, error)
func (*ChartmuseumClient) UploadChart ¶
type ErrorResponse ¶
type ErrorResponse struct {
ErrorMsg string `json:"error,omitempty"`
}
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type Goconcurrent ¶
type Goconcurrent struct {
// contains filtered or unexported fields
}
func NewGoconcurrent ¶
func NewGoconcurrent(concurrent int) *Goconcurrent
func (*Goconcurrent) Go ¶
func (g *Goconcurrent) Go(f func())
type LegencyRepository ¶
type LegencyRepository struct {
// contains filtered or unexported fields
}
func NewLegencyRepository ¶
func NewLegencyRepository(cfg *RepositoryConfig) (*LegencyRepository, error)
func (*LegencyRepository) GetFile ¶
func (r *LegencyRepository) GetFile(ctx context.Context, url string) (io.ReadCloser, error)
GetChart 如果 version 为空,则使用最新版本
type Options ¶
type Options struct {
Addr string `json:"addr,omitempty" description:"chart repository url"`
}
func NewDefaultOptions ¶
func NewDefaultOptions() *Options
type ProcessEvent ¶
type ProcessEvent struct { Chart *repo.ChartVersion Error error Message string }
type RepositoryConfig ¶
type RepositoryConfig struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Cert []byte `json:"cert,omitempty"` Key []byte `json:"key,omitempty"` CA []byte `json:"ca,omitempty"` SkipTLSVerify bool `json:"skipTLSVerify,omitempty"` }
Click to show internal directories.
Click to hide internal directories.