{"id":21514187,"url":"https://github.com/s3git/s3git-go","last_synced_at":"2025-07-01T14:08:07.588Z","repository":{"id":57489179,"uuid":"52788737","full_name":"s3git/s3git-go","owner":"s3git","description":"SDK package in Golang for s3git: git for Cloud Storage","archived":false,"fork":false,"pushed_at":"2016-05-26T17:49:08.000Z","size":175,"stargazers_count":48,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T00:38:30.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://s3git.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s3git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-29T12:16:35.000Z","updated_at":"2024-04-03T08:55:32.000Z","dependencies_parsed_at":"2022-08-29T20:30:40.883Z","dependency_job_id":null,"html_url":"https://github.com/s3git/s3git-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3git%2Fs3git-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3git%2Fs3git-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3git%2Fs3git-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3git%2Fs3git-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s3git","download_url":"https://codeload.github.com/s3git/s3git-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103922,"owners_count":21048244,"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":[],"created_at":"2024-11-23T23:43:25.939Z","updated_at":"2025-04-09T19:50:52.013Z","avatar_url":"https://github.com/s3git.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"s3git-go\n========\n\n[![Join the chat at https://gitter.im/s3git/s3git](https://badges.gitter.im/s3git/s3git.svg)](https://gitter.im/s3git/s3git?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThis is the go SDK package for s3git.\n\nFor brevity reasons, error handling and other boilerplate code like package naming etc. is not shown in the examples. Actual client code should always check for errors, see [s3git](https://github.com/s3git/s3git) as an example.\n\n**DISCLAIMER: This software is still under development (although the storage format/model using BLAKE2 hashing is stable)  -- use at your own peril for now**\n\n**Note that the API is not stable yet, you can expect minor changes**\n\nBLAKE2 Tree Hashing\n-------------------\n\nIf you would like to understand how s3git uses the BLAKE2 Tree hashing mode please see [here](https://github.com/s3git/s3git/blob/master/BLAKE2.md). \n\nDevelopment environment\n-----------------------\n\nSee [here](https://github.com/s3git/s3git#building-from-source) for setting up the development environment.\n\nCreate a repository\n-------------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\n// Create repo\nrepo, _ := s3git.InitRepository(\".\")\n\n// Add some data\nrepo.Add(strings.NewReader(\"hello s3git\"))\n\n// Commit changes\nrepo.Commit(\"Initial commit\")\n\n// List commits\ncommits, _ := repo.ListCommits(\"\")\n\nfor commit := range commits {\n    fmt.Println(commit)\n}\n```\n\nSee [here](https://github.com/s3git/s3git-go/blob/master/examples/create.go) for the full example (and others). And run like this:\n\n```sh\n$ cd $GOPATH/src/github.com/s3git/s3git-go/examples\n$ go run create.go\n```\n\nClone a repository\n------------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\noptions := []s3git.CloneOptions{}\noptions = append(options, s3git.CloneOptionSetAccessKey(\"AKIAJYNT4FCBFWDQPERQ\"))\noptions = append(options, s3git.CloneOptionSetSecretKey(\"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\"))\n\n// Clone a repo\nrepo, _ := s3git.Clone(\"s3://s3git-spoon-knife\", \".\", options...)\n\n// List contents\nlist, _ := repo.List(\"\")\n\nfor l := range list {\n    fmt.Println(l)\n}\n```\n\nMake changes and push\n---------------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\nrepo, _ := s3git.OpenRepository(\".\")\n\nrepo.Add(strings.NewReader(fmt.Sprint(time.Now())))\n\nrepo.Commit(\"New commit\")\n\nhydrate := false \t// For explanation, see https://github.com/s3git/s3git/blob/master/BLAKE2.md#hydrated\nrepo.Push(hydrate)\n```\n\nSee [change_and_push.go](https://github.com/s3git/s3git-go/blob/master/examples/change_and_push.go).\n\nPull down changes\n-----------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\nrepo, _ := s3git.OpenRepository(\".\")\n\nrepo.Pull()\n\nrepo.Log()\n```\n\nExtract data\n------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\nrepo, _ := s3git.OpenRepository(\".\")\n\nr, _ := repo.Get(\"012345678\")\n\nio.Copy(os.Stdout, r)\n```\n\nClone a repository with progress\n--------------------------------\n\n```go\nimport \"github.com/s3git/s3git-go\"\n\nrepo, _ := s3git.Clone(\"s3://s3git-100m\", \".\")\n\n```\n\nContributions\n-------------\n\nContributions are welcome! Please see [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nLicense\n-------\n\ns3git-go is released under the Apache License v2.0. You can find the complete text in the file LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3git%2Fs3git-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs3git%2Fs3git-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3git%2Fs3git-go/lists"}