{"id":14956266,"url":"https://github.com/0zand1z/ipldcrud","last_synced_at":"2026-03-04T00:24:40.088Z","repository":{"id":144213367,"uuid":"217238178","full_name":"0zAND1z/ipldcrud","owner":"0zAND1z","description":"Golang based hack to experiment the uses of IPLD through the IPFS DAG operations using the go-ipfs-api package.","archived":false,"fork":false,"pushed_at":"2020-06-13T21:18:59.000Z","size":44,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T13:51:10.622Z","etag":null,"topics":["database","hack","ipfs","ipfs-api","ipld","ipld-crud","key-value","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0zAND1z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-24T07:28:17.000Z","updated_at":"2024-05-30T11:41:01.000Z","dependencies_parsed_at":"2024-02-18T04:00:29.446Z","dependency_job_id":null,"html_url":"https://github.com/0zAND1z/ipldcrud","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"310c4fe51773f8765f3a3f1e101ee456f4c01688"},"previous_names":["0zand1z/ipld-crud"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0zAND1z%2Fipldcrud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0zAND1z%2Fipldcrud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0zAND1z%2Fipldcrud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0zAND1z%2Fipldcrud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0zAND1z","download_url":"https://codeload.github.com/0zAND1z/ipldcrud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240900612,"owners_count":19875575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","hack","ipfs","ipfs-api","ipld","ipld-crud","key-value","tutorial"],"created_at":"2024-09-24T13:12:37.308Z","updated_at":"2026-03-04T00:24:40.054Z","avatar_url":"https://github.com/0zAND1z.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipld-crud\n\nA simple Golang based hack to experiment the uses of IPLD through the DAG operations using the [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) package.\n\nI have built a tiny client that receives key-value entries from user and stores it on IPFS DAG, returning an explorable URL to play with.\n\n## Usage\n\nHere is a sample main.go file for your quick reference:\n\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\n\tipldcrud \"github.com/0zAND1z/ipldcrud\"\n)\n\nfunc main() {\n\tsh := ipldcrud.InitShell(\"https://ipfs.infura.io:5001\")\n\n\tkeyValueMap := make(map[string]interface{})\n\n\tscanner := bufio.NewScanner(os.Stdin)\n\n\tfmt.Println(\"Enter value for the key field: \")\n\tscanner.Scan()\n\tinputKey := scanner.Text()\n\n\tfmt.Println(\"Enter value for value field: \")\n\tscanner.Scan()\n\tinputValue := scanner.Text()\n\n\tkeyValueMap[inputKey] = inputValue\n\n\t// Converting into JSON object\n\tentryJSON, err := json.Marshal(keyValueMap)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// Display the marshaled JSON object before sending it to IPFS\n\tjsonStr := string(entryJSON)\n\tfmt.Println(\"The JSON object of your key-value entry is:\")\n\tfmt.Println(jsonStr)\n\tcid := ipldcrud.Set(sh, entryJSON)\n\tfmt.Println(\"CID: \", cid)\n\n\t// Fetch the details by reading the DAG for key \"inputKey\"\n\tfmt.Printf(\"READ: Value for key \\\"%s\\\" is: \", inputKey)\n\tres, err := ipldcrud.Get(sh, cid, inputKey)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\tfmt.Println(res)\n}\n\n```\n\n1. Once you run the main.go, a simple console pops up, asking you to enter a key and a value.\n\n2. After entering two string values, it will create a dag entry based on the input data. It will subsequently query the same data and return back the result along with the query results.\n\n### Tutorial\n\nFor a more detailed understanding of IPLD and how the code works, check out this [article on SimpleAsWater.com](https://simpleaswater.com/hands-on-ipld-tutorial-in-golang/)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0zand1z%2Fipldcrud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0zand1z%2Fipldcrud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0zand1z%2Fipldcrud/lists"}