Documentation ¶
Index ¶
- Variables
- func AppDataPath() string
- func LoadConnections() error
- func LoadLuas(luas *[]Lua) error
- func RecordsToStruct[T any](records [][]byte, vs *[]T) error
- type Command
- type Config
- type Connection
- func (c *Connection) Command(cmd Command) ([]interface{}, error)
- func (c *Connection) Delete() error
- func (c *Connection) Disconnection() error
- func (c *Connection) Edit() error
- func (c *Connection) New() error
- func (c *Connection) Open() error
- func (c *Connection) Scripting(lua *Lua) error
- func (c *Connection) Test() error
- type ConnectionEntry
- type Lua
- type SSHOptions
- type Storage
- func (o *Storage) Delete(collection string, key string) error
- func (o *Storage) Initialize(dir string) error
- func (o *Storage) Read(collection string, key string, value interface{}) error
- func (o *Storage) ReadAll(collection string, records *[][]byte) error
- func (o *Storage) Write(collection string, key string, value interface{}) error
- type Tls
Constants ¶
This section is empty.
Variables ¶
View Source
var APP_ROOT string
View Source
var Connections = make([]*Connection, 0)
View Source
var DefaultConfig = &Config{}
View Source
var GlobalStorage = &Storage{}
Functions ¶
func AppDataPath ¶
func AppDataPath() string
func LoadConnections ¶
func LoadConnections() error
func RecordsToStruct ¶
RecordsToStruct is convert recoreds to []T
Types ¶
type Command ¶
type Command struct { ID string `json:"id"` Commands [][]interface{} `json:"commands"` }
Command .
type Connection ¶
type Connection struct { ID string `json:"id"` Name string `json:"name"` Host string `json:"host"` Port int `json:"port"` Addrs []string `json:"addrs"` Username string `json:"username"` Auth string `json:"auth"` KeysPattern string `json:"keysPattern"` NamespaceSeparator string `json:"namespaceSeparator"` TimeoutConnect int64 `json:"timeoutConnect"` TimeoutExecute int64 `json:"timeoutExecute"` DbScanLimit int32 `json:"dbScanLimit"` DataScanLimit int32 `json:"dataScanLimit"` Tls Tls `json:"tls"` SSHOptions SSHOptions `json:"ssh"` IsCluster bool `json:"isCluster"` IsSentinel bool `json:"isSentinel"` SentinelPassword string `json:"sentinelPassword"` MasterName string `json:"masterName"` RouteByLatency bool `json:"routeByLatency"` RouteRandomly bool `json:"routeRandomly"` // contains filtered or unexported fields }
Connection .
func GetConnection ¶
func GetConnection(id string) (*Connection, error)
func (*Connection) Command ¶
func (c *Connection) Command(cmd Command) ([]interface{}, error)
Command
type ConnectionEntry ¶
ConnectionEntry .
type Lua ¶
type Lua struct { ConnectionID string `json:"connectionID"` ID string `json:"id"` Name string `json:"name"` Keys []string `json:"keys"` Args []interface{} `json:"args"` Script string `json:"script"` LastExecutionAt int64 `json:"lastExecutionAt"` Elapsed string `json:"elapsed"` Result interface{} `json:"result"` }
type SSHOptions ¶
Click to show internal directories.
Click to hide internal directories.