mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-14 22:55:43 +00:00
Populate Request
and Response
fields of MizuEntry
This commit is contained in:
parent
2dd1883c65
commit
a00951fdd7
@ -151,6 +151,8 @@ func GetEntry(c *gin.Context) {
|
||||
ReferenceLink: entry["proto"].(map[string]interface{})["referenceLink"].(string),
|
||||
Priority: uint8(entry["proto"].(map[string]interface{})["priority"].(float64)),
|
||||
},
|
||||
Request: entry["request"].(map[string]interface{}),
|
||||
Response: entry["response"].(map[string]interface{}),
|
||||
EntryId: entry["entryId"].(string),
|
||||
Entry: entry["entry"].(string),
|
||||
Url: entry["url"].(string),
|
||||
|
@ -105,8 +105,8 @@ type MizuEntry struct {
|
||||
Id uint `json:"id"`
|
||||
Protocol Protocol `json:"proto"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Request interface{} `json:"request"`
|
||||
Response interface{} `json:"response"`
|
||||
Request map[string]interface{} `json:"request"`
|
||||
Response map[string]interface{} `json:"response"`
|
||||
Summary *BaseEntryDetails `json:"summary"`
|
||||
Entry string `json:"entry,omitempty"`
|
||||
EntryId string `json:"entryId" gorm:"column:entryId"`
|
||||
|
@ -268,6 +268,8 @@ func (d dissecting) Analyze(item *api.OutputChannelItem, entryId string, resolve
|
||||
entryBytes, _ := json.Marshal(item.Pair)
|
||||
return &api.MizuEntry{
|
||||
Protocol: protocol,
|
||||
Request: reqDetails,
|
||||
Response: item.Pair.Response.Payload.(map[string]interface{})["details"].(map[string]interface{}),
|
||||
EntryId: entryId,
|
||||
Entry: string(entryBytes),
|
||||
Url: fmt.Sprintf("%s%s", service, summary),
|
||||
|
@ -175,6 +175,8 @@ func (d dissecting) Analyze(item *api.OutputChannelItem, entryId string, resolve
|
||||
_protocol.Version = item.Protocol.Version
|
||||
return &api.MizuEntry{
|
||||
Protocol: _protocol,
|
||||
Request: reqDetails,
|
||||
Response: resDetails,
|
||||
EntryId: entryId,
|
||||
Entry: string(entryBytes),
|
||||
Url: fmt.Sprintf("%s%s", service, path),
|
||||
|
@ -143,6 +143,8 @@ func (d dissecting) Analyze(item *api.OutputChannelItem, entryId string, resolve
|
||||
entryBytes, _ := json.Marshal(item.Pair)
|
||||
return &api.MizuEntry{
|
||||
Protocol: _protocol,
|
||||
Request: reqDetails,
|
||||
Response: item.Pair.Response.Payload.(map[string]interface{})["details"].(map[string]interface{}),
|
||||
EntryId: entryId,
|
||||
Entry: string(entryBytes),
|
||||
Url: fmt.Sprintf("%s%s", service, summary),
|
||||
|
Loading…
Reference in New Issue
Block a user