plugin

package
v0.0.0-...-b045b3a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Name               string
	URI                string
	Sha                string
	Processors         []Processor              `yaml:"-"`
	OriginalProcessors []map[string]interface{} `yaml:"processors,flow"`
}

Plugin represents an individual Minecraft plugin dependency

func (*Plugin) Init

func (p *Plugin) Init() error

Init processes the config into the required structure

func (*Plugin) Install

func (p *Plugin) Install() error

Install downlods the plugin if it doesn't exist, processes it, and installs it to the plugins dir

type Processor

type Processor interface {
	Process(p *Plugin) error
}

Processor represents a plugin post-processor

func NewProcessorFromConfig

func NewProcessorFromConfig(p *Plugin, config map[string]interface{}) (Processor, error)

NewProcessorFromConfig builds a Processor from a config

type UnzipProcessor

type UnzipProcessor struct {
	Type string
	File string
}

UnzipProcessor unzips a file to extract a plugin

func (*UnzipProcessor) Process

func (pr *UnzipProcessor) Process(p *Plugin) error

Process performs the unzip

Jump to

Keyboard shortcuts

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