feat: replication bucket name (#440)

* chore: gofmt

* chore: update openapi gen files

* feat: add replication-bucket-name flag

* fix: fix tests

* chore: rename to replication-bucket

* feat: show remote bucket name or id

* chore: fmt fixup

* chore: update openapi to master

* chore: fix openapi generation
This commit is contained in:
Jeffrey Smith II
2022-08-18 14:21:50 -04:00
committed by GitHub
parent 051a6aafc4
commit 5c7c34f16d
22 changed files with 420 additions and 218 deletions

View File

@ -34,10 +34,11 @@ func (c Client) Create(ctx context.Context, params *BucketsCreateParams) error {
return err
}
var rr []api.RetentionRule
reqBody := api.PostBucketRequest{
OrgID: orgId,
Name: params.Name,
RetentionRules: []api.RetentionRule{},
RetentionRules: &rr,
SchemaType: &params.SchemaType,
}
if params.Description != "" {
@ -57,7 +58,7 @@ func (c Client) Create(ctx context.Context, params *BucketsCreateParams) error {
if sgd > 0 {
rule.SetShardGroupDurationSeconds(int64(sgd.Round(time.Second) / time.Second))
}
reqBody.RetentionRules = append(reqBody.RetentionRules, *rule)
*reqBody.RetentionRules = append(*reqBody.RetentionRules, *rule)
}
bucket, err := c.PostBuckets(ctx).PostBucketRequest(reqBody).Execute()