A small collection of changes and code cleanup to successfully run
'corso repo init s3' manually. Adds a default s3 url (might want
this configurable for local testing) and aws session token support.
* add e2e wiring of cli to kopia
Now that pkg/storage and internal/kopia are in place, we
can wire up the init flow from the cli all the way to kopia. Testing
harness for this functionality still needs investigation afterward.
* factor out awsVars struct for s3Cfg
* adds kopia pkg to handle integration (#25)
internal/kopia will be used to abstract all kopia integration in a
central location.
* defer blob.Storage closure in kopia
blob.Storage objects must get closed at the end of their usage.
This currently isn't getting called.
* introduces storage pkg (#25)
Adds a new package /pkg/storage. Storage is used to
communicate storage provider information throughout the corso
app. In particular, it allows per-provider data to cross interface
boundaries without slicing their details.
* use consts for s3 config keys
Adds the s3 provider set to the repo cli commands. Flag, env
vars, and other configuration is still incomplete and will require
iteration. But this sets us up for quick testing of the commands.
* introduce repository api scaffold with s3 (#6)
introduces the public repository package in /pkg, with a
skeleton implementation for generating the s3 provider config
and boilerplate for where that usage gets centralized.
* condense init/connect to single action
A double-pass NewRepo() && Connect() allows Repository structs
to exist independent guarantees that their usage will be successful.
This hides the struct generation within the Connect and Initialize
funcs so that the construction and guarantees can occur as
a single process.
Now reflects the fact that this will be cloned from github. Also place
in source directory so that all packages in the project don't need to be
`src/foo`.