Skip to content

Commit

Permalink
Fix bugs in rds
Browse files Browse the repository at this point in the history
  • Loading branch information
duanliguo committed Dec 4, 2024
1 parent feab912 commit a1bc6ec
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion bce/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

// Constants and default values for the package bce
const (
SDK_VERSION = "0.9.203"
SDK_VERSION = "0.9.204"
URI_PREFIX = "/" // now support uri without prefix "v1" so just set root path
DEFAULT_DOMAIN = "baidubce.com"
DEFAULT_PROTOCOL = "http"
Expand Down
2 changes: 1 addition & 1 deletion doc/RDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ for _, e := range result.InstanceIds {
```go
// import "github.com/baidubce/bce-sdk-go/services/rds"

args := &rds.CreateRDSReadReplicaArgs{
args := &rds.CreateReadReplicaArgs{
//主实例ID,必选
SourceInstanceId: "sourceInstanceId"
// 计费相关参数,PaymentTiming取值为 预付费:Prepaid,后付费:Postpaid;Reservation:支付方式为后付费时不需要设置,预付费时必须设置;必选
Expand Down
2 changes: 1 addition & 1 deletion services/rds/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func TestClient_CreateReadReplica(t *testing.T) {
var sub = []SubnetMap{
subnets,
}
args := &CreateRDSReadReplicaArgs{
args := &CreateReadReplicaArgs{
SourceInstanceId: RDS_ID,
CpuCount: 1,
MemoryCapacity: 2,
Expand Down
20 changes: 0 additions & 20 deletions services/rds/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,6 @@ type CreateResult struct {
}

type CreateReadReplicaArgs struct {
ClientToken string `json:"-"`
Billing Billing `json:"billing"`
PurchaseCount int `json:"purchaseCount,omitempty"`
SourceInstanceId string `json:"sourceInstanceId"`
InstanceName string `json:"instanceName,omitempty"`
CpuCount int `json:"cpuCount"`
MemoryCapacity float64 `json:"memoryCapacity"`
VolumeCapacity int `json:"volumeCapacity"`
ZoneNames []string `json:"zoneNames,omitempty"`
VpcId string `json:"vpcId,omitempty"`
IsDirectPay bool `json:"isDirectPay,omitempty"`
Subnets []SubnetMap `json:"subnets,omitempty"`
Tags []model.TagModel `json:"tags,omitempty"`
DiskIoType string `json:"diskIoType,omitempty"`
Ovip string `json:"ovip,omitempty"`
EntryPort string `json:"entryPort,omitempty"`
ResourceGroupId string `json:"resourceGroupId,omitempty"`
}

type CreateRDSReadReplicaArgs struct {
ClientToken string `json:"-"`
Billing Billing `json:"billing"`
PurchaseCount int `json:"purchaseCount,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion services/rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Client) CreateRds(args *CreateRdsArgs) (*CreateResult, error) {
// RETURNS:
// - *InstanceIds: the result of create a readReplica RDS, contains the readReplica RDS's instanceIds
// - error: nil if success otherwise the specific error
func (c *Client) CreateReadReplica(args *CreateRDSReadReplicaArgs) (*CreateResult, error) {
func (c *Client) CreateReadReplica(args *CreateReadReplicaArgs) (*CreateResult, error) {
if args == nil {
return nil, fmt.Errorf("unset args")
}
Expand Down

0 comments on commit a1bc6ec

Please sign in to comment.