Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerTemplate ¶
type ControllerTemplate interface { Init() error SelectPosts() ([]Post, error) SelectPostReactions(postId int) ([]Reaction, error) SelectLatestTimestamp() (time.Time, error) SelectCandidateHashes() ([5]string, error) SelectPostReactionHashes(postId int) ([5]string, error) SelectDescriptors(postId int) (string, error) SelectAnonReactionCount(postId int) (int, error) InsertPost(post Post) error InsertReaction(reaction Reaction) error InsertHash(hash string) error Clear() bool }
A template for an object that performs database interactions
type HtmlPostContainer ¶
type HtmlPostContainer struct {
HtmlPosts []PostHtmlContent
}
Contains above data needed for HTML content structure
type HtmlReactionContainer ¶
type HtmlReactionContainer struct {
Descriptors []string
}
Contains above data needed for HTML content structure
type Post ¶
type Post struct { Id int `json:"id"` Title string `json:"title"` Author string `json:"author"` Contents string `json:"contents"` Tag int `json:"tag"` Descriptors string `json:"descriptors"` Time time.Time `json:"time"` Hash string `json:"hash,omitempty"` Reactions []Reaction `json:"reactions,omitempty"` }
Represents a post convertible to pretty JSON
Click to show internal directories.
Click to hide internal directories.