From f9d167d9cc13b3ad12ea6fa0fb398c7253f9cc86 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 3 Apr 2011 19:59:46 -0700 Subject: [PATCH] Start of s3 stat/receive. --- lib/go/camli/blobserver/s3/receive.go | 34 ++++++++++++++++++++++++ lib/go/camli/blobserver/s3/stat.go | 37 +++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 lib/go/camli/blobserver/s3/receive.go create mode 100644 lib/go/camli/blobserver/s3/stat.go diff --git a/lib/go/camli/blobserver/s3/receive.go b/lib/go/camli/blobserver/s3/receive.go new file mode 100644 index 000000000..54f788782 --- /dev/null +++ b/lib/go/camli/blobserver/s3/receive.go @@ -0,0 +1,34 @@ +/* +Copyright 2011 Google Inc. + +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. +*/ + +package s3 + +import ( + "io" + "log" + "os" + + "camli/blobref" + "camli/blobserver" + //"camli/misc/amazon/s3" +) + +var _ = log.Printf + +func (s3 *s3Storage) ReceiveBlob(blob *blobref.BlobRef, source io.Reader, mirrorPartions []blobserver.Partition) (*blobref.SizedBlobRef, os.Error) { + log.Printf("want to upload to s3: %s", blob) + return nil, os.NewError("no s3 upload") +} diff --git a/lib/go/camli/blobserver/s3/stat.go b/lib/go/camli/blobserver/s3/stat.go new file mode 100644 index 000000000..093a44728 --- /dev/null +++ b/lib/go/camli/blobserver/s3/stat.go @@ -0,0 +1,37 @@ +/* +Copyright 2011 Google Inc. + +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. +*/ + +package s3 + +import ( + "log" + "os" + + "camli/blobref" + "camli/blobserver" + //"camli/misc/amazon/s3" +) + +var _ = log.Printf + +func (s3 *s3Storage) Stat(dest chan *blobref.SizedBlobRef, + partition blobserver.Partition, + blobs []*blobref.BlobRef, + waitSeconds int) os.Error { + // TODO: implement + return nil +} +