amazon

package
v0.0.0-...-0bc8de7 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoUpdateInfo = errors.New("no updateinfo field")

Functions

func Fetch

func Fetch(opts ...Option) error

Types

type MirrorURL

type MirrorURL struct {
	Core  string
	Extra string

	KernelLivePatch string
	// contains filtered or unexported fields
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithDir

func WithDir(dir string) Option

func WithMirrorURLs

func WithMirrorURLs(u map[string]MirrorURL) Option

func WithRetry

func WithRetry(retry int) Option

type Update

type Update struct {
	ID      string `xml:"id" json:"ID,omitempty"`
	Author  string `xml:"author,attr" json:"Author,omitempty"`
	From    string `xml:"from,attr" json:"From,omitempty"`
	Status  string `xml:"status,attr" json:"Status,omitempty"`
	Type    string `xml:"type,attr" json:"Type,omitempty"`
	Version string `xml:"version,attr" json:"Version,omitempty"`
	Title   string `xml:"title" json:"Title,omitempty"`
	Issued  struct {
		Date string `xml:"date,attr" json:"Date,omitempty"`
	} `xml:"issued" json:"Issued,omitzero"`
	Updated struct {
		Date string `xml:"date,attr" json:"Date,omitempty"`
	} `xml:"updated" json:"Updated,omitzero"`
	Severity    string `xml:"severity" json:"Severity,omitempty"`
	Description string `xml:"description" json:"Description,omitempty"`
	References  struct {
		Reference []struct {
			Href  string `xml:"href,attr" json:"Href,omitempty"`
			ID    string `xml:"id,attr" json:"ID,omitempty"`
			Title string `xml:"title,attr" json:"Title,omitempty"`
			Type  string `xml:"type,attr" json:"Type,omitempty"`
		} `xml:"reference" json:"Reference,omitempty"`
	} `xml:"references" json:"References,omitzero"`
	Pkglist struct {
		Collection struct {
			Short   string `xml:"short,attr" json:"Short,omitempty"`
			Name    string `xml:"name" json:"Name,omitempty"`
			Package []struct {
				Arch     string `xml:"arch,attr" json:"Arch,omitempty"`
				Epoch    string `xml:"epoch,attr" json:"Epoch,omitempty"`
				Name     string `xml:"name,attr" json:"Name,omitempty"`
				Release  string `xml:"release,attr" json:"Release,omitempty"`
				Version  string `xml:"version,attr" json:"Version,omitempty"`
				Filename string `xml:"filename" json:"Filename,omitempty"`
			} `xml:"package" json:"Package,omitempty"`
		} `xml:"collection" json:"Collection,omitzero"`
	} `xml:"pkglist" json:"Pkglist,omitzero"`
}