Documentation ¶
Overview ¶
Package configs Package @author <chengjiang@buffalo-robot.com> @date 2023-06-27 @note
Index ¶
- Constants
- func RegisterGetConfiguration(url string, serviceConfig interface{}, registerParam *RegisterParam) error
- func RegisterGetConfigurationV2(url string, serviceConfig interface{}, registerParam *RegisterParam) error
- type AppConfig
- type ConfigType
- type EnvironmentType
- type FormatAppConfig
- type JsonData
- type NameSpace
- type RegisterParam
Constants ¶
View Source
const ( CONFIG_TYPE_Public = "Public" CONFIG_TYPE_Private = "Private" )
View Source
const ( ENV_TYPE_BETA = "Beta" ENV_TYPE_DEV = "Dev" ENV_TYPE_PRD = "Prd" )
Variables ¶
This section is empty.
Functions ¶
func RegisterGetConfiguration ¶
func RegisterGetConfiguration(url string, serviceConfig interface{}, registerParam *RegisterParam) error
RegisterGetConfiguration 注册请求,获取,更新相应的配置 注册配置,如果,没有,则注册,如果有,则返回配置中心的配置。
func RegisterGetConfigurationV2 ¶ added in v1.0.55
func RegisterGetConfigurationV2(url string, serviceConfig interface{}, registerParam *RegisterParam) error
url 为RPC
Types ¶
type AppConfig ¶
type AppConfig struct { Environment EnvironmentType `json:"environment"` // 环境,beta, dev, prd. AppId string `json:"appId"` ConfigType ConfigType `json:"configType"` AppName string `json:"appName"` Schema JsonData `json:"schema"` // 前端ui渲染, json格式 FormData JsonData `json:"formData"` // 前端ui渲染, json. }
type ConfigType ¶
type ConfigType string
type EnvironmentType ¶
type EnvironmentType string
type FormatAppConfig ¶
type FormatAppConfig struct { Environment EnvironmentType `json:"environment"` // 环境,beta, dev, prd. AppId string `json:"appId"` ConfigType ConfigType `json:"configType"` AppName string `json:"appName"` Schema map[string]interface{} `json:"schema"` // 前端ui渲染, json格式 FormData map[string]interface{} `json:"formData"` // 前端ui渲染, json. }
FormatAppConfig 方便转存为文件
type RegisterParam ¶
type RegisterParam struct { NameSpace string `json:"nameSpace"` // 公共配置id获取。注册配置的时候携带,如果没有则不管公共配置。 AppId string `json:"appId"` AppName string `json:"appName"` SchemaPath string `json:"schemaPath"` // 前端ui渲染, byte格式。 SchemaBytes []byte `json:"schemaBytes"` // 前端ui渲染, byte格式。 IsIgnorePublic bool `json:"isIgnorePublic"` // 是否忽略公共配置 }
Click to show internal directories.
Click to hide internal directories.