{"id":13713436,"url":"https://github.com/transloadit/go-sdk","last_synced_at":"2025-04-09T23:35:21.325Z","repository":{"id":45230478,"uuid":"20328409","full_name":"transloadit/go-sdk","owner":"transloadit","description":"Transloadit's official Go SDK, maintained by the community","archived":false,"fork":false,"pushed_at":"2024-12-09T08:25:51.000Z","size":2826,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-24T01:25:14.468Z","etag":null,"topics":["encoding","go","sdk","transloadit","uploading"],"latest_commit_sha":null,"homepage":"https://transloadit.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transloadit.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}},"created_at":"2014-05-30T12:22:10.000Z","updated_at":"2024-12-09T08:25:54.000Z","dependencies_parsed_at":"2024-03-05T14:39:01.749Z","dependency_job_id":null,"html_url":"https://github.com/transloadit/go-sdk","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fgo-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fgo-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fgo-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fgo-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transloadit","download_url":"https://codeload.github.com/transloadit/go-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248130528,"owners_count":21052759,"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":["encoding","go","sdk","transloadit","uploading"],"created_at":"2024-08-02T23:01:36.212Z","updated_at":"2025-04-09T23:35:21.295Z","avatar_url":"https://github.com/transloadit.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# go-sdk\n\nA **Go** Integration for [Transloadit](https://transloadit.com)'s file uploading and encoding service\n\n## Intro\n\n[Transloadit](https://transloadit.com) is a service that helps you handle file uploads, resize, crop and watermark your images, make GIFs, transcode your videos, extract thumbnails, generate audio waveforms, and so much more. In short, [Transloadit](https://transloadit.com) is the Swiss Army Knife for your files.\n\nThis is a **Go** SDK to make it easy to talk to the [Transloadit](https://transloadit.com) REST API.\n\n## Install\n\n```bash\ngo get github.com/transloadit/go-sdk\n```\n\nThe Go SDK is confirmed to work with Go 1.11 or higher.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/transloadit/go-sdk\"\n)\n\nfunc main() {\n\t// Create client\n\toptions := transloadit.DefaultConfig\n\toptions.AuthKey = \"YOUR_TRANSLOADIT_KEY\"\n\toptions.AuthSecret = \"YOUR_TRANSLOADIT_SECRET\"\n\tclient := transloadit.NewClient(options)\n\n\t// Initialize new assembly\n\tassembly := transloadit.NewAssembly()\n\n\t// Add a file to upload\n\tassembly.AddFile(\"image\", \"/PATH/TO/FILE.jpg\")\n\n\t// Add Instructions, e.g. resize image to 75x75px\n\tassembly.AddStep(\"resize\", map[string]interface{}{\n\t\t\"robot\":           \"/image/resize\",\n\t\t\"width\":           75,\n\t\t\"height\":          75,\n\t\t\"resize_strategy\": \"pad\",\n\t\t\"background\":      \"#000000\",\n\t})\n\n\t// Start the upload\n\tinfo, err := client.StartAssembly(context.Background(), assembly)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// All files have now been uploaded and the assembly has started but no\n\t// results are available yet since the conversion has not finished.\n\t// WaitForAssembly provides functionality for polling until the assembly\n\t// has ended.\n\tinfo, err = client.WaitForAssembly(context.Background(), info)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"You can view the result at: %s\\n\", info.Results[\"resize\"][0].SSLURL)\n}\n```\n\n## Example\n\nFor fully working examples on how to use templates, non-blocking processing and more, take a look at [`examples/`](https://github.com/transloadit/go-sdk/tree/main/examples).\n\n## Documentation\n\nSee \u003ca href=\"https://pkg.go.dev/github.com/transloadit/go-sdk\"\u003eGodoc\u003c/a\u003e for full API documentation.\n\n## License\n\n[MIT Licensed](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransloadit%2Fgo-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransloadit%2Fgo-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransloadit%2Fgo-sdk/lists"}