Documentation
¶
Overview ¶
Package grpc renders lakta AppErrors as gRPC status + errdetails. Import it aliased (e.g. errgrpc) to avoid clashing with google.golang.org/grpc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor is the streaming equivalent.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor renders a handler's returned error via errors.FromError into a *status.Status: GRPC code + Message, attaching errdetails.ErrorInfo {Reason: string(Code), Metadata: Meta} and, when Fields is non-empty, errdetails.BadRequest{FieldViolations}. Attaches via status.WithDetails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.