Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePluginConfig(req *PluginReqDto, ...) (string, int64, error)
- func UpdatePluginConfigWhenDeleteConsumer(pluginName, consumerName string, config interface{}) ([]*mseclient.GetPluginConfigResponseBodyDataGatewayConfigList, error)
- func UpdatePluginConfigWhenDeleteCredential(pluginName string, credential providerDto.CredentialDto, config interface{}) ([]*mseclient.GetPluginConfigResponseBodyDataGatewayConfigList, error)
- type ErdaCSRFConfig
- type ErdaIPConfig
- type ErdaSBACConfig
- type KeySecretConsumer
- type ParaSignConfig
Constants ¶
View Source
const ( MseDefaultRouteName = "route-erda-default" MseDefaultConsumerName = "consumer-erda-default" MseDefaultConsumerCredential = "2bda943c-ba2b-11ec-ba07-00163e1250b5" MseDefaultConsumerKey = "2bda943c-ba2b-11ec-ba07-00163e1250b5" MseDefaultConsumerSecret = "2bda943c-ba2b-11ec-ba07-00163e1250b5" MseDefaultKeyAuthConfig = "" /* 543-byte string literal not displayed */ MseDefaultHmacAuthConfig = "" /* 424-byte string literal not displayed */ MseDefaultParaSignAuthConfig = "" /* 352-byte string literal not displayed */ MseDefaultErdaIPConfig = "" /* 319-byte string literal not displayed */ MseDefaultErdaSBACConfig = "" /* 420-byte string literal not displayed */ MseDefaultErdaCSRFConfig = "" /* 626-byte string literal not displayed */ MsePluginRequestBodySizeLimit = 33554432 MsePluginRequestDateOffset = 300 )
View Source
const ( // Plugin Config Level MsePluginConfigLevelGlobal string = "global" MsePluginConfigLevelDomain string = "domain" MsePluginConfigLevelRoute string = "route" MsePluginConfigLevelGlobalNumber int32 = 0 MsePluginConfigLevelDomainNumber int32 = 1 MsePluginConfigLevelRouteNumber int32 = 2 )
View Source
const (
RequestBodySizeLimit int = 32 * 1024 * 1024 //32MB
)
Variables ¶
View Source
var MSE_ERDA_IP_DEFALUT_ACL_LIST = []string{"10.10.10.10", "11.12.13.0/24"}
View Source
var MSE_ERDA_SBAC_DEFALUT_ACL_LIST = []string{"10.10.10.10", "11.12.13.0/24"}
Functions ¶
func CreatePluginConfig ¶
func UpdatePluginConfigWhenDeleteConsumer ¶
func UpdatePluginConfigWhenDeleteConsumer(pluginName, consumerName string, config interface{}) ([]*mseclient.GetPluginConfigResponseBodyDataGatewayConfigList, error)
func UpdatePluginConfigWhenDeleteCredential ¶
func UpdatePluginConfigWhenDeleteCredential(pluginName string, credential providerDto.CredentialDto, config interface{}) ([]*mseclient.GetPluginConfigResponseBodyDataGatewayConfigList, error)
Types ¶
type ErdaCSRFConfig ¶
type ErdaCSRFConfig struct { MatchRoute string `json:"_match_route_,omitempty" yaml:"_match_route_,omitempty"` UserCookie string `json:"userCookie" yaml:"userCookie"` // 鉴别 Cookie ExcludedMethod []string `json:"excludedMethod" yaml:"excludedMethod"` //关闭校验的 HTTP Methods 列表 TokenName string `json:"tokenName" yaml:"tokenName"` // token 名称 TokenDomain string `json:"tokenDomain" yaml:"tokenDomain"` // token 域名 CookieSecure bool `json:"cookieSecure" yaml:"cookieSecure"` // secure 开关 ValidTTL int64 `json:"validTTL" yaml:"validTTL"` // token 过期时间(单位s) RefreshTTL int64 `json:"refreshTTL" yaml:"refreshTTL"` // token 更新周期(单位s) ErrStatus int64 `json:"errStatus" yaml:"errStatus"` // 失败状态码 ErrMsg string `json:"errMsg" yaml:"errMsg"` // 失败应答 JWTSecret string `json:"jwtSecret" yaml:"jwtSecret"` // 用于加密的 Secret Disable bool }
type ErdaIPConfig ¶
type ErdaIPConfig struct { MatchRoute string `json:"_match_route_,omitempty" yaml:"_match_route_,omitempty"` IPSource string `json:"ip_source,omitempty" yaml:"ip_source,omitempty"` IpAclType string `json:"ip_acl_type,omitempty" yaml:"ip_acl_type,omitempty"` // 白名单对应一定要设置,黑名单可以不设置 IpAclList []string `json:"ip_acl_list,omitempty" yaml:"ip_acl_list,omitempty"` Disable bool }
type ErdaSBACConfig ¶
type ErdaSBACConfig struct { MatchRoute string `json:"_match_route_,omitempty" yaml:"_match_route_,omitempty"` AccessControlAPI string `json:"access_control_api,omitempty" yaml:"access_control_api,omitempty"` HttpMethods []string `json:"http_methods,omitempty" yaml:"http_methods,omitempty"` MatchPatterns []string `json:"match_patterns,omitempty" yaml:"match_patterns,omitempty"` WithHeaders []string `json:"with_headers,omitempty" yaml:"with_headers,omitempty"` WithCookie bool `json:"with_cookie" yaml:"with_cookie"` Disable bool }
type KeySecretConsumer ¶
type ParaSignConfig ¶
type ParaSignConfig struct { MatchRoute string `json:"_match_route_,omitempty" yaml:"_match_route_,omitempty"` Consumers []mseDto.Consumers `json:"consumers,omitempty" yaml:"consumers,omitempty"` RequestBodySizeLimit int `json:"request_body_size_limit,omitempty" yaml:"request_body_size_limit,omitempty"` DateOffset int `json:"date_offset,omitempty" yaml:"date_offset,omitempty"` }
Click to show internal directories.
Click to hide internal directories.