Documentation ¶
Overview ¶
database driver
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { ThreadByMessageID(msgid string) (*model.Thread, error) ThreadByHash(hash string) (*model.Thread, error) BoardPage(newsgroup string, pageno, perpage int) (*model.BoardPage, error) }
func NewDBFromConfig ¶
func NewDBFromConfig(c *config.DatabaseConfig) (db Database, err error)
get new database connector from configuration
type PostgresDB ¶
type PostgresDB struct { }
func (*PostgresDB) ThreadByHash ¶
func (db *PostgresDB) ThreadByHash(hash string) (thread *model.Thread, err error)
func (*PostgresDB) ThreadByMessageID ¶
func (db *PostgresDB) ThreadByMessageID(msgid string) (thread *model.Thread, err error)
Click to show internal directories.
Click to hide internal directories.