rest

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SharedRole = "shared"
	AdminRole  = "admin"
)
View Source
const (
	SearchResultsLimit = 24 // divides by 2,3,4,6 to allow that many columns
)

Variables

Functions

func DefaultHeaders added in v0.1.17

func DefaultHeaders(w http.ResponseWriter)

func GetBook

func GetBook(w http.ResponseWriter, r *http.Request)

func GetBookCover added in v0.1.89

func GetBookCover(w http.ResponseWriter, r *http.Request)

func GetBooks

func GetBooks(w http.ResponseWriter, r *http.Request)

func GetCompletedClear added in v0.1.60

func GetCompletedClear(w http.ResponseWriter, r *http.Request)

func GetCompletedSet added in v0.1.60

func GetCompletedSet(w http.ResponseWriter, r *http.Request)

func GetDescription added in v0.1.16

func GetDescription(w http.ResponseWriter, r *http.Request)

func GetDigest added in v0.1.79

func GetDigest(w http.ResponseWriter, r *http.Request)

func GetDownloads

func GetDownloads(w http.ResponseWriter, r *http.Request)

func GetFile added in v0.1.4

func GetFile(w http.ResponseWriter, r *http.Request)

func GetLatest added in v0.3.3

func GetLatest(w http.ResponseWriter, r *http.Request)

func GetListCover added in v0.1.89

func GetListCover(w http.ResponseWriter, r *http.Request)

func GetLocalTagsApply added in v0.1.62

func GetLocalTagsApply(w http.ResponseWriter, r *http.Request)

func GetLocalTagsEdit added in v0.1.62

func GetLocalTagsEdit(w http.ResponseWriter, r *http.Request)

func GetNewBook added in v0.3.3

func GetNewBook(w http.ResponseWriter, r *http.Request)

func GetSearch

func GetSearch(w http.ResponseWriter, r *http.Request)

func HandleFuncs

func HandleFuncs(p int)

func Init

func Init() error

func InitTemplates

func InitTemplates(templatesFS fs.FS, stencilAppStyles fs.FS)

func SetPassword added in v0.1.10

func SetPassword(role, p string)

func SetUsername added in v0.1.10

func SetUsername(role, u string)

Types

type DownloadViewModel added in v0.3.3

type DownloadViewModel struct {
	Id          string
	Filename    string
	Description string
}

type LatestBookViewModel added in v0.3.3

type LatestBookViewModel struct {
	Id      string
	Title   string
	Authors []string
}

type NewBookViewModel added in v0.3.3

type NewBookViewModel struct {
	Id        string
	Title     string
	Authors   []string
	Downloads []*DownloadViewModel
}

Jump to

Keyboard shortcuts

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