Documentation ¶
Index ¶
- func HasIssueContentHistory(dbCtx context.Context, issueID, commentID int64) (bool, error)
- func QueryIssueContentHistoryEditedCountMap(dbCtx context.Context, issueID int64) (map[int64]int, error)
- func SaveIssueContentHistory(e db.Engine, posterID, issueID, commentID int64, editTime timeutil.TimeStamp, ...) error
- func SoftDeleteIssueContentHistory(dbCtx context.Context, historyID int64) error
- type ContentHistory
- type ErrIssueContentHistoryNotExist
- type IssueContentListItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasIssueContentHistory ¶
HasIssueContentHistory check if a ContentHistory entry exists
func QueryIssueContentHistoryEditedCountMap ¶
func QueryIssueContentHistoryEditedCountMap(dbCtx context.Context, issueID int64) (map[int64]int, error)
QueryIssueContentHistoryEditedCountMap query related history count of each comment (comment_id = 0 means the main issue) only return the count map for "edited" (history revision count > 1) issues or comments.
Types ¶
type ContentHistory ¶
type ContentHistory struct { ID int64 `xorm:"pk autoincr"` PosterID int64 IssueID int64 `xorm:"INDEX"` CommentID int64 `xorm:"INDEX"` EditedUnix timeutil.TimeStamp `xorm:"INDEX"` ContentText string `xorm:"LONGTEXT"` IsFirstCreated bool IsDeleted bool }
ContentHistory save issue/comment content history revisions.
func GetIssueContentHistoryAndPrev ¶
func GetIssueContentHistoryAndPrev(dbCtx context.Context, id int64) (history, prevHistory *ContentHistory, err error)
GetIssueContentHistoryAndPrev get a history and the previous non-deleted history (to compare)
func GetIssueContentHistoryByID ¶
func GetIssueContentHistoryByID(dbCtx context.Context, id int64) (*ContentHistory, error)
GetIssueContentHistoryByID get issue content history
func (*ContentHistory) TableName ¶
func (m *ContentHistory) TableName() string
TableName provides the real table name
type ErrIssueContentHistoryNotExist ¶
type ErrIssueContentHistoryNotExist struct {
ID int64
}
ErrIssueContentHistoryNotExist not exist error
func (ErrIssueContentHistoryNotExist) Error ¶
func (err ErrIssueContentHistoryNotExist) Error() string
Error error string
type IssueContentListItem ¶
type IssueContentListItem struct { UserID int64 UserName string UserFullName string UserAvatarLink string HistoryID int64 EditedUnix timeutil.TimeStamp IsFirstCreated bool IsDeleted bool }
IssueContentListItem the list for web ui
func FetchIssueContentHistoryList ¶
func FetchIssueContentHistoryList(dbCtx context.Context, issueID, commentID int64) ([]*IssueContentListItem, error)
FetchIssueContentHistoryList fetch list