Documentation ¶
Index ¶
- type AuthRepository
- func (a AuthRepository) CheckSession(sessionId string, login string, token *models.Token) bool
- func (a AuthRepository) CreateSession(email string) *models.Session
- func (a AuthRepository) GetFacebookUrl() (string, error)
- func (a AuthRepository) GetToken(sessionId string) (*models.Token, error)
- func (a AuthRepository) ProcessFacebookCallback(rawurl string) (*common.Credentials, error)
- func (a AuthRepository) SaveSession(session *models.Session) error
- type CategoryCheckResult
- type CategoryRepository
- func (r CategoryRepository) CheckForUsedCategory(id int) (CategoryCheckResult, error)
- func (r CategoryRepository) Create(e *models.Category) (int, error)
- func (r CategoryRepository) Delete(id int) (*CategoryCheckResult, error)
- func (r CategoryRepository) GetById(id int) (*models.Category, error)
- func (r CategoryRepository) GetByParentId(catid int) ([]*models.Category, error)
- func (r CategoryRepository) GetCategoriesByIdList(ids []int64) ([]models.Category, error)
- func (CategoryRepository) GetEntriesByCategoryId(catid int) ([]*models.Entry, error)
- func (r CategoryRepository) List() ([]*models.Category, error)
- func (r CategoryRepository) Update(e *models.Category) error
- func (r CategoryRepository) ValidateCategory(category *models.Category) (bool, error)
- type CategoryValidator
- type EntryRepository
- func (r EntryRepository) Create(e *models.Entry) (int, error)
- func (r EntryRepository) Delete(id int) error
- func (r EntryRepository) GetById(id int) (*models.Entry, error)
- func (r EntryRepository) GetByMedlineId(id string) (*models.Entry, error)
- func (r EntryRepository) GetEntryCategories(id int) ([]int64, error)
- func (r EntryRepository) GetEntryTypeById(id int) (*models.EntryType, error)
- func (r EntryRepository) InsertEntryCategory(entryId int, categoryId int) error
- func (r EntryRepository) List(start int, stop int) (*[]models.Entry, error)
- func (r EntryRepository) Update(e *models.Entry) error
- func (r EntryRepository) ValidateEntry(e *models.Entry) error
- type EntryTypeRepository
- func (r EntryTypeRepository) Create(e *models.EntryType) (int, error)
- func (r EntryTypeRepository) Delete(id int) error
- func (r EntryTypeRepository) GetById(id int) (*models.EntryType, error)
- func (r EntryTypeRepository) List() ([]*models.EntryType, error)
- func (r EntryTypeRepository) Update(e *models.EntryType) error
- type EntryValidator
- type Repository
- type SearchRepository
- func (s SearchRepository) ExecuteSearch(query *models.SearchQuery) ([]models.Entry, int, error)
- func (s SearchRepository) ProcessFacets(results *models.SearchResults) (*models.SearchResults, error)
- func (s SearchRepository) ProcessInput(query *models.SearchQuery) (*models.SearchQuery, error)
- func (s SearchRepository) ProcessResultsNavigation(query *models.SearchQuery, results []models.Entry, total int) (*models.SearchResults, error)
- func (s SearchRepository) Search(query *models.SearchQuery) (*models.SearchResults, error)
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepository ¶
type AuthRepository struct {
Repository
}
func MakeAuthRepository ¶
func MakeAuthRepository(db *sql.DB) AuthRepository
func (AuthRepository) CheckSession ¶
func (AuthRepository) CreateSession ¶
func (a AuthRepository) CreateSession(email string) *models.Session
func (AuthRepository) GetFacebookUrl ¶
func (a AuthRepository) GetFacebookUrl() (string, error)
func (AuthRepository) GetToken ¶
func (a AuthRepository) GetToken(sessionId string) (*models.Token, error)
func (AuthRepository) ProcessFacebookCallback ¶
func (a AuthRepository) ProcessFacebookCallback(rawurl string) (*common.Credentials, error)
func (AuthRepository) SaveSession ¶
func (a AuthRepository) SaveSession(session *models.Session) error
type CategoryCheckResult ¶
type CategoryRepository ¶
type CategoryRepository struct { Validator CategoryValidator Repository }
func MakeCategoryRepository ¶
func MakeCategoryRepository(validator CategoryValidator, db *sql.DB) CategoryRepository
func (CategoryRepository) CheckForUsedCategory ¶
func (r CategoryRepository) CheckForUsedCategory(id int) (CategoryCheckResult, error)
func (CategoryRepository) Create ¶
func (r CategoryRepository) Create(e *models.Category) (int, error)
func (CategoryRepository) Delete ¶
func (r CategoryRepository) Delete(id int) (*CategoryCheckResult, error)
func (CategoryRepository) GetById ¶
func (r CategoryRepository) GetById(id int) (*models.Category, error)
func (CategoryRepository) GetByParentId ¶
func (r CategoryRepository) GetByParentId(catid int) ([]*models.Category, error)
get categories by parentID
func (CategoryRepository) GetCategoriesByIdList ¶
func (r CategoryRepository) GetCategoriesByIdList(ids []int64) ([]models.Category, error)
func (CategoryRepository) GetEntriesByCategoryId ¶
func (CategoryRepository) GetEntriesByCategoryId(catid int) ([]*models.Entry, error)
get entries from some category
func (CategoryRepository) ValidateCategory ¶
func (r CategoryRepository) ValidateCategory(category *models.Category) (bool, error)
Verifica se a categoria é valida ou não.
type CategoryValidator ¶
type EntryRepository ¶
type EntryRepository struct { Validator EntryValidator Repository }
func MakeEntryRepository ¶
func MakeEntryRepository(v EntryValidator) EntryRepository
func (EntryRepository) Delete ¶
func (r EntryRepository) Delete(id int) error
func (EntryRepository) GetByMedlineId ¶
func (r EntryRepository) GetByMedlineId(id string) (*models.Entry, error)
func (EntryRepository) GetEntryCategories ¶
func (r EntryRepository) GetEntryCategories(id int) ([]int64, error)
func (EntryRepository) GetEntryTypeById ¶
func (r EntryRepository) GetEntryTypeById(id int) (*models.EntryType, error)
func (EntryRepository) InsertEntryCategory ¶
func (r EntryRepository) InsertEntryCategory(entryId int, categoryId int) error
func (EntryRepository) ValidateEntry ¶
func (r EntryRepository) ValidateEntry(e *models.Entry) error
type EntryTypeRepository ¶
type EntryTypeRepository struct {
Repository
}
func MakeEntryTypeRepository ¶
func MakeEntryTypeRepository(db *sql.DB) EntryTypeRepository
func (EntryTypeRepository) Create ¶
func (r EntryTypeRepository) Create(e *models.EntryType) (int, error)
func (EntryTypeRepository) Delete ¶
func (r EntryTypeRepository) Delete(id int) error
type EntryValidator ¶
type Repository ¶
type SearchRepository ¶
type SearchRepository struct {
Repository
}
func MakeSearchRepository ¶
func MakeSearchRepository() SearchRepository
func (SearchRepository) ExecuteSearch ¶
func (s SearchRepository) ExecuteSearch(query *models.SearchQuery) ([]models.Entry, int, error)
func (SearchRepository) ProcessFacets ¶
func (s SearchRepository) ProcessFacets(results *models.SearchResults) (*models.SearchResults, error)
func (SearchRepository) ProcessInput ¶
func (s SearchRepository) ProcessInput(query *models.SearchQuery) (*models.SearchQuery, error)
func (SearchRepository) ProcessResultsNavigation ¶
func (s SearchRepository) ProcessResultsNavigation(query *models.SearchQuery, results []models.Entry, total int) (*models.SearchResults, error)
func (SearchRepository) Search ¶
func (s SearchRepository) Search(query *models.SearchQuery) (*models.SearchResults, error)
type UserRepository ¶
type UserRepository struct {
Repository
}
Click to show internal directories.
Click to hide internal directories.