controllers

package
v0.0.0-...-efb64b0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DistDir string

Functions

func AddHeaders

func AddHeaders(resp http.ResponseWriter)

func GetAnnouncements

func GetAnnouncements(ctx *macaron.Context, logger *log.Logger)

func GetStatusz

func GetStatusz(ctx *macaron.Context)

func ServePage

func ServePage(ctx *macaron.Context)

Types

type Announcement

type Announcement struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	URL     string `json:"url"`
}

type AnnouncementView

type AnnouncementView struct {
	First  Announcement `json:"first"`
	Second Announcement `json:"second"`
}

type Category

type Category struct {
	TopicList TopicList `json:"topic_list"`
}

type Post

type Post struct {
	Cooked string `json:"cooked"`
}

type PostStream

type PostStream struct {
	Posts []Post `json:"posts"`
}

type Topic

type Topic struct {
	ID        int    `json:"id"`
	Title     string `json:"title"`
	Slug      string `json:"slug"`
	Archetype string `json:"archetype"`
}

type TopicList

type TopicList struct {
	Topics []Topic `json:"topics"`
}

func (*TopicList) GetRegularTopics

func (t *TopicList) GetRegularTopics() []Topic

type TopicResponse

type TopicResponse struct {
	PostStream PostStream `json:"post_stream"`
}

Jump to

Keyboard shortcuts

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