service

package
v0.0.0-...-cb8e146 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVisitedBundle

func AddVisitedBundle(user models.UserIdentity, bundle string) (models.UserIdentity, error)

Set visited bundle

func ChangeDefaultTemplate

func ChangeDefaultTemplate(accountId uint, dashboardId uint) (models.DashboardTemplate, error)

func CheckIfExistsInDB

func CheckIfExistsInDB(allFavoritePages []models.FavoritePage, newFavoritePage models.FavoritePage) bool

func CopyDashboardTemplate

func CopyDashboardTemplate(accountId uint, dashboardTemplateId uint) (models.DashboardTemplate, error)

func CreateIdentity

func CreateIdentity(userId string) (models.UserIdentity, error)

Create the user object and add the row if not already in DB

func DeleteTemplate

func DeleteTemplate(accountId uint, dashboardTemplateId uint) error

func GetAllBaseTemplates

func GetAllBaseTemplates() []models.BaseDashboardTemplate

func GetAllUserDashboardTemplates

func GetAllUserDashboardTemplates(userId uint) ([]models.DashboardTemplate, error)

func GetAllUserFavoritePages

func GetAllUserFavoritePages(userID uint) ([]models.FavoritePage, error)

func GetDashboardTemplate

func GetDashboardTemplate(userId uint, dashboard models.AvailableTemplates) ([]models.DashboardTemplate, error)

func GetDashboardTemplateBase

func GetDashboardTemplateBase(dashboard models.AvailableTemplates) (models.BaseDashboardTemplate, error)

func GetSelfReport

func GetSelfReport(accountID uint) (models.SelfReport, error)

func GetUserActiveFavoritePages

func GetUserActiveFavoritePages(userID uint) ([]models.FavoritePage, error)

func GetUserArchivedFavoritePages

func GetUserArchivedFavoritePages(userID uint) ([]models.FavoritePage, error)

func GetUserDashboardTemplate

func GetUserDashboardTemplate(userId uint, dashboard models.AvailableTemplates) ([]models.DashboardTemplate, error)

func GetUserIdentityData

func GetUserIdentityData(user models.UserIdentity) (models.UserIdentity, error)

Get user data complete with it's related tables.

func GetVisitedBundles

func GetVisitedBundles(user models.UserIdentity) (map[string]bool, error)

func HandleNewSelfReport

func HandleNewSelfReport(accountID uint, newSelfReport *models.SelfReport) error

func HandlePostLastVisitedPages

func HandlePostLastVisitedPages(recentPages []models.VisitedPage, user *models.UserIdentity) error

HandlePostLastVisitedPages inserts the most recent pages from chrome. Once they are added, all older entries are removed from the table.

func SaveUserFavoritePage

func SaveUserFavoritePage(userID uint, accountId string, newFavoritePage models.FavoritePage) error

func UpdateDashboardTemplate

func UpdateDashboardTemplate(templateId uint, userId uint, dashboardTemplate models.DashboardTemplate) (models.DashboardTemplate, error)

func UpdateFavoritePage

func UpdateFavoritePage(favoritePage models.FavoritePage) error

Types

type IntercomApp

type IntercomApp string
const (
	OpenShift           IntercomApp = "openshift"
	HacCore             IntercomApp = "hacCore"
	Acs                 IntercomApp = "acs"
	Ansible             IntercomApp = "ansible"
	AnsibleDashboard    IntercomApp = "ansibleDashboard"
	AutomationHub       IntercomApp = "automationHub"
	AutomationAnalytics IntercomApp = "automationAnalytics"
	DBAAS               IntercomApp = "dbaas"
)

func (IntercomApp) IsValidApp

func (ib IntercomApp) IsValidApp() error

type IntercomPayload

type IntercomPayload struct {
	Prod string `json:"prod,omitempty"`
	Dev  string `json:"dev,omitempty"`
}

func GetUserIntercomHash

func GetUserIntercomHash(userId string, namespace IntercomApp) (IntercomPayload, error)

Jump to

Keyboard shortcuts

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