Documentation ¶
Index ¶
- type DB
- func (db *DB) Create(ctx context.Context, article *articles.Article) error
- func (db *DB) Delete(ctx context.Context, id string, userID string) error
- func (db *DB) Get(ctx context.Context, id string, userID string) (*articles.Article, error)
- func (db *DB) GetByUserIDUrl(ctx context.Context, userID string, url string) (*articles.Article, error)
- func (db *DB) List(ctx context.Context, request *articles.ListArticlesRequest) ([]*articles.Article, error)
- func (db *DB) Update(ctx context.Context, article *articles.Article, userID string) 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
}
DB allows to acccess articles db.
func (*DB) GetByUserIDUrl ¶
func (db *DB) GetByUserIDUrl(ctx context.Context, userID string, url string) (*articles.Article, error)
GetByUserIDUrl returns article by userId and sha256 sum.
Click to show internal directories.
Click to hide internal directories.