sparkle

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownOS = errors.New("unknown os")

Functions

func Build

func Build(ctx context.Context, c *Config) error

Types

type Bool

type Bool bool

func (*Bool) MarshalText

func (xb *Bool) MarshalText() ([]byte, error)

func (*Bool) UnmarshalText

func (xb *Bool) UnmarshalText([]byte) error

type CdataString

type CdataString struct {
	Value string `xml:",cdata"`
}

CdataString for XML CDATA See issue: https://github.com/golang/go/issues/16198

type Channel

type Channel struct {
	Title       string  `xml:"title"`
	Link        string  `xml:"link,omitempty"`
	Description string  `xml:"description,omitempty"`
	Language    string  `xml:"language,omitempty"`
	Items       []*Item `xml:"item"`
}

type Config

type Config struct {
	Title       string
	Description string
	URL         string
	FileName    string
	DetectOS    func(string) OS
	DSAKey      *dsa.PrivateKey
	Ed25519Key  ed25519.PrivateKey
	Settings    []Rule

	Source         *source.Source
	Target         target.Target
	Version        string
	Prerelease     bool
	UploadPackages bool
}

type CriticalUpdate

type CriticalUpdate struct {
	Version string `xml:"sparkle:version,attr,omitempty"`
}

type Enclosure

type Enclosure struct {
	URL                  string `xml:"url,attr"`
	OS                   string `xml:"sparkle:os,attr"`
	Version              string `xml:"sparkle:version,attr"`
	DSASignature         string `xml:"sparkle:dsaSignature,attr,omitempty"`
	EDSignature          string `xml:"sparkle:edSignature,attr,omitempty"`
	InstallerArguments   string `xml:"sparkle:installerArguments,attr,omitempty"`
	MinimumSystemVersion string `xml:"sparkle:minimumSystemVersion,attr,omitempty"`
	Length               int    `xml:"length,attr,omitempty"`
	Type                 string `xml:"type,attr"`
}

type Item

type Item struct {
	Title                             string          `xml:"title"`
	PubDate                           string          `xml:"pubDate"`
	Description                       *CdataString    `xml:"description,omitempty"`
	Version                           string          `xml:"sparkle:version,omitempty"`
	ReleaseNotesLink                  string          `xml:"sparkle:releaseNotesLink,omitempty"`
	CriticalUpdate                    *CriticalUpdate `xml:"sparkle:criticalUpdate,omitempty"`
	Tags                              *Tags           `xml:"sparkle:tags,omitempty"`
	MinimumAutoupdateVersion          string          `xml:"sparkle:minimumAutoupdateVersion,omitempty"`
	IgnoreSkippedUpgradesBelowVersion string          `xml:"sparkle:ignoreSkippedUpgradesBelowVersion,omitempty"`
	Enclosure                         *Enclosure      `xml:"enclosure,omitempty"`
}

type OS

type OS uint8
const (
	Unknown OS = iota
	MacOS
	Windows
	Windows64
	Windows32
)

func (OS) MarshalText

func (os OS) MarshalText() ([]byte, error)

func (OS) String

func (os OS) String() string

func (*OS) UnmarshalText

func (os *OS) UnmarshalText(text []byte) error

type RSS

type RSS struct {
	Channels []*Channel `xml:"channel"`
}

func (*RSS) MarshalXML

func (r *RSS) MarshalXML(enc *xml.Encoder, _ xml.StartElement) error

func (*RSS) UnmarshalXML

func (r *RSS) UnmarshalXML(dec *xml.Decoder, _ xml.StartElement) error

type Rule

type Rule struct {
	OS      OS
	Version string
	*Settings
}

type Settings

type Settings struct {
	InstallerArguments                string
	MinimumSystemVersion              string
	MinimumAutoupdateVersion          string
	IgnoreSkippedUpgradesBelowVersion string
	CriticalUpdate                    bool
	CriticalUpdateBelowVersion        string
}

type Tags

type Tags struct {
	CriticalUpdate Bool `xml:"sparkle:criticalUpdate,omitempty"`
}

Jump to

Keyboard shortcuts

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