repository

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUniqueId

func GetUniqueId(profileId int, platform string) string

Types

type InfraConfigRepository

type InfraConfigRepository interface {
	GetProfileByName(name string) (*InfraProfileEntity, error)
	CheckIfProfileExistsByName(name string) (bool, error)
	GetConfigurationsByProfileName(profileName string) ([]*InfraProfileConfigurationEntity, error)
	GetConfigurationsByProfileId(profileId int) ([]*InfraProfileConfigurationEntity, error)

	CreatePlatformProfileMapping(tx *pg.Tx, platformMapping []*ProfilePlatformMapping) error

	CreateProfile(tx *pg.Tx, infraProfile *InfraProfileEntity) error
	CreateConfigurations(tx *pg.Tx, configurations []*InfraProfileConfigurationEntity) error

	UpdateConfigurations(tx *pg.Tx, configurations []*InfraProfileConfigurationEntity) error
	UpdateProfile(tx *pg.Tx, profileName string, profile *InfraProfileEntity) error

	// GetProfileListByIds returns the list of profiles for the given profileIds
	// includeDefault is used to explicitly include the default profile in the list
	GetProfileListByIds(profileIds []int, includeDefault bool) ([]*InfraProfileEntity, error)
	GetConfigurationsByProfileIds(profileIds []int) ([]*InfraProfileConfigurationEntity, error)
	UpdatePlatformProfileMapping(tx *pg.Tx, platformMappings []*ProfilePlatformMapping) error
	GetPlatformListByProfileId(profileId int) ([]string, error)
	GetPlatformsByProfileName(profileName string) ([]*ProfilePlatformMapping, error)
	GetPlatformsByProfileIds(profileIds []int) ([]*ProfilePlatformMapping, error)
	GetPlatformsByProfileById(profileId int) ([]*ProfilePlatformMapping, error)
	sql.TransactionWrapper
	InfraConfigRepositoryEnt
}

type InfraConfigRepositoryEnt added in v1.2.2

type InfraConfigRepositoryEnt interface {
}

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) CheckIfProfileExistsByName added in v1.2.2

func (impl *InfraConfigRepositoryImpl) CheckIfProfileExistsByName(name string) (bool, error)

func (*InfraConfigRepositoryImpl) CreateConfigurations

func (impl *InfraConfigRepositoryImpl) CreateConfigurations(tx *pg.Tx, configurations []*InfraProfileConfigurationEntity) error

func (*InfraConfigRepositoryImpl) CreatePlatformProfileMapping

func (impl *InfraConfigRepositoryImpl) CreatePlatformProfileMapping(tx *pg.Tx, platformMapping []*ProfilePlatformMapping) error

func (*InfraConfigRepositoryImpl) CreateProfile

func (impl *InfraConfigRepositoryImpl) CreateProfile(tx *pg.Tx, infraProfile *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 added in v1.2.2

func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileId(profileId int) ([]*InfraProfileConfigurationEntity, error)

func (*InfraConfigRepositoryImpl) GetConfigurationsByProfileIds

func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileIds(profileIds []int) ([]*InfraProfileConfigurationEntity, error)

func (*InfraConfigRepositoryImpl) GetConfigurationsByProfileName

func (impl *InfraConfigRepositoryImpl) GetConfigurationsByProfileName(profileName string) ([]*InfraProfileConfigurationEntity, error)

func (*InfraConfigRepositoryImpl) GetPlatformListByProfileId added in v1.2.2

func (impl *InfraConfigRepositoryImpl) GetPlatformListByProfileId(profileId int) ([]string, error)

func (*InfraConfigRepositoryImpl) GetPlatformsByProfileById added in v1.2.2

func (impl *InfraConfigRepositoryImpl) GetPlatformsByProfileById(profileId int) ([]*ProfilePlatformMapping, error)

func (*InfraConfigRepositoryImpl) GetPlatformsByProfileIds added in v1.2.2

func (impl *InfraConfigRepositoryImpl) GetPlatformsByProfileIds(profileIds []int) ([]*ProfilePlatformMapping, error)

func (*InfraConfigRepositoryImpl) GetPlatformsByProfileName

func (impl *InfraConfigRepositoryImpl) GetPlatformsByProfileName(profileName string) ([]*ProfilePlatformMapping, error)

func (*InfraConfigRepositoryImpl) GetProfileByName

func (impl *InfraConfigRepositoryImpl) GetProfileByName(name string) (*InfraProfileEntity, error)

func (*InfraConfigRepositoryImpl) GetProfileListByIds added in v1.2.2

func (impl *InfraConfigRepositoryImpl) GetProfileListByIds(profileIds []int, includeDefault bool) ([]*InfraProfileEntity, error)

func (*InfraConfigRepositoryImpl) UpdateConfigurations

func (impl *InfraConfigRepositoryImpl) UpdateConfigurations(tx *pg.Tx, configurations []*InfraProfileConfigurationEntity) error

func (*InfraConfigRepositoryImpl) UpdatePlatformProfileMapping added in v1.2.2

func (impl *InfraConfigRepositoryImpl) UpdatePlatformProfileMapping(tx *pg.Tx, platformMappings []*ProfilePlatformMapping) error

func (*InfraConfigRepositoryImpl) UpdateProfile

func (impl *InfraConfigRepositoryImpl) UpdateProfile(tx *pg.Tx, profileName string, profile *InfraProfileEntity) error

type InfraProfileConfigurationEntity

type InfraProfileConfigurationEntity struct {
	Id  int          `sql:"id,pk"`
	Key v1.ConfigKey `sql:"key,notnull"`
	// Deprecated; use ValueString instead
	Value                    float64            `sql:"value"`
	ValueString              string             `sql:"value_string,notnull"`
	Unit                     unitsBean.UnitType `sql:"unit,notnull"`
	ProfilePlatformMappingId int                `sql:"profile_platform_mapping_id"`
	Active                   bool               `sql:"active,notnull"`
	UniqueId                 string             `sql:"-"`
	// Deprecated; use ProfilePlatformMappingId
	ProfileId int `sql:"profile_id"`

	ProfilePlatformMapping *ProfilePlatformMapping
	sql.AuditLog
	// contains filtered or unexported fields
}

type InfraProfileEntity

type InfraProfileEntity struct {
	Id               int             `sql:"id"`
	Name             string          `sql:"name"`
	Description      string          `sql:"description"`
	BuildxDriverType v1.BuildxDriver `sql:"buildx_driver_type,notnull"`
	Active           bool            `sql:"active"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ProfileIdentifierCount added in v1.2.2

type ProfileIdentifierCount struct {
	ProfileId       int
	IdentifierCount int
}

type ProfilePlatformMapping

type ProfilePlatformMapping struct {
	Id        int    `sql:"id"`
	ProfileId int    `sql:"profile_id"`
	Platform  string `sql:"platform"`
	Active    bool   `sql:"active"`
	UniqueId  string `sql:"-"`
	sql.AuditLog
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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