vpc

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vpciface provides an interface to enable mocking the VPC service client for testing your code.

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.

Index

Constants

View Source
const (
	ServiceName = "vpc"       // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "vpc"       // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociateCenForDescribeVpcsOutput

type AssociateCenForDescribeVpcsOutput struct {
	CenId *string `type:"string"`

	CenOwnerId *string `type:"string"`

	CenStatus *string `type:"string"`
	// contains filtered or unexported fields
}

func (AssociateCenForDescribeVpcsOutput) GoString

GoString returns the string representation

func (*AssociateCenForDescribeVpcsOutput) SetCenId

SetCenId sets the CenId field's value.

func (*AssociateCenForDescribeVpcsOutput) SetCenOwnerId

SetCenOwnerId sets the CenOwnerId field's value.

func (*AssociateCenForDescribeVpcsOutput) SetCenStatus

SetCenStatus sets the CenStatus field's value.

func (AssociateCenForDescribeVpcsOutput) String

String returns the string representation

type DescribeVpcsInput

type DescribeVpcsInput struct {
	IsDefault *bool `type:"boolean"`

	PageNumber *int64 `type:"integer"`

	PageSize *int64 `max:"100" type:"integer"`

	ProjectName *string `type:"string"`

	TagFilters []*TagFilterForDescribeVpcsInput `type:"list"`

	VpcIds []*string `type:"list"`

	VpcName *string `type:"string"`
	// contains filtered or unexported fields
}

func (DescribeVpcsInput) GoString

func (s DescribeVpcsInput) GoString() string

GoString returns the string representation

func (*DescribeVpcsInput) SetIsDefault

func (s *DescribeVpcsInput) SetIsDefault(v bool) *DescribeVpcsInput

SetIsDefault sets the IsDefault field's value.

func (*DescribeVpcsInput) SetPageNumber

func (s *DescribeVpcsInput) SetPageNumber(v int64) *DescribeVpcsInput

SetPageNumber sets the PageNumber field's value.

func (*DescribeVpcsInput) SetPageSize

func (s *DescribeVpcsInput) SetPageSize(v int64) *DescribeVpcsInput

SetPageSize sets the PageSize field's value.

func (*DescribeVpcsInput) SetProjectName

func (s *DescribeVpcsInput) SetProjectName(v string) *DescribeVpcsInput

SetProjectName sets the ProjectName field's value.

func (*DescribeVpcsInput) SetTagFilters

SetTagFilters sets the TagFilters field's value.

func (*DescribeVpcsInput) SetVpcIds

func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput

SetVpcIds sets the VpcIds field's value.

func (*DescribeVpcsInput) SetVpcName

func (s *DescribeVpcsInput) SetVpcName(v string) *DescribeVpcsInput

SetVpcName sets the VpcName field's value.

func (DescribeVpcsInput) String

func (s DescribeVpcsInput) String() string

String returns the string representation

func (*DescribeVpcsInput) Validate

func (s *DescribeVpcsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeVpcsOutput

type DescribeVpcsOutput struct {
	Metadata *response.ResponseMetadata

	PageNumber *int64 `type:"integer"`

	PageSize *int64 `type:"integer"`

	RequestId *string `type:"string"`

	TotalCount *int64 `type:"integer"`

	Vpcs []*VpcForDescribeVpcsOutput `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeVpcsOutput) GoString

func (s DescribeVpcsOutput) GoString() string

GoString returns the string representation

func (*DescribeVpcsOutput) SetPageNumber

func (s *DescribeVpcsOutput) SetPageNumber(v int64) *DescribeVpcsOutput

SetPageNumber sets the PageNumber field's value.

func (*DescribeVpcsOutput) SetPageSize

func (s *DescribeVpcsOutput) SetPageSize(v int64) *DescribeVpcsOutput

SetPageSize sets the PageSize field's value.

func (*DescribeVpcsOutput) SetRequestId

func (s *DescribeVpcsOutput) SetRequestId(v string) *DescribeVpcsOutput

SetRequestId sets the RequestId field's value.

func (*DescribeVpcsOutput) SetTotalCount

func (s *DescribeVpcsOutput) SetTotalCount(v int64) *DescribeVpcsOutput

SetTotalCount sets the TotalCount field's value.

func (*DescribeVpcsOutput) SetVpcs

SetVpcs sets the Vpcs field's value.

func (DescribeVpcsOutput) String

func (s DescribeVpcsOutput) String() string

String returns the string representation

type TagFilterForDescribeVpcsInput

type TagFilterForDescribeVpcsInput struct {
	Key *string `type:"string"`

	Values []*string `type:"list"`
	// contains filtered or unexported fields
}

func (TagFilterForDescribeVpcsInput) GoString

GoString returns the string representation

func (*TagFilterForDescribeVpcsInput) SetKey

SetKey sets the Key field's value.

func (*TagFilterForDescribeVpcsInput) SetValues

SetValues sets the Values field's value.

func (TagFilterForDescribeVpcsInput) String

String returns the string representation

type TagForDescribeVpcsOutput

type TagForDescribeVpcsOutput struct {
	Key *string `type:"string"`

	Value *string `type:"string"`
	// contains filtered or unexported fields
}

func (TagForDescribeVpcsOutput) GoString

func (s TagForDescribeVpcsOutput) GoString() string

GoString returns the string representation

func (*TagForDescribeVpcsOutput) SetKey

SetKey sets the Key field's value.

func (*TagForDescribeVpcsOutput) SetValue

SetValue sets the Value field's value.

func (TagForDescribeVpcsOutput) String

func (s TagForDescribeVpcsOutput) String() string

String returns the string representation

type VPC

type VPC struct {
	*client.Client
}

VPC provides the API operation methods for making requests to VPC. See this package's package overview docs for details on the service.

VPC methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(p client.ConfigProvider, cfgs ...*byteplus.Config) *VPC

New create int can support ssl or region locate set

func (*VPC) DescribeVpcs

func (c *VPC) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error)

DescribeVpcs API operation for VPC.

Returns bytepluserr.Error for service API and SDK errors. Use runtime type assertions with bytepluserr.Error's Code and Message methods to get detailed information about the error.

See the byteplus API reference guide for VPC's API operation DescribeVpcs for usage and error information.

func (*VPC) DescribeVpcsCommon

func (c *VPC) DescribeVpcsCommon(input *map[string]interface{}) (*map[string]interface{}, error)

DescribeVpcsCommon API operation for VPC.

Returns bytepluserr.Error for service API and SDK errors. Use runtime type assertions with bytepluserr.Error's Code and Message methods to get detailed information about the error.

See the byteplus API reference guide for VPC's API operation DescribeVpcsCommon for usage and error information.

func (*VPC) DescribeVpcsCommonRequest

func (c *VPC) DescribeVpcsCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

DescribeVpcsCommonRequest generates a "byteplus/request.Request" representing the client's request for the DescribeVpcsCommon operation. The "output" return value will be populated with the DescribeVpcsCommon request's response once the request completes successfully.

Use "Send" method on the returned DescribeVpcsCommon Request to send the API call to the service. the "output" return value is not valid until after DescribeVpcsCommon Send returns without error.

See DescribeVpcsCommon for more information on using the DescribeVpcsCommon API call, and error handling.

// Example sending a request using the DescribeVpcsCommonRequest method.
req, resp := client.DescribeVpcsCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*VPC) DescribeVpcsCommonWithContext

func (c *VPC) DescribeVpcsCommonWithContext(ctx byteplus.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

DescribeVpcsCommonWithContext is the same as DescribeVpcsCommon with the addition of the ability to pass a context and additional request options.

See DescribeVpcsCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*VPC) DescribeVpcsRequest

func (c *VPC) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput)

DescribeVpcsRequest generates a "byteplus/request.Request" representing the client's request for the DescribeVpcs operation. The "output" return value will be populated with the DescribeVpcsCommon request's response once the request completes successfully.

Use "Send" method on the returned DescribeVpcsCommon Request to send the API call to the service. the "output" return value is not valid until after DescribeVpcsCommon Send returns without error.

See DescribeVpcs for more information on using the DescribeVpcs API call, and error handling.

// Example sending a request using the DescribeVpcsRequest method.
req, resp := client.DescribeVpcsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*VPC) DescribeVpcsWithContext

func (c *VPC) DescribeVpcsWithContext(ctx byteplus.Context, input *DescribeVpcsInput, opts ...request.Option) (*DescribeVpcsOutput, error)

DescribeVpcsWithContext is the same as DescribeVpcs with the addition of the ability to pass a context and additional request options.

See DescribeVpcs for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type VPCAPI

type VPCAPI interface {
	DescribeVpcs(*DescribeVpcsInput) (*DescribeVpcsOutput, error)
	DescribeVpcsWithContext(byteplus.Context, *DescribeVpcsInput, ...request.Option) (*DescribeVpcsOutput, error)
	DescribeVpcsRequest(*DescribeVpcsInput) (*request.Request, *DescribeVpcsOutput)
}

VPCAPI provides an interface to enable mocking the vpc.VPC service client's API operation,

// byteplus sdk func uses an SDK service client to make a request to
// VPC.
func myFunc(svc VPCAPI) bool {
    // Make svc.AddBandwidthPackageIp request
}

func main() {
    sess := session.New()
    svc := vpc.New(sess)

    myFunc(svc)
}

type VpcForDescribeVpcsOutput

type VpcForDescribeVpcsOutput struct {
	AccountId *string `type:"string"`

	AssociateCens []*AssociateCenForDescribeVpcsOutput `type:"list"`

	CidrBlock *string `type:"string"`

	CreationTime *string `type:"string"`

	Description *string `type:"string"`

	DnsServers []*string `type:"list"`

	IsDefault *bool `type:"boolean"`

	NatGatewayIds []*string `type:"list"`

	NetworkAclNum *string `type:"string"`

	ProjectName *string `type:"string"`

	RouteTableIds []*string `type:"list"`

	SecurityGroupIds []*string `type:"list"`

	Status *string `type:"string"`

	SubnetIds []*string `type:"list"`

	Tags []*TagForDescribeVpcsOutput `type:"list"`

	UpdateTime *string `type:"string"`

	UserCidrBlocks []*string `type:"list"`

	VpcId *string `type:"string"`

	VpcName *string `type:"string"`
	// contains filtered or unexported fields
}

func (VpcForDescribeVpcsOutput) GoString

func (s VpcForDescribeVpcsOutput) GoString() string

GoString returns the string representation

func (*VpcForDescribeVpcsOutput) SetAccountId

SetAccountId sets the AccountId field's value.

func (*VpcForDescribeVpcsOutput) SetAssociateCens

SetAssociateCens sets the AssociateCens field's value.

func (*VpcForDescribeVpcsOutput) SetCidrBlock

SetCidrBlock sets the CidrBlock field's value.

func (*VpcForDescribeVpcsOutput) SetCreationTime

SetCreationTime sets the CreationTime field's value.

func (*VpcForDescribeVpcsOutput) SetDescription

SetDescription sets the Description field's value.

func (*VpcForDescribeVpcsOutput) SetDnsServers

SetDnsServers sets the DnsServers field's value.

func (*VpcForDescribeVpcsOutput) SetIsDefault

SetIsDefault sets the IsDefault field's value.

func (*VpcForDescribeVpcsOutput) SetNatGatewayIds

func (s *VpcForDescribeVpcsOutput) SetNatGatewayIds(v []*string) *VpcForDescribeVpcsOutput

SetNatGatewayIds sets the NatGatewayIds field's value.

func (*VpcForDescribeVpcsOutput) SetNetworkAclNum

SetNetworkAclNum sets the NetworkAclNum field's value.

func (*VpcForDescribeVpcsOutput) SetProjectName

SetProjectName sets the ProjectName field's value.

func (*VpcForDescribeVpcsOutput) SetRouteTableIds

func (s *VpcForDescribeVpcsOutput) SetRouteTableIds(v []*string) *VpcForDescribeVpcsOutput

SetRouteTableIds sets the RouteTableIds field's value.

func (*VpcForDescribeVpcsOutput) SetSecurityGroupIds

func (s *VpcForDescribeVpcsOutput) SetSecurityGroupIds(v []*string) *VpcForDescribeVpcsOutput

SetSecurityGroupIds sets the SecurityGroupIds field's value.

func (*VpcForDescribeVpcsOutput) SetStatus

SetStatus sets the Status field's value.

func (*VpcForDescribeVpcsOutput) SetSubnetIds

SetSubnetIds sets the SubnetIds field's value.

func (*VpcForDescribeVpcsOutput) SetTags

SetTags sets the Tags field's value.

func (*VpcForDescribeVpcsOutput) SetUpdateTime

SetUpdateTime sets the UpdateTime field's value.

func (*VpcForDescribeVpcsOutput) SetUserCidrBlocks

func (s *VpcForDescribeVpcsOutput) SetUserCidrBlocks(v []*string) *VpcForDescribeVpcsOutput

SetUserCidrBlocks sets the UserCidrBlocks field's value.

func (*VpcForDescribeVpcsOutput) SetVpcId

SetVpcId sets the VpcId field's value.

func (*VpcForDescribeVpcsOutput) SetVpcName

SetVpcName sets the VpcName field's value.

func (VpcForDescribeVpcsOutput) String

func (s VpcForDescribeVpcsOutput) String() string

String returns the string representation

Jump to

Keyboard shortcuts

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