state

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerConfig *config.Config

Functions

This section is empty.

Types

type GlobalState

type GlobalState struct {
	Version       string
	ShelfBookList *model.BookInfoList
	ServerStatus  *util.ServerStatus
}
var Global GlobalState

func (*GlobalState) GetAllBookNum

func (g *GlobalState) GetAllBookNum() int

GetAllBookNum 获取所有书籍数量

func (*GlobalState) GetStaticFileMode

func (s *GlobalState) GetStaticFileMode() bool

GetStaticFileMode 是否开启静态模式,开启Debug模式时,静态模式会被强制开启 需要避免 </script>或 </body> 提前截断script标签的问题

type ReaderMode

type ReaderMode int
const (
	// ScrollMode 卷轴模式
	ScrollMode ReaderMode = iota
	// FlipMode 翻页模式
	FlipMode
)

type UserState

type UserState struct {
	IsLogin    bool
	IsAdmin    bool
	ReaderMode ReaderMode //阅读器默认阅读模式
}
var User UserState

Jump to

Keyboard shortcuts

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