Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is an interface for interacting with a storage layer
func (*Storage) CreateMessage ¶
CreateMessage inserts a message into the DB
func (*Storage) CreateTopic ¶
CreateTopic inserts a new topic into the DB
func (*Storage) GetRecentTopics ¶
GetRecentTopics returns a list of the 50 most recently posted-on topics
type TopicalStore ¶
type TopicalStore interface { GetTopic(id int) (*models.Topic, error) GetRecentTopics() ([]models.Topic, error) CreateMessage(m *models.Message) (*models.Message, error) CreateTopic(title string) (*models.Topic, error) }
TopicalStore implements an CRUD action interface for topics/messages
Click to show internal directories.
Click to hide internal directories.