controller

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Echo        echo.Context
	OdooSession *odoo.Session
	OdooClient  *odoo.Client
}

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer is able to render HTML templates. Templates will be compiled the first time they are requested, and cached thereafter.

func NewRenderer

func NewRenderer() *Renderer

NewRenderer returns a new "Renderer" struct

func (*Renderer) Render

func (v *Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render renders the requested template with the given data into w. "template" is suffixed with ".html", and then rendered together with "layout.html".

type Values

type Values map[string]interface{}

Values is an arbitrary tree of data to be passed to Template rendering.

func AsError

func AsError(err error) Values

Jump to

Keyboard shortcuts

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