Documentation ¶
Index ¶
Constants ¶
View Source
const ( Pending = "pending" Answered = "answered" Deleted = "deleted" )
Status options.
Variables ¶
View Source
var DB *gorm.DB
DB is a reference to the parent app's gorm DB.
Functions ¶
Types ¶
type Question ¶
type Question struct { ID int `json:"id"` Name string `json:"name"` Email string `json:"email"` Question string `json:"question"` Status Status `json:"status"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
Question is a question asked of the blog owner.
func AllQuestions ¶
AllQuestions returns all the Questions.
func NewQuestion ¶
func NewQuestion() *Question
NewQuestion creates a blank Question with sensible defaults.
func PendingQuestions ¶
PendingQuestions returns pending questions in order of recency.
Click to show internal directories.
Click to hide internal directories.