app

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DevtronApp = "DevtronApp"
View Source
const DevtronChart = "DevtronChart"
View Source
const ExternalApp = "ExternalApp"

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Id              int            `sql:"id,pk"`
	AppName         string         `sql:"app_name,notnull"` // same as app name
	DisplayName     string         `sql:"display_name"`
	Active          bool           `sql:"active, notnull"`
	TeamId          int            `sql:"team_id"`
	AppType         helper.AppType `sql:"app_type, notnull"`
	AppOfferingMode string         `sql:"app_offering_mode,notnull"`
	Description     string         `sql:"description"`
	Team            team.Team
	sql.AuditLog
	// contains filtered or unexported fields
}

func (*App) IsAppJobOrExternalType added in v0.7.0

func (r *App) IsAppJobOrExternalType() bool

type AppRepository

type AppRepository interface {
	SaveWithTxn(pipelineGroup *App, tx *pg.Tx) error
	Update(app *App) error
	UpdateWithTxn(app *App, tx *pg.Tx) error
	SetDescription(id int, description string, userId int32) error
	FindActiveByName(appName string) (pipelineGroup *App, err error)
	FindJobByDisplayName(appName string) (pipelineGroup *App, err error)
	FindActiveListByName(appName string) ([]*App, error)
	FindById(id int) (pipelineGroup *App, err error)
	FindActiveById(id int) (pipelineGroup *App, err error)
	FindAppsByTeamId(teamId int) ([]*App, error)
	FindAppsByTeamIds(teamId []int, appType string) ([]App, error)
	FindAppsByTeamName(teamName string) ([]App, error)
	FindAll() ([]*App, error)
	FindAppsByEnvironmentId(environmentId int) ([]App, error)
	FindAllActiveAppsWithTeam(appType helper.AppType) ([]*App, error)
	FindAllActiveAppsWithTeamWithTeamId(teamID int, appType helper.AppType) ([]*App, error)
	CheckAppExists(appNames []string) ([]*App, error)

	FindByIds(ids []*int) ([]*App, error)
	FetchAppsByFilterV2(appNameIncludes string, appNameExcludes string, environmentId int) ([]*App, error)
	FindAppAndProjectByAppId(appId int) (*App, error)
	FindAppAndProjectByAppName(appName string) (*App, error)
	GetConnection() *pg.DB
	FindAllMatchesByAppName(appName string, appType helper.AppType) ([]*App, error)
	FindIdsByTeamIdsAndTeamNames(teamIds []int, teamNames []string) ([]int, error)
	FindIdsByNames(appNames []string) ([]int, error)
	FindByNames(appNames []string) ([]*App, error)
	FetchAllActiveInstalledAppsWithAppIdAndName() ([]*App, error)
	FetchAllActiveDevtronAppsWithAppIdAndName() ([]*App, error)
	FindEnvironmentIdForInstalledApp(appId int) (int, error)
	FetchAppIdsWithFilter(jobListingFilter helper.AppListingFilter) ([]int, error)
	FindAllActiveAppsWithTeamByAppNameMatch(appNameMatch string, appType helper.AppType) ([]*App, error)
	FindAppAndProjectByIdsIn(ids []int) ([]*App, error)
	FetchAppIdsByDisplayNamesForJobs(names []string) (map[int]string, []int, error)
	GetActiveCiCdAppsCount() (int, error)

	UpdateAppOfferingModeForAppIds(successAppIds []*int, appOfferingMode string, userId int32) error
}

type AppRepositoryImpl

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

func NewAppRepositoryImpl

func NewAppRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *AppRepositoryImpl

func (AppRepositoryImpl) CheckAppExists

func (repo AppRepositoryImpl) CheckAppExists(appNames []string) ([]*App, error)

func (AppRepositoryImpl) FetchAllActiveDevtronAppsWithAppIdAndName added in v0.6.9

func (repo AppRepositoryImpl) FetchAllActiveDevtronAppsWithAppIdAndName() ([]*App, error)

func (AppRepositoryImpl) FetchAllActiveInstalledAppsWithAppIdAndName added in v0.6.9

func (repo AppRepositoryImpl) FetchAllActiveInstalledAppsWithAppIdAndName() ([]*App, error)

func (AppRepositoryImpl) FetchAppIdsByDisplayNamesForJobs added in v0.6.27

func (repo AppRepositoryImpl) FetchAppIdsByDisplayNamesForJobs(names []string) (map[int]string, []int, error)

func (AppRepositoryImpl) FetchAppIdsWithFilter added in v0.6.15

func (repo AppRepositoryImpl) FetchAppIdsWithFilter(jobListingFilter helper.AppListingFilter) ([]int, error)

func (AppRepositoryImpl) FetchAppsByFilterV2

func (repo AppRepositoryImpl) FetchAppsByFilterV2(appNameIncludes string, appNameExcludes string, environmentId int) ([]*App, error)

func (AppRepositoryImpl) FindActiveById added in v0.6.17

func (repo AppRepositoryImpl) FindActiveById(id int) (*App, error)

func (AppRepositoryImpl) FindActiveByName

func (repo AppRepositoryImpl) FindActiveByName(appName string) (*App, error)

func (AppRepositoryImpl) FindActiveListByName

func (repo AppRepositoryImpl) FindActiveListByName(appName string) ([]*App, error)

func (AppRepositoryImpl) FindAll

func (repo AppRepositoryImpl) FindAll() ([]*App, error)

func (AppRepositoryImpl) FindAllActiveAppsWithTeam

func (repo AppRepositoryImpl) FindAllActiveAppsWithTeam(appType helper.AppType) ([]*App, error)

func (AppRepositoryImpl) FindAllActiveAppsWithTeamByAppNameMatch added in v0.6.17

func (repo AppRepositoryImpl) FindAllActiveAppsWithTeamByAppNameMatch(appNameMatch string, appType helper.AppType) ([]*App, error)

func (AppRepositoryImpl) FindAllActiveAppsWithTeamWithTeamId added in v0.6.17

func (repo AppRepositoryImpl) FindAllActiveAppsWithTeamWithTeamId(teamID int, appType helper.AppType) ([]*App, error)

func (AppRepositoryImpl) FindAllMatchesByAppName added in v0.4.5

func (repo AppRepositoryImpl) FindAllMatchesByAppName(appName string, appType helper.AppType) ([]*App, error)

func (AppRepositoryImpl) FindAppAndProjectByAppId

func (repo AppRepositoryImpl) FindAppAndProjectByAppId(appId int) (*App, error)

func (AppRepositoryImpl) FindAppAndProjectByAppName

func (repo AppRepositoryImpl) FindAppAndProjectByAppName(appName string) (*App, error)

func (AppRepositoryImpl) FindAppAndProjectByIdsIn added in v0.6.17

func (repo AppRepositoryImpl) FindAppAndProjectByIdsIn(ids []int) ([]*App, error)

func (AppRepositoryImpl) FindAppsByEnvironmentId

func (repo AppRepositoryImpl) FindAppsByEnvironmentId(environmentId int) ([]App, error)

func (AppRepositoryImpl) FindAppsByTeamId

func (repo AppRepositoryImpl) FindAppsByTeamId(teamId int) ([]*App, error)

func (AppRepositoryImpl) FindAppsByTeamIds

func (repo AppRepositoryImpl) FindAppsByTeamIds(teamId []int, appType string) ([]App, error)

func (AppRepositoryImpl) FindAppsByTeamName

func (repo AppRepositoryImpl) FindAppsByTeamName(teamName string) ([]App, error)

func (AppRepositoryImpl) FindById

func (repo AppRepositoryImpl) FindById(id int) (*App, error)

func (AppRepositoryImpl) FindByIds

func (repo AppRepositoryImpl) FindByIds(ids []*int) ([]*App, error)

func (AppRepositoryImpl) FindByNames added in v0.6.23

func (repo AppRepositoryImpl) FindByNames(appNames []string) ([]*App, error)

func (AppRepositoryImpl) FindEnvironmentIdForInstalledApp added in v0.6.13

func (repo AppRepositoryImpl) FindEnvironmentIdForInstalledApp(appId int) (int, error)

func (AppRepositoryImpl) FindIdsByNames added in v0.6.9

func (repo AppRepositoryImpl) FindIdsByNames(appNames []string) ([]int, error)

func (AppRepositoryImpl) FindIdsByTeamIdsAndTeamNames added in v0.6.9

func (repo AppRepositoryImpl) FindIdsByTeamIdsAndTeamNames(teamIds []int, teamNames []string) ([]int, error)

func (AppRepositoryImpl) FindJobByDisplayName added in v0.6.15

func (repo AppRepositoryImpl) FindJobByDisplayName(appName string) (*App, error)

func (AppRepositoryImpl) GetActiveCiCdAppsCount added in v0.6.29

func (repo AppRepositoryImpl) GetActiveCiCdAppsCount() (int, error)

func (AppRepositoryImpl) GetConnection

func (repo AppRepositoryImpl) GetConnection() *pg.DB

func (AppRepositoryImpl) SaveWithTxn

func (repo AppRepositoryImpl) SaveWithTxn(pipelineGroup *App, tx *pg.Tx) error

func (AppRepositoryImpl) SetDescription added in v0.6.26

func (repo AppRepositoryImpl) SetDescription(id int, description string, userId int32) error

func (AppRepositoryImpl) Update

func (repo AppRepositoryImpl) Update(app *App) error

func (AppRepositoryImpl) UpdateAppOfferingModeForAppIds added in v0.6.29

func (repo AppRepositoryImpl) UpdateAppOfferingModeForAppIds(successAppIds []*int, appOfferingMode string, userId int32) error

func (AppRepositoryImpl) UpdateWithTxn

func (repo AppRepositoryImpl) UpdateWithTxn(app *App, tx *pg.Tx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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