Documentation ¶
Index ¶
- func Start(config Config) error
- type Config
- type ImageService
- func (is ImageService) CreateImage(req image.CreateImageRequest) (image.DefaultResponse, error)
- func (is ImageService) DeleteImage(imageID string) (image.NoContentImageResponse, error)
- func (is ImageService) GetImage(imageID string) (image.DefaultResponse, error)
- func (is ImageService) ListImages() ([]image.DefaultResponse, error)
- func (is ImageService) UploadImage(imageID string, body io.Reader) (image.NoContentImageResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (is ImageService) CreateImage(req image.CreateImageRequest) (image.DefaultResponse, error)
CreateImage will create an empty image in the image datastore.
func (ImageService) DeleteImage ¶
func (is ImageService) DeleteImage(imageID string) (image.NoContentImageResponse, error)
DeleteImage will delete a raw image and its metadata
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.NoContentImageResponse, error)
UploadImage will upload a raw image data and update its status.
Click to show internal directories.
Click to hide internal directories.