chartRepoRepository

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	Id                      int                `sql:"id,pk"`
	AppId                   int                `sql:"app_id"`
	ChartRepoId             int                `sql:"chart_repo_id"`
	ChartName               string             `sql:"chart_name"` //use composite key as unique id
	ChartVersion            string             `sql:"chart_version"`
	ChartRepo               string             `sql:"chart_repo"`
	ChartRepoUrl            string             `sql:"chart_repo_url"`
	Values                  string             `sql:"values_yaml"`       //json format // used at for release. this should be always updated
	GlobalOverride          string             `sql:"global_override"`   //json format    // global overrides visible to user only
	ReleaseOverride         string             `sql:"release_override"`  //json format   //image descriptor template used for injecting tigger metadata injection
	PipelineOverride        string             `sql:"pipeline_override"` //json format  // pipeline values -> strategy values
	Status                  models.ChartStatus `sql:"status"`            //(new , deployment-in-progress, deployed-To-production, error )
	Active                  bool               `sql:"active"`
	GitRepoUrl              string             `sql:"git_repo_url"`   //git repository where chart is stored
	ChartLocation           string             `sql:"chart_location"` //location within git repo where current chart is pointing
	ReferenceTemplate       string             `sql:"reference_template"`
	ImageDescriptorTemplate string             `sql:"image_descriptor_template"`
	ChartRefId              int                `sql:"chart_ref_id"`
	Latest                  bool               `sql:"latest,notnull"`
	Previous                bool               `sql:"previous,notnull"`
	ReferenceChart          []byte             `sql:"reference_chart"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ChartRef

type ChartRef struct {
	Id               int    `sql:"id,pk"`
	Location         string `sql:"location"`
	Version          string `sql:"version"`
	Active           bool   `sql:"active,notnull"`
	Default          bool   `sql:"is_default,notnull"`
	Name             string `sql:"name"`
	ChartData        []byte `sql:"chart_data"`
	ChartDescription string `sql:"chart_description"`
	UserUploaded     bool   `sql:"user_uploaded,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ChartRefRepository

type ChartRefRepository interface {
	Save(chartRepo *ChartRef) error
	GetDefault() (*ChartRef, error)
	FindById(id int) (*ChartRef, error)
	GetAll() ([]*ChartRef, error)
	FindByVersionAndName(name, version string) (*ChartRef, error)
	CheckIfDataExists(name string, version string) (bool, error)
	FetchChart(name string) ([]*ChartRef, error)
	FetchChartInfoByUploadFlag(userUploaded bool) ([]*ChartRef, error)
}

type ChartRefRepositoryImpl

type ChartRefRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewChartRefRepositoryImpl

func NewChartRefRepositoryImpl(dbConnection *pg.DB) *ChartRefRepositoryImpl

func (ChartRefRepositoryImpl) CheckIfDataExists added in v0.3.22

func (impl ChartRefRepositoryImpl) CheckIfDataExists(name string, version string) (bool, error)

func (ChartRefRepositoryImpl) FetchChart added in v0.4.10

func (impl ChartRefRepositoryImpl) FetchChart(name string) ([]*ChartRef, error)

func (ChartRefRepositoryImpl) FetchChartInfoByUploadFlag added in v0.4.10

func (impl ChartRefRepositoryImpl) FetchChartInfoByUploadFlag(userUploaded bool) ([]*ChartRef, error)

func (ChartRefRepositoryImpl) FindById

func (impl ChartRefRepositoryImpl) FindById(id int) (*ChartRef, error)

func (ChartRefRepositoryImpl) FindByVersionAndName added in v0.6.2

func (impl ChartRefRepositoryImpl) FindByVersionAndName(name, version string) (*ChartRef, error)

func (ChartRefRepositoryImpl) GetAll

func (impl ChartRefRepositoryImpl) GetAll() ([]*ChartRef, error)

func (ChartRefRepositoryImpl) GetDefault

func (impl ChartRefRepositoryImpl) GetDefault() (*ChartRef, error)

func (ChartRefRepositoryImpl) Save

func (impl ChartRefRepositoryImpl) Save(chartRepo *ChartRef) error

type ChartRepo

type ChartRepo struct {
	Id          int                 `sql:"id,pk"`
	Name        string              `sql:"name"`
	Url         string              `sql:"url"`
	Active      bool                `sql:"active,notnull"`
	Default     bool                `sql:"is_default,notnull"`
	UserName    string              `sql:"user_name"`
	Password    string              `sql:"password"`
	SshKey      string              `sql:"ssh_key"`
	AccessToken string              `sql:"access_token"`
	AuthMode    repository.AuthMode `sql:"auth_mode,notnull"`
	External    bool                `sql:"external,notnull"`
	Deleted     bool                `sql:"deleted,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ChartRepoRepository

type ChartRepoRepository interface {
	Save(chartRepo *ChartRepo, tx *pg.Tx) error
	Update(chartRepo *ChartRepo, tx *pg.Tx) error
	GetDefault() (*ChartRepo, error)
	FindById(id int) (*ChartRepo, error)
	FindAll() ([]*ChartRepo, error)
	GetConnection() *pg.DB
	MarkChartRepoDeleted(chartRepo *ChartRepo, tx *pg.Tx) error
	FindByName(name string) (*ChartRepo, error)
}

type ChartRepoRepositoryImpl

type ChartRepoRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewChartRepoRepositoryImpl

func NewChartRepoRepositoryImpl(dbConnection *pg.DB) *ChartRepoRepositoryImpl

func (ChartRepoRepositoryImpl) FindAll

func (impl ChartRepoRepositoryImpl) FindAll() ([]*ChartRepo, error)

func (ChartRepoRepositoryImpl) FindById

func (impl ChartRepoRepositoryImpl) FindById(id int) (*ChartRepo, error)

func (ChartRepoRepositoryImpl) FindByName added in v0.4.24

func (impl ChartRepoRepositoryImpl) FindByName(name string) (*ChartRepo, error)

func (ChartRepoRepositoryImpl) GetConnection

func (impl ChartRepoRepositoryImpl) GetConnection() *pg.DB

func (ChartRepoRepositoryImpl) GetDefault

func (impl ChartRepoRepositoryImpl) GetDefault() (*ChartRepo, error)

func (ChartRepoRepositoryImpl) MarkChartRepoDeleted

func (impl ChartRepoRepositoryImpl) MarkChartRepoDeleted(chartRepo *ChartRepo, tx *pg.Tx) error

func (ChartRepoRepositoryImpl) Save

func (impl ChartRepoRepositoryImpl) Save(chartRepo *ChartRepo, tx *pg.Tx) error

func (ChartRepoRepositoryImpl) Update

func (impl ChartRepoRepositoryImpl) Update(chartRepo *ChartRepo, tx *pg.Tx) error

type ChartRepository

type ChartRepository interface {
	//ChartReleasedToProduction(chartRepo, appName, chartVersion string) (bool, error)
	FindOne(chartRepo, appName, chartVersion string) (*Chart, error)
	Save(*Chart) error
	FindCurrentChartVersion(chartRepo, chartName, chartVersionPattern string) (string, error)
	FindActiveChart(appId int) (chart *Chart, err error)
	FindLatestByAppId(appId int) (chart *Chart, err error)
	FindById(id int) (chart *Chart, err error)
	Update(chart *Chart) error

	FindActiveChartsByAppId(appId int) (charts []*Chart, err error)
	FindLatestChartForAppByAppId(appId int) (chart *Chart, err error)
	FindChartByAppIdAndRefId(appId int, chartRefId int) (chart *Chart, err error)
	FindNoLatestChartForAppByAppId(appId int) ([]*Chart, error)
	FindPreviousChartByAppId(appId int) (chart *Chart, err error)
	FindNumberOfAppsWithDeploymentTemplate(appIds []int) (int, error)
	FindChartByGitRepoUrl(gitRepoUrl string) (*Chart, error)
}

type ChartRepositoryImpl

type ChartRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewChartRepository

func NewChartRepository(dbConnection *pg.DB) *ChartRepositoryImpl

func (ChartRepositoryImpl) FindActiveChart

func (repositoryImpl ChartRepositoryImpl) FindActiveChart(appId int) (chart *Chart, err error)

Deprecated

func (ChartRepositoryImpl) FindActiveChartsByAppId

func (repositoryImpl ChartRepositoryImpl) FindActiveChartsByAppId(appId int) (charts []*Chart, err error)

func (ChartRepositoryImpl) FindById

func (repositoryImpl ChartRepositoryImpl) FindById(id int) (chart *Chart, err error)

func (ChartRepositoryImpl) FindChartByAppIdAndRefId

func (repositoryImpl ChartRepositoryImpl) FindChartByAppIdAndRefId(appId int, chartRefId int) (chart *Chart, err error)

func (ChartRepositoryImpl) FindChartByGitRepoUrl added in v0.4.18

func (repositoryImpl ChartRepositoryImpl) FindChartByGitRepoUrl(gitRepoUrl string) (*Chart, error)

func (ChartRepositoryImpl) FindCurrentChartVersion

func (repositoryImpl ChartRepositoryImpl) FindCurrentChartVersion(chartRepo, chartName, chartVersionPattern string) (string, error)

func (ChartRepositoryImpl) FindLatestByAppId

func (repositoryImpl ChartRepositoryImpl) FindLatestByAppId(appId int) (chart *Chart, err error)

Deprecated

func (ChartRepositoryImpl) FindLatestChartForAppByAppId

func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppId(appId int) (chart *Chart, err error)

func (ChartRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId

func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId(appId int, envId int) (chart *Chart, err error)

func (ChartRepositoryImpl) FindNoLatestChartForAppByAppId

func (repositoryImpl ChartRepositoryImpl) FindNoLatestChartForAppByAppId(appId int) ([]*Chart, error)

func (ChartRepositoryImpl) FindNumberOfAppsWithDeploymentTemplate added in v0.4.14

func (repositoryImpl ChartRepositoryImpl) FindNumberOfAppsWithDeploymentTemplate(appIds []int) (int, error)

func (ChartRepositoryImpl) FindOne

func (repositoryImpl ChartRepositoryImpl) FindOne(chartRepo, chartName, chartVersion string) (*Chart, error)

func (ChartRepositoryImpl) FindPreviousChartByAppId

func (repositoryImpl ChartRepositoryImpl) FindPreviousChartByAppId(appId int) (chart *Chart, err error)

func (ChartRepositoryImpl) Save

func (repositoryImpl ChartRepositoryImpl) Save(chart *Chart) error

func (ChartRepositoryImpl) Update

func (repositoryImpl ChartRepositoryImpl) Update(chart *Chart) error

type RefChartDir added in v0.4.5

type RefChartDir string

------------------------ CHART REF REPOSITORY ---------------

Jump to

Keyboard shortcuts

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