addedeffect: go.aporeto.io/addedeffect/download Index | Files

package download

import "go.aporeto.io/addedeffect/download"

Package download contains utilities to interact with public downloadabale Aporeto releases.

Index

Package Files

doc.go download.go

func Binary Uses

func Binary(ctx context.Context, url string, dest string, mode os.FileMode, signature string) error

Binary downloads and saves the binary at the given url to the given dest with the given mode.

func IsOutdated Uses

func IsOutdated(current, available string) (bool, error)

IsOutdated checks if the given current is outdated relatively to the second using semver.

type Component Uses

type Component struct {
    Latest   string             `json:"latest"`
    Versions map[string]Version `json:"versions"`
}

A Component represents a downloadable component.

func NewComponent Uses

func NewComponent(latest string) Component

NewComponent returns a new Component.

type Manifest Uses

type Manifest map[string]Component

A Manifest represents a Download Manifest

func RetrieveManifest Uses

func RetrieveManifest(ctx context.Context, url string) (Manifest, error)

RetrieveManifest fetch the manifest at the given URL.

type Variant Uses

type Variant struct {
    URL       string `json:"url"`
    Signature string `json:"signature"`
}

A Variant represents a variant of a Version.

func NewVariant Uses

func NewVariant(url, signature string) Variant

NewVariant returns a new Variant.

type Version Uses

type Version struct {
    Version   string             `json:"version"`
    ChangeLog string             `json:"changelog"`
    Variants  map[string]Variant `json:"variants"`
}

A Version represents a particular version of a Component.

func NewVersion Uses

func NewVersion(version, changelog string) Version

NewVersion returns a new Version.

Package download imports 12 packages (graph). Updated 2019-11-14. Refresh now. Tools for package owners.