Documentation
¶
Index ¶
- func NewSessionPostgresqlRepository(db *sql.DB) category.Repository
- type PostgresqlRepository
- func (r *PostgresqlRepository) GetBordersOfBranch(categoryId uint64) (uint64, uint64, error)
- func (r *PostgresqlRepository) GetCategoriesByLevel(level uint64) ([]*models.CategoriesCatalog, error)
- func (r *PostgresqlRepository) GetNextLevelCategories(categoryId uint64) ([]*models.CategoriesCatalog, error)
- func (r *PostgresqlRepository) GetPathToCategory(categoryId uint64) ([]*models.CategoriesCatalog, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionPostgresqlRepository ¶
func NewSessionPostgresqlRepository(db *sql.DB) category.Repository
Types ¶
type PostgresqlRepository ¶
type PostgresqlRepository struct {
// contains filtered or unexported fields
}
func (*PostgresqlRepository) GetBordersOfBranch ¶
func (r *PostgresqlRepository) GetBordersOfBranch(categoryId uint64) (uint64, uint64, error)
Get left and right border of branch
func (*PostgresqlRepository) GetCategoriesByLevel ¶
func (r *PostgresqlRepository) GetCategoriesByLevel(level uint64) ([]*models.CategoriesCatalog, error)
Get categories in select level
func (*PostgresqlRepository) GetNextLevelCategories ¶
func (r *PostgresqlRepository) GetNextLevelCategories(categoryId uint64) ([]*models.CategoriesCatalog, error)
Get lower level in categories tree
func (*PostgresqlRepository) GetPathToCategory ¶
func (r *PostgresqlRepository) GetPathToCategory(categoryId uint64) ([]*models.CategoriesCatalog, error)
Get path from root to category
Click to show internal directories.
Click to hide internal directories.