Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errore ¶
func Errore[E constraints.Integer](code E, err error) error
Errore converts the given error into a gRPC error with the given code if err's type is not *status.Status. ignore code if err is *status.Status.
func HTTPError ¶
func HTTPError(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, err error)
HTTPError translate error into error schema for Google's JSON HTTP APIs. https://cloud.google.com/apis/design/errors
func NewErrorStatus ¶
func NewErrorStatus(err error) *errors.Error_Status
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.