modfile

package
v0.0.0-...-7b00221 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.Default()

Functions

This section is empty.

Types

type ContactInformation

type ContactInformation map[string]string

type FabricMod

type FabricMod struct {
	FabricModJson FabricModJson
}

type FabricModJson

type FabricModJson struct {
	SchemaVersion int                  `json:"schemaVersion"`
	Id            string               `json:"id"`
	Version       string               `json:"version"`
	Name          string               `json:"name"`
	Description   string               `json:"description"`
	Authors       []Person             `json:"authors"`
	Contact       ContactInformation   `json:"contact"`
	License       StringAdd            `json:"license"`
	Icon          string               `json:"icon"`
	Environment   string               `json:"environment"`
	Depends       map[string]StringAdd `json:"depends"`
}

type Mod

type Mod struct {
	FabricMod FabricMod                  `json:"fabricMod"`
	Hashes    modrinth.VersionFileHashes `json:"hashes"`
}

func (*Mod) UpdateToFile

func (m *Mod) UpdateToFile(updateTo UpdateTo, client *api.Client) (*modFetch, error)

type ModUpdateStatus

type ModUpdateStatus struct {
	Original Mod      `json:"original"`
	UpdateTo UpdateTo `json:"updateTo"`
	Err      error    `json:"err"`
}

type Mods

type Mods struct {
	MinecraftVersion string `json:"minecraftVersion"`
	Loader           string `json:"loader"`
	LoaderVersion    string `json:"loaderVersion"`
	ModsPath         string `json:"modsPath"`
	Mods             []Mod  `json:"mods"`
}

func Extract_mods

func Extract_mods(modpath string) (Mods, error)

func (*Mods) UpdateToPath

func (m *Mods) UpdateToPath(loader string, mcVersion string, path string) ([]ModUpdateStatus, error)

type Person

type Person struct {
	Name    string             `json:"name"`
	Contact ContactInformation `json:"contact"`
}

func (Person) MarshalJSON

func (p Person) MarshalJSON() ([]byte, error)

func (*Person) UnmarshalJSON

func (p *Person) UnmarshalJSON(data []byte) error

type StringAdd

type StringAdd []string

func (StringAdd) MarshalJSON

func (sos StringAdd) MarshalJSON() ([]byte, error)

func (*StringAdd) UnmarshalJSON

func (sos *StringAdd) UnmarshalJSON(data []byte) error

type UpdateTo

type UpdateTo struct {
	Loader           string `json:"loader"`
	MinecraftVersion string `json:"minecraftVersion"`
}

Jump to

Keyboard shortcuts

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