Documentation
¶
Index ¶
- Variables
- func RegisterRouter(name string, factory RouterFactory, ctx interface{})
- func WriteErr(w http.ResponseWriter, code int, msg string)
- func WriteJSON(w http.ResponseWriter, msg []byte)
- func WriteObject(w http.ResponseWriter, obj interface{})
- type ErrorResponse
- type RootRequestContext
- type RouterFactory
- type RouterFactoryParams
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUndefinedRouterFactory = errors.New("undefined Router factory") ErrUnimplemented = errors.New("unimplemented Router factory") )
View Source
var (
ErrUnregisteredVM = errors.New("no Router is registered for this VM")
)
Functions ¶
func RegisterRouter ¶
func RegisterRouter(name string, factory RouterFactory, ctx interface{})
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, msg []byte)
func WriteObject ¶
func WriteObject(w http.ResponseWriter, obj interface{})
Types ¶
type ErrorResponse ¶
type RootRequestContext ¶
type RootRequestContext struct{}
type RouterFactory ¶
type RouterFactory func(RouterFactoryParams) error
type RouterFactoryParams ¶
type RouterFactoryParams struct { Router *web.Router NetworkID uint32 ChainConfig cfg.ChainConfig ServiceConfig cfg.ServiceConfig }
Click to show internal directories.
Click to hide internal directories.