Documentation ¶
Index ¶
- func InitRoute(r fiber.Router)
- type ConfigurationMap
- type Dashboard
- type DashboardRepository
- type DashboardRepositoryDB
- func (d DashboardRepositoryDB) CreateDashboard(b Dashboard) *exception.AppError
- func (d DashboardRepositoryDB) CreateWidget(widget Widget) *exception.AppError
- func (d DashboardRepositoryDB) DeleteDashboard(id string, userId string) *exception.AppError
- func (d DashboardRepositoryDB) DeleteWidget(id string, userId string) *exception.AppError
- func (d DashboardRepositoryDB) GetAllDashboards(userId string) ([]Dashboard, *exception.AppError)
- func (d DashboardRepositoryDB) GetDashboardById(userId string, id string) (Dashboard, *exception.AppError)
- func (d DashboardRepositoryDB) GetDefaultDashboard(userId string) (Dashboard, *exception.AppError)
- func (d DashboardRepositoryDB) GetWidgetById(id, userId string) (Widget, *exception.AppError)
- func (d DashboardRepositoryDB) GetWidgetsByDashboardId(dashboardId, userId string) ([]Widget, *exception.AppError)
- func (d DashboardRepositoryDB) SetDefaultDashboard(id string, userId string) *exception.AppError
- func (d DashboardRepositoryDB) UpdateDashboard(b Dashboard) *exception.AppError
- func (d DashboardRepositoryDB) UpdateWidget(widget Widget) *exception.AppError
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigurationMap ¶
type ConfigurationMap map[string]interface{}
func (*ConfigurationMap) Scan ¶
func (sla *ConfigurationMap) Scan(value interface{}) error
type DashboardRepository ¶
type DashboardRepository interface { GetAllDashboards(userId string) ([]Dashboard, *exception.AppError) GetDashboardById(userId string, id string) (Dashboard, *exception.AppError) GetDefaultDashboard(userId string) (Dashboard, *exception.AppError) CreateDashboard(d Dashboard) *exception.AppError UpdateDashboard(d Dashboard) *exception.AppError DeleteDashboard(id string, userId string) *exception.AppError SetDefaultDashboard(id string, userId string) *exception.AppError UpdateWidget(widget Widget) *exception.AppError DeleteWidget(id string, userId string) *exception.AppError CreateWidget(widget Widget) *exception.AppError GetWidgetsByDashboardId(dashboardId, userId string) ([]Widget, *exception.AppError) GetWidgetById(id, userId string) (Widget, *exception.AppError) }
type DashboardRepositoryDB ¶
type DashboardRepositoryDB struct {
// contains filtered or unexported fields
}
func NewDashboardRepository ¶
func NewDashboardRepository() DashboardRepositoryDB
func (DashboardRepositoryDB) CreateDashboard ¶
func (d DashboardRepositoryDB) CreateDashboard(b Dashboard) *exception.AppError
func (DashboardRepositoryDB) CreateWidget ¶
func (d DashboardRepositoryDB) CreateWidget(widget Widget) *exception.AppError
func (DashboardRepositoryDB) DeleteDashboard ¶
func (d DashboardRepositoryDB) DeleteDashboard(id string, userId string) *exception.AppError
func (DashboardRepositoryDB) DeleteWidget ¶
func (d DashboardRepositoryDB) DeleteWidget(id string, userId string) *exception.AppError
func (DashboardRepositoryDB) GetAllDashboards ¶
func (d DashboardRepositoryDB) GetAllDashboards(userId string) ([]Dashboard, *exception.AppError)
func (DashboardRepositoryDB) GetDashboardById ¶
func (DashboardRepositoryDB) GetDefaultDashboard ¶
func (d DashboardRepositoryDB) GetDefaultDashboard(userId string) (Dashboard, *exception.AppError)
func (DashboardRepositoryDB) GetWidgetById ¶
func (d DashboardRepositoryDB) GetWidgetById(id, userId string) (Widget, *exception.AppError)
func (DashboardRepositoryDB) GetWidgetsByDashboardId ¶
func (d DashboardRepositoryDB) GetWidgetsByDashboardId(dashboardId, userId string) ([]Widget, *exception.AppError)
func (DashboardRepositoryDB) SetDefaultDashboard ¶
func (d DashboardRepositoryDB) SetDefaultDashboard(id string, userId string) *exception.AppError
func (DashboardRepositoryDB) UpdateDashboard ¶
func (d DashboardRepositoryDB) UpdateDashboard(b Dashboard) *exception.AppError
func (DashboardRepositoryDB) UpdateWidget ¶
func (d DashboardRepositoryDB) UpdateWidget(widget Widget) *exception.AppError
type Widget ¶
type Widget struct { Id string `json:"id" gorm:"primaryKey"` Name string `json:"name"` X int `json:"x"` Y int `json:"y"` W int `json:"w"` H int `json:"h"` HTML string `gorm:"type:longtext" json:"html"` CSS string `gorm:"type:longtext" json:"css"` JS string `gorm:"type:longtext" json:"js"` DashboardId string `gorm:"index" json:"-"` UserId string `gorm:"index" json:"-"` }
Click to show internal directories.
Click to hide internal directories.