{"id":18825545,"url":"https://github.com/grycap/cdmi-client-go","last_synced_at":"2026-01-21T01:30:18.516Z","repository":{"id":57520803,"uuid":"249472923","full_name":"grycap/cdmi-client-go","owner":"grycap","description":"A basic Go library to perform CDMI core operations","archived":false,"fork":false,"pushed_at":"2020-07-30T09:28:22.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-30T04:59:07.400Z","etag":null,"topics":["cdmi","cloud","data","go"],"latest_commit_sha":null,"homepage":"","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/grycap.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}},"created_at":"2020-03-23T15:43:09.000Z","updated_at":"2020-07-30T09:27:21.000Z","dependencies_parsed_at":"2022-09-26T18:01:07.044Z","dependency_job_id":null,"html_url":"https://github.com/grycap/cdmi-client-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Fcdmi-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Fcdmi-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Fcdmi-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Fcdmi-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grycap","download_url":"https://codeload.github.com/grycap/cdmi-client-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763668,"owners_count":19692800,"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":["cdmi","cloud","data","go"],"created_at":"2024-11-08T00:59:57.048Z","updated_at":"2026-01-21T01:30:18.440Z","avatar_url":"https://github.com/grycap.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdmi-client-go\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/grycap/cdmi-client-go)](https://goreportcard.com/report/github.com/grycap/cdmi-client-go)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat)](https://pkg.go.dev/github.com/grycap/cdmi-client-go)\n[![GitHub](https://img.shields.io/github/license/grycap/cdmi-client-go)](https://github.com/grycap/cdmi-client-go/blob/master/LICENSE)\n\nA basic Go library to perform the core container and object operations defined in the Cloud Data Management Interface (CDMI) [specification](https://www.snia.org/sites/default/files/CDMI_Spec_v1.1.1.pdf).\n\n## Installation\n\n ```bash\n go get github.com/grycap/cdmi-client-go\n ```\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"io\"\n    \"net/url\"\n    \"os\"\n\n    \"github.com/grycap/cdmi-client-go\"\n)\n\nfunc main() {\n    // CDMI Server endpoint\n    endpoint, _ := url.Parse(\"https://my-cdmi-server.example\")\n    // Bearer auth token (if not required set an empty string)\n    token := \"my-token\"\n    // Verify SSL certificates\n    verify := true\n\n    // Create a new CDMI client\n    client := cdmi.New(endpoint, token, verify)\n\n    // Create a container (directory)\n    err := client.CreateContainer(\"newcontainerName/anotherContainer\", true)\n    if err != nil {\n        // Example: ignore error 400 (folder already exists)\n        if err != cdmi.ErrBadRequest {\n            // Manage error\n        }\n    }\n\n    // Upload a file\n    file, _ := os.Open(\"/path/to/file\")\n    defer file.Close()\n    err = client.CreateObject(\"containerName/objectName\", file, true)\n    if err != nil {\n        // Manage error\n    }\n\n    // Download a file\n    newFile, _ := os.Create(\"/path/to/new/file\")\n    defer newFile.Close()\n    content, err := client.GetObject(\"containerName/objectName\")\n    if err != nil {\n        // Manage error\n    }\n    defer content.Close()\n    io.Copy(newFile, content)\n}\n```\n\nAll available methods can be found at pkg.go.dev [reference](https://pkg.go.dev/github.com/grycap/cdmi-client-go).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrycap%2Fcdmi-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrycap%2Fcdmi-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrycap%2Fcdmi-client-go/lists"}