Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + const AES256GCM_RSA + const AsyncWriteBack + const CHACHA20_RSA + const CopyOperation + const DefaultMaxReplicas + const DefaultStorageClass + const Ephemeral + const FilterOBS + const FilterOSS + const FilterS3 + const HeaderDragonflyObjectMetaLastModifiedTime + const HeaderDragonflyObjectMetaStorageClass + const HeaderDragonflyObjectOperation + const MaxGetObjectMetadatasLimit + const MaxReplicasLimit + const WriteBack + var HEADER_NAMES = []string + var OVHCompileRegexp = `^s3\.(\w*)(\.\w*)?\.cloud\.ovh\.net$` + var PutInplace bool + var TryCFR bool + var UserAgent = "JuiceFS" + func ExportRsaPrivateKeyToPem(key *rsa.PrivateKey, passphrase string) string + func GetHttpClient() *http.Client + func IsErrReplicating(err error) bool + func IsFileSystem(object ObjectStorage) bool + func ListAll(store ObjectStorage, prefix, marker string, followLink bool) (<-chan Object, error) + func ListAllWithDelimiter(store ObjectStorage, prefix, start, end string, followLink bool) (<-chan Object, error) + func MarshalObject(o Object) map[string]interface + func ParseRsaPrivateKeyFromPath(path, passphrase string) (*rsa.PrivateKey, error) + func ParseRsaPrivateKeyFromPem(enc []byte, passphrase []byte) (*rsa.PrivateKey, error) + func Register(name string, register Creator) + func Shutdown(o ObjectStorage) + type AttrGetter func(attrs *ResponseAttrs) + func WithRequestID(id *string) AttrGetter + func WithStorageClass(sc *string) AttrGetter + type COS struct + func (c *COS) AbortUpload(key string, uploadID string) + func (c *COS) CompleteUpload(key string, uploadID string, parts []*Part) error + func (c *COS) Copy(dst, src string) error + func (c *COS) Create() error + func (c *COS) CreateMultipartUpload(key string) (*MultipartUpload, error) + func (c *COS) Delete(key string, getters ...AttrGetter) error + func (c *COS) Get(key string, off, limit int64, getters ...AttrGetter) (io.ReadCloser, error) + func (c *COS) Head(key string) (Object, error) + func (c *COS) Limits() Limits + func (c *COS) List(prefix, marker, delimiter string, limit int64, followLink bool) ([]Object, error) + func (c *COS) ListAll(prefix, marker string, followLink bool) (<-chan Object, error) + func (c *COS) ListUploads(marker string) ([]*PendingPart, string, error) + func (c *COS) Put(key string, in io.Reader, getters ...AttrGetter) error + func (c *COS) SetStorageClass(sc string) error + func (c *COS) String() string + func (c *COS) UploadPart(key string, uploadID string, num int, body []byte) (*Part, error) + func (c *COS) UploadPartCopy(key string, uploadID string, num int, srcKey string, off, size int64) (*Part, error) + type Creator func(bucket, accessKey, secretKey, token string) (ObjectStorage, error) + type DataItem struct + FileName string + ModifyTime int + Size int64 + type DefaultObjectStorage struct + func (s DefaultObjectStorage) AbortUpload(key string, uploadID string) + func (s DefaultObjectStorage) CompleteUpload(key string, uploadID string, parts []*Part) error + func (s DefaultObjectStorage) Copy(dst, src string) error + func (s DefaultObjectStorage) Create() error + func (s DefaultObjectStorage) CreateMultipartUpload(key string) (*MultipartUpload, error) + func (s DefaultObjectStorage) Head(key string) (Object, error) + func (s DefaultObjectStorage) Limits() Limits + func (s DefaultObjectStorage) List(prefix, marker, delimiter string, limit int64, followLink bool) ([]Object, error) + func (s DefaultObjectStorage) ListAll(prefix, marker string, followLink bool) (<-chan Object, error) + func (s DefaultObjectStorage) ListUploads(marker string) ([]*PendingPart, string, error) + func (s DefaultObjectStorage) UploadPart(key string, uploadID string, num int, body []byte) (*Part, error) + func (s DefaultObjectStorage) UploadPartCopy(key string, uploadID string, num int, srcKey string, off, size int64) (*Part, error) + type Encryptor interface + Decrypt func(ciphertext []byte) ([]byte, error) + Encrypt func(plaintext []byte) ([]byte, error) + func NewDataEncryptor(keyEncryptor Encryptor, algo string) (Encryptor, error) + func NewRSAEncryptor(privKey *rsa.PrivateKey) Encryptor + type File interface + Group func() string + Mode func() os.FileMode + Owner func() string + type FileSystem interface + Chmod func(path string, mode os.FileMode) error + Chown func(path string, owner, group string) error + type Limits struct + IsSupportMultipartUpload bool + IsSupportUploadPartCopy bool + MaxPartCount int + MaxPartSize int64 + MinPartSize int + type MtimeChanger interface + Chtimes func(path string, mtime time.Time) error + type MultipartUpload struct + MaxCount int + MinPartSize int + UploadID string + type Object interface + IsDir func() bool + IsSymlink func() bool + Key func() string + Mtime func() time.Time + Size func() int64 + StorageClass func() string + func UnmarshalObject(m map[string]interface{}) Object + type ObjectMetadata struct + ContentDisposition string + ContentEncoding string + ContentLanguage string + ContentLength int64 + ContentType string + Digest string + ETag string + Key string + LastModifiedTime time.Time + StorageClass string + type ObjectMetadatas struct + CommonPrefixes []string + Metadatas []*ObjectMetadata + type ObjectStorage interface + AbortUpload func(key string, uploadID string) + CompleteUpload func(key string, uploadID string, parts []*Part) error + Copy func(dst, src string) error + Create func() error + CreateMultipartUpload func(key string) (*MultipartUpload, error) + Delete func(key string, getters ...AttrGetter) error + Get func(key string, off, limit int64, getters ...AttrGetter) (io.ReadCloser, error) + Head func(key string) (Object, error) + Limits func() Limits + List func(prefix, marker, delimiter string, limit int64, followLink bool) ([]Object, error) + ListAll func(prefix, marker string, followLink bool) (<-chan Object, error) + ListUploads func(marker string) ([]*PendingPart, string, error) + Put func(key string, in io.Reader, getters ...AttrGetter) error + String func() string + UploadPart func(key string, uploadID string, num int, body []byte) (*Part, error) + UploadPartCopy func(key string, uploadID string, num int, srcKey string, off, size int64) (*Part, error) + func CreateStorage(name, endpoint, accessKey, secretKey, token string) (ObjectStorage, error) + func NewEncrypted(o ObjectStorage, enc Encryptor) ObjectStorage + func NewSharded(name, endpoint, ak, sk, token string, shards int) (ObjectStorage, error) + func WithPrefix(os ObjectStorage, prefix string) ObjectStorage + type ObjectStorageMetadata struct + Endpoint string + Name string + Region string + type Part struct + ETag string + Num int + Size int + type PendingPart struct + Created time.Time + Key string + UploadID string + type ResponseAttrs struct + func (r *ResponseAttrs) SetRequestID(id string) *ResponseAttrs + func (r *ResponseAttrs) SetStorageClass(sc string) *ResponseAttrs + type RestfulStorage struct + func (s *RestfulStorage) Copy(dst, src string) error + func (s *RestfulStorage) Delete(key string, getters ...AttrGetter) error + func (s *RestfulStorage) Get(key string, off, limit int64, getters ...AttrGetter) (io.ReadCloser, error) + func (s *RestfulStorage) Head(key string) (Object, error) + func (s *RestfulStorage) List(prefix, marker, delimiter string, limit int64, followLink bool) ([]Object, error) + func (s *RestfulStorage) String() string + func (u *RestfulStorage) Put(key string, body io.Reader, getters ...AttrGetter) error + type SectionReaderCloser struct + type Shutdownable interface + Shutdown func() + type SupportStorageClass interface + SetStorageClass func(sc string) error + type SupportSymlink interface + Readlink func(name string) (string, error) + Symlink func(oldName, newName string) error