modrinth

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileEnv

type FileEnv struct {
	Client string `json:"client"`
	Server string `json:"server"`
}

FileEnv represents the environment requirements for a file

type HashRequest

type HashRequest struct {
	Hashes    []string `json:"hashes"`
	Algorithm string   `json:"algorithm"`
}

HashRequest represents the request structure for the Modrinth API hash lookup

type HashResponse

type HashResponse struct {
	ID        string `json:"id"`
	ProjectID string `json:"project_id"`
}

HashResponse represents a single item in the hash lookup response

type ModInfo added in v0.1.2

type ModInfo struct {
	ProjectID   string
	VersionID   string
	ProjectName string
	FileName    string
	Side        string
}

ModInfo represents information about a mod

type ModSources added in v0.1.2

type ModSources struct {
	Modrinth   int
	CurseForge int
	URL        int
	Other      int
}

ModSources represents mod counts by source

type ModrinthIndexFile

type ModrinthIndexFile struct {
	FormatVersion int                    `json:"formatVersion"`
	Game          string                 `json:"game"`
	VersionID     string                 `json:"versionId"`
	Name          string                 `json:"name"`
	Summary       string                 `json:"summary,omitempty"`
	Files         []ModrinthIndexFileRef `json:"files"`
	Dependencies  map[string]string      `json:"dependencies"`
}

ModrinthIndexFile represents the structure of modrinth.index.json in .mrpack files

type ModrinthIndexFileRef

type ModrinthIndexFileRef struct {
	Path      string            `json:"path"`
	Hashes    map[string]string `json:"hashes"`
	Env       *FileEnv          `json:"env,omitempty"`
	Downloads []string          `json:"downloads"`
	FileSize  int               `json:"fileSize"`
}

ModrinthIndexFileRef represents a file reference in the modrinth index

type Pack

type Pack struct {
	FormatVersion uint32            `json:"formatVersion"`
	Game          string            `json:"game"`
	VersionID     string            `json:"versionId"`
	Name          string            `json:"name"`
	Summary       string            `json:"summary,omitempty"`
	Files         []PackFile        `json:"files"`
	Dependencies  map[string]string `json:"dependencies"`
}

type PackFile

type PackFile struct {
	Path   string            `json:"path"`
	Hashes map[string]string `json:"hashes"`
	Env    *struct {
		Client string `json:"client"`
		Server string `json:"server"`
	} `json:"env"`
	Downloads []string `json:"downloads"`
	FileSize  uint32   `json:"fileSize"`
}

Jump to

Keyboard shortcuts

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