Documentation
¶
Index ¶
- func CollectVariables(entityToVariables map[Entity][]string, entities []Entity) []string
- type Entity
- type EntityType
- type HistoryReference
- type HistoryReferenceType
- type ScopedVariableRepository
- type ScopedVariableRepositoryImpl
- func (impl *ScopedVariableRepositoryImpl) CreateVariableData(variableDefinition []*VariableData, tx *pg.Tx) error
- func (impl *ScopedVariableRepositoryImpl) CreateVariableDefinition(variableDefinition []*VariableDefinition, tx *pg.Tx) ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) DeleteVariables(auditLog sql.AuditLog, tx *pg.Tx) error
- func (impl *ScopedVariableRepositoryImpl) GetAllVariableDefinition() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetAllVariableMetadata() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetAllVariables() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
- func (impl *ScopedVariableRepositoryImpl) GetVariableTypeForVariableNames(variableNames []string) ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetVariablesByNames(vars []string) ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetVariablesForVarIds(ids []int) ([]*VariableDefinition, error)
- type VariableData
- type VariableDefinition
- type VariableEntityMapping
- type VariableEntityMappingRepository
- type VariableEntityMappingRepositoryImpl
- func (impl *VariableEntityMappingRepositoryImpl) DeleteAllVariablesForEntities(tx *pg.Tx, entities []Entity, userId int32) error
- func (impl *VariableEntityMappingRepositoryImpl) DeleteVariablesForEntity(tx *pg.Tx, variableNames []string, entity Entity, userId int32) error
- func (impl *VariableEntityMappingRepositoryImpl) GetVariablesForEntities(entities []Entity) ([]*VariableEntityMapping, error)
- func (impl *VariableEntityMappingRepositoryImpl) SaveVariableEntityMappings(tx *pg.Tx, mappings []*VariableEntityMapping) error
- type VariableSnapshotHistory
- type VariableSnapshotHistoryBean
- type VariableSnapshotHistoryBeanRaw
- type VariableSnapshotHistoryRepository
- type VariableSnapshotHistoryRepositoryImpl
- func (impl VariableSnapshotHistoryRepositoryImpl) CheckIfVariableSnapshotExists(historyReference HistoryReference) (bool, error)
- func (impl VariableSnapshotHistoryRepositoryImpl) GetVariableSnapshots(historyReferences []HistoryReference) ([]*VariableSnapshotHistory, error)
- func (impl VariableSnapshotHistoryRepositoryImpl) SaveVariableSnapshots(variableSnapshotHistories []*VariableSnapshotHistory) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entity ¶
type Entity struct {
EntityType EntityType `sql:"entity_type"`
EntityId int `sql:"entity_id"`
}
func GetEntity ¶ added in v0.6.26
func GetEntity(entityId int, entityType EntityType) Entity
type EntityType ¶
type EntityType int
const ( EntityTypeDeploymentTemplateAppLevel EntityType = 1 EntityTypeDeploymentTemplateEnvLevel EntityType = 2 EntityTypePipelineStage EntityType = 3 EntityTypeConfigMapAppLevel EntityType = 4 EntityTypeConfigMapEnvLevel EntityType = 5 EntityTypeSecretAppLevel EntityType = 6 EntityTypeSecretEnvLevel EntityType = 7 )
type HistoryReference ¶
type HistoryReference struct {
HistoryReferenceId int `sql:"history_reference_id"`
HistoryReferenceType HistoryReferenceType `sql:"history_reference_type"`
}
type HistoryReferenceType ¶
type HistoryReferenceType int
const ( HistoryReferenceTypeDeploymentTemplate HistoryReferenceType = 1 HistoryReferenceTypeCIWORKFLOW HistoryReferenceType = 2 HistoryReferenceTypeCDWORKFLOWRUNNER HistoryReferenceType = 3 HistoryReferenceTypeConfigMap HistoryReferenceType = 4 HistoryReferenceTypeSecret HistoryReferenceType = 5 )
type ScopedVariableRepository ¶
type ScopedVariableRepository interface {
//transaction util funcs
sql.TransactionWrapper
// Create
CreateVariableDefinition(variableDefinition []*VariableDefinition, tx *pg.Tx) ([]*VariableDefinition, error)
CreateVariableData(variableDefinition []*VariableData, tx *pg.Tx) error
// Get
GetAllVariables() ([]*VariableDefinition, error)
GetAllVariableMetadata() ([]*VariableDefinition, error)
GetVariablesForVarIds(ids []int) ([]*VariableDefinition, error)
GetVariablesByNames(vars []string) ([]*VariableDefinition, error)
GetAllVariableDefinition() ([]*VariableDefinition, error)
GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
// Delete
DeleteVariables(auditLog sql.AuditLog, tx *pg.Tx) error
GetVariableTypeForVariableNames(variableNames []string) ([]*VariableDefinition, error)
}
type ScopedVariableRepositoryImpl ¶
type ScopedVariableRepositoryImpl struct {
*sql.TransactionUtilImpl
// contains filtered or unexported fields
}
func NewScopedVariableRepository ¶
func NewScopedVariableRepository(dbConnection *pg.DB, logger *zap.SugaredLogger, TransactionUtilImpl *sql.TransactionUtilImpl) *ScopedVariableRepositoryImpl
func (*ScopedVariableRepositoryImpl) CreateVariableData ¶
func (impl *ScopedVariableRepositoryImpl) CreateVariableData(variableDefinition []*VariableData, tx *pg.Tx) error
func (*ScopedVariableRepositoryImpl) CreateVariableDefinition ¶
func (impl *ScopedVariableRepositoryImpl) CreateVariableDefinition(variableDefinition []*VariableDefinition, tx *pg.Tx) ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) DeleteVariables ¶
func (*ScopedVariableRepositoryImpl) GetAllVariableDefinition ¶ added in v0.6.24
func (impl *ScopedVariableRepositoryImpl) GetAllVariableDefinition() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetAllVariableMetadata ¶
func (impl *ScopedVariableRepositoryImpl) GetAllVariableMetadata() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetAllVariables ¶
func (impl *ScopedVariableRepositoryImpl) GetAllVariables() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetDataForScopeIds ¶
func (impl *ScopedVariableRepositoryImpl) GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
func (*ScopedVariableRepositoryImpl) GetVariableTypeForVariableNames ¶ added in v0.6.25
func (impl *ScopedVariableRepositoryImpl) GetVariableTypeForVariableNames(variableNames []string) ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetVariablesByNames ¶
func (impl *ScopedVariableRepositoryImpl) GetVariablesByNames(vars []string) ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetVariablesForVarIds ¶
func (impl *ScopedVariableRepositoryImpl) GetVariablesForVarIds(ids []int) ([]*VariableDefinition, error)
type VariableData ¶
type VariableDefinition ¶
type VariableDefinition struct {
Id int `sql:"id,pk"`
Name string `sql:"name"`
DataType models.DataType `sql:"data_type"`
VarType models.VariableType `sql:"var_type"`
Active bool `sql:"active"`
Description string `sql:"description"`
ShortDescription string `json:"short_description"`
sql.AuditLog
// contains filtered or unexported fields
}
func CreateFromDefinition ¶
func CreateFromDefinition(definition models.Definition, auditLog sql.AuditLog) *VariableDefinition
type VariableEntityMapping ¶
type VariableEntityMappingRepository ¶
type VariableEntityMappingRepository interface {
sql.TransactionWrapper
GetVariablesForEntities(entities []Entity) ([]*VariableEntityMapping, error)
SaveVariableEntityMappings(tx *pg.Tx, mappings []*VariableEntityMapping) error
DeleteAllVariablesForEntities(tx *pg.Tx, entities []Entity, userId int32) error
DeleteVariablesForEntity(tx *pg.Tx, variableIDs []string, entity Entity, userId int32) error
}
type VariableEntityMappingRepositoryImpl ¶
type VariableEntityMappingRepositoryImpl struct {
*sql.TransactionUtilImpl
// contains filtered or unexported fields
}
func NewVariableEntityMappingRepository ¶
func NewVariableEntityMappingRepository(logger *zap.SugaredLogger, dbConnection *pg.DB, TransactionUtilImpl *sql.TransactionUtilImpl) *VariableEntityMappingRepositoryImpl
func (*VariableEntityMappingRepositoryImpl) DeleteAllVariablesForEntities ¶
func (*VariableEntityMappingRepositoryImpl) DeleteVariablesForEntity ¶
func (*VariableEntityMappingRepositoryImpl) GetVariablesForEntities ¶
func (impl *VariableEntityMappingRepositoryImpl) GetVariablesForEntities(entities []Entity) ([]*VariableEntityMapping, error)
func (*VariableEntityMappingRepositoryImpl) SaveVariableEntityMappings ¶
func (impl *VariableEntityMappingRepositoryImpl) SaveVariableEntityMappings(tx *pg.Tx, mappings []*VariableEntityMapping) error
type VariableSnapshotHistory ¶
type VariableSnapshotHistory struct {
Id int `sql:"id,pk"`
VariableSnapshotHistoryBean
sql.AuditLog
// contains filtered or unexported fields
}
type VariableSnapshotHistoryBean ¶
type VariableSnapshotHistoryBean struct {
VariableSnapshot json.RawMessage `sql:"variable_snapshot"`
HistoryReference
}
func GetSnapshotBean ¶ added in v0.6.26
func GetSnapshotBean(referenceId int, referenceType HistoryReferenceType, snapshot map[string]string) *VariableSnapshotHistoryBean
type VariableSnapshotHistoryBeanRaw ¶ added in v0.6.26
type VariableSnapshotHistoryBeanRaw struct {
VariableSnapshot map[string]string
HistoryReference
}
type VariableSnapshotHistoryRepository ¶
type VariableSnapshotHistoryRepository interface {
SaveVariableSnapshots(variableSnapshotHistories []*VariableSnapshotHistory) error
CheckIfVariableSnapshotExists(historyReference HistoryReference) (bool, error)
GetVariableSnapshots(historyReferences []HistoryReference) ([]*VariableSnapshotHistory, error)
}
type VariableSnapshotHistoryRepositoryImpl ¶
type VariableSnapshotHistoryRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewVariableSnapshotHistoryRepository ¶
func NewVariableSnapshotHistoryRepository(logger *zap.SugaredLogger, dbConnection *pg.DB) *VariableSnapshotHistoryRepositoryImpl
func (VariableSnapshotHistoryRepositoryImpl) CheckIfVariableSnapshotExists ¶ added in v0.7.1
func (impl VariableSnapshotHistoryRepositoryImpl) CheckIfVariableSnapshotExists(historyReference HistoryReference) (bool, error)
func (VariableSnapshotHistoryRepositoryImpl) GetVariableSnapshots ¶
func (impl VariableSnapshotHistoryRepositoryImpl) GetVariableSnapshots(historyReferences []HistoryReference) ([]*VariableSnapshotHistory, error)
func (VariableSnapshotHistoryRepositoryImpl) SaveVariableSnapshots ¶
func (impl VariableSnapshotHistoryRepositoryImpl) SaveVariableSnapshots(variableSnapshotHistories []*VariableSnapshotHistory) error
Click to show internal directories.
Click to hide internal directories.