{"id":20785919,"url":"https://github.com/gogo/status","last_synced_at":"2025-05-05T15:10:12.048Z","repository":{"id":31176133,"uuid":"125752747","full_name":"gogo/status","owner":"gogo","description":"gRPC-like status package for use with GoGo Protobuf types","archived":false,"fork":false,"pushed_at":"2022-06-15T02:25:43.000Z","size":18,"stargazers_count":13,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T07:59:42.178Z","etag":null,"topics":["gogoproto","grpc","protobuf"],"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/gogo.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":"2018-03-18T18:00:03.000Z","updated_at":"2024-11-15T04:54:16.000Z","dependencies_parsed_at":"2022-07-18T23:17:53.767Z","dependency_job_id":null,"html_url":"https://github.com/gogo/status","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogo%2Fstatus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogo%2Fstatus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogo%2Fstatus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogo%2Fstatus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gogo","download_url":"https://codeload.github.com/gogo/status/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225034584,"owners_count":17410528,"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":["gogoproto","grpc","protobuf"],"created_at":"2024-11-17T14:49:31.743Z","updated_at":"2024-11-17T14:49:32.302Z","avatar_url":"https://github.com/gogo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Status\n\nThis is a convenience package for users of `gogo/protobuf` to be able to use\ntheir `gogo/protobuf` generated message easily and transparently with the\ngRPC status error structure.\n\nIt requires [Go gRPC version 1.11](https://github.com/grpc/grpc-go/releases/tag/v1.11.0)\nor above to successfully transmit statuses over the gRPC transport.\n\n## Use\n\nUse as you would the normal `grpc/status` package:\n\n```go\nreturn status.Error(codes.NotFound, \"no such user\")\n```\n\n```go\nst := status.New(codes.FailedPrecondition, \"wrong user role\")\ndetSt, err := st.WithDetails(\u0026rpc.BadRequest{\n    FieldViolations: []*rpc.BadRequest_FieldViolation{\n        {\n            Field:       \"role\",\n            Description: \"The first user created must have the role of an ADMIN\",\n        },\n    },\n})\nif err == nil {\n    return detSt.Err()\n}\nreturn st.Err()\n```\n\n## License\n\nThe code is 95% copied from the official gRPC status package, so the gRPC\nLicense applies.\n\n### Changes\n\nThe changes applied include changing the use of the\n`golang/protobuf` packages to `gogo/protobuf`, and changing the\ngenerated files from `google.golang.org/genproto/googleapis` to\n`github.com/gogo/googleapis/`.\n\nWe've also created an implicit interface fulfilled by all `gogo/status`\nerrors, for use with `grpc/status` and the gRPC runtime libraries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgogo%2Fstatus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgogo%2Fstatus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgogo%2Fstatus/lists"}