Documentation ¶
Index ¶
- Variables
- func CatchAllErrorHandler() func(r *http.Request, err error) (int, []byte, http.Header)
- func ConsoleLogErrorHandler(next func(r *http.Request, err error) (int, []byte, http.Header)) func(r *http.Request, err error) (int, []byte, http.Header)
- func NewBadRequest(err error) error
- func ParseDetailed(sources []Source) (*model.Model, []error)
- func RipErrorHandler(next func(r *http.Request, err error) (int, []byte, http.Header)) func(r *http.Request, err error) (int, []byte, http.Header)
- type BadRequestError
- type Generator
- func (g *Generator) Debug() ([]byte, error)
- func (g *Generator) Go(iPkg, extPkg string, externals map[string]string) *GoGenerator
- func (g *Generator) TypescriptClient(targetFile string, params TSParams) error
- func (g *Generator) TypescriptMapper(targetFile string, params TSParams) error
- func (g *Generator) TypescriptTypes(targetFile string, params TSParams) error
- type GoGenerator
- func (g *GoGenerator) Client(clientFolder string) error
- func (g *GoGenerator) Decorator(decoratorFolder string) error
- func (g *GoGenerator) Interface(interfaceFolder string) error
- func (g *GoGenerator) Profiler(profilerFolder string) error
- func (g *GoGenerator) Server(handlerFolder string) error
- func (g *GoGenerator) TestFacade(facadeFolder string) error
- type Option
- type Source
- type TSParams
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultErrorHandler = ConsoleLogErrorHandler(RipErrorHandler(CatchAllErrorHandler()))
Functions ¶
func CatchAllErrorHandler ¶
CatchAllErrorHandler returns for all errors an internal server error.
func ConsoleLogErrorHandler ¶
func ConsoleLogErrorHandler( next func(r *http.Request, err error) (int, []byte, http.Header), ) func(r *http.Request, err error) (int, []byte, http.Header)
ConsoleLogErrorHandler forwards all error handling to next and prints the resulting errors to the console using log statements.
func NewBadRequest ¶
Types ¶
type BadRequestError ¶
type BadRequestError struct {
// contains filtered or unexported fields
}
func (*BadRequestError) Cause ¶ added in v0.16.0
func (e *BadRequestError) Cause() error
Cause allows for github.com/pkg/errors.Cause(...)
func (*BadRequestError) Error ¶ added in v0.16.0
func (e *BadRequestError) Error() string
func (*BadRequestError) Unwrap ¶ added in v0.16.0
func (e *BadRequestError) Unwrap() error
Unwrap allows for go1.13+ errors.Unwrap(...), errors.Is(...) and errors.As(...)
type Generator ¶ added in v0.17.0
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶ added in v0.17.0
func (*Generator) Go ¶ added in v0.17.0
func (g *Generator) Go(iPkg, extPkg string, externals map[string]string) *GoGenerator
func (*Generator) TypescriptClient ¶ added in v0.17.0
func (*Generator) TypescriptMapper ¶ added in v0.17.0
type GoGenerator ¶ added in v0.16.0
type GoGenerator struct { // InterfacePkg is the full package name where the interface definition is generated to. InterfacePkg string // ExternalPkg is the full package name where the parse/serialize and construct methods // for the different external types are located. ExternalPkg string // Externals is the mapping of the external names to go data types. Externals map[string]string // contains filtered or unexported fields }
func (*GoGenerator) Client ¶ added in v0.16.0
func (g *GoGenerator) Client(clientFolder string) error
func (*GoGenerator) Decorator ¶ added in v0.16.0
func (g *GoGenerator) Decorator(decoratorFolder string) error
func (*GoGenerator) Interface ¶ added in v0.16.0
func (g *GoGenerator) Interface(interfaceFolder string) error
func (*GoGenerator) Profiler ¶ added in v0.16.0
func (g *GoGenerator) Profiler(profilerFolder string) error
func (*GoGenerator) Server ¶ added in v0.16.0
func (g *GoGenerator) Server(handlerFolder string) error
func (*GoGenerator) TestFacade ¶ added in v0.16.0
func (g *GoGenerator) TestFacade(facadeFolder string) error
type Option ¶ added in v0.17.0
type Option interface {
// contains filtered or unexported methods
}
func OptionAcronym ¶ added in v0.17.0
func OptionAcronymPlural ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.