Documentation ¶
Index ¶
- type ActionResponse
- type Module
- type ModuleActionAuditLog
- type ModuleActionAuditLogRepository
- type ModuleActionAuditLogRepositoryImpl
- type ModuleActionRequestDto
- type ModuleCacheService
- type ModuleCacheServiceImpl
- type ModuleCronService
- type ModuleCronServiceImpl
- type ModuleEnvConfig
- type ModuleInfoDto
- type ModuleRepository
- type ModuleRepositoryImpl
- type ModuleService
- type ModuleServiceImpl
- type ModuleStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionResponse ¶
type ActionResponse struct {
Success bool `json:"success"`
}
type ModuleActionAuditLog ¶
type ModuleActionAuditLog struct { Id int `sql:"id,pk"` ModuleName string `sql:"module_name, notnull"` Action string `sql:"action,notnull"` Version string `sql:"version,notnull"` CreatedOn time.Time `sql:"created_on,notnull"` CreatedBy int32 `sql:"created_by,notnull"` // contains filtered or unexported fields }
type ModuleActionAuditLogRepository ¶
type ModuleActionAuditLogRepository interface {
Save(moduleActionAuditLog *ModuleActionAuditLog) error
}
type ModuleActionAuditLogRepositoryImpl ¶
type ModuleActionAuditLogRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewModuleActionAuditLogRepositoryImpl ¶
func NewModuleActionAuditLogRepositoryImpl(dbConnection *pg.DB) *ModuleActionAuditLogRepositoryImpl
func (ModuleActionAuditLogRepositoryImpl) Save ¶
func (impl ModuleActionAuditLogRepositoryImpl) Save(moduleActionAuditLog *ModuleActionAuditLog) error
type ModuleActionRequestDto ¶
type ModuleCacheService ¶
type ModuleCacheService interface { }
type ModuleCacheServiceImpl ¶
type ModuleCacheServiceImpl struct { K8sUtil *util.K8sUtil // contains filtered or unexported fields }
func NewModuleCacheServiceImpl ¶
func NewModuleCacheServiceImpl(logger *zap.SugaredLogger, K8sUtil *util.K8sUtil, moduleEnvConfig *ModuleEnvConfig, serverEnvConfig *serverEnvConfig.ServerEnvConfig, serverDataStore *serverDataStore.ServerDataStore, moduleRepository ModuleRepository) *ModuleCacheServiceImpl
type ModuleCronService ¶
type ModuleCronService interface { }
type ModuleCronServiceImpl ¶
type ModuleCronServiceImpl struct {
// contains filtered or unexported fields
}
func NewModuleCronServiceImpl ¶
func NewModuleCronServiceImpl(logger *zap.SugaredLogger, moduleEnvConfig *ModuleEnvConfig, moduleRepository ModuleRepository, serverEnvConfig *serverEnvConfig.ServerEnvConfig) (*ModuleCronServiceImpl, error)
func (*ModuleCronServiceImpl) HandleModuleTimeoutStatus ¶
func (impl *ModuleCronServiceImpl) HandleModuleTimeoutStatus()
check modules from DB. if status if installing for 1 hour, mark it as timeout
type ModuleEnvConfig ¶
type ModuleEnvConfig struct {
ModuleTimeoutStatusHandlingCronDurationInMin int `env:"MODULE_TIMEOUT_STATUS_HANDLING_CRON_DURATION_MIN" envDefault:"5"` // default 5 mins
}
func ParseModuleEnvConfig ¶
func ParseModuleEnvConfig() (*ModuleEnvConfig, error)
type ModuleInfoDto ¶
type ModuleRepository ¶
type ModuleRepositoryImpl ¶
type ModuleRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewModuleRepositoryImpl ¶
func NewModuleRepositoryImpl(dbConnection *pg.DB) *ModuleRepositoryImpl
func (ModuleRepositoryImpl) FindAll ¶
func (impl ModuleRepositoryImpl) FindAll() ([]Module, error)
func (ModuleRepositoryImpl) FindOne ¶
func (impl ModuleRepositoryImpl) FindOne(name string) (*Module, error)
func (ModuleRepositoryImpl) Save ¶
func (impl ModuleRepositoryImpl) Save(module *Module) error
func (ModuleRepositoryImpl) Update ¶
func (impl ModuleRepositoryImpl) Update(module *Module) error
type ModuleService ¶
type ModuleService interface { GetModuleInfo(name string) (*ModuleInfoDto, error) HandleModuleAction(userId int32, moduleName string, moduleActionRequest *ModuleActionRequestDto) (*ActionResponse, error) }
type ModuleServiceImpl ¶
type ModuleServiceImpl struct {
// contains filtered or unexported fields
}
func NewModuleServiceImpl ¶
func NewModuleServiceImpl(logger *zap.SugaredLogger, serverEnvConfig *serverEnvConfig.ServerEnvConfig, moduleRepository ModuleRepository, moduleActionAuditLogRepository ModuleActionAuditLogRepository, helmAppService client.HelmAppService, serverCacheService server.ServerCacheService, moduleCacheService ModuleCacheService, moduleCronService ModuleCronService) *ModuleServiceImpl
func (ModuleServiceImpl) GetModuleInfo ¶
func (impl ModuleServiceImpl) GetModuleInfo(name string) (*ModuleInfoDto, error)
func (ModuleServiceImpl) HandleModuleAction ¶
func (impl ModuleServiceImpl) HandleModuleAction(userId int32, moduleName string, moduleActionRequest *ModuleActionRequestDto) (*ActionResponse, error)
type ModuleStatus ¶
type ModuleStatus = string
const ( ModuleStatusNotInstalled ModuleStatus = "notInstalled" ModuleStatusInstalled ModuleStatus = "installed" ModuleStatusInstalling ModuleStatus = "installing" ModuleStatusInstallFailed ModuleStatus = "installFailed" ModuleStatusTimeout ModuleStatus = "timeout" )
Click to show internal directories.
Click to hide internal directories.