Documentation
¶
Index ¶
- Constants
- func CurrentPath(r *http.Request) string
- func Path(root string, id string, suffixes ...string) string
- func Url(root string, id string, suffixes ...string) string
- type BranchType
- type ErrorPageType
- type Flash
- type FlashCollection
- func (f *FlashCollection) Add(msg string, ugency Urgency, expiry int)
- func (f *FlashCollection) Clear(w http.ResponseWriter)
- func (f *FlashCollection) Decode(encoded string) error
- func (f *FlashCollection) Encode() ([]byte, error)
- func (f *FlashCollection) Error(msg string)
- func (f *FlashCollection) Info(msg string)
- func (f *FlashCollection) Save(w http.ResponseWriter) error
- func (f *FlashCollection) Success(msg string)
- func (f *FlashCollection) Warning(msg string)
- type Handler
- type Layout
- type PathType
- func (r *PathType) Delete(handler Handler) *PathType
- func (r *PathType) Get(handler Handler) *PathType
- func (r *PathType) Handle(method string, handler Handler) *PathType
- func (r *PathType) Map(route PathType) *PathType
- func (r *PathType) Patch(handler Handler) *PathType
- func (r *PathType) Post(handler Handler) *PathType
- func (r *PathType) Put(handler Handler) *PathType
- type ResponseStruct
- func (r *ResponseStruct) Back() *ResponseStruct
- func (r *ResponseStruct) Content(content ...fido.Element) *ResponseStruct
- func (r *ResponseStruct) Err() error
- func (r *ResponseStruct) ErrDetail() string
- func (r *ResponseStruct) ErrPublic() string
- func (r *ResponseStruct) Error(err error) *ResponseStruct
- func (r *ResponseStruct) GetContent() []fido.Element
- func (r *ResponseStruct) Header(key, value string) *ResponseStruct
- func (r *ResponseStruct) Info(msg string) *ResponseStruct
- func (r *ResponseStruct) PushUrl(url string) *ResponseStruct
- func (r *ResponseStruct) Redirect(url string) *ResponseStruct
- func (r *ResponseStruct) ReplaceUrl(url string) *ResponseStruct
- func (r *ResponseStruct) Success(msg string) *ResponseStruct
- func (r *ResponseStruct) Warning(msg string) *ResponseStruct
- func (r *ResponseStruct) Wrap(msg string) *ResponseStruct
- type ResponseType
- type Router
- type Urgency
Constants ¶
View Source
const FlashCookieName = "flash"
Variables ¶
This section is empty.
Functions ¶
func CurrentPath ¶
Types ¶
type ErrorPageType ¶
type ErrorPageType func(err ResponseType) fido.Element
type FlashCollection ¶
type FlashCollection []Flash
func GetFlash ¶
func GetFlash(w http.ResponseWriter, r *http.Request) (*FlashCollection, error)
func NewFlash ¶
func NewFlash() *FlashCollection
func (*FlashCollection) Clear ¶
func (f *FlashCollection) Clear(w http.ResponseWriter)
func (*FlashCollection) Decode ¶
func (f *FlashCollection) Decode(encoded string) error
Decode the flash struct from base64 from a cookie
func (*FlashCollection) Encode ¶
func (f *FlashCollection) Encode() ([]byte, error)
Encode the flash struct to base64 to store in a cookie
func (*FlashCollection) Error ¶
func (f *FlashCollection) Error(msg string)
func (*FlashCollection) Info ¶
func (f *FlashCollection) Info(msg string)
func (*FlashCollection) Save ¶
func (f *FlashCollection) Save(w http.ResponseWriter) error
func (*FlashCollection) Success ¶
func (f *FlashCollection) Success(msg string)
func (*FlashCollection) Warning ¶
func (f *FlashCollection) Warning(msg string)
type Handler ¶
type Handler func(http.ResponseWriter, *http.Request) ResponseType
type ResponseStruct ¶
type ResponseStruct struct {
// contains filtered or unexported fields
}
func Response ¶
func Response() *ResponseStruct
func (*ResponseStruct) Back ¶
func (r *ResponseStruct) Back() *ResponseStruct
func (*ResponseStruct) Content ¶
func (r *ResponseStruct) Content(content ...fido.Element) *ResponseStruct
func (*ResponseStruct) Err ¶
func (r *ResponseStruct) Err() error
func (*ResponseStruct) ErrDetail ¶
func (r *ResponseStruct) ErrDetail() string
func (*ResponseStruct) ErrPublic ¶
func (r *ResponseStruct) ErrPublic() string
func (*ResponseStruct) Error ¶
func (r *ResponseStruct) Error(err error) *ResponseStruct
func (*ResponseStruct) GetContent ¶
func (r *ResponseStruct) GetContent() []fido.Element
func (*ResponseStruct) Header ¶
func (r *ResponseStruct) Header(key, value string) *ResponseStruct
func (*ResponseStruct) Info ¶
func (r *ResponseStruct) Info(msg string) *ResponseStruct
func (*ResponseStruct) PushUrl ¶
func (r *ResponseStruct) PushUrl(url string) *ResponseStruct
func (*ResponseStruct) Redirect ¶
func (r *ResponseStruct) Redirect(url string) *ResponseStruct
func (*ResponseStruct) ReplaceUrl ¶
func (r *ResponseStruct) ReplaceUrl(url string) *ResponseStruct
func (*ResponseStruct) Success ¶
func (r *ResponseStruct) Success(msg string) *ResponseStruct
func (*ResponseStruct) Warning ¶
func (r *ResponseStruct) Warning(msg string) *ResponseStruct
func (*ResponseStruct) Wrap ¶
func (r *ResponseStruct) Wrap(msg string) *ResponseStruct
Error(err).WrapErr("This dog has wandered off.")
type ResponseType ¶
type ResponseType interface {
Error(err error) *ResponseStruct
Content(content ...fido.Element) *ResponseStruct
Success(msg string) *ResponseStruct
Header(key, value string) *ResponseStruct
Warning(msg string) *ResponseStruct
Info(msg string) *ResponseStruct
Redirect(url string) *ResponseStruct
PushUrl(url string) *ResponseStruct
Back() *ResponseStruct
ReplaceUrl(url string) *ResponseStruct
Err() error
ErrPublic() string
ErrDetail() string
GetContent() []fido.Element
Wrap(msg string) *ResponseStruct
}
func Back ¶
func Back() ResponseType
func Content ¶
func Content(content ...fido.Element) ResponseType
func Error ¶
func Error(err error) ResponseType
func Redirect ¶
func Redirect(url string) ResponseType
func Success ¶
func Success(msg string) ResponseType
Click to show internal directories.
Click to hide internal directories.