Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/internal/archive/tool/base.go
1562 views
1
package tool
2
3
import (
4
"github.com/alist-org/alist/v3/internal/model"
5
"github.com/alist-org/alist/v3/internal/stream"
6
"io"
7
)
8
9
type MultipartExtension struct {
10
PartFileFormat string
11
SecondPartIndex int
12
}
13
14
type Tool interface {
15
AcceptedExtensions() []string
16
AcceptedMultipartExtensions() map[string]MultipartExtension
17
GetMeta(ss []*stream.SeekableStream, args model.ArchiveArgs) (model.ArchiveMeta, error)
18
List(ss []*stream.SeekableStream, args model.ArchiveInnerArgs) ([]model.Obj, error)
19
Extract(ss []*stream.SeekableStream, args model.ArchiveInnerArgs) (io.ReadCloser, int64, error)
20
Decompress(ss []*stream.SeekableStream, outputPath string, args model.ArchiveInnerArgs, up model.UpdateProgress) error
21
}
22
23