Documentation ¶
Index ¶
- Constants
- type ConfigConnector
- type ConfigFile
- func (c *ConfigFile) GetContent() string
- func (c *ConfigFile) GetDataKey() string
- func (c *ConfigFile) GetEncryptAlgo() string
- func (c *ConfigFile) GetEncrypted() bool
- func (c *ConfigFile) GetFileGroup() string
- func (c *ConfigFile) GetFileName() string
- func (c *ConfigFile) GetMd5() string
- func (c *ConfigFile) GetNamespace() string
- func (c *ConfigFile) GetPublicKey() string
- func (c *ConfigFile) GetSourceContent() string
- func (c *ConfigFile) GetVersion() uint64
- func (c *ConfigFile) SetContent(v string)
- func (c *ConfigFile) String() string
- type ConfigFileResponse
- type ConfigFileTag
- type ConfigGroup
- type ConfigGroupResponse
- type Proxy
- func (p *Proxy) CreateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
- func (p *Proxy) GetConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
- func (p *Proxy) PublishConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
- func (p *Proxy) SetRealPlugin(pg plugin.Plugin, engine model.Engine)
- func (p *Proxy) UpdateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
- func (p *Proxy) WatchConfigFiles(configFileList []*ConfigFile) (*ConfigFileResponse, error)
Constants ¶
View Source
const ( // ConfigFileTagKeyUseEncrypted 配置加密开关标识,value 为 boolean ConfigFileTagKeyUseEncrypted = "internal-encrypted" // ConfigFileTagKeyDataKey 加密密钥 tag key ConfigFileTagKeyDataKey = "internal-datakey" // ConfigFileTagKeyEncryptAlgo 加密算法 tag key ConfigFileTagKeyEncryptAlgo = "internal-encryptalgo" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigConnector ¶
type ConfigConnector interface { plugin.Plugin // GetConfigFile Get config file GetConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error) // WatchConfigFiles Watch config files WatchConfigFiles(configFileList []*ConfigFile) (*ConfigFileResponse, error) // CreateConfigFile Create config file CreateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error) // UpdateConfigFile Update config file UpdateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error) // PublishConfigFile Publish config file PublishConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error) // GetConfigGroup query config_group release file list GetConfigGroup(req *ConfigGroup) (*ConfigGroupResponse, error) }
ConfigConnector interface of config connector plugin
type ConfigFile ¶
type ConfigFile struct { Namespace string FileGroup string FileName string SourceContent string Version uint64 Md5 string Encrypted bool PublicKey string Tags []*ConfigFileTag // 该配置文件是否为不存在的场景下的占位信息 NotExist bool // contains filtered or unexported fields }
ConfigFile 配置文件
func (*ConfigFile) GetDataKey ¶ added in v1.5.0
func (c *ConfigFile) GetDataKey() string
GetDataKey 获取配置文件数据加密密钥
func (*ConfigFile) GetEncryptAlgo ¶ added in v1.5.0
func (c *ConfigFile) GetEncryptAlgo() string
GetEncryptAlgo 获取配置文件数据加密算法
func (*ConfigFile) GetEncrypted ¶ added in v1.5.0
func (c *ConfigFile) GetEncrypted() bool
GetEncrypted 获取配置文件是否为加密文件
func (*ConfigFile) GetNamespace ¶
func (c *ConfigFile) GetNamespace() string
GetNamespace 获取配置文件命名空间
func (*ConfigFile) GetPublicKey ¶ added in v1.5.0
func (c *ConfigFile) GetPublicKey() string
GetPublicKey 获取配置文件公钥
func (*ConfigFile) GetSourceContent ¶ added in v1.5.4
func (c *ConfigFile) GetSourceContent() string
GetSourceContent 获取配置文件内容
func (*ConfigFile) SetContent ¶ added in v1.5.4
func (c *ConfigFile) SetContent(v string)
func (*ConfigFile) String ¶ added in v1.5.4
func (c *ConfigFile) String() string
type ConfigFileResponse ¶
type ConfigFileResponse struct { Code uint32 Message string ConfigFile *ConfigFile }
ConfigFileResponse 配置文件响应体
func (*ConfigFileResponse) GetCode ¶
func (c *ConfigFileResponse) GetCode() uint32
GetCode 获取配置文件响应体code
func (*ConfigFileResponse) GetConfigFile ¶
func (c *ConfigFileResponse) GetConfigFile() *ConfigFile
GetConfigFile 获取配置文件响应体内容
func (*ConfigFileResponse) GetMessage ¶
func (c *ConfigFileResponse) GetMessage() string
GetMessage 获取配置文件响应体信息
type ConfigFileTag ¶ added in v1.5.0
type ConfigGroup ¶ added in v1.5.6
type ConfigGroup struct { Namespace string Group string Revision string ReleaseFiles []*model.SimpleConfigFile }
func (*ConfigGroup) ToSpecQuery ¶ added in v1.5.6
func (c *ConfigGroup) ToSpecQuery() *config_manage.ConfigFileGroupRequest
type ConfigGroupResponse ¶ added in v1.5.6
type ConfigGroupResponse struct { Code uint32 Namespace string Group string Revision string ReleaseFiles []*model.SimpleConfigFile }
func (*ConfigGroupResponse) ParseFromSpec ¶ added in v1.5.6
func (r *ConfigGroupResponse) ParseFromSpec(resp *config_manage.ConfigClientListResponse) error
type Proxy ¶
type Proxy struct { ConfigConnector // contains filtered or unexported fields }
Proxy is a config connector proxy
func (*Proxy) CreateConfigFile ¶ added in v1.5.5
func (p *Proxy) CreateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
CreateConfigFile Create config file
func (*Proxy) GetConfigFile ¶
func (p *Proxy) GetConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
GetConfigFile Get config file
func (*Proxy) PublishConfigFile ¶ added in v1.5.5
func (p *Proxy) PublishConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
PublishConfigFile Publish config file
func (*Proxy) SetRealPlugin ¶
SetRealPlugin set real plugin
func (*Proxy) UpdateConfigFile ¶ added in v1.5.5
func (p *Proxy) UpdateConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
UpdateConfigFile Update config file
func (*Proxy) WatchConfigFiles ¶
func (p *Proxy) WatchConfigFiles(configFileList []*ConfigFile) (*ConfigFileResponse, error)
WatchConfigFiles Watch config files
Click to show internal directories.
Click to hide internal directories.