project

package
v0.0.0-...-1ae172a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppFileMetadata

type AppFileMetadata struct {
	Name     string   `json:"name"`
	Versions []string `json:"versions"`
	Type     string   `json:"type"`
}

type AppManager

type AppManager struct {
	*gorm.DB
	*AppVersionManager
}

func NewAppManager

func NewAppManager(chartManager *AppVersionManager, db *gorm.DB) *AppManager

func (*AppManager) CreateApp

func (a *AppManager) CreateApp(chartFilePath string, app *types.App, appVersion *types.AppVersion) (*types.App, error)

func (*AppManager) CreateAppWithBytes

func (a *AppManager) CreateAppWithBytes(chartBytes []byte, app *types.App, appVersion *types.AppVersion) (*types.App, error)

func (*AppManager) CreateRevision

func (a *AppManager) CreateRevision(appVersion *types.AppVersion, app *types.App) (*types.AppRevision, error)

func (*AppManager) DeleteApp

func (a *AppManager) DeleteApp(appId uint) error

func (*AppManager) GetAppByNameWithVersion

func (a *AppManager) GetAppByNameWithVersion(scope string, scopeId uint, name string) (*types.App, error)

func (*AppManager) GetAppWithVersion

func (a *AppManager) GetAppWithVersion(appId uint) (*types.App, error)

func (*AppManager) GetById

func (a *AppManager) GetById(id uint, opfs ...manager.OptionFunc) (*types.App, error)

func (*AppManager) GetByName

func (a *AppManager) GetByName(scope string, projectId uint, name string) (*types.App, error)

func (*AppManager) ImportApp

func (a *AppManager) ImportApp(app *types.App, appVersion *types.AppVersion) error

func (*AppManager) ListApps

func (a *AppManager) ListApps(cond ListAppCondition) ([]*types.App, error)

func (*AppManager) UpdateApp

func (a *AppManager) UpdateApp(app *types.App, columns ...string) error

type AppStoreManager

type AppStoreManager struct {
	*gorm.DB
	*AppVersionManager
}

func NewAppStoreManager

func NewAppStoreManager(versionManager *AppVersionManager, db *gorm.DB) *AppStoreManager

func (*AppStoreManager) CreateStoreApp

func (a *AppStoreManager) CreateStoreApp(chartBytes []byte, storeApp *types.AppStore, appVersion *types.AppVersion) (*types.AppStore, error)

func (*AppStoreManager) DeleteStoreAppVersion

func (a *AppStoreManager) DeleteStoreAppVersion(appId, versionId uint, user string) error

func (*AppStoreManager) GetById

func (a *AppStoreManager) GetById(appId uint) (*types.AppStore, error)

func (*AppStoreManager) GetByName

func (a *AppStoreManager) GetByName(name string) (*types.AppStore, error)

func (*AppStoreManager) GetLatestVersion

func (a *AppStoreManager) GetLatestVersion(appId uint) (*types.AppVersion, error)

func (*AppStoreManager) ImportApp

func (a *AppStoreManager) ImportApp(storeApp *types.AppStore, appVersion *types.AppVersion) error

func (*AppStoreManager) Init

func (a *AppStoreManager) Init()

func (*AppStoreManager) ListStoreApps

func (a *AppStoreManager) ListStoreApps() ([]*types.AppStore, error)

func (*AppStoreManager) UpdateStoreApp

func (a *AppStoreManager) UpdateStoreApp(appId uint, columns map[string]interface{}) error

type AppVersionManager

type AppVersionManager struct {
	*gorm.DB
}

func NewAppVersionManager

func NewAppVersionManager(db *gorm.DB) *AppVersionManager

func (*AppVersionManager) CreateWithChartByte

func (v *AppVersionManager) CreateWithChartByte(chartBytes []byte, scope string, scopeId uint, appVersion *types.AppVersion) (*types.AppVersion, error)

CreateWithChartByte 通过chart二进制内容创建

func (*AppVersionManager) CreateWithChartPath

func (v *AppVersionManager) CreateWithChartPath(chartFilePath string, scope string, scopeId uint, appVersion *types.AppVersion) (*types.AppVersion, error)

CreateWithChartPath 通过chart本地存储创建

func (*AppVersionManager) Delete

func (v *AppVersionManager) Delete(id uint) error

Delete 删除应用版本以及该版本构建历史,如果该版本没有其他应用使用,则同时删除chart

func (*AppVersionManager) GetById

func (v *AppVersionManager) GetById(id uint, opfs ...manager.OptionFunc) (*types.AppVersion, error)

func (*AppVersionManager) GetByPackageNameVersion

func (v *AppVersionManager) GetByPackageNameVersion(scope string, scopeId uint, packageName, packageVersion string) (*types.AppVersion, error)

func (*AppVersionManager) GetChart

func (v *AppVersionManager) GetChart(chartPath string) (*types.AppVersionChart, error)

func (*AppVersionManager) List

func (v *AppVersionManager) List(scope string, scopeId uint) ([]*types.AppVersion, error)

func (*AppVersionManager) NewPackageFilenameFromNameVersion

func (v *AppVersionManager) NewPackageFilenameFromNameVersion(name string, version string) string

func (*AppVersionManager) UpdateAppVersion

func (v *AppVersionManager) UpdateAppVersion(appVersion *types.AppVersion, columns ...string) error

type ListAppCondition

type ListAppCondition struct {
	Scope       string
	ScopeId     uint
	WithVersion bool
	Name        string
}

type ManagerProject

type ManagerProject struct {
	*gorm.DB
	ProjectAppManager *AppManager
}

func NewManagerProject

func NewManagerProject(db *gorm.DB, appManager *AppManager) *ManagerProject

func (*ManagerProject) Clone

func (p *ManagerProject) Clone(sourceProjectId uint, newProject *types.Project) (*types.Project, error)

func (*ManagerProject) Create

func (p *ManagerProject) Create(project *types.Project) (*types.Project, error)

func (*ManagerProject) Delete

func (p *ManagerProject) Delete(project *types.Project) error

func (*ManagerProject) Get

func (p *ManagerProject) Get(projectId uint) (*types.Project, error)

func (*ManagerProject) List

func (p *ManagerProject) List() ([]*types.Project, error)

func (*ManagerProject) Update

func (p *ManagerProject) Update(project *types.Project) (*types.Project, error)

Jump to

Keyboard shortcuts

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