s3mem

package
v0.0.0-...-a70a5c1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################

Index

Constants

View Source
const S3MemEndpointsID = "http://s3mem"

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(canonicalID, email *string) error

For future development

func Handlers

func Handlers() aws.Handlers

func NewDefaultResolver

func NewDefaultResolver() aws.EndpointResolver

func ParseObjectURL

func ParseObjectURL(url *string) (bucket, key *string, err error)

Types

type Bucket

type Bucket struct {
	Bucket                  *s3.Bucket
	AccessControlPolicy     *s3.AccessControlPolicy
	MFA                     *string
	VersioningConfiguration *s3.VersioningConfiguration
	Objects                 map[string]*VersionedObjects
	Mux                     sync.Mutex
}

(bucket/key/version)

type Client

type Client struct {
	s3.Client
}

func New

func New(config aws.Config) *Client

func (*Client) AbortMultipartUploadRequest

func (c *Client) AbortMultipartUploadRequest(input *s3.AbortMultipartUploadInput) s3.AbortMultipartUploadRequest

AbortMultipartUploadRequest ...

func (*Client) AddDebugHandlers

func (c *Client) AddDebugHandlers()

AddDebugHandlers injects debug logging handlers into the service to log request debug information.

func (*Client) CompleteMultipartUploadRequest

func (c *Client) CompleteMultipartUploadRequest(input *s3.CompleteMultipartUploadInput) s3.CompleteMultipartUploadRequest

CompleteMultipartUploadRequest ...

func (*Client) CopyObjectRequest

func (c *Client) CopyObjectRequest(input *s3.CopyObjectInput) s3.CopyObjectRequest

CopyObjectRequest ...

func (*Client) CreateBucketRequest

func (c *Client) CreateBucketRequest(input *s3.CreateBucketInput) s3.CreateBucketRequest

CreateBucketRequest ...

func (*Client) CreateMultipartUploadRequest

func (c *Client) CreateMultipartUploadRequest(input *s3.CreateMultipartUploadInput) s3.CreateMultipartUploadRequest

CreateMultipartUploadRequest ...

func (*Client) DeleteBucketAnalyticsConfigurationRequest

func (c *Client) DeleteBucketAnalyticsConfigurationRequest(input *s3.DeleteBucketAnalyticsConfigurationInput) s3.DeleteBucketAnalyticsConfigurationRequest

DeleteBucketAnalyticsConfigurationRequest ...

func (*Client) DeleteBucketCorsRequest

func (c *Client) DeleteBucketCorsRequest(input *s3.DeleteBucketCorsInput) s3.DeleteBucketCorsRequest

DeleteBucketCorsRequest ...

func (*Client) DeleteBucketEncryptionRequest

func (c *Client) DeleteBucketEncryptionRequest(input *s3.DeleteBucketEncryptionInput) s3.DeleteBucketEncryptionRequest

DeleteBucketEncryptionRequest ...

func (*Client) DeleteBucketInventoryConfigurationRequest

func (c *Client) DeleteBucketInventoryConfigurationRequest(input *s3.DeleteBucketInventoryConfigurationInput) s3.DeleteBucketInventoryConfigurationRequest

DeleteBucketInventoryConfigurationRequest ...

func (*Client) DeleteBucketLifecycleRequest

func (c *Client) DeleteBucketLifecycleRequest(input *s3.DeleteBucketLifecycleInput) s3.DeleteBucketLifecycleRequest

DeleteBucketLifecycleRequest ...

func (*Client) DeleteBucketMetricsConfigurationRequest

func (c *Client) DeleteBucketMetricsConfigurationRequest(input *s3.DeleteBucketMetricsConfigurationInput) s3.DeleteBucketMetricsConfigurationRequest

DeleteBucketMetricsConfigurationRequest ...

func (*Client) DeleteBucketPolicyRequest

func (c *Client) DeleteBucketPolicyRequest(input *s3.DeleteBucketPolicyInput) s3.DeleteBucketPolicyRequest

DeleteBucketPolicyRequest ...

func (*Client) DeleteBucketReplicationRequest

func (c *Client) DeleteBucketReplicationRequest(input *s3.DeleteBucketReplicationInput) s3.DeleteBucketReplicationRequest

DeleteBucketReplicationRequest ...

func (*Client) DeleteBucketRequest

func (c *Client) DeleteBucketRequest(input *s3.DeleteBucketInput) s3.DeleteBucketRequest

DeleteBucketRequest ...

func (*Client) DeleteBucketTaggingRequest

func (c *Client) DeleteBucketTaggingRequest(input *s3.DeleteBucketTaggingInput) s3.DeleteBucketTaggingRequest

DeleteBucketTaggingRequest ...

func (*Client) DeleteBucketWebsiteRequest

func (c *Client) DeleteBucketWebsiteRequest(input *s3.DeleteBucketWebsiteInput) s3.DeleteBucketWebsiteRequest

DeleteBucketWebsiteRequest ...

func (*Client) DeleteObjectRequest

func (c *Client) DeleteObjectRequest(input *s3.DeleteObjectInput) s3.DeleteObjectRequest

DeleteObjectRequest ...

func (*Client) DeleteObjectTaggingRequest

func (c *Client) DeleteObjectTaggingRequest(input *s3.DeleteObjectTaggingInput) s3.DeleteObjectTaggingRequest

DeleteObjectTaggingRequest ...

func (*Client) DeleteObjectsRequest

func (c *Client) DeleteObjectsRequest(input *s3.DeleteObjectsInput) s3.DeleteObjectsRequest

DeleteObjectsRequest ...

func (*Client) DeletePublicAccessBlockRequest

func (c *Client) DeletePublicAccessBlockRequest(input *s3.DeletePublicAccessBlockInput) s3.DeletePublicAccessBlockRequest

DeletePublicAccessBlockRequest ...

func (*Client) GetBucketAccelerateConfigurationRequest

func (c *Client) GetBucketAccelerateConfigurationRequest(input *s3.GetBucketAccelerateConfigurationInput) s3.GetBucketAccelerateConfigurationRequest

GetBucketAccelerateConfigurationRequest ...

func (*Client) GetBucketAclRequest

func (c *Client) GetBucketAclRequest(input *s3.GetBucketAclInput) s3.GetBucketAclRequest

GetBucketAclRequest ...

func (*Client) GetBucketAnalyticsConfigurationRequest

func (c *Client) GetBucketAnalyticsConfigurationRequest(input *s3.GetBucketAnalyticsConfigurationInput) s3.GetBucketAnalyticsConfigurationRequest

GetBucketAnalyticsConfigurationRequest ...

func (*Client) GetBucketCorsRequest

func (c *Client) GetBucketCorsRequest(input *s3.GetBucketCorsInput) s3.GetBucketCorsRequest

GetBucketCorsRequest ...

func (*Client) GetBucketEncryptionRequest

func (c *Client) GetBucketEncryptionRequest(input *s3.GetBucketEncryptionInput) s3.GetBucketEncryptionRequest

GetBucketEncryptionRequest ...

func (*Client) GetBucketInventoryConfigurationRequest

func (c *Client) GetBucketInventoryConfigurationRequest(input *s3.GetBucketInventoryConfigurationInput) s3.GetBucketInventoryConfigurationRequest

GetBucketInventoryConfigurationRequest ...

func (*Client) GetBucketLifecycleConfigurationRequest

func (c *Client) GetBucketLifecycleConfigurationRequest(input *s3.GetBucketLifecycleConfigurationInput) s3.GetBucketLifecycleConfigurationRequest

GetBucketLifecycleConfigurationRequest ...

func (*Client) GetBucketLifecycleRequest

func (c *Client) GetBucketLifecycleRequest(input *s3.GetBucketLifecycleInput) s3.GetBucketLifecycleRequest

GetBucketLifecycleRequest ...

func (*Client) GetBucketLocationRequest

func (c *Client) GetBucketLocationRequest(input *s3.GetBucketLocationInput) s3.GetBucketLocationRequest

GetBucketLocationRequest ...

func (*Client) GetBucketLoggingRequest

func (c *Client) GetBucketLoggingRequest(input *s3.GetBucketLoggingInput) s3.GetBucketLoggingRequest

GetBucketLoggingRequest ...

func (*Client) GetBucketMetricsConfigurationRequest

func (c *Client) GetBucketMetricsConfigurationRequest(input *s3.GetBucketMetricsConfigurationInput) s3.GetBucketMetricsConfigurationRequest

GetBucketMetricsConfigurationRequest ...

func (*Client) GetBucketNotificationConfigurationRequest

func (c *Client) GetBucketNotificationConfigurationRequest(input *s3.GetBucketNotificationConfigurationInput) s3.GetBucketNotificationConfigurationRequest

GetBucketNotificationConfigurationRequest ...

func (*Client) GetBucketNotificationRequest

func (c *Client) GetBucketNotificationRequest(input *s3.GetBucketNotificationInput) s3.GetBucketNotificationRequest

GetBucketNotificationRequest ...

func (*Client) GetBucketPolicyRequest

func (c *Client) GetBucketPolicyRequest(input *s3.GetBucketPolicyInput) s3.GetBucketPolicyRequest

GetBucketPolicyRequest ...

func (*Client) GetBucketPolicyStatusRequest

func (c *Client) GetBucketPolicyStatusRequest(input *s3.GetBucketPolicyStatusInput) s3.GetBucketPolicyStatusRequest

GetBucketPolicyStatusRequest ...

func (*Client) GetBucketReplicationRequest

func (c *Client) GetBucketReplicationRequest(input *s3.GetBucketReplicationInput) s3.GetBucketReplicationRequest

GetBucketReplicationRequest ...

func (*Client) GetBucketRequestPaymentRequest

func (c *Client) GetBucketRequestPaymentRequest(input *s3.GetBucketRequestPaymentInput) s3.GetBucketRequestPaymentRequest

GetBucketRequestPaymentRequest ...

func (*Client) GetBucketTaggingRequest

func (c *Client) GetBucketTaggingRequest(input *s3.GetBucketTaggingInput) s3.GetBucketTaggingRequest

GetBucketTaggingRequest ...

func (*Client) GetBucketVersioningRequest

func (c *Client) GetBucketVersioningRequest(input *s3.GetBucketVersioningInput) s3.GetBucketVersioningRequest

GetBucketVersioningRequest ...

func (*Client) GetBucketWebsiteRequest

func (c *Client) GetBucketWebsiteRequest(input *s3.GetBucketWebsiteInput) s3.GetBucketWebsiteRequest

GetBucketWebsiteRequest ...

func (*Client) GetObjectAclRequest

func (c *Client) GetObjectAclRequest(input *s3.GetObjectAclInput) s3.GetObjectAclRequest

GetObjectAclRequest ...

func (*Client) GetObjectLegalHoldRequest

func (c *Client) GetObjectLegalHoldRequest(input *s3.GetObjectLegalHoldInput) s3.GetObjectLegalHoldRequest

GetObjectLegalHoldRequest ...

func (*Client) GetObjectLockConfigurationRequest

func (c *Client) GetObjectLockConfigurationRequest(input *s3.GetObjectLockConfigurationInput) s3.GetObjectLockConfigurationRequest

GetObjectLockConfigurationRequest ...

func (*Client) GetObjectRequest

func (c *Client) GetObjectRequest(input *s3.GetObjectInput) s3.GetObjectRequest

GetObjectRequest ...

func (*Client) GetObjectRetentionRequest

func (c *Client) GetObjectRetentionRequest(input *s3.GetObjectRetentionInput) s3.GetObjectRetentionRequest

GetObjectRetentionRequest ...

func (*Client) GetObjectTaggingRequest

func (c *Client) GetObjectTaggingRequest(input *s3.GetObjectTaggingInput) s3.GetObjectTaggingRequest

GetObjectTaggingRequest ...

func (*Client) GetObjectTorrentRequest

func (c *Client) GetObjectTorrentRequest(input *s3.GetObjectTorrentInput) s3.GetObjectTorrentRequest

GetObjectTorrentRequest ...

func (*Client) GetPublicAccessBlockRequest

func (c *Client) GetPublicAccessBlockRequest(input *s3.GetPublicAccessBlockInput) s3.GetPublicAccessBlockRequest

GetPublicAccessBlockRequest ...

func (*Client) HeadBucketRequest

func (c *Client) HeadBucketRequest(input *s3.HeadBucketInput) s3.HeadBucketRequest

HeadBucketRequest ...

func (*Client) HeadObjectRequest

func (c *Client) HeadObjectRequest(input *s3.HeadObjectInput) s3.HeadObjectRequest

HeadObjectRequest ...

func (*Client) ListBucketAnalyticsConfigurationsRequest

func (c *Client) ListBucketAnalyticsConfigurationsRequest(input *s3.ListBucketAnalyticsConfigurationsInput) s3.ListBucketAnalyticsConfigurationsRequest

ListBucketAnalyticsConfigurationsRequest ...

func (*Client) ListBucketInventoryConfigurationsRequest

func (c *Client) ListBucketInventoryConfigurationsRequest(input *s3.ListBucketInventoryConfigurationsInput) s3.ListBucketInventoryConfigurationsRequest

ListBucketInventoryConfigurationsRequest ...

func (*Client) ListBucketMetricsConfigurationsRequest

func (c *Client) ListBucketMetricsConfigurationsRequest(input *s3.ListBucketMetricsConfigurationsInput) s3.ListBucketMetricsConfigurationsRequest

ListBucketMetricsConfigurationsRequest ...

func (*Client) ListBucketsRequest

func (c *Client) ListBucketsRequest(input *s3.ListBucketsInput) s3.ListBucketsRequest

ListBucketsRequest ...

func (*Client) ListMultipartUploadsRequest

func (c *Client) ListMultipartUploadsRequest(input *s3.ListMultipartUploadsInput) s3.ListMultipartUploadsRequest

ListMultipartUploadsRequest ...

func (*Client) ListObjectVersionsRequest

func (c *Client) ListObjectVersionsRequest(input *s3.ListObjectVersionsInput) s3.ListObjectVersionsRequest

ListObjectVersionsRequest ...

func (*Client) ListObjectsRequest

func (c *Client) ListObjectsRequest(input *s3.ListObjectsInput) s3.ListObjectsRequest

ListObjectsRequest ...

func (*Client) ListObjectsV2Request

func (c *Client) ListObjectsV2Request(input *s3.ListObjectsV2Input) s3.ListObjectsV2Request

ListObjectsV2Request ...

func (*Client) ListPartsRequest

func (c *Client) ListPartsRequest(input *s3.ListPartsInput) s3.ListPartsRequest

ListPartsRequest ...

func (*Client) NewRequest

func (c *Client) NewRequest(operation *aws.Operation, params interface{}, data interface{}) *aws.Request

func (*Client) NotImplemented

func (c *Client) NotImplemented() *aws.Request

func (*Client) PutBucketAccelerateConfigurationRequest

func (c *Client) PutBucketAccelerateConfigurationRequest(input *s3.PutBucketAccelerateConfigurationInput) s3.PutBucketAccelerateConfigurationRequest

PutBucketAccelerateConfigurationRequest ...

func (*Client) PutBucketAclRequest

func (c *Client) PutBucketAclRequest(input *s3.PutBucketAclInput) s3.PutBucketAclRequest

PutBucketAclRequest ...

func (*Client) PutBucketAnalyticsConfigurationRequest

func (c *Client) PutBucketAnalyticsConfigurationRequest(input *s3.PutBucketAnalyticsConfigurationInput) s3.PutBucketAnalyticsConfigurationRequest

PutBucketAnalyticsConfigurationRequest ...

func (*Client) PutBucketCorsRequest

func (c *Client) PutBucketCorsRequest(input *s3.PutBucketCorsInput) s3.PutBucketCorsRequest

PutBucketCorsRequest ...

func (*Client) PutBucketEncryptionRequest

func (c *Client) PutBucketEncryptionRequest(input *s3.PutBucketEncryptionInput) s3.PutBucketEncryptionRequest

PutBucketEncryptionRequest ...

func (*Client) PutBucketInventoryConfigurationRequest

func (c *Client) PutBucketInventoryConfigurationRequest(input *s3.PutBucketInventoryConfigurationInput) s3.PutBucketInventoryConfigurationRequest

PutBucketInventoryConfigurationRequest ...

func (*Client) PutBucketLifecycleConfigurationRequest

func (c *Client) PutBucketLifecycleConfigurationRequest(input *s3.PutBucketLifecycleConfigurationInput) s3.PutBucketLifecycleConfigurationRequest

PutBucketLifecycleConfigurationRequest ...

func (*Client) PutBucketLifecycleRequest

func (c *Client) PutBucketLifecycleRequest(input *s3.PutBucketLifecycleInput) s3.PutBucketLifecycleRequest

PutBucketLifecycleRequest ...

func (*Client) PutBucketLoggingRequest

func (c *Client) PutBucketLoggingRequest(input *s3.PutBucketLoggingInput) s3.PutBucketLoggingRequest

PutBucketLoggingRequest ...

func (*Client) PutBucketMetricsConfigurationRequest

func (c *Client) PutBucketMetricsConfigurationRequest(input *s3.PutBucketMetricsConfigurationInput) s3.PutBucketMetricsConfigurationRequest

PutBucketMetricsConfigurationRequest ...

func (*Client) PutBucketNotificationConfigurationRequest

func (c *Client) PutBucketNotificationConfigurationRequest(input *s3.PutBucketNotificationConfigurationInput) s3.PutBucketNotificationConfigurationRequest

PutBucketNotificationConfigurationRequest ...

func (*Client) PutBucketNotificationRequest

func (c *Client) PutBucketNotificationRequest(input *s3.PutBucketNotificationInput) s3.PutBucketNotificationRequest

PutBucketNotificationRequest ...

func (*Client) PutBucketPolicyRequest

func (c *Client) PutBucketPolicyRequest(input *s3.PutBucketPolicyInput) s3.PutBucketPolicyRequest

PutBucketPolicyRequest ...

func (*Client) PutBucketReplicationRequest

func (c *Client) PutBucketReplicationRequest(input *s3.PutBucketReplicationInput) s3.PutBucketReplicationRequest

PutBucketReplicationRequest ...

func (*Client) PutBucketRequestPaymentRequest

func (c *Client) PutBucketRequestPaymentRequest(input *s3.PutBucketRequestPaymentInput) s3.PutBucketRequestPaymentRequest

PutBucketRequestPaymentRequest ...

func (*Client) PutBucketTaggingRequest

func (c *Client) PutBucketTaggingRequest(input *s3.PutBucketTaggingInput) s3.PutBucketTaggingRequest

PutBucketTaggingRequest ...

func (*Client) PutBucketVersioningRequest

func (c *Client) PutBucketVersioningRequest(input *s3.PutBucketVersioningInput) s3.PutBucketVersioningRequest

PutBucketVersioningRequest ...

func (*Client) PutBucketWebsiteRequest

func (c *Client) PutBucketWebsiteRequest(input *s3.PutBucketWebsiteInput) s3.PutBucketWebsiteRequest

PutBucketWebsiteRequest ...

func (*Client) PutObjectAclRequest

func (c *Client) PutObjectAclRequest(input *s3.PutObjectAclInput) s3.PutObjectAclRequest

PutObjectAclRequest ...

func (*Client) PutObjectLegalHoldRequest

func (c *Client) PutObjectLegalHoldRequest(input *s3.PutObjectLegalHoldInput) s3.PutObjectLegalHoldRequest

PutObjectLegalHoldRequest ...

func (*Client) PutObjectLockConfigurationRequest

func (c *Client) PutObjectLockConfigurationRequest(input *s3.PutObjectLockConfigurationInput) s3.PutObjectLockConfigurationRequest

PutObjectLockConfigurationRequest ...

func (*Client) PutObjectRequest

func (c *Client) PutObjectRequest(input *s3.PutObjectInput) s3.PutObjectRequest

PutObjectRequest ...

func (*Client) PutObjectRetentionRequest

func (c *Client) PutObjectRetentionRequest(input *s3.PutObjectRetentionInput) s3.PutObjectRetentionRequest

PutObjectRetentionRequest ...

func (*Client) PutObjectTaggingRequest

func (c *Client) PutObjectTaggingRequest(input *s3.PutObjectTaggingInput) s3.PutObjectTaggingRequest

PutObjectTaggingRequest ...

func (*Client) PutPublicAccessBlockRequest

func (c *Client) PutPublicAccessBlockRequest(input *s3.PutPublicAccessBlockInput) s3.PutPublicAccessBlockRequest

PutPublicAccessBlockRequest ...

func (*Client) RestoreObjectRequest

func (c *Client) RestoreObjectRequest(input *s3.RestoreObjectInput) s3.RestoreObjectRequest

RestoreObjectRequest ...

func (*Client) UploadPartCopyRequest

func (c *Client) UploadPartCopyRequest(input *s3.UploadPartCopyInput) s3.UploadPartCopyRequest

UploadPartCopyRequest ...

func (*Client) UploadPartRequest

func (c *Client) UploadPartRequest(input *s3.UploadPartInput) s3.UploadPartRequest

UploadPartRequest ...

func (*Client) WaitUntilBucketExists

func (c *Client) WaitUntilBucketExists(context.Context, *s3.HeadBucketInput, ...aws.WaiterOption) error

WaitUntilBucketExists ...

func (*Client) WaitUntilBucketNotExists

func (c *Client) WaitUntilBucketNotExists(context.Context, *s3.HeadBucketInput, ...aws.WaiterOption) error

WaitUntilBucketNotExists ...

func (*Client) WaitUntilObjectExists

func (c *Client) WaitUntilObjectExists(context.Context, *s3.HeadObjectInput, ...aws.WaiterOption) error

WaitUntilObjectExists ...

func (*Client) WaitUntilObjectNotExists

func (c *Client) WaitUntilObjectNotExists(context.Context, *s3.HeadObjectInput, ...aws.WaiterOption) error

WaitUntilObjectNotExists ...

type Object

type Object struct {
	Object              *s3.Object
	AccessControlPolicy *s3.AccessControlPolicy
	DeletedObject       *s3.DeletedObject
	Content             []byte
}

type S3MemService

type S3MemService struct {
	URL     string
	Buckets map[string]*Bucket
	Mux     sync.Mutex
}

func GetDefaultS3MemService

func GetDefaultS3MemService() *S3MemService

GetDefaultS3MemService Returns the s3mem service. Panic if the service does not exist.

func GetS3MemService

func GetS3MemService(s3service string) *S3MemService

GetS3MemService Returns the s3mem service of a specific name

func GetTestS3MemService

func GetTestS3MemService(t *testing.T) *S3MemService

GetTestS3MemService Returns the s3mem service for the current test.

func NewDefaultS3MemService

func NewDefaultS3MemService() *S3MemService

NewDefaultS3MemService Creates a new service with "http://s3mem" as url Panic if the S3MemService already exists

func NewS3MemService

func NewS3MemService(s3service string) *S3MemService

NewS3MemService Create a new service with a specific url Panic if the S3MemService already exists

func NewTestS3MemService

func NewTestS3MemService(t *testing.T) *S3MemService

NewTestS3MemService Creates a new service with concanation of "http://s3mem_" and the test name Panic if the S3MemService already exists

func (*S3MemService) CreateBucket

func (s *S3MemService) CreateBucket(b *s3.Bucket)

CreateBucket adds a bucket in memory The default s3service is S3MemEndpointsID

func (*S3MemService) DeleteBucket

func (s *S3MemService) DeleteBucket(bucket *string)

DeleteBucket deletes an object from memory The default s3service is S3MemEndpointsID

func (*S3MemService) DeleteObject

func (s *S3MemService) DeleteObject(bucket *string, key *string, versionIDS *string) (deleteMarkerOut *bool, deleteMarkerVersionIDOut *string, err s3memerr.S3MemError)

DeleteObject Deletes an object The default s3service is S3MemEndpointsID

func (*S3MemService) DeleteS3MemService

func (s *S3MemService) DeleteS3MemService()

Delete the current service

func (*S3MemService) GetBucket

func (s *S3MemService) GetBucket(bucket *string) *s3.Bucket

GetBucket gets a bucket from memory The default s3service is S3MemEndpointsID

func (*S3MemService) GetBucketVersioning

func (s *S3MemService) GetBucketVersioning(bucket *string) (*string, *s3.VersioningConfiguration)

GetBucketVersioning gets the versioning configuration.

func (*S3MemService) GetObject

func (s *S3MemService) GetObject(bucket *string, key *string, versionIDS *string) (object *Object, versionIDSOut *string, s3memerror s3memerr.S3MemError)

GetObject gets an object from memory return the Object and its versionID The default s3service is S3MemEndpointsID Raises an error the bucket or object doesn't exists or if the requested object is deleted,

func (*S3MemService) IsBucketEmpty

func (s *S3MemService) IsBucketEmpty(bucket *string) bool

IsBucketEmpty returns true if bucket is empty The default s3service is S3MemEndpointsID

func (*S3MemService) IsBucketExist

func (s *S3MemService) IsBucketExist(bucket *string) bool

IsBucketExist returns true if bucket exists The default s3service is S3MemEndpointsID

func (*S3MemService) IsObjectExist

func (s *S3MemService) IsObjectExist(bucket *string, key *string) bool

IsObjectExist returns true if object exists The default s3service is S3MemEndpointsID

func (*S3MemService) Lock

func (s *S3MemService) Lock()

Lock Lock the access to the S3MemService

func (*S3MemService) PutBucketVersioning

func (s *S3MemService) PutBucketVersioning(bucket *string, mfa *string, versioningConfiguration *s3.VersioningConfiguration) error

PutBucketVersioning Sets the bucket in versionning mode The default s3service is S3MemEndpointsID

func (*S3MemService) PutObject

func (s *S3MemService) PutObject(bucket *string, key *string, body io.ReadSeeker) (*Object, *string, error)

PutObject adds an object in memory return the object. The default s3service is S3MemEndpointsID Raise an error if a failure to read the body occurs

func (*S3MemService) Unlock

func (s *S3MemService) Unlock()

Unlock Unlock the access to the S3MemService

type S3MemServices

type S3MemServices struct {
	S3MemServices map[string]*S3MemService
	Mux           sync.Mutex
}
var S3Store S3MemServices

type User

type User struct {
	CanonicalID string
	Email       string
}

func GetUser

func GetUser(canonicalID, email *string) (*User, error)

For future development

type Users

type Users struct {
	Users map[string]*User
}
var S3MemUsers Users

type VersionedObjects

type VersionedObjects struct {
	VersionedObjects []*Object
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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