perf: sorted set value support format viewing #65

This commit is contained in:
Lykin
2023-11-15 23:41:53 +08:00
parent 2a3a15d64d
commit fea87662de
13 changed files with 382 additions and 264 deletions

View File

@@ -79,3 +79,14 @@ type SetSetParam struct {
Format string `json:"format,omitempty"`
Decode string `json:"decode,omitempty"`
}
type SetZSetParam struct {
Server string `json:"server"`
DB int `json:"db"`
Key any `json:"key"`
Value any `json:"value"`
NewValue any `json:"newValue"`
Score float64 `json:"score"`
Format string `json:"format,omitempty"`
Decode string `json:"decode,omitempty"`
}

View File

@@ -16,12 +16,13 @@ type SetEntryItem struct {
DisplayValue string `json:"dv,omitempty"`
}
type ZSetItem struct {
Value string `json:"value"`
Score float64 `json:"score"`
type ZSetEntryItem struct {
Score float64 `json:"s"`
Value string `json:"v"`
DisplayValue string `json:"dv,omitempty"`
}
type StreamItem struct {
type StreamEntryItem struct {
ID string `json:"id"`
Value map[string]any `json:"value"`
}