Documentation ¶
Index ¶
- type ConfigurationBean
- type ConfigurationBeanAbstract
- type ConfigurationBeanV0
- type InfraConfig
- func (infraConfig InfraConfig) GetCiDefaultTimeout() int64
- func (infraConfig InfraConfig) GetCiLimitCpu() string
- func (infraConfig InfraConfig) GetCiLimitMem() string
- func (infraConfig InfraConfig) GetCiReqCpu() string
- func (infraConfig InfraConfig) GetCiReqMem() string
- func (infraConfig InfraConfig) LoadCiLimitCpu() (*InfraProfileConfigurationEntity, error)
- func (infraConfig InfraConfig) LoadCiLimitMem() (*InfraProfileConfigurationEntity, error)
- func (infraConfig InfraConfig) LoadCiReqCpu() (*InfraProfileConfigurationEntity, error)
- func (infraConfig InfraConfig) LoadCiReqMem() (*InfraProfileConfigurationEntity, error)
- func (infraConfig InfraConfig) LoadDefaultTimeout() (*InfraProfileConfigurationEntity, error)
- func (infraConfig InfraConfig) LoadInfraConfigInEntities() ([]*InfraProfileConfigurationEntity, error)
- func (infraConfig *InfraConfig) SetCiDefaultTimeout(timeout int64)
- func (infraConfig *InfraConfig) SetCiLimitCpu(cpu string)
- func (infraConfig *InfraConfig) SetCiLimitMem(mem string)
- func (infraConfig *InfraConfig) SetCiReqCpu(cpu string)
- func (infraConfig *InfraConfig) SetCiReqMem(mem string)
- type InfraConfigMetaData
- type InfraConfigMetaDataV0
- type InfraProfileConfigurationEntity
- type InfraProfileEntity
- type ProfileBean
- type ProfileBeanAbstract
- type ProfileBeanV0
- type ProfileResponse
- type ProfileResponseV0
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationBean ¶
type ConfigurationBean struct { ConfigurationBeanAbstract Value string `json:"value" validate:"required,gt=0"` }
type ConfigurationBeanV0 ¶
type ConfigurationBeanV0 struct { ConfigurationBeanAbstract Value float64 `json:"value" validate:"required,gt=0"` }
Deprecated
type InfraConfig ¶
type InfraConfig struct { // currently only for ci CiLimitCpu string `env:"LIMIT_CI_CPU" envDefault:"0.5"` CiLimitMem string `env:"LIMIT_CI_MEM" envDefault:"3G"` CiReqCpu string `env:"REQ_CI_CPU" envDefault:"0.5"` CiReqMem string `env:"REQ_CI_MEM" envDefault:"3G"` CiDefaultTimeout int64 `env:"DEFAULT_TIMEOUT" envDefault:"3600"` }
InfraConfig is used for read only purpose outside this package
func (InfraConfig) GetCiDefaultTimeout ¶
func (infraConfig InfraConfig) GetCiDefaultTimeout() int64
func (InfraConfig) GetCiLimitCpu ¶
func (infraConfig InfraConfig) GetCiLimitCpu() string
func (InfraConfig) GetCiLimitMem ¶
func (infraConfig InfraConfig) GetCiLimitMem() string
func (InfraConfig) GetCiReqCpu ¶
func (infraConfig InfraConfig) GetCiReqCpu() string
func (InfraConfig) GetCiReqMem ¶
func (infraConfig InfraConfig) GetCiReqMem() string
func (InfraConfig) LoadCiLimitCpu ¶
func (infraConfig InfraConfig) LoadCiLimitCpu() (*InfraProfileConfigurationEntity, error)
func (InfraConfig) LoadCiLimitMem ¶
func (infraConfig InfraConfig) LoadCiLimitMem() (*InfraProfileConfigurationEntity, error)
func (InfraConfig) LoadCiReqCpu ¶
func (infraConfig InfraConfig) LoadCiReqCpu() (*InfraProfileConfigurationEntity, error)
func (InfraConfig) LoadCiReqMem ¶
func (infraConfig InfraConfig) LoadCiReqMem() (*InfraProfileConfigurationEntity, error)
func (InfraConfig) LoadDefaultTimeout ¶
func (infraConfig InfraConfig) LoadDefaultTimeout() (*InfraProfileConfigurationEntity, error)
func (InfraConfig) LoadInfraConfigInEntities ¶
func (infraConfig InfraConfig) LoadInfraConfigInEntities() ([]*InfraProfileConfigurationEntity, error)
func (*InfraConfig) SetCiDefaultTimeout ¶
func (infraConfig *InfraConfig) SetCiDefaultTimeout(timeout int64)
func (*InfraConfig) SetCiLimitCpu ¶
func (infraConfig *InfraConfig) SetCiLimitCpu(cpu string)
func (*InfraConfig) SetCiLimitMem ¶
func (infraConfig *InfraConfig) SetCiLimitMem(mem string)
func (*InfraConfig) SetCiReqCpu ¶
func (infraConfig *InfraConfig) SetCiReqCpu(cpu string)
func (*InfraConfig) SetCiReqMem ¶
func (infraConfig *InfraConfig) SetCiReqMem(mem string)
type InfraConfigMetaData ¶
type InfraConfigMetaData struct { DefaultConfigurations map[string][]*ConfigurationBean `json:"defaultConfigurations"` ConfigurationUnits map[util2.ConfigKeyStr]map[string]units.Unit `json:"configurationUnits"` }
type InfraConfigMetaDataV0 ¶
type InfraConfigMetaDataV0 struct { DefaultConfigurations []ConfigurationBeanV0 `json:"defaultConfigurations"` ConfigurationUnits map[util2.ConfigKeyStr]map[string]units.Unit `json:"configurationUnits"` }
Deprecated
type InfraProfileConfigurationEntity ¶
type InfraProfileConfigurationEntity struct { Id int `sql:"id"` Key util2.ConfigKey `sql:"key"` Value float64 `sql:"value"` ValueString string `sql:"value_string"` Unit units.UnitSuffix `sql:"unit"` ProfileId int `sql:"profile_id"` Platform string `sql:"platform"` Active bool `sql:"active"` sql.AuditLog // contains filtered or unexported fields }
type InfraProfileEntity ¶
type InfraProfileEntity struct { Id int `sql:"id"` Name string `sql:"name"` Description string `sql:"description"` Active bool `sql:"active"` sql.AuditLog // contains filtered or unexported fields }
func (*InfraProfileEntity) ConvertToProfileBean ¶
func (infraProfile *InfraProfileEntity) ConvertToProfileBean() ProfileBean
type ProfileBean ¶
type ProfileBean struct { ProfileBeanAbstract Configurations map[string][]*ConfigurationBean `json:"configurations" validate:"dive"` }
func (*ProfileBean) ConvertToInfraProfileEntity ¶
func (profileBean *ProfileBean) ConvertToInfraProfileEntity() *InfraProfileEntity
type ProfileBeanAbstract ¶
type ProfileBeanAbstract struct { Id int `json:"id"` Name string `json:"name" validate:"required,min=1,max=50"` Description string `json:"description" validate:"max=300"` Active bool `json:"active"` Type util2.ProfileType `json:"type"` AppCount int `json:"appCount"` CreatedBy int32 `json:"createdBy"` CreatedOn time.Time `json:"createdOn"` UpdatedBy int32 `json:"updatedBy"` UpdatedOn time.Time `json:"updatedOn"` }
type ProfileBeanV0 ¶
type ProfileBeanV0 struct { ProfileBeanAbstract Configurations []ConfigurationBeanV0 `json:"configurations" validate:"dive"` }
Deprecated
type ProfileResponse ¶
type ProfileResponse struct { Profile ProfileBean `json:"profile"` InfraConfigMetaData }
type ProfileResponseV0 ¶
type ProfileResponseV0 struct { Profile ProfileBeanV0 `json:"profile"` InfraConfigMetaDataV0 }
Deprecated
Click to show internal directories.
Click to hide internal directories.