Documentation ¶
Index ¶
- type Authorization
- type RPCAuthType
- type RPCServer
- func (s *RPCServer) GetLocalNode() *node.LocalNode
- func (s *RPCServer) GetNetNode() *node.LocalNode
- func (s *RPCServer) Handle(w http.ResponseWriter, r *http.Request)
- func (s *RPCServer) HandleFunc(pattern string, handler common.Handler)
- func (s *RPCServer) SetDefaultFunc(def func(http.ResponseWriter, *http.Request))
- func (s *RPCServer) SetLocalNode(ln *node.LocalNode)
- func (s *RPCServer) Start()
- type ServeMux
- type UserPassword
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization interface { GetAuthType() RPCAuthType CheckAuth(s *RPCServer, r *http.Request) bool }
func NewUserPassword ¶
func NewUserPassword(username string, passwordHash string) Authorization
type RPCServer ¶
type RPCServer struct {
// contains filtered or unexported fields
}
func (*RPCServer) GetLocalNode ¶
func (*RPCServer) GetNetNode ¶
func (*RPCServer) Handle ¶
func (s *RPCServer) Handle(w http.ResponseWriter, r *http.Request)
this is the funciton that should be called in order to answer an rpc call should be registered like "http.HandleFunc("/", httpjsonrpc.Handle)"
func (*RPCServer) HandleFunc ¶
function to register functions to be called for specific rpc calls
func (*RPCServer) SetDefaultFunc ¶
func (s *RPCServer) SetDefaultFunc(def func(http.ResponseWriter, *http.Request))
function to be called if the request is not a HTTP JSON RPC call
func (*RPCServer) SetLocalNode ¶
type UserPassword ¶
func (*UserPassword) CheckAuth ¶
func (up *UserPassword) CheckAuth(s *RPCServer, r *http.Request) bool
func (*UserPassword) GetAuthType ¶
func (up *UserPassword) GetAuthType() RPCAuthType
Click to show internal directories.
Click to hide internal directories.