Documentation ¶
Index ¶
- func ApproveMemory(c echo.Context) error
- func CreateMemory(c echo.Context) error
- func EditMemory(c echo.Context) error
- func GetAbout(c echo.Context) error
- func GetAddMemory(c echo.Context) error
- func GetEditMemory(c echo.Context) error
- func GetMemories(c echo.Context) error
- func GetMemory(c echo.Context) error
- func GetMemorySubmitted(c echo.Context) error
- func Index(c echo.Context) error
- func MarkDownBasic(args ...interface{}) template.HTML
- func Render(c echo.Context, templ string, data interface{}, err error) error
- func RenderContext(c echo.Context, templ string, ctx TemplateContext) error
- func RenderMessage(c echo.Context, status int, message string) error
- func Setup(e *echo.Echo, isDebug bool)
- type Template
- type TemplateContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveMemory ¶
ApproveMemory approves the Memory corresponding to the uuid parameter.
func CreateMemory ¶
CreateMemory creates a new Memory using values from a submitted form.
func EditMemory ¶
EditMemory updates the details of a previously saved memory.
func GetAddMemory ¶
GetAddMemory renders the create memory form.
func GetEditMemory ¶
GetEditMemory renders the memory form using the memory for the given uuid parameter.
func GetMemories ¶
GetMemories renders all approved memories.
func GetMemory ¶
GetMemory renders the memory details page for the corresponding memory id parameter.
func GetMemorySubmitted ¶
GetMemorySubmitted renders the memory submitted success page.
func MarkDownBasic ¶
MarkDownBasic passes the given data to the MarkdownBasic formatter.
func Render ¶
Render will render the given templ template passing in data if err is nil, or will render a 404 or 500 error page depending on the err.
func RenderContext ¶
func RenderContext(c echo.Context, templ string, ctx TemplateContext) error
RenderContext will render the given templ template passing in the ctx TemplateContext.
func RenderMessage ¶
RenderMessage displays message using the message.html template.
Types ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template represents the parsed templates from the "templates" directory.
type TemplateContext ¶
type TemplateContext struct { Data interface{} Err error }
A TemplateContext holds data and an error that are passed in to a template for rendering. Either Data or Err can be nil.