{"action":"created","comment":{"url":"https://api.github.com/repos/storj/storj/pulls/comments/241377264","pull_request_review_id":184631821,"id":241377264,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTM3NzI2NA==","diff_hunk":"@@ -0,0 +1,238 @@\n+// Copyright (C) 2018 Storj Labs, Inc.\n+// See LICENSE for copying information.\n+\n+package uplink\n+\n+import (\n+\t\"context\"\n+\t\"crypto\"\n+\t\"crypto/x509\"\n+\t\"io\"\n+\t\"time\"\n+\n+\t\"storj.io/storj/pkg/miniogw\"\n+\t\"storj.io/storj/pkg/ranger\"\n+\t\"storj.io/storj/pkg/storj\"\n+)\n+\n+// An Identity is a parsed leaf cert keypair with a certificate signed chain\n+// up to the self-signed CA with the node ID.\n+type Identity interface {\n+\tNodeID() storj.NodeID\n+\tKey() crypto.PrivateKey\n+\tCerts() []x509.Certificate\n+}\n+\n+// Caveats could be things like a read-only restriction, a time-bound\n+// restriction, a bucket-specific restriction, a path-prefix restriction, a\n+// full path restriction, etc.\n+type Caveat interface {\n+}\n+\n+// A Macaroon represents an access credential to certain resources\n+type Macaroon interface {\n+\tSerialize() ([]byte, error)\n+\tRestrict(caveats ...Caveat) Macaroon\n+}\n+\n+type Config struct {\n+\t// MaxBufferMem controls upload performance and is system-specific\n+\tMaxBufferMem int\n+\n+\t// These should only be relevant for new files; these values for existing\n+\t// files should come from the metainfo index. It's unlikely these will ever\n+\t// change much.\n+\tEncBlockSize  int\n+\tMaxInlineSize int\n+\tSegmentSize   int64\n+}\n+\n+// Uplink represents the main entrypoint to Storj V3. An Uplink connects to\n+// a specific Satellite and caches connections and resources, allowing one to\n+// create sessions delineated by specific access controls.\n+type Uplink struct {\n+}\n+\n+// NewUplink creates a new Uplink\n+func NewUplink(identity Identity, satelliteAddr string, cfg Config) *Uplink {\n+\tpanic(\"TODO\")\n+}\n+\n+// A Share is all of the access information an application needs to store and\n+// retrieve data. Someone with a share may have no restrictions within a project\n+// (can create buckets, list buckets, list files, upload files, delete files,\n+// etc), may be restricted to a single bucket, may be restricted to a prefix\n+// within a bucket, or may even be restricted to a single file within a bucket.\n+type Share struct {\n+\tAccess Macaroon\n+\n+\t// TODO: these should be per-bucket somehow maybe? oh man what a nightmare\n+\tPathCipher       storj.Cipher\n+\tEncPathPrefix    storj.Path\n+\tKey              storj.Key\n+\tEncryptionScheme storj.EncryptionScheme","path":"lib/uplink/main.go","position":73,"original_position":73,"commit_id":"58c20a883ac36a091710e47c046044bd2ffdcdb9","original_commit_id":"58c20a883ac36a091710e47c046044bd2ffdcdb9","user":{"login":"kaloyan-raev","id":468091,"node_id":"MDQ6VXNlcjQ2ODA5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/468091?v=4","gravatar_id":"","url":"https://api.github.com/users/kaloyan-raev","html_url":"https://github.com/kaloyan-raev","followers_url":"https://api.github.com/users/kaloyan-raev/followers","following_url":"https://api.github.com/users/kaloyan-raev/following{/other_user}","gists_url":"https://api.github.com/users/kaloyan-raev/gists{/gist_id}","starred_url":"https://api.github.com/users/kaloyan-raev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaloyan-raev/subscriptions","organizations_url":"https://api.github.com/users/kaloyan-raev/orgs","repos_url":"https://api.github.com/users/kaloyan-raev/repos","events_url":"https://api.github.com/users/kaloyan-raev/events{/privacy}","received_events_url":"https://api.github.com/users/kaloyan-raev/received_events","type":"User","site_admin":false},"body":"The encryption scheme is per-file. I don't think we should include it here. It has to be taken from the metainfo of each file.","created_at":"2018-12-13T12:14:52Z","updated_at":"2018-12-13T12:19:56Z","html_url":"https://github.com/storj/storj/pull/847#discussion_r241377264","pull_request_url":"https://api.github.com/repos/storj/storj/pulls/847","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/storj/storj/pulls/comments/241377264"},"html":{"href":"https://github.com/storj/storj/pull/847#discussion_r241377264"},"pull_request":{"href":"https://api.github.com/repos/storj/storj/pulls/847"}}},"pull_request":{"url":"https://api.github.com/repos/storj/storj/pulls/847","id":238218123,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MjE4MTIz","html_url":"https://github.com/storj/storj/pull/847","diff_url":"https://github.com/storj/storj/pull/847.diff","patch_url":"https://github.com/storj/storj/pull/847.patch","issue_url":"https://api.github.com/repos/storj/storj/issues/847","number":847,"state":"open","locked":false,"title":"proposal, wip: first draft of libuplink","user":{"login":"jtolds","id":109603,"node_id":"MDQ6VXNlcjEwOTYwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/109603?v=4","gravatar_id":"","url":"https://api.github.com/users/jtolds","html_url":"https://github.com/jtolds","followers_url":"https://api.github.com/users/jtolds/followers","following_url":"https://api.github.com/users/jtolds/following{/other_user}","gists_url":"https://api.github.com/users/jtolds/gists{/gist_id}","starred_url":"https://api.github.com/users/jtolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtolds/subscriptions","organizations_url":"https://api.github.com/users/jtolds/orgs","repos_url":"https://api.github.com/users/jtolds/repos","events_url":"https://api.github.com/users/jtolds/events{/privacy}","received_events_url":"https://api.github.com/users/jtolds/received_events","type":"User","site_admin":false},"body":"the goal of this PR is to start thinking about how a stable\r\npublic-facing API for v3 might look.\r\n\r\nlooking for voracious feedback\r\n\r\nChange-Id: Ia07babf4d5fba2bcf1f48c66075fe7f8608dc465","created_at":"2018-12-12T23:33:13Z","updated_at":"2018-12-13T12:19:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6af50bd258481a672ee4313130652d5780bee5c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":982933521,"node_id":"MDU6TGFiZWw5ODI5MzM1MjE=","url":"https://api.github.com/repos/storj/storj/labels/cla-signed","name":"cla-signed","color":"ededed","default":false},{"id":1154175003,"node_id":"MDU6TGFiZWwxMTU0MTc1MDAz","url":"https://api.github.com/repos/storj/storj/labels/proposal","name":"proposal","color":"1990ff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/storj/storj/pulls/847/commits","review_comments_url":"https://api.github.com/repos/storj/storj/pulls/847/comments","review_comment_url":"https://api.github.com/repos/storj/storj/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storj/storj/issues/847/comments","statuses_url":"https://api.github.com/repos/storj/storj/statuses/58c20a883ac36a091710e47c046044bd2ffdcdb9","head":{"label":"storj:libuplink-draft","ref":"libuplink-draft","sha":"58c20a883ac36a091710e47c046044bd2ffdcdb9","user":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"repo":{"id":128089774,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwODk3NzQ=","name":"storj","full_name":"storj/storj","private":false,"owner":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/storj/storj","description":"Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.","fork":false,"url":"https://api.github.com/repos/storj/storj","forks_url":"https://api.github.com/repos/storj/storj/forks","keys_url":"https://api.github.com/repos/storj/storj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storj/storj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storj/storj/teams","hooks_url":"https://api.github.com/repos/storj/storj/hooks","issue_events_url":"https://api.github.com/repos/storj/storj/issues/events{/number}","events_url":"https://api.github.com/repos/storj/storj/events","assignees_url":"https://api.github.com/repos/storj/storj/assignees{/user}","branches_url":"https://api.github.com/repos/storj/storj/branches{/branch}","tags_url":"https://api.github.com/repos/storj/storj/tags","blobs_url":"https://api.github.com/repos/storj/storj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storj/storj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storj/storj/git/refs{/sha}","trees_url":"https://api.github.com/repos/storj/storj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storj/storj/statuses/{sha}","languages_url":"https://api.github.com/repos/storj/storj/languages","stargazers_url":"https://api.github.com/repos/storj/storj/stargazers","contributors_url":"https://api.github.com/repos/storj/storj/contributors","subscribers_url":"https://api.github.com/repos/storj/storj/subscribers","subscription_url":"https://api.github.com/repos/storj/storj/subscription","commits_url":"https://api.github.com/repos/storj/storj/commits{/sha}","git_commits_url":"https://api.github.com/repos/storj/storj/git/commits{/sha}","comments_url":"https://api.github.com/repos/storj/storj/comments{/number}","issue_comment_url":"https://api.github.com/repos/storj/storj/issues/comments{/number}","contents_url":"https://api.github.com/repos/storj/storj/contents/{+path}","compare_url":"https://api.github.com/repos/storj/storj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storj/storj/merges","archive_url":"https://api.github.com/repos/storj/storj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storj/storj/downloads","issues_url":"https://api.github.com/repos/storj/storj/issues{/number}","pulls_url":"https://api.github.com/repos/storj/storj/pulls{/number}","milestones_url":"https://api.github.com/repos/storj/storj/milestones{/number}","notifications_url":"https://api.github.com/repos/storj/storj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storj/storj/labels{/name}","releases_url":"https://api.github.com/repos/storj/storj/releases{/id}","deployments_url":"https://api.github.com/repos/storj/storj/deployments","created_at":"2018-04-04T16:27:18Z","updated_at":"2018-12-13T10:19:01Z","pushed_at":"2018-12-13T10:49:46Z","git_url":"git://github.com/storj/storj.git","ssh_url":"git@github.com:storj/storj.git","clone_url":"https://github.com/storj/storj.git","svn_url":"https://github.com/storj/storj","homepage":"https://storj.io","size":64466,"stargazers_count":363,"watchers_count":363,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":82,"open_issues":30,"watchers":363,"default_branch":"master"}},"base":{"label":"storj:master","ref":"master","sha":"6642f97142b1ba3177f81d8341e8a49f0a1838cc","user":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"repo":{"id":128089774,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwODk3NzQ=","name":"storj","full_name":"storj/storj","private":false,"owner":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/storj/storj","description":"Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.","fork":false,"url":"https://api.github.com/repos/storj/storj","forks_url":"https://api.github.com/repos/storj/storj/forks","keys_url":"https://api.github.com/repos/storj/storj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storj/storj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storj/storj/teams","hooks_url":"https://api.github.com/repos/storj/storj/hooks","issue_events_url":"https://api.github.com/repos/storj/storj/issues/events{/number}","events_url":"https://api.github.com/repos/storj/storj/events","assignees_url":"https://api.github.com/repos/storj/storj/assignees{/user}","branches_url":"https://api.github.com/repos/storj/storj/branches{/branch}","tags_url":"https://api.github.com/repos/storj/storj/tags","blobs_url":"https://api.github.com/repos/storj/storj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storj/storj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storj/storj/git/refs{/sha}","trees_url":"https://api.github.com/repos/storj/storj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storj/storj/statuses/{sha}","languages_url":"https://api.github.com/repos/storj/storj/languages","stargazers_url":"https://api.github.com/repos/storj/storj/stargazers","contributors_url":"https://api.github.com/repos/storj/storj/contributors","subscribers_url":"https://api.github.com/repos/storj/storj/subscribers","subscription_url":"https://api.github.com/repos/storj/storj/subscription","commits_url":"https://api.github.com/repos/storj/storj/commits{/sha}","git_commits_url":"https://api.github.com/repos/storj/storj/git/commits{/sha}","comments_url":"https://api.github.com/repos/storj/storj/comments{/number}","issue_comment_url":"https://api.github.com/repos/storj/storj/issues/comments{/number}","contents_url":"https://api.github.com/repos/storj/storj/contents/{+path}","compare_url":"https://api.github.com/repos/storj/storj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storj/storj/merges","archive_url":"https://api.github.com/repos/storj/storj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storj/storj/downloads","issues_url":"https://api.github.com/repos/storj/storj/issues{/number}","pulls_url":"https://api.github.com/repos/storj/storj/pulls{/number}","milestones_url":"https://api.github.com/repos/storj/storj/milestones{/number}","notifications_url":"https://api.github.com/repos/storj/storj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storj/storj/labels{/name}","releases_url":"https://api.github.com/repos/storj/storj/releases{/id}","deployments_url":"https://api.github.com/repos/storj/storj/deployments","created_at":"2018-04-04T16:27:18Z","updated_at":"2018-12-13T10:19:01Z","pushed_at":"2018-12-13T10:49:46Z","git_url":"git://github.com/storj/storj.git","ssh_url":"git@github.com:storj/storj.git","clone_url":"https://github.com/storj/storj.git","svn_url":"https://github.com/storj/storj","homepage":"https://storj.io","size":64466,"stargazers_count":363,"watchers_count":363,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":82,"open_issues":30,"watchers":363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/storj/storj/pulls/847"},"html":{"href":"https://github.com/storj/storj/pull/847"},"issue":{"href":"https://api.github.com/repos/storj/storj/issues/847"},"comments":{"href":"https://api.github.com/repos/storj/storj/issues/847/comments"},"review_comments":{"href":"https://api.github.com/repos/storj/storj/pulls/847/comments"},"review_comment":{"href":"https://api.github.com/repos/storj/storj/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storj/storj/pulls/847/commits"},"statuses":{"href":"https://api.github.com/repos/storj/storj/statuses/58c20a883ac36a091710e47c046044bd2ffdcdb9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kaloyan-raev"}}