handler

package
v0.0.0-...-5fc674c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeHandler

func CodeHandler(c echo.Context) error

CodeHandler 代码处理器

func DownloadHandler

func DownloadHandler(c echo.Context) error

func ErrorHandler

func ErrorHandler(c echo.Context) error

func IndexHandler

func IndexHandler(c echo.Context) error

IndexHandler 首页渲染

func UploadHandler

func UploadHandler(c echo.Context) error

func WisdomHandler

func WisdomHandler(c echo.Context) (err error)

WisdomHandler 名言处理

Types

type IndexData

type IndexData struct {
	Content string
}

type PageData

type PageData struct {
	Error  error
	User   *User
	Wisdom string
	Data   interface{}
}

type User

type User struct {
	Name string
}

type Wisdom

type Wisdom struct {
	Sentence string `json:"sentence,omitempty"` // 句子
	WType    int    `json:"w_type,omitempty"`   // 类型
	Desc     string `json:"desc,omitempty"`     // 描述
	Img      string `json:"img,omitempty"`      // 图片
}

Wisdom 名言警句

type WisdomList

type WisdomList struct {
	Preview []string `json:"preview,omitempty"`
	Show    []string `json:"show,omitempty"`
}

WisdomList 配置列表

func ParseJsonWisdom

func ParseJsonWisdom(filename string) (*WisdomList, error)

ParseJsonWisdom 从json解析wisdom

Jump to

Keyboard shortcuts

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