Documentation ¶
Index ¶
- func NewMseAdapter(az string) (gateway_providers.GatewayAdapter, error)
- type MseAdapterImpl
- func (impl *MseAdapterImpl) AddPlugin(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) AddUpstreamTarget(upstreamId string, req *TargetDto) (*TargetDto, error)
- func (impl *MseAdapterImpl) CheckPluginEnabled(pluginName string) (bool, error)
- func (impl *MseAdapterImpl) CreateAclGroup(consumerId, customId string) error
- func (impl *MseAdapterImpl) CreateConsumer(req *ConsumerReqDto) (*ConsumerRespDto, error)
- func (impl *MseAdapterImpl) CreateCredential(req *CredentialReqDto) (*CredentialDto, error)
- func (impl *MseAdapterImpl) CreateMSEClientByAPI() (client *mseclient.Client, err error)
- func (impl *MseAdapterImpl) CreateOrUpdatePlugin(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) CreateOrUpdatePluginById(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) CreateOrUpdateRoute(req *RouteReqDto) (*RouteRespDto, error)
- func (impl *MseAdapterImpl) CreateOrUpdateService(req *ServiceReqDto) (*ServiceRespDto, error)
- func (impl *MseAdapterImpl) CreateUpstream(req *UpstreamDto) (*UpstreamDto, error)
- func (impl *MseAdapterImpl) DeleteConsumer(id string) error
- func (impl *MseAdapterImpl) DeleteCredential(consumerId, pluginName, credentialStr string) error
- func (impl *MseAdapterImpl) DeletePluginIfExist(req *PluginReqDto) error
- func (impl *MseAdapterImpl) DeleteRoute(routeId string) error
- func (impl *MseAdapterImpl) DeleteService(serviceId string) error
- func (impl *MseAdapterImpl) DeleteUpstreamTarget(upstreamId, targetId string) error
- func (impl *MseAdapterImpl) GatewayProviderExist() bool
- func (impl *MseAdapterImpl) GetCredentialList(consumerId, pluginName string) (*CredentialListDto, error)
- func (impl *MseAdapterImpl) GetMSEGatewayByAPI() (*mseclient.GetGatewayResponseBodyData, error)
- func (impl *MseAdapterImpl) GetMSEGatewayRouteNameByZoneName(zoneName string, domainName *string) (string, error)
- func (impl *MseAdapterImpl) GetMSEPluginConfigByIDByAPI(pluginId *int64) (*mseclient.GetPluginConfigResponseBodyData, error)
- func (impl *MseAdapterImpl) GetMSEPluginsByAPI(name *string, category *int32, enableOnly *bool) ([]*mseclient.GetPluginsResponseBodyData, error)
- func (impl *MseAdapterImpl) GetPlugin(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) GetRoutes() ([]RouteRespDto, error)
- func (impl *MseAdapterImpl) GetRoutesWithTag(tag string) ([]RouteRespDto, error)
- func (impl *MseAdapterImpl) GetUpstreamStatus(upstreamId string) (*UpstreamStatusRespDto, error)
- func (impl *MseAdapterImpl) GetVersion() (string, error)
- func (impl *MseAdapterImpl) ListMSEGatewayRoutesByAPI(domainName *string, pageNumber *int32, pageSize *int32) (*mseclient.ListGatewayRouteResponseBody, error)
- func (impl *MseAdapterImpl) PutPlugin(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) RemovePlugin(id string) error
- func (impl *MseAdapterImpl) TouchRouteOAuthMethod(id string) error
- func (impl *MseAdapterImpl) UpdateMSEPluginConfigByIDByAPI(pluginID *int64, configID *int64, config *string, configLevel *int32, ...) (*mseclient.UpdatePluginConfigResponseBody, error)
- func (impl *MseAdapterImpl) UpdatePlugin(req *PluginReqDto) (*PluginRespDto, error)
- func (impl *MseAdapterImpl) UpdateRoute(req *RouteReqDto) (*RouteRespDto, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMseAdapter ¶
func NewMseAdapter(az string) (gateway_providers.GatewayAdapter, error)
Types ¶
type MseAdapterImpl ¶
type MseAdapterImpl struct { Bdl *bundle.Bundle ProviderName string // Aliyun AccessKey ID AccessKeyID string // Aliyun AccessKey Secret AccessKeySecret string // Aliyun Mse Gateway unique ID ("gw-eeab5d74e29d435f87bcxxxxxxxxxxxxx") GatewayUniqueID string // Aliyun Mse Gateway EndPoint ("mse.cn-hangzhou.aliyuncs.com") GatewayEndpoint string // 用于映射不同集群的插件列表 ClusterName string }
func (*MseAdapterImpl) AddPlugin ¶
func (impl *MseAdapterImpl) AddPlugin(req *PluginReqDto) (*PluginRespDto, error)
func (*MseAdapterImpl) AddUpstreamTarget ¶
func (impl *MseAdapterImpl) AddUpstreamTarget(upstreamId string, req *TargetDto) (*TargetDto, error)
func (*MseAdapterImpl) CheckPluginEnabled ¶
func (impl *MseAdapterImpl) CheckPluginEnabled(pluginName string) (bool, error)
func (*MseAdapterImpl) CreateAclGroup ¶
func (impl *MseAdapterImpl) CreateAclGroup(consumerId, customId string) error
func (*MseAdapterImpl) CreateConsumer ¶
func (impl *MseAdapterImpl) CreateConsumer(req *ConsumerReqDto) (*ConsumerRespDto, error)
func (*MseAdapterImpl) CreateCredential ¶
func (impl *MseAdapterImpl) CreateCredential(req *CredentialReqDto) (*CredentialDto, error)
func (*MseAdapterImpl) CreateMSEClientByAPI ¶
func (impl *MseAdapterImpl) CreateMSEClientByAPI() (client *mseclient.Client, err error)
CreateMSEClientByAPI 创建客户端
func (*MseAdapterImpl) CreateOrUpdatePlugin ¶
func (impl *MseAdapterImpl) CreateOrUpdatePlugin(req *PluginReqDto) (*PluginRespDto, error)
func (*MseAdapterImpl) CreateOrUpdatePluginById ¶
func (impl *MseAdapterImpl) CreateOrUpdatePluginById(req *PluginReqDto) (*PluginRespDto, error)
func (*MseAdapterImpl) CreateOrUpdateRoute ¶
func (impl *MseAdapterImpl) CreateOrUpdateRoute(req *RouteReqDto) (*RouteRespDto, error)
func (*MseAdapterImpl) CreateOrUpdateService ¶
func (impl *MseAdapterImpl) CreateOrUpdateService(req *ServiceReqDto) (*ServiceRespDto, error)
func (*MseAdapterImpl) CreateUpstream ¶
func (impl *MseAdapterImpl) CreateUpstream(req *UpstreamDto) (*UpstreamDto, error)
func (*MseAdapterImpl) DeleteConsumer ¶
func (impl *MseAdapterImpl) DeleteConsumer(id string) error
func (*MseAdapterImpl) DeleteCredential ¶
func (impl *MseAdapterImpl) DeleteCredential(consumerId, pluginName, credentialStr string) error
func (*MseAdapterImpl) DeletePluginIfExist ¶
func (impl *MseAdapterImpl) DeletePluginIfExist(req *PluginReqDto) error
func (*MseAdapterImpl) DeleteRoute ¶
func (impl *MseAdapterImpl) DeleteRoute(routeId string) error
func (*MseAdapterImpl) DeleteService ¶
func (impl *MseAdapterImpl) DeleteService(serviceId string) error
func (*MseAdapterImpl) DeleteUpstreamTarget ¶
func (impl *MseAdapterImpl) DeleteUpstreamTarget(upstreamId, targetId string) error
func (*MseAdapterImpl) GatewayProviderExist ¶
func (impl *MseAdapterImpl) GatewayProviderExist() bool
func (*MseAdapterImpl) GetCredentialList ¶
func (impl *MseAdapterImpl) GetCredentialList(consumerId, pluginName string) (*CredentialListDto, error)
func (*MseAdapterImpl) GetMSEGatewayByAPI ¶
func (impl *MseAdapterImpl) GetMSEGatewayByAPI() (*mseclient.GetGatewayResponseBodyData, error)
GetMSEGatewayByAPI 获取网关详情
func (*MseAdapterImpl) GetMSEGatewayRouteNameByZoneName ¶
func (impl *MseAdapterImpl) GetMSEGatewayRouteNameByZoneName(zoneName string, domainName *string) (string, error)
GetMSEGatewayRouteNameByZoneName 获取指定网关下的关联到 IngressName 的网关路由 不通过官方的 GetGatewayRouteDetail API 直接获取的原因是 RouteId 参数无法获取, ListGatewayRoute 返回的路由列表里,每个路由并不带 ID 信息,只有 Name
func (*MseAdapterImpl) GetMSEPluginConfigByIDByAPI ¶
func (impl *MseAdapterImpl) GetMSEPluginConfigByIDByAPI(pluginId *int64) (*mseclient.GetPluginConfigResponseBodyData, error)
GetMSEPluginConfigByIDByAPI 获取网关指定 ID 的插件的配置信息
func (*MseAdapterImpl) GetMSEPluginsByAPI ¶
func (impl *MseAdapterImpl) GetMSEPluginsByAPI(name *string, category *int32, enableOnly *bool) ([]*mseclient.GetPluginsResponseBodyData, error)
GetMSEPluginsByAPI 获取网关插件列表
func (*MseAdapterImpl) GetPlugin ¶
func (impl *MseAdapterImpl) GetPlugin(req *PluginReqDto) (*PluginRespDto, error)
func (*MseAdapterImpl) GetRoutes ¶
func (impl *MseAdapterImpl) GetRoutes() ([]RouteRespDto, error)
func (*MseAdapterImpl) GetRoutesWithTag ¶
func (impl *MseAdapterImpl) GetRoutesWithTag(tag string) ([]RouteRespDto, error)
func (*MseAdapterImpl) GetUpstreamStatus ¶
func (impl *MseAdapterImpl) GetUpstreamStatus(upstreamId string) (*UpstreamStatusRespDto, error)
func (*MseAdapterImpl) GetVersion ¶
func (impl *MseAdapterImpl) GetVersion() (string, error)
func (*MseAdapterImpl) ListMSEGatewayRoutesByAPI ¶
func (impl *MseAdapterImpl) ListMSEGatewayRoutesByAPI(domainName *string, pageNumber *int32, pageSize *int32) (*mseclient.ListGatewayRouteResponseBody, error)
ListMSEGatewayRoutesByAPI 获取指定网关下的路由列表,支持按域名筛选
func (*MseAdapterImpl) PutPlugin ¶
func (impl *MseAdapterImpl) PutPlugin(req *PluginReqDto) (*PluginRespDto, error)
func (*MseAdapterImpl) RemovePlugin ¶
func (impl *MseAdapterImpl) RemovePlugin(id string) error
func (*MseAdapterImpl) TouchRouteOAuthMethod ¶
func (impl *MseAdapterImpl) TouchRouteOAuthMethod(id string) error
func (*MseAdapterImpl) UpdateMSEPluginConfigByIDByAPI ¶
func (impl *MseAdapterImpl) UpdateMSEPluginConfigByIDByAPI(pluginID *int64, configID *int64, config *string, configLevel *int32, enable *bool) (*mseclient.UpdatePluginConfigResponseBody, error)
UpdateMSEPluginConfigByIDByAPI 获取网关指定 ID 的插件的配置信息
func (*MseAdapterImpl) UpdatePlugin ¶
func (impl *MseAdapterImpl) UpdatePlugin(req *PluginReqDto) (*PluginRespDto, error)
UpdatePlugin 更新 req.Name 对应的插件的配置
func (*MseAdapterImpl) UpdateRoute ¶
func (impl *MseAdapterImpl) UpdateRoute(req *RouteReqDto) (*RouteRespDto, error)
Click to show internal directories.
Click to hide internal directories.