-
Thanks for writing this package. I just wrote a quick demo for trying this out, and here are some of my thoughts and proposals, and open for discussion especially the customization possibilities of the TGStore struct. APIsI think for most of the user only need this set of APIs:
A minimum example:
CLICLI might want to store a configuration file at $ go get golang.design/x/tgstore/cmd/tgstore
$ tgstore init
please input your telegram api endpoint (keep it empty to use the default: https://...):
>
please input your bot id:
>
here are the chats associated with your bot:
1 chat1
2 chatb
3 chatC
...
which chat you would like to use for storing your content? input the chat id:
>
DONE.
$ tgstore upload /path/to/what/ever/we/want/to/upload1.ext
9f82h3nf984j
$ tgstore upload /path/to/what/ever/we/want/to/upload2.ext
9r73hjf873h2
$ tgstore upload /path/to/what/ever/we/want/to/upload1.ext
489rfj481je9
$ tgstore list
9f82h3nf984j upload1.ext
9r73hjf873h2 upload2.ext
489rfj481je9 upload1.1.ext # handle name duplication
$ tgstore download 9r73hjf873h2 # store file into $(pwd)
DONE.
$ tgstore download 489rfj481je9 /path/to/where/ever/we/want/to/store/down.ext
DONE. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
After seeing the landing of a5199bc, the proposed design changes to the APIs are in a good shape in my current opinion. The remaining question is if there is a need to provide a CLI, which is always a design on the application side, and cloud end up with an infinite number of designs. Based on the clarification above, the discussion can be resolved for now. |
Beta Was this translation helpful? Give feedback.
After seeing the landing of a5199bc, the proposed design changes to the APIs are in a good shape in my current opinion.
The remaining question is if there is a need to provide a CLI, which is always a design on the application side, and cloud end up with an infinite number of designs.
Based on the clarification above, the discussion can be resolved for now.