Conversation
- in file uploads - and listing files Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
8c3cd07 to
4b0bdfa
Compare
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
| return false, nil | ||
| } | ||
|
|
||
| func validateBeforeAndAfter(before, after, at string) (app.Timestamp, app.Timestamp, error) { |
There was a problem hiding this comment.
the logic is, if at is not empty, before and after will be set to at (and the previous values of before and after will be ignored). that simplifies a bit, so we only need two variables to implement range and equality queries
cmd/basin/publication.go
Outdated
| Destination: &secure, | ||
| Value: true, | ||
| }, | ||
| &cli.Int64Flag{ |
There was a problem hiding this comment.
adds the timestamp flag to upload command, with default to UTC in seconds
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
cmd/basin/publication.go
Outdated
| }, | ||
| &cli.StringFlag{ | ||
| Name: "timestamp", | ||
| Usage: "The time the file was created", |
There was a problem hiding this comment.
should we explain here that the default is "now" according to client time? or is that obvious in the help output?
There was a problem hiding this comment.
yeah not very obvious. i can add more info. but it's actually the "now" according to UTC
There was a problem hiding this comment.
cool. i meant "now" as UTC according to client's clock, but maybe that's obvious
There was a problem hiding this comment.
funny, didn't realize the help would show the calculated value
OPTIONS:
--private-key value Ethereum wallet private key
--name value Publication name
--secure Uses TLS connection (default: true)
--timestamp value The time the file was created (default: "1699641318")
--help, -h show help
quite weird because every time you run, shows a different value
There was a problem hiding this comment.
ha, that is funny. maybe okay if you just saying something like "The time the file was created (defaults to now UTC)
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
| }, | ||
| &cli.StringFlag{ | ||
| Name: "timestamp", | ||
| Usage: "The time the file was created (default: current epoch in UTC)", |
There was a problem hiding this comment.
@sanderpick did this change and the default is here
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
High-level changes:
the
uploadcommand now accepts a--timestampflag. You can pass an integer (assumes to be epoch in seconds), a date (e.g. 2006-01-02) or a datetime with timezone (e.g. 2006-01-02T15:04:05Z07:00)the
dealscommand now accepts--before,--after, and--atflags to filter deals by timestamp# examples basin publication deals --publication demotest.data --at 1699569502 basin publication deals --publication demotest.data --before 2023-11-09T19:38:23-03:00 basin publication deals --publication demotest.data --after 2023-11-09That info is sent to the provider. See: tablelandnetwork/basin-provider#13