repositories

package
v0.0.0-...-e380594 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentRepository

type AttachmentRepository interface {
	Create(file *multipart.FileHeader, cid uint) (attachment *models.Attachment, err error)
	Delete(atid uint) (err error)
	Get(atid uint) (attachment *models.Attachment, err error)
}

type BoardRepository

type BoardRepository interface {
	Create(board *models.Board) (err error)
	Update(board *models.Board) (err error)
	Delete(bid uint) (err error)
	GetByID(bid uint) (board *models.Board, err error)
	GetBoardMembers(board *models.Board) (members *[]models.PublicUserInfo, err error)
	GetBoardInvitedMembers(bid uint) (members *[]models.PublicUserInfo, err error)
	GetBoardCardLists(bid uint) (cardLists *[]models.CardList, err error)
	GetBoardTags(bid uint) (tags *[]models.Tag, err error)
	GetBoardCards(bid uint) (cards *[]models.Card, err error)
	UpdateAccessPath(bid uint) (newAccessPath string, err error)
	FindBoardIDByPath(accessPath string) (bid uint, err error)
}

type CardListRepository

type CardListRepository interface {
	Create(cardList *models.CardList) (err error)
	Update(cardList *models.CardList) (err error)
	Delete(clid uint) (err error)
	GetByID(clid uint) (cardList *models.CardList, err error)
	GetCardListCards(clid uint) (cards *[]models.Card, err error)
	Move(fromPos, toPos, bid uint) (err error)
}

type CardRepository

type CardRepository interface {
	Create(card *models.Card) (err error)
	Update(card *models.Card) (err error)
	Delete(cid uint) (err error)
	GetByID(cid uint) (card *models.Card, err error)
	GetAssignedUsers(cid uint) (users *[]models.PublicUserInfo, err error)
	GetCardComments(cid uint) (comments *[]models.Comment, err error)
	GetCardTags(cid uint) (tags *[]models.Tag, err error)
	GetCardCheckLists(cid uint) (checkLists *[]models.CheckList, err error)
	GetCardAttachments(cid uint) (attachments *[]models.Attachment, err error)
	Move(fromPos, toPos, fromCardListID, toCardListID uint) (err error)
	UpdateAccessPath(cid uint) (newAccessPath string, err error)
	FindCardByPath(accessPath string) (card *models.Card, err error)
}

type CheckListItemRepository

type CheckListItemRepository interface {
	Create(checkListItem *models.CheckListItem) (err error)
	Update(checkListItem *models.CheckListItem) (err error)
	Delete(chliid uint) (err error)
	GetByID(chliid uint) (checkListItem *models.CheckListItem, err error)
}

type CheckListRepository

type CheckListRepository interface {
	Create(checkList *models.CheckList) (err error)
	Update(checkList *models.CheckList) (err error)
	Delete(chlid uint) (err error)
	GetByID(chlid uint) (checkList *models.CheckList, err error)
	GetCheckListItems(chlid uint) (checkListItems *[]models.CheckListItem, err error)
}

type CommentRepository

type CommentRepository interface {
	Create(comment *models.Comment) (err error)
	Update(comment *models.Comment) (err error)
	Delete(cmid uint) (err error)
	GetByID(cmid uint) (comment *models.Comment, err error)
}

type SessionRepository

type SessionRepository interface {
	Create(uid uint) (sid string, err error)
	Get(sid string) (uid uint, err error)
	Delete(sid string) (err error)
}

type TagRepository

type TagRepository interface {
	Create(tag *models.Tag) (err error)
	Update(tag *models.Tag) (err error)
	Delete(tgid uint) (err error)
	GetByID(tgid uint) (tag *models.Tag, err error)
	AddTagToCard(uid, cid uint) (err error)
}

type TeamRepository

type TeamRepository interface {
	Create(team *models.Team) (err error)
	Update(team *models.Team) (err error)
	Delete(tid uint) (err error)
	GetByID(tid uint) (team *models.Team, err error)
	GetTeamMembers(tid uint) (members *[]models.User, err error)
	GetTeamBoards(tid uint) (boards *[]models.Board, err error)
	IsTeamExist(team *models.Team) (bool, error)
}

type UserRepository

type UserRepository interface {
	Create(user *models.User) (err error)
	Update(user *models.User) (err error)
	UpdateAvatar(user *models.User, avatar *multipart.FileHeader) (err error)
	GetByLogin(login string) (user *models.User, err error)
	GetByID(uid uint) (user *models.User, err error)
	FindAllByLogin(text string, amount int) (users *[]models.PublicUserInfo, err error)
	FindBoardMembersByLogin(bid uint, text string, amount int) (users *[]models.PublicUserInfo, err error)
	FindBoardInvitedMembersByLogin(bid uint, text string, amount int) (users *[]models.PublicUserInfo, err error)
	GetUserTeams(uid uint) (teams *[]models.Team, err error)
	GetUserToggledBoards(uid uint) (boards *[]models.Board, err error)
	AddUserToTeam(uid, tid uint) (err error)
	AddUserToBoard(uid, bid uint) (err error)
	AddUserToCard(uid, cid uint) (err error)
	GetPublicData(uid uint) (user *models.PublicUserInfo, err error)
	IsUserExist(user *models.User) (bool, error)
	IsEmailUsed(user *models.User) (bool, error)
	IsUserInTeam(uid uint, tid uint) (isMember bool, err error)
	IsBoardAccessed(uid uint, bid uint) (isAccessed bool, err error)
	IsCardListAccessed(uid uint, clid uint) (isAccessed bool, err error)
	IsCardAccessed(uid uint, cid uint) (isAccessed bool, err error)
	IsCardAssigned(uid uint, cid uint) (isAssigned bool, err error)
	IsCommentAccessed(uid uint, cmid uint) (isAccessed bool, err error)
	IsCheckListAccessed(uid uint, chlid uint) (isAccessed bool, err error)
	IsCheckListItemAccessed(uid uint, chliid uint) (isAccessed bool, err error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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