gateway

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (err error)

func DisableEIP

func DisableEIP(client *golangsdk.ServiceClient, id string) error

func DisableElbIngressAccess added in v0.9.3

func DisableElbIngressAccess(client *golangsdk.ServiceClient, instanceId string) error

DisableElbIngressAccess is a method to unbind the ingress eip associated with an existing APIG dedicated instance. Supported only when load balancer_provider is set to elb.

func DisableIngressAccess added in v0.9.3

func DisableIngressAccess(client *golangsdk.ServiceClient, instanceId string) error

DisableIngressAccess is a method to unbind the eip associated with an existing APIG dedicated instance.

func EnableEIP

func EnableEIP(client *golangsdk.ServiceClient, opts EipOpts) error

func GetTags added in v0.9.3

func GetTags(client *golangsdk.ServiceClient, instanceId string) ([]tags.ResourceTag, error)

func UpdateEIP

func UpdateEIP(client *golangsdk.ServiceClient, opts EipOpts) error

func UpdateTags added in v0.9.3

func UpdateTags(client *golangsdk.ServiceClient, opts *TagsUpdateOpts) error

Types

type CreateOpts

type CreateOpts struct {
	Description                  string             `json:"description,omitempty"`
	MaintainBegin                string             `json:"maintain_begin,omitempty"`
	MaintainEnd                  string             `json:"maintain_end,omitempty"`
	InstanceName                 string             `json:"instance_name" required:"true"`
	InstanceID                   string             `json:"instance_id,omitempty"`
	SpecID                       string             `json:"spec_id" required:"true"`
	VpcID                        string             `json:"vpc_id" required:"true"`
	SubnetID                     string             `json:"subnet_id" required:"true"`
	SecGroupID                   string             `json:"security_group_id" required:"true"`
	AvailableZoneIDs             []string           `json:"available_zone_ids" required:"true"`
	BandwidthSize                *int               `json:"bandwidth_size,omitempty"`
	BandwidthChargingMode        string             `json:"bandwidth_charging_mode,omitempty"`
	LoadBalancerProvider         string             `json:"loadbalancer_provider" required:"true"`
	Tags                         []tags.ResourceTag `json:"tags"`
	VpcepServiceName             string             `json:"vpcep_service_name,omitempty"`
	IngressBandwidthSize         *int               `json:"ingress_bandwidth_size,omitempty"`
	IngressBandwidthChargingMode string             `json:"ingress_bandwidth_charging_mode,omitempty"`
	EipId                        string             `json:"eip_id,omitempty"`
	Ipv6Enable                   bool               `json:"ipv6_enable,omitempty"`
}

type EipOpts

type EipOpts struct {
	ID                    string `json:"-"`
	BandwidthSize         string `json:"bandwidth_size,omitempty"`
	BandwidthChargingMode string `json:"bandwidth_charging_mode,omitempty"`
}

type ElbIngressAccessOpts added in v0.9.3

type ElbIngressAccessOpts struct {
	// The APIG dedicated instance ID.
	InstanceId string `json:"-"`
	// Public inbound access bandwidth.
	IngressBandwithSize int `json:"bandwidth_size" required:"true"`
	// Billing type of the public inbound access bandwidth.
	// + bandwidth: billed by bandwidth.
	// + traffic: billed by traffic.
	IngressBandwithChargingMode string `json:"bandwidth_charging_mode" required:"true"`
}

ElbIngressAccessOpts is the structure that used to bind ingress EIP to instance when loadbalancer_provider is set to elb.

type EndpointService

type EndpointService struct {
	ServiceName string `json:"service_name"`
	CreatedAt   string `json:"created_at"`
}

type Gateway

type Gateway struct {
	ID                    string `json:"id"`
	ProjectID             string `json:"project_id"`
	InstanceName          string `json:"instance_name"`
	Status                string `json:"status"`
	InstanceStatus        int    `json:"instance_status"`
	Type                  string `json:"type"`
	Spec                  string `json:"spec"`
	CreateTime            int64  `json:"create_time"`
	EipAddress            string `json:"eip_address"`
	ChargingMode          int    `json:"charging_mode"`
	LoadbalancerProvider  string `json:"loadbalancer_provider"`
	Description           string `json:"description"`
	VpcID                 string `json:"vpc_id"`
	SubnetID              string `json:"subnet_id"`
	SecurityGroupID       string `json:"security_group_id"`
	MaintainBegin         string `json:"maintain_begin"`
	MaintainEnd           string `json:"maintain_end"`
	IngressIp             string `json:"ingress_ip"`
	UserID                string `json:"user_id"`
	NatEipAddress         string `json:"nat_eip_address"`
	BandwidthSize         int    `json:"bandwidth_size"`
	BandwidthChargingMode string `json:"bandwidth_charging_mode"`
	AvailableZoneIDs      string `json:"available_zone_ids"`
	InstanceVersion       string `json:"instance_version"`
	VirsubnetID           string `json:"virsubnet_id"`
	RomaEipAddress        string `json:"roma_eip_address"`
	// Listeners                    *Listeners        `json:"listeners"`
	SupportedFeatures            []string          `json:"supported_features"`
	EndpointService              *EndpointService  `json:"endpoint_service"`
	EndpointServices             []EndpointService `json:"endpoint_services"`
	NodeIps                      *NodeIps          `json:"node_ips"`
	PublicIps                    []IpDetail        `json:"publicips"`
	PrivateIps                   []IpDetail        `json:"privateips"`
	IsReleasable                 *bool             `json:"is_releasable"`
	IngressBandwidthChargingMode string            `json:"ingress_bandwidth_charging_mode"`
}

func ExtractGateways

func ExtractGateways(r pagination.NewPage) ([]Gateway, error)

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Gateway, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Gateway, error)

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*Gateway, error)

type GatewayPage

type GatewayPage struct {
	pagination.NewSinglePageBase
}

type GatewayResp

type GatewayResp struct {
	InstanceID string `json:"instance_id"`
	Message    string `json:"message"`
	JobID      string `json:"job_id"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*GatewayResp, error)

func EnableElbIngressAccess added in v0.9.3

func EnableElbIngressAccess(client *golangsdk.ServiceClient, opts ElbIngressAccessOpts) (*GatewayResp, error)

EnableElbIngressAccess is a method to bind the ingress eip associated with an existing APIG dedicated instance. Supported only when loadbalancer_provider is set to elb.

func EnableIngressAccess added in v0.9.3

func EnableIngressAccess(client *golangsdk.ServiceClient, instanceId string, opts IngressAccessOpts) (*GatewayResp, error)

EnableIngressAccess is a method to bind and update the eip associated with an existing APIG dedicated instance.

type IngressAccessOpts added in v0.9.3

type IngressAccessOpts struct {
	// EIP ID
	EipId string `json:"eip_id,omitempty"`
}

IngressAccessOpts allows binding and updating the eip associated with an existing APIG dedicated instance with the given parameters.

type IpDetail

type IpDetail struct {
	IpAddress     string `json:"ip_address"`
	BandwidthSize int    `json:"bandwidth_size"`
}

type ListOpts

type ListOpts struct {
	Limit        int    `q:"limit"`
	InstanceID   string `q:"instance_id"`
	InstanceName string `q:"instance_name"`
	Status       string `q:"status"`
}

type NodeIps

type NodeIps struct {
	LiveData []string `json:"livedata"`
	Shubao   []string `json:"shubao"`
}

type Progress

type Progress struct {
	Progress  int    `json:"progress"`
	Status    string `json:"status"`
	ErrorCode string `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
	StartTime int64  `json:"start_time"`
	EndTime   int64  `json:"end_time"`
}

func QueryProgress

func QueryProgress(client *golangsdk.ServiceClient, id string) (*Progress, error)

type TagsUpdateOpts added in v0.9.3

type TagsUpdateOpts struct {
	InstanceId string             `json:"-" required:"true"`
	Action     string             `json:"action" required:"true"`
	Tags       []tags.ResourceTag `json:"tags" required:"true"`
}

TagsUpdateOpts is the structure used to modify instance tags.

type UpdateOpts

type UpdateOpts struct {
	ID               string `json:"-"`
	Description      string `json:"description,omitempty"`
	MaintainBegin    string `json:"maintain_begin,omitempty"`
	MaintainEnd      string `json:"maintain_end,omitempty"`
	InstanceName     string `json:"instance_name,omitempty"`
	SecGroupID       string `json:"security_group_id,omitempty"`
	VpcepServiceName string `json:"vpcep_service_name,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL