renderer

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer interface {
	InjectInAdminView(w http.ResponseWriter, subView *bytes.Buffer)
	Render(w http.ResponseWriter, view string)
	InjectTemplateInAdmin(res http.ResponseWriter, templateText string, data interface{})
	Editable(http.ResponseWriter, editor.Editable)
	InternalServerError(w http.ResponseWriter)
	MethodNotAllowed(w http.ResponseWriter)
	BadRequest(res http.ResponseWriter)
	Html(res http.ResponseWriter, data []byte)
	Json(res http.ResponseWriter, statusCode int, data interface{})
	Error(res http.ResponseWriter, statusCode int, err error)
	Template(templates ...string) *template.Template
	TemplateString(templates ...string) string
	TemplateFromDir(name string) *template.Template
	TableView(w http.ResponseWriter, templateName string, params *table.Table)
}

func New

func New(ctx context.Context) (Renderer, error)

type View

type View struct {
	PublicPath string
	Types      map[string]content.Builder
	Subview    template.HTML
	Data       interface{}
}

Jump to

Keyboard shortcuts

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