Documentation ¶
Index ¶
Constants ¶
View Source
const ( EmailPass = "Email" DBHost = "Host" DBUsername = "User" DBPass = "Pass" DBPort = "Port" Development = "Development" WebAdminUser = "WebAdminUser" WebAdminPass = "WebAdminPass" RecaptchaSecret = "RecaptchaSecret" CSRFSecret = "CSRFSecret" )
ToDo: This is probably complex enough to warrant a file now...
View Source
const ( InsertRSVP = `INSERT INTO rsvp (content, ctime) VALUES (?, ?)` GetAllRSVPs = `SELECT id, content, ctime FROM rsvp` DeleteRSVP = `DELETE FROM rsvp where id = ?` )
View Source
const ( None = DinnerType(iota) BeefShortRib HoneySalmon Vegetarian Vegan )
ToDo - the dinners should probably be in their own DB table...but this will do
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBClient ¶
func (*DBClient) CheckConnection ¶
type DinnerType ¶
type DinnerType int
func (DinnerType) IsValid ¶
func (d DinnerType) IsValid(isAttending bool) bool
func (DinnerType) ToString ¶
func (d DinnerType) ToString() string
type PlusOne ¶
type PlusOne struct { Name string `json:"name"` DinnerChoice DinnerType `json:"dinner_choice"` IsAttending bool `json:"is_attending"` }
type RSVP ¶
type RSVP struct { Id int `json:"id"` Name string `json:"name"` Email string `json:"email"` IsAttending bool `json:"is_attending"` DinnerChoice DinnerType `json:"dinner_choice"` Comments string `json:"comments,omitempty"` Guests []*PlusOne `json:"guests,omitempty"` WantsAccomm bool `json:"accommodations"` }
func (*RSVP) BothAttending ¶
type RSVPProvider ¶
type RSVPProvider struct {
// contains filtered or unexported fields
}
func NewRSVPProvider ¶
func NewRSVPProvider(client *DBClient) *RSVPProvider
Click to show internal directories.
Click to hide internal directories.