chartRepoRepository

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 4 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"`
	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"`
	Default   bool   `sql:"is_default"`
	Name      string `sql:"name"`
	ChartData []byte `sql:"chart_data"`
	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)
}

type ChartRefRepositoryImpl

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

func NewChartRefRepositoryImpl

func NewChartRefRepositoryImpl(dbConnection *pg.DB) *ChartRefRepositoryImpl

func (ChartRefRepositoryImpl) FindById

func (impl ChartRefRepositoryImpl) FindById(id int) (*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
}

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) 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)
	FindByGirRepoUrl(gitRepoUrl string) (chart *Chart, err 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) FindByGirRepoUrl

func (repositoryImpl ChartRepositoryImpl) FindByGirRepoUrl(gitRepoUrl string) (chart *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) 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) 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

Jump to

Keyboard shortcuts

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