Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusDraft string = "draft" StatusEncrypting string = "encrypting" StatusError string = "error" StatusOk string = "ok" )
Publication status
Variables ¶
View Source
var ErrNotFound = errors.New("Informations not found")
ErrNotFound error trown when publication is not found
Functions ¶
This section is empty.
Types ¶
type BestSeller ¶
BestSeller struct defines a best seller
type Dashboard ¶
type Dashboard struct { PublicationCount int64 `json:"publicationCount"` UserCount int64 `json:"userCount"` BuyCount int64 `json:"buyCount"` LoanCount int64 `json:"loanCount"` }
Dashboard struct defines a publication
type DashboardManager ¶
type DashboardManager struct {
// contains filtered or unexported fields
}
DashboardManager helper
func (DashboardManager) GetDashboardBestSellers ¶
func (dashManager DashboardManager) GetDashboardBestSellers() ([5]BestSeller, error)
GetDashboardBestSellers a publication for a given ID
func (DashboardManager) GetDashboardInfos ¶
func (dashManager DashboardManager) GetDashboardInfos() (Dashboard, error)
GetDashboardInfos a publication for a given ID
type WebDashboard ¶
type WebDashboard interface { GetDashboardInfos() (Dashboard, error) GetDashboardBestSellers() ([5]BestSeller, error) }
WebDashboard interface for publication db interaction
func Init ¶
func Init(config config.Configuration, db *sql.DB) (i WebDashboard, err error)
Init publication manager
Click to show internal directories.
Click to hide internal directories.