Documentation
¶
Index ¶
- type Question
- type Storage
- func (s *Storage) AllQuestions() (questions []*Question, err error)
- func (s *Storage) AutoUpgrade() error
- func (s *Storage) Close()
- func (s *Storage) FindQuestion(id int) (*Question, error)
- func (s *Storage) InsertQuestion(title, query, dataSource string) (*Question, error)
- func (s *Storage) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Question ¶
type Question struct {
ID int `json:"id"`
Title string `json:"title,omitempty"`
Query string `json:"query,omitempty"`
DataSource string `json:"dataSource,omitempty"`
}
Question stores q&a
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a struct for deloominator own database
func NewStorage ¶
NewStorage initializes deloominator own storage using source
func (*Storage) AllQuestions ¶
func (*Storage) AutoUpgrade ¶
AutoUpgrade migrates the DB if needed
func (*Storage) InsertQuestion ¶
Click to show internal directories.
Click to hide internal directories.