webdashboard

package
v0.0.0-...-da9a50a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

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

type BestSeller struct {
	Title string `json:"title"`
	Count int64  `json:"count"`
}

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

Jump to

Keyboard shortcuts

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