poetry

package
v0.0.0-...-993f52c Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 6 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 {
	gorm.Model
	Name             string `gorm:"type:varchar(255);index" json:"name"`
	Desc             string `gorm:"type:text" json:"desc"`
	Type             string `gorm:"type:varchar(255)"`
	ShortDescription string `gorm:"type:text" json:"short_description"`
}

Author 用来描述作者的信息

func ReadPoetryAuthors

func ReadPoetryAuthors(dynasty string) []Author

ReadPoetryAuthors 获取诗人的信息

type JSONPoetry

type JSONPoetry struct {
	Strains    []string `json:"strains"`
	Author     string   `json:"author"`
	Paragraphs []string `json:"paragraphs"`
	Title      string   `json:"title"`
}

JSONPoetry 诗的 JSON 结构

type Poetry

type Poetry struct {
	gorm.Model
	Strains    string `gorm:"type:text"`
	Author     string `gorm:"type:varchar(255);index"`
	Paragraphs string `gorm:"type:text"`
	Title      string `gorm:"type:varchar(255);index"`
	Type       string `gorm:"type:varchar(255)"`
}

Poetry 是诗歌在数据库中的映射

func ReadPoetry

func ReadPoetry() []Poetry

ReadPoetry 读取唐宋时期的诗歌

Jump to

Keyboard shortcuts

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