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

..03-May-2022-

.github/H07-Oct-2021-11395

bin/H07-Oct-2021-4839

rs/H07-Oct-2021-183147

swifttest/H07-Oct-2021-1,3431,115

.gitignoreH A D07-Oct-202124 44

.golangci.ymlH A D07-Oct-2021501 2520

COPYINGH A D07-Oct-20211.1 KiB2116

README.mdH A D07-Oct-20214.9 KiB172129

auth.goH A D07-Oct-20219 KiB337241

auth_v3.goH A D07-Oct-20217 KiB301249

compatibility_1_0.goH A D07-Oct-2021786 3013

compatibility_1_1.goH A D07-Oct-2021408 2615

compatibility_1_6.goH A D07-Oct-2021435 2517

compatibility_not_1_6.goH A D07-Oct-2021274 158

dlo.goH A D07-Oct-20215.3 KiB159111

dlo_test.goH A D07-Oct-20216.6 KiB208194

doc.goH A D07-Oct-20211.4 KiB201

example_test.goH A D07-Oct-20213.1 KiB11973

go.modH A D07-Oct-202140 42

go.sumH A D07-Oct-20210

integration_test.shH A D07-Oct-20211.2 KiB5843

largeobjects.goH A D07-Oct-202113.8 KiB485418

meta.goH A D07-Oct-20215.3 KiB17592

meta_test.goH A D07-Oct-20214.6 KiB214195

slo.goH A D07-Oct-20215.7 KiB183139

swift.goH A D07-Oct-202174 KiB2,3451,593

swift_internal_test.goH A D07-Oct-202117.1 KiB772647

swift_test.goH A D07-Oct-202177.7 KiB3,2672,963

timeout_reader.goH A D07-Oct-20211.3 KiB5941

timeout_reader_test.goH A D07-Oct-20211.9 KiB10893

travis_realserver.shH A D07-Oct-2021615 2318

watchdog_reader.goH A D07-Oct-20211.3 KiB5639

watchdog_reader_test.goH A D07-Oct-20213.8 KiB138103

README.md

1Swift
2=====
3
4This package provides an easy to use library for interfacing with Swift / Openstack Object Storage / Rackspace cloud
5files from the Go Language
6
7[![Build Status](https://github.com/ncw/swift/workflows/build/badge.svg?branch=master)](https://github.com/ncw/swift/actions)
8[![Go Reference](https://pkg.go.dev/badge/github.com/ncw/v2/swift.svg)](https://pkg.go.dev/github.com/ncw/swift/v2)
9
10Install
11-------
12
13Use go to install the library
14
15    go get github.com/ncw/swift/v2
16
17Usage
18-----
19
20See here for full package docs
21
22- https://pkg.go.dev/github.com/ncw/swift/v2
23
24Here is a short example from the docs
25
26```go
27import "github.com/ncw/swift/v2"
28
29// Create a connection
30c := swift.Connection{
31UserName: "user",
32ApiKey:   "key",
33AuthUrl:  "auth_url",
34Domain:   "domain", // Name of the domain (v3 auth only)
35Tenant:   "tenant", // Name of the tenant (v2 auth only)
36}
37// Authenticate
38err := c.Authenticate()
39if err != nil {
40panic(err)
41}
42// List all the containers
43containers, err := c.ContainerNames(nil)
44fmt.Println(containers)
45// etc...
46```
47
48Migrating from `v1`
49-----
50The library has current major version v2. If you want to migrate from the first version of
51library `github.com/ncw/swift` you have to explicitly add the `/v2` suffix to the imports.
52
53Most of the exported functions were added a new `context.Context` parameter in the `v2`, which you will have to provide
54when migrating.
55
56Additions
57---------
58
59The `rs` sub project contains a wrapper for the Rackspace specific CDN Management interface.
60
61Testing
62-------
63
64To run the tests you can either use an embedded fake Swift server either use a real Openstack Swift server or a
65Rackspace Cloud files account.
66
67When using a real Swift server, you need to set these environment variables before running the tests
68
69    export SWIFT_API_USER='user'
70    export SWIFT_API_KEY='key'
71    export SWIFT_AUTH_URL='https://url.of.auth.server/v1.0'
72
73And optionally these if using v2 authentication
74
75    export SWIFT_TENANT='TenantName'
76    export SWIFT_TENANT_ID='TenantId'
77
78And optionally these if using v3 authentication
79
80    export SWIFT_TENANT='TenantName'
81    export SWIFT_TENANT_ID='TenantId'
82    export SWIFT_API_DOMAIN_ID='domain id'
83    export SWIFT_API_DOMAIN='domain name'
84
85And optionally these if using v3 trust
86
87    export SWIFT_TRUST_ID='TrustId'
88
89And optionally this if you want to skip server certificate validation
90
91    export SWIFT_AUTH_INSECURE=1
92
93And optionally this to configure the connect channel timeout, in seconds
94
95    export SWIFT_CONNECTION_CHANNEL_TIMEOUT=60
96
97And optionally this to configure the data channel timeout, in seconds
98
99    export SWIFT_DATA_CHANNEL_TIMEOUT=60
100
101Then run the tests with `go test`
102
103License
104-------
105
106This is free software under the terms of MIT license (check COPYING file included in this package).
107
108Contact and support
109-------------------
110
111The project website is at:
112
113- https://github.com/ncw/swift
114
115There you can file bug reports, ask for help or contribute patches.
116
117Authors
118-------
119
120- Nick Craig-Wood <nick@craig-wood.com>
121
122Contributors
123------------
124
125- Brian "bojo" Jones <mojobojo@gmail.com>
126- Janika Liiv <janika@toggl.com>
127- Yamamoto, Hirotaka <ymmt2005@gmail.com>
128- Stephen <yo@groks.org>
129- platformpurple <stephen@platformpurple.com>
130- Paul Querna <pquerna@apache.org>
131- Livio Soares <liviobs@gmail.com>
132- thesyncim <thesyncim@gmail.com>
133- lsowen <lsowen@s1network.com> <logan@s1network.com>
134- Sylvain Baubeau <sbaubeau@redhat.com>
135- Chris Kastorff <encryptio@gmail.com>
136- Dai HaoJun <haojun.dai@hp.com>
137- Hua Wang <wanghua.humble@gmail.com>
138- Fabian Ruff <fabian@progra.de> <fabian.ruff@sap.com>
139- Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
140- Petr Kotek <petr.kotek@bigcommerce.com>
141- Stefan Majewsky <stefan.majewsky@sap.com> <majewsky@gmx.net>
142- Cezar Sa Espinola <cezarsa@gmail.com>
143- Sam Gunaratne <samgzeit@gmail.com>
144- Richard Scothern <richard.scothern@gmail.com>
145- Michel Couillard <!--<couillard.michel@voxlog.ca>--> <michel.couillard@gmail.com>
146- Christopher Waldon <ckwaldon@us.ibm.com>
147- dennis <dai.haojun@gmail.com>
148- hag <hannes.georg@xing.com>
149- Alexander Neumann <alexander@bumpern.de>
150- eclipseo <30413512+eclipseo@users.noreply.github.com>
151- Yuri Per <yuri@acronis.com>
152- Falk Reimann <falk.reimann@sap.com>
153- Arthur Paim Arnold <arthurpaimarnold@gmail.com>
154- Bruno Michel <bmichel@menfin.info>
155- Charles Hsu <charles0126@gmail.com>
156- Omar Ali <omarali@users.noreply.github.com>
157- Andreas Andersen <andreas@softwaredesign.se>
158- kayrus <kay.diam@gmail.com>
159- CodeLingo Bot <bot@codelingo.io>
160- Jérémy Clerc <jeremy.clerc@tagpay.fr>
161- 4xicom <37339705+4xicom@users.noreply.github.com>
162- Bo <bo@4xi.com>
163- Thiago da Silva <thiagodasilva@users.noreply.github.com>
164- Brandon WELSCH <dev@brandon-welsch.eu>
165- Damien Tournoud <damien@platform.sh>
166- Pedro Kiefer <pedro@kiefer.com.br>
167- Martin Chodur <m.chodur@seznam.cz>
168- Devendra <devendranath.thadi3@gmail.com>
169- timss <timsateroy@gmail.com>
170- Jos Houtman <jos@houtman.it>
171- Paul Collins <paul.collins@canonical.com>
172