1Swift 2===== 3 4This package provides an easy to use library for interfacing with 5Swift / Openstack Object Storage / Rackspace cloud files from the Go 6Language 7 8See here for package docs 9 10 http://godoc.org/github.com/ncw/swift 11 12[![Build Status](https://api.travis-ci.org/ncw/swift.svg?branch=master)](https://travis-ci.org/ncw/swift) [![GoDoc](https://godoc.org/github.com/ncw/swift?status.svg)](https://godoc.org/github.com/ncw/swift) 13 14Install 15------- 16 17Use go to install the library 18 19 go get github.com/ncw/swift 20 21Usage 22----- 23 24See here for full package docs 25 26- http://godoc.org/github.com/ncw/swift 27 28Here is a short example from the docs 29 30 import "github.com/ncw/swift" 31 32 // Create a connection 33 c := swift.Connection{ 34 UserName: "user", 35 ApiKey: "key", 36 AuthUrl: "auth_url", 37 Domain: "domain", // Name of the domain (v3 auth only) 38 Tenant: "tenant", // Name of the tenant (v2 auth only) 39 } 40 // Authenticate 41 err := c.Authenticate() 42 if err != nil { 43 panic(err) 44 } 45 // List all the containers 46 containers, err := c.ContainerNames(nil) 47 fmt.Println(containers) 48 // etc... 49 50Additions 51--------- 52 53The `rs` sub project contains a wrapper for the Rackspace specific CDN Management interface. 54 55Testing 56------- 57 58To run the tests you can either use an embedded fake Swift server 59either use a real Openstack Swift server or a Rackspace Cloud files account. 60 61When using a real Swift server, you need to set these environment variables 62before running the tests 63 64 export SWIFT_API_USER='user' 65 export SWIFT_API_KEY='key' 66 export SWIFT_AUTH_URL='https://url.of.auth.server/v1.0' 67 68And optionally these if using v2 authentication 69 70 export SWIFT_TENANT='TenantName' 71 export SWIFT_TENANT_ID='TenantId' 72 73And optionally these if using v3 authentication 74 75 export SWIFT_TENANT='TenantName' 76 export SWIFT_TENANT_ID='TenantId' 77 export SWIFT_API_DOMAIN_ID='domain id' 78 export SWIFT_API_DOMAIN='domain name' 79 80And optionally these if using v3 trust 81 82 export SWIFT_TRUST_ID='TrustId' 83 84And optionally this if you want to skip server certificate validation 85 86 export SWIFT_AUTH_INSECURE=1 87 88And optionally this to configure the connect channel timeout, in seconds 89 90 export SWIFT_CONNECTION_CHANNEL_TIMEOUT=60 91 92And optionally this to configure the data channel timeout, in seconds 93 94 export SWIFT_DATA_CHANNEL_TIMEOUT=60 95 96Then run the tests with `go test` 97 98License 99------- 100 101This is free software under the terms of MIT license (check COPYING file 102included in this package). 103 104Contact and support 105------------------- 106 107The project website is at: 108 109- https://github.com/ncw/swift 110 111There you can file bug reports, ask for help or contribute patches. 112 113Authors 114------- 115 116- Nick Craig-Wood <nick@craig-wood.com> 117 118Contributors 119------------ 120 121- Brian "bojo" Jones <mojobojo@gmail.com> 122- Janika Liiv <janika@toggl.com> 123- Yamamoto, Hirotaka <ymmt2005@gmail.com> 124- Stephen <yo@groks.org> 125- platformpurple <stephen@platformpurple.com> 126- Paul Querna <pquerna@apache.org> 127- Livio Soares <liviobs@gmail.com> 128- thesyncim <thesyncim@gmail.com> 129- lsowen <lsowen@s1network.com> 130- Sylvain Baubeau <sbaubeau@redhat.com> 131- Chris Kastorff <encryptio@gmail.com> 132- Dai HaoJun <haojun.dai@hp.com> 133- Hua Wang <wanghua.humble@gmail.com> 134- Fabian Ruff <fabian@progra.de> 135- Arturo Reuschenbach Puncernau <reuschenbach@gmail.com> 136- Petr Kotek <petr.kotek@bigcommerce.com> 137- Stefan Majewsky <stefan.majewsky@sap.com> 138- Cezar Sa Espinola <cezarsa@gmail.com> 139- Sam Gunaratne <samgzeit@gmail.com> 140- Richard Scothern <richard.scothern@gmail.com> 141- Michel Couillard <couillard.michel@voxlog.ca> 142- Christopher Waldon <ckwaldon@us.ibm.com> 143