Documentation ¶
Index ¶
- Constants
- func ConvertFilterStruct(v interface{}, req *map[string]interface{})
- func ConvertFilterStructPrefix(v interface{}, req *map[string]interface{}, prex string)
- func Downline2Hump(s string) string
- func FlatternStruct(v interface{}, req *map[string]interface{})
- func FlatternStructPrefix(v interface{}, req *map[string]interface{}, prex string)
- func FlatternStructSlicePrefix(values interface{}, req *map[string]interface{}, prex string)
- func FuckHump2Downline(s string) string
- func GetEndpointURL(region string) string
- func GetInsecureEndpointURL(region string) string
- func GetSubDByRep(data interface{}, include, exclude map[string]bool) []interface{}
- func GetSubSliceDByRep(items []interface{}, include map[string]bool) []map[string]interface{}
- func GetSubStructDByRep(datas interface{}, exclude map[string]bool) map[string]interface{}
- func GetValidatorParamForProto() map[string]*ValidatorParam
- func GetValidatorParamForProto4() map[string]*ValidatorParam
- func Hump2Downline(s string) string
- func Provider() terraform.ResourceProvider
- func SchemaSetToFilterMap(s interface{}, prefix string, index int, input *map[string]interface{})
- func SchemaSetToInstanceMap(s interface{}, prefix string, input *map[string]interface{})
- func SchemaSetToStringSlice(s interface{}) []string
- func SchemaSetsToFilterMap(d *schema.ResourceData, filters []string, req *map[string]interface{}) *map[string]interface{}
- func SetDByResp(d *schema.ResourceData, m interface{}, includ, exclude map[string]bool) map[string]interface{}
- func SetDByRespV1(d *schema.ResourceData, m interface{}, exclud map[string]bool) map[string]interface{}
- type Config
- type KsyunClient
- type ProviderError
- type ValidatorParam
- type Validity
Constants ¶
const (
NotFound = "Notfound"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertFilterStruct ¶
func ConvertFilterStruct(v interface{}, req *map[string]interface{})
Suitable for filter which need conver param with "_"(terraform) to "-"(sdk) when read . convert input param struct to map when create(without prefix).
func ConvertFilterStructPrefix ¶
Suitable for filter which need conver param with "_"(terraform) to "-"(sdk) when read. convert input param struct to map when create(with prefix).
func Downline2Hump ¶
The underline is converted to an hump simply.
func FlatternStruct ¶
func FlatternStruct(v interface{}, req *map[string]interface{})
flattern struct convert input param struct to map when create(with out prefix).
func FlatternStructPrefix ¶
flattern struct Suitable for inline struct convert input param struct to map when create(with prefix). prefix: the name of the outer structure
func FlatternStructSlicePrefix ¶
FlatternStructSlicePrefix 用于创建时,结构体切片类型的入参转换为map型 ,【 Flattern StructSlice Suitable for the slice of inline struct convert input param struct to map when create(with prefix). prefix: the name of the slice
func FuckHump2Downline ¶
func GetEndpointURL ¶
GetEndpointURL will return endpoint url string by region
func GetInsecureEndpointURL ¶
GetInsecureEndpointURL will return endpoint url string by region
func GetSubDByRep ¶
Convert sdk response type (map[string]interface{}) to the type terraform can realized([]map[string]interface). params data limit : [k,v]:the type of k must be string ,the type of v must be basic type.
func GetSubSliceDByRep ¶
sdk resp []map[string]interface{}->terraform schema.ResourceData Convert sdk response type ([]map[string]interface{}) to the type terraform can realized([]map[string]interface). include :representing the key terraform has defined. exclude :representing the key which the type is not basic type. Suitable for the value in d.Set( key,value),and the type of value must be List.
func GetSubStructDByRep ¶
sdk resp map[string]interface{} inline struct ->terraform schema.ResourceData convert inline struct from sdk response type ([]map[string]interface{}) to the type terraform can realized([]map[string]interface). exclude :representing the key which the type is not basic type.
func GetValidatorParamForProto ¶
func GetValidatorParamForProto() map[string]*ValidatorParam
func GetValidatorParamForProto4 ¶
func GetValidatorParamForProto4() map[string]*ValidatorParam
func Hump2Downline ¶
The hump is converted to an underline simply, and no special treatment is required for even uppercase letters.
func Provider ¶
func Provider() terraform.ResourceProvider
Provider returns a terraform.ResourceProvider.
func SchemaSetToFilterMap ¶
func SchemaSetToInstanceMap ¶
func SchemaSetToStringSlice ¶
func SchemaSetToStringSlice(s interface{}) []string
schemaSetToStringSlice used for converting terraform schema set to a string slice
func SchemaSetsToFilterMap ¶
func SchemaSetsToFilterMap(d *schema.ResourceData, filters []string, req *map[string]interface{}) *map[string]interface{}
func SetDByResp ¶
func SetDByResp(d *schema.ResourceData, m interface{}, includ, exclude map[string]bool) map[string]interface{}
set sdk response (map[string]interface{}) to the terraform ([]map[string]interface). params data limit : [k,v]:the type of k must be string ,the type of v must be basic type. include :representing the key terraform has defined. terraform will panic if set the key that not defined. exclude :representing the key which the type is not basic type (terraform can't identity the type which is not basic type). mre: the params not set to terraform .
func SetDByRespV1 ¶
func SetDByRespV1(d *schema.ResourceData, m interface{}, exclud map[string]bool) map[string]interface{}
set sdk response (map[string]interface{}) to the terraform ([]map[string]interface). params data limit : [k,v]:the type of k must be string ,the type of v must be basic type. exclude :representing the key which the type is not basic type (terraform can't identity the type which is not basic type). mre: the params not set to terraform .
Types ¶
type Config ¶
Config is the configuration of ksyun meta data
func (*Config) Client ¶
func (c *Config) Client() (*KsyunClient, error)
Client will returns a client with connections for all product
type KsyunClient ¶
type KsyunClient struct {
// contains filtered or unexported fields
}
type ProviderError ¶
type ProviderError struct {
// contains filtered or unexported fields
}
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
func (*ProviderError) ErrorCode ¶
func (err *ProviderError) ErrorCode() string
func (*ProviderError) Message ¶
func (err *ProviderError) Message() string
type ValidatorParam ¶
Source Files ¶
- client.go
- common_ksyun.go
- config.go
- const.go
- data_resourece_ksyun_keys.go
- data_source_ksyun_availilability_zones.go
- data_source_ksyun_certificates.go
- data_source_ksyun_eips.go
- data_source_ksyun_healthchecks.go
- data_source_ksyun_images.go
- data_source_ksyun_instances.go
- data_source_ksyun_krds.go
- data_source_ksyun_krds_security_group.go
- data_source_ksyun_lb_acls.go
- data_source_ksyun_lb_listener_servers.go
- data_source_ksyun_lbs.go
- data_source_ksyun_lines.go
- data_source_ksyun_listeners.go
- data_source_ksyun_mongodb.go
- data_source_ksyun_network_interfaces.go
- data_source_ksyun_redis.go
- data_source_ksyun_security_groups.go
- data_source_ksyun_sqlserver.go
- data_source_ksyun_ssh_keys.go
- data_source_ksyun_subnet_allocated_ip_addresses.go
- data_source_ksyun_subnet_available_addresses.go
- data_source_ksyun_subnets.go
- data_source_ksyun_volumes.go
- data_source_ksyun_vpcs.go
- endpoint.go
- errors.go
- provider.go
- resource_ksyun_certificate.go
- resource_ksyun_eip.go
- resource_ksyun_eip_association.go
- resource_ksyun_healthcheck.go
- resource_ksyun_instance.go
- resource_ksyun_krds.go
- resource_ksyun_krds_read_replica.go
- resource_ksyun_krds_security_group.go
- resource_ksyun_lb.go
- resource_ksyun_lb_acl.go
- resource_ksyun_lb_acl_entry.go
- resource_ksyun_lb_listener.go
- resource_ksyun_lb_listener_associate_acl.go
- resource_ksyun_lb_listener_server.go
- resource_ksyun_mongodb_instance.go
- resource_ksyun_mongodb_security_rule.go
- resource_ksyun_mongodb_shard_instance.go
- resource_ksyun_redis_instance.go
- resource_ksyun_redis_node.go
- resource_ksyun_redis_security.go
- resource_ksyun_security_group.go
- resource_ksyun_security_group_entry.go
- resource_ksyun_sqlserver.go
- resource_ksyun_ssh_key.go
- resource_ksyun_subnet.go
- resource_ksyun_volume.go
- resource_ksyun_volume_attach.go
- resource_ksyun_vpc.go
- utils.go
- validators.go