podcast

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: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Podcast

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

Podcast endpoints displays all podcast posts.

func Post

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

Post endpoints displays a single podcast post.

Types

type Page

type Page struct {
	Title string
	Paths []helpers.Path
	Posts []PostData
}

Page struct is used for the podcast page data being rendered and should not be used in other structs.

type PostData

type PostData struct {
	Title string
	Text  string
	File  string
	Slug  string
}

PostData contains data for an individual podcast post. To be compared to a blog post, but with an additional field for the file.

func GetPodcastPost

func GetPodcastPost(db *sql.DB, slug string) (PostData, error)

GetPodcastPost retrieves a single podcast post from the database by its slug and.

func GetPodcastPosts

func GetPodcastPosts(db *sql.DB) ([]PostData, error)

GetPodcastPosts returns all of the podcasts post from the database.

type PostPage

type PostPage struct {
	Title string
	Paths []helpers.Path
	Post  PostData
	// Is used for sidebar
	Posts []PostData
}

PostPage contains the data to render a single podcast post

Jump to

Keyboard shortcuts

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