Documentation ¶
Index ¶
- type GRPCWebErr
- func (*GRPCWebErr) AddLogTracingID(logTracingID string, err error) error
- func (*GRPCWebErr) GetHTTPStatus(err error) int
- func (*GRPCWebErr) GetLogTracingID(err error) string
- func (*GRPCWebErr) GetMessageToUser(err error) string
- func (*GRPCWebErr) New(grpcStatusCode codes.Code, httpStatusCode int, messageToUser string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCWebErr ¶
type GRPCWebErr struct{}
GRPCWebErr serve as a receiver in order to allow mocking
func (*GRPCWebErr) AddLogTracingID ¶
func (*GRPCWebErr) AddLogTracingID(logTracingID string, err error) error
AddLogTracingID append logTracingID value to the error so it could be tracked as it flow through the services
func (*GRPCWebErr) GetHTTPStatus ¶
func (*GRPCWebErr) GetHTTPStatus(err error) int
GetHTTPStatus is a getter for the http value which was supplied at New(...)
func (*GRPCWebErr) GetLogTracingID ¶
func (*GRPCWebErr) GetLogTracingID(err error) string
GetLogTracingID is a getter for logTracingId
func (*GRPCWebErr) GetMessageToUser ¶
func (*GRPCWebErr) GetMessageToUser(err error) string
GetMessageToUser is a getter for the messageToUser which was supplied at New(...)
func (*GRPCWebErr) New ¶
New (with a receiver pointer) create a new error with embedded data of status codes and message
grpcStatusCode codes.Code - import "google.golang.org/grpc/codes" httpStatusCode int - http status code to return messageToUser string - intended message returned to client, get default msg if empty