database

package
v0.0.0-...-3d7ecd4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MainDatabase  *sql.DB
	PostDatabase  *sql.DB
	DanmuDatabase *sql.DB
)
View Source
var (
	RecaptchaKey   string
	FrontendDomain string
	CORSDomain     []string
	UseTLS         bool
	CookieDomain   string
	SentryDSN      string
)

Functions

func AddPost

func AddPost(title string, content string, sort string, tag string, uid int) (*def.Post, error)

func CreateUser

func CreateUser(name string, password string, email string, experience int) error

func DeletePost

func DeletePost(pid int) error

func GetDanmu

func GetDanmu(vid int) (string, error)

func GetPost

func GetPost(id int) (*def.Post, error)

func GetUser

func GetUser(uid int, email string) (*def.User, error)

func InitDatabase

func InitDatabase()

func LoadConfig

func LoadConfig()

func SendDanmu

func SendDanmu(vid int, danmudata string) error

func UpdatePost

func UpdatePost(pid int, title string, content string, sort string, tag string, time string) (*def.Post, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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