Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusInvited = "invited" StatusGoing = "going" StatusMaybe = "maybe" StatusNotGoing = "not going" )
RSVP status constants.
Variables ¶
View Source
var DB *gorm.DB
DB is a reference to the parent app's gorm DB.
Functions ¶
Types ¶
type Event ¶
type Event struct { ID int `json:"id"` Title string `json:"title"` Fragment string `json:"fragment"` Description string `json:"description"` Location string `json:"location"` CoverPhoto string `json:"coverPhoto"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` AllDay bool `json:"allDay"` OpenSignup bool `json:"openSignup"` RSVP []RSVP `json:"rsvp"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
Event holds information about events.
func LoadFragment ¶
LoadFragment loads an event by its URL fragment.
func (*Event) InviteContactID ¶
InviteContactID enters an invitation for a contact ID.
type RSVP ¶
type RSVP struct { // If the user was invited by an admin, they will have a ContactID and // not much else. Users who signed up themselves from an OpenSignup event // will have the metadata filled in instead. ID int `json:"id"` ContactID int `json:"contactId"` EventID int `json:"eventId"` Contact contacts.Contact `json:"-" gorm:"save_associations:false"` // rel table not serialized to JSON Status string `json:"status"` // invited, going, maybe, not going Notified bool `json:"notified"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` SMS string `json:"sms,omitempty"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
RSVP tracks invitations and confirmations to events.
Click to show internal directories.
Click to hide internal directories.