Documentation ¶
Index ¶
- func DeleteArtifact(art sdk.Artifact) error
- func DeletePlugin(art sdk.ActionPlugin) error
- func DeleteTemplateExtension(tmpl sdk.TemplateExtension) error
- func FetchArtifact(art sdk.Artifact) (io.ReadCloser, error)
- func FetchPlugin(art sdk.ActionPlugin) (io.ReadCloser, error)
- func FetchTemplateExtension(tmpl sdk.TemplateExtension) (io.ReadCloser, error)
- func Initialize(cfg Config) error
- func Status() string
- func StoreArtifact(art sdk.Artifact, data io.ReadCloser) (string, error)
- func StorePlugin(art sdk.ActionPlugin, data io.ReadCloser) (string, error)
- func StoreTemplateExtension(tmpl sdk.TemplateExtension, data io.ReadCloser) (string, error)
- func StreamFile(w io.Writer, f io.ReadCloser) error
- type AccessType
- type AuthToken
- type Config
- type ConfigOptions
- type ConfigOptionsFilesystem
- type ConfigOptionsOpenstack
- type Driver
- type FilesystemStore
- type Kind
- type Object
- type OpenstackStore
- type ServiceCatalogEntry
- type ServiceEndpoint
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteArtifact ¶
DeleteArtifact an artifact with default objectstore driver
func DeletePlugin ¶
func DeletePlugin(art sdk.ActionPlugin) error
DeletePlugin call Delete on the common driver
func DeleteTemplateExtension ¶
func DeleteTemplateExtension(tmpl sdk.TemplateExtension) error
DeleteTemplateExtension call Delete on the common driver
func FetchArtifact ¶
func FetchArtifact(art sdk.Artifact) (io.ReadCloser, error)
FetchArtifact an artifact with default objectstore driver
func FetchPlugin ¶
func FetchPlugin(art sdk.ActionPlugin) (io.ReadCloser, error)
FetchPlugin call Fetch on the common driver
func FetchTemplateExtension ¶
func FetchTemplateExtension(tmpl sdk.TemplateExtension) (io.ReadCloser, error)
FetchTemplateExtension call Fetch on the common driver
func StoreArtifact ¶
StoreArtifact an artifact with default objectstore driver
func StorePlugin ¶
func StorePlugin(art sdk.ActionPlugin, data io.ReadCloser) (string, error)
StorePlugin call Store on the common driver
func StoreTemplateExtension ¶
func StoreTemplateExtension(tmpl sdk.TemplateExtension, data io.ReadCloser) (string, error)
StoreTemplateExtension call Store on the common driver
Types ¶
type AccessType ¶
type AccessType struct { Token Token `json:"token"` User interface{} `json:"id"` ServiceCatalog []ServiceCatalogEntry `json:"servicecatalog"` }
AccessType describe the access given by token
type AuthToken ¶
type AuthToken struct {
Access AccessType `json:"access"`
}
AuthToken is a specific openstack format
type Config ¶ added in v0.4.0
type Config struct { Kind Kind Options ConfigOptions }
Config represents all the configuration for all objecstore drivers
type ConfigOptions ¶ added in v0.4.0
type ConfigOptions struct { Openstack ConfigOptionsOpenstack Filesystem ConfigOptionsFilesystem }
ConfigOptions is used by Config
type ConfigOptionsFilesystem ¶ added in v0.4.0
type ConfigOptionsFilesystem struct {
Basedir string
}
ConfigOptionsFilesystem is used by ConfigOptions
type ConfigOptionsOpenstack ¶ added in v0.4.0
type ConfigOptionsOpenstack struct { Address string Username string Password string Tenant string Region string }
ConfigOptionsOpenstack is used by ConfigOptions
type Driver ¶
type Driver interface { Status() string Store(o Object, data io.ReadCloser) (string, error) Fetch(o Object) (io.ReadCloser, error) Delete(o Object) error }
Driver allows artifact to be stored and retrieve the same way to any backend - Openstack / Swift - Filesystem
type FilesystemStore ¶
type FilesystemStore struct {
// contains filtered or unexported fields
}
FilesystemStore implements ObjectStore interface with filesystem driver
func NewFilesystemStore ¶
func NewFilesystemStore(basedir string) (*FilesystemStore, error)
NewFilesystemStore creates a new ObjectStore with filesystem driver
func (*FilesystemStore) Delete ¶
func (fss *FilesystemStore) Delete(o Object) error
Delete data on disk
func (*FilesystemStore) Fetch ¶
func (fss *FilesystemStore) Fetch(o Object) (io.ReadCloser, error)
Fetch lookup on disk for data
func (*FilesystemStore) Status ¶
func (fss *FilesystemStore) Status() string
Status return filesystem storage status
func (*FilesystemStore) Store ¶
func (fss *FilesystemStore) Store(o Object, data io.ReadCloser) (string, error)
Store store a object on disk
type Kind ¶ added in v0.4.0
type Kind int
Kind will define const defining all supported objecstore drivers
type OpenstackStore ¶
type OpenstackStore struct {
// contains filtered or unexported fields
}
OpenstackStore implements ObjectStore interface with openstack implementation
func NewOpenstackStore ¶
func NewOpenstackStore(address, user, password, tenant, region string) (*OpenstackStore, error)
NewOpenstackStore create a new ObjectStore with openstack driver and check configuration
func (*OpenstackStore) Delete ¶
func (ops *OpenstackStore) Delete(o Object) error
Delete should delete on openstack
func (*OpenstackStore) Fetch ¶
func (ops *OpenstackStore) Fetch(o Object) (io.ReadCloser, error)
Fetch lookup on openstack to fetch data
func (*OpenstackStore) Status ¶
func (ops *OpenstackStore) Status() string
Status return Openstack storage status
func (*OpenstackStore) Store ¶
func (ops *OpenstackStore) Store(o Object, data io.ReadCloser) (string, error)
Store stores in openstack
type ServiceCatalogEntry ¶
type ServiceCatalogEntry struct { Name string `json:"name"` Type string `json:"type"` Endpoints []ServiceEndpoint `json:"endpoints"` }
ServiceCatalogEntry is an openstack specific object
type ServiceEndpoint ¶
type ServiceEndpoint struct { Type string `json:"type"` Region string `json:"region"` PublicURL string `json:"publicurl"` AdminURL string `json:"adminurl"` InternalURL string `json:"internalurl"` VersionID string `json:"versionid"` }
ServiceEndpoint describe an openstack endpoint