Documentation
¶
Index ¶
- func Normalize(data string) string
- type HttpListener
- func (l *HttpListener) Action(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Actions(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) CurrentValue(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Handle(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Health(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Info(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Name() string
- func (l *HttpListener) Setup()
- func (l *HttpListener) Start()
- func (l *HttpListener) Stop()
- func (l *HttpListener) Value(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Values(rw http.ResponseWriter, req *http.Request)
- type HttpListenerConfig
- type Message
- type Result
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpListener ¶
type HttpListener struct { JsonCommandParser core_interface.JsonCommandParser BlockDBCommandProcessor core_interface.BlockDBCommandProcessor Config HttpListenerConfig BusinessReader *core.BusinessReader // contains filtered or unexported fields }
func (*HttpListener) Action ¶
func (l *HttpListener) Action(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Actions ¶
func (l *HttpListener) Actions(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) CurrentValue ¶
func (l *HttpListener) CurrentValue(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Handle ¶
func (l *HttpListener) Handle(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Health ¶
func (l *HttpListener) Health(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Info ¶
func (l *HttpListener) Info(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Name ¶
func (l *HttpListener) Name() string
func (*HttpListener) Setup ¶
func (l *HttpListener) Setup()
func (*HttpListener) Start ¶
func (l *HttpListener) Start()
func (*HttpListener) Stop ¶
func (l *HttpListener) Stop()
func (*HttpListener) Value ¶
func (l *HttpListener) Value(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Values ¶
func (l *HttpListener) Values(rw http.ResponseWriter, req *http.Request)
type HttpListenerConfig ¶
type Message ¶
type Message struct { OpStr json.RawMessage `json:"op_str"` PublicKey string `json:"public_key"` OpHash string `json:"op_hash"` Signature string `json:"signature"` }
type Result ¶
type Result struct { // Type is the json type Type Type // Raw is the raw json Raw string // Str is the json string Str string // Num is the json number Num float64 // Index of raw value in original json, zero means index unknown Index int }
Result represents a json value that is returned from Get().
func Parse ¶
Parse parses the json and returns a result.
This function expects that the json is well-formed, and does not validate. Invalid json will not panic, but it may return back unexpected results. If you are consuming JSON from an unpredictable source then you may want to use the Valid function first.
Click to show internal directories.
Click to hide internal directories.