forked from itchio/boar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
45 lines (35 loc) · 780 Bytes
/
types.go
File metadata and controls
45 lines (35 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package boar
import (
"errors"
"github.com/itchio/dash"
"github.com/itchio/savior"
"github.com/itchio/httpkit/eos"
"github.com/itchio/headway/state"
)
var (
ErrUnrecognizedArchiveType = errors.New("Unrecognized archive type")
)
type LoadFunc func(state interface{}) error
type SaveFunc func(state interface{}) error
type ExtractParams struct {
File eos.File
StagePath string
OutputPath string
Consumer *state.Consumer
Load LoadFunc
Save SaveFunc
}
type ProbeParams struct {
File eos.File
Consumer *state.Consumer
Candidate *dash.Candidate
OnEntries func(entries []*savior.Entry)
}
type Contents struct {
Entries []*Entry
}
// Entry refers to a file entry in an archive
type Entry struct {
Name string
UncompressedSize int64
}