Documentation ¶
Index ¶
- func BindIpACLGroupToLoadBalancer(region Region, lbId string, bindings IPACLGroupsBinding) (string, error)
- func CheckResponse(resp *resty.Response) error
- func CreateIpACLGroup(region Region, group IPACLGroup) (string, error)
- func CreateIpACLTarget(region Region, target IPACLTarget) (string, error)
- func CreateSecurityGroupRule(region Region, rule SecurityGroupRule) (string, error)
- func DeleteIpACLGroup(region Region, groupId string) error
- func DeleteIpACLTarget(region Region, targetId string) error
- func DeleteSecurityGroupRule(region Region, securityGroupRuleId string) error
- func GetIpACLGroups(region Region) (string, error)
- func GetIpACLTargets(region Region) (string, error)
- func GetLoadBalancers(region Region) (string, error)
- func GetNetworkACLs(region Region) (string, error)
- func GetSecurityGroup(region Region, securityGroupId string) (string, error)
- func GetSecurityGroups(region Region) (string, error)
- func GetToken() (string, error)
- func GetTokenId() (string, error)
- func Init(config Config)
- func SetTokenId() error
- type Access
- type Auth
- type AuthResponse
- type BoundPair
- type Config
- type Endpoint
- type IPACLGroup
- type IPACLGroupDetails
- type IPACLGroupId
- type IPACLGroups
- type IPACLGroupsBinding
- type IPACLTarget
- type IPACLTargetDetails
- type IPACLTargets
- type Listener
- type LoadBalancerDetails
- type LoadBalancerId
- type LoadBalancers
- type Metadata
- type NetworkACLDetails
- type NetworkACLs
- type PasswordCredentials
- type Region
- type ResourceType
- type Role
- type RoleLink
- type SecurityGroup
- type SecurityGroupDetails
- type SecurityGroupRule
- type SecurityGroupRuleDetails
- type SecurityGroupRuleDetailsExt
- type SecurityGroups
- type ServiceCatalog
- type Tenant
- type Token
- type TokenRequest
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindIpACLGroupToLoadBalancer ¶
func BindIpACLGroupToLoadBalancer(region Region, lbId string, bindings IPACLGroupsBinding) (string, error)
Bind IP access control list group (IP ACL group) to load balancer
func CheckResponse ¶
func CheckResponse(resp *resty.Response) error
func CreateIpACLGroup ¶
func CreateIpACLGroup(region Region, group IPACLGroup) (string, error)
Create an IP access control list group (IP ACL group)
func CreateIpACLTarget ¶
func CreateIpACLTarget(region Region, target IPACLTarget) (string, error)
Create IP access control list target (IP ACL target)
func CreateSecurityGroupRule ¶
func CreateSecurityGroupRule(region Region, rule SecurityGroupRule) (string, error)
Create a security group rule
func DeleteIpACLGroup ¶
Delete IP access control list group (IP ACL group)
func DeleteIpACLTarget ¶
Delete IP access control list target (IP ACL target)
func DeleteSecurityGroupRule ¶
Delete a security group rule
func GetIpACLGroups ¶
Get IP access control list groups (IP ACL groups)
func GetIpACLTargets ¶
Get IP access control list targets (IP ACL targets)
func GetSecurityGroup ¶
Get a security group
func GetSecurityGroups ¶
GetSecurityGroups function gets a security group.
func GetTokenId ¶
func SetTokenId ¶
func SetTokenId() error
Types ¶
type Access ¶
type Access struct { Token Token `json:"token"` ServiceCatalog []ServiceCatalog `json:"serviceCatalog"` User User `json:"user"` Metadata Metadata `json:"metadata"` }
type Auth ¶
type Auth struct { TenantId string `json:"tenantId"` PasswordCredentials PasswordCredentials `json:"passwordCredentials"` }
type AuthResponse ¶
type AuthResponse struct {
Access Access `json:"access"`
}
POST /v2.0/tokens - response body
type IPACLGroup ¶
type IPACLGroup struct {
IpaclGroup IPACLGroupDetails `json:"ipacl_group"`
}
type IPACLGroupDetails ¶
type IPACLGroupDetails struct { IpaclTargetCount string `json:"ipacl_target_count,omitempty"` Description string `json:"description,omitempty"` LoadBalancers []LoadBalancerId `json:"loadbalancers,omitempty"` TenantId string `json:"tenant_id,omitempty"` Action string `json:"action,omitempty"` Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` }
type IPACLGroupId ¶
type IPACLGroupId struct {
IpaclGroupId string `json:"ipacl_group_id"`
}
type IPACLGroups ¶
type IPACLGroups struct {
IpaclGroups []IPACLGroupDetails `json:"ipacl_groups"`
}
Models for IP ACL groups
type IPACLGroupsBinding ¶
type IPACLGroupsBinding struct {
IpaclGroupsBinding []IPACLGroupId `json:"ipacl_groups_binding"`
}
Models for Binding LoadBalancer and IP ACL groups
type IPACLTarget ¶
type IPACLTarget struct {
IpaclTarget IPACLTargetDetails `json:"ipacl_target"`
}
type IPACLTargetDetails ¶
type IPACLTargets ¶
type IPACLTargets struct {
IpaclTargets []IPACLTargetDetails `json:"ipacl_targets"`
}
type LoadBalancerDetails ¶
type LoadBalancerDetails struct { IpaclGroupAction string `json:"ipacl_group_action"` Description string `json:"description"` ProvisioningStatus string `json:"provisioning_status"` TenantID string `json:"tenant_id"` Provider string `json:"provider"` IpaclGroups []IPACLGroupId `json:"ipacl_groups"` Name string `json:"name"` LoadBalancerType string `json:"loadbalancer_type"` Listeners []Listener `json:"listeners"` VipAddress string `json:"vip_address"` VipPortID string `json:"vip_port_id"` WorkflowStatus string `json:"workflow_status"` VipSubnetID string `json:"vip_subnet_id"` Id string `json:"id"` OperatingStatus string `json:"operating_status"` AdminStateUp bool `json:"admin_state_up"` }
type LoadBalancerId ¶
type LoadBalancerId struct {
LoadBalancerId string `json:"loadbalancer_id"`
}
type LoadBalancers ¶
type LoadBalancers struct {
LoadBalancers []LoadBalancerDetails `json:"loadbalancers"`
}
Model for load balancer
type NetworkACLDetails ¶
type NetworkACLs ¶
type NetworkACLs struct {
NetworkACL []NetworkACLDetails `json:"acls"`
}
Model for Network ACLs
type PasswordCredentials ¶
type ResourceType ¶
type ResourceType string
Define type for resource type
const ( Instance ResourceType = "instance" Network ResourceType = "network" Image ResourceType = "image" Volumev2 ResourceType = "block-storage" ObjectStore ResourceType = "object-storage" KeyManager ResourceType = "key-manager" )
Define const for resource type
type SecurityGroup ¶
type SecurityGroup struct {
SecurityGroup SecurityGroupDetails `json:"security_group"`
}
type SecurityGroupDetails ¶
type SecurityGroupDetails struct { TenantId string `json:"tenant_id,omitempty"` Description string `json:"description"` Id string `json:"id"` SecurityGroupRules []SecurityGroupRuleDetails `json:"security_group_rules"` Name string `json:"name"` }
type SecurityGroupRule ¶
type SecurityGroupRule struct {
SecurityGroupRule SecurityGroupRuleDetailsExt `json:"security_group_rule"`
}
type SecurityGroupRuleDetails ¶
type SecurityGroupRuleDetails struct { Direction string `json:"direction" default:"ingress"` Protocol string `json:"protocol" default:"tcp"` Description string `json:"description"` PortRangeMax int `json:"port_range_max"` Id string `json:"id,omitempty"` RemoteGroupId *string `json:"remote_group_id,omitempty"` RemoteIpPrefix string `json:"remote_ip_prefix"` SecurityGroupId string `json:"security_group_id"` TenantId string `json:"tenant_id,omitempty"` PortRangeMin int `json:"port_range_min"` Ethertype string `json:"ethertype"` }
type SecurityGroupRuleDetailsExt ¶
type SecurityGroupRuleDetailsExt struct { Direction string `json:"direction" default:"ingress"` Protocol string `json:"protocol" default:"tcp"` Description string `json:"description"` PortRangeMax int `json:"port_range_max"` Id string `json:"id,omitempty"` RemoteGroupId string `json:"remote_group_id,omitempty"` RemoteIpPrefix string `json:"remote_ip_prefix"` SecurityGroupId string `json:"security_group_id"` TenantId string `json:"tenant_id,omitempty"` PortRangeMin int `json:"port_range_min"` Ethertype string `json:"ethertype"` UpdatedAt string `json:"updated_at,omitempty"` RevisionNumber int `json:"revision_number,omitempty"` CreatedAt string `json:"created_at,omitempty"` ProjectId string `json:"project_id,omitempty"` }
type SecurityGroups ¶
type SecurityGroups struct {
SecurityGroups []SecurityGroupDetails `json:"security_groups"`
}
Get /v2.0/security-groups - response body
type ServiceCatalog ¶
type TokenRequest ¶
type TokenRequest struct {
Auth Auth `json:"auth"`
}
POST /v2.0/tokens - request body