Documentation ¶
Index ¶
- Constants
- func ApplyKmsCmk(svc *FileService)
- func GetKMSKey() string
- type FileService
- func (svc *FileService) CleanExpiredFiles(_expiredAt ...time.Time) error
- func (svc *FileService) DeleteFile(file dao.File) error
- func (svc *FileService) DownloadFile(w io.Writer, file dao.File) (headers map[string]string, err error)
- func (svc *FileService) UploadFile(req apistructs.FileUploadRequest) (*apistructs.File, error)
- type Option
Constants ¶
View Source
const (
HeaderContentLength = "Content-Length" // The Content-Length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
)
Variables ¶
This section is empty.
Functions ¶
func ApplyKmsCmk ¶
func ApplyKmsCmk(svc *FileService)
Types ¶
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
func (*FileService) CleanExpiredFiles ¶
func (svc *FileService) CleanExpiredFiles(_expiredAt ...time.Time) error
func (*FileService) DeleteFile ¶
func (svc *FileService) DeleteFile(file dao.File) error
func (*FileService) DownloadFile ¶
func (svc *FileService) DownloadFile(w io.Writer, file dao.File) (headers map[string]string, err error)
DownloadFile write file to writer `w`, return corresponding file http response headers.
func (*FileService) UploadFile ¶
func (svc *FileService) UploadFile(req apistructs.FileUploadRequest) (*apistructs.File, error)
type Option ¶
type Option func(*FileService)
Option 定义 FileService 配置选项
func WithBundle ¶
func WithEtcdClient ¶
Click to show internal directories.
Click to hide internal directories.