{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5789","repository_url":"https://api.github.com/repos/ipfs/go-ipfs","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5789/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5789/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5789/events","html_url":"https://github.com/ipfs/go-ipfs/pull/5789","id":383443684,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyOTA2OTIy","number":5789,"title":"Add global option to specify the multibase encoding (server side)","user":{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false},"labels":[{"id":993502733,"node_id":"MDU6TGFiZWw5OTM1MDI3MzM=","url":"https://api.github.com/repos/ipfs/go-ipfs/labels/cidv1b32","name":"cidv1b32","color":"9165d8","default":false},{"id":129070658,"node_id":"MDU6TGFiZWwxMjkwNzA2NTg=","url":"https://api.github.com/repos/ipfs/go-ipfs/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false},"assignees":[{"login":"Stebalien","id":310393,"node_id":"MDQ6VXNlcjMxMDM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-11-22T09:18:37Z","updated_at":"2019-01-03T00:45:02Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/5789","html_url":"https://github.com/ipfs/go-ipfs/pull/5789","diff_url":"https://github.com/ipfs/go-ipfs/pull/5789.diff","patch_url":"https://github.com/ipfs/go-ipfs/pull/5789.patch"},"body":"Redo of #5464 but this time doing it (mostly) on the server side.\r\n\r\nThis may not be the most elegant implementation, but for now I think it is the most practical, espacally if we also want to support `?cid-base` end points for API requests.  We can clean this up later to make things more elegant.\r\n\r\nIt does all the work in the `core/commands` package and does not leak into other API's except for the `ipfs filestore` command where we need to pass an encoder function to `FormatLong` method.\r\n\r\nSee #5777 for an alternative client side implementation.\r\n\r\nThis adds support for `--cid-base` and `--output-cidv1` option to the command line and HTTP API for the following commands:\r\n```\r\nipfs add\r\nipfs files ls\r\nipfs files stat\r\nipfs ls\r\nipfs pin add\r\nipfs pin ls\r\nipfs pin rm\r\nipfs pin verify\r\nipfs refs\r\nipfs refs local\r\nipfs resolve\r\nipfs tar add\r\nipfs urlstore add\r\nipfs filestore dups\r\nipfs object get\r\nipfs object put\r\nipfs object links\r\n```\r\n\r\nDue to the fact that some commands return the CID itself and not a string, some command support the base conversion in text output only until we upgrade to something like `refmt` which will give us more control over the JSON output:\r\n```\r\nipfs filestore ls\r\nipfs filestore verify\r\nipfs bitswap stat\r\nipfs bitswap wantlist\r\nipfs dag put\r\nipfs dag resolve\r\n```\r\n\r\n`ipfs dag get` currently does not support `--cid-base` due to the way it is implemented. This is considered a bug.\r\n\r\nFor some commands the original path string is preserved without any additional processing and is thus unaffected by `--cid-base`:\r\n```\r\nipfs ls (only the original path displayed when multiple arguments are present, not the actual output) \r\nipfs pin update\r\n```\r\n\r\nIn addition all commands under `bitswap`, `object`, and `dag` do not, by default, auto-upgrade CIDv0 to CIDv1 as these commands are considered low-level and the conversion could cause problems (for example a dag will not survive a `ipfs object get' /  'ipfs object put` round trip.  This can be changes by using `--output-cidv1=true`.\r\n\r\nTodo:\r\n- [x] Remove `cidenc.Interface` for right now it doesn't serve a useful purpose and it may make more sense to define it to only have an `Encode` method (and no `Recode` method) so the existing `cid.Encoder` also implements the interface.\r\n- [x] Abandon the `apicid` concept all together as that will be a holdover from the client side implementation and move `apicid.Cid` to `cidenc.Cid`.\r\n - [ ] Rebase to clean up commits and avoid depending on locally gx published versions of go-cidutil.\r\n - [ ] Finalize `--output-cidv1`|`--force-multibase-cids` option name\r\n\r\nDepends on https://github.com/ipfs/go-cidutil/pull/10.\r\n\r\nCloses #5233. Closes #5234. Closes #5349."},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/451029593","html_url":"https://github.com/ipfs/go-ipfs/pull/5789#issuecomment-451029593","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5789","id":451029593,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTAyOTU5Mw==","user":{"login":"Stebalien","id":310393,"node_id":"MDQ6VXNlcjMxMDM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T00:45:02Z","updated_at":"2019-01-03T00:45:02Z","author_association":"CONTRIBUTOR","body":"The final remaining question is: https://github.com/ipfs/go-ipfs/pull/5789#discussion_r237573246."}}
{"actor":{"display_login":"Stebalien"}}