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
- type AssociateCenForDescribeVpcsOutput
- func (s AssociateCenForDescribeVpcsOutput) GoString() string
- func (s *AssociateCenForDescribeVpcsOutput) SetCenId(v string) *AssociateCenForDescribeVpcsOutput
- func (s *AssociateCenForDescribeVpcsOutput) SetCenOwnerId(v string) *AssociateCenForDescribeVpcsOutput
- func (s *AssociateCenForDescribeVpcsOutput) SetCenStatus(v string) *AssociateCenForDescribeVpcsOutput
- func (s AssociateCenForDescribeVpcsOutput) String() string
- type DescribeVpcsInput
- func (s DescribeVpcsInput) GoString() string
- func (s *DescribeVpcsInput) SetIsDefault(v bool) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetPageNumber(v int64) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetPageSize(v int64) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetProjectName(v string) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetTagFilters(v []*TagFilterForDescribeVpcsInput) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput
- func (s *DescribeVpcsInput) SetVpcName(v string) *DescribeVpcsInput
- func (s DescribeVpcsInput) String() string
- func (s *DescribeVpcsInput) Validate() error
- type DescribeVpcsOutput
- func (s DescribeVpcsOutput) GoString() string
- func (s *DescribeVpcsOutput) SetPageNumber(v int64) *DescribeVpcsOutput
- func (s *DescribeVpcsOutput) SetPageSize(v int64) *DescribeVpcsOutput
- func (s *DescribeVpcsOutput) SetRequestId(v string) *DescribeVpcsOutput
- func (s *DescribeVpcsOutput) SetTotalCount(v int64) *DescribeVpcsOutput
- func (s *DescribeVpcsOutput) SetVpcs(v []*VpcForDescribeVpcsOutput) *DescribeVpcsOutput
- func (s DescribeVpcsOutput) String() string
- type TagFilterForDescribeVpcsInput
- type TagForDescribeVpcsOutput
- type VPC
- func (c *VPC) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error)
- func (c *VPC) DescribeVpcsCommon(input *map[string]interface{}) (*map[string]interface{}, error)
- func (c *VPC) DescribeVpcsCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
- func (c *VPC) DescribeVpcsCommonWithContext(ctx byteplus.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
- func (c *VPC) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput)
- func (c *VPC) DescribeVpcsWithContext(ctx byteplus.Context, input *DescribeVpcsInput, opts ...request.Option) (*DescribeVpcsOutput, error)
- type VPCAPI
- type VpcForDescribeVpcsOutput
- func (s VpcForDescribeVpcsOutput) GoString() string
- func (s *VpcForDescribeVpcsOutput) SetAccountId(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetAssociateCens(v []*AssociateCenForDescribeVpcsOutput) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetCidrBlock(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetCreationTime(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetDescription(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetDnsServers(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetIsDefault(v bool) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetNatGatewayIds(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetNetworkAclNum(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetProjectName(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetRouteTableIds(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetSecurityGroupIds(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetStatus(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetSubnetIds(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetTags(v []*TagForDescribeVpcsOutput) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetUpdateTime(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetUserCidrBlocks(v []*string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetVpcId(v string) *VpcForDescribeVpcsOutput
- func (s *VpcForDescribeVpcsOutput) SetVpcName(v string) *VpcForDescribeVpcsOutput
- func (s VpcForDescribeVpcsOutput) String() string
Constants ¶
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 ¶
func (s AssociateCenForDescribeVpcsOutput) GoString() string
GoString returns the string representation
func (*AssociateCenForDescribeVpcsOutput) SetCenId ¶
func (s *AssociateCenForDescribeVpcsOutput) SetCenId(v string) *AssociateCenForDescribeVpcsOutput
SetCenId sets the CenId field's value.
func (*AssociateCenForDescribeVpcsOutput) SetCenOwnerId ¶
func (s *AssociateCenForDescribeVpcsOutput) SetCenOwnerId(v string) *AssociateCenForDescribeVpcsOutput
SetCenOwnerId sets the CenOwnerId field's value.
func (*AssociateCenForDescribeVpcsOutput) SetCenStatus ¶
func (s *AssociateCenForDescribeVpcsOutput) SetCenStatus(v string) *AssociateCenForDescribeVpcsOutput
SetCenStatus sets the CenStatus field's value.
func (AssociateCenForDescribeVpcsOutput) String ¶
func (s AssociateCenForDescribeVpcsOutput) String() 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 ¶
func (s *DescribeVpcsInput) SetTagFilters(v []*TagFilterForDescribeVpcsInput) *DescribeVpcsInput
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 ¶
func (s *DescribeVpcsOutput) SetVpcs(v []*VpcForDescribeVpcsOutput) *DescribeVpcsOutput
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 ¶
func (s TagFilterForDescribeVpcsInput) GoString() string
GoString returns the string representation
func (*TagFilterForDescribeVpcsInput) SetKey ¶
func (s *TagFilterForDescribeVpcsInput) SetKey(v string) *TagFilterForDescribeVpcsInput
SetKey sets the Key field's value.
func (*TagFilterForDescribeVpcsInput) SetValues ¶
func (s *TagFilterForDescribeVpcsInput) SetValues(v []*string) *TagFilterForDescribeVpcsInput
SetValues sets the Values field's value.
func (TagFilterForDescribeVpcsInput) String ¶
func (s TagFilterForDescribeVpcsInput) String() 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 ¶
func (s *TagForDescribeVpcsOutput) SetKey(v string) *TagForDescribeVpcsOutput
SetKey sets the Key field's value.
func (*TagForDescribeVpcsOutput) SetValue ¶
func (s *TagForDescribeVpcsOutput) SetValue(v string) *TagForDescribeVpcsOutput
SetValue sets the Value field's value.
func (TagForDescribeVpcsOutput) String ¶
func (s TagForDescribeVpcsOutput) String() string
String returns the string representation
type VPC ¶
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 ¶
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 ¶
func (s *VpcForDescribeVpcsOutput) SetAccountId(v string) *VpcForDescribeVpcsOutput
SetAccountId sets the AccountId field's value.
func (*VpcForDescribeVpcsOutput) SetAssociateCens ¶
func (s *VpcForDescribeVpcsOutput) SetAssociateCens(v []*AssociateCenForDescribeVpcsOutput) *VpcForDescribeVpcsOutput
SetAssociateCens sets the AssociateCens field's value.
func (*VpcForDescribeVpcsOutput) SetCidrBlock ¶
func (s *VpcForDescribeVpcsOutput) SetCidrBlock(v string) *VpcForDescribeVpcsOutput
SetCidrBlock sets the CidrBlock field's value.
func (*VpcForDescribeVpcsOutput) SetCreationTime ¶
func (s *VpcForDescribeVpcsOutput) SetCreationTime(v string) *VpcForDescribeVpcsOutput
SetCreationTime sets the CreationTime field's value.
func (*VpcForDescribeVpcsOutput) SetDescription ¶
func (s *VpcForDescribeVpcsOutput) SetDescription(v string) *VpcForDescribeVpcsOutput
SetDescription sets the Description field's value.
func (*VpcForDescribeVpcsOutput) SetDnsServers ¶
func (s *VpcForDescribeVpcsOutput) SetDnsServers(v []*string) *VpcForDescribeVpcsOutput
SetDnsServers sets the DnsServers field's value.
func (*VpcForDescribeVpcsOutput) SetIsDefault ¶
func (s *VpcForDescribeVpcsOutput) SetIsDefault(v bool) *VpcForDescribeVpcsOutput
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 ¶
func (s *VpcForDescribeVpcsOutput) SetNetworkAclNum(v string) *VpcForDescribeVpcsOutput
SetNetworkAclNum sets the NetworkAclNum field's value.
func (*VpcForDescribeVpcsOutput) SetProjectName ¶
func (s *VpcForDescribeVpcsOutput) SetProjectName(v string) *VpcForDescribeVpcsOutput
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 ¶
func (s *VpcForDescribeVpcsOutput) SetStatus(v string) *VpcForDescribeVpcsOutput
SetStatus sets the Status field's value.
func (*VpcForDescribeVpcsOutput) SetSubnetIds ¶
func (s *VpcForDescribeVpcsOutput) SetSubnetIds(v []*string) *VpcForDescribeVpcsOutput
SetSubnetIds sets the SubnetIds field's value.
func (*VpcForDescribeVpcsOutput) SetTags ¶
func (s *VpcForDescribeVpcsOutput) SetTags(v []*TagForDescribeVpcsOutput) *VpcForDescribeVpcsOutput
SetTags sets the Tags field's value.
func (*VpcForDescribeVpcsOutput) SetUpdateTime ¶
func (s *VpcForDescribeVpcsOutput) SetUpdateTime(v string) *VpcForDescribeVpcsOutput
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 ¶
func (s *VpcForDescribeVpcsOutput) SetVpcId(v string) *VpcForDescribeVpcsOutput
SetVpcId sets the VpcId field's value.
func (*VpcForDescribeVpcsOutput) SetVpcName ¶
func (s *VpcForDescribeVpcsOutput) SetVpcName(v string) *VpcForDescribeVpcsOutput
SetVpcName sets the VpcName field's value.
func (VpcForDescribeVpcsOutput) String ¶
func (s VpcForDescribeVpcsOutput) String() string
String returns the string representation