Documentation
¶
Index ¶
- Constants
- Variables
- type AppIdentifier
- type ExternalLink
- type ExternalLinkAndMonitoringToolDTO
- type ExternalLinkApiResponse
- type ExternalLinkDto
- type ExternalLinkIdentifierMapping
- type ExternalLinkIdentifierMappingData
- type ExternalLinkIdentifierMappingRepository
- type ExternalLinkIdentifierMappingRepositoryImpl
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByExternalLinkId(linkId int) ([]*ExternalLinkIdentifierMapping, error)
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByLinkIdentifier(linkIdentifier *LinkIdentifier, clusterId int) ([]ExternalLinkIdentifierMappingData, error)
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveLinkIdentifierData() ([]ExternalLinkIdentifierMappingData, error)
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) Save(externalLinksClusters *ExternalLinkIdentifierMapping, tx *pg.Tx) error
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) Update(link *ExternalLinkIdentifierMapping, tx *pg.Tx) error
- func (impl ExternalLinkIdentifierMappingRepositoryImpl) UpdateAllActiveToInActive(Id int, tx *pg.Tx) error
- type ExternalLinkMonitoringTool
- type ExternalLinkMonitoringToolDto
- type ExternalLinkMonitoringToolRepository
- type ExternalLinkMonitoringToolRepositoryImpl
- type ExternalLinkRepository
- type ExternalLinkRepositoryImpl
- func (impl ExternalLinkRepositoryImpl) FindAllClusterLinks() ([]ExternalLink, error)
- func (impl ExternalLinkRepositoryImpl) FindOne(id int) (ExternalLink, error)
- func (repo ExternalLinkRepositoryImpl) GetConnection() *pg.DB
- func (impl ExternalLinkRepositoryImpl) Save(externalLinks *ExternalLink, tx *pg.Tx) error
- func (impl ExternalLinkRepositoryImpl) Update(link *ExternalLink, tx *pg.Tx) error
- type ExternalLinkService
- type ExternalLinkServiceImpl
- func (impl ExternalLinkServiceImpl) Create(requests []*ExternalLinkDto, userId int32, userRole string) (*ExternalLinkApiResponse, error)
- func (impl ExternalLinkServiceImpl) DeleteLink(id int, userId int32, userRole string) (*ExternalLinkApiResponse, error)
- func (impl ExternalLinkServiceImpl) FetchAllActiveLinksByLinkIdentifier(linkIdentifier *LinkIdentifier, clusterId int) ([]*ExternalLinkDto, error)
- func (impl ExternalLinkServiceImpl) GetAllActiveTools() ([]ExternalLinkMonitoringToolDto, error)
- func (impl ExternalLinkServiceImpl) Update(request *ExternalLinkDto, userRole string) (*ExternalLinkApiResponse, error)
- type LinkIdentifier
Constants ¶
View Source
const ( ADMIN_ROLE string = "admin" SUPER_ADMIN_ROLE string = "superAdmin" CLUSTER_LEVEL_LINK string = "clusterLevel" APP_LEVEL_LINK string = "appLevel" )
Variables ¶
View Source
var TypeMappings = map[string]AppIdentifier{ "app": APP, "cluster": CLUSTER, "devtron-app": DEVTRON_APP, "devtron-installed-app": DEVTRON_INSTALLED_APP, "external-helm-app": EXTERNAL_HELM_APP, }
Functions ¶
This section is empty.
Types ¶
type AppIdentifier ¶ added in v0.6.9
type AppIdentifier int
const ( APP AppIdentifier = -1 CLUSTER AppIdentifier = 0 DEVTRON_APP AppIdentifier = 1 DEVTRON_INSTALLED_APP AppIdentifier = 2 EXTERNAL_HELM_APP AppIdentifier = 3 )
type ExternalLink ¶
type ExternalLink struct {
Id int `sql:"id,pk"`
ExternalLinkMonitoringToolId int `sql:"external_link_monitoring_tool_id, notnull"`
Name string `sql:"name,notnull"`
Url string `sql:"url,notnull"`
IsEditable bool `sql:"is_editable,notnull"`
Description string `sql:"description"`
Active bool `sql:"active,notnull"`
sql.AuditLog
// contains filtered or unexported fields
}
type ExternalLinkAndMonitoringToolDTO ¶ added in v0.6.17
type ExternalLinkAndMonitoringToolDTO struct {
Tools []ExternalLinkMonitoringToolDto
ExternalLinks []*ExternalLinkDto
}
type ExternalLinkApiResponse ¶
type ExternalLinkApiResponse struct {
Success bool `json:"success"`
}
type ExternalLinkDto ¶
type ExternalLinkDto struct {
Id int `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Active bool `json:"active"`
MonitoringToolId int `json:"monitoringToolId"`
Type string `json:"type"`
Identifiers []LinkIdentifier `json:"identifiers"`
IsEditable bool `json:"isEditable"`
Description string `json:"description"`
UpdatedOn time.Time `json:"updatedOn"`
UserId int32 `json:"-"`
}
type ExternalLinkIdentifierMapping ¶ added in v0.6.9
type ExternalLinkIdentifierMapping struct {
Id int `sql:"id,pk"`
ExternalLinkId int `sql:"external_link_id,notnull"`
Type AppIdentifier `sql:"type,notnull"`
Identifier string `sql:"identifier,notnull"`
EnvId int `sql:"env_id,notnull"`
AppId int `sql:"app_id,notnull"`
ClusterId int `sql:"cluster_id,notnull"`
Active bool `sql:"active, notnull"`
//ExternalLink ExternalLink
sql.AuditLog
// contains filtered or unexported fields
}
type ExternalLinkIdentifierMappingData ¶ added in v0.6.9
type ExternalLinkIdentifierMappingData struct {
Id int `sql:"id"`
ExternalLinkMonitoringToolId int `sql:"external_link_monitoring_tool_id, notnull"`
Name string `sql:"name,notnull"`
Url string `sql:"url,notnull"`
IsEditable bool `sql:"is_editable,notnull"`
Description string `sql:"description"`
MappingId int `sql:"mapping_id"`
Active bool `sql:"active"`
Type AppIdentifier `sql:"type,notnull"`
Identifier string `sql:"identifier,notnull"`
EnvId int `sql:"env_id,notnull"`
AppId int `sql:"app_id,notnull"`
ClusterId int `sql:"cluster_id,notnull"`
UpdatedOn time.Time `sql:"updated_on"`
}
type ExternalLinkIdentifierMappingRepository ¶ added in v0.6.9
type ExternalLinkIdentifierMappingRepository interface {
Save(externalLinksClusters *ExternalLinkIdentifierMapping, tx *pg.Tx) error
FindAllActiveByLinkIdentifier(identifier *LinkIdentifier, clusterId int) ([]ExternalLinkIdentifierMappingData, error)
Update(link *ExternalLinkIdentifierMapping, tx *pg.Tx) error
UpdateAllActiveToInActive(Id int, tx *pg.Tx) error
FindAllActiveByExternalLinkId(linkId int) ([]*ExternalLinkIdentifierMapping, error)
FindAllActiveLinkIdentifierData() ([]ExternalLinkIdentifierMappingData, error)
}
type ExternalLinkIdentifierMappingRepositoryImpl ¶ added in v0.6.9
type ExternalLinkIdentifierMappingRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewExternalLinkIdentifierMappingRepositoryImpl ¶ added in v0.6.9
func NewExternalLinkIdentifierMappingRepositoryImpl(dbConnection *pg.DB) *ExternalLinkIdentifierMappingRepositoryImpl
func (ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByExternalLinkId ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByExternalLinkId(linkId int) ([]*ExternalLinkIdentifierMapping, error)
func (ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByLinkIdentifier ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveByLinkIdentifier(linkIdentifier *LinkIdentifier, clusterId int) ([]ExternalLinkIdentifierMappingData, error)
func (ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveLinkIdentifierData ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) FindAllActiveLinkIdentifierData() ([]ExternalLinkIdentifierMappingData, error)
func (ExternalLinkIdentifierMappingRepositoryImpl) Save ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) Save(externalLinksClusters *ExternalLinkIdentifierMapping, tx *pg.Tx) error
func (ExternalLinkIdentifierMappingRepositoryImpl) Update ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) Update(link *ExternalLinkIdentifierMapping, tx *pg.Tx) error
func (ExternalLinkIdentifierMappingRepositoryImpl) UpdateAllActiveToInActive ¶ added in v0.6.9
func (impl ExternalLinkIdentifierMappingRepositoryImpl) UpdateAllActiveToInActive(Id int, tx *pg.Tx) error
type ExternalLinkMonitoringToolRepository ¶
type ExternalLinkMonitoringToolRepository interface {
FindAllActive() ([]ExternalLinkMonitoringTool, error)
}
type ExternalLinkMonitoringToolRepositoryImpl ¶
type ExternalLinkMonitoringToolRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewExternalLinkMonitoringToolRepositoryImpl ¶
func NewExternalLinkMonitoringToolRepositoryImpl(dbConnection *pg.DB) *ExternalLinkMonitoringToolRepositoryImpl
func (ExternalLinkMonitoringToolRepositoryImpl) FindAllActive ¶
func (impl ExternalLinkMonitoringToolRepositoryImpl) FindAllActive() ([]ExternalLinkMonitoringTool, error)
type ExternalLinkRepository ¶
type ExternalLinkRepository interface {
Save(externalLinks *ExternalLink, tx *pg.Tx) error
FindOne(id int) (ExternalLink, error)
Update(link *ExternalLink, tx *pg.Tx) error
GetConnection() *pg.DB
FindAllClusterLinks() ([]ExternalLink, error)
}
type ExternalLinkRepositoryImpl ¶
type ExternalLinkRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewExternalLinkRepositoryImpl ¶
func NewExternalLinkRepositoryImpl(dbConnection *pg.DB) *ExternalLinkRepositoryImpl
func (ExternalLinkRepositoryImpl) FindAllClusterLinks ¶ added in v0.6.9
func (impl ExternalLinkRepositoryImpl) FindAllClusterLinks() ([]ExternalLink, error)
func (ExternalLinkRepositoryImpl) FindOne ¶
func (impl ExternalLinkRepositoryImpl) FindOne(id int) (ExternalLink, error)
func (ExternalLinkRepositoryImpl) GetConnection ¶
func (repo ExternalLinkRepositoryImpl) GetConnection() *pg.DB
func (ExternalLinkRepositoryImpl) Save ¶
func (impl ExternalLinkRepositoryImpl) Save(externalLinks *ExternalLink, tx *pg.Tx) error
func (ExternalLinkRepositoryImpl) Update ¶
func (impl ExternalLinkRepositoryImpl) Update(link *ExternalLink, tx *pg.Tx) error
type ExternalLinkService ¶
type ExternalLinkService interface {
Create(requests []*ExternalLinkDto, userId int32, userRole string) (*ExternalLinkApiResponse, error)
GetAllActiveTools() ([]ExternalLinkMonitoringToolDto, error)
FetchAllActiveLinksByLinkIdentifier(linkIdentifier *LinkIdentifier, clusterId int) ([]*ExternalLinkDto, error)
Update(request *ExternalLinkDto, userRole string) (*ExternalLinkApiResponse, error)
DeleteLink(id int, userId int32, userRole string) (*ExternalLinkApiResponse, error)
}
type ExternalLinkServiceImpl ¶
type ExternalLinkServiceImpl struct {
// contains filtered or unexported fields
}
func NewExternalLinkServiceImpl ¶
func NewExternalLinkServiceImpl(logger *zap.SugaredLogger, externalLinksToolsRepository ExternalLinkMonitoringToolRepository, externalLinkIdentifierMappingRepository ExternalLinkIdentifierMappingRepository, externalLinksRepository ExternalLinkRepository) *ExternalLinkServiceImpl
func (ExternalLinkServiceImpl) Create ¶
func (impl ExternalLinkServiceImpl) Create(requests []*ExternalLinkDto, userId int32, userRole string) (*ExternalLinkApiResponse, error)
func (ExternalLinkServiceImpl) DeleteLink ¶
func (impl ExternalLinkServiceImpl) DeleteLink(id int, userId int32, userRole string) (*ExternalLinkApiResponse, error)
func (ExternalLinkServiceImpl) FetchAllActiveLinksByLinkIdentifier ¶ added in v0.6.9
func (impl ExternalLinkServiceImpl) FetchAllActiveLinksByLinkIdentifier(linkIdentifier *LinkIdentifier, clusterId int) ([]*ExternalLinkDto, error)
func (ExternalLinkServiceImpl) GetAllActiveTools ¶
func (impl ExternalLinkServiceImpl) GetAllActiveTools() ([]ExternalLinkMonitoringToolDto, error)
func (ExternalLinkServiceImpl) Update ¶
func (impl ExternalLinkServiceImpl) Update(request *ExternalLinkDto, userRole string) (*ExternalLinkApiResponse, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.