module

package
v0.0.0-...-79eee9e Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBH *sql.DB

Functions

func GetBookChapters

func GetBookChapters(c *gin.Context)

获取图书的章节列表

func GetBooks

func GetBooks(c *gin.Context)

获取图书列表

func GetChapterContent

func GetChapterContent(c *gin.Context)

func IsLogin

func IsLogin(c *gin.Context)

func Login

func Login(c *gin.Context)

func LoginOut

func LoginOut(c *gin.Context)

func Responds

func Responds(iRet int, sMsg string, data interface{}, c *gin.Context)

Types

type AppConf

type AppConf struct {
	Database `ini:"database"`
	Redis    `ini:"redis"`
	Server   `ini:"server"`
}
var AppConfig AppConf

type Book

type Book struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	LastChapter string `json:"last_chapter"`
	Finished    int    `json:"finished"`
}

type Chapter

type Chapter struct {
	Id    int    `json:"id"`
	Bid   int    `json:"b_id"`
	Title string `json:"title"`
}

type ChapterContent

type ChapterContent struct {
	Id      int    `json:"id"`
	Bid     int    `json:"b_id"`
	Title   string `json:"title"`
	Content string `json:"content"`
	PreId   int    `json:"pre_id"`
	AfterId int    `json:"after_id"`
}

type Database

type Database struct {
	Connection string `ini:"connection"`
	Host       string `ini:"host"`
	Port       string `ini:"port"`
	Database   string `ini:"database"`
	Username   string `ini:"username"`
	Password   string `ini:"password"`
}

type Redis

type Redis struct {
	Host     string `ini:"host"`
	Password string `ini:"password"`
	Port     string `ini:"port"`
}

type Server

type Server struct {
	Port   string `ini:"port"`
	Token  string `ini:"token"`
	Admin  string `ini:"admin"`
	Pass   string `ini:"pass"`
	Domain string `ini:"domain"`
}

Jump to

Keyboard shortcuts

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