Documentation ¶
Index ¶
- Constants
- Variables
- func BindBmInstanceSecurityGroups(providerParams string, instanceId string, securityGroups []string) error
- func QueryBmInstance(providerParams string, filter plugins.Filter) ([]*bm.DeviceInfo, error)
- func QueryBmInstanceSecurityGroups(providerParams string, instanceId string) ([]string, error)
- func QueryBmlbInstance(providerParams string, filter plugins.Filter) ([]*bmlb.LoadBalancer, error)
- type ApplyResult
- type ApplySecurityPoliciesRequest
- type ApplySecurityPoliciesResult
- type ApplySecurityPolicyAction
- type BmInstance
- func (instance BmInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance BmInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
- func (instance BmInstance) GetId() string
- func (instance BmInstance) GetIp() string
- func (instance BmInstance) GetName() string
- func (instance BmInstance) GetRegion() string
- func (instance BmInstance) IsSupportSecurityGroupApi() bool
- func (instance BmInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance BmInstance) ResourceTypeName() string
- type BmResourceType
- func (resourceType *BmResourceType) IsLoadBalanceType() bool
- func (resourceType *BmResourceType) IsSupportEgressPolicy() bool
- func (resourceType *BmResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *BmResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type BmlbInstance
- func (instance BmlbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance BmlbInstance) GetBackendTargets(providerParams string, protocol string, port string) ([]ResourceInstance, []string, error)
- func (instance BmlbInstance) GetId() string
- func (instance BmlbInstance) GetIp() string
- func (instance BmlbInstance) GetName() string
- func (instance BmlbInstance) GetRegion() string
- func (instance BmlbInstance) IsSupportSecurityGroupApi() bool
- func (instance BmlbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance BmlbInstance) ResourceTypeName() string
- type BmlbResourceType
- func (resourceType *BmlbResourceType) IsLoadBalanceType() bool
- func (resourceType *BmlbResourceType) IsSupportEgressPolicy() bool
- func (resourceType *BmlbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *BmlbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type BussinessSecurityGroupPlugin
- type CalcSecurityPoliciesRequest
- type CalcSecurityPoliciesResult
- type CalcSecurityPolicyAction
- type ClbInstance
- func (instance ClbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance ClbInstance) GetBackendTargets(providerParams string, protocol string, port string) ([]ResourceInstance, []string, error)
- func (instance ClbInstance) GetId() string
- func (instance ClbInstance) GetIp() string
- func (instance ClbInstance) GetName() string
- func (instance ClbInstance) GetRegion() string
- func (instance ClbInstance) IsSupportSecurityGroupApi() bool
- func (instance ClbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance ClbInstance) ResourceTypeName() string
- type ClbResourceType
- func (resourceType *ClbResourceType) IsLoadBalanceType() bool
- func (resourceType *ClbResourceType) IsSupportEgressPolicy() bool
- func (resourceType *ClbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *ClbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type CvmInstance
- func (instance CvmInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance CvmInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
- func (instance CvmInstance) GetId() string
- func (instance CvmInstance) GetIp() string
- func (instance CvmInstance) GetName() string
- func (instance CvmInstance) GetRegion() string
- func (instance CvmInstance) IsSupportSecurityGroupApi() bool
- func (instance CvmInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance CvmInstance) ResourceTypeName() string
- type CvmResourceType
- func (resourceType *CvmResourceType) IsLoadBalanceType() bool
- func (resourceType *CvmResourceType) IsSupportEgressPolicy() bool
- func (resourceType *CvmResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *CvmResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type MariadbInstance
- func (instance MariadbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance MariadbInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
- func (instance MariadbInstance) GetId() string
- func (instance MariadbInstance) GetIp() string
- func (instance MariadbInstance) GetName() string
- func (instance MariadbInstance) GetRegion() string
- func (instance MariadbInstance) IsSupportSecurityGroupApi() bool
- func (instance MariadbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance MariadbInstance) ResourceTypeName() string
- type MariadbResourceType
- func (resourceType *MariadbResourceType) IsLoadBalanceType() bool
- func (resourceType *MariadbResourceType) IsSupportEgressPolicy() bool
- func (resourceType *MariadbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *MariadbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type MongodbInstance
- func (instance MongodbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance MongodbInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
- func (instance MongodbInstance) GetId() string
- func (instance MongodbInstance) GetIp() string
- func (instance MongodbInstance) GetName() string
- func (instance MongodbInstance) GetRegion() string
- func (instance MongodbInstance) IsSupportSecurityGroupApi() bool
- func (instance MongodbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance MongodbInstance) ResourceTypeName() string
- type MongodbResourceType
- func (resourceType *MongodbResourceType) IsLoadBalanceType() bool
- func (resourceType *MongodbResourceType) IsSupportEgressPolicy() bool
- func (resourceType *MongodbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *MongodbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type MysqlInstance
- func (instance MysqlInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance MysqlInstance) GetBackendTargets(providerParams string, port string, proto string) ([]ResourceInstance, []string, error)
- func (instance MysqlInstance) GetId() string
- func (instance MysqlInstance) GetIp() string
- func (instance MysqlInstance) GetName() string
- func (instance MysqlInstance) GetRegion() string
- func (instance MysqlInstance) IsSupportSecurityGroupApi() bool
- func (instance MysqlInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance MysqlInstance) ResourceTypeName() string
- type MysqlResourceType
- func (resourceType *MysqlResourceType) IsLoadBalanceType() bool
- func (resourceType *MysqlResourceType) IsSupportEgressPolicy() bool
- func (resourceType *MysqlResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *MysqlResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type QueryIpsResult
- type RedisInstance
- func (instance RedisInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
- func (instance RedisInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
- func (instance RedisInstance) GetId() string
- func (instance RedisInstance) GetIp() string
- func (instance RedisInstance) GetName() string
- func (instance RedisInstance) GetRegion() string
- func (instance RedisInstance) IsSupportSecurityGroupApi() bool
- func (instance RedisInstance) QuerySecurityGroups(providerParams string) ([]string, error)
- func (instance RedisInstance) ResourceTypeName() string
- type RedisResourceType
- func (resourceType *RedisResourceType) IsLoadBalanceType() bool
- func (resourceType *RedisResourceType) IsSupportEgressPolicy() bool
- func (resourceType *RedisResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
- func (resourceType *RedisResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
- type ResourceInstance
- type ResourceType
- type SecurityPolicy
Constants ¶
View Source
const ( INGRESS_RULE = "ingress" //入站规则 EGRESS_RULE = "egress" //出栈规则 TCP_PROTOCOL = "TCP" UDP_PROTOCOL = "UDP" ICMP_PROTOCOL = "ICMP" POLICY_ACTION_ACCEPT = "ACCEPT" POLICY_ACTION_DROP = "DROP" ALL_PORT = "ALL" )
View Source
const ( REDIS_SEARCH_KEY_IP = "IP" REDIS_SEARCH_KEY_ID = "ID" )
View Source
const ENV_SECRET_ID = "SECRET_ID"
View Source
const ENV_SECRET_KEY = "SECRET_KEY"
View Source
const ENV_SUPPORT_REGIONS = "REGIONS" //用分号隔开多个地域
View Source
const (
MAX_SEUCRITY_RULE_NUM = 100
)
View Source
const (
QCLOUD_ENDPOINT_BM = "bm.tencentcloudapi.com"
)
View Source
const (
QCLOUD_ENDPOINT_BMLB = "bmlb.tencentcloudapi.com"
)
Variables ¶
View Source
var ( DEVICE_TYPE_MAP = map[string]bool{ "HA": true, "BASIC": false, } )
View Source
var (
ErrorIpNotFound = errors.New("ip not found")
)
View Source
var SecurityGroupActions = make(map[string]plugins.Action)
Functions ¶
func QueryBmInstance ¶
func QueryBmlbInstance ¶
Types ¶
type ApplyResult ¶
type ApplyResult struct { PoliciesTotal int `json:"policies_total"` SuccessTotal int `json:"success_policies_total"` UndoTotal int `json:"undo_policies_total"` FailedTotal int `json:"failed_policies_total"` SuccessPolicies []SecurityPolicy `json:"success_policies"` UndoPolicies []SecurityPolicy `json:"undo_policies"` FailedPolicies []SecurityPolicy `json:"failed_policies"` }
type ApplySecurityPoliciesRequest ¶
type ApplySecurityPoliciesRequest struct { IngressPolicies []SecurityPolicy `json:"ingress_policies"` EgressPolicies []SecurityPolicy `json:"egress_policies"` }
type ApplySecurityPoliciesResult ¶
type ApplySecurityPoliciesResult struct { TimeTaken string `json:"time_taken"` IngressApplyResult ApplyResult `json:"ingress"` EgressApplyResult ApplyResult `json:"egress"` }
type ApplySecurityPolicyAction ¶
type ApplySecurityPolicyAction struct { }
---------------apply security policy action------------------------------//
func (*ApplySecurityPolicyAction) CheckParam ¶
func (action *ApplySecurityPolicyAction) CheckParam(input interface{}) error
func (*ApplySecurityPolicyAction) Do ¶
func (action *ApplySecurityPolicyAction) Do(input interface{}) (interface{}, error)
func (*ApplySecurityPolicyAction) ReadParam ¶
func (action *ApplySecurityPolicyAction) ReadParam(param interface{}) (interface{}, error)
type BmInstance ¶
type BmInstance struct { Id string Name string WanIp string LanIp string Region string SupportSecurityGroupApi bool IsLoadBalancerBackend bool LoadBalanceIp string }
func (BmInstance) AssociateSecurityGroups ¶
func (instance BmInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (BmInstance) GetBackendTargets ¶
func (instance BmInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
func (BmInstance) GetId ¶
func (instance BmInstance) GetId() string
func (BmInstance) GetIp ¶
func (instance BmInstance) GetIp() string
func (BmInstance) GetName ¶
func (instance BmInstance) GetName() string
func (BmInstance) GetRegion ¶
func (instance BmInstance) GetRegion() string
func (BmInstance) IsSupportSecurityGroupApi ¶
func (instance BmInstance) IsSupportSecurityGroupApi() bool
func (BmInstance) QuerySecurityGroups ¶
func (instance BmInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (BmInstance) ResourceTypeName ¶
func (instance BmInstance) ResourceTypeName() string
type BmResourceType ¶
type BmResourceType struct { }
resource type
func (*BmResourceType) IsLoadBalanceType ¶
func (resourceType *BmResourceType) IsLoadBalanceType() bool
func (*BmResourceType) IsSupportEgressPolicy ¶
func (resourceType *BmResourceType) IsSupportEgressPolicy() bool
func (*BmResourceType) QueryInstancesById ¶
func (resourceType *BmResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*BmResourceType) QueryInstancesByIp ¶
func (resourceType *BmResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type BmlbInstance ¶
type BmlbInstance struct { Id string Name string Forward uint64 Region string Vip string VpcId string SupportSecurityGroupApi bool }
func (BmlbInstance) AssociateSecurityGroups ¶
func (instance BmlbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (BmlbInstance) GetBackendTargets ¶
func (instance BmlbInstance) GetBackendTargets(providerParams string, protocol string, port string) ([]ResourceInstance, []string, error)
func (BmlbInstance) GetId ¶
func (instance BmlbInstance) GetId() string
func (BmlbInstance) GetIp ¶
func (instance BmlbInstance) GetIp() string
func (BmlbInstance) GetName ¶
func (instance BmlbInstance) GetName() string
func (BmlbInstance) GetRegion ¶
func (instance BmlbInstance) GetRegion() string
func (BmlbInstance) IsSupportSecurityGroupApi ¶
func (instance BmlbInstance) IsSupportSecurityGroupApi() bool
func (BmlbInstance) QuerySecurityGroups ¶
func (instance BmlbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (BmlbInstance) ResourceTypeName ¶
func (instance BmlbInstance) ResourceTypeName() string
type BmlbResourceType ¶
type BmlbResourceType struct { }
resource type
func (*BmlbResourceType) IsLoadBalanceType ¶
func (resourceType *BmlbResourceType) IsLoadBalanceType() bool
func (*BmlbResourceType) IsSupportEgressPolicy ¶
func (resourceType *BmlbResourceType) IsSupportEgressPolicy() bool
func (*BmlbResourceType) QueryInstancesById ¶
func (resourceType *BmlbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*BmlbResourceType) QueryInstancesByIp ¶
func (resourceType *BmlbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type BussinessSecurityGroupPlugin ¶
type BussinessSecurityGroupPlugin struct { }
func (*BussinessSecurityGroupPlugin) GetActionByName ¶
func (plugin *BussinessSecurityGroupPlugin) GetActionByName(actionName string) (plugins.Action, error)
type CalcSecurityPoliciesRequest ¶
type CalcSecurityPoliciesRequest struct { Protocol string `json:"protocol"` SourceIps []string `json:"source_ips"` DestIps []string `json:"dest_ips"` DestPort string `json:"dest_port"` PolicyAction string `json:"policy_action"` PolicyDirections []string `json:"policy_directions"` Description string `json:"description"` }
---------------calc security policy action------------------------------//
type CalcSecurityPoliciesResult ¶
type CalcSecurityPoliciesResult struct { TimeTaken string `json:"time_taken"` IngressPoliciesTotal int `json:"ingress_policies_total"` EgressPoliciesTotal int `json:"egress_policies_total"` IngressPolicies []SecurityPolicy `json:"ingress_policies"` EgressPolicies []SecurityPolicy `json:"egress_policies"` }
type CalcSecurityPolicyAction ¶
type CalcSecurityPolicyAction struct { }
func (*CalcSecurityPolicyAction) CheckParam ¶
func (action *CalcSecurityPolicyAction) CheckParam(input interface{}) error
func (*CalcSecurityPolicyAction) Do ¶
func (action *CalcSecurityPolicyAction) Do(input interface{}) (interface{}, error)
func (*CalcSecurityPolicyAction) ReadParam ¶
func (action *CalcSecurityPolicyAction) ReadParam(param interface{}) (interface{}, error)
type ClbInstance ¶
func (ClbInstance) AssociateSecurityGroups ¶
func (instance ClbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (ClbInstance) GetBackendTargets ¶
func (instance ClbInstance) GetBackendTargets(providerParams string, protocol string, port string) ([]ResourceInstance, []string, error)
func (ClbInstance) GetId ¶
func (instance ClbInstance) GetId() string
func (ClbInstance) GetIp ¶
func (instance ClbInstance) GetIp() string
func (ClbInstance) GetName ¶
func (instance ClbInstance) GetName() string
func (ClbInstance) GetRegion ¶
func (instance ClbInstance) GetRegion() string
func (ClbInstance) IsSupportSecurityGroupApi ¶
func (instance ClbInstance) IsSupportSecurityGroupApi() bool
func (ClbInstance) QuerySecurityGroups ¶
func (instance ClbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (ClbInstance) ResourceTypeName ¶
func (instance ClbInstance) ResourceTypeName() string
type ClbResourceType ¶
type ClbResourceType struct { }
func (*ClbResourceType) IsLoadBalanceType ¶
func (resourceType *ClbResourceType) IsLoadBalanceType() bool
func (*ClbResourceType) IsSupportEgressPolicy ¶
func (resourceType *ClbResourceType) IsSupportEgressPolicy() bool
func (*ClbResourceType) QueryInstancesById ¶
func (resourceType *ClbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*ClbResourceType) QueryInstancesByIp ¶
func (resourceType *ClbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type CvmInstance ¶
type CvmInstance struct { Id string Ip string Name string PrivateIps []string PublicIps []string Region string SecurityGroups []string SupportSecurityGroupApi bool IsLoadBalancerBackend bool LoadBalanceIp string }
resource instance
func (CvmInstance) AssociateSecurityGroups ¶
func (instance CvmInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (CvmInstance) GetBackendTargets ¶
func (instance CvmInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
func (CvmInstance) GetId ¶
func (instance CvmInstance) GetId() string
func (CvmInstance) GetIp ¶
func (instance CvmInstance) GetIp() string
func (CvmInstance) GetName ¶
func (instance CvmInstance) GetName() string
func (CvmInstance) GetRegion ¶
func (instance CvmInstance) GetRegion() string
func (CvmInstance) IsSupportSecurityGroupApi ¶
func (instance CvmInstance) IsSupportSecurityGroupApi() bool
func (CvmInstance) QuerySecurityGroups ¶
func (instance CvmInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (CvmInstance) ResourceTypeName ¶
func (instance CvmInstance) ResourceTypeName() string
type CvmResourceType ¶
type CvmResourceType struct { }
resource type
func (*CvmResourceType) IsLoadBalanceType ¶
func (resourceType *CvmResourceType) IsLoadBalanceType() bool
func (*CvmResourceType) IsSupportEgressPolicy ¶
func (resourceType *CvmResourceType) IsSupportEgressPolicy() bool
func (*CvmResourceType) QueryInstancesById ¶
func (resourceType *CvmResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*CvmResourceType) QueryInstancesByIp ¶
func (resourceType *CvmResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type MariadbInstance ¶
type MariadbInstance struct { Id string Name string Vip string Region string SupportSecurityGroupApi bool }
func (MariadbInstance) AssociateSecurityGroups ¶
func (instance MariadbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (MariadbInstance) GetBackendTargets ¶
func (instance MariadbInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
func (MariadbInstance) GetId ¶
func (instance MariadbInstance) GetId() string
func (MariadbInstance) GetIp ¶
func (instance MariadbInstance) GetIp() string
func (MariadbInstance) GetName ¶
func (instance MariadbInstance) GetName() string
func (MariadbInstance) GetRegion ¶
func (instance MariadbInstance) GetRegion() string
func (MariadbInstance) IsSupportSecurityGroupApi ¶
func (instance MariadbInstance) IsSupportSecurityGroupApi() bool
func (MariadbInstance) QuerySecurityGroups ¶
func (instance MariadbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (MariadbInstance) ResourceTypeName ¶
func (instance MariadbInstance) ResourceTypeName() string
type MariadbResourceType ¶
type MariadbResourceType struct { }
resource type
func (*MariadbResourceType) IsLoadBalanceType ¶
func (resourceType *MariadbResourceType) IsLoadBalanceType() bool
func (*MariadbResourceType) IsSupportEgressPolicy ¶
func (resourceType *MariadbResourceType) IsSupportEgressPolicy() bool
func (*MariadbResourceType) QueryInstancesById ¶
func (resourceType *MariadbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*MariadbResourceType) QueryInstancesByIp ¶
func (resourceType *MariadbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type MongodbInstance ¶
func (MongodbInstance) AssociateSecurityGroups ¶
func (instance MongodbInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (MongodbInstance) GetBackendTargets ¶
func (instance MongodbInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
func (MongodbInstance) GetId ¶
func (instance MongodbInstance) GetId() string
func (MongodbInstance) GetIp ¶
func (instance MongodbInstance) GetIp() string
func (MongodbInstance) GetName ¶
func (instance MongodbInstance) GetName() string
func (MongodbInstance) GetRegion ¶
func (instance MongodbInstance) GetRegion() string
func (MongodbInstance) IsSupportSecurityGroupApi ¶
func (instance MongodbInstance) IsSupportSecurityGroupApi() bool
func (MongodbInstance) QuerySecurityGroups ¶
func (instance MongodbInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (MongodbInstance) ResourceTypeName ¶
func (instance MongodbInstance) ResourceTypeName() string
type MongodbResourceType ¶
type MongodbResourceType struct { }
func (*MongodbResourceType) IsLoadBalanceType ¶
func (resourceType *MongodbResourceType) IsLoadBalanceType() bool
func (*MongodbResourceType) IsSupportEgressPolicy ¶
func (resourceType *MongodbResourceType) IsSupportEgressPolicy() bool
func (*MongodbResourceType) QueryInstancesById ¶
func (resourceType *MongodbResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*MongodbResourceType) QueryInstancesByIp ¶
func (resourceType *MongodbResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type MysqlInstance ¶
type MysqlInstance struct { Id string Name string Vip string Region string SupportSecurityGroupApi bool }
resource instance
func (MysqlInstance) AssociateSecurityGroups ¶
func (instance MysqlInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (MysqlInstance) GetBackendTargets ¶
func (instance MysqlInstance) GetBackendTargets(providerParams string, port string, proto string) ([]ResourceInstance, []string, error)
func (MysqlInstance) GetId ¶
func (instance MysqlInstance) GetId() string
func (MysqlInstance) GetIp ¶
func (instance MysqlInstance) GetIp() string
func (MysqlInstance) GetName ¶
func (instance MysqlInstance) GetName() string
func (MysqlInstance) GetRegion ¶
func (instance MysqlInstance) GetRegion() string
func (MysqlInstance) IsSupportSecurityGroupApi ¶
func (instance MysqlInstance) IsSupportSecurityGroupApi() bool
func (MysqlInstance) QuerySecurityGroups ¶
func (instance MysqlInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (MysqlInstance) ResourceTypeName ¶
func (instance MysqlInstance) ResourceTypeName() string
type MysqlResourceType ¶
type MysqlResourceType struct { }
resource type
func (*MysqlResourceType) IsLoadBalanceType ¶
func (resourceType *MysqlResourceType) IsLoadBalanceType() bool
func (*MysqlResourceType) IsSupportEgressPolicy ¶
func (resourceType *MysqlResourceType) IsSupportEgressPolicy() bool
func (*MysqlResourceType) QueryInstancesById ¶
func (resourceType *MysqlResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*MysqlResourceType) QueryInstancesByIp ¶
func (resourceType *MysqlResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type QueryIpsResult ¶
type QueryIpsResult struct { Err error InstanceMap map[string]ResourceInstance }
type RedisInstance ¶
func (RedisInstance) AssociateSecurityGroups ¶
func (instance RedisInstance) AssociateSecurityGroups(providerParams string, securityGroups []string) error
func (RedisInstance) GetBackendTargets ¶
func (instance RedisInstance) GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error)
func (RedisInstance) GetId ¶
func (instance RedisInstance) GetId() string
func (RedisInstance) GetIp ¶
func (instance RedisInstance) GetIp() string
func (RedisInstance) GetName ¶
func (instance RedisInstance) GetName() string
func (RedisInstance) GetRegion ¶
func (instance RedisInstance) GetRegion() string
func (RedisInstance) IsSupportSecurityGroupApi ¶
func (instance RedisInstance) IsSupportSecurityGroupApi() bool
func (RedisInstance) QuerySecurityGroups ¶
func (instance RedisInstance) QuerySecurityGroups(providerParams string) ([]string, error)
func (RedisInstance) ResourceTypeName ¶
func (instance RedisInstance) ResourceTypeName() string
type RedisResourceType ¶
type RedisResourceType struct { }
func (*RedisResourceType) IsLoadBalanceType ¶
func (resourceType *RedisResourceType) IsLoadBalanceType() bool
func (*RedisResourceType) IsSupportEgressPolicy ¶
func (resourceType *RedisResourceType) IsSupportEgressPolicy() bool
func (*RedisResourceType) QueryInstancesById ¶
func (resourceType *RedisResourceType) QueryInstancesById(providerParams string, instanceIds []string) (map[string]ResourceInstance, error)
func (*RedisResourceType) QueryInstancesByIp ¶
func (resourceType *RedisResourceType) QueryInstancesByIp(providerParams string, ips []string) (map[string]ResourceInstance, error)
type ResourceInstance ¶
type ResourceInstance interface { ResourceTypeName() string GetId() string GetName() string GetRegion() string GetIp() string QuerySecurityGroups(providerParams string) ([]string, error) AssociateSecurityGroups(providerParams string, securityGroups []string) error IsSupportSecurityGroupApi() bool GetBackendTargets(providerParams string, proto string, port string) ([]ResourceInstance, []string, error) }
interface definition
type ResourceType ¶
type SecurityPolicy ¶
type SecurityPolicy struct { Ip string `json:"ip"` Type string `json:"type"` Id string `json:"id"` Region string `json:"region"` SupportSecurityGroupApi bool `json:"support_security_group_api"` PeerIp string `json:"peer_ip"` Protocol string `json:"protocol"` Ports string `json:"ports"` Action string `json:"action"` Description string `json:"description"` ErrorMsg string `json:"err_msg,omitempty"` UndoReason string `json:"undo_reason,omitempty"` SecurityGroupId string `json:"security_group_id,omitempty"` }
Click to show internal directories.
Click to hide internal directories.