Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerListToMap ¶
ToMap convert to map with privateIp
Types ¶
type Config ¶
type Config struct { Profiles []db.CreateProfileRequest `mapstructure:"profiles"` // 云账号配置,用来自动同步云服务器信息 Proxys []db.CreateProxyRequest `mapstructure:"proxies"` // ssh代理 Keys Keys `mapstructure:"keys"` // ssh key pair 不启用数据库时使用 WithVideo WithVideo `mapstructure:"withVideo"` // 视频存储 WithLdap WithLdap `mapstructure:"withLdap"` // 配置ldap WithSSHCheck WithSSHCheck `mapstructure:"withSSHCheck"` // 配置服务器SSH可连接性告警 WithDB WithPolicy `mapstructure:"withDB"` // 需要进行权限管理则启用该配置,启用后会使用数据库进行权限管理 WithDingtalk WithDingtalk `mapstructure:"withDingtalk"` // 配置钉钉审批流程 }
Config config
var Conf *Config
type Keys ¶
type Keys []db.AddKeyRequest
func (Keys) ToMap ¶
func (k Keys) ToMap() map[string]db.AddKeyRequest
ToMap convert to map with keyID
func (Keys) ToMapWithName ¶
func (k Keys) ToMapWithName() map[string]db.AddKeyRequest
type PGConfig ¶
type SSHAlert ¶
type SSHAlert struct {
RobotToken string `mapstructure:"robotToken"`
}
目前只支持钉钉机器人群告警
type SSHUser ¶
type SSHUser struct { SSHUsername string KeyName string // pem file name, 这里是支持本地读取内容的 Base64Pem string // base64 pem Password string }
SSHUser ssh user
type Server ¶
type Server struct { ID string Name string Host string // 默认取私有 IP 第一个 Port int KeyPairs []*string // key pair name // Proxy *db.CreateProxyRequest Profile string Region string Tags model.Tags Status model.InstanceStatus SSHUsers []SSHUser }
Server server
type WithDingtalk ¶
type WithLdap ¶
type WithLdap struct { Enable bool `mapstructure:"enable"` BindUser string `mapstructure:"bindUser"` BindPassword string `mapstructure:"bindPassword"` Host string `mapstructure:"host"` Port int `mapstructure:"port"` BaseDN string `mapstructure:"baseDN"` UserSearchFilter string `mapstructure:"userSearchFilter"` Attributes []string `mapstructure:"attributes"` }
type WithPolicy ¶
type WithSSHCheck ¶
Click to show internal directories.
Click to hide internal directories.