sitex

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: BSD-2-Clause Imports: 5 Imported by: 2

README

Sitex handlet implements a simple MVC Web application framework.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Table

func Table(name string, model any) *table

Types

type Model

type Model struct {
}

Model

type Pack_

type Pack_ struct {
	// Assocs
	Site     *Site    // associated site
	Request  Request  // current request
	Response Response // current response
	// contains filtered or unexported fields
}

Pack_

func (*Pack_) ForwardTo

func (p *Pack_) ForwardTo(target Target)

func (*Pack_) Init

func (p *Pack_) Init(site *Site, req Request, resp Response, method string, action string)

func (*Pack_) Render

func (p *Pack_) Render() error

func (*Pack_) Set

func (p *Pack_) Set(k string, v any)

type Site

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

Site

type Sitex

type Sitex struct {
	// Mixins
	Handlet_
	// contains filtered or unexported fields
}

Sitex handlet implements a simple MVC Web application framework.

func (*Sitex) App

func (h *Sitex) App() *App

func (*Sitex) Handle

func (h *Sitex) Handle(req Request, resp Response) (next bool)

func (*Sitex) OnConfigure

func (h *Sitex) OnConfigure()

func (*Sitex) OnCreate

func (h *Sitex) OnCreate(name string, stage *Stage, app *App)

func (*Sitex) OnPrepare

func (h *Sitex) OnPrepare()

func (*Sitex) OnShutdown

func (h *Sitex) OnShutdown()

func (*Sitex) RegisterSite

func (h *Sitex) RegisterSite(name string, pack any)

func (*Sitex) Stage

func (h *Sitex) Stage() *Stage

type Target

type Target struct {
	Site string            // front
	Path string            // /foo/bar
	Args map[string]string // a=b&c=d
}

Target

Jump to

Keyboard shortcuts

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