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); }
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(); } }
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); }
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; }
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; }
public S3Server(S3Configuration s3Configuration) { this.s3Configuration = s3Configuration; }