Documentation ¶
Index ¶
- Constants
- Variables
- func CreateList(s *xorm.Session, list *List, auth web.Auth) (err error)
- func CreateNewNamespaceForUser(s *xorm.Session, user *user.User) (err error)
- func DeleteUser(s *xorm.Session, u *user.User) (err error)
- func ExportUserData(s *xorm.Session, u *user.User) (err error)
- func FindMentionedUsersInText(s *xorm.Session, text string) (users map[int64]*user.User, err error)
- func GetLinkSharesByIDs(s *xorm.Session, ids []int64) (shares map[int64]*LinkSharing, err error)
- func GetListsByIDs(s *xorm.Session, listIDs []int64) (lists map[int64]*List, err error)
- func GetSubscriptions(s *xorm.Session, entityType SubscriptionEntityType, entityIDs []int64, ...) (listsToSubscriptions map[int64]*Subscription, err error)
- func GetTables() []interface{}
- func GetTotalCount(counting interface{}) (count int64, err error)
- func GetUserOrLinkShareUser(s *xorm.Session, a web.Auth) (uu *user.User, err error)
- func IsErrAttachmentAndCoverMustBelongToTheSameTask(err error) bool
- func IsErrBucketDoesNotBelongToList(err error) bool
- func IsErrBucketDoesNotExist(err error) bool
- func IsErrBucketLimitExceeded(err error) bool
- func IsErrBulkTasksMustBeInSameList(err error) bool
- func IsErrBulkTasksNeedAtLeastOne(err error) bool
- func IsErrCannotDeleteLastTeamMember(err error) bool
- func IsErrCannotRemoveLastBucket(err error) bool
- func IsErrGenericForbidden(err error) bool
- func IsErrIDCannotBeZero(err error) bool
- func IsErrInvalidData(err error) bool
- func IsErrInvalidRelationKind(err error) bool
- func IsErrInvalidRight(err error) bool
- func IsErrInvalidSortOrder(err error) bool
- func IsErrInvalidSortParam(err error) bool
- func IsErrInvalidTaskField(err error) bool
- func IsErrInvalidTaskFilterComparator(err error) bool
- func IsErrInvalidTaskFilterConcatinator(err error) bool
- func IsErrInvalidTaskFilterValue(err error) bool
- func IsErrLabelDoesNotExist(err error) bool
- func IsErrLabelIsAlreadyOnTask(err error) bool
- func IsErrLinkSharePasswordInvalid(err error) bool
- func IsErrLinkSharePasswordRequired(err error) bool
- func IsErrListCannotBelongToAPseudoNamespace(err error) bool
- func IsErrListDoesNotExist(err error) bool
- func IsErrListIdentifierIsNotUnique(err error) bool
- func IsErrListIsArchived(err error) bool
- func IsErrListMustBelongToANamespace(err error) bool
- func IsErrListShareDoesNotExist(err error) bool
- func IsErrListTitleCannotBeEmpty(err error) bool
- func IsErrNamespaceDoesNotExist(err error) bool
- func IsErrNamespaceIsArchived(err error) bool
- func IsErrNamespaceNameCannotBeEmpty(err error) bool
- func IsErrNeedToHaveListReadAccess(err error) bool
- func IsErrNeedToHaveNamespaceReadAccess(err error) bool
- func IsErrNoRightToSeeTask(err error) bool
- func IsErrOnlyOneDoneBucketPerList(err error) bool
- func IsErrParentTaskCannotBeTheSame(err error) bool
- func IsErrRelationAlreadyExists(err error) bool
- func IsErrRelationDoesNotExist(err error) bool
- func IsErrRelationTasksCannotBeTheSame(err error) bool
- func IsErrSavedFilterDoesNotExist(err error) bool
- func IsErrSavedFilterNotAvailableForLinkShare(err error) bool
- func IsErrSubscriptionAlreadyExists(err error) bool
- func IsErrTaskAttachmentDoesNotExist(err error) bool
- func IsErrTaskAttachmentIsTooLarge(err error) bool
- func IsErrTaskCannotBeEmpty(err error) bool
- func IsErrTaskCommentDoesNotExist(err error) bool
- func IsErrTaskDoesNotExist(err error) bool
- func IsErrTeamAlreadyHasAccess(err error) bool
- func IsErrTeamDoesNotExist(err error) bool
- func IsErrTeamDoesNotHaveAccessToList(err error) bool
- func IsErrTeamDoesNotHaveAccessToNamespace(err error) bool
- func IsErrTeamNameCannotBeEmpty(err error) bool
- func IsErrUnknownSubscriptionEntityType(err error) bool
- func IsErrUserAlreadyAssigned(err error) bool
- func IsErrUserAlreadyHasAccess(err error) bool
- func IsErrUserAlreadyHasNamespaceAccess(err error) bool
- func IsErrUserDoesNotHaveAccessToList(err error) bool
- func IsErrUserDoesNotHaveAccessToNamespace(err error) bool
- func IsErrUserHasNoAccessToLabel(err error) bool
- func IsErrUserIsMemberOfTeam(err error) bool
- func ListUsersFromList(s *xorm.Session, l *List, search string) (users []*user.User, err error)
- func RegisterListeners()
- func RegisterOldExportCleanupCron()
- func RegisterOverdueReminderCron()
- func RegisterReminderCron()
- func RegisterUserDeletionCron()
- func RemoveUnsplashPhoto(s *xorm.Session, fileID int64) (err error)
- func SetEngine() (err error)
- func SetListBackground(s *xorm.Session, listID int64, background *files.File, blurHash string) (err error)
- func SetupTests()
- func UpdateList(s *xorm.Session, list *List, auth web.Auth, updateListBackground bool) (err error)
- func VerifyLinkSharePassword(share *LinkSharing, password string) (err error)
- type Bucket
- func (b *Bucket) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (b *Bucket) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (b *Bucket) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (b *Bucket) Create(s *xorm.Session, a web.Auth) (err error)
- func (b *Bucket) Delete(s *xorm.Session, a web.Auth) (err error)
- func (b *Bucket) ReadAll(s *xorm.Session, auth web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (b *Bucket) TableName() string
- func (b *Bucket) Update(s *xorm.Session, a web.Auth) (err error)
- type BulkAssignees
- type BulkTask
- type DataExportReadyNotification
- type DataExportRequestEvent
- type DatabaseNotifications
- func (d *DatabaseNotifications) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (d *DatabaseNotifications) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (ls interface{}, resultCount int, numberOfEntries int64, err error)
- func (d *DatabaseNotifications) Update(s *xorm.Session, a web.Auth) (err error)
- type DecreaseListCounter
- type DecreaseNamespaceCounter
- type DecreaseTaskCounter
- type DecreaseTeamCounter
- type ErrAttachmentDoesNotBelongToTask
- type ErrBucketDoesNotBelongToList
- type ErrBucketDoesNotExist
- type ErrBucketLimitExceeded
- type ErrBulkTasksMustBeInSameList
- type ErrBulkTasksNeedAtLeastOne
- type ErrCannotDeleteLastTeamMember
- type ErrCannotRemoveLastBucket
- type ErrGenericForbidden
- type ErrIDCannotBeZero
- type ErrInvalidData
- type ErrInvalidRelationKind
- type ErrInvalidRight
- type ErrInvalidSortOrder
- type ErrInvalidSortParam
- type ErrInvalidTaskField
- type ErrInvalidTaskFilterComparator
- type ErrInvalidTaskFilterConcatinator
- type ErrInvalidTaskFilterValue
- type ErrLabelDoesNotExist
- type ErrLabelIsAlreadyOnTask
- type ErrLinkSharePasswordInvalid
- type ErrLinkSharePasswordRequired
- type ErrListCannotBelongToAPseudoNamespace
- type ErrListDoesNotExist
- type ErrListIdentifierIsNotUnique
- type ErrListIsArchived
- type ErrListMustBelongToANamespace
- type ErrListShareDoesNotExist
- type ErrListTitleCannotBeEmpty
- type ErrNamespaceDoesNotExist
- type ErrNamespaceIsArchived
- type ErrNamespaceNameCannotBeEmpty
- type ErrNeedToHaveListReadAccess
- type ErrNeedToHaveNamespaceReadAccess
- type ErrNoRightToSeeTask
- type ErrOnlyOneDoneBucketPerList
- type ErrParentTaskCannotBeTheSame
- type ErrRelationAlreadyExists
- type ErrRelationDoesNotExist
- type ErrRelationTasksCannotBeTheSame
- type ErrSavedFilterDoesNotExist
- type ErrSavedFilterNotAvailableForLinkShare
- type ErrSubscriptionAlreadyExists
- type ErrTaskAttachmentDoesNotExist
- type ErrTaskAttachmentIsTooLarge
- type ErrTaskCannotBeEmpty
- type ErrTaskCommentDoesNotExist
- type ErrTaskDoesNotExist
- type ErrTeamAlreadyHasAccess
- type ErrTeamDoesNotExist
- type ErrTeamDoesNotHaveAccessToList
- type ErrTeamDoesNotHaveAccessToNamespace
- type ErrTeamNameCannotBeEmpty
- type ErrUnknownSubscriptionEntityType
- type ErrUserAlreadyAssigned
- type ErrUserAlreadyHasAccess
- type ErrUserAlreadyHasNamespaceAccess
- type ErrUserDoesNotHaveAccessToList
- type ErrUserDoesNotHaveAccessToNamespace
- type ErrUserHasNoAccessToLabel
- type ErrUserIsMemberOfTeam
- type Favorite
- type FavoriteKind
- type HandleTaskCommentEditMentions
- type HandleTaskCreateMentions
- type HandleTaskUpdateLastUpdated
- type HandleTaskUpdatedMentions
- type HandleUserDataExport
- type IncreaseListCounter
- type IncreaseNamespaceCounter
- type IncreaseTaskCounter
- type IncreaseTeamCounter
- type Label
- func (l *Label) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (l *Label) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (l *Label) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (l *Label) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (l *Label) Create(s *xorm.Session, a web.Auth) (err error)
- func (l *Label) Delete(s *xorm.Session, a web.Auth) (err error)
- func (l *Label) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (ls interface{}, resultCount int, numberOfEntries int64, err error)
- func (l *Label) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (Label) TableName() string
- func (l *Label) Update(s *xorm.Session, a web.Auth) (err error)
- type LabelByTaskIDsOptions
- type LabelTask
- func (lt *LabelTask) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (lt *LabelTask) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (lt *LabelTask) Create(s *xorm.Session, a web.Auth) (err error)
- func (lt *LabelTask) Delete(s *xorm.Session, a web.Auth) (err error)
- func (lt *LabelTask) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (LabelTask) TableName() string
- type LabelTaskBulk
- type LabelWithTaskID
- type LinkSharing
- func (share *LinkSharing) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (share *LinkSharing) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (share *LinkSharing) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (share *LinkSharing) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (share *LinkSharing) Create(s *xorm.Session, a web.Auth) (err error)
- func (share *LinkSharing) Delete(s *xorm.Session, a web.Auth) (err error)
- func (share *LinkSharing) GetID() int64
- func (share *LinkSharing) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
- func (share *LinkSharing) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (LinkSharing) TableName() string
- type List
- func GetListByShareHash(s *xorm.Session, hash string) (list *List, err error)
- func GetListSimplByTaskID(s *xorm.Session, taskID int64) (l *List, err error)
- func GetListSimpleByID(s *xorm.Session, listID int64) (list *List, err error)
- func GetListsByNamespaceID(s *xorm.Session, nID int64, doer *user.User) (lists []*List, err error)
- func (l *List) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (l *List) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (l *List) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (l *List) CanUpdate(s *xorm.Session, a web.Auth) (canUpdate bool, err error)
- func (l *List) CanWrite(s *xorm.Session, a web.Auth) (bool, error)
- func (l *List) CheckIsArchived(s *xorm.Session) (err error)
- func (l *List) Create(s *xorm.Session, a web.Auth) (err error)
- func (l *List) Delete(s *xorm.Session, a web.Auth) (err error)
- func (l *List) DeleteBackgroundFileIfExists() (err error)
- func (l *List) IsAdmin(s *xorm.Session, a web.Auth) (bool, error)
- func (l *List) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
- func (l *List) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (l *List) TableName() string
- func (l *List) Update(s *xorm.Session, a web.Auth) (err error)
- type ListBackgroundType
- type ListCreatedEvent
- type ListCreatedNotification
- type ListDeletedEvent
- type ListDuplicate
- type ListSharedWithTeamEvent
- type ListSharedWithUserEvent
- type ListUIDs
- type ListUpdatedEvent
- type ListUser
- func (lu *ListUser) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (lu *ListUser) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (lu *ListUser) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (lu *ListUser) Create(s *xorm.Session, a web.Auth) (err error)
- func (lu *ListUser) Delete(s *xorm.Session, a web.Auth) (err error)
- func (lu *ListUser) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (ListUser) TableName() string
- func (lu *ListUser) Update(s *xorm.Session, a web.Auth) (err error)
- type ListWithTasksAndBuckets
- type Message
- type Namespace
- func (n *Namespace) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (n *Namespace) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (n *Namespace) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (n *Namespace) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (n *Namespace) CanWrite(s *xorm.Session, a web.Auth) (bool, error)
- func (n *Namespace) CheckIsArchived(s *xorm.Session) error
- func (n *Namespace) Create(s *xorm.Session, a web.Auth) (err error)
- func (n *Namespace) Delete(s *xorm.Session, a web.Auth) (err error)
- func (n *Namespace) IsAdmin(s *xorm.Session, a web.Auth) (bool, error)
- func (n *Namespace) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (n *Namespace) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (Namespace) TableName() string
- func (n *Namespace) Update(s *xorm.Session, a web.Auth) (err error)
- type NamespaceCreatedEvent
- type NamespaceDeletedEvent
- type NamespaceList
- type NamespaceSharedWithTeamEvent
- type NamespaceSharedWithUserEvent
- type NamespaceUpdatedEvent
- type NamespaceUser
- func (nu *NamespaceUser) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (nu *NamespaceUser) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (nu *NamespaceUser) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (nu *NamespaceUser) Create(s *xorm.Session, a web.Auth) (err error)
- func (nu *NamespaceUser) Delete(s *xorm.Session, a web.Auth) (err error)
- func (nu *NamespaceUser) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (NamespaceUser) TableName() string
- func (nu *NamespaceUser) Update(s *xorm.Session, a web.Auth) (err error)
- type NamespaceWithLists
- type NamespaceWithListsAndTasks
- type RelatedTaskMap
- type RelationKind
- type ReminderDueNotification
- type Right
- type SavedFilter
- func (sf *SavedFilter) CanCreate(s *xorm.Session, auth web.Auth) (bool, error)
- func (sf *SavedFilter) CanDelete(s *xorm.Session, auth web.Auth) (bool, error)
- func (sf *SavedFilter) CanRead(s *xorm.Session, auth web.Auth) (bool, int, error)
- func (sf *SavedFilter) CanUpdate(s *xorm.Session, auth web.Auth) (bool, error)
- func (sf *SavedFilter) Create(s *xorm.Session, auth web.Auth) error
- func (sf *SavedFilter) Delete(s *xorm.Session, a web.Auth) error
- func (sf *SavedFilter) ReadOne(s *xorm.Session, a web.Auth) error
- func (sf *SavedFilter) TableName() string
- func (sf *SavedFilter) Update(s *xorm.Session, a web.Auth) error
- type SendListCreatedNotification
- type SendTaskAssignedNotification
- type SendTaskCommentNotification
- type SendTaskDeletedNotification
- type SendTeamMemberAddedNotification
- type SharingType
- type SubscribeAssigneeToTask
- type Subscription
- func (sb *Subscription) CanCreate(s *xorm.Session, a web.Auth) (can bool, err error)
- func (sb *Subscription) CanDelete(s *xorm.Session, a web.Auth) (can bool, err error)
- func (sb *Subscription) Create(s *xorm.Session, auth web.Auth) (err error)
- func (sb *Subscription) Delete(s *xorm.Session, auth web.Auth) (err error)
- func (sb *Subscription) TableName() string
- type SubscriptionEntityType
- type Task
- func (t *Task) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Task) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Task) CanRead(s *xorm.Session, a web.Auth) (canRead bool, maxRight int, err error)
- func (t *Task) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Task) CanWrite(s *xorm.Session, a web.Auth) (canWrite bool, err error)
- func (t *Task) Create(s *xorm.Session, a web.Auth) (err error)
- func (t *Task) Delete(s *xorm.Session, a web.Auth) (err error)
- func (t *Task) GetFrontendURL() string
- func (t *Task) GetFullIdentifier() string
- func (t *Task) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
- func (t *Task) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (*Task) TableName() string
- func (t *Task) Update(s *xorm.Session, a web.Auth) (err error)
- func (t *Task) UpdateTaskLabels(s *xorm.Session, creator web.Auth, labels []*Label) (err error)
- type TaskAssginee
- func (la *TaskAssginee) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (la *TaskAssginee) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (la *TaskAssginee) Create(s *xorm.Session, a web.Auth) (err error)
- func (la *TaskAssginee) Delete(s *xorm.Session, a web.Auth) (err error)
- func (la *TaskAssginee) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (TaskAssginee) TableName() string
- type TaskAssignedNotification
- type TaskAssigneeCreatedEvent
- type TaskAssigneeDeletedEvent
- type TaskAssigneeWithUser
- type TaskAttachment
- func (ta *TaskAttachment) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (ta *TaskAttachment) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (ta *TaskAttachment) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (ta *TaskAttachment) Delete(s *xorm.Session, a web.Auth) error
- func (ta *TaskAttachment) NewAttachment(s *xorm.Session, f io.ReadCloser, realname string, realsize uint64, a web.Auth) error
- func (ta *TaskAttachment) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (ta *TaskAttachment) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (*TaskAttachment) TableName() string
- type TaskAttachmentCreatedEvent
- type TaskAttachmentDeletedEvent
- type TaskCollection
- type TaskComment
- func (tc *TaskComment) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (tc *TaskComment) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (tc *TaskComment) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (tc *TaskComment) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (tc *TaskComment) Create(s *xorm.Session, a web.Auth) (err error)
- func (tc *TaskComment) Delete(s *xorm.Session, a web.Auth) error
- func (tc *TaskComment) ReadAll(s *xorm.Session, auth web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (tc *TaskComment) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (tc *TaskComment) TableName() string
- func (tc *TaskComment) Update(s *xorm.Session, a web.Auth) error
- type TaskCommentCreatedEvent
- type TaskCommentDeletedEvent
- type TaskCommentNotification
- type TaskCommentUpdatedEvent
- type TaskCreatedEvent
- type TaskDeletedEvent
- type TaskDeletedNotification
- type TaskRelation
- func (rel *TaskRelation) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (rel *TaskRelation) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (rel *TaskRelation) Create(s *xorm.Session, a web.Auth) error
- func (rel *TaskRelation) Delete(s *xorm.Session, a web.Auth) error
- func (*TaskRelation) TableName() string
- type TaskRelationCreatedEvent
- type TaskRelationDeletedEvent
- type TaskReminder
- type TaskRepeatMode
- type TaskUpdatedEvent
- type TaskWithComments
- type Team
- func (t *Team) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Team) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Team) CanRead(s *xorm.Session, a web.Auth) (bool, int, error)
- func (t *Team) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Team) Create(s *xorm.Session, a web.Auth) (err error)
- func (t *Team) Delete(s *xorm.Session, a web.Auth) (err error)
- func (t *Team) IsAdmin(s *xorm.Session, a web.Auth) (bool, error)
- func (t *Team) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (t *Team) ReadOne(s *xorm.Session, a web.Auth) (err error)
- func (Team) TableName() string
- func (t *Team) Update(s *xorm.Session, a web.Auth) (err error)
- type TeamCreatedEvent
- type TeamDeletedEvent
- type TeamList
- func (tl *TeamList) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (tl *TeamList) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (tl *TeamList) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (tl *TeamList) Create(s *xorm.Session, a web.Auth) (err error)
- func (tl *TeamList) Delete(s *xorm.Session, a web.Auth) (err error)
- func (tl *TeamList) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
- func (TeamList) TableName() string
- func (tl *TeamList) Update(s *xorm.Session, a web.Auth) (err error)
- type TeamMember
- func (tm *TeamMember) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (tm *TeamMember) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (tm *TeamMember) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (tm *TeamMember) Create(s *xorm.Session, a web.Auth) (err error)
- func (tm *TeamMember) Delete(s *xorm.Session, a web.Auth) (err error)
- func (tm *TeamMember) IsAdmin(s *xorm.Session, a web.Auth) (bool, error)
- func (*TeamMember) TableName() string
- func (tm *TeamMember) Update(s *xorm.Session, a web.Auth) (err error)
- type TeamMemberAddedEvent
- type TeamMemberAddedNotification
- type TeamNamespace
- func (tn *TeamNamespace) CanCreate(s *xorm.Session, a web.Auth) (bool, error)
- func (tn *TeamNamespace) CanDelete(s *xorm.Session, a web.Auth) (bool, error)
- func (tn *TeamNamespace) CanUpdate(s *xorm.Session, a web.Auth) (bool, error)
- func (tn *TeamNamespace) Create(s *xorm.Session, a web.Auth) (err error)
- func (tn *TeamNamespace) Delete(s *xorm.Session, a web.Auth) (err error)
- func (tn *TeamNamespace) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- func (TeamNamespace) TableName() string
- func (tn *TeamNamespace) Update(s *xorm.Session, a web.Auth) (err error)
- type TeamUser
- type TeamWithRight
- type UndoneTaskOverdueNotification
- type UndoneTasksOverdueNotification
- type UnsplashPhoto
- type UserDataExportRequestedEvent
- type UserMentionedInTaskNotification
- type UserWithRight
- type ValidationHTTPError
Constants ¶
const ( SubscriptionEntityUnknown = iota SubscriptionEntityNamespace SubscriptionEntityList SubscriptionEntityTask )
const ErrCodeAttachmentDoesNotBelongToTask = 4020
ErrCodeAttachmentDoesNotBelongToTask holds the unique world-error code of this error
const ErrCodeBucketDoesNotBelongToList = 10002
ErrCodeBucketDoesNotBelongToList holds the unique world-error code of this error
const ErrCodeBucketDoesNotExist = 10001
ErrCodeBucketDoesNotExist holds the unique world-error code of this error
const ErrCodeBucketLimitExceeded = 10004
ErrCodeBucketLimitExceeded holds the unique world-error code of this error
const ErrCodeBulkTasksMustBeInSameList = 4003
ErrCodeBulkTasksMustBeInSameList holds the unique world-error code of this error
const ErrCodeBulkTasksNeedAtLeastOne = 4004
ErrCodeBulkTasksNeedAtLeastOne holds the unique world-error code of this error
const ErrCodeCannotDeleteLastTeamMember = 6006
ErrCodeCannotDeleteLastTeamMember holds the unique world-error code of this error
const ErrCodeCannotRemoveLastBucket = 10003
ErrCodeCannotRemoveLastBucket holds the unique world-error code of this error
const ErrCodeIDCannotBeZero = 2001
ErrCodeIDCannotBeZero holds the unique world-error code of this error
const ErrCodeInvalidData = 2002
ErrCodeInvalidData holds the unique world-error code of this error
const ErrCodeInvalidRelationKind = 4007
ErrCodeInvalidRelationKind holds the unique world-error code of this error
const ErrCodeInvalidRight = 9001
ErrCodeInvalidRight holds the unique world-error code of this error
const ErrCodeInvalidSortOrder = 4014
ErrCodeInvalidSortOrder holds the unique world-error code of this error
const ErrCodeInvalidSortParam = 4013
ErrCodeInvalidSortParam holds the unique world-error code of this error
const ErrCodeInvalidTaskField = 4016
ErrCodeInvalidTaskField holds the unique world-error code of this error
const ErrCodeInvalidTaskFilterComparator = 4017
ErrCodeInvalidTaskFilterComparator holds the unique world-error code of this error
const ErrCodeInvalidTaskFilterConcatinator = 4018
ErrCodeInvalidTaskFilterConcatinator holds the unique world-error code of this error
const ErrCodeInvalidTaskFilterValue = 4019
ErrCodeInvalidTaskFilterValue holds the unique world-error code of this error
const ErrCodeLabelDoesNotExist = 8002
ErrCodeLabelDoesNotExist holds the unique world-error code of this error
const ErrCodeLabelIsAlreadyOnTask = 8001
ErrCodeLabelIsAlreadyOnTask holds the unique world-error code of this error
ErrCodeLinkSharePasswordInvalid holds the unique world-error code of this error
ErrCodeLinkSharePasswordRequired holds the unique world-error code of this error
const ErrCodeListCannotBelongToAPseudoNamespace = 3009
ErrCodeListCannotBelongToAPseudoNamespace holds the unique world-error code of this error
const ErrCodeListDoesNotExist = 3001
ErrCodeListDoesNotExist holds the unique world-error code of this error
const ErrCodeListIdentifierIsNotUnique = 3007
ErrCodeListIdentifierIsNotUnique holds the unique world-error code of this error
const ErrCodeListIsArchived = 3008
ErrCodeListIsArchived holds the unique world-error code of this error
const ErrCodeListMustBelongToANamespace = 3010
ErrCodeListMustBelongToANamespace holds the unique world-error code of this error
ErrCodeListShareDoesNotExist holds the unique world-error code of this error
const ErrCodeListTitleCannotBeEmpty = 3005
ErrCodeListTitleCannotBeEmpty holds the unique world-error code of this error
const ErrCodeNamespaceDoesNotExist = 5001
ErrCodeNamespaceDoesNotExist holds the unique world-error code of this error
const ErrCodeNamespaceIsArchived = 5012
ErrCodeNamespaceIsArchived holds the unique world-error code of this error
const ErrCodeNamespaceNameCannotBeEmpty = 5006
ErrCodeNamespaceNameCannotBeEmpty holds the unique world-error code of this error
const ErrCodeNeedToHaveListReadAccess = 3004
ErrCodeNeedToHaveListReadAccess holds the unique world-error code of this error
const ErrCodeNeedToHaveNamespaceReadAccess = 5009
ErrCodeNeedToHaveNamespaceReadAccess holds the unique world-error code of this error
const ErrCodeNoRightToSeeTask = 4005
ErrCodeNoRightToSeeTask holds the unique world-error code of this error
const ErrCodeOnlyOneDoneBucketPerList = 10005
ErrCodeOnlyOneDoneBucketPerList holds the unique world-error code of this error
const ErrCodeParentTaskCannotBeTheSame = 4006
ErrCodeParentTaskCannotBeTheSame holds the unique world-error code of this error
const ErrCodeRelationAlreadyExists = 4008
ErrCodeRelationAlreadyExists holds the unique world-error code of this error
const ErrCodeRelationDoesNotExist = 4009
ErrCodeRelationDoesNotExist holds the unique world-error code of this error
const ErrCodeRelationTasksCannotBeTheSame = 4010
ErrCodeRelationTasksCannotBeTheSame holds the unique world-error code of this error
const ErrCodeSavedFilterDoesNotExist = 11001
ErrCodeSavedFilterDoesNotExist holds the unique world-error code of this error
ErrCodeSavedFilterNotAvailableForLinkShare holds the unique world-error code of this error
const ErrCodeSubscriptionAlreadyExists = 12002
ErrCodeSubscriptionAlreadyExists holds the unique world-error code of this error
const ErrCodeTaskAttachmentDoesNotExist = 4011
ErrCodeTaskAttachmentDoesNotExist holds the unique world-error code of this error
const ErrCodeTaskAttachmentIsTooLarge = 4012
ErrCodeTaskAttachmentIsTooLarge holds the unique world-error code of this error
const ErrCodeTaskCannotBeEmpty = 4001
ErrCodeTaskCannotBeEmpty holds the unique world-error code of this error
const ErrCodeTaskCommentDoesNotExist = 4015
ErrCodeTaskCommentDoesNotExist holds the unique world-error code of this error
const ErrCodeTaskDoesNotExist = 4002
ErrCodeTaskDoesNotExist holds the unique world-error code of this error
const ErrCodeTeamAlreadyHasAccess = 6004
ErrCodeTeamAlreadyHasAccess holds the unique world-error code of this error
const ErrCodeTeamDoesNotExist = 6002
ErrCodeTeamDoesNotExist holds the unique world-error code of this error
const ErrCodeTeamDoesNotHaveAccessToList = 6007
ErrCodeTeamDoesNotHaveAccessToList holds the unique world-error code of this error
const ErrCodeTeamDoesNotHaveAccessToNamespace = 5010
ErrCodeTeamDoesNotHaveAccessToNamespace holds the unique world-error code of this error
const ErrCodeTeamNameCannotBeEmpty = 6001
ErrCodeTeamNameCannotBeEmpty holds the unique world-error code of this error
const ErrCodeUnknownSubscriptionEntityType = 12001
ErrCodeUnknownSubscriptionEntityType holds the unique world-error code of this error
const ErrCodeUserAlreadyAssigned = 4021
ErrCodeUserAlreadyAssigned holds the unique world-error code of this error
const ErrCodeUserAlreadyHasAccess = 7002
ErrCodeUserAlreadyHasAccess holds the unique world-error code of this error
const ErrCodeUserAlreadyHasNamespaceAccess = 5011
ErrCodeUserAlreadyHasNamespaceAccess holds the unique world-error code of this error
const ErrCodeUserDoesNotHaveAccessToList = 7003
ErrCodeUserDoesNotHaveAccessToList holds the unique world-error code of this error
const ErrCodeUserDoesNotHaveAccessToNamespace = 5003
ErrCodeUserDoesNotHaveAccessToNamespace holds the unique world-error code of this error
const ErrCodeUserHasNoAccessToLabel = 8003
ErrCodeUserHasNoAccessToLabel holds the unique world-error code of this error
const ErrCodeUserIsMemberOfTeam = 6005
ErrCodeUserIsMemberOfTeam holds the unique world-error code of this error
const ErrorCodeGenericForbidden = 0001
ErrorCodeGenericForbidden holds the unique world-error code of this error
const ListBackgroundUpload string = "upload"
ListBackgroundUpload represents the list upload background type
const (
RightUnknown = -1
)
define unknown right
Variables ¶
var FavoritesPseudoList = List{ ID: -1, Title: "Favorites", Description: "This list has all tasks marked as favorites.", NamespaceID: FavoritesPseudoNamespace.ID, IsFavorite: true, Created: time.Now(), Updated: time.Now(), }
FavoritesPseudoList holds all tasks marked as favorites
var FavoritesPseudoNamespace = Namespace{ ID: -2, Title: "Favorites", Description: "Favorite lists and tasks.", Created: time.Now(), Updated: time.Now(), }
FavoritesPseudoNamespace is a pseudo namespace used to hold favorited lists and tasks
var SavedFiltersPseudoNamespace = Namespace{ ID: -3, Title: "Filters", Description: "Saved filters.", Created: time.Now(), Updated: time.Now(), }
SavedFiltersPseudoNamespace is a pseudo namespace used to hold saved filters
time.Now(), Updated: time.Now(), }ID: -1, Title: "Shared Lists", Description: "Lists of other users shared with you via teams or directly.", Created:
SharedListsPseudoNamespace is a pseudo namespace used to hold shared lists
Functions ¶
func CreateList ¶ added in v0.19.0
func CreateNewNamespaceForUser ¶ added in v0.16.0
CreateNewNamespaceForUser creates a new namespace for a user. To prevent import cycles, we can't do that directly in the user.Create function.
func DeleteUser ¶ added in v0.18.0
DeleteUser completely removes a user and all their associated lists, namespaces and tasks. This action is irrevocable. Public to allow deletion from the CLI.
func ExportUserData ¶ added in v0.18.0
func FindMentionedUsersInText ¶ added in v0.18.0
func GetLinkSharesByIDs ¶ added in v0.17.0
GetLinkSharesByIDs returns all link shares from a slice of ids
func GetListsByIDs ¶ added in v0.16.0
GetListsByIDs returns a map of lists from a slice with list ids
func GetSubscriptions ¶ added in v0.20.0
func GetSubscriptions(s *xorm.Session, entityType SubscriptionEntityType, entityIDs []int64, a web.Auth) (listsToSubscriptions map[int64]*Subscription, err error)
GetSubscriptions returns a map of subscriptions to a set of given entity IDs
func GetTables ¶
func GetTables() []interface{}
GetTables returns all structs which are also a table.
func GetTotalCount ¶
GetTotalCount returns the total amount of something
func GetUserOrLinkShareUser ¶ added in v0.17.0
GetUserOrLinkShareUser returns either a user or a link share disguised as a user.
func IsErrAttachmentAndCoverMustBelongToTheSameTask ¶ added in v0.20.0
IsErrAttachmentAndCoverMustBelongToTheSameTask checks if an error is ErrAttachmentDoesNotBelongToTask.
func IsErrBucketDoesNotBelongToList ¶
IsErrBucketDoesNotBelongToList checks if an error is ErrBucketDoesNotBelongToList.
func IsErrBucketDoesNotExist ¶
IsErrBucketDoesNotExist checks if an error is ErrBucketDoesNotExist.
func IsErrBucketLimitExceeded ¶ added in v0.15.0
IsErrBucketLimitExceeded checks if an error is ErrBucketLimitExceeded.
func IsErrBulkTasksMustBeInSameList ¶
IsErrBulkTasksMustBeInSameList checks if an error is a ErrBulkTasksMustBeInSameList.
func IsErrBulkTasksNeedAtLeastOne ¶
IsErrBulkTasksNeedAtLeastOne checks if an error is a ErrBulkTasksNeedAtLeastOne.
func IsErrCannotDeleteLastTeamMember ¶
IsErrCannotDeleteLastTeamMember checks if an error is ErrCannotDeleteLastTeamMember.
func IsErrCannotRemoveLastBucket ¶
IsErrCannotRemoveLastBucket checks if an error is ErrCannotRemoveLastBucket.
func IsErrGenericForbidden ¶
IsErrGenericForbidden checks if an error is a ErrGenericForbidden.
func IsErrIDCannotBeZero ¶
IsErrIDCannotBeZero checks if an error is a ErrIDCannotBeZero.
func IsErrInvalidData ¶
IsErrInvalidData checks if an error is a ErrIDCannotBeZero.
func IsErrInvalidRelationKind ¶
IsErrInvalidRelationKind checks if an error is ErrInvalidRelationKind.
func IsErrInvalidRight ¶
IsErrInvalidRight checks if an error is ErrInvalidRight.
func IsErrInvalidSortOrder ¶
IsErrInvalidSortOrder checks if an error is ErrInvalidSortOrder.
func IsErrInvalidSortParam ¶
IsErrInvalidSortParam checks if an error is ErrInvalidSortParam.
func IsErrInvalidTaskField ¶
IsErrInvalidTaskField checks if an error is ErrInvalidTaskField.
func IsErrInvalidTaskFilterComparator ¶
IsErrInvalidTaskFilterComparator checks if an error is ErrInvalidTaskFilterComparator.
func IsErrInvalidTaskFilterConcatinator ¶
IsErrInvalidTaskFilterConcatinator checks if an error is ErrInvalidTaskFilterConcatinator.
func IsErrInvalidTaskFilterValue ¶ added in v0.14.0
IsErrInvalidTaskFilterValue checks if an error is ErrInvalidTaskFilterValue.
func IsErrLabelDoesNotExist ¶
IsErrLabelDoesNotExist checks if an error is ErrLabelDoesNotExist.
func IsErrLabelIsAlreadyOnTask ¶
IsErrLabelIsAlreadyOnTask checks if an error is ErrLabelIsAlreadyOnTask.
func IsErrLinkSharePasswordInvalid ¶ added in v0.17.0
IsErrLinkSharePasswordInvalid checks if an error is ErrLinkSharePasswordInvalid.
func IsErrLinkSharePasswordRequired ¶ added in v0.17.0
IsErrLinkSharePasswordRequired checks if an error is ErrLinkSharePasswordRequired.
func IsErrListCannotBelongToAPseudoNamespace ¶ added in v0.19.1
IsErrListCannotBelongToAPseudoNamespace checks if an error is a list is archived error.
func IsErrListDoesNotExist ¶
IsErrListDoesNotExist checks if an error is a ErrListDoesNotExist.
func IsErrListIdentifierIsNotUnique ¶
IsErrListIdentifierIsNotUnique checks if an error is a ErrListIdentifierIsNotUnique.
func IsErrListIsArchived ¶
IsErrListIsArchived checks if an error is a list is archived error.
func IsErrListMustBelongToANamespace ¶ added in v0.20.0
IsErrListMustBelongToANamespace checks if an error is a list must belong to a namespace error.
func IsErrListShareDoesNotExist ¶
IsErrListShareDoesNotExist checks if an error is a ErrListShareDoesNotExist.
func IsErrListTitleCannotBeEmpty ¶
IsErrListTitleCannotBeEmpty checks if an error is a ErrListTitleCannotBeEmpty.
func IsErrNamespaceDoesNotExist ¶
IsErrNamespaceDoesNotExist checks if an error is a ErrNamespaceDoesNotExist.
func IsErrNamespaceIsArchived ¶
IsErrNamespaceIsArchived checks if an error is a .
func IsErrNamespaceNameCannotBeEmpty ¶
IsErrNamespaceNameCannotBeEmpty checks if an error is a ErrNamespaceDoesNotExist.
func IsErrNeedToHaveListReadAccess ¶
IsErrNeedToHaveListReadAccess checks if an error is a ErrListDoesNotExist.
func IsErrNeedToHaveNamespaceReadAccess ¶
IsErrNeedToHaveNamespaceReadAccess checks if an error is a ErrNamespaceDoesNotExist.
func IsErrNoRightToSeeTask ¶
IsErrNoRightToSeeTask checks if an error is ErrNoRightToSeeTask.
func IsErrOnlyOneDoneBucketPerList ¶ added in v0.17.0
IsErrOnlyOneDoneBucketPerList checks if an error is ErrBucketLimitExceeded.
func IsErrParentTaskCannotBeTheSame ¶
IsErrParentTaskCannotBeTheSame checks if an error is ErrParentTaskCannotBeTheSame.
func IsErrRelationAlreadyExists ¶
IsErrRelationAlreadyExists checks if an error is ErrRelationAlreadyExists.
func IsErrRelationDoesNotExist ¶
IsErrRelationDoesNotExist checks if an error is ErrRelationDoesNotExist.
func IsErrRelationTasksCannotBeTheSame ¶
IsErrRelationTasksCannotBeTheSame checks if an error is ErrRelationTasksCannotBeTheSame.
func IsErrSavedFilterDoesNotExist ¶ added in v0.15.0
IsErrSavedFilterDoesNotExist checks if an error is ErrSavedFilterDoesNotExist.
func IsErrSavedFilterNotAvailableForLinkShare ¶ added in v0.15.0
IsErrSavedFilterNotAvailableForLinkShare checks if an error is ErrSavedFilterNotAvailableForLinkShare.
func IsErrSubscriptionAlreadyExists ¶ added in v0.17.0
IsErrSubscriptionAlreadyExists checks if an error is ErrSubscriptionAlreadyExists.
func IsErrTaskAttachmentDoesNotExist ¶
IsErrTaskAttachmentDoesNotExist checks if an error is ErrTaskAttachmentDoesNotExist.
func IsErrTaskAttachmentIsTooLarge ¶
IsErrTaskAttachmentIsTooLarge checks if an error is ErrTaskAttachmentIsTooLarge.
func IsErrTaskCannotBeEmpty ¶
IsErrTaskCannotBeEmpty checks if an error is a ErrListDoesNotExist.
func IsErrTaskCommentDoesNotExist ¶
IsErrTaskCommentDoesNotExist checks if an error is ErrTaskCommentDoesNotExist.
func IsErrTaskDoesNotExist ¶
IsErrTaskDoesNotExist checks if an error is a ErrListDoesNotExist.
func IsErrTeamAlreadyHasAccess ¶
IsErrTeamAlreadyHasAccess checks if an error is ErrTeamAlreadyHasAccess.
func IsErrTeamDoesNotExist ¶
IsErrTeamDoesNotExist checks if an error is ErrTeamDoesNotExist.
func IsErrTeamDoesNotHaveAccessToList ¶
IsErrTeamDoesNotHaveAccessToList checks if an error is a ErrListDoesNotExist.
func IsErrTeamDoesNotHaveAccessToNamespace ¶
IsErrTeamDoesNotHaveAccessToNamespace checks if an error is a ErrNamespaceDoesNotExist.
func IsErrTeamNameCannotBeEmpty ¶
IsErrTeamNameCannotBeEmpty checks if an error is a ErrNamespaceDoesNotExist.
func IsErrUnknownSubscriptionEntityType ¶ added in v0.17.0
IsErrUnknownSubscriptionEntityType checks if an error is ErrUnknownSubscriptionEntityType.
func IsErrUserAlreadyAssigned ¶ added in v0.20.0
IsErrUserAlreadyAssigned checks if an error is ErrUserAlreadyAssigned.
func IsErrUserAlreadyHasAccess ¶
IsErrUserAlreadyHasAccess checks if an error is ErrUserAlreadyHasAccess.
func IsErrUserAlreadyHasNamespaceAccess ¶
IsErrUserAlreadyHasNamespaceAccess checks if an error is ErrUserAlreadyHasNamespaceAccess.
func IsErrUserDoesNotHaveAccessToList ¶
IsErrUserDoesNotHaveAccessToList checks if an error is a ErrListDoesNotExist.
func IsErrUserDoesNotHaveAccessToNamespace ¶
IsErrUserDoesNotHaveAccessToNamespace checks if an error is a ErrNamespaceDoesNotExist.
func IsErrUserHasNoAccessToLabel ¶
IsErrUserHasNoAccessToLabel checks if an error is ErrUserHasNoAccessToLabel.
func IsErrUserIsMemberOfTeam ¶
IsErrUserIsMemberOfTeam checks if an error is ErrUserIsMemberOfTeam.
func ListUsersFromList ¶
ListUsersFromList returns a list with all users who have access to a list, regardless of the method which gave them access
func RegisterListeners ¶ added in v0.17.0
func RegisterListeners()
RegisterListeners registers all event listeners
func RegisterOldExportCleanupCron ¶ added in v0.18.0
func RegisterOldExportCleanupCron()
func RegisterOverdueReminderCron ¶ added in v0.17.0
func RegisterOverdueReminderCron()
RegisterOverdueReminderCron registers a function which checks once a day for tasks that are overdue and not done.
func RegisterReminderCron ¶ added in v0.16.0
func RegisterReminderCron()
RegisterReminderCron registers a cron function which runs every minute to check if any reminders are due the next minute to send emails.
func RegisterUserDeletionCron ¶ added in v0.18.0
func RegisterUserDeletionCron()
RegisterUserDeletionCron registers the cron job that actually removes users who are scheduled to delete.
func RemoveUnsplashPhoto ¶ added in v0.14.0
RemoveUnsplashPhoto removes an unsplash photo from the db
func SetListBackground ¶ added in v0.14.0
func SetListBackground(s *xorm.Session, listID int64, background *files.File, blurHash string) (err error)
SetListBackground sets a background file as list background in the db
func SetupTests ¶
func SetupTests()
SetupTests takes care of seting up the db, fixtures etc. This is an extra function to be able to call the fixtures setup from the integration tests.
func UpdateList ¶ added in v0.19.0
func VerifyLinkSharePassword ¶ added in v0.17.0
func VerifyLinkSharePassword(share *LinkSharing, password string) (err error)
VerifyLinkSharePassword checks if a password of a link share matches a provided one.
Types ¶
type Bucket ¶
type Bucket struct { // The unique, numeric id of this bucket. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"bucket"` // The title of this bucket. Title string `xorm:"text not null" valid:"required" minLength:"1" json:"title"` // The list this bucket belongs to. ListID int64 `xorm:"bigint not null" json:"list_id" param:"list"` // All tasks which belong to this bucket. Tasks []*Task `xorm:"-" json:"tasks"` // How many tasks can be at the same time on this board max Limit int64 `xorm:"default 0" json:"limit" minimum:"0" valid:"range(0|9223372036854775807)"` // If this bucket is the "done bucket". All tasks moved into this bucket will automatically marked as done. All tasks marked as done from elsewhere will be moved into this bucket. IsDoneBucket bool `xorm:"BOOL" json:"is_done_bucket"` // The position this bucket has when querying all buckets. See the tasks.position property on how to use this. Position float64 `xorm:"double null" json:"position"` // A timestamp when this bucket was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this bucket was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` // The user who initially created the bucket. CreatedBy *user.User `xorm:"-" json:"created_by" valid:"-"` CreatedByID int64 `xorm:"bigint not null" json:"-"` // Including the task collection type so we can use task filters on kanban TaskCollection `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` web.CRUDable `xorm:"-" json:"-"` }
Bucket represents a kanban bucket
func (*Bucket) Create ¶
Create creates a new bucket @Summary Create a new bucket @Description Creates a new kanban bucket on a list. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List Id" @Param bucket body models.Bucket true "The bucket object" @Success 200 {object} models.Bucket "The created bucket object." @Failure 400 {object} web.HTTPError "Invalid bucket object provided." @Failure 404 {object} web.HTTPError "The list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/buckets [put]
func (*Bucket) Delete ¶
Delete removes a bucket, but no tasks @Summary Deletes an existing bucket @Description Deletes an existing kanban bucket and dissociates all of its task. It does not delete any tasks. You cannot delete the last bucket on a list. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param listID path int true "List Id" @Param bucketID path int true "Bucket Id" @Success 200 {object} models.Message "Successfully deleted." @Failure 404 {object} web.HTTPError "The bucket does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/buckets/{bucketID} [delete]
func (*Bucket) ReadAll ¶
func (b *Bucket) ReadAll(s *xorm.Session, auth web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll returns all buckets with their tasks for a certain list @Summary Get all kanban buckets of a list @Description Returns all kanban buckets with belong to a list including their tasks. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List Id" @Param page query int false "The page number for tasks. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of tasks per bucket per page. This parameter is limited by the configured maximum of items per page." @Param s query string false "Search tasks by task text." @Param filter_by query string false "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match." @Param filter_value query string false "The value to filter for." @Param filter_comparator query string false "The comparator to use for a filter. Available values are `equals`, `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` expects comma-separated values in `filter_value`. Defaults to `equals`" @Param filter_concat query string false "The concatinator to use for filters. Available values are `and` or `or`. Defaults to `or`." @Param filter_include_nulls query string false "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`." @Success 200 {array} models.Bucket "The buckets with their tasks" @Failure 500 {object} models.Message "Internal server error" @Router /lists/{id}/buckets [get]
func (*Bucket) Update ¶
Update Updates an existing bucket @Summary Update an existing bucket @Description Updates an existing kanban bucket. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param listID path int true "List Id" @Param bucketID path int true "Bucket Id" @Param bucket body models.Bucket true "The bucket object" @Success 200 {object} models.Bucket "The created bucket object." @Failure 400 {object} web.HTTPError "Invalid bucket object provided." @Failure 404 {object} web.HTTPError "The bucket does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/buckets/{bucketID} [post]
type BulkAssignees ¶
type BulkAssignees struct { // A list with all assignees Assignees []*user.User `json:"assignees"` TaskID int64 `json:"-" param:"listtask"` web.CRUDable `json:"-"` web.Rights `json:"-"` }
BulkAssignees is a helper struct used to update multiple assignees at once.
func (*BulkAssignees) Create ¶
Create adds new assignees to a task @Summary Add multiple new assignees to a task @Description Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone. @tags assignees @Accept json @Produce json @Security JWTKeyAuth @Param assignee body models.BulkAssignees true "The array of assignees" @Param taskID path int true "Task ID" @Success 201 {object} models.TaskAssginee "The created assingees object." @Failure 400 {object} web.HTTPError "Invalid assignee object provided." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/assignees/bulk [post]
type BulkTask ¶
type BulkTask struct { // A list of task ids to update IDs []int64 `json:"task_ids"` Tasks []*Task `json:"-"` Task }
BulkTask is the definition of a bulk update task
func (*BulkTask) GetTasksByIDs ¶
GetTasksByIDs returns all tasks for a list of ids
func (*BulkTask) Update ¶
Update updates a bunch of tasks at once @Summary Update a bunch of tasks at once @Description Updates a bunch of tasks at once. This includes marking them as done. Note: although you could supply another ID, it will be ignored. Use task_ids instead. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param task body models.BulkTask true "The task object. Looks like a normal task, the only difference is it uses an array of list_ids to update." @Success 200 {object} models.Task "The updated task object." @Failure 400 {object} web.HTTPError "Invalid task object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the task (aka its list)" @Failure 500 {object} models.Message "Internal error" @Router /tasks/bulk [post]
type DataExportReadyNotification ¶ added in v0.18.0
DataExportReadyNotification represents a DataExportReadyNotification notification
func (*DataExportReadyNotification) Name ¶ added in v0.18.0
func (n *DataExportReadyNotification) Name() string
Name returns the name of the notification
func (*DataExportReadyNotification) ToDB ¶ added in v0.18.0
func (n *DataExportReadyNotification) ToDB() interface{}
ToDB returns the DataExportReadyNotification notification in a format which can be saved in the db
func (*DataExportReadyNotification) ToMail ¶ added in v0.18.0
func (n *DataExportReadyNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for DataExportReadyNotification
type DataExportRequestEvent ¶ added in v0.18.0
DataExportRequestEvent represents a DataExportRequestEvent event
func (*DataExportRequestEvent) Name ¶ added in v0.18.0
func (t *DataExportRequestEvent) Name() string
Name defines the name for DataExportRequestEvent
type DatabaseNotifications ¶ added in v0.17.0
type DatabaseNotifications struct { notifications.DatabaseNotification // Whether or not to mark this notification as read or unread. // True is read, false is unread. Read bool `xorm:"-" json:"read"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
DatabaseNotifications is a wrapper around the crud operations that come with a database notification.
func (*DatabaseNotifications) CanUpdate ¶ added in v0.17.0
CanUpdate checks if a user can mark a notification as read.
func (*DatabaseNotifications) ReadAll ¶ added in v0.17.0
func (d *DatabaseNotifications) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (ls interface{}, resultCount int, numberOfEntries int64, err error)
ReadAll returns all database notifications for a user @Summary Get all notifications for the current user @Description Returns an array with all notifications for the current user. @tags subscriptions @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Security JWTKeyAuth @Success 200 {array} notifications.DatabaseNotification "The notifications" @Failure 403 {object} web.HTTPError "Link shares cannot have notifications." @Failure 500 {object} models.Message "Internal error" @Router /notifications [get]
func (*DatabaseNotifications) Update ¶ added in v0.17.0
Update marks a notification as read. @Summary Mark a notification as (un-)read @Description Marks a notification as either read or unread. A user can only mark their own notifications as read. @tags subscriptions @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Notification ID" @Success 200 {object} models.DatabaseNotifications "The notification to mark as read." @Failure 403 {object} web.HTTPError "The user does not have access to that notification." @Failure 403 {object} web.HTTPError "Link shares cannot have notifications." @Failure 404 {object} web.HTTPError "The notification does not exist." @Failure 500 {object} models.Message "Internal error" @Router /notifications/{id} [post]
type DecreaseListCounter ¶ added in v0.17.0
type DecreaseListCounter struct { }
func (*DecreaseListCounter) Handle ¶ added in v0.17.0
func (s *DecreaseListCounter) Handle(msg *message.Message) (err error)
func (*DecreaseListCounter) Name ¶ added in v0.17.0
func (s *DecreaseListCounter) Name() string
type DecreaseNamespaceCounter ¶ added in v0.17.0
type DecreaseNamespaceCounter struct { }
DecreaseNamespaceCounter represents a listener
func (*DecreaseNamespaceCounter) Handle ¶ added in v0.17.0
func (s *DecreaseNamespaceCounter) Handle(msg *message.Message) (err error)
Hanlde is executed when the event DecreaseNamespaceCounter listens on is fired
func (*DecreaseNamespaceCounter) Name ¶ added in v0.17.0
func (s *DecreaseNamespaceCounter) Name() string
Name defines the name for the DecreaseNamespaceCounter listener
type DecreaseTaskCounter ¶ added in v0.17.0
type DecreaseTaskCounter struct { }
DecreaseTaskCounter represents a listener
func (*DecreaseTaskCounter) Handle ¶ added in v0.17.0
func (s *DecreaseTaskCounter) Handle(msg *message.Message) (err error)
Handle is executed when the event DecreaseTaskCounter listens on is fired
func (*DecreaseTaskCounter) Name ¶ added in v0.17.0
func (s *DecreaseTaskCounter) Name() string
Name defines the name for the DecreaseTaskCounter listener
type DecreaseTeamCounter ¶ added in v0.17.0
type DecreaseTeamCounter struct { }
DecreaseTeamCounter represents a listener
func (*DecreaseTeamCounter) Handle ¶ added in v0.17.0
func (s *DecreaseTeamCounter) Handle(msg *message.Message) (err error)
Hanlde is executed when the event DecreaseTeamCounter listens on is fired
func (*DecreaseTeamCounter) Name ¶ added in v0.17.0
func (s *DecreaseTeamCounter) Name() string
Name defines the name for the DecreaseTeamCounter listener
type ErrAttachmentDoesNotBelongToTask ¶ added in v0.20.0
ErrAttachmentDoesNotBelongToTask represents an error where the provided task cover attachment does not belong to the same task
func (ErrAttachmentDoesNotBelongToTask) Error ¶ added in v0.20.0
func (err ErrAttachmentDoesNotBelongToTask) Error() string
func (ErrAttachmentDoesNotBelongToTask) HTTPError ¶ added in v0.20.0
func (err ErrAttachmentDoesNotBelongToTask) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrBucketDoesNotBelongToList ¶
ErrBucketDoesNotBelongToList represents an error where a kanban bucket does not belong to a list
func (ErrBucketDoesNotBelongToList) Error ¶
func (err ErrBucketDoesNotBelongToList) Error() string
func (ErrBucketDoesNotBelongToList) HTTPError ¶
func (err ErrBucketDoesNotBelongToList) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrBucketDoesNotExist ¶
type ErrBucketDoesNotExist struct {
BucketID int64
}
ErrBucketDoesNotExist represents an error where a kanban bucket does not exist
func (ErrBucketDoesNotExist) Error ¶
func (err ErrBucketDoesNotExist) Error() string
func (ErrBucketDoesNotExist) HTTPError ¶
func (err ErrBucketDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrBucketLimitExceeded ¶ added in v0.15.0
ErrBucketLimitExceeded represents an error where a task is being created or moved to a bucket which has its limit already exceeded.
func (ErrBucketLimitExceeded) Error ¶ added in v0.15.0
func (err ErrBucketLimitExceeded) Error() string
func (ErrBucketLimitExceeded) HTTPError ¶ added in v0.15.0
func (err ErrBucketLimitExceeded) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrBulkTasksMustBeInSameList ¶
ErrBulkTasksMustBeInSameList represents a "ErrBulkTasksMustBeInSameList" kind of error.
func (ErrBulkTasksMustBeInSameList) Error ¶
func (err ErrBulkTasksMustBeInSameList) Error() string
func (ErrBulkTasksMustBeInSameList) HTTPError ¶
func (err ErrBulkTasksMustBeInSameList) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrBulkTasksNeedAtLeastOne ¶
type ErrBulkTasksNeedAtLeastOne struct{}
ErrBulkTasksNeedAtLeastOne represents a "ErrBulkTasksNeedAtLeastOne" kind of error.
func (ErrBulkTasksNeedAtLeastOne) Error ¶
func (err ErrBulkTasksNeedAtLeastOne) Error() string
func (ErrBulkTasksNeedAtLeastOne) HTTPError ¶
func (err ErrBulkTasksNeedAtLeastOne) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrCannotDeleteLastTeamMember ¶
ErrCannotDeleteLastTeamMember represents an error where a user wants to delete the last member of a team (probably himself)
func (ErrCannotDeleteLastTeamMember) Error ¶
func (err ErrCannotDeleteLastTeamMember) Error() string
func (ErrCannotDeleteLastTeamMember) HTTPError ¶
func (err ErrCannotDeleteLastTeamMember) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrCannotRemoveLastBucket ¶
ErrCannotRemoveLastBucket represents an error where a kanban bucket is the last on a list and thus cannot be removed.
func (ErrCannotRemoveLastBucket) Error ¶
func (err ErrCannotRemoveLastBucket) Error() string
func (ErrCannotRemoveLastBucket) HTTPError ¶
func (err ErrCannotRemoveLastBucket) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrGenericForbidden ¶
type ErrGenericForbidden struct{}
ErrGenericForbidden represents a "UsernameAlreadyExists" kind of error.
func (ErrGenericForbidden) Error ¶
func (err ErrGenericForbidden) Error() string
func (ErrGenericForbidden) HTTPError ¶
func (err ErrGenericForbidden) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrIDCannotBeZero ¶
type ErrIDCannotBeZero struct{}
ErrIDCannotBeZero represents a "IDCannotBeZero" kind of error. Used if an ID (of something, not defined) is 0 where it should not.
func (ErrIDCannotBeZero) Error ¶
func (err ErrIDCannotBeZero) Error() string
func (ErrIDCannotBeZero) HTTPError ¶
func (err ErrIDCannotBeZero) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidData ¶
type ErrInvalidData struct {
Message string
}
ErrInvalidData represents a "ErrInvalidData" kind of error. Used when a struct is invalid -> validation failed.
func (ErrInvalidData) Error ¶
func (err ErrInvalidData) Error() string
func (ErrInvalidData) HTTPError ¶
func (err ErrInvalidData) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidRelationKind ¶
type ErrInvalidRelationKind struct {
Kind RelationKind
}
ErrInvalidRelationKind represents an error where the user tries to use an invalid relation kind
func (ErrInvalidRelationKind) Error ¶
func (err ErrInvalidRelationKind) Error() string
func (ErrInvalidRelationKind) HTTPError ¶
func (err ErrInvalidRelationKind) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidRight ¶
type ErrInvalidRight struct {
Right Right
}
ErrInvalidRight represents an error where a right is invalid
func (ErrInvalidRight) Error ¶
func (err ErrInvalidRight) Error() string
func (ErrInvalidRight) HTTPError ¶
func (err ErrInvalidRight) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidSortOrder ¶
type ErrInvalidSortOrder struct {
OrderBy sortOrder
}
ErrInvalidSortOrder represents an error where the provided sort order is invalid
func (ErrInvalidSortOrder) Error ¶
func (err ErrInvalidSortOrder) Error() string
func (ErrInvalidSortOrder) HTTPError ¶
func (err ErrInvalidSortOrder) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidSortParam ¶
type ErrInvalidSortParam struct {
SortBy string
}
ErrInvalidSortParam represents an error where the provided sort param is invalid
func (ErrInvalidSortParam) Error ¶
func (err ErrInvalidSortParam) Error() string
func (ErrInvalidSortParam) HTTPError ¶
func (err ErrInvalidSortParam) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidTaskField ¶
type ErrInvalidTaskField struct {
TaskField string
}
ErrInvalidTaskField represents an error where the provided task field is invalid
func (ErrInvalidTaskField) Error ¶
func (err ErrInvalidTaskField) Error() string
func (ErrInvalidTaskField) HTTPError ¶
func (err ErrInvalidTaskField) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidTaskFilterComparator ¶
type ErrInvalidTaskFilterComparator struct {
Comparator taskFilterComparator
}
ErrInvalidTaskFilterComparator represents an error where the provided task field is invalid
func (ErrInvalidTaskFilterComparator) Error ¶
func (err ErrInvalidTaskFilterComparator) Error() string
func (ErrInvalidTaskFilterComparator) HTTPError ¶
func (err ErrInvalidTaskFilterComparator) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidTaskFilterConcatinator ¶
type ErrInvalidTaskFilterConcatinator struct {
Concatinator taskFilterConcatinator
}
ErrInvalidTaskFilterConcatinator represents an error where the provided task field is invalid
func (ErrInvalidTaskFilterConcatinator) Error ¶
func (err ErrInvalidTaskFilterConcatinator) Error() string
func (ErrInvalidTaskFilterConcatinator) HTTPError ¶
func (err ErrInvalidTaskFilterConcatinator) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrInvalidTaskFilterValue ¶ added in v0.14.0
type ErrInvalidTaskFilterValue struct { Value interface{} Field string }
ErrInvalidTaskFilterValue represents an error where the provided task filter value is invalid
func (ErrInvalidTaskFilterValue) Error ¶ added in v0.14.0
func (err ErrInvalidTaskFilterValue) Error() string
func (ErrInvalidTaskFilterValue) HTTPError ¶ added in v0.14.0
func (err ErrInvalidTaskFilterValue) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrLabelDoesNotExist ¶
type ErrLabelDoesNotExist struct {
LabelID int64
}
ErrLabelDoesNotExist represents an error where a label does not exist
func (ErrLabelDoesNotExist) Error ¶
func (err ErrLabelDoesNotExist) Error() string
func (ErrLabelDoesNotExist) HTTPError ¶
func (err ErrLabelDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrLabelIsAlreadyOnTask ¶
ErrLabelIsAlreadyOnTask represents an error where a label is already bound to a task
func (ErrLabelIsAlreadyOnTask) Error ¶
func (err ErrLabelIsAlreadyOnTask) Error() string
func (ErrLabelIsAlreadyOnTask) HTTPError ¶
func (err ErrLabelIsAlreadyOnTask) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrLinkSharePasswordInvalid ¶ added in v0.17.0
type ErrLinkSharePasswordInvalid struct {
}ErrLinkSharePasswordInvalid represents an error where a subscription entity type is unknown
func (*ErrLinkSharePasswordInvalid) Error ¶ added in v0.17.0
func (err *ErrLinkSharePasswordInvalid) Error() string
func (ErrLinkSharePasswordInvalid) HTTPError ¶ added in v0.17.0
func (err ErrLinkSharePasswordInvalid) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrLinkSharePasswordRequired ¶ added in v0.17.0
type ErrLinkSharePasswordRequired struct {
}ErrLinkSharePasswordRequired represents an error where a link share authentication requires a password and none was provided
func (*ErrLinkSharePasswordRequired) Error ¶ added in v0.17.0
func (err *ErrLinkSharePasswordRequired) Error() string
func (ErrLinkSharePasswordRequired) HTTPError ¶ added in v0.17.0
func (err ErrLinkSharePasswordRequired) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListCannotBelongToAPseudoNamespace ¶ added in v0.19.1
ErrListCannotBelongToAPseudoNamespace represents an error where a list cannot belong to a pseudo namespace
func (*ErrListCannotBelongToAPseudoNamespace) Error ¶ added in v0.19.1
func (err *ErrListCannotBelongToAPseudoNamespace) Error() string
func (*ErrListCannotBelongToAPseudoNamespace) HTTPError ¶ added in v0.19.1
func (err *ErrListCannotBelongToAPseudoNamespace) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListDoesNotExist ¶
type ErrListDoesNotExist struct {
ID int64
}
ErrListDoesNotExist represents a "ErrListDoesNotExist" kind of error. Used if the list does not exist.
func (ErrListDoesNotExist) Error ¶
func (err ErrListDoesNotExist) Error() string
func (ErrListDoesNotExist) HTTPError ¶
func (err ErrListDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListIdentifierIsNotUnique ¶
type ErrListIdentifierIsNotUnique struct {
Identifier string
}
ErrListIdentifierIsNotUnique represents a "ErrListIdentifierIsNotUnique" kind of error. Used if the provided list identifier is not unique.
func (ErrListIdentifierIsNotUnique) Error ¶
func (err ErrListIdentifierIsNotUnique) Error() string
func (ErrListIdentifierIsNotUnique) HTTPError ¶
func (err ErrListIdentifierIsNotUnique) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListIsArchived ¶
type ErrListIsArchived struct {
ListID int64
}
ErrListIsArchived represents an error, where a list is archived
func (ErrListIsArchived) Error ¶
func (err ErrListIsArchived) Error() string
func (ErrListIsArchived) HTTPError ¶
func (err ErrListIsArchived) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListMustBelongToANamespace ¶ added in v0.20.0
ErrListMustBelongToANamespace represents an error where a list must belong to a namespace
func (*ErrListMustBelongToANamespace) Error ¶ added in v0.20.0
func (err *ErrListMustBelongToANamespace) Error() string
func (*ErrListMustBelongToANamespace) HTTPError ¶ added in v0.20.0
func (err *ErrListMustBelongToANamespace) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListShareDoesNotExist ¶
type ErrListShareDoesNotExist struct {}
ErrListShareDoesNotExist represents a "ErrListShareDoesNotExist" kind of error. Used if the list share does not exist.
func (ErrListShareDoesNotExist) Error ¶
func (err ErrListShareDoesNotExist) Error() string
func (ErrListShareDoesNotExist) HTTPError ¶
func (err ErrListShareDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrListTitleCannotBeEmpty ¶
type ErrListTitleCannotBeEmpty struct{}
ErrListTitleCannotBeEmpty represents a "ErrListTitleCannotBeEmpty" kind of error. Used if the list does not exist.
func (ErrListTitleCannotBeEmpty) Error ¶
func (err ErrListTitleCannotBeEmpty) Error() string
func (ErrListTitleCannotBeEmpty) HTTPError ¶
func (err ErrListTitleCannotBeEmpty) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNamespaceDoesNotExist ¶
type ErrNamespaceDoesNotExist struct {
ID int64
}
ErrNamespaceDoesNotExist represents a "ErrNamespaceDoesNotExist" kind of error. Used if the namespace does not exist.
func (ErrNamespaceDoesNotExist) Error ¶
func (err ErrNamespaceDoesNotExist) Error() string
func (ErrNamespaceDoesNotExist) HTTPError ¶
func (err ErrNamespaceDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNamespaceIsArchived ¶
type ErrNamespaceIsArchived struct {
NamespaceID int64
}
ErrNamespaceIsArchived represents an error where a namespace is archived
func (ErrNamespaceIsArchived) Error ¶
func (err ErrNamespaceIsArchived) Error() string
func (ErrNamespaceIsArchived) HTTPError ¶
func (err ErrNamespaceIsArchived) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNamespaceNameCannotBeEmpty ¶
ErrNamespaceNameCannotBeEmpty represents an error, where a namespace name is empty.
func (ErrNamespaceNameCannotBeEmpty) Error ¶
func (err ErrNamespaceNameCannotBeEmpty) Error() string
func (ErrNamespaceNameCannotBeEmpty) HTTPError ¶
func (err ErrNamespaceNameCannotBeEmpty) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNeedToHaveListReadAccess ¶
ErrNeedToHaveListReadAccess represents an error, where the user dont has read access to that List
func (ErrNeedToHaveListReadAccess) Error ¶
func (err ErrNeedToHaveListReadAccess) Error() string
func (ErrNeedToHaveListReadAccess) HTTPError ¶
func (err ErrNeedToHaveListReadAccess) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNeedToHaveNamespaceReadAccess ¶
ErrNeedToHaveNamespaceReadAccess represents an error, where the user is not the owner of that namespace (used i.e. when deleting a namespace)
func (ErrNeedToHaveNamespaceReadAccess) Error ¶
func (err ErrNeedToHaveNamespaceReadAccess) Error() string
func (ErrNeedToHaveNamespaceReadAccess) HTTPError ¶
func (err ErrNeedToHaveNamespaceReadAccess) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrNoRightToSeeTask ¶
ErrNoRightToSeeTask represents an error where a user does not have the right to see a task
func (ErrNoRightToSeeTask) Error ¶
func (err ErrNoRightToSeeTask) Error() string
func (ErrNoRightToSeeTask) HTTPError ¶
func (err ErrNoRightToSeeTask) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrOnlyOneDoneBucketPerList ¶ added in v0.17.0
ErrOnlyOneDoneBucketPerList represents an error where a bucket is set to the done bucket but one already exists for its list.
func (*ErrOnlyOneDoneBucketPerList) Error ¶ added in v0.17.0
func (err *ErrOnlyOneDoneBucketPerList) Error() string
func (*ErrOnlyOneDoneBucketPerList) HTTPError ¶ added in v0.17.0
func (err *ErrOnlyOneDoneBucketPerList) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrParentTaskCannotBeTheSame ¶
type ErrParentTaskCannotBeTheSame struct {
TaskID int64
}
ErrParentTaskCannotBeTheSame represents an error where the user tries to set a tasks parent as the same
func (ErrParentTaskCannotBeTheSame) Error ¶
func (err ErrParentTaskCannotBeTheSame) Error() string
func (ErrParentTaskCannotBeTheSame) HTTPError ¶
func (err ErrParentTaskCannotBeTheSame) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrRelationAlreadyExists ¶
type ErrRelationAlreadyExists struct { Kind RelationKind TaskID int64 OtherTaskID int64 }
ErrRelationAlreadyExists represents an error where the user tries to create an already existing relation
func (ErrRelationAlreadyExists) Error ¶
func (err ErrRelationAlreadyExists) Error() string
func (ErrRelationAlreadyExists) HTTPError ¶
func (err ErrRelationAlreadyExists) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrRelationDoesNotExist ¶
type ErrRelationDoesNotExist struct { Kind RelationKind TaskID int64 OtherTaskID int64 }
ErrRelationDoesNotExist represents an error where a task relation does not exist.
func (ErrRelationDoesNotExist) Error ¶
func (err ErrRelationDoesNotExist) Error() string
func (ErrRelationDoesNotExist) HTTPError ¶
func (err ErrRelationDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrRelationTasksCannotBeTheSame ¶
ErrRelationTasksCannotBeTheSame represents an error where the user tries to relate a task with itself
func (ErrRelationTasksCannotBeTheSame) Error ¶
func (err ErrRelationTasksCannotBeTheSame) Error() string
func (ErrRelationTasksCannotBeTheSame) HTTPError ¶
func (err ErrRelationTasksCannotBeTheSame) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrSavedFilterDoesNotExist ¶ added in v0.15.0
type ErrSavedFilterDoesNotExist struct {
SavedFilterID int64
}
ErrSavedFilterDoesNotExist represents an error where a kanban bucket does not exist
func (ErrSavedFilterDoesNotExist) Error ¶ added in v0.15.0
func (err ErrSavedFilterDoesNotExist) Error() string
func (ErrSavedFilterDoesNotExist) HTTPError ¶ added in v0.15.0
func (err ErrSavedFilterDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrSavedFilterNotAvailableForLinkShare ¶ added in v0.15.0
type ErrSavedFilterNotAvailableForLinkShare struct {}
ErrSavedFilterNotAvailableForLinkShare represents an error where a kanban bucket does not exist
func (ErrSavedFilterNotAvailableForLinkShare) Error ¶ added in v0.15.0
func (err ErrSavedFilterNotAvailableForLinkShare) Error() string
func (ErrSavedFilterNotAvailableForLinkShare) HTTPError ¶ added in v0.15.0
func (err ErrSavedFilterNotAvailableForLinkShare) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrSubscriptionAlreadyExists ¶ added in v0.17.0
type ErrSubscriptionAlreadyExists struct { EntityID int64 EntityType SubscriptionEntityType UserID int64 }
ErrSubscriptionAlreadyExists represents an error where a subscription entity already exists
func (*ErrSubscriptionAlreadyExists) Error ¶ added in v0.17.0
func (err *ErrSubscriptionAlreadyExists) Error() string
func (ErrSubscriptionAlreadyExists) HTTPError ¶ added in v0.17.0
func (err ErrSubscriptionAlreadyExists) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTaskAttachmentDoesNotExist ¶
ErrTaskAttachmentDoesNotExist represents an error where the user tries to relate a task with itself
func (ErrTaskAttachmentDoesNotExist) Error ¶
func (err ErrTaskAttachmentDoesNotExist) Error() string
func (ErrTaskAttachmentDoesNotExist) HTTPError ¶
func (err ErrTaskAttachmentDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTaskAttachmentIsTooLarge ¶
type ErrTaskAttachmentIsTooLarge struct {
Size uint64
}
ErrTaskAttachmentIsTooLarge represents an error where the user tries to relate a task with itself
func (ErrTaskAttachmentIsTooLarge) Error ¶
func (err ErrTaskAttachmentIsTooLarge) Error() string
func (ErrTaskAttachmentIsTooLarge) HTTPError ¶
func (err ErrTaskAttachmentIsTooLarge) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTaskCannotBeEmpty ¶
type ErrTaskCannotBeEmpty struct{}
ErrTaskCannotBeEmpty represents a "ErrListDoesNotExist" kind of error. Used if the list does not exist.
func (ErrTaskCannotBeEmpty) Error ¶
func (err ErrTaskCannotBeEmpty) Error() string
func (ErrTaskCannotBeEmpty) HTTPError ¶
func (err ErrTaskCannotBeEmpty) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTaskCommentDoesNotExist ¶
ErrTaskCommentDoesNotExist represents an error where a task comment does not exist
func (ErrTaskCommentDoesNotExist) Error ¶
func (err ErrTaskCommentDoesNotExist) Error() string
func (ErrTaskCommentDoesNotExist) HTTPError ¶
func (err ErrTaskCommentDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTaskDoesNotExist ¶
type ErrTaskDoesNotExist struct {
ID int64
}
ErrTaskDoesNotExist represents a "ErrListDoesNotExist" kind of error. Used if the list does not exist.
func (ErrTaskDoesNotExist) Error ¶
func (err ErrTaskDoesNotExist) Error() string
func (ErrTaskDoesNotExist) HTTPError ¶
func (err ErrTaskDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTeamAlreadyHasAccess ¶
ErrTeamAlreadyHasAccess represents an error where a team already has access to a list/namespace
func (ErrTeamAlreadyHasAccess) Error ¶
func (err ErrTeamAlreadyHasAccess) Error() string
func (ErrTeamAlreadyHasAccess) HTTPError ¶
func (err ErrTeamAlreadyHasAccess) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTeamDoesNotExist ¶
type ErrTeamDoesNotExist struct {
TeamID int64
}
ErrTeamDoesNotExist represents an error where a team does not exist
func (ErrTeamDoesNotExist) Error ¶
func (err ErrTeamDoesNotExist) Error() string
func (ErrTeamDoesNotExist) HTTPError ¶
func (err ErrTeamDoesNotExist) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTeamDoesNotHaveAccessToList ¶
ErrTeamDoesNotHaveAccessToList represents an error, where the Team is not the owner of that List (used i.e. when deleting a List)
func (ErrTeamDoesNotHaveAccessToList) Error ¶
func (err ErrTeamDoesNotHaveAccessToList) Error() string
func (ErrTeamDoesNotHaveAccessToList) HTTPError ¶
func (err ErrTeamDoesNotHaveAccessToList) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTeamDoesNotHaveAccessToNamespace ¶
ErrTeamDoesNotHaveAccessToNamespace represents an error, where the Team is not the owner of that namespace (used i.e. when deleting a namespace)
func (ErrTeamDoesNotHaveAccessToNamespace) Error ¶
func (err ErrTeamDoesNotHaveAccessToNamespace) Error() string
func (ErrTeamDoesNotHaveAccessToNamespace) HTTPError ¶
func (err ErrTeamDoesNotHaveAccessToNamespace) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrTeamNameCannotBeEmpty ¶
type ErrTeamNameCannotBeEmpty struct {
TeamID int64
}
ErrTeamNameCannotBeEmpty represents an error where a team name is empty.
func (ErrTeamNameCannotBeEmpty) Error ¶
func (err ErrTeamNameCannotBeEmpty) Error() string
func (ErrTeamNameCannotBeEmpty) HTTPError ¶
func (err ErrTeamNameCannotBeEmpty) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUnknownSubscriptionEntityType ¶ added in v0.17.0
type ErrUnknownSubscriptionEntityType struct {
EntityType SubscriptionEntityType
}
ErrUnknownSubscriptionEntityType represents an error where a subscription entity type is unknown
func (*ErrUnknownSubscriptionEntityType) Error ¶ added in v0.17.0
func (err *ErrUnknownSubscriptionEntityType) Error() string
func (ErrUnknownSubscriptionEntityType) HTTPError ¶ added in v0.17.0
func (err ErrUnknownSubscriptionEntityType) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserAlreadyAssigned ¶ added in v0.20.0
ErrUserAlreadyAssigned represents an error where the user is already assigned to this task
func (ErrUserAlreadyAssigned) Error ¶ added in v0.20.0
func (err ErrUserAlreadyAssigned) Error() string
func (ErrUserAlreadyAssigned) HTTPError ¶ added in v0.20.0
func (err ErrUserAlreadyAssigned) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserAlreadyHasAccess ¶
ErrUserAlreadyHasAccess represents an error where a user already has access to a list/namespace
func (ErrUserAlreadyHasAccess) Error ¶
func (err ErrUserAlreadyHasAccess) Error() string
func (ErrUserAlreadyHasAccess) HTTPError ¶
func (err ErrUserAlreadyHasAccess) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserAlreadyHasNamespaceAccess ¶
ErrUserAlreadyHasNamespaceAccess represents an error where a user already has access to a namespace
func (ErrUserAlreadyHasNamespaceAccess) Error ¶
func (err ErrUserAlreadyHasNamespaceAccess) Error() string
func (ErrUserAlreadyHasNamespaceAccess) HTTPError ¶
func (err ErrUserAlreadyHasNamespaceAccess) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserDoesNotHaveAccessToList ¶
ErrUserDoesNotHaveAccessToList represents an error, where the user is not the owner of that List (used i.e. when deleting a List)
func (ErrUserDoesNotHaveAccessToList) Error ¶
func (err ErrUserDoesNotHaveAccessToList) Error() string
func (ErrUserDoesNotHaveAccessToList) HTTPError ¶
func (err ErrUserDoesNotHaveAccessToList) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserDoesNotHaveAccessToNamespace ¶
ErrUserDoesNotHaveAccessToNamespace represents an error, where the user is not the owner of that namespace (used i.e. when deleting a namespace)
func (ErrUserDoesNotHaveAccessToNamespace) Error ¶
func (err ErrUserDoesNotHaveAccessToNamespace) Error() string
func (ErrUserDoesNotHaveAccessToNamespace) HTTPError ¶
func (err ErrUserDoesNotHaveAccessToNamespace) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserHasNoAccessToLabel ¶
ErrUserHasNoAccessToLabel represents an error where a user does not have the right to see a label
func (ErrUserHasNoAccessToLabel) Error ¶
func (err ErrUserHasNoAccessToLabel) Error() string
func (ErrUserHasNoAccessToLabel) HTTPError ¶
func (err ErrUserHasNoAccessToLabel) HTTPError() web.HTTPError
HTTPError holds the http error description
type ErrUserIsMemberOfTeam ¶
ErrUserIsMemberOfTeam represents an error where a user is already member of a team.
func (ErrUserIsMemberOfTeam) Error ¶
func (err ErrUserIsMemberOfTeam) Error() string
func (ErrUserIsMemberOfTeam) HTTPError ¶
func (err ErrUserIsMemberOfTeam) HTTPError() web.HTTPError
HTTPError holds the http error description
type Favorite ¶ added in v0.18.0
type Favorite struct { EntityID int64 `xorm:"bigint not null pk"` UserID int64 `xorm:"bigint not null pk"` Kind FavoriteKind `xorm:"int not null pk"` }
Favorite represents an entity which is a favorite to someone
type FavoriteKind ¶ added in v0.18.0
type FavoriteKind int
FavoriteKind represents the kind of entities that can be marked as favorite
const ( FavoriteKindUnknown FavoriteKind = iota FavoriteKindTask FavoriteKindList )
type HandleTaskCommentEditMentions ¶ added in v0.18.0
type HandleTaskCommentEditMentions struct { }
HandleTaskCommentEditMentions represents a listener
func (*HandleTaskCommentEditMentions) Handle ¶ added in v0.18.0
func (s *HandleTaskCommentEditMentions) Handle(msg *message.Message) (err error)
Handle is executed when the event HandleTaskCommentEditMentions listens on is fired
func (*HandleTaskCommentEditMentions) Name ¶ added in v0.18.0
func (s *HandleTaskCommentEditMentions) Name() string
Name defines the name for the HandleTaskCommentEditMentions listener
type HandleTaskCreateMentions ¶ added in v0.18.0
type HandleTaskCreateMentions struct { }
HandleTaskCreateMentions represents a listener
func (*HandleTaskCreateMentions) Handle ¶ added in v0.18.0
func (s *HandleTaskCreateMentions) Handle(msg *message.Message) (err error)
Handle is executed when the event HandleTaskCreateMentions listens on is fired
func (*HandleTaskCreateMentions) Name ¶ added in v0.18.0
func (s *HandleTaskCreateMentions) Name() string
Name defines the name for the HandleTaskCreateMentions listener
type HandleTaskUpdateLastUpdated ¶ added in v0.20.3
type HandleTaskUpdateLastUpdated struct { }
HandleTaskUpdateLastUpdated represents a listener
func (*HandleTaskUpdateLastUpdated) Handle ¶ added in v0.20.3
func (s *HandleTaskUpdateLastUpdated) Handle(msg *message.Message) (err error)
Handle is executed when the event HandleTaskUpdateLastUpdated listens on is fired
func (*HandleTaskUpdateLastUpdated) Name ¶ added in v0.20.3
func (s *HandleTaskUpdateLastUpdated) Name() string
Name defines the name for the HandleTaskUpdateLastUpdated listener
type HandleTaskUpdatedMentions ¶ added in v0.18.0
type HandleTaskUpdatedMentions struct { }
HandleTaskUpdatedMentions represents a listener
func (*HandleTaskUpdatedMentions) Handle ¶ added in v0.18.0
func (s *HandleTaskUpdatedMentions) Handle(msg *message.Message) (err error)
Handle is executed when the event HandleTaskUpdatedMentions listens on is fired
func (*HandleTaskUpdatedMentions) Name ¶ added in v0.18.0
func (s *HandleTaskUpdatedMentions) Name() string
Name defines the name for the HandleTaskUpdatedMentions listener
type HandleUserDataExport ¶ added in v0.18.0
type HandleUserDataExport struct { }
HandleUserDataExport represents a listener
func (*HandleUserDataExport) Handle ¶ added in v0.18.0
func (s *HandleUserDataExport) Handle(msg *message.Message) (err error)
Handle is executed when the event HandleUserDataExport listens on is fired
func (*HandleUserDataExport) Name ¶ added in v0.18.0
func (s *HandleUserDataExport) Name() string
Name defines the name for the HandleUserDataExport listener
type IncreaseListCounter ¶ added in v0.17.0
type IncreaseListCounter struct { }
func (*IncreaseListCounter) Handle ¶ added in v0.17.0
func (s *IncreaseListCounter) Handle(msg *message.Message) (err error)
func (*IncreaseListCounter) Name ¶ added in v0.17.0
func (s *IncreaseListCounter) Name() string
type IncreaseNamespaceCounter ¶ added in v0.17.0
type IncreaseNamespaceCounter struct { }
IncreaseNamespaceCounter represents a listener
func (*IncreaseNamespaceCounter) Handle ¶ added in v0.17.0
func (s *IncreaseNamespaceCounter) Handle(msg *message.Message) (err error)
Hanlde is executed when the event IncreaseNamespaceCounter listens on is fired
func (*IncreaseNamespaceCounter) Name ¶ added in v0.17.0
func (s *IncreaseNamespaceCounter) Name() string
Name defines the name for the IncreaseNamespaceCounter listener
type IncreaseTaskCounter ¶ added in v0.17.0
type IncreaseTaskCounter struct { }
IncreaseTaskCounter represents a listener
func (*IncreaseTaskCounter) Handle ¶ added in v0.17.0
func (s *IncreaseTaskCounter) Handle(msg *message.Message) (err error)
Handle is executed when the event IncreaseTaskCounter listens on is fired
func (*IncreaseTaskCounter) Name ¶ added in v0.17.0
func (s *IncreaseTaskCounter) Name() string
Name defines the name for the IncreaseTaskCounter listener
type IncreaseTeamCounter ¶ added in v0.17.0
type IncreaseTeamCounter struct { }
IncreaseTeamCounter represents a listener
func (*IncreaseTeamCounter) Handle ¶ added in v0.17.0
func (s *IncreaseTeamCounter) Handle(msg *message.Message) (err error)
Hanlde is executed when the event IncreaseTeamCounter listens on is fired
func (*IncreaseTeamCounter) Name ¶ added in v0.17.0
func (s *IncreaseTeamCounter) Name() string
Name defines the name for the IncreaseTeamCounter listener
type Label ¶
type Label struct { // The unique, numeric id of this label. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"label"` // The title of the lable. You'll see this one on tasks associated with it. Title string `xorm:"varchar(250) not null" json:"title" valid:"runelength(1|250)" minLength:"1" maxLength:"250"` // The label description. Description string `xorm:"longtext null" json:"description"` // The color this label has HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"` CreatedByID int64 `xorm:"bigint not null" json:"-"` // The user who created this label CreatedBy *user.User `xorm:"-" json:"created_by"` // A timestamp when this label was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this label was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
Label represents a label
func GetLabelSimple ¶ added in v0.20.3
func (*Label) Create ¶
Create creates a new label @Summary Create a label @Description Creates a new label. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param label body models.Label true "The label object" @Success 201 {object} models.Label "The created label object." @Failure 400 {object} web.HTTPError "Invalid label object provided." @Failure 500 {object} models.Message "Internal error" @Router /labels [put]
func (*Label) Delete ¶
Delete deletes a label @Summary Delete a label @Description Delete an existing label. The user needs to be the creator of the label to be able to do this. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Label ID" @Success 200 {object} models.Label "The label was successfully deleted." @Failure 403 {object} web.HTTPError "Not allowed to delete the label." @Failure 404 {object} web.HTTPError "Label not found." @Failure 500 {object} models.Message "Internal error" @Router /labels/{id} [delete]
func (*Label) ReadAll ¶
func (l *Label) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (ls interface{}, resultCount int, numberOfEntries int64, err error)
ReadAll gets all labels a user can use @Summary Get all labels a user has access to @Description Returns all labels which are either created by the user or associated with a task the user has at least read-access to. @tags labels @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search labels by label text." @Security JWTKeyAuth @Success 200 {array} models.Label "The labels" @Failure 500 {object} models.Message "Internal error" @Router /labels [get]
func (*Label) ReadOne ¶
ReadOne gets one label @Summary Gets one label @Description Returns one label by its ID. @tags labels @Accept json @Produce json @Param id path int true "Label ID" @Security JWTKeyAuth @Success 200 {object} models.Label "The label" @Failure 403 {object} web.HTTPError "The user does not have access to the label" @Failure 404 {object} web.HTTPError "Label not found" @Failure 500 {object} models.Message "Internal error" @Router /labels/{id} [get]
func (*Label) Update ¶
Update updates a label @Summary Update a label @Description Update an existing label. The user needs to be the creator of the label to be able to do this. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Label ID" @Param label body models.Label true "The label object" @Success 200 {object} models.Label "The created label object." @Failure 400 {object} web.HTTPError "Invalid label object provided." @Failure 403 {object} web.HTTPError "Not allowed to update the label." @Failure 404 {object} web.HTTPError "Label not found." @Failure 500 {object} models.Message "Internal error" @Router /labels/{id} [put]
type LabelByTaskIDsOptions ¶
type LabelByTaskIDsOptions struct { User *user.User Search []string Page int PerPage int TaskIDs []int64 GetUnusedLabels bool GroupByLabelIDsOnly bool GetForUser int64 }
LabelByTaskIDsOptions is a struct to not clutter the function with too many optional parameters.
type LabelTask ¶
type LabelTask struct { // The unique, numeric id of this label. ID int64 `xorm:"bigint autoincr not null unique pk" json:"-"` TaskID int64 `xorm:"bigint INDEX not null" json:"-" param:"listtask"` // The label id you want to associate with a task. LabelID int64 `xorm:"bigint INDEX not null" json:"label_id" param:"label"` // A timestamp when this task was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
LabelTask represents a relation between a label and a task
func (*LabelTask) Create ¶
Create adds a label to a task @Summary Add a label to a task @Description Add a label to a task. The user needs to have write-access to the list to be able do this. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param task path int true "Task ID" @Param label body models.LabelTask true "The label object" @Success 201 {object} models.LabelTask "The created label relation object." @Failure 400 {object} web.HTTPError "Invalid label object provided." @Failure 403 {object} web.HTTPError "Not allowed to add the label." @Failure 404 {object} web.HTTPError "The label does not exist." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{task}/labels [put]
func (*LabelTask) Delete ¶
Delete deletes a label on a task @Summary Remove a label from a task @Description Remove a label from a task. The user needs to have write-access to the list to be able do this. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param task path int true "Task ID" @Param label path int true "Label ID" @Success 200 {object} models.Message "The label was successfully removed." @Failure 403 {object} web.HTTPError "Not allowed to remove the label." @Failure 404 {object} web.HTTPError "Label not found." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{task}/labels/{label} [delete]
func (*LabelTask) ReadAll ¶
func (lt *LabelTask) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all labels on a task @Summary Get all labels on a task @Description Returns all labels which are assicociated with a given task. @tags labels @Accept json @Produce json @Param task path int true "Task ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search labels by label text." @Security JWTKeyAuth @Success 200 {array} models.Label "The labels" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{task}/labels [get]
type LabelTaskBulk ¶
type LabelTaskBulk struct { // All labels you want to update at once. Labels []*Label `json:"labels"` TaskID int64 `json:"-" param:"listtask"` web.CRUDable `json:"-"` web.Rights `json:"-"` }
LabelTaskBulk is a helper struct to update a bunch of labels at once
func (*LabelTaskBulk) Create ¶
Create updates a bunch of labels on a task at once @Summary Update all labels on a task. @Description Updates all labels on a task. Every label which is not passed but exists on the task will be deleted. Every label which does not exist on the task will be added. All labels which are passed and already exist on the task won't be touched. @tags labels @Accept json @Produce json @Security JWTKeyAuth @Param label body models.LabelTaskBulk true "The array of labels" @Param taskID path int true "Task ID" @Success 201 {object} models.LabelTaskBulk "The updated labels object." @Failure 400 {object} web.HTTPError "Invalid label object provided." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/labels/bulk [post]
type LabelWithTaskID ¶ added in v0.20.3
LabelWithTaskID is a helper struct, contains the label + its task ID
func GetLabelsByTaskIDs ¶ added in v0.20.3
func GetLabelsByTaskIDs(s *xorm.Session, opts *LabelByTaskIDsOptions) (ls []*LabelWithTaskID, resultCount int, totalEntries int64, err error)
GetLabelsByTaskIDs is a helper function to get all labels for a set of tasks Used when getting all labels for one task as well when getting all lables
type LinkSharing ¶
type LinkSharing struct { // The ID of the shared thing ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"share"` // The public id to get this shared list Hash string `xorm:"varchar(40) not null unique" json:"hash" param:"hash"` // The name of this link share. All actions someone takes while being authenticated with that link will appear with that name. Name string `xorm:"text null" json:"name"` // The ID of the shared list ListID int64 `xorm:"bigint not null" json:"-" param:"list"` // The right this list is shared with. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. Right Right `xorm:"bigint INDEX not null default 0" json:"right" valid:"length(0|2)" maximum:"2" default:"0"` // The kind of this link. 0 = undefined, 1 = without password, 2 = with password. SharingType SharingType `xorm:"bigint INDEX not null default 0" json:"sharing_type" valid:"length(0|2)" maximum:"2" default:"0"` // The password of this link share. You can only set it, not retrieve it after the link share has been created. Password string `xorm:"text null" json:"password"` // The user who shared this list // A timestamp when this list was shared. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this share was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
LinkSharing represents a shared list
func GetLinkShareByHash ¶
func GetLinkShareByHash(s *xorm.Session, hash string) (share *LinkSharing, err error)
GetLinkShareByHash returns a link share by hash
func GetLinkShareByID ¶ added in v0.17.0
func GetLinkShareByID(s *xorm.Session, id int64) (share *LinkSharing, err error)
GetLinkShareByID returns a link share by its id.
func GetLinkShareFromClaims ¶
func GetLinkShareFromClaims(claims jwt.MapClaims) (share *LinkSharing, err error)
GetLinkShareFromClaims builds a link sharing object from jwt claims
func (*LinkSharing) Create ¶
Create creates a new link share for a given list @Summary Share a list via link @Description Share a list via link. The user needs to have write-access to the list to be able do this. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param list path int true "List ID" @Param label body models.LinkSharing true "The new link share object" @Success 201 {object} models.LinkSharing "The created link share object." @Failure 400 {object} web.HTTPError "Invalid link share object provided." @Failure 403 {object} web.HTTPError "Not allowed to add the list share." @Failure 404 {object} web.HTTPError "The list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{list}/shares [put]
func (*LinkSharing) Delete ¶
Delete removes a link share @Summary Remove a link share @Description Remove a link share. The user needs to have write-access to the list to be able do this. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param list path int true "List ID" @Param share path int true "Share Link ID" @Success 200 {object} models.Message "The link was successfully removed." @Failure 403 {object} web.HTTPError "Not allowed to remove the link." @Failure 404 {object} web.HTTPError "Share Link not found." @Failure 500 {object} models.Message "Internal error" @Router /lists/{list}/shares/{share} [delete]
func (*LinkSharing) GetID ¶
func (share *LinkSharing) GetID() int64
GetID returns the ID of the links sharing object
func (*LinkSharing) ReadAll ¶
func (share *LinkSharing) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
ReadAll returns all shares for a given list @Summary Get all link shares for a list @Description Returns all link shares which exist for a given list @tags sharing @Accept json @Produce json @Param list path int true "List ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search shares by hash." @Security JWTKeyAuth @Success 200 {array} models.LinkSharing "The share links" @Failure 500 {object} models.Message "Internal error" @Router /lists/{list}/shares [get]
func (*LinkSharing) ReadOne ¶
ReadOne returns one share @Summary Get one link shares for a list @Description Returns one link share by its ID. @tags sharing @Accept json @Produce json @Param list path int true "List ID" @Param share path int true "Share ID" @Security JWTKeyAuth @Success 200 {object} models.LinkSharing "The share links" @Failure 403 {object} web.HTTPError "No access to the list" @Failure 404 {object} web.HTTPError "Share Link not found." @Failure 500 {object} models.Message "Internal error" @Router /lists/{list}/shares/{share} [get]
type List ¶
type List struct { // The unique, numeric id of this list. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"list"` // The title of the list. You'll see this in the namespace overview. Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The description of the list. Description string `xorm:"longtext null" json:"description"` // The unique list short identifier. Used to build task identifiers. Identifier string `xorm:"varchar(10) null" json:"identifier" valid:"runelength(0|10)" minLength:"0" maxLength:"10"` // The hex color of this list HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"` OwnerID int64 `xorm:"bigint INDEX not null" json:"-"` NamespaceID int64 `xorm:"bigint INDEX not null" json:"namespace_id" param:"namespace"` // The user who created this list. Owner *user.User `xorm:"-" json:"owner" valid:"-"` // Whether or not a list is archived. IsArchived bool `xorm:"not null default false" json:"is_archived" query:"is_archived"` // The id of the file this list has set as background BackgroundFileID int64 `xorm:"null" json:"-"` // Holds extra information about the background set since some background providers require attribution or similar. If not null, the background can be accessed at /lists/{listID}/background BackgroundInformation interface{} `xorm:"-" json:"background_information"` // Contains a very small version of the list background to use as a blurry preview until the actual background is loaded. Check out https://blurha.sh/ to learn how it works. BackgroundBlurHash string `xorm:"varchar(50) null" json:"background_blur_hash"` // True if a list is a favorite. Favorite lists show up in a separate namespace. This value depends on the user making the call to the api. IsFavorite bool `xorm:"-" json:"is_favorite"` // The subscription status for the user reading this list. You can only read this property, use the subscription endpoints to modify it. // Will only returned when retreiving one list. Subscription *Subscription `xorm:"-" json:"subscription,omitempty"` // The position this list has when querying all lists. See the tasks.position property on how to use this. Position float64 `xorm:"double null" json:"position"` // A timestamp when this list was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this list was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
List represents a list of tasks
func GetListByShareHash ¶
GetListByShareHash returns a link share by its hash
func GetListSimplByTaskID ¶
GetListSimplByTaskID gets a list by a task id
func GetListSimpleByID ¶ added in v0.16.0
GetListSimpleByID gets a list with only the basic items, aka no tasks or user objects. Returns an error if the list does not exist.
func GetListsByNamespaceID ¶
GetListsByNamespaceID gets all lists in a namespace
func (*List) CheckIsArchived ¶
CheckIsArchived returns an ErrListIsArchived or ErrNamespaceIsArchived if the list or its namespace is archived.
func (*List) Create ¶
Create implements the create method of CRUDable @Summary Creates a new list @Description Creates a new list in a given namespace. The user needs write-access to the namespace. @tags list @Accept json @Produce json @Security JWTKeyAuth @Param namespaceID path int true "Namespace ID" @Param list body models.List true "The list you want to create." @Success 201 {object} models.List "The created list." @Failure 400 {object} web.HTTPError "Invalid list object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{namespaceID}/lists [put]
func (*List) Delete ¶
Delete implements the delete method of CRUDable @Summary Deletes a list @Description Delets a list @tags list @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Success 200 {object} models.Message "The list was successfully deleted." @Failure 400 {object} web.HTTPError "Invalid list object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id} [delete]
func (*List) DeleteBackgroundFileIfExists ¶ added in v0.20.3
DeleteBackgroundFileIfExists deletes the list's background file from the db and the filesystem, if one exists
func (*List) ReadAll ¶
func (l *List) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
ReadAll gets all lists a user has access to @Summary Get all lists a user has access to @Description Returns all lists a user has access to. @tags list @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search lists by title." @Param is_archived query bool false "If true, also returns all archived lists." @Security JWTKeyAuth @Success 200 {array} models.List "The lists" @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists [get]
func (*List) ReadOne ¶
ReadOne gets one list by its ID @Summary Gets one list @Description Returns a list by its ID. @tags list @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Success 200 {object} models.List "The list" @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id} [get]
func (*List) Update ¶
Update implements the update method of CRUDable @Summary Updates a list @Description Updates a list. This does not include adding a task (see below). @tags list @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Param list body models.List true "The list with updated values you want to update." @Success 200 {object} models.List "The updated list." @Failure 400 {object} web.HTTPError "Invalid list object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id} [post]
type ListBackgroundType ¶ added in v0.14.0
type ListBackgroundType struct {
Type string
}
ListBackgroundType holds a list background type
type ListCreatedEvent ¶ added in v0.17.0
ListCreatedEvent represents an event where a list has been created
func (*ListCreatedEvent) Name ¶ added in v0.17.0
func (l *ListCreatedEvent) Name() string
Name defines the name for ListCreatedEvent
type ListCreatedNotification ¶ added in v0.17.0
ListCreatedNotification represents a ListCreatedNotification notification
func (*ListCreatedNotification) Name ¶ added in v0.17.0
func (n *ListCreatedNotification) Name() string
Name returns the name of the notification
func (*ListCreatedNotification) ToDB ¶ added in v0.17.0
func (n *ListCreatedNotification) ToDB() interface{}
ToDB returns the ListCreatedNotification notification in a format which can be saved in the db
func (*ListCreatedNotification) ToMail ¶ added in v0.17.0
func (n *ListCreatedNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for ListCreatedNotification
type ListDeletedEvent ¶ added in v0.17.0
ListDeletedEvent represents an event where a list has been deleted
func (*ListDeletedEvent) Name ¶ added in v0.17.0
func (t *ListDeletedEvent) Name() string
Name defines the name for ListDeletedEvent
type ListDuplicate ¶ added in v0.14.0
type ListDuplicate struct { // The list id of the list to duplicate ListID int64 `json:"-" param:"listid"` // The target namespace ID NamespaceID int64 `json:"namespace_id,omitempty"` // The copied list List *List `json:",omitempty"` web.Rights `json:"-"` web.CRUDable `json:"-"` }
ListDuplicate holds everything needed to duplicate a list
func (*ListDuplicate) CanCreate ¶ added in v0.14.0
CanCreate checks if a user has the right to duplicate a list
func (*ListDuplicate) Create ¶ added in v0.14.0
Create duplicates a list @Summary Duplicate an existing list @Description Copies the list, tasks, files, kanban data, assignees, comments, attachments, lables, relations, backgrounds, user/team rights and link shares from one list to a new namespace. The user needs read access in the list and write access in the namespace of the new list. @tags list @Accept json @Produce json @Security JWTKeyAuth @Param listID path int true "The list ID to duplicate" @Param list body models.ListDuplicate true "The target namespace which should hold the copied list." @Success 201 {object} models.ListDuplicate "The created list." @Failure 400 {object} web.HTTPError "Invalid list duplicate object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list or namespace" @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/duplicate [put]
type ListSharedWithTeamEvent ¶ added in v0.17.0
type ListSharedWithTeamEvent struct {}
ListSharedWithTeamEvent represents an event where a list has been shared with a team
func (*ListSharedWithTeamEvent) Name ¶ added in v0.17.0
func (l *ListSharedWithTeamEvent) Name() string
Name defines the name for ListSharedWithTeamEvent
type ListSharedWithUserEvent ¶ added in v0.17.0
type ListSharedWithUserEvent struct {}
ListSharedWithUserEvent represents an event where a list has been shared with a user
func (*ListSharedWithUserEvent) Name ¶ added in v0.17.0
func (l *ListSharedWithUserEvent) Name() string
Name defines the name for ListSharedWithUserEvent
type ListUIDs ¶
type ListUIDs struct { ListOwnerID int64 `xorm:"listOwner"` NamespaceUserID int64 `xorm:"unID"` ListUserID int64 `xorm:"ulID"` NamespaceOwnerUserID int64 `xorm:"nOwner"` TeamNamespaceUserID int64 `xorm:"tnUID"` TeamListUserID int64 `xorm:"tlUID"` }
ListUIDs hold all kinds of user IDs from accounts who have somehow access to a list
type ListUpdatedEvent ¶ added in v0.17.0
ListUpdatedEvent represents an event where a list has been updated
func (*ListUpdatedEvent) Name ¶ added in v0.17.0
func (l *ListUpdatedEvent) Name() string
Name defines the name for ListUpdatedEvent
type ListUser ¶
type ListUser struct { // The unique, numeric id of this list <-> user relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"namespace"` // The username. Username string `xorm:"-" json:"user_id" param:"user"` // Used internally to reference the user UserID int64 `xorm:"bigint not null INDEX" json:"-"` // The list id. ListID int64 `xorm:"bigint not null INDEX" json:"-" param:"list"` // The right this user has. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. Right Right `xorm:"bigint INDEX not null default 0" json:"right" valid:"length(0|2)" maximum:"2" default:"0"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this relation was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
ListUser represents a list <-> user relation
func (*ListUser) Create ¶
Create creates a new list <-> user relation @Summary Add a user to a list @Description Gives a user access to a list. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Param list body models.ListUser true "The user you want to add to the list." @Success 201 {object} models.ListUser "The created user<->list relation." @Failure 400 {object} web.HTTPError "Invalid user list object provided." @Failure 404 {object} web.HTTPError "The user does not exist." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/users [put]
func (*ListUser) Delete ¶
Delete deletes a list <-> user relation @Summary Delete a user from a list @Description Delets a user from a list. The user won't have access to the list anymore. @tags sharing @Produce json @Security JWTKeyAuth @Param listID path int true "List ID" @Param userID path int true "User ID" @Success 200 {object} models.Message "The user was successfully removed from the list." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 404 {object} web.HTTPError "user or list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/users/{userID} [delete]
func (*ListUser) ReadAll ¶
func (lu *ListUser) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all users who have access to a list @Summary Get users on a list @Description Returns a list with all users which have access on a given list. @tags sharing @Accept json @Produce json @Param id path int true "List ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search users by its name." @Security JWTKeyAuth @Success 200 {array} models.UserWithRight "The users with the right they have." @Failure 403 {object} web.HTTPError "No right to see the list." @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/users [get]
func (*ListUser) Update ¶
Update updates a user <-> list relation @Summary Update a user <-> list relation @Description Update a user <-> list relation. Mostly used to update the right that user has. @tags sharing @Accept json @Produce json @Param listID path int true "List ID" @Param userID path int true "User ID" @Param list body models.ListUser true "The user you want to update." @Security JWTKeyAuth @Success 200 {object} models.ListUser "The updated user <-> list relation." @Failure 403 {object} web.HTTPError "The user does not have admin-access to the list" @Failure 404 {object} web.HTTPError "User or list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/users/{userID} [post]
type ListWithTasksAndBuckets ¶ added in v0.18.0
type ListWithTasksAndBuckets struct { List // An array of tasks which belong to the list. Tasks []*TaskWithComments `xorm:"-" json:"tasks"` // Only used for migration. Buckets []*Bucket `xorm:"-" json:"buckets"` BackgroundFileID int64 `xorm:"null" json:"background_file_id"` }
type Message ¶
type Message struct { // A standard message. Message string `json:"message"` }
Message is a standard message
type Namespace ¶
type Namespace struct { // The unique, numeric id of this namespace. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"namespace"` // The name of this namespace. Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The description of the namespace Description string `xorm:"longtext null" json:"description"` OwnerID int64 `xorm:"bigint not null INDEX" json:"-"` // The hex color of this namespace HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"` // Whether or not a namespace is archived. IsArchived bool `xorm:"not null default false" json:"is_archived" query:"is_archived"` // The user who owns this namespace Owner *user.User `xorm:"-" json:"owner" valid:"-"` // The subscription status for the user reading this namespace. You can only read this property, use the subscription endpoints to modify it. // Will only returned when retreiving one namespace. Subscription *Subscription `xorm:"-" json:"subscription,omitempty"` // A timestamp when this namespace was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this namespace was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` // If set to true, will only return the namespaces, not their lists. NamespacesOnly bool `xorm:"-" json:"-" query:"namespaces_only"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
Namespace holds informations about a namespace
func GetNamespaceByID ¶
GetNamespaceByID returns a namespace object by its ID
func (*Namespace) CheckIsArchived ¶
CheckIsArchived returns an ErrNamespaceIsArchived if the namepace is archived.
func (*Namespace) Create ¶
Create implements the creation method via the interface @Summary Creates a new namespace @Description Creates a new namespace. @tags namespace @Accept json @Produce json @Security JWTKeyAuth @Param namespace body models.Namespace true "The namespace you want to create." @Success 201 {object} models.Namespace "The created namespace." @Failure 400 {object} web.HTTPError "Invalid namespace object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the namespace" @Failure 500 {object} models.Message "Internal error" @Router /namespaces [put]
func (*Namespace) Delete ¶
Delete deletes a namespace @Summary Deletes a namespace @Description Delets a namespace @tags namespace @Produce json @Security JWTKeyAuth @Param id path int true "Namespace ID" @Success 200 {object} models.Message "The namespace was successfully deleted." @Failure 400 {object} web.HTTPError "Invalid namespace object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the namespace" @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id} [delete]
func (*Namespace) IsAdmin ¶
IsAdmin returns true or false if the user is admin on that namespace or not
func (*Namespace) ReadAll ¶
func (n *Namespace) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all namespaces a user has access to @Summary Get all namespaces a user has access to @Description Returns all namespaces a user has access to. @tags namespace @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search namespaces by name." @Param is_archived query bool false "If true, also returns all archived namespaces." @Param namespaces_only query bool false "If true, also returns only namespaces without their lists." @Security JWTKeyAuth @Success 200 {array} models.NamespaceWithLists "The Namespaces." @Failure 500 {object} models.Message "Internal error" @Router /namespaces [get]
func (*Namespace) ReadOne ¶
ReadOne gets one namespace @Summary Gets one namespace @Description Returns a namespace by its ID. @tags namespace @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Namespace ID" @Success 200 {object} models.Namespace "The Namespace" @Failure 403 {object} web.HTTPError "The user does not have access to that namespace." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id} [get]
func (*Namespace) Update ¶
Update implements the update method via the interface @Summary Updates a namespace @Description Updates a namespace. @tags namespace @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Namespace ID" @Param namespace body models.Namespace true "The namespace with updated values you want to update." @Success 200 {object} models.Namespace "The updated namespace." @Failure 400 {object} web.HTTPError "Invalid namespace object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the namespace" @Failure 500 {object} models.Message "Internal error" @Router /namespace/{id} [post]
type NamespaceCreatedEvent ¶ added in v0.17.0
NamespaceCreatedEvent represents an event where a namespace has been created
func (*NamespaceCreatedEvent) Name ¶ added in v0.17.0
func (n *NamespaceCreatedEvent) Name() string
Name defines the name for NamespaceCreatedEvent
type NamespaceDeletedEvent ¶ added in v0.17.0
NamespaceDeletedEvent represents a NamespaceDeletedEvent event
func (*NamespaceDeletedEvent) Name ¶ added in v0.17.0
func (t *NamespaceDeletedEvent) Name() string
TopicName defines the name for NamespaceDeletedEvent
type NamespaceList ¶
NamespaceList is a meta type to be able to join a list with its namespace
type NamespaceSharedWithTeamEvent ¶ added in v0.17.0
type NamespaceSharedWithTeamEvent struct {}
NamespaceSharedWithTeamEvent represents an event where a namespace has been shared with a team
func (*NamespaceSharedWithTeamEvent) Name ¶ added in v0.17.0
func (n *NamespaceSharedWithTeamEvent) Name() string
Name defines the name for NamespaceSharedWithTeamEvent
type NamespaceSharedWithUserEvent ¶ added in v0.17.0
type NamespaceSharedWithUserEvent struct {}
NamespaceSharedWithUserEvent represents an event where a namespace has been shared with a user
func (*NamespaceSharedWithUserEvent) Name ¶ added in v0.17.0
func (n *NamespaceSharedWithUserEvent) Name() string
Name defines the name for NamespaceSharedWithUserEvent
type NamespaceUpdatedEvent ¶ added in v0.17.0
NamespaceUpdatedEvent represents an event where a namespace has been updated
func (*NamespaceUpdatedEvent) Name ¶ added in v0.17.0
func (n *NamespaceUpdatedEvent) Name() string
Name defines the name for NamespaceUpdatedEvent
type NamespaceUser ¶
type NamespaceUser struct { // The unique, numeric id of this namespace <-> user relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"namespace"` // The username. Username string `xorm:"-" json:"user_id" param:"user"` UserID int64 `xorm:"bigint not null INDEX" json:"-"` // The namespace id NamespaceID int64 `xorm:"bigint not null INDEX" json:"-" param:"namespace"` // The right this user has. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. Right Right `xorm:"bigint INDEX not null default 0" json:"right" valid:"length(0|2)" maximum:"2" default:"0"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this relation was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
NamespaceUser represents a namespace <-> user relation
func (*NamespaceUser) CanCreate ¶
CanCreate checks if the user can create a new user <-> namespace relation
func (*NamespaceUser) CanDelete ¶
CanDelete checks if the user can delete a user <-> namespace relation
func (*NamespaceUser) CanUpdate ¶
CanUpdate checks if the user can update a user <-> namespace relation
func (*NamespaceUser) Create ¶
Create creates a new namespace <-> user relation @Summary Add a user to a namespace @Description Gives a user access to a namespace. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Namespace ID" @Param namespace body models.NamespaceUser true "The user you want to add to the namespace." @Success 201 {object} models.NamespaceUser "The created user<->namespace relation." @Failure 400 {object} web.HTTPError "Invalid user namespace object provided." @Failure 404 {object} web.HTTPError "The user does not exist." @Failure 403 {object} web.HTTPError "The user does not have access to the namespace" @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id}/users [put]
func (*NamespaceUser) Delete ¶
Delete deletes a namespace <-> user relation @Summary Delete a user from a namespace @Description Delets a user from a namespace. The user won't have access to the namespace anymore. @tags sharing @Produce json @Security JWTKeyAuth @Param namespaceID path int true "Namespace ID" @Param userID path int true "user ID" @Success 200 {object} models.Message "The user was successfully deleted." @Failure 403 {object} web.HTTPError "The user does not have access to the namespace" @Failure 404 {object} web.HTTPError "user or namespace does not exist." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{namespaceID}/users/{userID} [delete]
func (*NamespaceUser) ReadAll ¶
func (nu *NamespaceUser) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all users who have access to a namespace @Summary Get users on a namespace @Description Returns a namespace with all users which have access on a given namespace. @tags sharing @Accept json @Produce json @Param id path int true "Namespace ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search users by its name." @Security JWTKeyAuth @Success 200 {array} models.UserWithRight "The users with the right they have." @Failure 403 {object} web.HTTPError "No right to see the namespace." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id}/users [get]
func (NamespaceUser) TableName ¶
func (NamespaceUser) TableName() string
TableName is the table name for NamespaceUser
func (*NamespaceUser) Update ¶
Update updates a user <-> namespace relation @Summary Update a user <-> namespace relation @Description Update a user <-> namespace relation. Mostly used to update the right that user has. @tags sharing @Accept json @Produce json @Param namespaceID path int true "Namespace ID" @Param userID path int true "User ID" @Param namespace body models.NamespaceUser true "The user you want to update." @Security JWTKeyAuth @Success 200 {object} models.NamespaceUser "The updated user <-> namespace relation." @Failure 403 {object} web.HTTPError "The user does not have admin-access to the namespace" @Failure 404 {object} web.HTTPError "User or namespace does not exist." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{namespaceID}/users/{userID} [post]
type NamespaceWithLists ¶
NamespaceWithLists represents a namespace with list meta informations
type NamespaceWithListsAndTasks ¶ added in v0.18.0
type NamespaceWithListsAndTasks struct { Namespace Lists []*ListWithTasksAndBuckets `xorm:"-" json:"lists"` }
type RelatedTaskMap ¶
type RelatedTaskMap map[RelationKind][]*Task
RelatedTaskMap holds all relations of a single task, grouped by relation kind. This avoids the need for an extra type TaskWithRelation (or similar).
type RelationKind ¶
type RelationKind string
RelationKind represents a kind of relation between to tasks
const ( RelationKindUnknown RelationKind = `unknown` RelationKindSubtask RelationKind = `subtask` RelationKindParenttask RelationKind = `parenttask` RelationKindRelated RelationKind = `related` RelationKindDuplicateOf RelationKind = `duplicateof` RelationKindDuplicates RelationKind = `duplicates` RelationKindBlocking RelationKind = `blocking` RelationKindBlocked RelationKind = `blocked` RelationKindPreceeds RelationKind = `precedes` RelationKindFollows RelationKind = `follows` RelationKindCopiedFrom RelationKind = `copiedfrom` RelationKindCopiedTo RelationKind = `copiedto` )
All valid relation kinds
type ReminderDueNotification ¶ added in v0.17.0
ReminderDueNotification represents a ReminderDueNotification notification
func (*ReminderDueNotification) Name ¶ added in v0.17.0
func (n *ReminderDueNotification) Name() string
Name returns the name of the notification
func (*ReminderDueNotification) ToDB ¶ added in v0.17.0
func (n *ReminderDueNotification) ToDB() interface{}
ToDB returns the ReminderDueNotification notification in a format which can be saved in the db
func (*ReminderDueNotification) ToMail ¶ added in v0.17.0
func (n *ReminderDueNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for ReminderDueNotification
type SavedFilter ¶ added in v0.15.0
type SavedFilter struct { // The unique numeric id of this saved filter ID int64 `xorm:"autoincr not null unique pk" json:"id" param:"filter"` // The actual filters this filter contains Filters *TaskCollection `xorm:"JSON not null" json:"filters" valid:"required"` // The title of the filter. Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The description of the filter Description string `xorm:"longtext null" json:"description"` OwnerID int64 `xorm:"bigint not null INDEX" json:"-"` // The user who owns this filter Owner *user.User `xorm:"-" json:"owner" valid:"-"` // True if the filter is a favorite. Favorite filters show up in a separate namespace together with favorite lists. IsFavorite bool `xorm:"default false" json:"is_favorite"` // A timestamp when this filter was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this filter was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
SavedFilter represents a saved bunch of filters
func (*SavedFilter) CanCreate ¶ added in v0.15.0
CanCreate checks if a user has the right to update a saved filter
func (*SavedFilter) CanDelete ¶ added in v0.15.0
CanDelete checks if a user has the right to delete a saved filter
func (*SavedFilter) CanRead ¶ added in v0.15.0
CanRead checks if a user has the right to read a saved filter
func (*SavedFilter) CanUpdate ¶ added in v0.15.0
CanUpdate checks if a user has the right to update a saved filter
func (*SavedFilter) Create ¶ added in v0.15.0
Create creates a new saved filter @Summary Creates a new saved filter @Description Creates a new saved filter @tags filter @Accept json @Produce json @Security JWTKeyAuth @Success 201 {object} models.SavedFilter "The Saved Filter" @Failure 403 {object} web.HTTPError "The user does not have access to that saved filter." @Failure 500 {object} models.Message "Internal error" @Router /filters [put]
func (*SavedFilter) Delete ¶ added in v0.15.0
Delete removes a saved filter @Summary Removes a saved filter @Description Removes a saved filter by its ID. @tags filter @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Filter ID" @Success 200 {object} models.SavedFilter "The Saved Filter" @Failure 403 {object} web.HTTPError "The user does not have access to that saved filter." @Failure 404 {object} web.HTTPError "The saved filter does not exist." @Failure 500 {object} models.Message "Internal error" @Router /filters/{id} [delete]
func (*SavedFilter) ReadOne ¶ added in v0.15.0
ReadOne returns one saved filter @Summary Gets one saved filter @Description Returns a saved filter by its ID. @tags filter @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Filter ID" @Success 200 {object} models.SavedFilter "The Saved Filter" @Failure 403 {object} web.HTTPError "The user does not have access to that saved filter." @Failure 500 {object} models.Message "Internal error" @Router /filters/{id} [get]
func (*SavedFilter) TableName ¶ added in v0.15.0
func (sf *SavedFilter) TableName() string
TableName returns a better table name for saved filters
func (*SavedFilter) Update ¶ added in v0.15.0
Update updates an existing filter @Summary Updates a saved filter @Description Updates a saved filter by its ID. @tags filter @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Filter ID" @Success 200 {object} models.SavedFilter "The Saved Filter" @Failure 403 {object} web.HTTPError "The user does not have access to that saved filter." @Failure 404 {object} web.HTTPError "The saved filter does not exist." @Failure 500 {object} models.Message "Internal error" @Router /filters/{id} [post]
type SendListCreatedNotification ¶ added in v0.17.0
type SendListCreatedNotification struct { }
SendListCreatedNotification represents a listener
func (*SendListCreatedNotification) Handle ¶ added in v0.17.0
func (s *SendListCreatedNotification) Handle(msg *message.Message) (err error)
Handle is executed when the event SendListCreatedNotification listens on is fired
func (*SendListCreatedNotification) Name ¶ added in v0.17.0
func (s *SendListCreatedNotification) Name() string
Name defines the name for the SendListCreatedNotification listener
type SendTaskAssignedNotification ¶ added in v0.17.0
type SendTaskAssignedNotification struct { }
SendTaskAssignedNotification represents a listener
func (*SendTaskAssignedNotification) Handle ¶ added in v0.17.0
func (s *SendTaskAssignedNotification) Handle(msg *message.Message) (err error)
Handle is executed when the event SendTaskAssignedNotification listens on is fired
func (*SendTaskAssignedNotification) Name ¶ added in v0.17.0
func (s *SendTaskAssignedNotification) Name() string
Name defines the name for the SendTaskAssignedNotification listener
type SendTaskCommentNotification ¶ added in v0.17.0
type SendTaskCommentNotification struct { }
SendTaskCommentNotification represents a listener
func (*SendTaskCommentNotification) Handle ¶ added in v0.17.0
func (s *SendTaskCommentNotification) Handle(msg *message.Message) (err error)
Handle is executed when the event SendTaskCommentNotification listens on is fired
func (*SendTaskCommentNotification) Name ¶ added in v0.17.0
func (s *SendTaskCommentNotification) Name() string
Name defines the name for the SendTaskCommentNotification listener
type SendTaskDeletedNotification ¶ added in v0.17.0
type SendTaskDeletedNotification struct { }
SendTaskDeletedNotification represents a listener
func (*SendTaskDeletedNotification) Handle ¶ added in v0.17.0
func (s *SendTaskDeletedNotification) Handle(msg *message.Message) (err error)
Handle is executed when the event SendTaskDeletedNotification listens on is fired
func (*SendTaskDeletedNotification) Name ¶ added in v0.17.0
func (s *SendTaskDeletedNotification) Name() string
Name defines the name for the SendTaskDeletedNotification listener
type SendTeamMemberAddedNotification ¶ added in v0.17.0
type SendTeamMemberAddedNotification struct { }
SendTeamMemberAddedNotification represents a listener
func (*SendTeamMemberAddedNotification) Handle ¶ added in v0.17.0
func (s *SendTeamMemberAddedNotification) Handle(msg *message.Message) (err error)
Handle is executed when the event SendTeamMemberAddedNotification listens on is fired
func (*SendTeamMemberAddedNotification) Name ¶ added in v0.17.0
func (s *SendTeamMemberAddedNotification) Name() string
Name defines the name for the SendTeamMemberAddedNotification listener
type SharingType ¶
type SharingType int
SharingType holds the sharing type
const ( SharingTypeUnknown SharingType = iota SharingTypeWithoutPassword SharingTypeWithPassword )
These consts represent all valid link sharing types
type SubscribeAssigneeToTask ¶ added in v0.17.0
type SubscribeAssigneeToTask struct { }
func (*SubscribeAssigneeToTask) Handle ¶ added in v0.17.0
func (s *SubscribeAssigneeToTask) Handle(msg *message.Message) (err error)
Handle is executed when the event SubscribeAssigneeToTask listens on is fired
func (*SubscribeAssigneeToTask) Name ¶ added in v0.17.0
func (s *SubscribeAssigneeToTask) Name() string
Name defines the name for the SubscribeAssigneeToTask listener
type Subscription ¶ added in v0.17.0
type Subscription struct { // The numeric ID of the subscription ID int64 `xorm:"autoincr not null unique pk" json:"id"` EntityType SubscriptionEntityType `xorm:"index not null" json:"-"` Entity string `xorm:"-" json:"entity" param:"entity"` // The id of the entity to subscribe to. EntityID int64 `xorm:"bigint index not null" json:"entity_id" param:"entityID"` // The user who made this subscription User *user.User `xorm:"-" json:"user"` UserID int64 `xorm:"bigint index not null" json:"-"` // A timestamp when this subscription was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
Subscription represents a subscription for an entity
func GetSubscription ¶ added in v0.17.0
func GetSubscription(s *xorm.Session, entityType SubscriptionEntityType, entityID int64, a web.Auth) (subscription *Subscription, err error)
GetSubscription returns a matching subscription for an entity and user. It will return the next parent of a subscription. That means for tasks, it will first look for a subscription for that task, if there is none it will look for a subscription on the list the task belongs to and if that also doesn't exist it will check for a subscription for the namespace the list is belonging to.
func (*Subscription) CanCreate ¶ added in v0.17.0
CanCreate checks if a user can subscribe to an entity
func (*Subscription) CanDelete ¶ added in v0.17.0
CanDelete checks if a user can delete a subscription
func (*Subscription) Create ¶ added in v0.17.0
Create subscribes the current user to an entity @Summary Subscribes the current user to an entity. @Description Subscribes the current user to an entity. @tags subscriptions @Accept json @Produce json @Security JWTKeyAuth @Param entity path string true "The entity the user subscribes to. Can be either `namespace`, `list` or `task`." @Param entityID path string true "The numeric id of the entity to subscribe to." @Success 201 {object} models.Subscription "The subscription" @Failure 403 {object} web.HTTPError "The user does not have access to subscribe to this entity." @Failure 412 {object} web.HTTPError "The subscription already exists." @Failure 412 {object} web.HTTPError "The subscription entity is invalid." @Failure 500 {object} models.Message "Internal error" @Router /subscriptions/{entity}/{entityID} [put]
func (*Subscription) Delete ¶ added in v0.17.0
Delete unsubscribes the current user to an entity @Summary Unsubscribe the current user from an entity. @Description Unsubscribes the current user to an entity. @tags subscriptions @Accept json @Produce json @Security JWTKeyAuth @Param entity path string true "The entity the user subscribed to. Can be either `namespace`, `list` or `task`." @Param entityID path string true "The numeric id of the subscribed entity to." @Success 200 {object} models.Subscription "The subscription" @Failure 403 {object} web.HTTPError "The user does not have access to subscribe to this entity." @Failure 404 {object} web.HTTPError "The subscription does not exist." @Failure 500 {object} models.Message "Internal error" @Router /subscriptions/{entity}/{entityID} [delete]
func (*Subscription) TableName ¶ added in v0.17.0
func (sb *Subscription) TableName() string
TableName gives us a better tabel name for the subscriptions table
type SubscriptionEntityType ¶ added in v0.17.0
type SubscriptionEntityType int
SubscriptionEntityType represents all entities which can be subscribed to
func (SubscriptionEntityType) String ¶ added in v0.17.0
func (et SubscriptionEntityType) String() string
String returns a human-readable string of an entity
type Task ¶
type Task struct { // The unique, numeric id of this task. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"listtask"` // The task text. This is what you'll see in the list. Title string `xorm:"TEXT not null" json:"title" valid:"minstringlength(1)" minLength:"1"` // The task description. Description string `xorm:"longtext null" json:"description"` // Whether a task is done or not. Done bool `xorm:"INDEX null" json:"done"` // The time when a task was marked as done. DoneAt time.Time `xorm:"INDEX null 'done_at'" json:"done_at"` // The time when the task is due. DueDate time.Time `xorm:"DATETIME INDEX null 'due_date'" json:"due_date"` // An array of datetimes when the user wants to be reminded of the task. Reminders []time.Time `xorm:"-" json:"reminder_dates"` // The list this task belongs to. ListID int64 `xorm:"bigint INDEX not null" json:"list_id" param:"list"` // An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as "undone" and then increase all remindes and the due date by its amount. RepeatAfter int64 `xorm:"bigint INDEX null" json:"repeat_after" valid:"range(0|9223372036854775807)"` // Can have three possible values which will trigger when the task is marked as done: 0 = repeats after the amount specified in repeat_after, 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from the current date rather than the last set date. RepeatMode TaskRepeatMode `xorm:"not null default 0" json:"repeat_mode"` // The task priority. Can be anything you want, it is possible to sort by this later. Priority int64 `xorm:"bigint null" json:"priority"` // When this task starts. StartDate time.Time `xorm:"DATETIME INDEX null 'start_date'" json:"start_date" query:"-"` // When this task ends. EndDate time.Time `xorm:"DATETIME INDEX null 'end_date'" json:"end_date" query:"-"` // An array of users who are assigned to this task Assignees []*user.User `xorm:"-" json:"assignees"` // An array of labels which are associated with this task. Labels []*Label `xorm:"-" json:"labels"` // The task color in hex HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"` // Determines how far a task is left from being done PercentDone float64 `xorm:"DOUBLE null" json:"percent_done"` // The task identifier, based on the list identifier and the task's index Identifier string `xorm:"-" json:"identifier"` // The task index, calculated per list Index int64 `xorm:"bigint not null default 0" json:"index"` // The UID is currently not used for anything other than caldav, which is why we don't expose it over json UID string `xorm:"varchar(250) null" json:"-"` // All related tasks, grouped by their relation kind RelatedTasks RelatedTaskMap `xorm:"-" json:"related_tasks"` // All attachments this task has Attachments []*TaskAttachment `xorm:"-" json:"attachments"` // If this task has a cover image, the field will return the id of the attachment that is the cover image. CoverImageAttachmentID int64 `xorm:"bigint default 0" json:"cover_image_attachment_id"` // True if a task is a favorite task. Favorite tasks show up in a separate "Important" list. This value depends on the user making the call to the api. IsFavorite bool `xorm:"-" json:"is_favorite"` // The subscription status for the user reading this task. You can only read this property, use the subscription endpoints to modify it. // Will only returned when retreiving one task. Subscription *Subscription `xorm:"-" json:"subscription,omitempty"` // A timestamp when this task was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this task was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` // BucketID is the ID of the kanban bucket this task belongs to. BucketID int64 `xorm:"bigint null" json:"bucket_id"` // The position of the task - any task list can be sorted as usual by this parameter. // When accessing tasks via kanban buckets, this is primarily used to sort them based on a range // We're using a float64 here to make it possible to put any task within any two other tasks (by changing the number). // You would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2. // A 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task // which also leaves a lot of room for rearranging and sorting later. Position float64 `xorm:"double null" json:"position"` // The position of tasks in the kanban board. See the docs for the `position` property on how to use this. KanbanPosition float64 `xorm:"double null" json:"kanban_position"` // The user who initially created the task. CreatedBy *user.User `xorm:"-" json:"created_by" valid:"-"` CreatedByID int64 `xorm:"bigint not null" json:"-"` // ID of the user who put that task on the list web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
Task represents an task in a todolist
func GetTaskByIDSimple ¶
GetTaskByIDSimple returns a raw task without extra data by the task ID
func GetTaskSimple ¶
GetTaskSimple returns a raw task without extra data
func GetTasksByUIDs ¶
GetTasksByUIDs gets all tasks from a bunch of uids
func (*Task) Create ¶
Create is the implementation to create a list task @Summary Create a task @Description Inserts a task into a list. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Param task body models.Task true "The task object" @Success 201 {object} models.Task "The created task object." @Failure 400 {object} web.HTTPError "Invalid task object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id} [put]
func (*Task) Delete ¶
Delete implements the delete method for listTask @Summary Delete a task @Description Deletes a task from a list. This does not mean "mark it done". @tags task @Produce json @Security JWTKeyAuth @Param id path int true "Task ID" @Success 200 {object} models.Message "The created task object." @Failure 400 {object} web.HTTPError "Invalid task ID provided." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{id} [delete]
func (*Task) GetFrontendURL ¶ added in v0.17.0
func (*Task) GetFullIdentifier ¶ added in v0.17.0
GetFullIdentifier returns the task identifier if the task has one and the index prefixed with # otherwise.
func (*Task) ReadAll ¶
func (t *Task) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
ReadAll is a dummy function to still have that endpoint documented @Summary Get tasks @Description Returns all tasks on any list the user has access to. @tags task @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search tasks by task text." @Param sort_by query string false "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with `order_by`. Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, `due_date`, `created_by_id`, `list_id`, `repeat_after`, `priority`, `start_date`, `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default is `id`." @Param order_by query string false "The ordering parameter. Possible values to order by are `asc` or `desc`. Default is `asc`." @Param filter_by query string false "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match." @Param filter_value query string false "The value to filter for." @Param filter_comparator query string false "The comparator to use for a filter. Available values are `equals`, `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` expects comma-separated values in `filter_value`. Defaults to `equals`" @Param filter_concat query string false "The concatinator to use for filters. Available values are `and` or `or`. Defaults to `or`." @Param filter_include_nulls query string false "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`." @Security JWTKeyAuth @Success 200 {array} models.Task "The tasks" @Failure 500 {object} models.Message "Internal error" @Router /tasks/all [get]
func (*Task) ReadOne ¶
ReadOne gets one task by its ID @Summary Get one task @Description Returns one task by its ID @tags task @Accept json @Produce json @Param ID path int true "The task ID" @Security JWTKeyAuth @Success 200 {object} models.Task "The task" @Failure 404 {object} models.Message "Task not found" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{ID} [get]
func (*Task) Update ¶
Update updates a list task @Summary Update a task @Description Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Task ID" @Param task body models.Task true "The task object" @Success 200 {object} models.Task "The updated task object." @Failure 400 {object} web.HTTPError "Invalid task object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the task (aka its list)" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{id} [post]
type TaskAssginee ¶
type TaskAssginee struct { ID int64 `xorm:"bigint autoincr not null unique pk" json:"-"` TaskID int64 `xorm:"bigint INDEX not null" json:"-" param:"listtask"` UserID int64 `xorm:"bigint INDEX not null" json:"user_id" param:"user"` Created time.Time `xorm:"created not null"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TaskAssginee represents an assignment of a user to a task
func (*TaskAssginee) Create ¶
Create adds a new assignee to a task @Summary Add a new assignee to a task @Description Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task. @tags assignees @Accept json @Produce json @Security JWTKeyAuth @Param assignee body models.TaskAssginee true "The assingee object" @Param taskID path int true "Task ID" @Success 201 {object} models.TaskAssginee "The created assingee object." @Failure 400 {object} web.HTTPError "Invalid assignee object provided." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/assignees [put]
func (*TaskAssginee) Delete ¶
Delete a task assignee @Summary Delete an assignee @Description Un-assign a user from a task. @tags assignees @Accept json @Produce json @Security JWTKeyAuth @Param taskID path int true "Task ID" @Param userID path int true "Assignee user ID" @Success 200 {object} models.Message "The assignee was successfully deleted." @Failure 403 {object} web.HTTPError "Not allowed to delete the assignee." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/assignees/{userID} [delete]
func (*TaskAssginee) ReadAll ¶
func (la *TaskAssginee) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all assignees for a task @Summary Get all assignees for a task @Description Returns an array with all assignees for this task. @tags assignees @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search assignees by their username." @Param taskID path int true "Task ID" @Security JWTKeyAuth @Success 200 {array} user.User "The assignees" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/assignees [get]
func (TaskAssginee) TableName ¶
func (TaskAssginee) TableName() string
TableName makes a pretty table name
type TaskAssignedNotification ¶ added in v0.17.0
type TaskAssignedNotification struct { Doer *user.User `json:"doer"` Task *Task `json:"task"` Assignee *user.User `json:"assignee"` }
TaskAssignedNotification represents a TaskAssignedNotification notification
func (*TaskAssignedNotification) Name ¶ added in v0.17.0
func (n *TaskAssignedNotification) Name() string
Name returns the name of the notification
func (*TaskAssignedNotification) ToDB ¶ added in v0.17.0
func (n *TaskAssignedNotification) ToDB() interface{}
ToDB returns the TaskAssignedNotification notification in a format which can be saved in the db
func (*TaskAssignedNotification) ToMail ¶ added in v0.17.0
func (n *TaskAssignedNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for TaskAssignedNotification
type TaskAssigneeCreatedEvent ¶ added in v0.17.0
TaskAssigneeCreatedEvent represents an event where a task has been assigned to a user
func (*TaskAssigneeCreatedEvent) Name ¶ added in v0.17.0
func (t *TaskAssigneeCreatedEvent) Name() string
Name defines the name for TaskAssigneeCreatedEvent
type TaskAssigneeDeletedEvent ¶ added in v0.20.3
TaskAssigneeDeletedEvent represents a TaskAssigneeDeletedEvent event
func (*TaskAssigneeDeletedEvent) Name ¶ added in v0.20.3
func (t *TaskAssigneeDeletedEvent) Name() string
Name defines the name for TaskAssigneeDeletedEvent
type TaskAssigneeWithUser ¶
TaskAssigneeWithUser is a helper type to deal with user joins
type TaskAttachment ¶
type TaskAttachment struct { ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"attachment"` TaskID int64 `xorm:"bigint not null" json:"task_id" param:"task"` FileID int64 `xorm:"bigint not null" json:"-"` CreatedByID int64 `xorm:"bigint not null" json:"-"` CreatedBy *user.User `xorm:"-" json:"created_by"` File *files.File `xorm:"-" json:"file"` Created time.Time `xorm:"created" json:"created"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TaskAttachment is the definition of a task attachment
func (*TaskAttachment) Delete ¶
Delete removes an attachment @Summary Delete an attachment @Description Delete an attachment. @tags task @Accept json @Produce json @Param id path int true "Task ID" @Param attachmentID path int true "Attachment ID" @Security JWTKeyAuth @Success 200 {object} models.Message "The attachment was deleted successfully." @Failure 403 {object} models.Message "No access to this task." @Failure 404 {object} models.Message "The task does not exist." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{id}/attachments/{attachmentID} [delete]
func (*TaskAttachment) NewAttachment ¶
func (ta *TaskAttachment) NewAttachment(s *xorm.Session, f io.ReadCloser, realname string, realsize uint64, a web.Auth) error
NewAttachment creates a new task attachment Note: I'm not sure if only accepting an io.ReadCloser and not an afero.File or os.File instead is a good way of doing things.
func (*TaskAttachment) ReadAll ¶
func (ta *TaskAttachment) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll returns a list with all attachments @Summary Get all attachments for one task. @Description Get all task attachments for one task. @tags task @Accept json @Produce json @Param id path int true "Task ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Security JWTKeyAuth @Success 200 {array} models.TaskAttachment "All attachments for this task" @Failure 403 {object} models.Message "No access to this task." @Failure 404 {object} models.Message "The task does not exist." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{id}/attachments [get]
func (*TaskAttachment) TableName ¶
func (*TaskAttachment) TableName() string
TableName returns the table name for task attachments
type TaskAttachmentCreatedEvent ¶ added in v0.20.3
type TaskAttachmentCreatedEvent struct { Task *Task Attachment *TaskAttachment Doer *user.User }
TaskAttachmentCreatedEvent represents a TaskAttachmentCreatedEvent event
func (*TaskAttachmentCreatedEvent) Name ¶ added in v0.20.3
func (t *TaskAttachmentCreatedEvent) Name() string
Name defines the name for TaskAttachmentCreatedEvent
type TaskAttachmentDeletedEvent ¶ added in v0.20.3
type TaskAttachmentDeletedEvent struct { Task *Task Attachment *TaskAttachment Doer *user.User }
TaskAttachmentDeletedEvent represents a TaskAttachmentDeletedEvent event
func (*TaskAttachmentDeletedEvent) Name ¶ added in v0.20.3
func (t *TaskAttachmentDeletedEvent) Name() string
Name defines the name for TaskAttachmentDeletedEvent
type TaskCollection ¶
type TaskCollection struct { ListID int64 `param:"list" json:"-"` Lists []*List `json:"-"` // The query parameter to sort by. This is for ex. done, priority, etc. SortBy []string `query:"sort_by" json:"sort_by"` SortByArr []string `query:"sort_by[]" json:"-"` // The query parameter to order the items by. This can be either asc or desc, with asc being the default. OrderBy []string `query:"order_by" json:"order_by"` OrderByArr []string `query:"order_by[]" json:"-"` // The field name of the field to filter by FilterBy []string `query:"filter_by" json:"filter_by"` FilterByArr []string `query:"filter_by[]" json:"-"` // The value of the field name to filter by FilterValue []string `query:"filter_value" json:"filter_value"` FilterValueArr []string `query:"filter_value[]" json:"-"` // The comparator for field and value FilterComparator []string `query:"filter_comparator" json:"filter_comparator"` FilterComparatorArr []string `query:"filter_comparator[]" json:"-"` // The way all filter conditions are concatenated together, can be either "and" or "or"., FilterConcat string `query:"filter_concat" json:"filter_concat"` // If set to true, the result will also include null values FilterIncludeNulls bool `query:"filter_include_nulls" json:"filter_include_nulls"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TaskCollection is a struct used to hold filter details and not clutter the Task struct with information not related to actual tasks.
func (*TaskCollection) ReadAll ¶
func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
ReadAll gets all tasks for a collection @Summary Get tasks in a list @Description Returns all tasks for the current list. @tags task @Accept json @Produce json @Param listID path int true "The list ID." @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search tasks by task text." @Param sort_by query string false "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with `order_by`. Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, `due_date`, `created_by_id`, `list_id`, `repeat_after`, `priority`, `start_date`, `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default is `id`." @Param order_by query string false "The ordering parameter. Possible values to order by are `asc` or `desc`. Default is `asc`." @Param filter_by query string false "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match." @Param filter_value query string false "The value to filter for. You can use [grafana](https://grafana.com/docs/grafana/latest/dashboards/time-range-controls)- or [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math)-style relative dates for all date fields like `due_date`, `start_date`, `end_date`, etc." @Param filter_comparator query string false "The comparator to use for a filter. Available values are `equals`, `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` expects comma-separated values in `filter_value`. Defaults to `equals`" @Param filter_concat query string false "The concatinator to use for filters. Available values are `and` or `or`. Defaults to `or`." @Param filter_include_nulls query string false "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`." @Security JWTKeyAuth @Success 200 {array} models.Task "The tasks" @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/tasks [get]
type TaskComment ¶
type TaskComment struct { ID int64 `xorm:"autoincr pk unique not null" json:"id" param:"commentid"` Comment string `xorm:"text not null" json:"comment"` AuthorID int64 `xorm:"not null" json:"-"` Author *user.User `xorm:"-" json:"author"` TaskID int64 `xorm:"not null" json:"-" param:"task"` Created time.Time `xorm:"created" json:"created"` Updated time.Time `xorm:"updated" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TaskComment represents a task comment
func (*TaskComment) Create ¶
Create creates a new task comment @Summary Create a new task comment @Description Create a new task comment. The user doing this need to have at least write access to the task this comment should belong to. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param relation body models.TaskComment true "The task comment object" @Param taskID path int true "Task ID" @Success 201 {object} models.TaskComment "The created task comment object." @Failure 400 {object} web.HTTPError "Invalid task comment object provided." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/comments [put]
func (*TaskComment) Delete ¶
Delete removes a task comment @Summary Remove a task comment @Description Remove a task comment. The user doing this need to have at least write access to the task this comment belongs to. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param taskID path int true "Task ID" @Param commentID path int true "Comment ID" @Success 200 {object} models.Message "The task comment was successfully deleted." @Failure 400 {object} web.HTTPError "Invalid task comment object provided." @Failure 404 {object} web.HTTPError "The task comment was not found." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/comments/{commentID} [delete]
func (*TaskComment) ReadAll ¶
func (tc *TaskComment) ReadAll(s *xorm.Session, auth web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll returns all comments for a task @Summary Get all task comments @Description Get all task comments. The user doing this need to have at least read access to the task. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param taskID path int true "Task ID" @Success 200 {array} models.TaskComment "The array with all task comments" @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/comments [get]
func (*TaskComment) ReadOne ¶
ReadOne handles getting a single comment @Summary Remove a task comment @Description Remove a task comment. The user doing this need to have at least read access to the task this comment belongs to. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param taskID path int true "Task ID" @Param commentID path int true "Comment ID" @Success 200 {object} models.TaskComment "The task comment object." @Failure 400 {object} web.HTTPError "Invalid task comment object provided." @Failure 404 {object} web.HTTPError "The task comment was not found." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/comments/{commentID} [get]
func (*TaskComment) TableName ¶
func (tc *TaskComment) TableName() string
TableName holds the table name for the task comments table
func (*TaskComment) Update ¶
Update updates a task text by its ID @Summary Update an existing task comment @Description Update an existing task comment. The user doing this need to have at least write access to the task this comment belongs to. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param taskID path int true "Task ID" @Param commentID path int true "Comment ID" @Success 200 {object} models.TaskComment "The updated task comment object." @Failure 400 {object} web.HTTPError "Invalid task comment object provided." @Failure 404 {object} web.HTTPError "The task comment was not found." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/comments/{commentID} [post]
type TaskCommentCreatedEvent ¶ added in v0.17.0
type TaskCommentCreatedEvent struct { Task *Task Comment *TaskComment Doer *user.User }
TaskCommentCreatedEvent represents an event where a task comment has been created
func (*TaskCommentCreatedEvent) Name ¶ added in v0.17.0
func (t *TaskCommentCreatedEvent) Name() string
Name defines the name for TaskCommentCreatedEvent
type TaskCommentDeletedEvent ¶ added in v0.20.3
type TaskCommentDeletedEvent struct { Task *Task Comment *TaskComment Doer *user.User }
TaskCommentDeletedEvent represents a TaskCommentDeletedEvent event
func (*TaskCommentDeletedEvent) Name ¶ added in v0.20.3
func (t *TaskCommentDeletedEvent) Name() string
Name defines the name for TaskCommentDeletedEvent
type TaskCommentNotification ¶ added in v0.17.0
type TaskCommentNotification struct { Doer *user.User `json:"doer"` Task *Task `json:"task"` Comment *TaskComment `json:"comment"` Mentioned bool `json:"mentioned"` }
TaskCommentNotification represents a TaskCommentNotification notification
func (*TaskCommentNotification) Name ¶ added in v0.17.0
func (n *TaskCommentNotification) Name() string
Name returns the name of the notification
func (*TaskCommentNotification) SubjectID ¶ added in v0.18.0
func (n *TaskCommentNotification) SubjectID() int64
func (*TaskCommentNotification) ToDB ¶ added in v0.17.0
func (n *TaskCommentNotification) ToDB() interface{}
ToDB returns the TaskCommentNotification notification in a format which can be saved in the db
func (*TaskCommentNotification) ToMail ¶ added in v0.17.0
func (n *TaskCommentNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for TaskCommentNotification
type TaskCommentUpdatedEvent ¶ added in v0.18.0
type TaskCommentUpdatedEvent struct { Task *Task Comment *TaskComment Doer *user.User }
TaskCommentUpdatedEvent represents a TaskCommentUpdatedEvent event
func (*TaskCommentUpdatedEvent) Name ¶ added in v0.18.0
func (t *TaskCommentUpdatedEvent) Name() string
Name defines the name for TaskCommentUpdatedEvent
type TaskCreatedEvent ¶ added in v0.17.0
TaskCreatedEvent represents an event where a task has been created
func (*TaskCreatedEvent) Name ¶ added in v0.17.0
func (t *TaskCreatedEvent) Name() string
Name defines the name for TaskCreatedEvent
type TaskDeletedEvent ¶ added in v0.17.0
TaskDeletedEvent represents a TaskDeletedEvent event
func (*TaskDeletedEvent) Name ¶ added in v0.17.0
func (t *TaskDeletedEvent) Name() string
Name defines the name for TaskDeletedEvent
type TaskDeletedNotification ¶ added in v0.17.0
TaskDeletedNotification represents a TaskDeletedNotification notification
func (*TaskDeletedNotification) Name ¶ added in v0.17.0
func (n *TaskDeletedNotification) Name() string
Name returns the name of the notification
func (*TaskDeletedNotification) ToDB ¶ added in v0.17.0
func (n *TaskDeletedNotification) ToDB() interface{}
ToDB returns the TaskDeletedNotification notification in a format which can be saved in the db
func (*TaskDeletedNotification) ToMail ¶ added in v0.17.0
func (n *TaskDeletedNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for TaskDeletedNotification
type TaskRelation ¶
type TaskRelation struct { // The unique, numeric id of this relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"-"` // The ID of the "base" task, the task which has a relation to another. TaskID int64 `xorm:"bigint not null" json:"task_id" param:"task"` // The ID of the other task, the task which is being related. OtherTaskID int64 `xorm:"bigint not null" json:"other_task_id" param:"otherTask"` // The kind of the relation. RelationKind RelationKind `xorm:"varchar(50) not null" json:"relation_kind" param:"relationKind"` CreatedByID int64 `xorm:"bigint not null" json:"-"` // The user who created this relation CreatedBy *user.User `xorm:"-" json:"created_by"` // A timestamp when this label was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TaskRelation represents a kind of relation between two tasks
func (*TaskRelation) CanCreate ¶
CanCreate checks if a user can create a new relation between two relations
func (*TaskRelation) Create ¶
Create creates a new task relation @Summary Create a new relation between two tasks @Description Creates a new relation between two tasks. The user needs to have update rights on the base task and at least read rights on the other task. Both tasks do not need to be on the same list. Take a look at the docs for available task relation kinds. @tags task @Accept json @Produce json @Security JWTKeyAuth @Param relation body models.TaskRelation true "The relation object" @Param taskID path int true "Task ID" @Success 201 {object} models.TaskRelation "The created task relation object." @Failure 400 {object} web.HTTPError "Invalid task relation object provided." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/relations [put]
func (*TaskRelation) Delete ¶
Delete removes a task relation @Summary Remove a task relation @tags task @Accept json @Produce json @Security JWTKeyAuth @Param relation body models.TaskRelation true "The relation object" @Param taskID path int true "Task ID" @Param relationKind path string true "The kind of the relation. See the TaskRelation type for more info." @Param otherTaskId path int true "The id of the other task." @Success 200 {object} models.Message "The task relation was successfully deleted." @Failure 400 {object} web.HTTPError "Invalid task relation object provided." @Failure 404 {object} web.HTTPError "The task relation was not found." @Failure 500 {object} models.Message "Internal error" @Router /tasks/{taskID}/relations/{relationKind}/{otherTaskId} [delete]
func (*TaskRelation) TableName ¶
func (*TaskRelation) TableName() string
TableName holds the table name for the task relation table
type TaskRelationCreatedEvent ¶ added in v0.20.3
type TaskRelationCreatedEvent struct { Task *Task Relation *TaskRelation Doer *user.User }
TaskRelationCreatedEvent represents a TaskRelationCreatedEvent event
func (*TaskRelationCreatedEvent) Name ¶ added in v0.20.3
func (t *TaskRelationCreatedEvent) Name() string
Name defines the name for TaskRelationCreatedEvent
type TaskRelationDeletedEvent ¶ added in v0.20.3
type TaskRelationDeletedEvent struct { Task *Task Relation *TaskRelation Doer *user.User }
TaskRelationDeletedEvent represents a TaskRelationDeletedEvent event
func (*TaskRelationDeletedEvent) Name ¶ added in v0.20.3
func (t *TaskRelationDeletedEvent) Name() string
Name defines the name for TaskRelationDeletedEvent
type TaskReminder ¶
type TaskReminder struct { ID int64 `xorm:"bigint autoincr not null unique pk"` TaskID int64 `xorm:"bigint not null INDEX"` Reminder time.Time `xorm:"DATETIME not null INDEX 'reminder'"` Created time.Time `xorm:"created not null"` }
TaskReminder holds a reminder on a task
func (TaskReminder) TableName ¶
func (TaskReminder) TableName() string
TableName returns a pretty table name
type TaskRepeatMode ¶ added in v0.17.0
type TaskRepeatMode int
const ( TaskRepeatModeDefault TaskRepeatMode = iota TaskRepeatModeMonth TaskRepeatModeFromCurrentDate )
type TaskUpdatedEvent ¶ added in v0.17.0
TaskUpdatedEvent represents an event where a task has been updated
func (*TaskUpdatedEvent) Name ¶ added in v0.17.0
func (t *TaskUpdatedEvent) Name() string
Name defines the name for TaskUpdatedEvent
type TaskWithComments ¶ added in v0.18.0
type TaskWithComments struct { Task Comments []*TaskComment `xorm:"-" json:"comments"` }
type Team ¶
type Team struct { // The unique, numeric id of this team. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"team"` // The name of this team. Name string `xorm:"varchar(250) not null" json:"name" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The team's description. Description string `xorm:"longtext null" json:"description"` CreatedByID int64 `xorm:"bigint not null INDEX" json:"-"` // The user who created this team. CreatedBy *user.User `xorm:"-" json:"created_by"` // An array of all members in this team. Members []*TeamUser `xorm:"-" json:"members"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created" json:"created"` // A timestamp when this relation was last updated. You cannot change this value. Updated time.Time `xorm:"updated" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
Team holds a team object
func GetTeamByID ¶
GetTeamByID gets a team by its ID
func (*Team) Create ¶
Create is the handler to create a team @Summary Creates a new team @Description Creates a new team in a given namespace. The user needs write-access to the namespace. @tags team @Accept json @Produce json @Security JWTKeyAuth @Param team body models.Team true "The team you want to create." @Success 201 {object} models.Team "The created team." @Failure 400 {object} web.HTTPError "Invalid team object provided." @Failure 500 {object} models.Message "Internal error" @Router /teams [put]
func (*Team) Delete ¶
Delete deletes a team @Summary Deletes a team @Description Delets a team. This will also remove the access for all users in that team. @tags team @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Success 200 {object} models.Message "The team was successfully deleted." @Failure 400 {object} web.HTTPError "Invalid team object provided." @Failure 500 {object} models.Message "Internal error" @Router /teams/{id} [delete]
func (*Team) ReadAll ¶
func (t *Team) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll gets all teams the user is part of @Summary Get teams @Description Returns all teams the current user is part of. @tags team @Accept json @Produce json @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search teams by its name." @Security JWTKeyAuth @Success 200 {array} models.Team "The teams." @Failure 500 {object} models.Message "Internal error" @Router /teams [get]
func (*Team) ReadOne ¶
ReadOne implements the CRUD method to get one team @Summary Gets one team @Description Returns a team by its ID. @tags team @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Success 200 {object} models.Team "The team" @Failure 403 {object} web.HTTPError "The user does not have access to the team" @Failure 500 {object} models.Message "Internal error" @Router /teams/{id} [get]
func (*Team) Update ¶
Update is the handler to create a team @Summary Updates a team @Description Updates a team. @tags team @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Param team body models.Team true "The team with updated values you want to update." @Success 200 {object} models.Team "The updated team." @Failure 400 {object} web.HTTPError "Invalid team object provided." @Failure 500 {object} models.Message "Internal error" @Router /teams/{id} [post]
type TeamCreatedEvent ¶ added in v0.17.0
TeamCreatedEvent represents a TeamCreatedEvent event
func (*TeamCreatedEvent) Name ¶ added in v0.17.0
func (t *TeamCreatedEvent) Name() string
Name defines the name for TeamCreatedEvent
type TeamDeletedEvent ¶ added in v0.17.0
TeamDeletedEvent represents a TeamDeletedEvent event
func (*TeamDeletedEvent) Name ¶ added in v0.17.0
func (t *TeamDeletedEvent) Name() string
Name defines the name for TeamDeletedEvent
type TeamList ¶
type TeamList struct { // The unique, numeric id of this list <-> team relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"` // The team id. TeamID int64 `xorm:"bigint not null INDEX" json:"team_id" param:"team"` // The list id. ListID int64 `xorm:"bigint not null INDEX" json:"-" param:"list"` // The right this team has. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. Right Right `xorm:"bigint INDEX not null default 0" json:"right" valid:"length(0|2)" maximum:"2" default:"0"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this relation was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TeamList defines the relation between a team and a list
func (*TeamList) Create ¶
Create creates a new team <-> list relation @Summary Add a team to a list @Description Gives a team access to a list. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "List ID" @Param list body models.TeamList true "The team you want to add to the list." @Success 201 {object} models.TeamList "The created team<->list relation." @Failure 400 {object} web.HTTPError "Invalid team list object provided." @Failure 404 {object} web.HTTPError "The team does not exist." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/teams [put]
func (*TeamList) Delete ¶
Delete deletes a team <-> list relation based on the list & team id @Summary Delete a team from a list @Description Delets a team from a list. The team won't have access to the list anymore. @tags sharing @Produce json @Security JWTKeyAuth @Param listID path int true "List ID" @Param teamID path int true "Team ID" @Success 200 {object} models.Message "The team was successfully deleted." @Failure 403 {object} web.HTTPError "The user does not have access to the list" @Failure 404 {object} web.HTTPError "Team or list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/teams/{teamID} [delete]
func (*TeamList) ReadAll ¶
func (tl *TeamList) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error)
ReadAll implements the method to read all teams of a list @Summary Get teams on a list @Description Returns a list with all teams which have access on a given list. @tags sharing @Accept json @Produce json @Param id path int true "List ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search teams by its name." @Security JWTKeyAuth @Success 200 {array} models.TeamWithRight "The teams with their right." @Failure 403 {object} web.HTTPError "No right to see the list." @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/teams [get]
func (*TeamList) Update ¶
Update updates a team <-> list relation @Summary Update a team <-> list relation @Description Update a team <-> list relation. Mostly used to update the right that team has. @tags sharing @Accept json @Produce json @Param listID path int true "List ID" @Param teamID path int true "Team ID" @Param list body models.TeamList true "The team you want to update." @Security JWTKeyAuth @Success 200 {object} models.TeamList "The updated team <-> list relation." @Failure 403 {object} web.HTTPError "The user does not have admin-access to the list" @Failure 404 {object} web.HTTPError "Team or list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{listID}/teams/{teamID} [post]
type TeamMember ¶
type TeamMember struct { // The unique, numeric id of this team member relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"` // The team id. TeamID int64 `xorm:"bigint not null INDEX" json:"-" param:"team"` // The username of the member. We use this to prevent automated user id entering. Username string `xorm:"-" json:"username" param:"user"` // Used under the hood to manage team members UserID int64 `xorm:"bigint not null INDEX" json:"-"` // Whether or not the member is an admin of the team. See the docs for more about what a team admin can do Admin bool `xorm:"null" json:"admin"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TeamMember defines the relationship between a user and a team
func (*TeamMember) CanUpdate ¶ added in v0.15.0
CanUpdate checks if the user can modify a team member's right
func (*TeamMember) Create ¶
Create implements the create method to assign a user to a team @Summary Add a user to a team @Description Add a user to a team. @tags team @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Param team body models.TeamMember true "The user to be added to a team." @Success 201 {object} models.TeamMember "The newly created member object" @Failure 400 {object} web.HTTPError "Invalid member object provided." @Failure 403 {object} web.HTTPError "The user does not have access to the team" @Failure 500 {object} models.Message "Internal error" @Router /teams/{id}/members [put]
func (*TeamMember) Delete ¶
Delete deletes a user from a team @Summary Remove a user from a team @Description Remove a user from a team. This will also revoke any access this user might have via that team. A user can remove themselves from the team if they are not the last user in the team. @tags team @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Param userID path int true "User ID" @Success 200 {object} models.Message "The user was successfully removed from the team." @Failure 500 {object} models.Message "Internal error" @Router /teams/{id}/members/{userID} [delete]
func (*TeamMember) TableName ¶
func (*TeamMember) TableName() string
TableName makes beautiful table names
func (*TeamMember) Update ¶ added in v0.15.0
Update toggles a team member's admin status @Summary Toggle a team member's admin status @Description If a user is team admin, this will make them member and vise-versa. @tags team @Produce json @Security JWTKeyAuth @Param id path int true "Team ID" @Param userID path int true "User ID" @Success 200 {object} models.Message "The member right was successfully changed." @Failure 500 {object} models.Message "Internal error" @Router /teams/{id}/members/{userID}/admin [post]
type TeamMemberAddedEvent ¶ added in v0.17.0
TeamMemberAddedEvent defines an event where a user is added to a team
func (*TeamMemberAddedEvent) Name ¶ added in v0.17.0
func (t *TeamMemberAddedEvent) Name() string
Name defines the name for TeamMemberAddedEvent
type TeamMemberAddedNotification ¶ added in v0.17.0
type TeamMemberAddedNotification struct { Member *user.User `json:"member"` Doer *user.User `json:"doer"` Team *Team `json:"team"` }
TeamMemberAddedNotification represents a TeamMemberAddedNotification notification
func (*TeamMemberAddedNotification) Name ¶ added in v0.17.0
func (n *TeamMemberAddedNotification) Name() string
Name returns the name of the notification
func (*TeamMemberAddedNotification) ToDB ¶ added in v0.17.0
func (n *TeamMemberAddedNotification) ToDB() interface{}
ToDB returns the TeamMemberAddedNotification notification in a format which can be saved in the db
func (*TeamMemberAddedNotification) ToMail ¶ added in v0.17.0
func (n *TeamMemberAddedNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for TeamMemberAddedNotification
type TeamNamespace ¶
type TeamNamespace struct { // The unique, numeric id of this namespace <-> team relation. ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"` // The team id. TeamID int64 `xorm:"bigint not null INDEX" json:"team_id" param:"team"` // The namespace id. NamespaceID int64 `xorm:"bigint not null INDEX" json:"-" param:"namespace"` // The right this team has. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. Right Right `xorm:"bigint INDEX not null default 0" json:"right" valid:"length(0|2)" maximum:"2" default:"0"` // A timestamp when this relation was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` // A timestamp when this relation was last updated. You cannot change this value. Updated time.Time `xorm:"updated not null" json:"updated"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` }
TeamNamespace defines the relationship between a Team and a Namespace
func (*TeamNamespace) CanCreate ¶
CanCreate checks if one can create a new team <-> namespace relation
func (*TeamNamespace) CanDelete ¶
CanDelete checks if a user can remove a team from a namespace. Only namespace admins can do that.
func (*TeamNamespace) CanUpdate ¶
CanUpdate checks if a user can update a team from a Only namespace admins can do that.
func (*TeamNamespace) Create ¶
Create creates a new team <-> namespace relation @Summary Add a team to a namespace @Description Gives a team access to a namespace. @tags sharing @Accept json @Produce json @Security JWTKeyAuth @Param id path int true "Namespace ID" @Param namespace body models.TeamNamespace true "The team you want to add to the namespace." @Success 201 {object} models.TeamNamespace "The created team<->namespace relation." @Failure 400 {object} web.HTTPError "Invalid team namespace object provided." @Failure 404 {object} web.HTTPError "The team does not exist." @Failure 403 {object} web.HTTPError "The team does not have access to the namespace" @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id}/teams [put]
func (*TeamNamespace) Delete ¶
Delete deletes a team <-> namespace relation based on the namespace & team id @Summary Delete a team from a namespace @Description Delets a team from a namespace. The team won't have access to the namespace anymore. @tags sharing @Produce json @Security JWTKeyAuth @Param namespaceID path int true "Namespace ID" @Param teamID path int true "team ID" @Success 200 {object} models.Message "The team was successfully deleted." @Failure 403 {object} web.HTTPError "The team does not have access to the namespace" @Failure 404 {object} web.HTTPError "team or namespace does not exist." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{namespaceID}/teams/{teamID} [delete]
func (*TeamNamespace) ReadAll ¶
func (tn *TeamNamespace) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
ReadAll implements the method to read all teams of a namespace @Summary Get teams on a namespace @Description Returns a namespace with all teams which have access on a given namespace. @tags sharing @Accept json @Produce json @Param id path int true "Namespace ID" @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned." @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page." @Param s query string false "Search teams by its name." @Security JWTKeyAuth @Success 200 {array} models.TeamWithRight "The teams with the right they have." @Failure 403 {object} web.HTTPError "No right to see the namespace." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{id}/teams [get]
func (TeamNamespace) TableName ¶
func (TeamNamespace) TableName() string
TableName makes beautiful table names
func (*TeamNamespace) Update ¶
Update updates a team <-> namespace relation @Summary Update a team <-> namespace relation @Description Update a team <-> namespace relation. Mostly used to update the right that team has. @tags sharing @Accept json @Produce json @Param namespaceID path int true "Namespace ID" @Param teamID path int true "Team ID" @Param namespace body models.TeamNamespace true "The team you want to update." @Security JWTKeyAuth @Success 200 {object} models.TeamNamespace "The updated team <-> namespace relation." @Failure 403 {object} web.HTTPError "The team does not have admin-access to the namespace" @Failure 404 {object} web.HTTPError "Team or namespace does not exist." @Failure 500 {object} models.Message "Internal error" @Router /namespaces/{namespaceID}/teams/{teamID} [post]
type TeamUser ¶
type TeamUser struct { user.User `xorm:"extends"` // Whether or not the member is an admin of the team. See the docs for more about what a team admin can do Admin bool `json:"admin"` TeamID int64 `json:"-"` }
TeamUser is the team member type
type TeamWithRight ¶
TeamWithRight represents a team, combined with rights.
type UndoneTaskOverdueNotification ¶ added in v0.17.0
UndoneTaskOverdueNotification represents a UndoneTaskOverdueNotification notification
func (*UndoneTaskOverdueNotification) Name ¶ added in v0.17.0
func (n *UndoneTaskOverdueNotification) Name() string
Name returns the name of the notification
func (*UndoneTaskOverdueNotification) ToDB ¶ added in v0.17.0
func (n *UndoneTaskOverdueNotification) ToDB() interface{}
ToDB returns the UndoneTaskOverdueNotification notification in a format which can be saved in the db
func (*UndoneTaskOverdueNotification) ToMail ¶ added in v0.17.0
func (n *UndoneTaskOverdueNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for UndoneTaskOverdueNotification
type UndoneTasksOverdueNotification ¶ added in v0.17.0
UndoneTasksOverdueNotification represents a UndoneTasksOverdueNotification notification
func (*UndoneTasksOverdueNotification) Name ¶ added in v0.17.0
func (n *UndoneTasksOverdueNotification) Name() string
Name returns the name of the notification
func (*UndoneTasksOverdueNotification) ToDB ¶ added in v0.17.0
func (n *UndoneTasksOverdueNotification) ToDB() interface{}
ToDB returns the UndoneTasksOverdueNotification notification in a format which can be saved in the db
func (*UndoneTasksOverdueNotification) ToMail ¶ added in v0.17.0
func (n *UndoneTasksOverdueNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for UndoneTasksOverdueNotification
type UnsplashPhoto ¶ added in v0.14.0
type UnsplashPhoto struct { ID int64 `xorm:"autoincr not null unique pk" json:"id,omitempty"` FileID int64 `xorm:"not null" json:"-"` UnsplashID string `xorm:"varchar(50)" json:"unsplash_id"` Author string `xorm:"text" json:"author"` AuthorName string `xorm:"text" json:"author_name"` }
UnsplashPhoto is an unsplash photo in the db
func GetUnsplashPhotoByFileID ¶ added in v0.14.0
func GetUnsplashPhotoByFileID(s *xorm.Session, fileID int64) (u *UnsplashPhoto, err error)
GetUnsplashPhotoByFileID returns an unsplash photo by its saved file id
func (*UnsplashPhoto) Save ¶ added in v0.14.0
func (u *UnsplashPhoto) Save(s *xorm.Session) error
Save persists an unsplash photo to the db
func (*UnsplashPhoto) TableName ¶ added in v0.14.0
func (u *UnsplashPhoto) TableName() string
TableName contains the table name for an unsplash photo
type UserDataExportRequestedEvent ¶ added in v0.18.0
UserDataExportRequestedEvent represents a UserDataExportRequestedEvent event
func (*UserDataExportRequestedEvent) Name ¶ added in v0.18.0
func (t *UserDataExportRequestedEvent) Name() string
Name defines the name for UserDataExportRequestedEvent
type UserMentionedInTaskNotification ¶ added in v0.18.0
type UserMentionedInTaskNotification struct { Doer *user.User `json:"doer"` Task *Task `json:"task"` IsNew bool `json:"is_new"` }
UserMentionedInTaskNotification represents a UserMentionedInTaskNotification notification
func (*UserMentionedInTaskNotification) Name ¶ added in v0.18.0
func (n *UserMentionedInTaskNotification) Name() string
Name returns the name of the notification
func (*UserMentionedInTaskNotification) SubjectID ¶ added in v0.18.0
func (n *UserMentionedInTaskNotification) SubjectID() int64
func (*UserMentionedInTaskNotification) ToDB ¶ added in v0.18.0
func (n *UserMentionedInTaskNotification) ToDB() interface{}
ToDB returns the UserMentionedInTaskNotification notification in a format which can be saved in the db
func (*UserMentionedInTaskNotification) ToMail ¶ added in v0.18.0
func (n *UserMentionedInTaskNotification) ToMail() *notifications.Mail
ToMail returns the mail notification for UserMentionedInTaskNotification
type UserWithRight ¶
UserWithRight represents a user in combination with the right it can have on a list/namespace
type ValidationHTTPError ¶
ValidationHTTPError is the http error when a validation fails
func (ValidationHTTPError) Error ¶
func (err ValidationHTTPError) Error() string
Error implements the Error type (so we can return it as type error)
Source Files ¶
- bulk_task.go
- error.go
- events.go
- export.go
- favorites.go
- kanban.go
- kanban_rights.go
- label.go
- label_rights.go
- label_task.go
- label_task_rights.go
- link_sharing.go
- link_sharing_rights.go
- list.go
- list_duplicate.go
- list_rights.go
- list_team.go
- list_team_rights.go
- list_users.go
- list_users_rights.go
- listeners.go
- mentions.go
- message.go
- models.go
- namespace.go
- namespace_rights.go
- namespace_team.go
- namespace_team_rights.go
- namespace_users.go
- namespace_users_rights.go
- notifications.go
- notifications_database.go
- rights.go
- saved_filters.go
- saved_filters_rights.go
- subscription.go
- subscription_rights.go
- task_assignees.go
- task_assignees_rights.go
- task_attachment.go
- task_attachment_rights.go
- task_collection.go
- task_collection_filter.go
- task_collection_sort.go
- task_comment_rights.go
- task_comments.go
- task_overdue_reminder.go
- task_relation.go
- task_relation_rights.go
- task_reminder.go
- tasks.go
- tasks_rights.go
- team_members.go
- team_members_rights.go
- teams.go
- teams_rights.go
- unit_tests.go
- unsplash.go
- user_delete.go
- user_list.go
- users.go