packaging

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Homepage string `json:"homepage"`
}

type Notification added in v0.1.2

type Notification struct {
	Title string `json:"title"`
	Body  string `json:"body"`
}

type Packager

type Packager struct {
	API    string
	Plugin string
	Debug  bool
	// contains filtered or unexported fields
}

Packager is an object that returns providers from getmelange.com

func (*Packager) AllPlugins

func (p *Packager) AllPlugins() ([]Plugin, error)

func (*Packager) AppFromId

func (p *Packager) AppFromId(id string) (*struct{}, error)

AppFromId will (in the future) return the Application associated with a particular id.

func (*Packager) CheckForPluginUpdates

func (p *Packager) CheckForPluginUpdates() ([]*PluginUpdate, error)

func (*Packager) CreatePluginDirectory

func (p *Packager) CreatePluginDirectory() error

func (*Packager) DecodeProviders

func (p *Packager) DecodeProviders(url string) ([]*Provider, error)

func (*Packager) DecodeStore

func (p *Packager) DecodeStore() ([]*SimplePlugin, error)

func (*Packager) ExecuteUpdate

func (p *Packager) ExecuteUpdate(update *PluginUpdate) error

func (*Packager) GetApps

func (p *Packager) GetApps() ([]*struct{}, error)

GetApps will (in the future) return the Applications from getmelange.com

func (*Packager) GetServers

func (p *Packager) GetServers() ([]*Provider, error)

GetServers will download Servers from getmelange.com.

func (*Packager) GetTrackers

func (p *Packager) GetTrackers() ([]*Provider, error)

GetTrackers will download Trackers from getmelange.com.

func (*Packager) InstallPlugin

func (p *Packager) InstallPlugin(repo string) error

func (*Packager) LoadPlugins

func (p *Packager) LoadPlugins() framework.View

func (*Packager) ServerFromId

func (p *Packager) ServerFromId(id string) (*Provider, error)

ServerFromId will return the Provider instance associated with a particular Id.

func (*Packager) TrackerFromId

func (p *Packager) TrackerFromId(id string) (*Provider, error)

TrackerFromId will return the Provider instance associated with a particular Id.

func (*Packager) UninstallPlugin

func (p *Packager) UninstallPlugin(id string) error

type Plugin

type Plugin struct {
	Id            string                   `json:"id"`
	Name          string                   `json:"name"`
	Version       string                   `json:"version"`
	Description   string                   `json:"description"`
	Permissions   map[string][]string      `json:"permissions"`
	Notifications map[string]*Notification `json:"notifications"`
	Author        Author                   `json:"author"`
	Homepage      string                   `json:"homepage"`
	HideSidebar   bool                     `json:"hideSidebar"`
	Tiles         map[string]Tile          `json:"tiles"`
	Viewers       map[string]Viewer        `json:"viewers"`
}

type PluginUpdate

type PluginUpdate struct {
	Id         string
	Version    semVer
	Changelog  string
	Repository string
}

type Provider

type Provider struct {
	Id string `json:"id"`
	// Metadata
	Name        string `json:"name"`
	Description string `json:"description"`
	Image       string `json:"image"`
	URL         string `json:"url"`
	// Addressing Properties
	Alias         string `json:"alias"`
	Fingerprint   string `json:"fingerprint"`
	EncryptionKey string `json:"encryption_key"`
	// Random
	Proof string            `json:"proof"`
	Users int               `json:"users"`
	Key   *identity.Address `json:"-"`
}

Provider is a JSON Object that represents either a Server or a Tracker. It is used to pass information from getmelange.com to the Melange client.

func (*Provider) LoadDefaults

func (p *Provider) LoadDefaults() error

LoadDefaults will do several things on a provider. 1. Create an ID Based on its Name, URL, and Fingerprint 2. Set a default image for the Melange Client. 3. Create the (*identity).Address

type SimplePlugin

type SimplePlugin struct {
	Id          string
	Name        string
	Description string
	Username    string
	Repository  string
	Installed   bool
}

type Tile

type Tile struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	View        string `json:"view"`
	Size        string `json:"size"`
	Click       bool   `json:"click"`
}

type Viewer

type Viewer struct {
	Type   []string `json:"type"`
	View   string   `json:"view"`
	Hidden bool     `json:"hidden"`
}

Jump to

Keyboard shortcuts

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