Documentation
¶
Index ¶
- Constants
- Variables
- func TestRoute(param TestRouteParam) *httptest.ResponseRecorder
- type Component
- type Ctx
- type Dev
- type Export
- type Factory
- type Flash
- type Generator
- type Handler
- type Hiro
- type Interaction
- func (i *Interaction) Action(action string, args ...Map) *Interaction
- func (i *Interaction) Append(target string) *Interaction
- func (i *Interaction) Delete(target string) *Interaction
- func (i *Interaction) Node() gox.Node
- func (i *Interaction) Prepend(target string) *Interaction
- func (i *Interaction) Replace(target string) *Interaction
- func (i *Interaction) With(values Map) *Interaction
- type Intercept
- type Lang
- type LayoutManager
- type MandatoryComponent
- type Map
- type Message
- type Page
- type PageGetter
- type PageSetter
- type Plugin
- type Request
- type RequestIs
- type Response
- type Route
- type RouteConfig
- type Router
- type Slice
- type State
- type TestCtxParam
- type TestRouteParam
- type Ws
Constants ¶
View Source
const ( FlashSuccess = "success" FlashWarning = "warning" FlashError = "error" )
View Source
const ( Action = "action" Main = "main" )
View Source
const (
Version = "0.2.3"
)
Variables ¶
Functions ¶
func TestRoute ¶
func TestRoute(param TestRouteParam) *httptest.ResponseRecorder
Types ¶
type Component ¶
type Component struct {
Ctx `json:"-"`
}
func (Component) On ¶ added in v0.1.4
func (c Component) On(trigger string) *Interaction
type Ctx ¶
type Ctx interface {
Auth(dbname ...string) auth.Manager
Cache() cache.Client
Config() config.Config
Continue() error
Cookie() cookie.Cookie
Create() Factory
Csrf() csrf.Csrf
DB(dbname ...string) *esquel.DB
Dev() Dev
Email() mailer.Mailer
Export() Export
Files() filesystem.Client
Flash() Flash
Generate() Generator
Lang() Lang
Log() logger.Log
Page() Page
Parse() parser.Parse
Request() Request
Response() Response
State() State
Translate(key string, args ...map[string]any) string
Ws(name string) *Ws
}
func TestCtx ¶
func TestCtx(param TestCtxParam) Ctx
type Hiro ¶ added in v0.1.1
type Interaction ¶ added in v0.1.4
type Interaction struct {
// contains filtered or unexported fields
}
func (*Interaction) Action ¶ added in v0.1.4
func (i *Interaction) Action(action string, args ...Map) *Interaction
func (*Interaction) Append ¶ added in v0.1.4
func (i *Interaction) Append(target string) *Interaction
func (*Interaction) Delete ¶ added in v0.1.4
func (i *Interaction) Delete(target string) *Interaction
func (*Interaction) Node ¶ added in v0.1.4
func (i *Interaction) Node() gox.Node
func (*Interaction) Prepend ¶ added in v0.1.4
func (i *Interaction) Prepend(target string) *Interaction
func (*Interaction) Replace ¶ added in v0.1.4
func (i *Interaction) Replace(target string) *Interaction
func (*Interaction) With ¶ added in v0.1.4
func (i *Interaction) With(values Map) *Interaction
type LayoutManager ¶
type LayoutManager interface {
Add(name string, layout layoutFactory) LayoutManager
}
type MandatoryComponent ¶
type Page ¶
type Page interface {
Get() PageGetter
Set() PageSetter
}
type PageGetter ¶
type PageSetter ¶
type PageSetter interface {
Title(title string) PageSetter
Description(description string) PageSetter
Keywords(keywords ...string) PageSetter
Meta(name, content string) PageSetter
}
type Request ¶
type Request interface {
Action() string
ContentType() string
Form() url.Values
Header() http.Header
Host() string
Ip() string
Is() RequestIs
Method() string
Name() string
Origin() string
Parsed() Map
Path() string
PathValue(key string, defaultValue ...string) string
QueryParam(key string, defaultValue ...string) string
QueryMap() Map
PathMap() Map
Protocol() string
Raw() *http.Request
UserAgent() string
}
type RouteConfig ¶
func Layout ¶
func Layout(name string) RouteConfig
func Method ¶
func Method(method ...string) RouteConfig
func Name ¶
func Name(name string) RouteConfig
type TestCtxParam ¶
type TestRouteParam ¶
type Ws ¶ added in v0.2.1
type Ws struct {
// contains filtered or unexported fields
}
func (*Ws) MustBroadcast ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.