packinterop

package
v0.0.0-...-96ce845 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteManifestFromPack

func WriteManifestFromPack(pack core.Pack, fileRefs []AddonFileReference, projectID int, out io.Writer) error

Types

type AddonFileReference

type AddonFileReference struct {
	ProjectID int
	FileID    int
	// OptionalDisabled is true if the file is optional and disabled (turned off in Twitch launcher)
	OptionalDisabled bool
}

AddonFileReference is a struct to reference a single file on CurseForge

type ImportPackFile

type ImportPackFile interface {
	Name() string
	Open() (io.ReadCloser, error)
}

type ImportPackMetadata

type ImportPackMetadata interface {
	Name() string
	PackAuthor() string
	PackVersion() string
	Versions() map[string]string
	Mods() []AddonFileReference
	GetFiles() ([]ImportPackFile, error)
}

type ImportPackSource

type ImportPackSource interface {
	GetFile(path string) (ImportPackFile, error)
	GetFileList() ([]ImportPackFile, error)
	GetPackFile() ImportPackFile
}

func GetDiskPackSource

func GetDiskPackSource(metaSource *bufio.Reader, metaName string, basePath string) ImportPackSource

func GetZipPackSource

func GetZipPackSource(metaFile *zip.File, reader *zip.Reader) ImportPackSource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL