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



    This section is empty.


    This section is empty.


    func Binary

    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

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

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


        type Component

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

          A Component represents a downloadable component.

          func NewComponent

          func NewComponent(latest string) Component

            NewComponent returns a new Component.

            type Manifest

            type Manifest map[string]Component

              A Manifest represents a Download Manifest

              func RetrieveManifest

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

                RetrieveManifest fetch the manifest at the given URL.

                type Variant

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

                  A Variant represents a variant of a Version.

                  func NewVariant

                  func NewVariant(url, signature string) Variant

                    NewVariant returns a new Variant.

                    type Version

                    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

                      func NewVersion(version, changelog string) Version

                        NewVersion returns a new Version.

                        Source Files