Documentation ¶
Index ¶
- Constants
- func CreateRedisClient(conn string, username string, password string, db int) (*redis.Client, error)
- func RunTUI(redis_opts RedisOptions, model_opts ModelOptions)
- func StringArrOut(arr *[]string, width int) string
- type Details
- type Model
- type ModelOptions
- type Node
- type PrintItem
- type RT
- type RedisHash
- type RedisList
- type RedisOptions
- type RedisSet
- type RedisStream
- type RedisString
- type RedisType
- type RedisZSet
- type Search
- type TablePrintList
Constants ¶
View Source
const ( STRING = "string" LIST = "list" SET = "set" ZSET = "zset" HASH = "hash" STREAM = "stream" )
View Source
const MARGIN = 2
Variables ¶
This section is empty.
Functions ¶
func CreateRedisClient ¶ added in v0.2.0
func RunTUI ¶
func RunTUI(redis_opts RedisOptions, model_opts ModelOptions)
func StringArrOut ¶
Types ¶
type Model ¶
func InitialModel ¶ added in v0.2.0
func InitialModel( redis *redis.Client, model_opts ModelOptions, ) *Model
func (*Model) GetDetails ¶
set details depending on the type of the key
func (*Model) UpdateSize ¶
type ModelOptions ¶ added in v0.2.1
type Node ¶
func (*Node) AddChild ¶
func (n *Node) AddChild(key []string, full string, client *redis.Client, search_string string, tb *type_builder)
recursively add a child node to the tree
type PrintItem ¶
func GeneratePrintList ¶
convert the tree to a list of PrintItems
type RedisHash ¶
func GenerateHashType ¶
type RedisList ¶
func GenerateListType ¶
type RedisOptions ¶ added in v0.2.2
type RedisSet ¶
func GenerateSetType ¶
type RedisStream ¶
type RedisStream struct { RedisType RT Data []redis.XMessage }
func GenerateStreamType ¶
func GenerateStreamType(client *redis.Client, node *Node) *RedisStream
func (*RedisStream) Print ¶
func (rh *RedisStream) Print(table_width int) string
type RedisString ¶
func GenerateStringType ¶
func GenerateStringType(client *redis.Client, node *Node, pretty_print_json bool) *RedisString
func (*RedisString) Print ¶
func (rs *RedisString) Print(table_width int) string
type RedisZSet ¶
func GenerateZSetType ¶
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
func (*Search) ToggleActive ¶
type TablePrintList ¶
type TablePrintList struct { List []*PrintItem // contains filtered or unexported fields }
func NewTable ¶
func NewTable() *TablePrintList
func (*TablePrintList) GetCurrent ¶
func (pl *TablePrintList) GetCurrent() *Node
return a pointer to the current node
func (*TablePrintList) GetRows ¶
func (pl *TablePrintList) GetRows() []table.Row
return a list of rows to be displayed in the table
func (*TablePrintList) Init ¶
func (pl *TablePrintList) Init() tea.Cmd
func (*TablePrintList) ResetCursor ¶
func (pl *TablePrintList) ResetCursor() tea.Msg
func (*TablePrintList) View ¶
func (pl *TablePrintList) View() string
Click to show internal directories.
Click to hide internal directories.