 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func New(provider core.AwsProvider) (storage.StorageService, error)
- func NewWithClient(provider core.AwsProvider, client s3iface.S3API, ...) (storage.StorageService, error)
- type BucketSelector
- type S3StorageService
- func (s *S3StorageService) Delete(ctx context.Context, bucket string, key string) error
- func (s *S3StorageService) ListFiles(ctx context.Context, bucket string) ([]*storage.FileInfo, error)
- func (s *S3StorageService) PreSignUrl(ctx context.Context, bucket string, key string, operation storage.Operation, ...) (string, error)
- func (s *S3StorageService) Read(ctx context.Context, bucket string, key string) ([]byte, error)
- func (s *S3StorageService) Write(ctx context.Context, bucket string, key string, object []byte) error
 
- type S3StorageServiceOption
Constants ¶
      View Source
      
  
const ( // ErrCodeNoSuchTagSet - AWS API neglects to include a constant for this error code. ErrCodeNoSuchTagSet = "NoSuchTagSet" ErrCodeAccessDenied = "AccessDenied" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(provider core.AwsProvider) (storage.StorageService, error)
New creates a new default S3 storage plugin
func NewWithClient ¶
func NewWithClient(provider core.AwsProvider, client s3iface.S3API, preSignClient s3iface.PreSignAPI, opts ...S3StorageServiceOption) (storage.StorageService, error)
NewWithClient creates a new S3 Storage plugin and injects the given client
Types ¶
type BucketSelector ¶
type S3StorageService ¶
type S3StorageService struct {
	storage.UnimplementedStoragePlugin
	// contains filtered or unexported fields
}
    S3StorageService - Is the concrete implementation of AWS S3 for the Nitric Storage Plugin
func (*S3StorageService) PreSignUrl ¶
func (s *S3StorageService) PreSignUrl(ctx context.Context, bucket string, key string, operation storage.Operation, expiry uint32) (string, error)
PreSignUrl - generates a signed URL which can be used to perform direct operations on a file useful for large file uploads/downloads so they can bypass application code and work directly with S3
type S3StorageServiceOption ¶
type S3StorageServiceOption interface {
	Apply(*S3StorageService)
}
    func WithSelector ¶
func WithSelector(selector BucketSelector) S3StorageServiceOption
 Click to show internal directories. 
   Click to hide internal directories.