api

package
v0.0.0-...-d513a55 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateCourse

func CreateOrUpdateCourse(courseName string, course Course, c echo.Context) error

CreateOrUpdateCourse crates/updates course

func GetCourse

func GetCourse() echo.HandlerFunc

GetCourse returns all courses

func GetSkill

func GetSkill() echo.HandlerFunc

GetSkill returns all skill data

func PatchCourse

func PatchCourse() echo.HandlerFunc

PatchCourse updates course

func PostCourse

func PostCourse() echo.HandlerFunc

PostCourse creates new course

func UpgradeProgress

func UpgradeProgress() echo.HandlerFunc

UpgradeProgress sets the progress of a skill

Types

type Course

type Course struct {
	File        string
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Author      string        `json:"author"`
	URL         string        `json:"url"`
	Version     string        `json:"version"`
	Icon        string        `json:"icon"`
	Groups      []CourseGroup `json:"groups"`
}

Course contains csv/json data

type CourseGroup

type CourseGroup struct {
	Name   string  `json:"name"`
	Order  int64   `json:"order"`
	Skills []Skill `json:"skills"`
}

CourseGroup contains csv/json data

type CourseMeta

type CourseMeta struct {
	File        string
	Name        string `json:"name"`
	Description string `json:"description"`
	Author      string `json:"author"`
	URL         string `json:"url"`
	Version     string `json:"version"`
	Icon        string `json:"icon"`
}

CourseMeta contains csv/json data

type Skill

type Skill struct {
	Name        string   `json:"name"`
	Order       int64    `json:"order"`
	Description string   `json:"description"`
	Resources   []string `json:"resources"`
	Progress    int      `json:"progress"`
}

Skill contains csv/json data

Jump to

Keyboard shortcuts

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