util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip

func Unzip(src []byte, path string) (filenames []string, err error)

based on https://golangcode.com/unzip-files-in-go/ Code shown Licenced under MIT Licence

Types

type CachedDownloader

type CachedDownloader struct{}

func (CachedDownloader) Download

func (c CachedDownloader) Download(url string) (resp *http.Response, err error)

type CliJSON

type CliJSON struct {
	Catalog   map[string]Entry `json:"catalog"`
	Framework Entry            `json:"framework"`
	Cli       Entry            `json:"cli"`
	CloudInfo CloudInfo
}

func (*CliJSON) Load

func (cj *CliJSON) Load(d Downloader) (err error)

type CloudInfo added in v0.2.0

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

func (*CloudInfo) Instances added in v0.2.0

func (ci *CloudInfo) Instances(p, r string) []string

func (*CloudInfo) Load added in v0.2.0

func (ci *CloudInfo) Load(d Downloader) (err error)

func (*CloudInfo) Providers added in v0.2.0

func (ci *CloudInfo) Providers() []string

func (*CloudInfo) Regions added in v0.2.0

func (ci *CloudInfo) Regions(p string) []string

func (*CloudInfo) Zones added in v0.2.0

func (ci *CloudInfo) Zones(p, r, i string) []string

type Downloader

type Downloader interface {
	Download(url string) (resp *http.Response, err error)
}

type Entry

type Entry struct {
	Name     string    `json:"name"`
	Versions []Version `json:"versions"`
}

func (Entry) GetReleaseOrLatest

func (e Entry) GetReleaseOrLatest(r string) (v Version, err error)

type Instance added in v0.2.0

type Instance struct {
	Name   string   `json:"name"`
	Family string   `json:"family"`
	Zones  []string `json:"zones"`
}

type Provider added in v0.2.0

type Provider map[string]Region

type Region added in v0.2.0

type Region map[string]Instance

type Version

type Version struct {
	Name     string            `json:"name"`
	Archive  string            `json:"archive,omitempty"`
	Archives map[string]string `json:"archives,omitempty"`
}

Jump to

Keyboard shortcuts

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