fileinfostore (#15236)
* Migration completed * Fix i18n * Fix imports * Fix typos and improvements * Add new error handling case * Fix i18n * Fix store layers * Fix shadowing vars * Lint: remove unnecessary use of sprintf * Lint: remove unnecessary use of sprint * Adding the translation message * trigger CI Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7cc26bf659
Коммит
b451b3cf86
@@ -2867,7 +2867,7 @@ func (s *OpenTracingLayerEmojiStore) Search(name string, prefixOnly bool, limit
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) AttachToPost(fileId string, postId string, creatorId string) *model.AppError {
|
||||
func (s *OpenTracingLayerFileInfoStore) AttachToPost(fileId string, postId string, creatorId string) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.AttachToPost")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2898,7 +2898,7 @@ func (s *OpenTracingLayerFileInfoStore) ClearCaches() {
|
||||
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) DeleteForPost(postId string) (string, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) DeleteForPost(postId string) (string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.DeleteForPost")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2916,7 +2916,7 @@ func (s *OpenTracingLayerFileInfoStore) DeleteForPost(postId string) (string, *m
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) Get(id string) (*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) Get(id string) (*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.Get")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2934,7 +2934,7 @@ func (s *OpenTracingLayerFileInfoStore) Get(id string) (*model.FileInfo, *model.
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) GetByPath(path string) (*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.GetByPath")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2952,7 +2952,7 @@ func (s *OpenTracingLayerFileInfoStore) GetByPath(path string) (*model.FileInfo,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) GetForPost(postId string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) GetForPost(postId string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.GetForPost")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2970,7 +2970,7 @@ func (s *OpenTracingLayerFileInfoStore) GetForPost(postId string, readFromMaster
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) GetForUser(userId string) ([]*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) GetForUser(userId string) ([]*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.GetForUser")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -2988,7 +2988,7 @@ func (s *OpenTracingLayerFileInfoStore) GetForUser(userId string) ([]*model.File
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.GetWithOptions")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3019,7 +3019,7 @@ func (s *OpenTracingLayerFileInfoStore) InvalidateFileInfosForPostCache(postId s
|
||||
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDelete(fileId string) *model.AppError {
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDelete(fileId string) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.PermanentDelete")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3037,7 +3037,7 @@ func (s *OpenTracingLayerFileInfoStore) PermanentDelete(fileId string) *model.Ap
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.PermanentDeleteBatch")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3055,7 +3055,7 @@ func (s *OpenTracingLayerFileInfoStore) PermanentDeleteBatch(endTime int64, limi
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDeleteByUser(userId string) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) PermanentDeleteByUser(userId string) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.PermanentDeleteByUser")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3073,7 +3073,7 @@ func (s *OpenTracingLayerFileInfoStore) PermanentDeleteByUser(userId string) (in
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, *model.AppError) {
|
||||
func (s *OpenTracingLayerFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "FileInfoStore.Save")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
|
||||
Ссылка в новой задаче
Block a user