web

package
v0.0.0-...-b405bf8 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](config *T, opts ...Option) (http.Handler, error)

Types

type Field

type Field struct {
	Name     string
	Label    string
	Value    string
	Type     string
	Icon     string
	Status   string
	Help     string
	Readonly bool
}

type Initializable

type Initializable interface {
	Initialize(parent any, n Notifier) error
}

type Notification

type Notification struct {
	Message string
	Status  string
}

type Notifier

type Notifier interface {
	Notify(Notification)
}

type Option

type Option func(*configPageOptions)

func WithAssets

func WithAssets(assets fs.FS) Option

func WithTheme

func WithTheme(theme *Theme) Option

type Page

type Page struct {
	Title         string
	Subtitle      string
	Notifications []Notification
	Sections      []Section
	HasAssets     bool
}

func (*Page) Notify

func (p *Page) Notify(n Notification)

type ParseError

type ParseError struct {
	Message string
	Field   string
	Err     error
}

func (*ParseError) As

func (p *ParseError) As(target any) bool

func (*ParseError) Error

func (p *ParseError) Error() string

func (*ParseError) Is

func (p *ParseError) Is(err error) bool

type Section

type Section struct {
	Title    string
	Subtitle string
	Action   string
	Fields   []Field
}

type Theme

type Theme struct {
	Primary string
	Link    string
	Info    string
	Success string
	Warning string
	Danger  string
	Dark    string
	Text    string
}

type UpdateReceiver

type UpdateReceiver interface {
	Updated(parent any, n Notifier) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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