Documentation
¶
Index ¶
- Constants
- Variables
- func TestRoute(param TestRouteParam) *httptest.ResponseRecorder
- type Component
- type Ctx
- type Export
- type Factory
- type Flash
- type Generator
- type Handler
- type Intercept
- type Lang
- type LayoutManager
- type MandatoryComponent
- type Map
- type Message
- type Mirage
- 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
Constants ¶
View Source
const ( FlashSuccess = "success" FlashWarning = "warning" FlashError = "error" )
View Source
const ( Action = "action" Main = "main" )
View Source
const (
Version = "0.1.9"
)
Variables ¶
Functions ¶
func TestRoute ¶
func TestRoute(param TestRouteParam) *httptest.ResponseRecorder
Types ¶
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) *quirk.DB Email() mailer.Mailer Export() Export Files() filesystem.Client Flash() Flash Generate() Generator Lang() Lang Page() Page Parse() parser.Parse Request() Request Response() Response State() State Translate(key string, args ...map[string]any) string }
func TestCtx ¶
func TestCtx(param TestCtxParam) Ctx
type LayoutManager ¶
type LayoutManager interface {
Add(name string, layout layoutFactory) LayoutManager
}
type MandatoryComponent ¶
type Mirage ¶
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 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 ¶
Click to show internal directories.
Click to hide internal directories.