Example #1
0
        public S3ObjectModule(S3Configuration configuration, IS3Storage storage, IS3Responder responder)
        {
            this.configuration = configuration;
              this.storage = storage;
              this.responder = responder;

              Get["/{bucket}/{key}"] = x => GetObject(x.bucket, x.key);
              Put["/{bucket}/{key}"] = x => AddObject(x.bucket, x.key, Request.Body);
              Delete["/{bucket}/{key}"] = x => DeleteObject(x.bucket, x.key);
              Post["/{bucket}"] = x => CheckDelete(x.bucket);
        }
Example #2
0
 private static void StartServer(S3Configuration s3Configuration)
 {
     using (S3Server = new S3Server(s3Configuration))
       {
     S3Server.Start();
     Console.WriteLine("S3Emulator is started");
     Console.WriteLine("Service url : {0}", s3Configuration.ServiceUrl);
     Console.WriteLine("Press <Enter> to stop");
     Console.ReadLine();
       }
 }
Example #3
0
        public Bootstrapper(S3Configuration s3Configuration)
        {
            this.s3Configuration = s3Configuration;
              documentStore = new EmbeddableDocumentStore
              {
            DataDirectory = s3Configuration.DataDirectory,
            RunInMemory = s3Configuration.RunInMemory
              };

              documentStore.Initialize();
              Raven.Client.Indexes.IndexCreation.CreateIndexes(typeof(S3Object_Search).Assembly, documentStore);
        }
Example #4
0
 private static S3Configuration GetDefaultConfiguration()
 {
     var s3Configuration = new S3Configuration
       {
     ServiceUrl = "s3.amazonaws.com",
     HostPort = 8878,
     ProxyPort = 8877,
     IsProxyEnabled = true,
     DataDirectory = "Data",
     MaxBytesPerSecond = ThrottledStream.Infinite
       };
       return s3Configuration;
 }
Example #5
0
        private static S3Server CreateS3Server()
        {
            var s3Configuration = new S3Configuration
              {
            ServiceUrl = ServiceUrl,
            HostPort = HostPort,
            ProxyPort = ProxyPort,
            IsProxyEnabled = IsProxyEnabled,
            DataDirectory = "Data",
            RunInMemory = true,
            MaxBytesPerSecond = ThrottledStream.Infinite
              };

              var s3Server = new S3Server(s3Configuration);
              return s3Server;
        }
Example #6
0
 public S3Server(S3Configuration s3Configuration)
 {
     this.s3Configuration = s3Configuration;
 }