boshio

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth added in v1.3.0

type Auth struct {
	AccessKey string
	SecretKey string
}

type Client

type Client struct {
	Bar                  bar
	Ranger               ranger
	StemcellMetadataPath string
	ForceRegular         bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient httpClient, b bar, r ranger, forceRegular bool) *Client

func (*Client) DownloadStemcell

func (c *Client) DownloadStemcell(stemcell Stemcell, location string, preserveFileName bool, auth Auth) error

func (*Client) GetStemcells

func (c *Client) GetStemcells(name string) (Stemcells, error)

func (*Client) WriteMetadata

func (c *Client) WriteMetadata(stemcell Stemcell, metadataKey string, metadataFile io.Writer) error

type HTTPClient

type HTTPClient struct {
	Host   string
	Wait   time.Duration
	Client *http.Client
}

func NewHTTPClient

func NewHTTPClient(host string, wait time.Duration) HTTPClient

func (HTTPClient) Do

func (h HTTPClient) Do(req *http.Request) (*http.Response, error)

type Metadata

type Metadata struct {
	URL    string
	Size   int64
	MD5    string
	SHA1   string
	SHA256 string
}

type Stemcell

type Stemcell struct {
	Name         string
	Version      string
	Light        *Metadata `json:"light"`
	Regular      *Metadata `json:"regular"`
	ForceRegular bool
}

func (Stemcell) Details

func (s Stemcell) Details() Metadata

type Stemcells

type Stemcells []Stemcell

func (Stemcells) FilterByType

func (s Stemcells) FilterByType() Stemcells

func (Stemcells) FindStemcellByVersion

func (s Stemcells) FindStemcellByVersion(version string) (Stemcell, bool)

Jump to

Keyboard shortcuts

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