services

package
v0.0.0-...-d378361 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabelToTask

func AddLabelToTask(source db.DataSource, taskId models.RequiredId, label models.Label) (models.LabelsList, error)

Adds label to task and returns new list of labels on this task.

func AddTaskToProject

func AddTaskToProject(source db.DataSource, task models.Task) (models.Task, error)

Creates task and returns it.

func AddUserToProject

func AddUserToProject(source db.DataSource, projectId, userId models.RequiredId) (result models.UsersList, err error)

func AllLabels

func AllLabels(source db.DataSource, taskId models.RequiredId) (models.LabelsList, error)

Returns all labels from given task.

func AllProjects

func AllProjects(source db.DataSource) (result models.ProjectsList, err error)

Returns all projects.

func AllTasks

func AllTasks(source db.DataSource, projectId models.RequiredId) (tasksList models.TasksList, err error)

Returns all tasks.

func AllTasksInProject

func AllTasksInProject(mongo db.DataSource, id models.RequiredId) (result models.TasksList, err error)

Returns all tasks in project

func AllUserProjects

func AllUserProjects(source db.DataSource, id models.RequiredId) (projects models.ProjectsList, err error)

Returns all users project.

func AllUsers

func AllUsers(source db.DataSource) (usersLists models.UsersList, err error)

Returns all users.

func AllUsersInProject

func AllUsersInProject(source db.DataSource, id models.RequiredId) (result models.UsersList, err error)

Returns all users in project

func AuthorizeUser

func AuthorizeUser(source db.DataSource, credentials models.User) (user models.User, err error)

Checks if user credentials present in users collection.

func CheckLabelAlreadySet

func CheckLabelAlreadySet(source db.DataSource, taskId models.RequiredId, label models.Label) (bool, error)

Checks if label already set on this task.

func CheckProjectExists

func CheckProjectExists(source db.DataSource, project models.Project) (bool, error)

Check if project with title == project.Title exists

func CheckTaskExists

func CheckTaskExists(source db.DataSource, task models.Task) (bool, error)

Checks if task with this 'title == task.Title' exists.

func CheckUserExists

func CheckUserExists(source db.DataSource, credentials models.User) (bool, error)

Checks if user with this credentials.Email exists.

func CheckUserInProject

func CheckUserInProject(source db.DataSource, projectId, userId models.RequiredId) (bool, error)

Checks if user already in current project

func CreateProject

func CreateProject(source db.DataSource, project models.Project) (models.Project, error)

func CreateUser

func CreateUser(source db.DataSource, user models.User) (models.User, error)

Creates user and returns it.

func DeleteLabelFromTask

func DeleteLabelFromTask(source db.DataSource, taskId models.RequiredId, label models.Label) (models.LabelsList, error)

Deletes label from task and returns new list of labels on this task

func DeleteUserFromProject

func DeleteUserFromProject(source db.DataSource, projectId, userId models.RequiredId) (result models.UsersList, err error)

func FindProjectById

func FindProjectById(mongo db.DataSource, id models.RequiredId) (result models.Project, err error)

Returns task with given id.

func FindTaskById

func FindTaskById(source db.DataSource, id models.RequiredId) (task models.Task, err error)

Returns task with given id

func FindUserByEmail

func FindUserByEmail(source db.DataSource, email models.Email) (user models.User, err error)

Returns user with given email.

func FindUserById

func FindUserById(source db.DataSource, id models.RequiredId) (user models.User, err error)

Returns user with given id.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL