Documentation ¶
Index ¶
- type File
- func (f *File) Download(ctx context.Context, fileID string) ([]byte, error)
- func (f *File) DownloadAvatar(ctx context.Context, imageID string) ([]byte, error)
- func (f *File) UploadAvatarByBuffer(ctx context.Context, fileName string, buffer []byte) (*structs.Avatar, error)
- func (f *File) UploadAvatarByPath(ctx context.Context, fileName, path string) (*structs.Avatar, error)
- func (f *File) UploadAvatarByReader(ctx context.Context, fileName string, reader io.Reader) (*structs.Avatar, error)
- func (f *File) UploadByBuffer(ctx context.Context, fileName string, buffer []byte) (*structs.FileUploadResult, error)
- func (f *File) UploadByPath(ctx context.Context, fileName, path string) (*structs.FileUploadResult, error)
- func (f *File) UploadByReader(ctx context.Context, fileName string, reader io.Reader) (*structs.FileUploadResult, error)
- type IFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) DownloadAvatar ¶
func (*File) UploadAvatarByBuffer ¶
func (*File) UploadAvatarByPath ¶
func (*File) UploadAvatarByReader ¶
func (*File) UploadByBuffer ¶
func (*File) UploadByPath ¶
type IFile ¶
type IFile interface { UploadByPath(ctx context.Context, fileName, path string) (*structs.FileUploadResult, error) UploadByReader(ctx context.Context, fileName string, reader io.Reader) (*structs.FileUploadResult, error) UploadByBuffer(ctx context.Context, fileName string, buffer []byte) (*structs.FileUploadResult, error) UploadAvatarByPath(ctx context.Context, fileName, path string) (*structs.Avatar, error) UploadAvatarByReader(ctx context.Context, fileName string, reader io.Reader) (*structs.Avatar, error) UploadAvatarByBuffer(ctx context.Context, fileName string, buffer []byte) (*structs.Avatar, error) Download(ctx context.Context, fileID string) ([]byte, error) DownloadAvatar(ctx context.Context, imageID string) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.