web

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotFoundFile = "404.html"
	IndexFile    = "index.html"
	PreviewFile  = "Preview.html"
	FavIconFile  = "favicon.ico"
	ContentFile  = "Content.html"
)

Static files

Variables

This section is empty.

Functions

func FavIconHandler

func FavIconHandler(handlerData HandlerData, w http.ResponseWriter, r *http.Request)

FavIconHandler handle favicon

func IndexPageHandler

func IndexPageHandler(handlerData HandlerData, w http.ResponseWriter, r *http.Request)

IndexPageHandler show index/main page

func LogError

func LogError(err error) bool

LogError returns true on error

func NotFoundHandler

func NotFoundHandler(handlerData HandlerData, w http.ResponseWriter, r *http.Request)

NotFoundHandler 404 not found handler

func PrevievFileHandler

func PrevievFileHandler(handlerData HandlerData, w http.ResponseWriter, r *http.Request)

PrevievFileHandler handler for previews

func RawFileHandler

func RawFileHandler(handlerData HandlerData, w http.ResponseWriter, r *http.Request)

RawFileHandler handler for previews

Types

type HandlerData

type HandlerData struct {
	Config *models.Config
	Db     *gorm.DB
	User   *models.User
}

HandlerData handlerData for web

Jump to

Keyboard shortcuts

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