Documentation
¶
Index ¶
- Variables
- func GetNumOfChildQualifiers(qualifier Qualifier) int
- type Entity
- type EntityType
- type HistoryReference
- type HistoryReferenceType
- type Qualifier
- 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) CreateVariableScope(variableScope []*VariableScope, tx *pg.Tx) ([]*VariableScope, error)
- func (impl *ScopedVariableRepositoryImpl) DeleteVariables(auditLog sql.AuditLog, tx *pg.Tx) error
- func (impl *ScopedVariableRepositoryImpl) GetAllVariableMetadata() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetAllVariableScopeAndDefinition() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetAllVariables() ([]*VariableDefinition, error)
- func (impl *ScopedVariableRepositoryImpl) GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
- func (impl *ScopedVariableRepositoryImpl) GetScopedVariableData(scope models.Scope, varIds []int) ([]*VariableScope, 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(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 VariableScope
- type VariableSnapshotHistory
- type VariableSnapshotHistoryBean
- type VariableSnapshotHistoryRepository
- type VariableSnapshotHistoryRepositoryImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var CompoundQualifiers []Qualifier
Functions ¶
func GetNumOfChildQualifiers ¶
Types ¶
type Entity ¶
type Entity struct {
EntityType EntityType `sql:"entity_type"`
EntityId int `sql:"entity_id"`
}
type EntityType ¶
type EntityType int
const ( EntityTypeDeploymentTemplateAppLevel EntityType = 1 EntityTypeDeploymentTemplateEnvLevel EntityType = 2 )
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
)
type ScopedVariableRepository ¶
type ScopedVariableRepository interface {
//transaction util funcs
sql.TransactionWrapper
// Create
CreateVariableDefinition(variableDefinition []*VariableDefinition, tx *pg.Tx) ([]*VariableDefinition, error)
CreateVariableScope(variableDefinition []*VariableScope, tx *pg.Tx) ([]*VariableScope, 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)
GetAllVariableScopeAndDefinition() ([]*VariableDefinition, error)
GetScopedVariableData(scope models.Scope, varIds []int) ([]*VariableScope, error)
GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
// Delete
DeleteVariables(auditLog sql.AuditLog, tx *pg.Tx) error
}
type ScopedVariableRepositoryImpl ¶
type ScopedVariableRepositoryImpl struct {
*sql.TransactionUtilImpl
// contains filtered or unexported fields
}
func NewScopedVariableRepository ¶
func NewScopedVariableRepository(dbConnection *pg.DB, logger *zap.SugaredLogger) *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) CreateVariableScope ¶
func (impl *ScopedVariableRepositoryImpl) CreateVariableScope(variableScope []*VariableScope, tx *pg.Tx) ([]*VariableScope, error)
func (*ScopedVariableRepositoryImpl) DeleteVariables ¶
func (*ScopedVariableRepositoryImpl) GetAllVariableMetadata ¶
func (impl *ScopedVariableRepositoryImpl) GetAllVariableMetadata() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetAllVariableScopeAndDefinition ¶
func (impl *ScopedVariableRepositoryImpl) GetAllVariableScopeAndDefinition() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetAllVariables ¶
func (impl *ScopedVariableRepositoryImpl) GetAllVariables() ([]*VariableDefinition, error)
func (*ScopedVariableRepositoryImpl) GetDataForScopeIds ¶
func (impl *ScopedVariableRepositoryImpl) GetDataForScopeIds(scopeIds []int) ([]*VariableData, error)
func (*ScopedVariableRepositoryImpl) GetScopedVariableData ¶
func (impl *ScopedVariableRepositoryImpl) GetScopedVariableData(scope models.Scope, varIds []int) ([]*VariableScope, 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"`
VariableScope []*VariableScope
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(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) *VariableEntityMappingRepositoryImpl
func (*VariableEntityMappingRepositoryImpl) DeleteAllVariablesForEntities ¶
func (impl *VariableEntityMappingRepositoryImpl) DeleteAllVariablesForEntities(entities []Entity, userId int32) error
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 VariableScope ¶
type VariableScope struct {
Id int `sql:"id,pk"`
VariableDefinitionId int `sql:"variable_definition_id"`
QualifierId int `sql:"qualifier_id"`
IdentifierKey int `sql:"identifier_key"`
IdentifierValueInt int `sql:"identifier_value_int"`
Active bool `sql:"active"`
IdentifierValueString string `sql:"identifier_value_string"`
ParentIdentifier int `sql:"parent_identifier"`
CompositeKey string `sql:"-"`
Data string `sql:"-"`
VariableData *VariableData
sql.AuditLog
// contains filtered or unexported fields
}
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
}
type VariableSnapshotHistoryRepository ¶
type VariableSnapshotHistoryRepository interface {
SaveVariableSnapshots(variableSnapshotHistories []*VariableSnapshotHistory) 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) 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.