mod

package
v0.0.0-...-6f03ccd Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mod

type Mod struct {
	Name   string
	Path   string
	Game   game.Game
	Source string
	// contains filtered or unexported fields
}

Mod package. Implements pkg.Package.

func FromSource

func FromSource(source string, game game.Game) (Mod, error)

FromSource creates a mod that installed from the specified source.

func GetMods

func GetMods(path string, game game.Game) ([]Mod, error)

GetMods finds all local mods

func (Mod) Available

func (m Mod) Available() bool

Available checks if it can be installed.

func (Mod) Dependencies

func (m Mod) Dependencies() ([]pkg.Package, error)

Dependencies of a mod including indirect ones.

func (Mod) Info

func (m Mod) Info() (pkg.Info, error)

Info about the mod.

func (Mod) Install

func (m Mod) Install() error

Install the mod

func (Mod) Installed

func (m Mod) Installed() bool

Installed checks if the mod exists or not by checking if it's package.json exists.

func (Mod) NewestDependencies

func (m Mod) NewestDependencies() ([]pkg.Package, error)

NewestDependencies of a mod including indirect ones.

func (Mod) Uninstall

func (m Mod) Uninstall() error

Uninstall the mod.

func (Mod) Update

func (m Mod) Update() error

Update a mod if it's outdated.

type Package

type Package struct {
	Name         string            `json:"name"`
	Description  string            `json:"description"`
	Version      string            `json:"version"`
	Licence      string            `json:"licence"`
	Dependencies map[string]string `json:"ccmodDependencies"`
	Hidden       bool              `json:"hidden"`
}

Package represents the data inside package.json

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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