repository

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

@description: app listing view

@description: user authentication and authorization

@description: user crud

Index

Constants

View Source
const Failure = "FAILURE"
View Source
const NewDeployment string = "Deployment Initiated"
View Source
const REGISTRYTYPE_ECR = "ecr"
View Source
const REGISTRYTYPE_OTHER = "other"
View Source
const Success = "SUCCESS"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLevelMetrics

type AppLevelMetrics struct {
	Id           int  `sql:"id,pk"`
	AppId        int  `sql:"app_id,notnull"`
	AppMetrics   bool `sql:"app_metrics,notnull"`
	InfraMetrics bool `sql:"infra_metrics,notnull"`
	models.AuditLog
	// contains filtered or unexported fields
}

type AppLevelMetricsRepository

type AppLevelMetricsRepository interface {
	Save(metrics *AppLevelMetrics) error
	FindByAppId(id int) (*AppLevelMetrics, error)
	Update(metrics *AppLevelMetrics) error
}

type AppLevelMetricsRepositoryImpl

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

func NewAppLevelMetricsRepositoryImpl

func NewAppLevelMetricsRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *AppLevelMetricsRepositoryImpl

func (*AppLevelMetricsRepositoryImpl) FindByAppId

func (impl *AppLevelMetricsRepositoryImpl) FindByAppId(appId int) (*AppLevelMetrics, error)

func (*AppLevelMetricsRepositoryImpl) Save

func (*AppLevelMetricsRepositoryImpl) Update

func (impl *AppLevelMetricsRepositoryImpl) Update(metrics *AppLevelMetrics) error

type AppListingRepository

type AppListingRepository interface {
	FetchAppsByEnvironment(appListingFilter helper.AppListingFilter) ([]*bean.AppEnvironmentContainer, error)
	DeploymentDetailsByAppIdAndEnvId(appId int, envId int) (bean.DeploymentDetailContainer, error)
	FetchAppDetail(appId int, envId int) (bean.AppDetailContainer, error)

	FetchAppTriggerView(appId int) ([]bean.TriggerView, error)
	FetchAppStageStatus(appId int) ([]bean.AppStageStatus, error)

	//Not in used
	PrometheusApiByEnvId(id int) (*string, error)

	FetchOtherEnvironment(appId int) ([]*bean.Environment, error)

	GetDeploymentStatusByAppName(appName string) ([]DeploymentStatus, error)
	SaveNewDeployment(deploymentStatus *DeploymentStatus) error
	DeleteOldDeployments(appName string) (int, error)
	FindLastDeployedStatus(appName string) (DeploymentStatus, error)
	FindLastDeployedStatuses(appNames []string) ([]DeploymentStatus, error)
	FindLastDeployedStatusesForAllApps() ([]DeploymentStatus, error)
	DeploymentDetailByArtifactId(ciArtifactId int) (bean.DeploymentDetailContainer, error)
}

type AppListingRepositoryImpl

type AppListingRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewAppListingRepositoryImpl

func NewAppListingRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB, appListingRepositoryQueryBuilder helper.AppListingRepositoryQueryBuilder) *AppListingRepositoryImpl

func (AppListingRepositoryImpl) DeleteOldDeployments

func (impl AppListingRepositoryImpl) DeleteOldDeployments(appName string) (int, error)

func (AppListingRepositoryImpl) DeploymentDetailByArtifactId

func (impl AppListingRepositoryImpl) DeploymentDetailByArtifactId(ciArtifactId int) (bean.DeploymentDetailContainer, error)

func (AppListingRepositoryImpl) DeploymentDetailsByAppIdAndEnvId

func (impl AppListingRepositoryImpl) DeploymentDetailsByAppIdAndEnvId(appId int, envId int) (bean.DeploymentDetailContainer, error)

It will return the deployment detail of any cd pipeline which is latest triggered for Environment of any App

func (AppListingRepositoryImpl) FetchAppDetail

func (impl AppListingRepositoryImpl) FetchAppDetail(appId int, envId int) (bean.AppDetailContainer, error)

func (AppListingRepositoryImpl) FetchAppStageStatus

func (impl AppListingRepositoryImpl) FetchAppStageStatus(appId int) ([]bean.AppStageStatus, error)

func (AppListingRepositoryImpl) FetchAppTriggerView

func (impl AppListingRepositoryImpl) FetchAppTriggerView(appId int) ([]bean.TriggerView, error)

func (AppListingRepositoryImpl) FetchAppsByEnvironment

func (impl AppListingRepositoryImpl) FetchAppsByEnvironment(appListingFilter helper.AppListingFilter) ([]*bean.AppEnvironmentContainer, error)

* It will return the list of filtered apps with details related to each env

func (AppListingRepositoryImpl) FetchOtherEnvironment

func (impl AppListingRepositoryImpl) FetchOtherEnvironment(appId int) ([]*bean.Environment, error)

func (AppListingRepositoryImpl) FindLastDeployedStatus

func (impl AppListingRepositoryImpl) FindLastDeployedStatus(appName string) (DeploymentStatus, error)

func (AppListingRepositoryImpl) FindLastDeployedStatuses

func (impl AppListingRepositoryImpl) FindLastDeployedStatuses(appNames []string) ([]DeploymentStatus, error)

func (AppListingRepositoryImpl) FindLastDeployedStatusesForAllApps

func (impl AppListingRepositoryImpl) FindLastDeployedStatusesForAllApps() ([]DeploymentStatus, error)

func (AppListingRepositoryImpl) GetDeploymentStatusByAppName

func (impl AppListingRepositoryImpl) GetDeploymentStatusByAppName(appName string) ([]DeploymentStatus, error)

func (AppListingRepositoryImpl) PrometheusApiByEnvId

func (impl AppListingRepositoryImpl) PrometheusApiByEnvId(id int) (*string, error)

func (AppListingRepositoryImpl) SaveNewDeployment

func (impl AppListingRepositoryImpl) SaveNewDeployment(deploymentStatus *DeploymentStatus) error

type Attributes

type Attributes struct {
	Id     int    `sql:"id,pk"`
	Key    string `sql:"key,notnull"`
	Value  string `sql:"value,notnull"`
	Active bool   `sql:"active, notnull"`
	models.AuditLog
	// contains filtered or unexported fields
}

type AttributesRepository

type AttributesRepository interface {
	Save(model *Attributes, tx *pg.Tx) (*Attributes, error)
	Update(model *Attributes, tx *pg.Tx) error
	FindByKey(key string) (*Attributes, error)
	FindById(id int) (*Attributes, error)
	FindActiveList() ([]*Attributes, error)
	GetConnection() (dbConnection *pg.DB)
}

type AttributesRepositoryImpl

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

func NewAttributesRepositoryImpl

func NewAttributesRepositoryImpl(dbConnection *pg.DB) *AttributesRepositoryImpl

func (AttributesRepositoryImpl) FindActiveList

func (repo AttributesRepositoryImpl) FindActiveList() ([]*Attributes, error)

func (AttributesRepositoryImpl) FindById

func (repo AttributesRepositoryImpl) FindById(id int) (*Attributes, error)

func (AttributesRepositoryImpl) FindByKey

func (repo AttributesRepositoryImpl) FindByKey(key string) (*Attributes, error)

func (*AttributesRepositoryImpl) GetConnection

func (impl *AttributesRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (AttributesRepositoryImpl) Save

func (repo AttributesRepositoryImpl) Save(model *Attributes, tx *pg.Tx) (*Attributes, error)

func (AttributesRepositoryImpl) Update

func (repo AttributesRepositoryImpl) Update(model *Attributes, tx *pg.Tx) error

type AuthMode

type AuthMode string
const (
	AUTH_MODE_USERNAME_PASSWORD AuthMode = "USERNAME_PASSWORD"
	AUTH_MODE_SSH               AuthMode = "SSH"
	AUTH_MODE_ACCESS_TOKEN      AuthMode = "ACCESS_TOKEN"
	AUTH_MODE_ANONYMOUS         AuthMode = "ANONYMOUS"
)

type CiArtifact

type CiArtifact struct {
	Id               int       `sql:"id,pk"`
	PipelineId       int       `sql:"pipeline_id,notnull"` //id of the ci pipeline from which this webhook was triggered
	Image            string    `sql:"image,notnull"`
	ImageDigest      string    `sql:"image_digest,notnull"`
	MaterialInfo     string    `sql:"material_info"` //git material metadata json array string
	DataSource       string    `sql:"data_source,notnull"`
	WorkflowId       *int      `sql:"ci_workflow_id"`
	ParentCiArtifact int       `sql:"parent_ci_artifact"`
	ScanEnabled      bool      `sql:"scan_enabled,notnull"`
	Scanned          bool      `sql:"scanned,notnull"`
	DeployedTime     time.Time `sql:"-"`
	Deployed         bool      `sql:"-"`
	Latest           bool      `sql:"-"`
	models.AuditLog
	// contains filtered or unexported fields
}

func (*CiArtifact) ParseMaterialInfo

func (info *CiArtifact) ParseMaterialInfo() (map[string]string, error)

return map of gitUrl:hash

type CiArtifactRepository

type CiArtifactRepository interface {
	Save(artifact *CiArtifact) error
	Get(id int) (artifact *CiArtifact, err error)
	GetByWfId(wfId int) (artifact *CiArtifact, err error)
	GetArtifactsByCDPipeline(cdPipelineId int) ([]CiArtifact, error)
	FetchArtifactForRollback(cdPipelineId int) ([]CiArtifact, error)

	GetArtifactsByCDPipelineV2(cdPipelineId int) ([]CiArtifact, error)
	GetArtifactsByCDPipelineAndRunnerType(cdPipelineId int, runnerType bean.CdWorkflowType) ([]CiArtifact, error)
	SaveAll(artifacts []*CiArtifact) error
	GetArtifactsByCiPipelineId(ciPipelineId int) ([]CiArtifact, error)
	FinDByParentCiArtifactAndCiId(parentCiArtifact int, ciPipelineIds []int) ([]*CiArtifact, error)
	GetLatest(cdPipelineId int) (int, error)
	GetByImageDigest(imageDigest string) (artifact *CiArtifact, err error)
	GetByIds(ids []int) ([]*CiArtifact, error)
}

type CiArtifactRepositoryImpl

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

func NewCiArtifactRepositoryImpl

func NewCiArtifactRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *CiArtifactRepositoryImpl

func (CiArtifactRepositoryImpl) FetchArtifactForRollback

func (impl CiArtifactRepositoryImpl) FetchArtifactForRollback(cdPipelineId int) ([]CiArtifact, error)

func (CiArtifactRepositoryImpl) FinDByParentCiArtifactAndCiId

func (impl CiArtifactRepositoryImpl) FinDByParentCiArtifactAndCiId(parentCiArtifact int, ciPipelineIds []int) ([]*CiArtifact, error)

func (CiArtifactRepositoryImpl) Get

func (impl CiArtifactRepositoryImpl) Get(id int) (artifact *CiArtifact, err error)

func (CiArtifactRepositoryImpl) GetArtifactsByCDPipeline

func (impl CiArtifactRepositoryImpl) GetArtifactsByCDPipeline(cdPipelineId int) ([]CiArtifact, error)

this method takes CD Pipeline id and Returns List of Artifacts Latest By last deployed

func (CiArtifactRepositoryImpl) GetArtifactsByCDPipelineAndRunnerType

func (impl CiArtifactRepositoryImpl) GetArtifactsByCDPipelineAndRunnerType(cdPipelineId int, runnerType bean.CdWorkflowType) ([]CiArtifact, error)

func (CiArtifactRepositoryImpl) GetArtifactsByCDPipelineV2

func (impl CiArtifactRepositoryImpl) GetArtifactsByCDPipelineV2(cdPipelineId int) ([]CiArtifact, error)

func (CiArtifactRepositoryImpl) GetArtifactsByCiPipelineId

func (impl CiArtifactRepositoryImpl) GetArtifactsByCiPipelineId(ciPipelineId int) ([]CiArtifact, error)

func (CiArtifactRepositoryImpl) GetByIds

func (impl CiArtifactRepositoryImpl) GetByIds(ids []int) ([]*CiArtifact, error)

func (CiArtifactRepositoryImpl) GetByImageDigest

func (impl CiArtifactRepositoryImpl) GetByImageDigest(imageDigest string) (*CiArtifact, error)

func (CiArtifactRepositoryImpl) GetByWfId

func (impl CiArtifactRepositoryImpl) GetByWfId(wfId int) (*CiArtifact, error)

func (CiArtifactRepositoryImpl) GetLatest

func (impl CiArtifactRepositoryImpl) GetLatest(cdPipelineId int) (int, error)

func (CiArtifactRepositoryImpl) Save

func (impl CiArtifactRepositoryImpl) Save(artifact *CiArtifact) error

func (CiArtifactRepositoryImpl) SaveAll

func (impl CiArtifactRepositoryImpl) SaveAll(artifacts []*CiArtifact) error

type CiMaterialInfo

type CiMaterialInfo struct {
	Material      Material       `json:"material"`
	Changed       bool           `json:"changed"`
	Modifications []Modification `json:"modifications"`
}

func GetCiMaterialInfo

func GetCiMaterialInfo(materialInfo string, source string) ([]CiMaterialInfo, error)

type DbConfig

type DbConfig struct {
	Id       int    `sql:"id,pk"`
	Name     string `sql:"name"` //name by which user identifies this db
	Type     DbType `sql:"type"` //type of db, PG, MYsql, MariaDb
	Host     string `sql:"host"`
	Port     string `sql:"port"`
	DbName   string `sql:"db_name"` //name of database inside PG
	UserName string `sql:"user_name"`
	Password string `sql:"password"`
	Active   bool   `sql:"active"`
	models.AuditLog
	// contains filtered or unexported fields
}

type DbConfigRepository

type DbConfigRepository interface {
	Save(config *DbConfig) error
	GetAll() (configs []*DbConfig, err error)
	GetById(id int) (*DbConfig, error)
	Update(config *DbConfig) (*DbConfig, error)
	GetActiveForAutocomplete() (configs []*DbConfig, err error)
}

type DbConfigRepositoryImpl

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

func NewDbConfigRepositoryImpl

func NewDbConfigRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *DbConfigRepositoryImpl

func (DbConfigRepositoryImpl) GetActiveForAutocomplete

func (impl DbConfigRepositoryImpl) GetActiveForAutocomplete() (configs []*DbConfig, err error)

func (DbConfigRepositoryImpl) GetAll

func (impl DbConfigRepositoryImpl) GetAll() (configs []*DbConfig, err error)

func (DbConfigRepositoryImpl) GetById

func (impl DbConfigRepositoryImpl) GetById(id int) (*DbConfig, error)

func (DbConfigRepositoryImpl) Save

func (impl DbConfigRepositoryImpl) Save(config *DbConfig) error

func (DbConfigRepositoryImpl) Update

func (impl DbConfigRepositoryImpl) Update(config *DbConfig) (*DbConfig, error)

type DbType

type DbType string
const (
	Db_TYPE_POSTGRESS DbType = "postgres"
	Db_TYPE_MYSQL     DbType = "mysql"
	DB_TYPE_MARIADB   DbType = "mariadb"
)

func (DbType) IsValid

func (t DbType) IsValid() bool

type DeploymentGroup

type DeploymentGroup struct {
	TableName           struct{} `sql:"deployment_group" pg:",discard_unknown_columns"`
	Id                  int      `sql:"id,pk"`
	Name                string   `sql:"name,notnull"`
	AppCount            int      `sql:"app_count,notnull"`
	NoOfApps            string   `sql:"no_of_apps"`
	EnvironmentId       int      `sql:"environment_id"`
	CiPipelineId        int      `sql:"ci_pipeline_id"`
	Active              bool     `sql:"active,notnull"`
	DeploymentGroupApps []*DeploymentGroupApp
	models.AuditLog
}

type DeploymentGroupApp

type DeploymentGroupApp struct {
	TableName         struct{} `sql:"deployment_group_app" pg:",discard_unknown_columns"`
	Id                int      `sql:"id,pk"`
	DeploymentGroupId int      `sql:"deployment_group_id"`
	AppId             int      `sql:"app_id"`
	Active            bool     `sql:"active,notnull"`
	models.AuditLog
}

type DeploymentGroupAppRepository

type DeploymentGroupAppRepository interface {
	Create(model *DeploymentGroupApp) (*DeploymentGroupApp, error)
	GetById(id int) (*DeploymentGroupApp, error)
	GetAll() ([]*DeploymentGroupApp, error)
	Update(model *DeploymentGroupApp) (*DeploymentGroupApp, error)
	Delete(model *DeploymentGroupApp) error
	GetByDeploymentGroup(deploymentGroupId int) ([]*DeploymentGroupApp, error)
}

type DeploymentGroupAppRepositoryImpl

type DeploymentGroupAppRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewDeploymentGroupAppRepositoryImpl

func NewDeploymentGroupAppRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *DeploymentGroupAppRepositoryImpl

func (DeploymentGroupAppRepositoryImpl) Create

func (DeploymentGroupAppRepositoryImpl) Delete

func (DeploymentGroupAppRepositoryImpl) GetAll

func (DeploymentGroupAppRepositoryImpl) GetByDeploymentGroup

func (impl DeploymentGroupAppRepositoryImpl) GetByDeploymentGroup(deploymentGroupId int) ([]*DeploymentGroupApp, error)

func (DeploymentGroupAppRepositoryImpl) GetById

func (DeploymentGroupAppRepositoryImpl) Update

type DeploymentGroupRepository

type DeploymentGroupRepository interface {
	Create(model *DeploymentGroup) (*DeploymentGroup, error)
	GetById(id int) (*DeploymentGroup, error)
	GetAll() ([]DeploymentGroup, error)
	Update(model *DeploymentGroup) (*DeploymentGroup, error)
	Delete(model *DeploymentGroup) error
	FindByIdWithApp(id int) (*DeploymentGroup, error)
}

type DeploymentGroupRepositoryImpl

type DeploymentGroupRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewDeploymentGroupRepositoryImpl

func NewDeploymentGroupRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *DeploymentGroupRepositoryImpl

func (*DeploymentGroupRepositoryImpl) Create

func (*DeploymentGroupRepositoryImpl) Delete

func (*DeploymentGroupRepositoryImpl) FindByIdWithApp

func (impl *DeploymentGroupRepositoryImpl) FindByIdWithApp(id int) (*DeploymentGroup, error)

func (*DeploymentGroupRepositoryImpl) GetAll

func (*DeploymentGroupRepositoryImpl) GetById

func (*DeploymentGroupRepositoryImpl) Update

type DeploymentStatus

type DeploymentStatus struct {
	Id        int       `sql:"id,pk"`
	AppName   string    `sql:"app_name,notnull"`
	Status    string    `sql:"status,notnull"`
	AppId     int       `sql:"app_id"`
	EnvId     int       `sql:"env_id"`
	CreatedOn time.Time `sql:"created_on"`
	UpdatedOn time.Time `sql:"updated_on"`
	// contains filtered or unexported fields
}

type DockerArtifactStore

type DockerArtifactStore struct {
	Id                 string       `sql:"id,pk" json:"id,,omitempty"`
	PluginId           string       `sql:"plugin_id,notnull" json:"pluginId,omitempty"`
	RegistryURL        string       `sql:"registry_url" json:"registryUrl,omitempty"`
	RegistryType       RegistryType `sql:"registry_type,notnull" json:"registryType,omitempty"`
	AWSAccessKeyId     string       `sql:"aws_accesskey_id" json:"awsAccessKeyId,omitempty" `
	AWSSecretAccessKey string       `sql:"aws_secret_accesskey" json:"awsSecretAccessKey,omitempty"`
	AWSRegion          string       `sql:"aws_region" json:"awsRegion,omitempty"`
	Username           string       `sql:"username" json:"username,omitempty"`
	Password           string       `sql:"password" json:"password,omitempty"`
	IsDefault          bool         `sql:"is_default,notnull" json:"isDefault"`
	Active             bool         `sql:"active,notnull" json:"active"`
	models.AuditLog
	// contains filtered or unexported fields
}

func (*DockerArtifactStore) GetRegistryLocation

func (store *DockerArtifactStore) GetRegistryLocation() (registryLocation string, err error)

type DockerArtifactStoreRepository

type DockerArtifactStoreRepository interface {
	Save(artifactStore *DockerArtifactStore) error
	FindActiveDefaultStore() (*DockerArtifactStore, error)
	FindAllActiveForAutocomplete() ([]DockerArtifactStore, error)
	FindAll() ([]DockerArtifactStore, error)
	FindOne(storeId string) (*DockerArtifactStore, error)
	Update(artifactStore *DockerArtifactStore) error
	Delete(storeId string) error
}

type DockerArtifactStoreRepositoryImpl

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

func NewDockerArtifactStoreRepositoryImpl

func NewDockerArtifactStoreRepositoryImpl(dbConnection *pg.DB) *DockerArtifactStoreRepositoryImpl

func (DockerArtifactStoreRepositoryImpl) Delete

func (impl DockerArtifactStoreRepositoryImpl) Delete(storeId string) error

func (DockerArtifactStoreRepositoryImpl) FindActiveDefaultStore

func (impl DockerArtifactStoreRepositoryImpl) FindActiveDefaultStore() (*DockerArtifactStore, error)

func (DockerArtifactStoreRepositoryImpl) FindAll

func (DockerArtifactStoreRepositoryImpl) FindAllActiveForAutocomplete

func (impl DockerArtifactStoreRepositoryImpl) FindAllActiveForAutocomplete() ([]DockerArtifactStore, error)

func (DockerArtifactStoreRepositoryImpl) FindOne

func (DockerArtifactStoreRepositoryImpl) Save

func (DockerArtifactStoreRepositoryImpl) Update

func (impl DockerArtifactStoreRepositoryImpl) Update(artifactStore *DockerArtifactStore) error

type EnvLevelAppMetrics

type EnvLevelAppMetrics struct {
	Id           int   `sql:"id,pk"`
	AppId        int   `sql:"app_id,notnull"`
	EnvId        int   `sql:"env_id,notnull"`
	AppMetrics   *bool `sql:"app_metrics,notnull"`
	InfraMetrics *bool `sql:"infra_metrics,notnull"`
	models.AuditLog
	// contains filtered or unexported fields
}

type EnvLevelAppMetricsRepository

type EnvLevelAppMetricsRepository interface {
	Save(metrics *EnvLevelAppMetrics) error
	Update(metrics *EnvLevelAppMetrics) error
	FindByAppIdAndEnvId(appId int, envId int) (*EnvLevelAppMetrics, error)
	Delete(metrics *EnvLevelAppMetrics) error
	FindByAppId(appId int) ([]*EnvLevelAppMetrics, error)
}

type EnvLevelAppMetricsRepositoryImpl

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

func NewEnvLevelAppMetricsRepositoryImpl

func NewEnvLevelAppMetricsRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *EnvLevelAppMetricsRepositoryImpl

func (*EnvLevelAppMetricsRepositoryImpl) Delete

func (*EnvLevelAppMetricsRepositoryImpl) FindByAppId

func (impl *EnvLevelAppMetricsRepositoryImpl) FindByAppId(appId int) ([]*EnvLevelAppMetrics, error)

func (*EnvLevelAppMetricsRepositoryImpl) FindByAppIdAndEnvId

func (impl *EnvLevelAppMetricsRepositoryImpl) FindByAppIdAndEnvId(appId int, envId int) (*EnvLevelAppMetrics, error)

func (*EnvLevelAppMetricsRepositoryImpl) Save

func (*EnvLevelAppMetricsRepositoryImpl) Update

type EventRepository

type EventRepository interface {
	Save(event *JobEvent) error
	Update(event *JobEvent) error
	FindLastCompletedEvent(eventTypeId int) (*JobEvent, error)
}

type EventRepositoryImpl

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

func NewEventRepositoryImpl

func NewEventRepositoryImpl(logger *zap.SugaredLogger, dbConnection *pg.DB) *EventRepositoryImpl

func (*EventRepositoryImpl) FindLastCompletedEvent

func (impl *EventRepositoryImpl) FindLastCompletedEvent(eventTypeId int) (*JobEvent, error)

func (*EventRepositoryImpl) Save

func (impl *EventRepositoryImpl) Save(event *JobEvent) error

func (*EventRepositoryImpl) Update

func (impl *EventRepositoryImpl) Update(event *JobEvent) error

type GitConfiguration

type GitConfiguration struct {
	URL string `json:"url"`
}

type GitOpsConfig

type GitOpsConfig struct {
	Id            int    `sql:"id,pk"`
	Provider      string `sql:"provider"`
	Username      string `sql:"username"`
	Token         string `sql:"token"`
	GitLabGroupId string `sql:"gitlab_group_id"`
	GitHubOrgId   string `sql:"github_org_id"`
	Host          string `sql:"host"`
	Active        bool   `sql:"active,notnull"`
	models.AuditLog
	// contains filtered or unexported fields
}

type GitOpsConfigRepository

type GitOpsConfigRepository interface {
	CreateGitOpsConfig(model *GitOpsConfig, tx *pg.Tx) (*GitOpsConfig, error)
	UpdateGitOpsConfig(model *GitOpsConfig, tx *pg.Tx) error
	GetGitOpsConfigById(id int) (*GitOpsConfig, error)
	GetAllGitOpsConfig() ([]*GitOpsConfig, error)
	GetGitOpsConfigByProvider(provider string) (*GitOpsConfig, error)
	GetGitOpsConfigActive() (*GitOpsConfig, error)
	GetConnection() *pg.DB
}

type GitOpsConfigRepositoryImpl

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

func NewGitOpsConfigRepositoryImpl

func NewGitOpsConfigRepositoryImpl(logger *zap.SugaredLogger, dbConnection *pg.DB) *GitOpsConfigRepositoryImpl

func (*GitOpsConfigRepositoryImpl) CreateGitOpsConfig

func (impl *GitOpsConfigRepositoryImpl) CreateGitOpsConfig(model *GitOpsConfig, tx *pg.Tx) (*GitOpsConfig, error)

func (*GitOpsConfigRepositoryImpl) GetAllGitOpsConfig

func (impl *GitOpsConfigRepositoryImpl) GetAllGitOpsConfig() ([]*GitOpsConfig, error)

func (*GitOpsConfigRepositoryImpl) GetConnection

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

func (*GitOpsConfigRepositoryImpl) GetGitOpsConfigActive

func (impl *GitOpsConfigRepositoryImpl) GetGitOpsConfigActive() (*GitOpsConfig, error)

func (*GitOpsConfigRepositoryImpl) GetGitOpsConfigById

func (impl *GitOpsConfigRepositoryImpl) GetGitOpsConfigById(id int) (*GitOpsConfig, error)

func (*GitOpsConfigRepositoryImpl) GetGitOpsConfigByProvider

func (impl *GitOpsConfigRepositoryImpl) GetGitOpsConfigByProvider(provider string) (*GitOpsConfig, error)

func (*GitOpsConfigRepositoryImpl) UpdateGitOpsConfig

func (impl *GitOpsConfigRepositoryImpl) UpdateGitOpsConfig(model *GitOpsConfig, tx *pg.Tx) error

type GitProvider

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

type GitProviderRepository

type GitProviderRepository interface {
	Save(gitProvider *GitProvider) error
	ProviderExists(url string) (bool, error)
	FindAllActiveForAutocomplete() ([]GitProvider, error)
	FindAll() ([]GitProvider, error)
	FindOne(providerId string) (GitProvider, error)
	Update(gitProvider *GitProvider) error
}

type GitProviderRepositoryImpl

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

func NewGitProviderRepositoryImpl

func NewGitProviderRepositoryImpl(dbConnection *pg.DB) *GitProviderRepositoryImpl

func (GitProviderRepositoryImpl) FindAll

func (impl GitProviderRepositoryImpl) FindAll() ([]GitProvider, error)

func (GitProviderRepositoryImpl) FindAllActiveForAutocomplete

func (impl GitProviderRepositoryImpl) FindAllActiveForAutocomplete() ([]GitProvider, error)

func (GitProviderRepositoryImpl) FindOne

func (impl GitProviderRepositoryImpl) FindOne(providerId string) (GitProvider, error)

func (GitProviderRepositoryImpl) ProviderExists

func (impl GitProviderRepositoryImpl) ProviderExists(url string) (bool, error)

func (GitProviderRepositoryImpl) Save

func (impl GitProviderRepositoryImpl) Save(gitProvider *GitProvider) error

func (GitProviderRepositoryImpl) Update

func (impl GitProviderRepositoryImpl) Update(gitProvider *GitProvider) error

type GitWebhook

type GitWebhook struct {
	Id            int       `sql:"id,pk"`
	CiMaterialId  int       `sql:"ci_material_id"`
	GitMaterialId int       `sql:"git_material_id"`
	Type          string    `sql:"type"`
	Value         string    `sql:"value"`
	Active        bool      `sql:"active"`
	LastSeenHash  string    `sql:"last_seen_hash"`
	CreatedOn     time.Time `sql:"created_on"`
	// contains filtered or unexported fields
}

type GitWebhookRepository

type GitWebhookRepository interface {
	Save(gitWebhook *GitWebhook) error
}

type GitWebhookRepositoryImpl

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

func NewGitWebhookRepositoryImpl

func NewGitWebhookRepositoryImpl(dbConnection *pg.DB) *GitWebhookRepositoryImpl

func (*GitWebhookRepositoryImpl) Save

func (impl *GitWebhookRepositoryImpl) Save(gitWebhook *GitWebhook) error

type JiraAccountDetails

type JiraAccountDetails struct {
	Id                 int32  `sql:"id,pk"`
	UserName           string `sql:"user_name"`
	AccountURL         string `sql:"account_url"`
	AuthToken          string `sql:"auth_token"`
	CommitMessageRegex string `sql:"commit_message_regex"`
	FinalIssueStatus   string `sql:"final_issue_status"`
	PipelineStage      string `sql:"pipeline_stage"`
	PipelineId         int32  `sql:"pipeline_id"`
	models.AuditLog
	// contains filtered or unexported fields
}

type JiraAccountRepository

type JiraAccountRepository interface {
	Save(accountDetails *JiraAccountDetails) error
	FindByPipelineIdAndStage(pipelineId int32, pipelineStage string) (*JiraAccountDetails, error)
	Update(accountDetails *JiraAccountDetails) error
}

type JiraAccountRepositoryImpl

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

func NewJiraAccountRepositoryImpl

func NewJiraAccountRepositoryImpl(dbConnection *pg.DB) *JiraAccountRepositoryImpl

func (*JiraAccountRepositoryImpl) FindByPipelineIdAndStage

func (impl *JiraAccountRepositoryImpl) FindByPipelineIdAndStage(pipelineId int32, pipelineStage string) (*JiraAccountDetails, error)

func (*JiraAccountRepositoryImpl) Save

func (impl *JiraAccountRepositoryImpl) Save(jiraAccountDetails *JiraAccountDetails) error

func (*JiraAccountRepositoryImpl) Update

func (impl *JiraAccountRepositoryImpl) Update(jiraAccountDetails *JiraAccountDetails) error

type JobEvent

type JobEvent struct {
	Id               int       `sql:"id,pk"`
	EventTriggerTime time.Time `sql:"event_trigger_time"`
	EventName        string    `sql:"name"`
	Status           string    `sql:"status"`
	Message          string    `sql:"message"`
	CreatedOn        time.Time `sql:"created_on"`
	UpdatedOn        time.Time `sql:"updated_on"`
	// contains filtered or unexported fields
}

type LinkoutsModel

type LinkoutsModel struct {
	TableName     struct{} `sql:"app_env_linkouts" pg:",discard_unknown_columns"`
	Id            int      `sql:"id,pk"`
	AppId         int      `sql:"app_id,notnull"`
	EnvironmentId int      `sql:"environment_id,notnull"`
	Link          string   `sql:"link"`
	Description   string   `sql:"description"`
	Name          string   `sql:"name"`
	models.AuditLog
}

type LinkoutsRepository

type LinkoutsRepository interface {
	Create(model *LinkoutsModel) (*LinkoutsModel, error)
	GetById(id int) (*LinkoutsModel, error)
	GetAll() ([]LinkoutsModel, error)
	Update(model *LinkoutsModel) (*LinkoutsModel, error)
	FetchLinkoutsByAppIdAndEnvId(appId int, envId int) ([]LinkoutsModel, error)
	FetchLinkoutById(Id int) (bean.LinkOuts, error)
}

type LinkoutsRepositoryImpl

type LinkoutsRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewLinkoutsRepositoryImpl

func NewLinkoutsRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *LinkoutsRepositoryImpl

func (LinkoutsRepositoryImpl) Create

func (impl LinkoutsRepositoryImpl) Create(model *LinkoutsModel) (*LinkoutsModel, error)

func (LinkoutsRepositoryImpl) FetchLinkoutById

func (impl LinkoutsRepositoryImpl) FetchLinkoutById(Id int) (bean.LinkOuts, error)

func (LinkoutsRepositoryImpl) FetchLinkoutsByAppIdAndEnvId

func (impl LinkoutsRepositoryImpl) FetchLinkoutsByAppIdAndEnvId(appId int, envId int) ([]LinkoutsModel, error)

func (LinkoutsRepositoryImpl) GetAll

func (impl LinkoutsRepositoryImpl) GetAll() ([]LinkoutsModel, error)

func (LinkoutsRepositoryImpl) GetById

func (impl LinkoutsRepositoryImpl) GetById(id int) (*LinkoutsModel, error)

func (LinkoutsRepositoryImpl) Update

func (impl LinkoutsRepositoryImpl) Update(model *LinkoutsModel) (*LinkoutsModel, error)

type Material

type Material struct {
	PluginID         string           `json:"plugin-id"`
	GitConfiguration GitConfiguration `json:"git-configuration"`
	ScmConfiguration ScmConfiguration `json:"scm-configuration"`
	Type             string           `json:"type"`
}

type Modification

type Modification struct {
	Revision     string            `json:"revision"`
	ModifiedTime string            `json:"modified-time"`
	Data         map[string]string `json:"data"`
	Author       string            `json:"author"`
	Message      string            `json:"message"`
	Branch       string            `json:"branch"`
	Tag          string            `json:"tag,omitempty"`
}

type NotificationSettings

type NotificationSettings struct {
	Id           int    `sql:"id,pk"`
	TeamId       *int   `sql:"team_id"`
	AppId        *int   `sql:"app_id"`
	EnvId        *int   `sql:"env_id"`
	PipelineId   *int   `sql:"pipeline_id"`
	PipelineType string `sql:"pipeline_type"`
	EventTypeId  int    `sql:"event_type_id"`
	Config       string `sql:"config"`
	ViewId       int    `sql:"view_id"`
	// contains filtered or unexported fields
}

type NotificationSettingsRepository

type NotificationSettingsRepository interface {
	FindNSViewCount() (int, error)
	SaveNotificationSettingsConfig(notificationSettingsView *NotificationSettingsView, tx *pg.Tx) (*NotificationSettingsView, error)
	FindNotificationSettingsViewById(id int) (*NotificationSettingsView, error)
	FindNotificationSettingsViewByIds(id []*int) ([]*NotificationSettingsView, error)
	UpdateNotificationSettingsView(notificationSettingsView *NotificationSettingsView, tx *pg.Tx) (*NotificationSettingsView, error)
	SaveNotificationSetting(notificationSettings *NotificationSettings, tx *pg.Tx) (*NotificationSettings, error)
	UpdateNotificationSettings(notificationSettings *NotificationSettings, tx *pg.Tx) (*NotificationSettings, error)
	FindNotificationSettingsByViewId(viewId int) ([]NotificationSettings, error)
	SaveAllNotificationSettings(notificationSettings []NotificationSettings, tx *pg.Tx) (int, error)
	DeleteNotificationSettingsByConfigId(viewId int, tx *pg.Tx) (int, error)
	FindAll(offset int, size int) ([]*NotificationSettingsView, error)
	DeleteNotificationSettingsViewById(id int, tx *pg.Tx) (int, error)

	FindNotificationSettingDeploymentOptions(settingRequest *SearchRequest) ([]*SettingOptionDTO, error)
	FindNotificationSettingBuildOptions(settingRequest *SearchRequest) ([]*SettingOptionDTO, error)
	FetchNotificationSettingGroupBy(viewId int) ([]NotificationSettings, error)
}

type NotificationSettingsRepositoryImpl

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

func NewNotificationSettingsRepositoryImpl

func NewNotificationSettingsRepositoryImpl(dbConnection *pg.DB) *NotificationSettingsRepositoryImpl

func (*NotificationSettingsRepositoryImpl) DeleteNotificationSettingsByConfigId

func (impl *NotificationSettingsRepositoryImpl) DeleteNotificationSettingsByConfigId(viewId int, tx *pg.Tx) (int, error)

func (*NotificationSettingsRepositoryImpl) DeleteNotificationSettingsViewById

func (impl *NotificationSettingsRepositoryImpl) DeleteNotificationSettingsViewById(id int, tx *pg.Tx) (int, error)

func (*NotificationSettingsRepositoryImpl) FetchNotificationSettingGroupBy

func (impl *NotificationSettingsRepositoryImpl) FetchNotificationSettingGroupBy(viewId int) ([]NotificationSettings, error)

func (*NotificationSettingsRepositoryImpl) FindAll

func (impl *NotificationSettingsRepositoryImpl) FindAll(offset int, size int) ([]*NotificationSettingsView, error)

func (*NotificationSettingsRepositoryImpl) FindNSViewCount

func (impl *NotificationSettingsRepositoryImpl) FindNSViewCount() (int, error)

func (*NotificationSettingsRepositoryImpl) FindNotificationSettingBuildOptions

func (impl *NotificationSettingsRepositoryImpl) FindNotificationSettingBuildOptions(settingRequest *SearchRequest) ([]*SettingOptionDTO, error)

func (*NotificationSettingsRepositoryImpl) FindNotificationSettingDeploymentOptions

func (impl *NotificationSettingsRepositoryImpl) FindNotificationSettingDeploymentOptions(settingRequest *SearchRequest) ([]*SettingOptionDTO, error)

func (*NotificationSettingsRepositoryImpl) FindNotificationSettingsByViewId

func (impl *NotificationSettingsRepositoryImpl) FindNotificationSettingsByViewId(viewId int) ([]NotificationSettings, error)

func (*NotificationSettingsRepositoryImpl) FindNotificationSettingsViewById

func (impl *NotificationSettingsRepositoryImpl) FindNotificationSettingsViewById(id int) (*NotificationSettingsView, error)

func (*NotificationSettingsRepositoryImpl) FindNotificationSettingsViewByIds

func (impl *NotificationSettingsRepositoryImpl) FindNotificationSettingsViewByIds(ids []*int) ([]*NotificationSettingsView, error)

func (*NotificationSettingsRepositoryImpl) SaveAllNotificationSettings

func (impl *NotificationSettingsRepositoryImpl) SaveAllNotificationSettings(notificationSettings []NotificationSettings, tx *pg.Tx) (int, error)

func (*NotificationSettingsRepositoryImpl) SaveNotificationSetting

func (impl *NotificationSettingsRepositoryImpl) SaveNotificationSetting(notificationSettings *NotificationSettings, tx *pg.Tx) (*NotificationSettings, error)

func (*NotificationSettingsRepositoryImpl) SaveNotificationSettingsConfig

func (impl *NotificationSettingsRepositoryImpl) SaveNotificationSettingsConfig(notificationSettingsView *NotificationSettingsView, tx *pg.Tx) (*NotificationSettingsView, error)

func (*NotificationSettingsRepositoryImpl) UpdateNotificationSettings

func (impl *NotificationSettingsRepositoryImpl) UpdateNotificationSettings(notificationSettings *NotificationSettings, tx *pg.Tx) (*NotificationSettings, error)

func (*NotificationSettingsRepositoryImpl) UpdateNotificationSettingsView

func (impl *NotificationSettingsRepositoryImpl) UpdateNotificationSettingsView(notificationSettingsView *NotificationSettingsView, tx *pg.Tx) (*NotificationSettingsView, error)

type NotificationSettingsView

type NotificationSettingsView struct {
	Id     int    `sql:"id,pk"`
	Config string `sql:"config"`
	//ConfigName    string   `sql:"config_name"`
	//AppId         *int     `sql:"app_id"`
	//EnvironmentId *int     `sql:"env_id"`
	models.AuditLog
	// contains filtered or unexported fields
}

type NotificationSettingsViewWithAppEnv

type NotificationSettingsViewWithAppEnv struct {
	Id              int    `json:"id"`
	AppId           *int   `json:"app_id"`
	EnvId           *int   `json:"env_id"`
	ConfigName      string `sql:"config_name"`
	Config          string `sql:"config"`
	AppName         string `json:"app_name"`
	EnvironmentName string `json:"env_name"`
	models.AuditLog
}

type RegistryType

type RegistryType string

type RoleGroup

type RoleGroup struct {
	TableName   struct{} `sql:"role_group" pg:",discard_unknown_columns"`
	Id          int32    `sql:"id,pk"`
	Name        string   `sql:"name,notnull"`
	CasbinName  string   `sql:"casbin_name,notnull"`
	Description string   `sql:"description"`
	Active      bool     `sql:"active,notnull"`
	models.AuditLog
}

type RoleGroupRepository

type RoleGroupRepository interface {
	CreateRoleGroup(model *RoleGroup, tx *pg.Tx) (*RoleGroup, error)
	UpdateRoleGroup(model *RoleGroup, tx *pg.Tx) (*RoleGroup, error)
	GetRoleGroupById(id int32) (*RoleGroup, error)
	GetRoleGroupByName(name string) (*RoleGroup, error)
	GetRoleGroupListByName(name string) ([]*RoleGroup, error)
	GetAllRoleGroup() ([]*RoleGroup, error)
	GetRoleGroupListByCasbinNames(name []string) ([]*RoleGroup, error)

	CreateRoleGroupRoleMapping(model *RoleGroupRoleMapping, tx *pg.Tx) (*RoleGroupRoleMapping, error)
	GetRoleGroupRoleMapping(model int32) (*RoleGroupRoleMapping, error)
	GetRoleGroupRoleMappingByRoleGroupId(roleGroupId int32) ([]*RoleGroupRoleMapping, error)
	DeleteRoleGroupRoleMapping(model *RoleGroupRoleMapping, tx *pg.Tx) (bool, error)
	GetConnection() (dbConnection *pg.DB)
}

type RoleGroupRepositoryImpl

type RoleGroupRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewRoleGroupRepositoryImpl

func NewRoleGroupRepositoryImpl(dbConnection *pg.DB, Logger *zap.SugaredLogger) *RoleGroupRepositoryImpl

func (RoleGroupRepositoryImpl) CreateRoleGroup

func (impl RoleGroupRepositoryImpl) CreateRoleGroup(model *RoleGroup, tx *pg.Tx) (*RoleGroup, error)

func (RoleGroupRepositoryImpl) CreateRoleGroupRoleMapping

func (impl RoleGroupRepositoryImpl) CreateRoleGroupRoleMapping(model *RoleGroupRoleMapping, tx *pg.Tx) (*RoleGroupRoleMapping, error)

func (RoleGroupRepositoryImpl) DeleteRoleGroupRoleMapping

func (impl RoleGroupRepositoryImpl) DeleteRoleGroupRoleMapping(model *RoleGroupRoleMapping, tx *pg.Tx) (bool, error)

func (RoleGroupRepositoryImpl) GetAllRoleGroup

func (impl RoleGroupRepositoryImpl) GetAllRoleGroup() ([]*RoleGroup, error)

func (*RoleGroupRepositoryImpl) GetConnection

func (impl *RoleGroupRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (RoleGroupRepositoryImpl) GetRoleGroupById

func (impl RoleGroupRepositoryImpl) GetRoleGroupById(id int32) (*RoleGroup, error)

func (RoleGroupRepositoryImpl) GetRoleGroupByName

func (impl RoleGroupRepositoryImpl) GetRoleGroupByName(name string) (*RoleGroup, error)

func (RoleGroupRepositoryImpl) GetRoleGroupListByCasbinNames

func (impl RoleGroupRepositoryImpl) GetRoleGroupListByCasbinNames(names []string) ([]*RoleGroup, error)

func (RoleGroupRepositoryImpl) GetRoleGroupListByName

func (impl RoleGroupRepositoryImpl) GetRoleGroupListByName(name string) ([]*RoleGroup, error)

func (RoleGroupRepositoryImpl) GetRoleGroupRoleMapping

func (impl RoleGroupRepositoryImpl) GetRoleGroupRoleMapping(userRoleModelId int32) (*RoleGroupRoleMapping, error)

func (RoleGroupRepositoryImpl) GetRoleGroupRoleMappingByRoleGroupId

func (impl RoleGroupRepositoryImpl) GetRoleGroupRoleMappingByRoleGroupId(roleGroupId int32) ([]*RoleGroupRoleMapping, error)

func (RoleGroupRepositoryImpl) UpdateRoleGroup

func (impl RoleGroupRepositoryImpl) UpdateRoleGroup(model *RoleGroup, tx *pg.Tx) (*RoleGroup, error)

type RoleGroupRoleMapping

type RoleGroupRoleMapping struct {
	TableName   struct{} `sql:"role_group_role_mapping"  pg:",discard_unknown_columns"`
	Id          int      `sql:"id,pk"`
	RoleGroupId int32    `sql:"role_group_id,notnull"`
	RoleId      int      `sql:"role_id,notnull"`
	//User        UserModel
	models.AuditLog
}

type RoleModel

type RoleModel struct {
	TableName   struct{} `sql:"roles" pg:",discard_unknown_columns"`
	Id          int      `sql:"id,pk"`
	Role        string   `sql:"role,notnull"`
	Entity      string   `sql:"entity"`
	Team        string   `sql:"team"`
	EntityName  string   `sql:"entity_name"`
	Environment string   `sql:"environment"`
	Action      string   `sql:"action"`
	models.AuditLog
}

type SESConfig

type SESConfig struct {
	Id           int    `sql:"id,pk"`
	Region       string `sql:"region"`
	AccessKey    string `sql:"access_key"`
	SecretKey    string `sql:"secret_access_key"`
	FromEmail    string `sql:"from_email"`
	SessionToken string `sql:"session_token"`
	ConfigName   string `sql:"config_name"`
	Description  string `sql:"description"`
	OwnerId      int32  `sql:"owner_id"`
	Default      bool   `sql:"default,notnull"`
	models.AuditLog
	// contains filtered or unexported fields
}

type SESNotificationRepository

type SESNotificationRepository interface {
	FindOne(id int) (*SESConfig, error)
	UpdateSESConfig(sesConfig *SESConfig) (*SESConfig, error)
	SaveSESConfig(sesConfig *SESConfig) (*SESConfig, error)
	FindAll() ([]*SESConfig, error)
	FindByIdsIn(ids []int) ([]*SESConfig, error)
	FindByTeamIdOrOwnerId(ownerId int32) ([]*SESConfig, error)
	UpdateSESConfigDefault() (bool, error)
	FindByIds(ids []*int) ([]*SESConfig, error)
	FindDefault() (*SESConfig, error)
}

type SESNotificationRepositoryImpl

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

func NewSESNotificationRepositoryImpl

func NewSESNotificationRepositoryImpl(dbConnection *pg.DB) *SESNotificationRepositoryImpl

func (*SESNotificationRepositoryImpl) FindAll

func (impl *SESNotificationRepositoryImpl) FindAll() ([]*SESConfig, error)

func (*SESNotificationRepositoryImpl) FindByIds

func (repo *SESNotificationRepositoryImpl) FindByIds(ids []*int) ([]*SESConfig, error)

func (*SESNotificationRepositoryImpl) FindByIdsIn

func (impl *SESNotificationRepositoryImpl) FindByIdsIn(ids []int) ([]*SESConfig, error)

func (*SESNotificationRepositoryImpl) FindByTeamIdOrOwnerId

func (impl *SESNotificationRepositoryImpl) FindByTeamIdOrOwnerId(ownerId int32) ([]*SESConfig, error)

func (*SESNotificationRepositoryImpl) FindDefault

func (impl *SESNotificationRepositoryImpl) FindDefault() (*SESConfig, error)

func (*SESNotificationRepositoryImpl) FindOne

func (impl *SESNotificationRepositoryImpl) FindOne(id int) (*SESConfig, error)

func (*SESNotificationRepositoryImpl) SaveSESConfig

func (impl *SESNotificationRepositoryImpl) SaveSESConfig(sesConfig *SESConfig) (*SESConfig, error)

func (*SESNotificationRepositoryImpl) UpdateSESConfig

func (impl *SESNotificationRepositoryImpl) UpdateSESConfig(sesConfig *SESConfig) (*SESConfig, error)

func (*SESNotificationRepositoryImpl) UpdateSESConfigDefault

func (impl *SESNotificationRepositoryImpl) UpdateSESConfigDefault() (bool, error)

type SSOLoginModel

type SSOLoginModel struct {
	TableName struct{} `sql:"sso_login_config"`
	Id        int32    `sql:"id,pk"`
	Name      string   `sql:"name,notnull"`
	Label     string   `sql:"label"`
	Url       string   `sql:"url"`
	Config    string   `sql:"config"`
	Active    bool     `sql:"active,notnull"`
	models.AuditLog
}

type SSOLoginRepository

type SSOLoginRepository interface {
	Create(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)
	Update(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)
	GetById(id int32) (*SSOLoginModel, error)
	GetAll() ([]SSOLoginModel, error)
	GetActive() (*SSOLoginModel, error)
	Delete(userModel *SSOLoginModel, tx *pg.Tx) (bool, error)
	GetByName(name string) (*SSOLoginModel, error)

	GetConnection() (dbConnection *pg.DB)
}

type SSOLoginRepositoryImpl

type SSOLoginRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewSSOLoginRepositoryImpl

func NewSSOLoginRepositoryImpl(dbConnection *pg.DB) *SSOLoginRepositoryImpl

func (SSOLoginRepositoryImpl) Create

func (impl SSOLoginRepositoryImpl) Create(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) Delete

func (impl SSOLoginRepositoryImpl) Delete(userModel *SSOLoginModel, tx *pg.Tx) (bool, error)

func (SSOLoginRepositoryImpl) GetActive

func (impl SSOLoginRepositoryImpl) GetActive() (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetAll

func (impl SSOLoginRepositoryImpl) GetAll() ([]SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetById

func (impl SSOLoginRepositoryImpl) GetById(id int32) (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetByName

func (impl SSOLoginRepositoryImpl) GetByName(name string) (*SSOLoginModel, error)

func (*SSOLoginRepositoryImpl) GetConnection

func (impl *SSOLoginRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (SSOLoginRepositoryImpl) Update

func (impl SSOLoginRepositoryImpl) Update(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)

type ScmConfiguration

type ScmConfiguration struct {
	URL string `json:"url"`
}

type SearchRequest

type SearchRequest struct {
	TeamId       []*int `json:"teamId" validate:"number"`
	EnvId        []*int `json:"envId" validate:"number"`
	AppId        []*int `json:"appId" validate:"number"`
	PipelineName string `json:"pipelineName"`
	UserId       int32  `json:"-"`
}

type SettingOptionDTO

type SettingOptionDTO struct {
	//TeamId       int    `json:"-"`
	//AppId        int    `json:"-"`
	//EnvId        int    `json:"-"`
	PipelineId      int    `json:"pipelineId"`
	PipelineName    string `json:"pipelineName"`
	PipelineType    string `json:"pipelineType"`
	EnvironmentName string `json:"environmentName,omitempty"`
}

type SlackConfig

type SlackConfig struct {
	Id          int    `sql:"id,pk"`
	WebHookUrl  string `sql:"web_hook_url"`
	ConfigName  string `sql:"config_name"`
	Description string `sql:"description"`
	OwnerId     int32  `sql:"owner_id"`
	TeamId      int    `sql:"team_id"`
	models.AuditLog
	// contains filtered or unexported fields
}

type SlackNotificationRepository

type SlackNotificationRepository interface {
	FindOne(id int) (*SlackConfig, error)
	UpdateSlackConfig(slackConfig *SlackConfig) (*SlackConfig, error)
	SaveSlackConfig(slackConfig *SlackConfig) (*SlackConfig, error)
	FindAll() ([]SlackConfig, error)
	FindByIdsIn(ids []int) ([]*SlackConfig, error)
	FindByTeamIdOrOwnerId(ownerId int32, teamIds []int) ([]SlackConfig, error)
	FindByName(value string) ([]SlackConfig, error)
	FindByIds(ids []*int) ([]*SlackConfig, error)
}

type SlackNotificationRepositoryImpl

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

func NewSlackNotificationRepositoryImpl

func NewSlackNotificationRepositoryImpl(dbConnection *pg.DB) *SlackNotificationRepositoryImpl

func (*SlackNotificationRepositoryImpl) FindAll

func (impl *SlackNotificationRepositoryImpl) FindAll() ([]SlackConfig, error)

func (*SlackNotificationRepositoryImpl) FindByIds

func (repo *SlackNotificationRepositoryImpl) FindByIds(ids []*int) ([]*SlackConfig, error)

func (*SlackNotificationRepositoryImpl) FindByIdsIn

func (impl *SlackNotificationRepositoryImpl) FindByIdsIn(ids []int) ([]*SlackConfig, error)

func (*SlackNotificationRepositoryImpl) FindByName

func (impl *SlackNotificationRepositoryImpl) FindByName(value string) ([]SlackConfig, error)

func (*SlackNotificationRepositoryImpl) FindByTeamIdOrOwnerId

func (impl *SlackNotificationRepositoryImpl) FindByTeamIdOrOwnerId(ownerId int32, teamIds []int) ([]SlackConfig, error)

func (*SlackNotificationRepositoryImpl) FindOne

func (impl *SlackNotificationRepositoryImpl) FindOne(id int) (*SlackConfig, error)

func (*SlackNotificationRepositoryImpl) SaveSlackConfig

func (impl *SlackNotificationRepositoryImpl) SaveSlackConfig(slackConfig *SlackConfig) (*SlackConfig, error)

func (*SlackNotificationRepositoryImpl) UpdateSlackConfig

func (impl *SlackNotificationRepositoryImpl) UpdateSlackConfig(slackConfig *SlackConfig) (*SlackConfig, error)

type UserAuthRepository

type UserAuthRepository interface {
	CreateRole(userModel *RoleModel, tx *pg.Tx) (*RoleModel, error)
	UpdateRole(userModel *RoleModel, tx *pg.Tx) (*RoleModel, error)
	GetRole(role string) (*RoleModel, error)
	GetRoleById(id int) (*RoleModel, error)
	GetRolesByUserId(userId int32) ([]RoleModel, error)
	GetRolesByGroupId(userId int32) ([]*RoleModel, error)
	GetAllRole() ([]RoleModel, error)
	GetRoleByFilter(entity string, team string, app string, env string, act string) (RoleModel, error)
	DeleteRole(roleModel *RoleModel, tx *pg.Tx) (bool, error)

	CreateUserRoleMapping(userRoleModel *UserRoleModel, tx *pg.Tx) (*UserRoleModel, error)
	GetUserRoleMapping(userRoleModelId int) (*UserRoleModel, error)
	GetUserRoleMappingByRoleId(roleId int) ([]*UserRoleModel, error)
	GetUserRoleMappingByUserId(userId int32) ([]*UserRoleModel, error)
	DeleteUserRoleMapping(userRoleModel *UserRoleModel, tx *pg.Tx) (bool, error)

	CreateDefaultPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)
	CreateDefaultPoliciesForGlobalEntity(entity string, entityName string, action string, tx *pg.Tx) (bool, error)
	CreateUpdateDefaultPoliciesForSuperAdmin(tx *pg.Tx) (bool, error)
	SyncOrchestratorToCasbin(team string, entityName string, env string, tx *pg.Tx) (bool, error)
}

type UserAuthRepositoryImpl

type UserAuthRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewUserAuthRepositoryImpl

func NewUserAuthRepositoryImpl(dbConnection *pg.DB, Logger *zap.SugaredLogger) *UserAuthRepositoryImpl

func (UserAuthRepositoryImpl) CreateDefaultPolicies

func (impl UserAuthRepositoryImpl) CreateDefaultPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) CreateDefaultPoliciesForGlobalEntity

func (impl UserAuthRepositoryImpl) CreateDefaultPoliciesForGlobalEntity(entity string, entityName string, action string, tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) CreateRole

func (impl UserAuthRepositoryImpl) CreateRole(userModel *RoleModel, tx *pg.Tx) (*RoleModel, error)

func (UserAuthRepositoryImpl) CreateUpdateDefaultPoliciesForSuperAdmin

func (impl UserAuthRepositoryImpl) CreateUpdateDefaultPoliciesForSuperAdmin(tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) CreateUserRoleMapping

func (impl UserAuthRepositoryImpl) CreateUserRoleMapping(userRoleModel *UserRoleModel, tx *pg.Tx) (*UserRoleModel, error)

func (UserAuthRepositoryImpl) DeleteRole

func (impl UserAuthRepositoryImpl) DeleteRole(roleModel *RoleModel, tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) DeleteUserRoleMapping

func (impl UserAuthRepositoryImpl) DeleteUserRoleMapping(userRoleModel *UserRoleModel, tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) GetAllRole

func (impl UserAuthRepositoryImpl) GetAllRole() ([]RoleModel, error)

func (UserAuthRepositoryImpl) GetRole

func (impl UserAuthRepositoryImpl) GetRole(role string) (*RoleModel, error)

func (UserAuthRepositoryImpl) GetRoleByFilter

func (impl UserAuthRepositoryImpl) GetRoleByFilter(entity string, team string, app string, env string, act string) (RoleModel, error)

func (UserAuthRepositoryImpl) GetRoleById

func (impl UserAuthRepositoryImpl) GetRoleById(id int) (*RoleModel, error)

func (UserAuthRepositoryImpl) GetRolesByGroupId

func (impl UserAuthRepositoryImpl) GetRolesByGroupId(roleGroupId int32) ([]*RoleModel, error)

func (UserAuthRepositoryImpl) GetRolesByUserId

func (impl UserAuthRepositoryImpl) GetRolesByUserId(userId int32) ([]RoleModel, error)

func (UserAuthRepositoryImpl) GetUserRoleMapping

func (impl UserAuthRepositoryImpl) GetUserRoleMapping(userRoleModelId int) (*UserRoleModel, error)

func (UserAuthRepositoryImpl) GetUserRoleMappingByRoleId

func (impl UserAuthRepositoryImpl) GetUserRoleMappingByRoleId(roleId int) ([]*UserRoleModel, error)

func (UserAuthRepositoryImpl) GetUserRoleMappingByUserId

func (impl UserAuthRepositoryImpl) GetUserRoleMappingByUserId(userId int32) ([]*UserRoleModel, error)

func (UserAuthRepositoryImpl) SyncOrchestratorToCasbin

func (impl UserAuthRepositoryImpl) SyncOrchestratorToCasbin(team string, entityName string, env string, tx *pg.Tx) (bool, error)

func (UserAuthRepositoryImpl) UpdateRole

func (impl UserAuthRepositoryImpl) UpdateRole(userModel *RoleModel, tx *pg.Tx) (*RoleModel, error)

type UserModel

type UserModel struct {
	TableName   struct{} `sql:"users"`
	Id          int32    `sql:"id,pk"`
	EmailId     string   `sql:"email_id,notnull"`
	AccessToken string   `sql:"access_token"`
	Active      bool     `sql:"active,notnull"`
	models.AuditLog
}

type UserRepository

type UserRepository interface {
	CreateUser(userModel *UserModel, tx *pg.Tx) (*UserModel, error)
	UpdateUser(userModel *UserModel, tx *pg.Tx) (*UserModel, error)
	GetById(id int32) (*UserModel, error)
	GetAll() ([]UserModel, error)
	GetUsersByFilter(size int, from int) ([]UserModel, error)
	FetchActiveUserByEmail(email string) (bean.UserInfo, error)
	FetchUserDetailByEmail(email string) (bean.UserInfo, error)
	GetByIds(ids []int32) ([]UserModel, error)
	DeleteUser(userModel *UserModel, tx *pg.Tx) (bool, error)

	GetConnection() (dbConnection *pg.DB)
	FetchUserMatchesByEmailId(email string) ([]UserModel, error)
	FetchActiveOrDeletedUserByEmail(email string) (*UserModel, error)
}

type UserRepositoryImpl

type UserRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewUserRepositoryImpl

func NewUserRepositoryImpl(dbConnection *pg.DB) *UserRepositoryImpl

func (UserRepositoryImpl) CreateUser

func (impl UserRepositoryImpl) CreateUser(userModel *UserModel, tx *pg.Tx) (*UserModel, error)

func (UserRepositoryImpl) DeleteUser

func (impl UserRepositoryImpl) DeleteUser(userModel *UserModel, tx *pg.Tx) (bool, error)

func (UserRepositoryImpl) FetchActiveOrDeletedUserByEmail

func (impl UserRepositoryImpl) FetchActiveOrDeletedUserByEmail(email string) (*UserModel, error)

func (UserRepositoryImpl) FetchActiveUserByEmail

func (impl UserRepositoryImpl) FetchActiveUserByEmail(email string) (bean.UserInfo, error)

func (UserRepositoryImpl) FetchUserDetailByEmail

func (impl UserRepositoryImpl) FetchUserDetailByEmail(email string) (bean.UserInfo, error)

func (UserRepositoryImpl) FetchUserMatchesByEmailId

func (impl UserRepositoryImpl) FetchUserMatchesByEmailId(email string) ([]UserModel, error)

func (UserRepositoryImpl) GetAll

func (impl UserRepositoryImpl) GetAll() ([]UserModel, error)

func (UserRepositoryImpl) GetById

func (impl UserRepositoryImpl) GetById(id int32) (*UserModel, error)

func (UserRepositoryImpl) GetByIds

func (impl UserRepositoryImpl) GetByIds(ids []int32) ([]UserModel, error)

func (*UserRepositoryImpl) GetConnection

func (impl *UserRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (UserRepositoryImpl) GetUsersByFilter

func (impl UserRepositoryImpl) GetUsersByFilter(size int, from int) ([]UserModel, error)

func (UserRepositoryImpl) UpdateUser

func (impl UserRepositoryImpl) UpdateUser(userModel *UserModel, tx *pg.Tx) (*UserModel, error)

type UserRoleModel

type UserRoleModel struct {
	TableName struct{} `sql:"user_roles"`
	Id        int      `sql:"id,pk"`
	UserId    int32    `sql:"user_id,notnull"`
	RoleId    int      `sql:"role_id,notnull"`
	User      UserModel
	models.AuditLog
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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