mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-21 10:06:58 +00:00
Bring back GetEntries
HTTP endpoint (#515)
* Bring back `GetEntries` HTTP endpoint * Upgrade Basenine version from `0.2.12` to `0.2.13` * Accept negative `leftOff` value * Remove `max`es from the validations * Make `timeoutMs` optional * Update the route comment * Add `EntriesResponse` struct
This commit is contained in:
@@ -16,6 +16,19 @@ func GetEntry(r *tapApi.MizuEntry, v tapApi.DataUnmarshaler) error {
|
||||
return v.UnmarshalData(r)
|
||||
}
|
||||
|
||||
type EntriesRequest struct {
|
||||
LeftOff int `form:"leftOff" validate:"required,min=-1"`
|
||||
Direction int `form:"direction" validate:"required,oneof='1' '-1'"`
|
||||
Query string `form:"query"`
|
||||
Limit int `form:"limit" validate:"required,min=1"`
|
||||
TimeoutMs int `form:"timeoutMs" validate:"min=1"`
|
||||
}
|
||||
|
||||
type EntriesResponse struct {
|
||||
Data []interface{} `json:"data"`
|
||||
Meta *basenine.Metadata `json:"meta"`
|
||||
}
|
||||
|
||||
type WebSocketEntryMessage struct {
|
||||
*shared.WebSocketMessageMetadata
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
|
Reference in New Issue
Block a user