packinterop

package
v0.0.0-...-9cca744 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 11 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 uint32, out io.Writer) error

Types

type AddonFileReference

type AddonFileReference struct {
	ProjectID uint32
	FileID    uint32
	// 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