Documentation ¶
Index ¶
Constants ¶
View Source
const QueryGetAll = `` /* 126-byte string literal not displayed */
View Source
const QueryGetDetail = `
SELECT name, title, description
FROM categories
WHERE id=$1;`
View Source
const QueryInsert = `
INSERT INTO
categories(name, title, description)
VALUES($1, $2, $3)
RETURNING id;`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Repository ¶
type Repository interface { MigrateUp(context.Context) error MigrateDown(context.Context) error // insert a category Insert(context.Context, *models.Category) error // get category detail GetById(ctx context.Context, id uint64) (*models.Category, error) // search + pagination (no detail) GetAll(ctx context.Context, encryptedCursor, search string, limit int) ([]models.Category, string, error) }
Click to show internal directories.
Click to hide internal directories.