Skip to content

Object Storage v1: Adding Timestamp to GetHeader results#2185

Merged
jtopjian merged 2 commits intogophercloud:masterfrom
jtopjian:objectstorage-container-timestamp
Jul 5, 2021
Merged

Object Storage v1: Adding Timestamp to GetHeader results#2185
jtopjian merged 2 commits intogophercloud:masterfrom
jtopjian:objectstorage-container-timestamp

Conversation

@jtopjian
Copy link
Copy Markdown
Contributor

StoragePolicy string `json:"X-Storage-Policy"`
TempURLKey string `json:"X-Container-Meta-Temp-URL-Key"`
TempURLKey2 string `json:"X-Container-Meta-Temp-URL-Key-2"`
Timestamp float64 `json:"-"`
Copy link
Copy Markdown
Contributor

@kayrus kayrus Jun 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtopjian you can use ,string in tag, see for example

ContentLength int64 `json:"Content-Length,string"`

Reference:

https://golang.org/pkg/encoding/json

The "string" option signals that a field is stored as JSON inside a JSON-encoded string. It applies only to fields of string, floating point, integer, or boolean types. This extra level of encoding is sometimes used when communicating with JavaScript programs:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice - thanks!

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.0008%) to 79.903% when pulling 1097a7d on jtopjian:objectstorage-container-timestamp into c9471fc on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jun 30, 2021

Build failed.

@jtopjian
Copy link
Copy Markdown
Contributor Author

recheck

@jtopjian
Copy link
Copy Markdown
Contributor Author

The Container tests pass on Vexxhost. I'm thinking the OpenLab failure was a timing issue.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jul 1, 2021

Build succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants