-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] enhance the error category of the loadbalancer api group
- Loading branch information
1 parent
3ec9945
commit 4e6f9c9
Showing
8 changed files
with
74 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package inter | ||
|
||
func NewCreateLoadBalancerRequest(puserId, pname, ppackageId, pbeSubnetId, psubnetId string) ICreateLoadBalancerRequest { | ||
opt := new(CreateLoadBalancerRequest) | ||
opt.SetPortalUserId(puserId) | ||
opt.Name = pname | ||
opt.PackageID = ppackageId | ||
opt.Scheme = InterVpcLoadBalancerScheme | ||
opt.BackEndSubnetId = pbeSubnetId | ||
opt.SubnetID = psubnetId | ||
opt.Type = CreateOptsTypeOptLayer4 | ||
return opt | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package v2 | ||
|
||
func NewCreateLoadBalancerRequest(pname string) ICreateLoadBalancerRequest { | ||
return &CreateLoadBalancerRequest{ | ||
Name: pname, | ||
Scheme: InternetLoadBalancerScheme, | ||
Type: LoadBalancerTypeLayer4, | ||
} | ||
} | ||
|
||
func NewGetLoadBalancerByIdRequest(plbId string) IGetLoadBalancerByIdRequest { | ||
opts := new(GetLoadBalancerByIdRequest) | ||
opts.LoadBalancerId = plbId | ||
return opts | ||
} | ||
|
||
func NewListLoadBalancersRequest(ppage, psize int) IListLoadBalancersRequest { | ||
opts := new(ListLoadBalancersRequest) | ||
opts.Page = ppage | ||
opts.Size = psize | ||
return opts | ||
} | ||
|
||
func NewDeleteLoadBalancerByIdRequest(plbId string) IDeleteLoadBalancerByIdRequest { | ||
opts := new(DeleteLoadBalancerByIdRequest) | ||
opts.LoadBalancerId = plbId | ||
return opts | ||
} |