webui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Zlib Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParam

func GetParam(ctx context.Context, name string) (string, bool)

func GetParamI32

func GetParamI32(ctx context.Context, name string) (int32, bool)

func GetUser

func GetUser(ctx context.Context) *db.User

func IsLoggedIn

func IsLoggedIn(ctx context.Context) bool

func NewUiContext

func NewUiContext(req *http.Request) context.Context

func RenderFile

func RenderFile(filename string, hash string) (string, error)

RenderFile renders a file based on its extension

func RenderFileComponent

func RenderFileComponent(filename string, hash string) templ.Component

RenderFileComponent returns a templ component for rendering file content

Types

type UiContext

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

func (*UiContext) Deadline

func (c *UiContext) Deadline() (deadline time.Time, ok bool)

func (*UiContext) Done

func (c *UiContext) Done() <-chan struct{}

func (*UiContext) Err

func (c *UiContext) Err() error

func (*UiContext) User

func (c *UiContext) User() *db.User

func (*UiContext) Value

func (c *UiContext) Value(key any) any

Jump to

Keyboard shortcuts

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