webapp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: AGPL-3.0 Imports: 49 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
View Source
var URLFor func(string, ...string) string

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 LocalizationMiddleware added in v0.5.0

func LocalizationMiddleware(cfg *config.Config) 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(cfg *config.Config) 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

Jump to

Keyboard shortcuts

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