inertia

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c Config) *inertia

Types

type Config

type Config struct {
	App                      support.Refiber
	PreRenderHanlder         PreRenderHanlder
	SSRHanlder               SSRHanlder
	EnablePreRenderByDefault bool
	EnableSSRByDefault       bool
	ViewTemplate             string
}

type InertiaInterface

type InertiaInterface interface {
	SetViewTemplate(view string)
	Render(*fiber.Ctx) *render
}

type PreRenderHanlder

type PreRenderHanlder = func(PreRenderInterface) *string

type PreRenderInterface

type PreRenderInterface interface {
	GetSafeHTML() string
	GetCompailedJs() []byte
	GetProps() []byte
}

type SSRHanlder

type SSRHanlder = func(SSRInterface) *string

type SSRInterface

type SSRInterface interface {
	GetBundledScripts() []byte
	GetScripts() map[string][]byte
}

Jump to

Keyboard shortcuts

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