Commit Graph

9 Commits

Author SHA1 Message Date
mpl 6d269cb37b importers: some refactoring around oauthContext
Change-Id: I0a7e1dabb9efdaedbda138cdd1c52afcddee5210
2014-08-02 00:50:00 +02:00
mpl 1fd526b999 test/transport.go: move to httputil, so we can use it without linking testing
Change-Id: I889d167a78ef0fba5ef2e9e3e884f594e151e940
2014-07-14 18:33:10 +02:00
Brad Fitzpatrick bafc53703d context: don't allow mutating an existing context's HTTP client
Instead, require specifying it when constructing a new context.

Prevents misuse and bugs / data races.

Change-Id: I775e998bf69b9e238ec726c469494c1a65f8f9de
2014-07-02 14:34:24 -07:00
Brad Fitzpatrick bf263cc036 twitter: add oauthContext to clean up some function signatures
Change-Id: I301d2ed8ee68aa316349c44bf0d20e4fcaacf99e
2014-05-14 14:34:31 -07:00
Brad Fitzpatrick ce6ef38cd1 Merge "importer/twitter: refactor credentials isolation" 2014-05-14 21:12:08 +00:00
mpl 991b540c8b importer/twitter: refactor credentials isolation
-store in the importer account the temporary credentials needed
during setup.
-store in the importer account the access token, and the access token
secret, and guard them. They are needed at the end of the setup (to get
the user's info) and all along a run.
-not share the same oauth.Client with the whole package. Create a new
one everytime it's needed in the setup. Create a new one at the beginning
of a run too, and it's ok to reuse it all along, since it's used
read-only.

Change-Id: I4823b35abf8a5170f63ca502026f6c8f98e2c1e7
2014-05-14 22:04:26 +02:00
Brad Fitzpatrick 94ab7a8f70 pkg/test: move importers' fakeTransport to test.NewFakeTransport
Change-Id: Iadefb6358983c0d479b269de47d368abf5e0c93b
2014-05-14 12:56:14 -07:00
mpl 8d307672b2 importer/twitter: follow up on little fixes
Change-Id: I6b7cfac3cf5893226016e819441f4cbbe458b4bf
2014-04-23 19:20:31 +02:00
mpl ef5acd75e3 twitter importer: fixed to new API
Change-Id: I490001a1f780f1074baa78a4daa563e55096242c
2014-04-23 16:53:49 +02:00