Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
Db is our database struct used for interacting with the database.
func (*Db) DestroyMessageByUUID ¶
DestroyMessageByUUID rakes a uuid and attempts to destroy the associated record.
func (*Db) DestroyStaleMessages ¶
DestroyStaleMessages finds all messages older than 30 days and destroys them
func (*Db) GetMessageByUUID ¶
GetMessageByUUID finds a message by it's UUID or returns an error.
func (*Db) PostMessage ¶
PostMessage takes a uuid and a message & inserts a new record into the db.
type Message ¶
type Message struct { ID int `json:"id"` UUID string `json:"uuid"` Message string `json:"message"` Email string `json:"email"` ReferenceName string `json:"reference_name"` Password string `json:"password"` CreatedAt string `json:"created_at"` }
Message represents a record from our "messages" column in the database.
Click to show internal directories.
Click to hide internal directories.