service

package
v0.0.0-...-53c686c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(config Config) error

Start will get the Image API endpoints from the OpenStack image api, then wrap them in keystone validation. It will then start the https service.

Types

type Config

type Config struct {
	// Port represents the http port that should be used for the service.
	Port int

	// HTTPSCACert is the path to the http ca cert to use.
	HTTPSCACert string

	// HTTPSKey is the path to the https cert key.
	HTTPSKey string

	// DataStore is an interface to a persistent datastore for the image raw data.
	RawDataStore datastore.RawDataStore

	// MetaDataStore is an interface to a persistent datastore for the image meta data.
	MetaDataStore datastore.MetaDataStore

	// IdentityEndpoint is the location of the keystone service.
	IdentityEndpoint string

	// Username is the service username for the image service in keystone.
	Username string

	// Password is the password for the image service user in keystone.
	Password string
}

Config is required to setup the API context for the image service.

type ImageService

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

ImageService is the context for the image service implementation.

func (ImageService) CreateImage

CreateImage will create an empty image in the image datastore.

func (ImageService) GetImage

func (is ImageService) GetImage(imageID string) (image.DefaultResponse, error)

GetImage will get the raw image data

func (ImageService) ListImages

func (is ImageService) ListImages() ([]image.DefaultResponse, error)

ListImages will return a list of all the images in the datastore.

func (ImageService) UploadImage

func (is ImageService) UploadImage(imageID string, body io.Reader) (image.UploadImageResponse, error)

UploadImage will upload a raw image data and update its status.

Jump to

Keyboard shortcuts

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