Documentation ¶
Index ¶
- Variables
- type DecodeMp3Request
- type ErrorResponse
- type FFM
- func (f *FFM) DecodeMp3(ctx context.Context, request DecodeMp3Request) (*FileInfoResponse, error)
- func (f *FFM) Info(ctx context.Context, path string) (*FileInfoResponse, error)
- func (f *FFM) LS(ctx context.Context, request LSRequest) ([]FileInfoResponse, error)
- func (f *FFM) MkDir(ctx context.Context, request MkDirRequest) (*FileInfoResponse, error)
- func (f *FFM) Remove(ctx context.Context, request RemoveRequest) error
- func (f *FFM) Upload(ctx context.Context, request UploadRequest) ([]FileInfoResponse, error)
- type FileInfoResponse
- type FileManager
- type LSRequest
- type MkDirRequest
- type PathRequest
- type RemoveRequest
- type UploadFileRequest
- type UploadRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServiceNotFound = apperr.New("service_not_found") ErrInvalidFilter = apperr.New("service_invalid_filter") ErrObjectIsNotFile = apperr.New("service_object_is_not_file") ErrInvalidFileExt = apperr.New("service_invalid_file_ext") ErrObjectIsNotDir = apperr.New("service_object_is_not_dir") ErrObjectIsNotFound = apperr.New("service_object_is_not_found") ErrCreateDirectory = apperr.New("service_create_directory") ErrObjectRemove = apperr.New("service_object_remove") ErrObjectIsAlreadyExists = apperr.New("service_object_is_already_exists") ErrObjectNoWritePermissions = apperr.New("service_object_no_write_permissions") ErrObjectNoRemovePermissions = apperr.New("service_object_no_remove_permissions") ErrDecode = apperr.New("service_decode") ErrRemoveObject = apperr.New("service_remove_object") ErrNoPermissionsToRemoveFile = apperr.New("service_no_permissions_to_remove_file") ErrNoPermissionsToCreateFile = apperr.New("service_no_permissions_to_create_file") ErrNoPermissionsToRemoveDir = apperr.New("service_no_permissions_to_remove_dir") ErrNoPermissionsToCreateDir = apperr.New("service_no_permissions_to_create_dir") ErrNoPermissionsToDownload = apperr.New("service_no_permissions_to_download") )
Functions ¶
This section is empty.
Types ¶
type DecodeMp3Request ¶
type ErrorResponse ¶
type FFM ¶
type FFM struct {
// contains filtered or unexported fields
}
func (*FFM) DecodeMp3 ¶
func (f *FFM) DecodeMp3(ctx context.Context, request DecodeMp3Request) (*FileInfoResponse, error)
func (*FFM) MkDir ¶
func (f *FFM) MkDir(ctx context.Context, request MkDirRequest) (*FileInfoResponse, error)
func (*FFM) Upload ¶
func (f *FFM) Upload(ctx context.Context, request UploadRequest) ([]FileInfoResponse, error)
type FileInfoResponse ¶
type FileManager ¶
type FileManager interface { LS(ctx context.Context, request LSRequest) ([]FileInfoResponse, error) Info(ctx context.Context, path string) (*FileInfoResponse, error) MkDir(ctx context.Context, request MkDirRequest) (*FileInfoResponse, error) DecodeMp3(ctx context.Context, request DecodeMp3Request) (*FileInfoResponse, error) Upload(ctx context.Context, request UploadRequest) ([]FileInfoResponse, error) Remove(ctx context.Context, request RemoveRequest) error }
func New ¶
func New(addr, service, debug string) (FileManager, error)
type LSRequest ¶
type LSRequest struct { Path string `json:"path" url:"path"` Recursive bool `json:"recursive" url:"recursive"` FileFilter *string `json:"file_filter" url:"file_filter"` DirFilter *string `json:"dir_filter" url:"dir_filter"` SkipDirs bool `json:"skip_dirs" url:"skip_dirs"` SkipEmptyDirs bool `json:"skip_empty_dirs" url:"skip_empty_dirs"` SkipPath bool `json:"skip_path" url:"skip_path"` }
type MkDirRequest ¶
type PathRequest ¶
type PathRequest struct {
Path string `json:"path" url:"path"`
}
type RemoveRequest ¶
type UploadFileRequest ¶
type UploadRequest ¶
type UploadRequest struct { Path string Files []UploadFileRequest Append bool }
Click to show internal directories.
Click to hide internal directories.