mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-15 15:15:31 +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),
|
ReferenceLink: entry["proto"].(map[string]interface{})["referenceLink"].(string),
|
||||||
Priority: uint8(entry["proto"].(map[string]interface{})["priority"].(float64)),
|
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),
|
EntryId: entry["entryId"].(string),
|
||||||
Entry: entry["entry"].(string),
|
Entry: entry["entry"].(string),
|
||||||
Url: entry["url"].(string),
|
Url: entry["url"].(string),
|
||||||
|
@ -105,8 +105,8 @@ type MizuEntry struct {
|
|||||||
Id uint `json:"id"`
|
Id uint `json:"id"`
|
||||||
Protocol Protocol `json:"proto"`
|
Protocol Protocol `json:"proto"`
|
||||||
Timestamp int64 `json:"timestamp"`
|
Timestamp int64 `json:"timestamp"`
|
||||||
Request interface{} `json:"request"`
|
Request map[string]interface{} `json:"request"`
|
||||||
Response interface{} `json:"response"`
|
Response map[string]interface{} `json:"response"`
|
||||||
Summary *BaseEntryDetails `json:"summary"`
|
Summary *BaseEntryDetails `json:"summary"`
|
||||||
Entry string `json:"entry,omitempty"`
|
Entry string `json:"entry,omitempty"`
|
||||||
EntryId string `json:"entryId" gorm:"column:entryId"`
|
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)
|
entryBytes, _ := json.Marshal(item.Pair)
|
||||||
return &api.MizuEntry{
|
return &api.MizuEntry{
|
||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
|
Request: reqDetails,
|
||||||
|
Response: item.Pair.Response.Payload.(map[string]interface{})["details"].(map[string]interface{}),
|
||||||
EntryId: entryId,
|
EntryId: entryId,
|
||||||
Entry: string(entryBytes),
|
Entry: string(entryBytes),
|
||||||
Url: fmt.Sprintf("%s%s", service, summary),
|
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
|
_protocol.Version = item.Protocol.Version
|
||||||
return &api.MizuEntry{
|
return &api.MizuEntry{
|
||||||
Protocol: _protocol,
|
Protocol: _protocol,
|
||||||
|
Request: reqDetails,
|
||||||
|
Response: resDetails,
|
||||||
EntryId: entryId,
|
EntryId: entryId,
|
||||||
Entry: string(entryBytes),
|
Entry: string(entryBytes),
|
||||||
Url: fmt.Sprintf("%s%s", service, path),
|
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)
|
entryBytes, _ := json.Marshal(item.Pair)
|
||||||
return &api.MizuEntry{
|
return &api.MizuEntry{
|
||||||
Protocol: _protocol,
|
Protocol: _protocol,
|
||||||
|
Request: reqDetails,
|
||||||
|
Response: item.Pair.Response.Payload.(map[string]interface{})["details"].(map[string]interface{}),
|
||||||
EntryId: entryId,
|
EntryId: entryId,
|
||||||
Entry: string(entryBytes),
|
Entry: string(entryBytes),
|
||||||
Url: fmt.Sprintf("%s%s", service, summary),
|
Url: fmt.Sprintf("%s%s", service, summary),
|
||||||
|
Loading…
Reference in New Issue
Block a user