{"id":19420120,"url":"https://github.com/einride/backstage-go","last_synced_at":"2025-04-24T14:32:02.809Z","repository":{"id":160296971,"uuid":"583924384","full_name":"einride/backstage-go","owner":"einride","description":"Backstage SDK for Go","archived":false,"fork":false,"pushed_at":"2024-08-01T13:59:56.000Z","size":88,"stargazers_count":55,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-07T09:41:18.086Z","etag":null,"topics":["backstage","developer-experience","go","golang","software-catalog"],"latest_commit_sha":null,"homepage":"https://backstage.io","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/einride.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-31T13:37:30.000Z","updated_at":"2024-08-19T14:53:30.248Z","dependencies_parsed_at":null,"dependency_job_id":"c594c960-db1d-41f0-8bd4-e77afc75b648","html_url":"https://github.com/einride/backstage-go","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fbackstage-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fbackstage-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fbackstage-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fbackstage-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/einride","download_url":"https://codeload.github.com/einride/backstage-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643491,"owners_count":21464185,"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":["backstage","developer-experience","go","golang","software-catalog"],"created_at":"2024-11-10T13:21:13.405Z","updated_at":"2025-04-24T14:32:02.451Z","avatar_url":"https://github.com/einride.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cimg src=\"./docs/backstage-go.svg\" align=\"left\" width=\"140\" /\u003e\n\n# Backstage Go SDK\n\nA Go SDK and CLI tool for working with [Backstage](https://backstage.io).\n\n## CLI tool\n\nThe `backstage` CLI tool provides command-line access to Backstage APIs.\n\n```bash\n# Authenticate to your Backstage instance.\n$ backstage auth login --base-url \"https://your-backstage.com\" --token \"\u003cTOKEN\u003e\"\n\n# List component entities in the catalog.\n$ backstage catalog entities list --filter \"kind=Component\"\n\n# Get an entity in the catalog.\n$ backstage catalog entities get-by-name --kind \"User\" --name \"odsod\"\n\n# Validate catalog entities in the \".backstage\" dir.\n$ backstage catalog entities validate \".backstage\"\n```\n\nThe CLI tool can be downloaded from the\n[Releases](https://github.com/einride/backstage-go/releases) page.\n\n## Software Catalog API\n\nThe [`catalog`](https://pkg.go.dev/go.einride.tech/backstage/catalog) package\nprovides a Go client to the\n[Software Catalog API](https://backstage.io/docs/features/software-catalog/software-catalog-api).\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.einride.tech/backstage/catalog\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\t// Create a Software Catalog API client.\n\tclient := catalog.NewClient(\n\t\tcatalog.WithBaseURL(\"https://your-backstage-instance.example.com\"),\n\t\tcatalog.WithToken(\"YOUR_API_AUTH_TOKEN\"),\n\t)\n\t// List component entities.\n\tresponse, err := client.ListEntities(ctx, \u0026catalog.ListEntitiesRequest{\n\t\tFilters: []string{\"kind=Component\"},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfor _, entity := range response.Entities {\n\t\t// Standard fields are parsed into Go structs.\n\t\tfmt.Println(entity.Metadata.Name)\n\t\t// Standard fields on specs can be parsed into Go structs.\n\t\tspec, err := entity.ComponentSpec()\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tfmt.Println(spec.Lifecycle)\n\t\t// Custom fields can be accessed via raw JSON.\n\t\tfmt.Println(string(entity.Raw))\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fbackstage-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinride%2Fbackstage-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fbackstage-go/lists"}