grpccodes

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeFromHTTPStatus

func CodeFromHTTPStatus(httpStatusCode int) codes.Code

CodeFromHTTPStatus converts http status code to gRPC status code See: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md

func HTTPStatusFromCode

func HTTPStatusFromCode(code codes.Code) int

HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status. https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go#L15 See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL