externalLink

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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"`
	Active                       bool   `sql:"active,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ExternalLinkApiResponse

type ExternalLinkApiResponse struct {
	Success bool `json:"success"`
}

type ExternalLinkClusterMapping

type ExternalLinkClusterMapping struct {
	Id             int  `sql:"id,pk"`
	ExternalLinkId int  `sql:"external_link_id,notnull"`
	ClusterId      int  `sql:"cluster_id,notnull"`
	Active         bool `sql:"active, notnull"`
	ExternalLink   ExternalLink
	sql.AuditLog
	// contains filtered or unexported fields
}

type ExternalLinkClusterMappingRepository

type ExternalLinkClusterMappingRepository interface {
	Save(externalLinksClusters *ExternalLinkClusterMapping, tx *pg.Tx) error
	FindAllActiveByClusterId(clusterId int) ([]ExternalLinkClusterMapping, error)
	FindAllActive() ([]ExternalLinkClusterMapping, error)
	Update(link *ExternalLinkClusterMapping, tx *pg.Tx) error
	FindAllActiveByExternalLinkId(linkId int) ([]*ExternalLinkClusterMapping, error)
	FindAllByExternalLinkId(linkId int) ([]*ExternalLinkClusterMapping, error)
}

type ExternalLinkClusterMappingRepositoryImpl

type ExternalLinkClusterMappingRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewExternalLinkClusterMappingRepositoryImpl

func NewExternalLinkClusterMappingRepositoryImpl(dbConnection *pg.DB) *ExternalLinkClusterMappingRepositoryImpl

func (ExternalLinkClusterMappingRepositoryImpl) FindAllActive

func (ExternalLinkClusterMappingRepositoryImpl) FindAllActiveByClusterId

func (impl ExternalLinkClusterMappingRepositoryImpl) FindAllActiveByClusterId(clusterId int) ([]ExternalLinkClusterMapping, error)

func (ExternalLinkClusterMappingRepositoryImpl) FindAllActiveByExternalLinkId

func (impl ExternalLinkClusterMappingRepositoryImpl) FindAllActiveByExternalLinkId(linkId int) ([]*ExternalLinkClusterMapping, error)

func (ExternalLinkClusterMappingRepositoryImpl) FindAllByExternalLinkId

func (impl ExternalLinkClusterMappingRepositoryImpl) FindAllByExternalLinkId(linkId int) ([]*ExternalLinkClusterMapping, error)

func (ExternalLinkClusterMappingRepositoryImpl) Save

func (impl ExternalLinkClusterMappingRepositoryImpl) Save(externalLinksClusters *ExternalLinkClusterMapping, tx *pg.Tx) error

func (ExternalLinkClusterMappingRepositoryImpl) Update

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"`
	ClusterIds       []int     `json:"clusterIds"`
	UpdatedOn        time.Time `json:"updatedOn"`
	UserId           int32     `json:"-"`
}

type ExternalLinkMonitoringTool

type ExternalLinkMonitoringTool struct {
	Id     int    `sql:"id,pk"`
	Name   string `sql:"name,notnull"`
	Icon   string `sql:"icon,notnull"`
	Active bool   `sql:"active,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ExternalLinkMonitoringToolDto

type ExternalLinkMonitoringToolDto struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	Icon string `json:"icon"`
}

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

type ExternalLinkRepository

type ExternalLinkRepository interface {
	Save(externalLinks *ExternalLink, tx *pg.Tx) error
	FindAllActive() ([]ExternalLink, error)
	FindOne(id int) (ExternalLink, error)
	Update(link *ExternalLink, tx *pg.Tx) error
	FindAllFilterOutByIds(ids []int) ([]ExternalLink, error)
	GetConnection() *pg.DB
}

type ExternalLinkRepositoryImpl

type ExternalLinkRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewExternalLinkRepositoryImpl

func NewExternalLinkRepositoryImpl(dbConnection *pg.DB) *ExternalLinkRepositoryImpl

func (ExternalLinkRepositoryImpl) FindAllActive

func (impl ExternalLinkRepositoryImpl) FindAllActive() ([]ExternalLink, error)

func (ExternalLinkRepositoryImpl) FindAllFilterOutByIds

func (impl ExternalLinkRepositoryImpl) FindAllFilterOutByIds(ids []int) ([]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) (*ExternalLinkApiResponse, error)
	GetAllActiveTools() ([]ExternalLinkMonitoringToolDto, error)
	FetchAllActiveLinks(clusterIds int) ([]*ExternalLinkDto, error)
	Update(request *ExternalLinkDto) (*ExternalLinkApiResponse, error)
	DeleteLink(id int, userId int32) (*ExternalLinkApiResponse, error)
}

type ExternalLinkServiceImpl

type ExternalLinkServiceImpl struct {
	// contains filtered or unexported fields
}

func NewExternalLinkServiceImpl

func NewExternalLinkServiceImpl(logger *zap.SugaredLogger, externalLinksToolsRepository ExternalLinkMonitoringToolRepository,
	externalLinksClustersRepository ExternalLinkClusterMappingRepository, externalLinksRepository ExternalLinkRepository) *ExternalLinkServiceImpl

func (ExternalLinkServiceImpl) Create

func (impl ExternalLinkServiceImpl) Create(requests []*ExternalLinkDto, userId int32) (*ExternalLinkApiResponse, error)
func (impl ExternalLinkServiceImpl) DeleteLink(id int, userId int32) (*ExternalLinkApiResponse, error)
func (impl ExternalLinkServiceImpl) FetchAllActiveLinks(clusterId int) ([]*ExternalLinkDto, error)

func (ExternalLinkServiceImpl) GetAllActiveTools

func (impl ExternalLinkServiceImpl) GetAllActiveTools() ([]ExternalLinkMonitoringToolDto, error)

func (ExternalLinkServiceImpl) Update

Jump to

Keyboard shortcuts

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