comp500 5dfe23e51d Implement pack importing/exporting for downloaded Curseforge packs
Abstract out hash implementations
Implement file saving/downloading
2019-11-12 22:11:40 +00:00

26 lines
472 B
Go

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
}