aboutsummaryrefslogtreecommitdiff
path: root/headers.go
Commit message (Collapse)AuthorAgeFilesLines
* revamp the Headers APIStefan Majewsky2018-03-111-11/+65
| | | | | | | | | | | | | | | | | | 1. Move common methods of AccountHeaders, ContainerHeaders, ObjectHeaders into a base type Headers. 2. Fold Headers into RequestOptions to remove one of the two optional arguments on request methods. The new Headers.ToOpts() method offers a nice experience for users passing Headers to request methods. The Update() methods keep the explicit Headers argument since the Headers argument is not optional there. The only downside is that we lose a bit of type-safety because RequestOptions takes any Headers instance, so e.g. ContainerHeaders could be passed to Object.Upload(). I believe the benefits outweigh this problem.
* add tests for container iteratorStefan Majewsky2018-02-101-6/+0
|
* finish moving towards new auto-generated Headers implementationStefan Majewsky2018-02-071-0/+7
| | | | | Everything in one package once more. The bigger API in *this* package is worth it when we don't have to expose guts to cross package boundaries.
* switch from reflection to code generationStefan Majewsky2018-02-071-154/+17
| | | | | | This allows me to make the API much simpler. More simplification forthcoming in the following commit; I just want to make a cut since `make test` is happy right now.
* add type-safe accessors for most container headersStefan Majewsky2018-02-051-9/+25
|
* apparently having a private member is not enoughStefan Majewsky2018-02-051-2/+25
|
* redesign the header APIStefan Majewsky2018-02-051-232/+90
| | | | | | I'm quite satisfied with this right now (though this doesn't say anything about how I feel about it tomorrow), but it's ugly that some guts (headers.Base) are exposed in the public API.
* add ContainerStefan Majewsky2018-02-041-0/+11
|
* add tests for metadataStefan Majewsky2018-02-041-5/+2
|
* use dedicated Metadata type instead of http.HeaderStefan Majewsky2018-02-041-20/+14
|
* build HTTP requests without ProviderClient.Request(), make tests workStefan Majewsky2018-02-041-59/+70
|
* compileHeaders: do not serialize read-only fieldsStefan Majewsky2018-01-301-2/+2
|
* implement compileHeadersStefan Majewsky2018-01-301-1/+44
| | | | Test is still failing though...
* finalize Account.Post() design, add initial account testsStefan Majewsky2018-01-301-1/+1
| | | | Failing right now because compileHeaders() is a stub.
* lay down the full Account APIStefan Majewsky2018-01-291-0/+232