mirror of
https://github.com/packwiz/packwiz.git
synced 2025-11-19 01:24:32 +01:00
Implement pack importing/exporting for downloaded Curseforge packs
Abstract out hash implementations Implement file saving/downloading
This commit is contained in:
25
curseforge/packinterop/interfaces.go
Normal file
25
curseforge/packinterop/interfaces.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package packinterop
|
||||
|
||||
import "io"
|
||||
|
||||
type ImportPackFile interface {
|
||||
Name() string
|
||||
Open() (io.ReadCloser, error)
|
||||
}
|
||||
|
||||
type ImportPackMetadata interface {
|
||||
Name() string
|
||||
Versions() map[string]string
|
||||
// TODO: use AddonFileReference?
|
||||
Mods() []struct {
|
||||
ModID int
|
||||
FileID int
|
||||
}
|
||||
GetFiles() ([]ImportPackFile, error)
|
||||
}
|
||||
|
||||
type ImportPackSource interface {
|
||||
GetFile(path string) (ImportPackFile, error)
|
||||
GetFileList() ([]ImportPackFile, error)
|
||||
GetPackFile() ImportPackFile
|
||||
}
|
||||
Reference in New Issue
Block a user