web

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Id    int64  `json:"id,omitempty"`
	Title string `json:"title,omitempty"`
}

type Handler

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

func NewHandler

func NewHandler(svc service.SkillService, queSvc baguwen.Service, caseSvc cases.Service) *Handler

func (*Handler) Detail

func (h *Handler) Detail(ctx *ginx.Context, req Sid) (ginx.Result, error)

func (*Handler) DetailRefs

func (h *Handler) DetailRefs(ctx *ginx.Context, req Sid) (ginx.Result, error)

func (*Handler) List

func (h *Handler) List(ctx *ginx.Context, page Page) (ginx.Result, error)

func (*Handler) Permission

func (h *Handler) Permission(ctx *ginx.Context, sess session.Session) (ginx.Result, error)

func (*Handler) PrivateRoutes

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) PublicRoutes

func (h *Handler) PublicRoutes(server *gin.Engine)

func (*Handler) RefsByLevelIDs

func (h *Handler) RefsByLevelIDs(ctx *ginx.Context, req IDs) (ginx.Result, error)

func (*Handler) Save

func (h *Handler) Save(ctx *ginx.Context, req SaveReq) (ginx.Result, error)

func (*Handler) SaveRefs

func (h *Handler) SaveRefs(ctx *ginx.Context, req SaveReq) (ginx.Result, error)

type IDs

type IDs struct {
	IDs []int64 `json:"ids,omitempty"`
}

type Page

type Page struct {
	Offset int `json:"offset,omitempty"`
	Limit  int `json:"limit,omitempty"`
}

type Question

type Question struct {
	Id    int64  `json:"id,omitempty"`
	Title string `json:"title,omitempty"`
}

type SaveReq

type SaveReq struct {
	Skill Skill `json:"skill,omitempty"`
}

type Sid

type Sid struct {
	Sid int64 `json:"sid"`
}

type Skill

type Skill struct {
	ID           int64      `json:"id,omitempty"`
	Labels       []string   `json:"labels,omitempty"`
	Name         string     `json:"name,omitempty"`
	Desc         string     `json:"desc,omitempty"`
	Basic        SkillLevel `json:"basic,omitempty"`
	Intermediate SkillLevel `json:"intermediate,omitempty"`
	Advanced     SkillLevel `json:"advanced,omitempty"`
	Utime        string     `json:"utime,omitempty"`
}

type SkillLevel

type SkillLevel struct {
	Id        int64      `json:"id,omitempty"`
	Desc      string     `json:"desc,omitempty"`
	Questions []Question `json:"questions"`
	Cases     []Case     `json:"cases"`
}

type SkillList

type SkillList struct {
	Skills []Skill `json:"skills,omitempty"`
	Total  int64   `json:"total,omitempty"`
}

Jump to

Keyboard shortcuts

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