command

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkDelete

func BulkDelete(ctx context.Context, client *redis.Client, keys []string) tea.Cmd

func CopyValueToClipboard

func CopyValueToClipboard(ctx context.Context, value string) tea.Cmd

func DeleteKey

func DeleteKey(ctx context.Context, client *redis.Client, key string) tea.Cmd

func DisplayEmptyValue

func DisplayEmptyValue() tea.Msg

func GetKeys

func GetKeys(ctx context.Context, redis *redis.Client, pattern string) tea.Cmd

GetKeys fetches keys from Redis matching the given pattern.

func GetValue

func GetValue(ctx context.Context, redis *redis.Client, key string) tea.Cmd

func NewErrorInfoCmd added in v0.1.5

func NewErrorInfoCmd(id infoid.InfoID, err error, expiresIn time.Duration) tea.Cmd

NewErrorInfoCmd is a helper function to create a error info command.

func NewErrorMsg

func NewErrorMsg(id infoid.InfoID, err error, expiresIn time.Duration) tea.Msg

func NewInfoInfoCmd added in v0.1.5

func NewInfoInfoCmd(id infoid.InfoID, text string, expiresIn time.Duration) tea.Cmd

NewWarningInfoCmd is a helper function to create a info command.

func NewInfoMsg

func NewInfoMsg(id infoid.InfoID, text string, expiresIn time.Duration) tea.Msg

NewInfoMsg creates a command that sends an InfoMsg with the given InfoType.

func NewWarningMsg

func NewWarningMsg(id infoid.InfoID, text string, expiresIn time.Duration) tea.Msg

func SwitchTab

func SwitchTab(ctx context.Context, client *redis.Client, tab int) tea.Cmd

func UpdateSelectedItemCmd

func UpdateSelectedItemCmd(newKey string) tea.Msg

func UpdateValue

func UpdateValue(ctx context.Context, client *redis.Client, key string, newValue string) tea.Cmd

Types

type CopySuccessMsg

type CopySuccessMsg struct{}

type HighlightedKeyUpdatedMsg

type HighlightedKeyUpdatedMsg struct {
	Key string
}

func (HighlightedKeyUpdatedMsg) String added in v0.1.5

func (h HighlightedKeyUpdatedMsg) String() string

type InfoExpiredMsg

type InfoExpiredMsg struct {
	Id infoid.InfoID // Unique identifier for the message that has expired
}

func (InfoExpiredMsg) String added in v0.1.5

func (i InfoExpiredMsg) String() string

type InfoMsg

type InfoMsg struct {
	InfoType InfoType // Type of the informational message
}

func (InfoMsg) String added in v0.1.5

func (m InfoMsg) String() string

type InfoType

type InfoType interface {
	Type() string
}

type InfoTypeError

type InfoTypeError struct {
	InfoId    infoid.InfoID // Unique identifier for the message
	Err       error         // Error
	ExpiresIn time.Duration // Duration after which the message expires
}

Error info type

func (InfoTypeError) Expires

func (i InfoTypeError) Expires() time.Duration

func (InfoTypeError) Type

func (i InfoTypeError) Type() string

type InfoTypeInfo

type InfoTypeInfo struct {
	InfoId    infoid.InfoID // Unique identifier for the message
	Text      string        // The informational message text
	ExpiresIn time.Duration // Duration after which the message expires
}

Info info type

func (InfoTypeInfo) Expires

func (i InfoTypeInfo) Expires() time.Duration

func (InfoTypeInfo) Type

func (i InfoTypeInfo) Type() string

type InfoTypeNone

type InfoTypeNone struct{}

None info type

func (InfoTypeNone) Type

func (i InfoTypeNone) Type() string

type InfoTypeWarning

type InfoTypeWarning struct {
	InfoId    infoid.InfoID // Unique identifier for the message
	Text      string        // The warning message text
	ExpiresIn time.Duration // Duration after which the message expires
}

Warning info type

func (InfoTypeWarning) Expires

func (i InfoTypeWarning) Expires() time.Duration

func (InfoTypeWarning) Type

func (i InfoTypeWarning) Type() string

type KeyDeletedMsg

type KeyDeletedMsg struct {
	Key string
	// contains filtered or unexported fields
}

func (KeyDeletedMsg) String added in v0.1.5

func (k KeyDeletedMsg) String() string

type KeysUpdatedMsg

type KeysUpdatedMsg struct {
	Keys []string
}

func (KeysUpdatedMsg) String added in v0.1.5

func (KeysUpdatedMsg) String() string

type MsgWithKind

type MsgWithKind interface {
	String() string
}

type NewRedisClientMsg

type NewRedisClientMsg struct {
	Redis *redis.Client
}

func (NewRedisClientMsg) String added in v0.1.5

func (n NewRedisClientMsg) String() string

type TickMsg added in v0.1.5

type TickMsg struct {
	Time time.Time
}

func (TickMsg) String added in v0.1.5

func (t TickMsg) String() string

type ValueUpdatedMsg

type ValueUpdatedMsg struct {
	NewValue string // The new value for the key
	TTL      int64  // Time to live for the key, if applicable
}

func (ValueUpdatedMsg) String added in v0.1.5

func (v ValueUpdatedMsg) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL