types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name  string `json:"name"`
	EMail string `json:"email"`
}

type DataInfo

type DataInfo struct {
	Title      string         `json:"title"`       // 标题
	Author     string         `json:"author"`      // 作者
	Pic        string         `json:"pic"`         // 封面
	Desc       []string       `json:"desc"`        // 简介
	Category   []string       `json:"category"`    // 分类
	Status     string         `json:"status"`      // 状态
	UpdateTime *Time          `json:"update_time"` // 更新时间
	List       []DataListItem `json:"list"`        // 章节列表
}

DataInfo 数据详细信息

type DataItemInfo

type DataItemInfo struct {
	Title      string     `json:"title"`      // 标题
	Content    []string   `json:"content"`    // 内容
	Pagination Pagination `json:"pagination"` // 页码
}

DataItemInfo 获取数据项的信息

type DataListItem

type DataListItem struct {
	Title string `json:"title"` // 标题
	URI   string `json:"uri"`   // 地址
}

type DataSearch

type DataSearch struct {
	Data []DataSearchItem `json:"data"` // 信息
	Page int              `json:"page"` // 页码
	Size int              `json:"size"` // 数量
}

DataSearch 搜索展示的详细信息

type DataSearchItem

type DataSearchItem struct {
	URI        string   `json:"uri"`         // 地址
	Title      string   `json:"title"`       // 标题
	Author     string   `json:"author"`      // 作者
	Category   []string `json:"category"`    // 分类
	Status     string   `json:"status"`      // 状态
	UpdateTime *Time    `json:"update_time"` // 更新时间
}

type DataType

type DataType string
const (
	DataTypeCartoon DataType = "cartoon" // 漫画
	DataTypeBook    DataType = "book"    // 书籍
)

type Pagination

type Pagination struct {
	Prev string `json:"prev"` // 上一章
	Next string `json:"next"` // 下一章
	Info string `json:"info"` // 详细信息
}

type Time

type Time struct {
	time.Time
}

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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