From c65ee73bd7c8bd569a503da2db234db4bcd58849 Mon Sep 17 00:00:00 2001 From: "binbin.zhang" Date: Thu, 1 Sep 2022 10:33:21 +0800 Subject: [PATCH] update configitem.id type (#512) --- clients/config_client/config_client.go | 1 - example/service/service_client_example.go | 2 +- model/config.go | 16 +++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/clients/config_client/config_client.go b/clients/config_client/config_client.go index 9ed9a95f..7488a2a8 100644 --- a/clients/config_client/config_client.go +++ b/clients/config_client/config_client.go @@ -185,7 +185,6 @@ func (client *ConfigClient) getConfigInner(param vo.ConfigParam) (content string param.Group = constant.DEFAULT_GROUP } - //todo 获取容灾配置的 EncryptedDataKey LocalEncryptedDataKeyProcessor.getEncryptDataKeyFailover clientConfig, _ := client.GetClientConfig() cacheKey := util.GetConfigCacheKey(param.DataId, param.Group, clientConfig.NamespaceId) content = cache.GetFailover(cacheKey, client.configCacheDir) diff --git a/example/service/service_client_example.go b/example/service/service_client_example.go index a72d6b15..b7d314b7 100644 --- a/example/service/service_client_example.go +++ b/example/service/service_client_example.go @@ -27,7 +27,7 @@ import ( func ExampleServiceClient_RegisterServiceInstance(client naming_client.INamingClient, param vo.RegisterInstanceParam) { success, err := client.RegisterInstance(param) if !success || err != nil { - panic("RegisterServiceInstance failed!") + panic("RegisterServiceInstance failed!" + err.Error()) } fmt.Printf("RegisterServiceInstance,param:%+v,result:%+v \n\n", param, success) } diff --git a/model/config.go b/model/config.go index f4668827..78477ae9 100644 --- a/model/config.go +++ b/model/config.go @@ -16,14 +16,16 @@ package model +import "encoding/json" + type ConfigItem struct { - Id string `param:"id"` - DataId string `param:"dataId"` - Group string `param:"group"` - Content string `param:"content"` - Md5 string `param:"md5"` - Tenant string `param:"tenant"` - Appname string `param:"appname"` + Id json.Number `param:"id"` + DataId string `param:"dataId"` + Group string `param:"group"` + Content string `param:"content"` + Md5 string `param:"md5"` + Tenant string `param:"tenant"` + Appname string `param:"appname"` } type ConfigPage struct { TotalCount int `param:"totalCount"`