Documentation ¶
Index ¶
Constants ¶
View Source
const ContentInTestGzipObjectCompressed string = "\x1f\x8b\b\b\x9d\xab\xd5d\x02\xfftmp1bg8d7ug\x00\v\xc9\xc8,\xe6\x02\x00~r\xe2V\x05\x00\x00\x00"
ContentInTestGzipObjectCompressed is a gzip-compressed content for gzip tests. It was created by uploading a small file to GCS using `gsutil cp -Z` and then downloading it as it is (compressed as present on GCS) using go storage client library. To view/change it, open it in a gzip.newReader() ur using a gzip plugin in the IDE. If you do change it, remember to update ContentInTestGzipObjectDecompressed too correspondingly.
View Source
const ContentInTestGzipObjectDecompressed string = "This\n"
View Source
const ContentInTestObject string = "Hello GCSFuse!!!"
View Source
const ContentInTestSubObject string = "Hello GCSFuse From SubObject!!!"
View Source
const MetaDataKey string = "key"
View Source
const MetaDataValue string = "metaData"
View Source
const TestBucketName string = "gcsfuse-default-bucket"
View Source
const TestGzipObjectGeneration int64 = 781
View Source
const TestGzipObjectName string = "gcsfuse/test_gzip.txt"
Data specific to content-encoding gzip tests
View Source
const TestObjectGeneration int64 = 780
View Source
const TestObjectName string = "gcsfuse/default.txt"
View Source
const TestObjectRootFolderName string = "gcsfuse/"
View Source
const TestObjectSubRootFolderName string = "gcsfuse/SubFolder/"
View Source
const TestSubObjectName string = "gcsfuse/SubFolder/default.txt"
Variables ¶
This section is empty.
Functions ¶
func CreateObject ¶
func CreateObject(server *fakestorage.Server, object fakestorage.Object)
Types ¶
type FakeStorage ¶
type FakeStorage interface { CreateStorageHandle() (sh StorageHandle) ShutDown() }
func NewFakeStorage ¶
func NewFakeStorage() FakeStorage
type MockBucket ¶
type MockBucket interface { gcs.Bucket oglemock.MockObject }
func NewMockBucket ¶
func NewMockBucket( c oglemock.Controller, desc string) MockBucket
type StorageHandle ¶
type StorageHandle interface { // In case of non-empty billingProject, this project is set as user-project for // all subsequent calls on the bucket. Calls with user-project will be billed // to that project rather than to the bucket's owning project. // // A user-project is required for all operations on Requester Pays buckets. BucketHandle(bucketName string, billingProject string) (bh *bucketHandle) }
func NewStorageHandle ¶
func NewStorageHandle(ctx context.Context, clientConfig storageutil.StorageClientConfig) (sh StorageHandle, err error)
NewStorageHandle returns the handle of Go storage client containing customized http client. We can configure the http client using the storageClientConfig parameter.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.