Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultReadWriter ¶
type DefaultReadWriter struct {
// contains filtered or unexported fields
}
DefaultReadWriter the default S3ReadWrite implementation
func (*DefaultReadWriter) GetLatestKeyForID ¶
func (s *DefaultReadWriter) GetLatestKeyForID(id string) (string, error)
GetLatestKeyForID lists s3 objects in the folder for the given ID
func (*DefaultReadWriter) Ping ¶
func (s *DefaultReadWriter) Ping() error
Ping checks whether an S3 session has been initialised
func (*DefaultReadWriter) Read ¶
func (s *DefaultReadWriter) Read(key string) (bool, io.ReadCloser, *string, error)
Read reads the provided key and returns a reader etc.
type MockReadWriter ¶ added in v0.2.12
func (*MockReadWriter) GetLatestKeyForID ¶ added in v0.2.12
func (m *MockReadWriter) GetLatestKeyForID(id string) (string, error)
func (*MockReadWriter) Ping ¶ added in v0.2.12
func (m *MockReadWriter) Ping() error
func (*MockReadWriter) Read ¶ added in v0.2.12
func (m *MockReadWriter) Read(key string) (bool, io.ReadCloser, *string, error)
type ReadWriter ¶
type ReadWriter interface { Write(id string, key string, b []byte, contentType string) error Read(key string) (bool, io.ReadCloser, *string, error) GetLatestKeyForID(id string) (string, error) Ping() error }
ReadWriter is responsible for reading, writing and locating the latest cycle restore files from S3
func NewReadWriter ¶
func NewReadWriter(region string, bucketName string) ReadWriter
NewReadWriter create a new S3 R/W for the given region and bucket
Click to show internal directories.
Click to hide internal directories.