render

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Render

type Render struct {
	Renderer       string
	RootPath       string
	Directory      string
	Secure         bool
	Port           string
	ServerName     string
	JetViews       *jet.Set
	Session        *scs.SessionManager
	InertiaManager *inertia.Inertia
}

func (*Render) GoPage

func (a *Render) GoPage(w http.ResponseWriter, r *http.Request, view string, data interface{}) error

Render with standard go templates

func (*Render) InertiaPage

func (a *Render) InertiaPage(w http.ResponseWriter, r *http.Request, template string) error

Render with Inertia

func (*Render) JetPage

func (a *Render) JetPage(w http.ResponseWriter, r *http.Request, templateName string, variables, data interface{}) error

Render with Jet templates

func (*Render) Page

func (a *Render) Page(w http.ResponseWriter, r *http.Request, view string, variables, data interface{}) error

type TemplateData

type TemplateData struct {
	IsAuthenticated bool
	IntMap          map[string]int
	StringMap       map[string]string
	FloatMap        map[string]float32
	Data            map[string]interface{} // Use interface data can be anything.
	CSRFToken       string
	Port            string
	ServerName      string
	Secure          bool
	Error           string
	Flash           string
}

Jump to

Keyboard shortcuts

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