Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllLinks ¶
GetAllLinks returns all links in database
Types ¶
type CategoryRepository ¶
type CategoryRepository struct {
// contains filtered or unexported fields
}
CategoryRepository provides access to category table
func NewCategoryRepository ¶
func NewCategoryRepository() *CategoryRepository
NewCategoryRepository returns instance of CategoryRepository
func (*CategoryRepository) CreateCategory ¶
func (cr *CategoryRepository) CreateCategory(category models.LinkCategory) (*models.LinkCategory, error)
CreateCategory creates Link category in Firebase
func (*CategoryRepository) GetAllActive ¶
func (cr *CategoryRepository) GetAllActive() ([]models.LinkCategory, error)
GetAllActive returns list of categories for links
type LinkRepository ¶
type LinkRepository struct {
// contains filtered or unexported fields
}
LinkRepository provides acces to Link repository as class
func NewLinkRepository ¶
func NewLinkRepository() *LinkRepository
func (*LinkRepository) GetLink ¶
func (lr *LinkRepository) GetLink(linkID string) (link models.Link, err error)
GetLink returns Link by LinkId
func (*LinkRepository) GetUserLinks ¶
func (lr *LinkRepository) GetUserLinks(userID string) (links []models.Link, err error)
GetUserLinks returns all links which belongs to user
func (*LinkRepository) SetLinkCategory ¶
func (lr *LinkRepository) SetLinkCategory(linkID, categoryID string) error
SetLinkCategory sets LinkCategory for existing link
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository provides access to User table as object
func NewUserRepository ¶
func NewUserRepository() *UserRepository
NewUserRepository returns instance of UserRepository
func (*UserRepository) GetAllUsers ¶
func (ur *UserRepository) GetAllUsers() ([]models.User, error)
GetAllUsers returns list of all users from database
Click to show internal directories.
Click to hide internal directories.