Documentation ¶
Index ¶
- func NewPostgresDB(cfg Config) (*sqlx.DB, error)
- type AuthPostgres
- type Authorization
- type CategPostgres
- func (r *CategPostgres) Create(category repoModel.Category) (uuid.UUID, error)
- func (r *CategPostgres) DeleteById(userId, categoryId uuid.UUID) error
- func (r *CategPostgres) GetAll(userId uuid.UUID) ([]repoModel.Category, error)
- func (r *CategPostgres) GetById(userId, categoryId uuid.UUID) (repoModel.Category, error)
- func (r *CategPostgres) Update(categoryUpdate repoModel.Category) error
- type Category
- type Config
- type Link
- type LinkPostgres
- func (r LinkPostgres) Create(link repoModel.Link, categories []uuid.UUID) (uuid.UUID, error)
- func (r LinkPostgres) DeleteById(userId, linkId uuid.UUID) error
- func (r LinkPostgres) GetAll(userId uuid.UUID) ([]repoModel.Link, error)
- func (r LinkPostgres) GetById(userId, linkId uuid.UUID) (repoModel.Link, error)
- func (r LinkPostgres) Update(linkUpdate repoModel.Link, categories []uuid.UUID) error
- type Repository
- type StatPostgres
- type Statistic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthPostgres ¶
type AuthPostgres struct {
// contains filtered or unexported fields
}
func NewAuthPostgres ¶
func NewAuthPostgres(db *sqlx.DB) *AuthPostgres
func (*AuthPostgres) CreateUser ¶
func (*AuthPostgres) DeleteAccount ¶
func (r *AuthPostgres) DeleteAccount(userId uuid.UUID) error
type Authorization ¶
type CategPostgres ¶
type CategPostgres struct {
// contains filtered or unexported fields
}
func NewCategPostgres ¶
func NewCategPostgres(db *sqlx.DB) *CategPostgres
func (*CategPostgres) DeleteById ¶
func (r *CategPostgres) DeleteById(userId, categoryId uuid.UUID) error
type Link ¶
type Link interface { Create(link repoModel.Link, categories []uuid.UUID) (uuid.UUID, error) GetAll(userId uuid.UUID) ([]repoModel.Link, error) GetById(userId, linkId uuid.UUID) (repoModel.Link, error) DeleteById(userId, linkId uuid.UUID) error Update(link repoModel.Link, categories []uuid.UUID) error }
type LinkPostgres ¶
type LinkPostgres struct {
// contains filtered or unexported fields
}
func NewLinkPostgres ¶
func NewLinkPostgres(db *sqlx.DB) *LinkPostgres
func (LinkPostgres) DeleteById ¶
func (r LinkPostgres) DeleteById(userId, linkId uuid.UUID) error
type Repository ¶
type Repository struct { Authorization Link Category Statistic }
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
type StatPostgres ¶
type StatPostgres struct {
// contains filtered or unexported fields
}
func NewStatPostgres ¶
func NewStatPostgres(db *sqlx.DB) *StatPostgres
Source Files ¶
Click to show internal directories.
Click to hide internal directories.