Documentation ¶
Index ¶
- Variables
- type Target
- type WebRPCErrordeprecated
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} )
Webrpc errors
Functions ¶
This section is empty.
Types ¶
type Target ¶ added in v0.1.0
type Target struct { Schema *schema.WebRPCSchema Generator string InterfaceName string OutFile string Opts map[string]interface{} }
func CollectInterfaces ¶ added in v0.2.0
Find all Go interfaces with the special //go:webrpc comments.
type WebRPCError
deprecated
added in
v0.6.3
type WebRPCError struct { Name string `json:"error"` Code int `json:"code"` Message string `json:"msg"` Cause string `json:"cause,omitempty"` HTTPStatus int `json:"status"` // contains filtered or unexported fields }
Deprecated: This type may be removed in the future.
func (WebRPCError) Error ¶ added in v0.6.3
func (e WebRPCError) Error() string
func (WebRPCError) Is ¶ added in v0.6.3
func (e WebRPCError) Is(target error) bool
func (WebRPCError) StackFrames ¶ added in v0.7.5
func (e WebRPCError) StackFrames() []uintptr
func (WebRPCError) Unwrap ¶ added in v0.6.3
func (e WebRPCError) Unwrap() error
func (WebRPCError) WithCause ¶ added in v0.7.5
func (e WebRPCError) WithCause(cause error) WebRPCError
Click to show internal directories.
Click to hide internal directories.