Documentation ¶
Index ¶
- func AddVisitedBundle(user models.UserIdentity, bundle string) (models.UserIdentity, error)
- func ChangeDefaultTemplate(accountId uint, dashboardId uint) (models.DashboardTemplate, error)
- func CheckIfExistsInDB(allFavoritePages []models.FavoritePage, newFavoritePage models.FavoritePage) bool
- func CopyDashboardTemplate(accountId uint, dashboardTemplateId uint) (models.DashboardTemplate, error)
- func CreateIdentity(userId string) (models.UserIdentity, error)
- func DeleteTemplate(accountId uint, dashboardTemplateId uint) error
- func GetAllBaseTemplates() []models.BaseDashboardTemplate
- func GetAllUserDashboardTemplates(userId uint) ([]models.DashboardTemplate, error)
- func GetAllUserFavoritePages(userID uint) ([]models.FavoritePage, error)
- func GetDashboardTemplate(userId uint, dashboard models.AvailableTemplates) ([]models.DashboardTemplate, error)
- func GetDashboardTemplateBase(dashboard models.AvailableTemplates) (models.BaseDashboardTemplate, error)
- func GetSelfReport(accountID uint) (models.SelfReport, error)
- func GetUserActiveFavoritePages(userID uint) ([]models.FavoritePage, error)
- func GetUserArchivedFavoritePages(userID uint) ([]models.FavoritePage, error)
- func GetUserDashboardTemplate(userId uint, dashboard models.AvailableTemplates) ([]models.DashboardTemplate, error)
- func GetUserIdentityData(user models.UserIdentity) (models.UserIdentity, error)
- func GetVisitedBundles(user models.UserIdentity) (map[string]bool, error)
- func HandleNewSelfReport(accountID uint, newSelfReport *models.SelfReport) error
- func HandlePostLastVisitedPages(recentPages []models.VisitedPage, user *models.UserIdentity) error
- func SaveUserFavoritePage(userID uint, accountId string, newFavoritePage models.FavoritePage) error
- func UpdateDashboardTemplate(templateId uint, userId uint, dashboardTemplate models.DashboardTemplate) (models.DashboardTemplate, error)
- func UpdateFavoritePage(favoritePage models.FavoritePage) error
- type IntercomApp
- type IntercomPayload
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 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)
Click to show internal directories.
Click to hide internal directories.