Documentation
¶
Index ¶
- func Render[D any](w io.Writer, name string, data Model[D]) error
- func RenderErrorPage(w http.ResponseWriter, r *http.Request, err error)
- func SetFlashMessage(ctx context.Context, typ FlashMessageType, text string)
- type DocumentViewModel
- type ErrorPageErr
- type FlashMessage
- type FlashMessageType
- type Global
- type Model
- type Pagination
- type PaginationURL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderErrorPage ¶
func RenderErrorPage(w http.ResponseWriter, r *http.Request, err error)
func SetFlashMessage ¶ added in v0.3.0
func SetFlashMessage(ctx context.Context, typ FlashMessageType, text string)
Types ¶
type DocumentViewModel ¶
type ErrorPageErr ¶
func (ErrorPageErr) Error ¶ added in v0.3.0
func (err ErrorPageErr) Error() string
type FlashMessage ¶ added in v0.3.0
type FlashMessage struct {
Type FlashMessageType
Text string
}
type FlashMessageType ¶ added in v0.3.0
type FlashMessageType string
const ( FlashMessageSuccess FlashMessageType = "success" FlashMessageError FlashMessageType = "error" )
type Global ¶
type Pagination ¶ added in v0.4.0
func (*Pagination[Item]) NextPageURL ¶ added in v0.4.0
func (p *Pagination[Item]) NextPageURL() string
func (*Pagination[Item]) PageURL ¶ added in v0.4.0
func (p *Pagination[Item]) PageURL(n int) string
func (*Pagination[Item]) PaginationURLs ¶ added in v0.4.0
func (p *Pagination[Item]) PaginationURLs() []PaginationURL
func (*Pagination[Item]) PrevPageURL ¶ added in v0.4.0
func (p *Pagination[Item]) PrevPageURL() string
type PaginationURL ¶ added in v0.4.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.