Documentation ¶
Index ¶
- func GenerateS3KeyName(keypfx string, repo string, commitsha string) string
- type ImageDescription
- type ObjectStorageManager
- type S3Options
- type S3StorageManager
- func (sm *S3StorageManager) Exists(desc ImageDescription, opts interface{}) (bool, error)
- func (sm *S3StorageManager) Pull(desc ImageDescription, out io.WriterAt, opts interface{}) error
- func (sm *S3StorageManager) Push(desc ImageDescription, in io.Reader, opts interface{}) error
- func (sm *S3StorageManager) Size(desc ImageDescription, opts interface{}) (int64, error)
- func (sm *S3StorageManager) WriteFile(name string, desc ImageDescription, contentType string, in io.Reader, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImageDescription ¶
ImageDescription contains all info needed to find a specific image within the object store
type ObjectStorageManager ¶
type ObjectStorageManager interface { Push(ImageDescription, io.Reader, interface{}) error Pull(ImageDescription, io.WriterAt, interface{}) error Size(ImageDescription, interface{}) (int64, error) Exists(desc ImageDescription, opts interface{}) (bool, error) WriteFile(string, ImageDescription, string, io.Reader, interface{}) (string, error) }
ObjectStorageManger describes an object capable of pushing/pulling images from an object store
type S3StorageManager ¶
type S3StorageManager struct {
// contains filtered or unexported fields
}
S3StorageManager is an object capable of pushing/pulling from S3
func NewS3StorageManager ¶
func NewS3StorageManager(config config.AWSConfig, mc metrics.MetricsCollector, logger *log.Logger) *S3StorageManager
NewS3StorageManager returns a new S3 manager
func (*S3StorageManager) Exists ¶
func (sm *S3StorageManager) Exists(desc ImageDescription, opts interface{}) (bool, error)
Exists checks whether the image tarball exists in S3
func (*S3StorageManager) Pull ¶
func (sm *S3StorageManager) Pull(desc ImageDescription, out io.WriterAt, opts interface{}) error
Pull downloads an image from S3 and writes it to out
func (*S3StorageManager) Push ¶
func (sm *S3StorageManager) Push(desc ImageDescription, in io.Reader, opts interface{}) error
Push reads an image from in and pushes it to S3
func (*S3StorageManager) Size ¶
func (sm *S3StorageManager) Size(desc ImageDescription, opts interface{}) (int64, error)
Size returns the size in bytes of the object in S3 if found or error
func (*S3StorageManager) WriteFile ¶
func (sm *S3StorageManager) WriteFile(name string, desc ImageDescription, contentType string, in io.Reader, opts interface{}) (string, error)
WriteFile writes a named file to the configured bucket and returns the S3 location URL
Click to show internal directories.
Click to hide internal directories.