chart

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiChartBytesUrl

func ApiChartBytesUrl(schema, endpoint, name string) string

func ApiListChartsUrl

func ApiListChartsUrl(schema, endpoint string) string

func Run

Run 批量下载chart

Types

type Config

type Config struct {
	Schema      string
	Endpoint    string
	Domain      string
	Username    string
	Password    string
	PreserveDir string
	Package     bool
	RepoName    string
}

type ConfigManifest

type ConfigManifest struct {
	HelmRepo struct {
		Endpoint    string `yaml:"endpoint"`
		Domain      string `yaml:"domain"`
		Username    string `yaml:"username"`
		Password    string `yaml:"password"`
		PreserveDir string `yaml:"preserveDir"`
		Package     bool   `yaml:"package"`
		RepoName    string `yaml:"repo-name"`
	} `yaml:"helm-repo"`
}

type Handler

type Handler struct{}

func (Handler) DoRequest

func (h Handler) DoRequest(httpRequestItem request.HTTPRequestItem) ([]byte, error)

func (Handler) GetChartByte

func (h Handler) GetChartByte(httpRequestItem request.HTTPRequestItem) ([]byte, error)

func (Handler) GetChartList

func (h Handler) GetChartList(httpRequestItem request.HTTPRequestItem) ([]byte, error)

type HandlerInterface

type HandlerInterface interface {
	DoRequest(httpRequestItem request.HTTPRequestItem) ([]byte, error)
	GetChartByte(httpRequestItem request.HTTPRequestItem) ([]byte, error)
	GetChartList(httpRequestItem request.HTTPRequestItem) ([]byte, error)
}

type HelmRepo

type HelmRepo struct {
	Endpoint    string `yaml:"endpoint"`
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	PreserveDir string `yaml:"preserveDir"`
	Package     bool   `yaml:"package"`
	RepoName    string `yaml:"Repository-name"`
}

HelmRepo helm仓库配置

type Item

type Item struct {
	Name          string    `json:"name"`
	TotalVersions int       `json:"total_versions"`
	LatestVersion string    `json:"latest_version"`
	Created       time.Time `json:"created"`
	Updated       time.Time `json:"updated"`
	Icon          string    `json:"icon"`
	Home          string    `json:"home"`
	Deprecated    bool      `json:"deprecated"`
}

Item chart对象,用于反序列化

type Manager

type Manager struct {
	Config
	Logger             *logrus.Logger
	Handler            HandlerInterface
	HttpRequestTimeout time.Duration
}

Manager 与helm仓库交互的执行器

func (*Manager) GetChartsByte

func (m *Manager) GetChartsByte(list itemList) (map[string][]byte, error)

func (*Manager) List

func (m *Manager) List() (itemList, error)

List 获取chart列表

func (*Manager) Save

func (m *Manager) Save() error

Save 保存chart列表

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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