Help us shape the future of Go! Take the 2026 Go Developer Survey

variables

package
v0.6.25 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScopedVariableService

type ScopedVariableService interface {
	CreateVariables(payload models.Payload) error
	GetScopedVariables(scope resourceQualifiers.Scope, varNames []string, unmaskSensitiveData bool) (scopedVariableDataObj []*models.ScopedVariableData, err error)
	GetJsonForVariables() (*models.Payload, error)
	CheckForSensitiveVariables(variableNames []string) (map[string]bool, error)
	GetFormattedVariableForName(name string) string
}

type ScopedVariableServiceImpl

type ScopedVariableServiceImpl struct {
	VariableNameConfig *VariableConfig
	VariableCache      *cache.VariableCacheObj
	// contains filtered or unexported fields
}

func NewScopedVariableServiceImpl

func NewScopedVariableServiceImpl(logger *zap.SugaredLogger, scopedVariableRepository repository2.ScopedVariableRepository,
	qualifierMappingService resourceQualifiers.QualifierMappingService) (*ScopedVariableServiceImpl, error)

func (*ScopedVariableServiceImpl) CheckForSensitiveVariables added in v0.6.25

func (impl *ScopedVariableServiceImpl) CheckForSensitiveVariables(variableNames []string) (map[string]bool, error)

func (*ScopedVariableServiceImpl) CreateVariables

func (impl *ScopedVariableServiceImpl) CreateVariables(payload models.Payload) error

func (*ScopedVariableServiceImpl) GetFormattedVariableForName added in v0.6.25

func (impl *ScopedVariableServiceImpl) GetFormattedVariableForName(name string) string

func (*ScopedVariableServiceImpl) GetJsonForVariables

func (impl *ScopedVariableServiceImpl) GetJsonForVariables() (*models.Payload, error)

func (*ScopedVariableServiceImpl) GetScopedVariables

func (impl *ScopedVariableServiceImpl) GetScopedVariables(scope resourceQualifiers.Scope, varNames []string, unmaskSensitiveData bool) (scopedVariableDataObj []*models.ScopedVariableData, err error)

func (*ScopedVariableServiceImpl) SetVariableCache

func (impl *ScopedVariableServiceImpl) SetVariableCache(cache *cache.VariableCacheObj)

type VariableConfig

type VariableConfig struct {
	VariableNameRegex    string `env:"SCOPED_VARIABLE_NAME_REGEX" envDefault:"^[a-zA-Z][a-zA-Z0-9_-]{0,62}[a-zA-Z0-9]$"`
	VariableCacheEnabled bool   `env:"VARIABLE_CACHE_ENABLED" envDefault:"true"`
	SystemVariablePrefix string `env:"SYSTEM_VAR_PREFIX" envDefault:"DEVTRON_"`
	ScopedVariableFormat string `env:"SCOPED_VARIABLE_FORMAT" envDefault:"@{{%s}}"`
}

func GetVariableNameConfig

func GetVariableNameConfig() (*VariableConfig, error)

type VariableEntityMappingService

type VariableEntityMappingService interface {
	UpdateVariablesForEntity(variableNames []string, entity repository.Entity, userId int32, tx *pg.Tx) error
	GetAllMappingsForEntities(entities []repository.Entity) (map[repository.Entity][]string, error)
	DeleteMappingsForEntities(entities []repository.Entity, userId int32, tx *pg.Tx) error
}

type VariableEntityMappingServiceImpl

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

func NewVariableEntityMappingServiceImpl

func NewVariableEntityMappingServiceImpl(variableEntityMappingRepository repository.VariableEntityMappingRepository, logger *zap.SugaredLogger) *VariableEntityMappingServiceImpl

func (VariableEntityMappingServiceImpl) DeleteMappingsForEntities

func (impl VariableEntityMappingServiceImpl) DeleteMappingsForEntities(entities []repository.Entity, userId int32, tx *pg.Tx) error

func (VariableEntityMappingServiceImpl) GetAllMappingsForEntities

func (impl VariableEntityMappingServiceImpl) GetAllMappingsForEntities(entities []repository.Entity) (map[repository.Entity][]string, error)

func (VariableEntityMappingServiceImpl) UpdateVariablesForEntity

func (impl VariableEntityMappingServiceImpl) UpdateVariablesForEntity(variableNames []string, entity repository.Entity, userId int32, passedTx *pg.Tx) error

type VariableSnapshotHistoryService

type VariableSnapshotHistoryService interface {
	SaveVariableHistoriesForTrigger(variableHistories []*repository2.VariableSnapshotHistoryBean, userId int32) error
	GetVariableHistoryForReferences(references []repository2.HistoryReference) (map[repository2.HistoryReference]*repository2.VariableSnapshotHistoryBean, error)
}

type VariableSnapshotHistoryServiceImpl

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

func (VariableSnapshotHistoryServiceImpl) GetVariableHistoryForReferences

func (VariableSnapshotHistoryServiceImpl) SaveVariableHistoriesForTrigger

func (impl VariableSnapshotHistoryServiceImpl) SaveVariableHistoriesForTrigger(variableHistories []*repository2.VariableSnapshotHistoryBean, userId int32) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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