Documentation ¶ Index ¶ type DB func New(url string) (*DB, error) func (db *DB) AddComment(ctx context.Context, c storage.Comment) (int, error) func (db *DB) DeleteComment(ctx context.Context, commentID int) error func (db *DB) GetCommentsByArticleID(ctx context.Context, articleID int) ([]storage.Comment, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type DB ¶ type DB struct { // contains filtered or unexported fields } func New ¶ func New(url string) (*DB, error) func (*DB) AddComment ¶ func (db *DB) AddComment(ctx context.Context, c storage.Comment) (int, error) func (*DB) DeleteComment ¶ func (db *DB) DeleteComment(ctx context.Context, commentID int) error func (*DB) GetCommentsByArticleID ¶ func (db *DB) GetCommentsByArticleID(ctx context.Context, articleID int) ([]storage.Comment, error) Source Files ¶ View all Source files pg.go Click to show internal directories. Click to hide internal directories.