s3_service

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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, opts ...S3StorageServiceOption) (storage.StorageService, error)

NewWithClient creates a new S3 Storage plugin and injects the given client

Types

type BucketSelector

type BucketSelector = func(nitricName string) (*string, error)

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) Delete

func (s *S3StorageService) Delete(bucket string, key string) error

Delete - Deletes an item from a bucket

func (*S3StorageService) ListFiles added in v0.16.0

func (s *S3StorageService) ListFiles(bucket string) ([]*storage.FileInfo, error)

func (*S3StorageService) PreSignUrl

func (s *S3StorageService) PreSignUrl(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

func (*S3StorageService) Read

func (s *S3StorageService) Read(bucket string, key string) ([]byte, error)

Read - Retrieves an item from a bucket

func (*S3StorageService) Write

func (s *S3StorageService) Write(bucket string, key string, object []byte) error

Write - Writes an item to a bucket

type S3StorageServiceOption

type S3StorageServiceOption interface {
	Apply(*S3StorageService)
}

func WithSelector

func WithSelector(selector BucketSelector) S3StorageServiceOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL