sources

package
v0.0.0-...-eb1bd99 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: BSD-3-Clause, MIT Imports: 8 Imported by: 4

README

Sources

Examples for local and remote update sources.

The remote update source is compatible with a static location like S3.

The local update source is used primarily for testing (locally).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalUpdateSource

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

LocalUpdateSource finds releases/updates from a path (used primarily for testing)

func NewLocalUpdateSource

func NewLocalUpdateSource(path string, jsonPath string, log Log) LocalUpdateSource

NewLocalUpdateSource returns local update source

func (LocalUpdateSource) Description

func (k LocalUpdateSource) Description() string

Description is local update source description

func (LocalUpdateSource) FindUpdate

func (k LocalUpdateSource) FindUpdate(options updater.UpdateOptions) (*updater.Update, error)

FindUpdate returns update for options

type Log

type Log interface {
	Debugf(s string, args ...interface{})
	Infof(s string, args ...interface{})
	Warningf(s string, args ...interface{})
	Errorf(s string, args ...interface{})
}

Log is the logging interface for the sources package

type RemoteUpdateSource

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

RemoteUpdateSource finds releases/updates from custom url feed (used primarily for testing)

func NewRemoteUpdateSource

func NewRemoteUpdateSource(defaultURI string, log Log) RemoteUpdateSource

NewRemoteUpdateSource builds remote update source without defaults. The url used is passed via options instead.

func (RemoteUpdateSource) Description

func (r RemoteUpdateSource) Description() string

Description returns update source description

func (RemoteUpdateSource) FindUpdate

func (r RemoteUpdateSource) FindUpdate(options updater.UpdateOptions) (*updater.Update, error)

FindUpdate returns update for options

Jump to

Keyboard shortcuts

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