2022-06-23 07:57:10 +00:00
|
|
|
package errs
|
2022-06-06 13:48:53 +00:00
|
|
|
|
2022-06-15 11:10:11 +00:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
pkgerr "github.com/pkg/errors"
|
|
|
|
)
|
2022-06-06 13:48:53 +00:00
|
|
|
|
|
|
|
var (
|
2022-06-23 08:03:27 +00:00
|
|
|
ObjectNotFound = errors.New("object not found")
|
|
|
|
NotImplement = errors.New("not implement")
|
|
|
|
NotSupport = errors.New("not support")
|
|
|
|
RelativePath = errors.New("access using relative path is not allowed")
|
2022-06-23 07:57:10 +00:00
|
|
|
|
2022-06-23 08:03:27 +00:00
|
|
|
MoveBetweenTwoAccounts = errors.New("can't move files between two account, try to copy")
|
|
|
|
UploadNotSupported = errors.New("upload not supported")
|
|
|
|
NotFolder = errors.New("not a folder")
|
|
|
|
NotFile = errors.New("not a file")
|
|
|
|
|
|
|
|
MetaNotFound = errors.New("meta not found")
|
2022-06-06 13:48:53 +00:00
|
|
|
)
|
2022-06-15 11:10:11 +00:00
|
|
|
|
2022-06-23 08:03:27 +00:00
|
|
|
func IsObjectNotFound(err error) bool {
|
|
|
|
return pkgerr.Cause(err) == ObjectNotFound
|
2022-06-15 11:10:11 +00:00
|
|
|
}
|