{"id":19420138,"url":"https://github.com/einride/aip-go","last_synced_at":"2026-04-28T08:04:29.724Z","repository":{"id":36990308,"uuid":"323710049","full_name":"einride/aip-go","owner":"einride","description":"Go SDK for implementing resource-oriented gRPC APIs.","archived":false,"fork":false,"pushed_at":"2026-04-13T17:21:23.000Z","size":554,"stargazers_count":227,"open_issues_count":18,"forks_count":28,"subscribers_count":14,"default_branch":"master","last_synced_at":"2026-04-13T19:17:54.885Z","etag":null,"topics":["aip","api-management","go","golang","grpc","protobufs","protocol-buffers"],"latest_commit_sha":null,"homepage":"https://aip.dev","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-22T19:00:27.000Z","updated_at":"2026-04-13T17:20:23.000Z","dependencies_parsed_at":"2023-12-19T16:35:28.187Z","dependency_job_id":"ec33896d-7e28-4bb0-a8be-1d49ed769962","html_url":"https://github.com/einride/aip-go","commit_stats":null,"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"purl":"pkg:github/einride/aip-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/einride","download_url":"https://codeload.github.com/einride/aip-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-go/sbom","scorecard":{"id":370063,"data":{"date":"2025-08-11","repo":{"name":"github.com/einride/aip-go","commit":"e682edc20e98db6367f1a889b7ac14e89ee7d39f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":10,"reason":"13 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: topLevel permissions set to 'write-all': .github/workflows/release.yml:7"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/einride/aip-go/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/einride/aip-go/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/einride/aip-go/stale.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T12:44:31.979Z","repository_id":36990308,"created_at":"2025-08-18T12:44:31.979Z","updated_at":"2025-08-18T12:44:31.979Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aip","api-management","go","golang","grpc","protobufs","protocol-buffers"],"created_at":"2024-11-10T13:21:21.002Z","updated_at":"2026-04-28T08:04:29.433Z","avatar_url":"https://github.com/einride.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/go.einride.tech/aip.svg)](https://pkg.go.dev/go.einride.tech/aip)\n\n# AIP Go\n\nGo SDK for implementing [Google API Improvement Proposals](https://aip.dev/)\n(AIP).\n\n## Generate AIP support code from proto\n\n```bash\ngo install go.einride.tech/aip/cmd/protoc-gen-go-aip\n```\n\nAdd to `buf.gen.yaml`:\n\n```yaml\nversion: v2\nplugins:\n  - local: protoc-gen-go-aip\n    out: gen\n    opt:\n      - paths=source_relative\n```\n\nRun `buf build` to generate e.g. `your_service_aip.go`.\n\n## Library usage examples\n\n```bash\ngo get -u go.einride.tech/aip\n```\n\n### [AIP-132](https://google.aip.dev/132) (Standard method: List)\n\n- Use [`pagination.PageToken`](./pagination/pagetoken.go) to implement\n  offset-based pagination.\n\n  ```go\n  package examplelibrary\n\n  import (\n      \"context\"\n\n      \"go.einride.tech/aip/pagination\"\n      \"google.golang.org/genproto/googleapis/example/library/v1\"\n      \"google.golang.org/grpc/codes\"\n      \"google.golang.org/grpc/status\"\n  )\n\n  func (s *Server) ListShelves(\n      ctx context.Context,\n      request *library.ListShelvesRequest,\n  ) (*library.ListShelvesResponse, error) {\n      // Handle request constraints.\n      const (\n          maxPageSize     = 1000\n          defaultPageSize = 100\n      )\n      switch {\n      case request.PageSize \u003c 0:\n          return nil, status.Errorf(codes.InvalidArgument, \"page size is negative\")\n      case request.PageSize == 0:\n          request.PageSize = defaultPageSize\n      case request.PageSize \u003e maxPageSize:\n          request.PageSize = maxPageSize\n      }\n      // Use pagination.PageToken for offset-based page tokens.\n      pageToken, err := pagination.ParsePageToken(request)\n      if err != nil {\n          return nil, status.Errorf(codes.InvalidArgument, \"invalid page token\")\n      }\n      // Query the storage.\n      result, err := s.Storage.ListShelves(ctx, \u0026ListShelvesQuery{\n          Offset:   pageToken.Offset,\n          PageSize: request.GetPageSize(),\n      })\n      if err != nil {\n          return nil, err\n      }\n      // Build the response.\n      response := \u0026library.ListShelvesResponse{\n          Shelves: result.Shelves,\n      }\n      // Set the next page token.\n      if result.HasNextPage {\n          response.NextPageToken = pageToken.Next(request).String()\n      }\n      // Respond.\n      return response, nil\n  }\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Faip-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinride%2Faip-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Faip-go/lists"}