Documentation ¶
Index ¶
- func RespOk(rw http.ResponseWriter, result interface{})
- type AuditDataGrammarRequest
- type AuditDataQueryRequest
- type AuditDataQueryResponse
- type CommonResponse
- type HttpListener
- func (l *HttpListener) Handle(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Health(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Name() string
- func (l *HttpListener) Query(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) QueryGrammar(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) QueryOriginal(rw http.ResponseWriter, req *http.Request)
- func (l *HttpListener) Start()
- func (l *HttpListener) Stop()
- type HttpListenerConfig
- type OriginalDataQueryResponse
- type OriginalDataRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RespOk ¶
func RespOk(rw http.ResponseWriter, result interface{})
Types ¶
type AuditDataGrammarRequest ¶
type AuditDataQueryRequest ¶
type AuditDataQueryRequest struct { Type string `json:"type"` Ip string `json:"ip"` PrimaryKey string `json:"primary_key"` Timestamp string `json:"timestamp"` Identity string `json:"identity"` OtherCondition bson.M `json:"other_condition"` PageNum int64 `json:"page_num"` PageSize int64 `json:"page_size"` }
func (*AuditDataQueryRequest) ToFilter ¶
func (request *AuditDataQueryRequest) ToFilter() bson.M
type AuditDataQueryResponse ¶
type CommonResponse ¶
type CommonResponse struct { Message string `json:"message"` Result interface{} `json:"result"` }
type HttpListener ¶
type HttpListener struct {
// contains filtered or unexported fields
}
func NewHttpListener ¶
func NewHttpListener(config HttpListenerConfig, dataProcessor processors.DataProcessor, ledgerWriter backends.LedgerWriter, auditWriter ogws.AuditWriter) *HttpListener
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) Name ¶
func (l *HttpListener) Name() string
func (*HttpListener) Query ¶
func (l *HttpListener) Query(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) QueryGrammar ¶
func (l *HttpListener) QueryGrammar(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) QueryOriginal ¶
func (l *HttpListener) QueryOriginal(rw http.ResponseWriter, req *http.Request)
func (*HttpListener) Start ¶
func (l *HttpListener) Start()
func (*HttpListener) Stop ¶
func (l *HttpListener) Stop()
type HttpListenerConfig ¶
type OriginalDataQueryResponse ¶
type OriginalDataQueryResponse struct { Total int64 `json:"total"` Data []ogws.OriginalData `json:"data"` }
Click to show internal directories.
Click to hide internal directories.