dashboard

package
v0.0.0-...-489d2f4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawStudyDashboard

func DrawStudyDashboard(data *api.SubjectData)

func Level

func Level() *widgets.BarChart

func LevelProgress

func LevelProgress(radicalPct, kanjiPct int) (*widgets.Gauge, *widgets.Gauge)

func Progress

func Progress() (*widgets.Gauge, *widgets.Gauge)

func Summary

func Summary() *widgets.BarChart

func UpdateLevelData

func UpdateLevelData() (LevelLabels, LevelInfo)

func UpdateLevelProgress

func UpdateLevelProgress() (int, int)

func UpdateSummaryData

func UpdateSummaryData() (BarLabels, BarData)

func UpdateUserData

func UpdateUserData() (string, string)

func User

func User() *widgets.Paragraph

Types

type BarData

type BarData []float64

type BarLabels

type BarLabels []string

type LevelData

type LevelData struct {
	Levels []LevelObj `json:"data"`
}

type LevelInfo

type LevelInfo []float64

type LevelLabels

type LevelLabels []string

type LevelObj

type LevelObj struct {
	Id      string `json:"id"`
	Details struct {
		Level    int    `json:"level"`
		Unlocked string `json:"unlocked_at"`
		Started  string `json:"started_at"`
		Passed   string `json:"passed_at"`
	} `json:"data"`
}

type Review

type Review struct {
	AvailableAt string    `json:"available_at"`
	SubjectIds  []Subject `json:"subject_ids"`
}

type Subject

type Subject int

type SubjectTypes

type SubjectTypes struct {
	// contains filtered or unexported fields
}

type SummaryData

type SummaryData struct {
	Data struct {
		Reviews []Review `json:"reviews"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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