web

package
v1.3.2-0...-4312943 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Config
}

Base defines the web handler module.

func NewBase

func NewBase(conf Config) Base

NewBase returns a new web handler module.

func (*Base) Serve

func (w *Base) Serve(ctx *gin.Context,
	statusCode int, file string, data interface{})

Serve serves a tmpl file rendering with data.

func (*Base) Template

func (w *Base) Template() (t *template.Template, err error)

Template returns a template instance that loads every tmpl file.

type Config

type Config struct {
	PackrBox packr.Box
	Traced   bool
}

Config defines the web config struct.

Jump to

Keyboard shortcuts

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