frontend

package
v1.2.24 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetStore

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

func NewAssetStore

func NewAssetStore(version string) *AssetStore

func (*AssetStore) Clear

func (store *AssetStore) Clear()

func (*AssetStore) Get

func (store *AssetStore) Get(assetPath string) ([]byte, bool)

func (*AssetStore) Has

func (store *AssetStore) Has(assetPath string) bool

func (*AssetStore) Put

func (store *AssetStore) Put(assetPath string, content []byte)

func (*AssetStore) VersionedPath

func (store *AssetStore) VersionedPath(folderPath, fileNameWithoutExtension, fileExtension string) string

type Config

type Config struct {
	FrontendFolderPath string
	Version            string
	Static             any
}

type Engine

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

func NewEngine

func NewEngine(config Config) (*Engine, error)

func (*Engine) Asset

func (e *Engine) Asset(assetPath string) ([]byte, bool)

func (*Engine) RawAsset

func (e *Engine) RawAsset(assetPath string) ([]byte, bool, error)

func (*Engine) Reload

func (e *Engine) Reload() error

func (*Engine) Render

func (e *Engine) Render(request RenderRequest) ([]byte, error)

type EngineService

type EngineService interface {
	Render(request RenderRequest) ([]byte, error)
	Reload() error
	Asset(assetPath string) ([]byte, bool)
	RawAsset(assetPath string) ([]byte, bool, error)
}

type RenderRequest

type RenderRequest struct {
	PageName  string
	PageTitle string
	Globals   any
	Page      any
}

Jump to

Keyboard shortcuts

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