conjureerrors

package
v6.64.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decoder

func Decoder() errors.ConjureErrorDecoder

Decoder returns the error type registry used by the conjure-generated clients in this package to convert JSON errors to their go types. Errors are registered by their error name. Only one type can be registered per name. If an error name is not recognized, a genericError is returned with all params marked unsafe.

func RegisterErrorType

func RegisterErrorType(name string, typ reflect.Type)

RegisterErrorType registers an error name and its go type in a global registry. The type should be a struct type whose pointer implements Error. Panics if name is already registered or *type does not implement Error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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