Back to

package sdk

Latest Go to latest
Published: Jan 14, 2020 | License: MIT | Module:



const UserAgent = "minion-updater/1.0.0"


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

func NewUserAgentTransport

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

type Minion

type Minion struct {
	// contains filtered or unexported fields

func New

func New() *Minion

func (*Minion) Apply

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

func (*Minion) Check

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

func (*Minion) CurrentPath

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

func (*Minion) Download

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

func (*Minion) NewPath

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

func (*Minion) OldPath

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

func (*Minion) Reload

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 {
	Reporter func(r int)

func (*ProgressReader) Read

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

type UpdateResponse

type UpdateResponse struct {
	Success bool   `json:"success"`
	Version string `json:"version"`
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier