pages

package
v0.0.0-...-1bc63cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2019 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SinglePage

func SinglePage(w http.ResponseWriter, r *http.Request)

SinglePage returns a single page to the user. The type of page is 'semi-static' with a possibility to edit the data in the database but should be used for pages such as about etc.

Types

type PageData

type PageData struct {
	Title string
	Text  string
	Slug  string
}

PageData contains data for the single page.

func GetPage

func GetPage(db *sql.DB, slug string) (PageData, error)

GetPage gets a single page from the database by its slug.

type SinglePageData

type SinglePageData struct {
	Title string
	Paths []helpers.Path
	Page  PageData
}

SinglePageData contains data for a single page and general data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL