2023-06-27 15:53:29 +08:00
|
|
|
package types
|
|
|
|
|
|
|
|
type ConnectionCategory int
|
|
|
|
|
2023-07-02 16:52:07 +08:00
|
|
|
type ConnectionConfig struct {
|
2023-10-08 01:31:54 +08:00
|
|
|
Name string `json:"name" yaml:"name"`
|
|
|
|
Group string `json:"group,omitempty" yaml:"-"`
|
2023-12-02 02:03:29 +08:00
|
|
|
LastDB int `json:"lastDB" yaml:"last_db"`
|
2023-10-08 01:31:54 +08:00
|
|
|
Addr string `json:"addr,omitempty" yaml:"addr,omitempty"`
|
|
|
|
Port int `json:"port,omitempty" yaml:"port,omitempty"`
|
|
|
|
Username string `json:"username,omitempty" yaml:"username,omitempty"`
|
|
|
|
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
|
|
|
DefaultFilter string `json:"defaultFilter,omitempty" yaml:"default_filter,omitempty"`
|
|
|
|
KeySeparator string `json:"keySeparator,omitempty" yaml:"key_separator,omitempty"`
|
|
|
|
ConnTimeout int `json:"connTimeout,omitempty" yaml:"conn_timeout,omitempty"`
|
|
|
|
ExecTimeout int `json:"execTimeout,omitempty" yaml:"exec_timeout,omitempty"`
|
|
|
|
DBFilterType string `json:"dbFilterType" yaml:"db_filter_type,omitempty"`
|
|
|
|
DBFilterList []int `json:"dbFilterList" yaml:"db_filter_list,omitempty"`
|
2023-10-22 18:31:10 +08:00
|
|
|
KeyView int `json:"keyView,omitempty" yaml:"key_view,omitempty"`
|
2023-10-20 18:22:53 +08:00
|
|
|
LoadSize int `json:"loadSize,omitempty" yaml:"load_size,omitempty"`
|
2023-10-08 01:31:54 +08:00
|
|
|
MarkColor string `json:"markColor,omitempty" yaml:"mark_color,omitempty"`
|
2023-10-15 02:27:23 +08:00
|
|
|
SSL ConnectionSSL `json:"ssl,omitempty" yaml:"ssl,omitempty"`
|
2023-10-08 01:31:54 +08:00
|
|
|
SSH ConnectionSSH `json:"ssh,omitempty" yaml:"ssh,omitempty"`
|
|
|
|
Sentinel ConnectionSentinel `json:"sentinel,omitempty" yaml:"sentinel,omitempty"`
|
2023-10-14 21:26:47 +08:00
|
|
|
Cluster ConnectionCluster `json:"cluster,omitempty" yaml:"cluster,omitempty"`
|
2023-06-27 15:53:29 +08:00
|
|
|
}
|
|
|
|
|
2023-07-02 16:52:07 +08:00
|
|
|
type Connection struct {
|
|
|
|
ConnectionConfig `json:",inline" yaml:",inline"`
|
|
|
|
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
|
|
|
Connections []Connection `json:"connections,omitempty" yaml:"connections,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Connections []Connection
|
|
|
|
|
2023-06-27 15:53:29 +08:00
|
|
|
type ConnectionDB struct {
|
|
|
|
Name string `json:"name"`
|
2023-10-08 18:25:52 +08:00
|
|
|
Index int `json:"index"`
|
2023-06-27 15:53:29 +08:00
|
|
|
Keys int `json:"keys"`
|
|
|
|
Expires int `json:"expires,omitempty"`
|
|
|
|
AvgTTL int `json:"avgTtl,omitempty"`
|
|
|
|
}
|
2023-09-28 01:41:18 +08:00
|
|
|
|
2023-10-15 02:27:23 +08:00
|
|
|
type ConnectionSSL struct {
|
|
|
|
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
|
|
|
|
KeyFile string `json:"keyFile,omitempty" yaml:"keyFile,omitempty"`
|
|
|
|
CertFile string `json:"certFile,omitempty" yaml:"certFile,omitempty"`
|
|
|
|
CAFile string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
|
|
|
|
}
|
|
|
|
|
2023-09-28 01:41:18 +08:00
|
|
|
type ConnectionSSH struct {
|
2023-10-14 21:26:47 +08:00
|
|
|
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
|
2023-09-28 01:41:18 +08:00
|
|
|
Addr string `json:"addr,omitempty" yaml:"addr,omitempty"`
|
|
|
|
Port int `json:"port,omitempty" yaml:"port,omitempty"`
|
2023-10-14 21:26:47 +08:00
|
|
|
LoginType string `json:"loginType,omitempty" yaml:"login_type"`
|
|
|
|
Username string `json:"username,omitempty" yaml:"username,omitempty"`
|
2023-09-28 01:41:18 +08:00
|
|
|
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
|
|
|
PKFile string `json:"pkFile,omitempty" yaml:"pk_file,omitempty"`
|
|
|
|
Passphrase string `json:"passphrase,omitempty" yaml:"passphrase,omitempty"`
|
|
|
|
}
|
2023-10-08 01:31:54 +08:00
|
|
|
|
|
|
|
type ConnectionSentinel struct {
|
2023-10-14 21:26:47 +08:00
|
|
|
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
|
|
|
|
Master string `json:"master,omitempty" yaml:"master,omitempty"`
|
2023-10-08 01:31:54 +08:00
|
|
|
Username string `json:"username,omitempty" yaml:"username,omitempty"`
|
|
|
|
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
|
|
|
}
|
2023-10-14 21:26:47 +08:00
|
|
|
|
|
|
|
type ConnectionCluster struct {
|
|
|
|
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
|
|
|
|
}
|