web

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinWeb

func GinWeb(useLogger bool, options ...ginOption) core.PluginConfig

func ParseDir added in v0.0.2

func ParseDir(t *template.Template, root string, filePattern ...string) (*template.Template, error)

func ParseFSDir added in v0.0.2

func ParseFSDir(t *template.Template, fsys fs.FS, root string, patterns ...string) (*template.Template, error)

func WithCors added in v0.0.2

func WithCors(useCors bool) ginOption

func WithErrorHandler added in v0.0.3

func WithErrorHandler(errorHandler middleware.WebErrorHandler) ginOption

func WithTracert added in v0.0.3

func WithTracert(tracert middleware.WebTracert) ginOption

Types

type Controller

type Controller struct {
	Web *gin.Engine `aware:"web"`
	Log core.Log    `aware:""`
}

func (*Controller) HtmlView

func (o *Controller) HtmlView(fn func(*gin.Context) (string, gin.H)) gin.HandlerFunc

func (*Controller) JsonView

func (o *Controller) JsonView(fn func(*gin.Context) interface{}) gin.HandlerFunc

func (*Controller) JsonpView

func (o *Controller) JsonpView(fn func(*gin.Context) interface{}) gin.HandlerFunc

func (*Controller) StringView

func (o *Controller) StringView(fn func(*gin.Context) string) gin.HandlerFunc

func (*Controller) XmlView

func (o *Controller) XmlView(fn func(*gin.Context) interface{}) gin.HandlerFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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