sdk

package module
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 14 Imported by: 0

README

minion-sdk

Minion SDK allows you to integrate your app with the Minion Server enabling the auto-update feature for your Go based applications

Documentation

Index

Constants

View Source
const UserAgent = "minion-updater/1.0.0"

Variables

View Source
var UpdateNotAvailable = errors.New("no update available")

Functions

func NewUserAgentTransport

func NewUserAgentTransport(userAgent string, rt http.RoundTripper) *minionTransport

Types

type Minion added in v0.2.0

type Minion struct {
	// contains filtered or unexported fields
}

func New added in v0.2.0

func New() *Minion

func (*Minion) Apply added in v0.3.0

func (m *Minion) Apply(b []byte) error

func (*Minion) Check added in v0.2.0

func (m *Minion) Check(opts Options) (*UpdateResponse, error)

func (*Minion) CurrentPath added in v0.5.4

func (m *Minion) CurrentPath() (string, error)

func (*Minion) Download added in v0.2.0

func (m *Minion) Download(opts Options) ([]byte, error)

func (*Minion) NewPath added in v0.5.4

func (m *Minion) NewPath() (string, error)

func (*Minion) OldPath added in v0.5.4

func (m *Minion) OldPath() (string, error)

func (*Minion) Reload added in v0.3.0

func (m *Minion) Reload() error

type Options

type Options struct {
	AppId          string
	Version        string
	Channel        string
	UpdateCheckURL string
	NewVersion     string
}

type ProgressReader

type ProgressReader struct {
	io.Reader
	Reporter func(r int)
}

func (*ProgressReader) Read

func (r *ProgressReader) Read(p []byte) (n int, err error)

type UpdateResponse added in v0.2.0

type UpdateResponse struct {
	Success bool   `json:"success"`
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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