webapp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET   string = "GET"
	POST  string = "POST"
	PUT   string = "PUT"
	PATCH string = "PATCH"
	HEAD  string = "HEAD"
)
View Source
const (
	ServerAddr string = ":7331"
	SID        string = "sid"
)

Variables

View Source
var Endpoints []*Endpoint

Functions

func CSRFMiddleware added in v0.2.0

func CSRFMiddleware() gin.HandlerFunc

func ConfigMiddleware

func ConfigMiddleware(cfg *config.Config) gin.HandlerFunc

func ErrorLoggerMiddleware added in v0.2.0

func ErrorLoggerMiddleware() gin.HandlerFunc

func GzipMiddleware added in v0.2.0

func GzipMiddleware() gin.HandlerFunc

func RSSEndpointWrapper added in v0.2.0

func RSSEndpointWrapper(f gin.HandlerFunc, rssVar string) gin.HandlerFunc

func Run

func Run(cfg *config.Config)

func SessionMiddleware

func SessionMiddleware() gin.HandlerFunc

Types

type Endpoint

type Endpoint struct {
	Name         string
	Path         string
	Method       string
	AuthRequired bool
	Handler      gin.HandlerFunc
	Description  string
	Args         []*EndpointArg
	RSS          string
}

type EndpointArg

type EndpointArg struct {
	Name        string
	Type        string
	Required    bool
	Description string
}

type NotificationType added in v0.2.0

type NotificationType int

type ResourceMeta added in v0.2.0

type ResourceMeta struct {
	Filename  string `json:"filename"`
	Mimetype  string `json:"mimetype"`
	Extension string `json:"extension"`
}

type ResourceMetas added in v0.2.0

type ResourceMetas []ResourceMeta

type TagCount

type TagCount struct {
	Tag   string
	Count int64
}

Jump to

Keyboard shortcuts

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