owpengram-server/internal/domain/media_errors.go

23 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package domain
import "errors"
// 文件分片上传与媒体相关业务错误。rpc 层据此映射为对应 rpc_error见 internal/rpc/errors.go
// 文件分片part invalid/parts invalid/part too big、上传配额、照片与文档。
var (
ErrFilePartInvalid = errors.New("file part invalid")
ErrFilePartsInvalid = errors.New("file parts invalid")
ErrFilePartTooBig = errors.New("file part too big")
ErrUploadQuotaExceeded = errors.New("upload quota exceeded")
// ErrFileTooLarge is returned when a file's total assembled size (sum of
// all its parts, not any single part) exceeds the configured
// TELESRV_STORAGE_MAX_UPLOAD_FILE_BYTES ceiling. Distinct from
// ErrFilePartTooBig, which is a single oversized part.
ErrFileTooLarge = errors.New("file too large")
ErrPhotoInvalid = errors.New("photo invalid")
ErrDocumentInvalid = errors.New("document invalid")
// ErrStorageFull is returned when the configured low-space guard rejects a
// write: local disk free bytes (or, on the s3 backend, the configured
// total-bytes budget) has fallen below the configured threshold.
ErrStorageFull = errors.New("storage full")
)