Documentation
¶
Index ¶
- type CategoriesDBMock
- func (cr *CategoriesDBMock) Create(userID uint64, category models.Category) (models.Category, error)
- func (cr *CategoriesDBMock) Delete(userID uint64, id interface{}) error
- func (cr *CategoriesDBMock) Get(userID uint64, id interface{}) (models.Category, error)
- func (cr *CategoriesDBMock) GetAll(userID uint64) ([]models.Category, error)
- func (cr *CategoriesDBMock) Summary(userID uint64) (models.CategoriesSummaryVM, error)
- func (cr *CategoriesDBMock) Update(userID uint64, category models.Category) (models.Category, error)
- type CommentsDBMock
- func (cm *CommentsDBMock) Create(userID uint64, comment models.Comment) (models.Comment, error)
- func (cm *CommentsDBMock) Delete(userID uint64, id interface{}) error
- func (cm *CommentsDBMock) Get(userID uint64, id interface{}) (models.Comment, error)
- func (cm *CommentsDBMock) GetAll(userID uint64, taskID interface{}) ([]models.Comment, error)
- func (cm *CommentsDBMock) Update(userID uint64, comment models.Comment) (models.Comment, error)
- type EmailMock
- func (e *EmailMock) SendPasswordResetConfirmation(c *gin.Context, user *models.User) error
- func (e *EmailMock) SendPasswordResetMessage(c *gin.Context, user *models.User) error
- func (e *EmailMock) SendUserActivationMessage(c *gin.Context, user *models.User) error
- func (e *EmailMock) SendUserRegistrationMessage(c *gin.Context, user *models.User) error
- type PagesDBMock
- func (pm *PagesDBMock) Create(page models.Page) (models.Page, error)
- func (pm *PagesDBMock) Delete(id interface{}) error
- func (pm *PagesDBMock) Get(id interface{}) (models.Page, error)
- func (pm *PagesDBMock) GetAll() ([]models.Page, error)
- func (pm *PagesDBMock) GetPagesForMenu() ([]models.Page, error)
- func (pm *PagesDBMock) Update(page models.Page) (models.Page, error)
- type ProjectsDBMock
- func (pr *ProjectsDBMock) Create(userID uint64, project models.Project) (models.Project, error)
- func (pr *ProjectsDBMock) Delete(userID uint64, id interface{}) error
- func (pr *ProjectsDBMock) Get(userID uint64, id interface{}) (models.Project, error)
- func (pr *ProjectsDBMock) GetAll(userID uint64) ([]models.Project, error)
- func (pr *ProjectsDBMock) GetAllFavorite(userID uint64) ([]models.Project, error)
- func (pr *ProjectsDBMock) GetEdit(userID uint64, id interface{}) (models.EditProjectVM, error)
- func (pr *ProjectsDBMock) GetNew(userID uint64) (models.EditProjectVM, error)
- func (pr *ProjectsDBMock) Summary(userID uint64) (models.ProjectsSummaryVM, error)
- func (pr *ProjectsDBMock) ToggleArchive(userID uint64, project models.Project) (models.Project, error)
- func (pr *ProjectsDBMock) ToggleFavorite(userID uint64, project models.Project) (models.Project, error)
- func (pr *ProjectsDBMock) Update(userID uint64, project models.Project) (models.Project, error)
- type ReportsDBMock
- type SessionsDBMock
- func (cr *SessionsDBMock) Create(userID uint64, session models.Session) (models.Session, error)
- func (cr *SessionsDBMock) Delete(userID uint64, id interface{}) error
- func (cr *SessionsDBMock) Get(userID uint64, id interface{}) (models.Session, error)
- func (cr *SessionsDBMock) GetAll(userID uint64) ([]models.Session, error)
- func (cr *SessionsDBMock) NewGet(userID uint64) (models.Session, error)
- func (cr *SessionsDBMock) Summary(userID uint64) (models.SessionsSummaryVM, error)
- type SettingsDBMock
- func (sm *SettingsDBMock) Create(setting models.Setting) (models.Setting, error)
- func (sm *SettingsDBMock) Delete(id interface{}) error
- func (sm *SettingsDBMock) Get(id interface{}) (models.Setting, error)
- func (sm *SettingsDBMock) GetAll() ([]models.Setting, error)
- func (sm *SettingsDBMock) Update(setting models.Setting) (models.Setting, error)
- type TaskLogsDBMock
- type TasksDBMock
- func (tm *TasksDBMock) Create(userID uint64, task models.Task) (models.Task, error)
- func (tm *TasksDBMock) Delete(userID uint64, id interface{}) error
- func (tm *TasksDBMock) Get(userID uint64, id interface{}) (models.Task, error)
- func (tm *TasksDBMock) GetAll(userID uint64) ([]models.Task, error)
- func (tm *TasksDBMock) GetEdit(userID uint64, id interface{}) (models.EditTaskVM, error)
- func (tm *TasksDBMock) GetNew(userID uint64, projectID uint64) (models.EditTaskVM, error)
- func (tm *TasksDBMock) Latest(userID uint64) ([]models.Task, error)
- func (tm *TasksDBMock) Summary(userID uint64) (models.TasksSummaryVM, error)
- func (tm *TasksDBMock) Update(userID uint64, task models.Task) (models.Task, error)
- type UsersDBMock
- func (u *UsersDBMock) Activate(vm models.ActivateVM) (models.User, error)
- func (u *UsersDBMock) Forgot(vm models.ForgotVM) (models.User, error)
- func (u *UsersDBMock) Get(id interface{}) (models.User, error)
- func (u *UsersDBMock) GetAll() ([]models.User, error)
- func (u *UsersDBMock) GetByEmail(email string) (models.User, error)
- func (u *UsersDBMock) Login(vm models.LoginVM) (models.User, error)
- func (u *UsersDBMock) Register(vm models.RegisterVM) (models.User, error)
- func (u *UsersDBMock) ResetPassword(vm models.ResetVM) (models.User, error)
- func (u *UsersDBMock) Summary() (models.UsersSummaryVM, error)
- func (u *UsersDBMock) UpdateAccount(vm models.AccountVM, user models.User) (models.User, error)
- func (u *UsersDBMock) UpdateStatus(user models.User) (models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoriesDBMock ¶
CategoriesDBMock is a CategoriesDB repository mock
func (*CategoriesDBMock) Create ¶
func (cr *CategoriesDBMock) Create(userID uint64, category models.Category) (models.Category, error)
Create creates a new category in db
func (*CategoriesDBMock) Delete ¶
func (cr *CategoriesDBMock) Delete(userID uint64, id interface{}) error
Delete removes a category from db
func (*CategoriesDBMock) Get ¶
func (cr *CategoriesDBMock) Get(userID uint64, id interface{}) (models.Category, error)
func (*CategoriesDBMock) GetAll ¶
func (cr *CategoriesDBMock) GetAll(userID uint64) ([]models.Category, error)
func (*CategoriesDBMock) Summary ¶
func (cr *CategoriesDBMock) Summary(userID uint64) (models.CategoriesSummaryVM, error)
type CommentsDBMock ¶
func (*CommentsDBMock) Delete ¶
func (cm *CommentsDBMock) Delete(userID uint64, id interface{}) error
Delete removes a comment from db
func (*CommentsDBMock) Get ¶
func (cm *CommentsDBMock) Get(userID uint64, id interface{}) (models.Comment, error)
Get fetches a comment by its id
type EmailMock ¶
type EmailMock struct { ActivationSent bool RegistrationSent bool ResetSent bool ResetConfirmationSent bool }
EmailMock is a email service mock
func (*EmailMock) SendPasswordResetConfirmation ¶
func (*EmailMock) SendPasswordResetMessage ¶
func (*EmailMock) SendUserActivationMessage ¶
type PagesDBMock ¶
func (*PagesDBMock) Delete ¶
func (pm *PagesDBMock) Delete(id interface{}) error
Delete removes a page from db
func (*PagesDBMock) Get ¶
func (pm *PagesDBMock) Get(id interface{}) (models.Page, error)
Get fetches a page by its id
func (*PagesDBMock) GetAll ¶
func (pm *PagesDBMock) GetAll() ([]models.Page, error)
GetAll returns all pages owned by specified user
func (*PagesDBMock) GetPagesForMenu ¶
func (pm *PagesDBMock) GetPagesForMenu() ([]models.Page, error)
GetPagesForMenu returns a list of pages for navbar menu
type ProjectsDBMock ¶
func (*ProjectsDBMock) Delete ¶
func (pr *ProjectsDBMock) Delete(userID uint64, id interface{}) error
Delete removes a project from db
func (*ProjectsDBMock) Get ¶
func (pr *ProjectsDBMock) Get(userID uint64, id interface{}) (models.Project, error)
Get fetches a project by its id
func (*ProjectsDBMock) GetAll ¶
func (pr *ProjectsDBMock) GetAll(userID uint64) ([]models.Project, error)
GetAll returns all projects owned by the specified user
func (*ProjectsDBMock) GetAllFavorite ¶
func (pr *ProjectsDBMock) GetAllFavorite(userID uint64) ([]models.Project, error)
GetAllFavorite returns all favorite projects owned by the specified user
func (*ProjectsDBMock) GetEdit ¶
func (pr *ProjectsDBMock) GetEdit(userID uint64, id interface{}) (models.EditProjectVM, error)
GetEdit returns a viewmodel with data required for editing the project
func (*ProjectsDBMock) GetNew ¶
func (pr *ProjectsDBMock) GetNew(userID uint64) (models.EditProjectVM, error)
GetNew returns a viewmodel with data required for building a new project
func (*ProjectsDBMock) Summary ¶
func (pr *ProjectsDBMock) Summary(userID uint64) (models.ProjectsSummaryVM, error)
Summary gets projects summary info for a dashboard
func (*ProjectsDBMock) ToggleArchive ¶
func (pr *ProjectsDBMock) ToggleArchive(userID uint64, project models.Project) (models.Project, error)
ToggleArchive toggles project's archived field
func (*ProjectsDBMock) ToggleFavorite ¶
func (pr *ProjectsDBMock) ToggleFavorite(userID uint64, project models.Project) (models.Project, error)
ToggleFavorite toggles project's favorite field
type ReportsDBMock ¶
type SessionsDBMock ¶
SessionsDBMock is a SessionsDB repository mock
func (*SessionsDBMock) Delete ¶
func (cr *SessionsDBMock) Delete(userID uint64, id interface{}) error
Delete removes a session from db
func (*SessionsDBMock) Get ¶
func (cr *SessionsDBMock) Get(userID uint64, id interface{}) (models.Session, error)
func (*SessionsDBMock) GetAll ¶
func (cr *SessionsDBMock) GetAll(userID uint64) ([]models.Session, error)
func (*SessionsDBMock) NewGet ¶
func (cr *SessionsDBMock) NewGet(userID uint64) (models.Session, error)
NewGet gets a view models for a new session
func (*SessionsDBMock) Summary ¶
func (cr *SessionsDBMock) Summary(userID uint64) (models.SessionsSummaryVM, error)
Summary returs session summary
type SettingsDBMock ¶
func (*SettingsDBMock) Delete ¶
func (sm *SettingsDBMock) Delete(id interface{}) error
Delete removes a setting from db
func (*SettingsDBMock) Get ¶
func (sm *SettingsDBMock) Get(id interface{}) (models.Setting, error)
Get fetches a setting by its id
type TaskLogsDBMock ¶
TaskLogsDBMock is a TaskLogsDB repository mock
type TasksDBMock ¶
TasksDBMock is a TasksDB repository mock
func (*TasksDBMock) Delete ¶
func (tm *TasksDBMock) Delete(userID uint64, id interface{}) error
Delete removes a task from db
func (*TasksDBMock) Get ¶
func (tm *TasksDBMock) Get(userID uint64, id interface{}) (models.Task, error)
func (*TasksDBMock) GetEdit ¶
func (tm *TasksDBMock) GetEdit(userID uint64, id interface{}) (models.EditTaskVM, error)
func (*TasksDBMock) GetNew ¶
func (tm *TasksDBMock) GetNew(userID uint64, projectID uint64) (models.EditTaskVM, error)
GetNew returns a view model for creating a new task
func (*TasksDBMock) Latest ¶
func (tm *TasksDBMock) Latest(userID uint64) ([]models.Task, error)
Latest returns a fixed number of latest tasks
func (*TasksDBMock) Summary ¶
func (tm *TasksDBMock) Summary(userID uint64) (models.TasksSummaryVM, error)
Summary returns tasks summary
type UsersDBMock ¶
UsersDBMock is a UsersDB repository mock
func (*UsersDBMock) Activate ¶
func (u *UsersDBMock) Activate(vm models.ActivateVM) (models.User, error)
func (*UsersDBMock) GetByEmail ¶
func (u *UsersDBMock) GetByEmail(email string) (models.User, error)
func (*UsersDBMock) Register ¶
func (u *UsersDBMock) Register(vm models.RegisterVM) (models.User, error)
func (*UsersDBMock) ResetPassword ¶
func (*UsersDBMock) Summary ¶
func (u *UsersDBMock) Summary() (models.UsersSummaryVM, error)