• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H19-Mar-2019-

rs/H19-Mar-2019-

swifttest/H19-Mar-2019-

.gitignoreH A D19-Mar-201924

.travis.ymlH A D19-Mar-2019493

COPYINGH A D19-Mar-20191.1 KiB

README.mdH A D19-Mar-20194.1 KiB

auth.goH A D19-Mar-20198.9 KiB

auth_v3.goH A D19-Mar-20197 KiB

compatibility_1_0.goH A D19-Mar-2019768

compatibility_1_1.goH A D19-Mar-2019391

compatibility_1_6.goH A D19-Mar-2019418

compatibility_not_1_6.goH A D19-Mar-2019256

dlo.goH A D19-Mar-20194.5 KiB

doc.goH A D19-Mar-20191.4 KiB

example_test.goH A D19-Mar-20192.8 KiB

go.modH A D19-Mar-201928

largeobjects.goH A D19-Mar-201912.7 KiB

meta.goH A D19-Mar-20195.3 KiB

meta_test.goH A D19-Mar-20194.6 KiB

slo.goH A D19-Mar-20195.2 KiB

swift.goH A D19-Mar-201969.1 KiB

swift_internal_test.goH A D19-Mar-201914.8 KiB

swift_test.goH A D19-Mar-201969.6 KiB

timeout_reader.goH A D19-Mar-20191.3 KiB

timeout_reader_test.goH A D19-Mar-20191.9 KiB

travis_realserver.shH A D19-Mar-2019615

watchdog_reader.goH A D19-Mar-20191.3 KiB

watchdog_reader_test.goH A D19-Mar-20193.8 KiB

README.md

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```go
30import "github.com/ncw/swift"
31
32// Create a connection
33c := 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
41err := c.Authenticate()
42if err != nil {
43    panic(err)
44}
45// List all the containers
46containers, err := c.ContainerNames(nil)
47fmt.Println(containers)
48// etc...
49```
50
51Additions
52---------
53
54The `rs` sub project contains a wrapper for the Rackspace specific CDN Management interface.
55
56Testing
57-------
58
59To run the tests you can either use an embedded fake Swift server
60either use a real Openstack Swift server or a Rackspace Cloud files account.
61
62When using a real Swift server, you need to set these environment variables
63before running the tests
64
65    export SWIFT_API_USER='user'
66    export SWIFT_API_KEY='key'
67    export SWIFT_AUTH_URL='https://url.of.auth.server/v1.0'
68
69And optionally these if using v2 authentication
70
71    export SWIFT_TENANT='TenantName'
72    export SWIFT_TENANT_ID='TenantId'
73
74And optionally these if using v3 authentication
75
76    export SWIFT_TENANT='TenantName'
77    export SWIFT_TENANT_ID='TenantId'
78    export SWIFT_API_DOMAIN_ID='domain id'
79    export SWIFT_API_DOMAIN='domain name'
80
81And optionally these if using v3 trust
82
83    export SWIFT_TRUST_ID='TrustId'
84
85And optionally this if you want to skip server certificate validation
86
87    export SWIFT_AUTH_INSECURE=1
88
89And optionally this to configure the connect channel timeout, in seconds
90
91    export SWIFT_CONNECTION_CHANNEL_TIMEOUT=60
92
93And optionally this to configure the data channel timeout, in seconds
94
95    export SWIFT_DATA_CHANNEL_TIMEOUT=60
96
97Then run the tests with `go test`
98
99License
100-------
101
102This is free software under the terms of MIT license (check COPYING file
103included in this package).
104
105Contact and support
106-------------------
107
108The project website is at:
109
110- https://github.com/ncw/swift
111
112There you can file bug reports, ask for help or contribute patches.
113
114Authors
115-------
116
117- Nick Craig-Wood <nick@craig-wood.com>
118
119Contributors
120------------
121
122- Brian "bojo" Jones <mojobojo@gmail.com>
123- Janika Liiv <janika@toggl.com>
124- Yamamoto, Hirotaka <ymmt2005@gmail.com>
125- Stephen <yo@groks.org>
126- platformpurple <stephen@platformpurple.com>
127- Paul Querna <pquerna@apache.org>
128- Livio Soares <liviobs@gmail.com>
129- thesyncim <thesyncim@gmail.com>
130- lsowen <lsowen@s1network.com> <logan@s1network.com>
131- Sylvain Baubeau <sbaubeau@redhat.com>
132- Chris Kastorff <encryptio@gmail.com>
133- Dai HaoJun <haojun.dai@hp.com>
134- Hua Wang <wanghua.humble@gmail.com>
135- Fabian Ruff <fabian@progra.de> <fabian.ruff@sap.com>
136- Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
137- Petr Kotek <petr.kotek@bigcommerce.com>
138- Stefan Majewsky <stefan.majewsky@sap.com> <majewsky@gmx.net>
139- Cezar Sa Espinola <cezarsa@gmail.com>
140- Sam Gunaratne <samgzeit@gmail.com>
141- Richard Scothern <richard.scothern@gmail.com>
142- Michel Couillard <!--<couillard.michel@voxlog.ca>--> <michel.couillard@gmail.com>
143- Christopher Waldon <ckwaldon@us.ibm.com>
144- dennis <dai.haojun@gmail.com>
145- hag <hannes.georg@xing.com>
146- Alexander Neumann <alexander@bumpern.de>
147- eclipseo <30413512+eclipseo@users.noreply.github.com>
148- Yuri Per <yuri@acronis.com>
149- Falk Reimann <falk.reimann@sap.com>
150- Arthur Paim Arnold <arthurpaimarnold@gmail.com>
151- Bruno Michel <bmichel@menfin.info>
152- Charles Hsu <charles0126@gmail.com>
153- Omar Ali <omarali@users.noreply.github.com>
154- Andreas Andersen <andreas@softwaredesign.se>
155- kayrus <kay.diam@gmail.com>
156- CodeLingo Bot <bot@codelingo.io>
157