Documentation
¶
Index ¶
- type InfraConfigRepository
- type InfraConfigRepositoryImpl
- func (impl *InfraConfigRepositoryImpl) CreateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error
- func (impl *InfraConfigRepositoryImpl) CreateProfile(tx *pg.Tx, infraProfile *bean.InfraProfileEntity) error
- func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileId(profileId int) ([]*bean.InfraProfileConfigurationEntity, error)
- func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileName(profileName string) ([]*bean.InfraProfileConfigurationEntity, error)
- func (impl *InfraConfigRepositoryImpl) GetProfileByName(name string) (*bean.InfraProfileEntity, error)
- func (impl *InfraConfigRepositoryImpl) UpdateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error
- func (impl *InfraConfigRepositoryImpl) UpdateProfile(tx *pg.Tx, profileName string, profile *bean.InfraProfileEntity) error
- type InfraConfigService
- type InfraConfigServiceImpl
- func (impl *InfraConfigServiceImpl) GetConfigurationUnits() map[util2.ConfigKeyStr]map[string]units.Unit
- func (impl *InfraConfigServiceImpl) GetInfraConfigurationsByScopeAndPlatform(scope bean.Scope, platform string) (*bean.InfraConfig, error)
- func (impl *InfraConfigServiceImpl) GetProfileByName(name string) (*bean.ProfileBean, error)
- func (impl *InfraConfigServiceImpl) UpdateProfile(userId int32, profileName string, profileToUpdate *bean.ProfileBean) error
- func (impl *InfraConfigServiceImpl) Validate(profileToUpdate *bean.ProfileBean, defaultProfile *bean.ProfileBean) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfraConfigRepository ¶
type InfraConfigRepository interface { GetProfileByName(name string) (*bean.InfraProfileEntity, error) GetConfigurationsByProfileName(profileName string) ([]*bean.InfraProfileConfigurationEntity, error) GetConfigurationsByProfileId(profileId int) ([]*bean.InfraProfileConfigurationEntity, error) CreateProfile(tx *pg.Tx, infraProfile *bean.InfraProfileEntity) error CreateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error UpdateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error UpdateProfile(tx *pg.Tx, profileName string, profile *bean.InfraProfileEntity) error sql.TransactionWrapper }
type InfraConfigRepositoryImpl ¶
type InfraConfigRepositoryImpl struct { *sql.TransactionUtilImpl // contains filtered or unexported fields }
func NewInfraProfileRepositoryImpl ¶
func NewInfraProfileRepositoryImpl(dbConnection *pg.DB, TransactionUtilImpl *sql.TransactionUtilImpl) *InfraConfigRepositoryImpl
func (*InfraConfigRepositoryImpl) CreateConfigurations ¶
func (impl *InfraConfigRepositoryImpl) CreateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error
func (*InfraConfigRepositoryImpl) CreateProfile ¶
func (impl *InfraConfigRepositoryImpl) CreateProfile(tx *pg.Tx, infraProfile *bean.InfraProfileEntity) error
CreateProfile saves the default profile in the database only once in a lifetime. If the default profile already exists, it will not be saved again.
func (*InfraConfigRepositoryImpl) GetConfigurationsByProfileId ¶
func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileId(profileId int) ([]*bean.InfraProfileConfigurationEntity, error)
func (*InfraConfigRepositoryImpl) GetConfigurationsByProfileName ¶
func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileName(profileName string) ([]*bean.InfraProfileConfigurationEntity, error)
func (*InfraConfigRepositoryImpl) GetProfileByName ¶
func (impl *InfraConfigRepositoryImpl) GetProfileByName(name string) (*bean.InfraProfileEntity, error)
func (*InfraConfigRepositoryImpl) UpdateConfigurations ¶
func (impl *InfraConfigRepositoryImpl) UpdateConfigurations(tx *pg.Tx, configurations []*bean.InfraProfileConfigurationEntity) error
func (*InfraConfigRepositoryImpl) UpdateProfile ¶
func (impl *InfraConfigRepositoryImpl) UpdateProfile(tx *pg.Tx, profileName string, profile *bean.InfraProfileEntity) error
type InfraConfigService ¶
type InfraConfigService interface { // GetConfigurationUnits fetches all the units for the configurations. GetConfigurationUnits() map[util2.ConfigKeyStr]map[string]units.Unit // GetProfileByName fetches the profile and its configurations matching the given profileName. GetProfileByName(name string) (*bean.ProfileBean, error) // UpdateProfile updates the profile and its configurations matching the given profileName. // If profileName is empty, it will return an error. UpdateProfile(userId int32, profileName string, profileBean *bean.ProfileBean) error GetInfraConfigurationsByScopeAndPlatform(scope bean.Scope, platform string) (*bean.InfraConfig, error) }
type InfraConfigServiceImpl ¶
type InfraConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewInfraConfigServiceImpl ¶
func NewInfraConfigServiceImpl(logger *zap.SugaredLogger, infraProfileRepo InfraConfigRepository, appService app.AppService, units *units.Units) (*InfraConfigServiceImpl, error)
func (*InfraConfigServiceImpl) GetConfigurationUnits ¶
func (impl *InfraConfigServiceImpl) GetConfigurationUnits() map[util2.ConfigKeyStr]map[string]units.Unit
func (*InfraConfigServiceImpl) GetInfraConfigurationsByScopeAndPlatform ¶ added in v1.1.0
func (impl *InfraConfigServiceImpl) GetInfraConfigurationsByScopeAndPlatform(scope bean.Scope, platform string) (*bean.InfraConfig, error)
func (*InfraConfigServiceImpl) GetProfileByName ¶
func (impl *InfraConfigServiceImpl) GetProfileByName(name string) (*bean.ProfileBean, error)
func (*InfraConfigServiceImpl) UpdateProfile ¶
func (impl *InfraConfigServiceImpl) UpdateProfile(userId int32, profileName string, profileToUpdate *bean.ProfileBean) error
func (*InfraConfigServiceImpl) Validate ¶
func (impl *InfraConfigServiceImpl) Validate(profileToUpdate *bean.ProfileBean, defaultProfile *bean.ProfileBean) error
Click to show internal directories.
Click to hide internal directories.