imageimport

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package imageimport enables management of images import and retrieval of the Imageservice Import API information.

Example to Get an information about the Import API

importInfo, err := imageimport.Get(imagesClient).Extract()
if err != nil {
	panic(err)
}

fmt.Printf("%+v\n", importInfo)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetResult

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

GetResult represents the result of a get operation. Call its Extract method to interpret it as ImportInfo.

func Get

Get retrieves Import API information data.

func (GetResult) Extract

func (r GetResult) Extract() (*ImportInfo, error)

Extract is a function that accepts a result and extracts ImportInfo.

type ImportInfo

type ImportInfo struct {
	ImportMethods ImportMethods `json:"import-methods"`
}

ImportInfo represents information data for the Import API.

type ImportMethod

type ImportMethod string

ImportMethod represents valid Import API method.

const (
	// GlanceDirectMethod represents glance-direct Import API method.
	GlanceDirectMethod ImportMethod = "glance-direct"

	// WebDownloadMethod represents web-download Import API method.
	WebDownloadMethod ImportMethod = "web-download"
)

type ImportMethods

type ImportMethods struct {
	Description string   `json:"description"`
	Type        string   `json:"type"`
	Value       []string `json:"value"`
}

ImportMethods contains information about available Import API methods.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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