http

package
v0.0.0-...-a1b16c7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

处理账户的登录,注册等情况

/order所有操作都会添加数据至数据库

用于查看目录与文件

编写频繁操作的api @see http/README.md

处理文章摘要的业务逻辑

个人主页API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body2String

func Body2String(r *http.Request) (string, error)

func CheckSteamInfo

func CheckSteamInfo(r *http.Request) *orm.AccountEx

func ComputeAllMD5

func ComputeAllMD5()

func CreateAtk

func CreateAtk(id int64, exp int) (string, error)

func DM1CheckPermission

func DM1CheckPermission(r *http.Request) error

func GetAccountByAtk

func GetAccountByAtk(r *http.Request) (*orm.Account, error)

func GetAccountExByAtk

func GetAccountExByAtk(r *http.Request) (*orm.AccountEx, error)

func GetAllID3

func GetAllID3()

func GetAtk

func GetAtk(r *http.Request) (string, error)

func GetCid

func GetCid(r *http.Request) (string, error)

func GetIdByAtk

func GetIdByAtk(r *http.Request) (int64, error)

func Init

func Init()

func MakeClipboardKey

func MakeClipboardKey(r *http.Request) (string, error)

Types

type ID3

type ID3 struct {
	Album       string      `json:"album"`
	AlbumArtist string      `json:"albumArtist"`
	Artist      string      `json:"artist"`
	Comment     string      `json:"comment"`
	Composer    string      `json:"composer"`
	DiscNum     int         `json:"disc_num"`
	DiscTotal   int         `json:"disc_total"`
	FileType    string      `json:"fileType"`
	Format      string      `json:"format"`
	Genre       string      `json:"genre"`
	Lyrics      string      `json:"lyrics"`
	Picture     interface{} `json:"picture"`
	Raw         interface{} `json:"raw"`
	Title       string      `json:"title"`
	TrackNum    int         `json:"track_num"`
	TrackTotal  int         `json:"track_total"`
	Year        int         `json:"year"`
}

type InfoModel

type InfoModel struct {
	Id      int64
	Name    string
	Email   string
	Phone   string
	Avatar  string
	Info    string
	Level   string
	BgUrl   string
	FavPost []orm.PostInfo
}

type LikeInfoModel

type LikeInfoModel struct {
	Count int
	Liked bool
}

type LoginModel

type LoginModel struct {
	Login     string `json:"login"`
	Pswd      string `json:"pswd"`
	LoginType string `json:"loginType"`
	// LoginType 应在前端进行完解析为
	// email name phone 三种之一
	KeepLogin bool `json:"keepLogin"`
}

type ModifiedPostModel

type ModifiedPostModel struct {
	Id        int64
	Title     string
	Text      string
	TagIds    []string
	IsPrivate bool
	Path      string
}

修改文章

type ModifyPostNoTextModel

type ModifyPostNoTextModel struct {
	Id     int64
	Title  string
	TagIds []string
}

更改文章,没有文本内容 应对流量节约的情况

type PostInfoModel

type PostInfoModel struct {
	orm.Post
	Author      string
	ViewedCount int64
	Tags        []string
}

type PostModel

type PostModel struct {
	Title     string
	Text      string
	TagIds    []string
	IsPrivate bool
	Path      string
}

发布新文章

type PostReaderModel

type PostReaderModel struct {
	Id          int64
	Title       string
	Text        string
	Tags        []string
	Author      string
	Date        string
	MyPost      bool
	IsPrivate   bool
	ViewedCount int64
}

发布新文章

type RegisterModel

type RegisterModel struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Phone string `json:"phone"`
	Pswd  string `json:"pswd"`
	Cap   string `json:"cap"`
}

type VPExportModel

type VPExportModel struct {
	Id     int64
	Title  string
	Base64 string
}

Jump to

Keyboard shortcuts

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