Documentation ¶
Index ¶
- type ObjectStore
- func (o *ObjectStore) CreateSignedURL(container, object string, ttl time.Duration) (string, error)
- func (o *ObjectStore) DeleteObject(container, object string) error
- func (o *ObjectStore) GetObject(container, object string) (io.ReadCloser, error)
- func (o *ObjectStore) Init(config map[string]string) error
- func (o *ObjectStore) ListCommonPrefixes(container, prefix, delimiter string) ([]string, error)
- func (o *ObjectStore) ListObjects(container, prefix string) ([]string, error)
- func (o *ObjectStore) ObjectExists(container, object string) (bool, error)
- func (o *ObjectStore) PutObject(container string, object string, body io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectStore ¶
type ObjectStore struct {
// contains filtered or unexported fields
}
ObjectStore is swift type that holds client and log
func NewObjectStore ¶
func NewObjectStore(log logrus.FieldLogger) *ObjectStore
NewObjectStore instantiates a Swift ObjectStore.
func (*ObjectStore) CreateSignedURL ¶
CreateSignedURL creates temporary URL for object in container
func (*ObjectStore) DeleteObject ¶
func (o *ObjectStore) DeleteObject(container, object string) error
DeleteObject deletes object specified by object from container
func (*ObjectStore) GetObject ¶
func (o *ObjectStore) GetObject(container, object string) (io.ReadCloser, error)
GetObject returns body of Swift object defined by container name and object
func (*ObjectStore) Init ¶
func (o *ObjectStore) Init(config map[string]string) error
Init initializes the plugin. After v0.10.0, this can be called multiple times.
func (*ObjectStore) ListCommonPrefixes ¶
func (o *ObjectStore) ListCommonPrefixes(container, prefix, delimiter string) ([]string, error)
ListCommonPrefixes returns list of objects in container, that match specified prefix
func (*ObjectStore) ListObjects ¶
func (o *ObjectStore) ListObjects(container, prefix string) ([]string, error)
ListObjects lists objects with prefix in all containers
func (*ObjectStore) ObjectExists ¶
func (o *ObjectStore) ObjectExists(container, object string) (bool, error)
ObjectExists does Get operation and validates result or error to find out if object exists
Click to show internal directories.
Click to hide internal directories.