planetscale 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.licenses/go/github.com/planetscale/planetscale-go/planetscale.dep.yml +1 -1
- data/README.md +2 -2
- data/go.mod +1 -1
- data/go.sum +2 -0
- data/lib/planetscale/version.rb +1 -1
- data/proxy/planetscale-darwin.so +0 -0
- data/proxy/planetscale-linux.so +0 -0
- data/vendor/github.com/planetscale/planetscale-go/planetscale/branches.go +1 -9
- data/vendor/github.com/planetscale/planetscale-go/planetscale/organizations.go +25 -0
- data/vendor/modules.txt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9b82cff71169af3bf857f8fc3e664f2339817f8f553e5f18fb6e5a2881d062
|
4
|
+
data.tar.gz: b1fb4a43eacd5ee272ef3db6a72ddd6d75eebc093af3249598e4f389c61030ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26af151df726b4df8d427b7f0631676c1600ada416f7bbace0b7db5ce3bf6d12477744274f0811b65f006f86185d9cde808f3f8c675ecbdc4af4bdd6c5b1fb49
|
7
|
+
data.tar.gz: 8fb1b2bd0f74f6b4a812d78e135c48f234350f1ba602cd21c9d40f46dac6a4d7ba072aeca4fd69f326652a478cf42a948869f7e2b041f01bf73e311818978e6a
|
data/README.md
CHANGED
@@ -82,8 +82,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
82
82
|
|
83
83
|
## Contributing
|
84
84
|
|
85
|
-
Bug reports and pull requests are welcome.
|
85
|
+
Bug reports and pull requests are welcome.
|
86
86
|
|
87
87
|
## License
|
88
88
|
|
89
|
-
|
89
|
+
This gem is licensed under the [Apache License Version 2.0](LICENSE).
|
data/go.mod
CHANGED
@@ -7,7 +7,7 @@ require (
|
|
7
7
|
github.com/golang/protobuf v1.5.2 // indirect
|
8
8
|
github.com/gorilla/mux v1.8.0
|
9
9
|
github.com/mitchellh/go-homedir v1.1.0
|
10
|
-
github.com/planetscale/planetscale-go v0.
|
10
|
+
github.com/planetscale/planetscale-go v0.38.0
|
11
11
|
github.com/planetscale/sql-proxy v0.8.0
|
12
12
|
go.uber.org/zap v1.18.1
|
13
13
|
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 // indirect
|
data/go.sum
CHANGED
@@ -132,6 +132,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
|
132
132
|
github.com/planetscale/planetscale-go v0.33.0/go.mod h1:99n+tnrvJaaUako3UZNCiC1dTtSPKr81GqAUNibw5pc=
|
133
133
|
github.com/planetscale/planetscale-go v0.36.0 h1:voNRDQ7FgbpuVJKlLZm6QgIByp0UnvyRtGmVZWQlSZY=
|
134
134
|
github.com/planetscale/planetscale-go v0.36.0/go.mod h1:99n+tnrvJaaUako3UZNCiC1dTtSPKr81GqAUNibw5pc=
|
135
|
+
github.com/planetscale/planetscale-go v0.38.0 h1:Sn6Xx1/u3xpU3v/mt1CdR38JXcTjej56rUpwuA3A5EY=
|
136
|
+
github.com/planetscale/planetscale-go v0.38.0/go.mod h1:99n+tnrvJaaUako3UZNCiC1dTtSPKr81GqAUNibw5pc=
|
135
137
|
github.com/planetscale/sql-proxy v0.8.0 h1:EeWQhocldn0ldrTxPIIIrbHWWqNqHrNFYiSdp4tUY0E=
|
136
138
|
github.com/planetscale/sql-proxy v0.8.0/go.mod h1:vOcL5jRMzaza+8q79hRRhMj3ABpYHy3cgenr2FOhDWU=
|
137
139
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
data/lib/planetscale/version.rb
CHANGED
data/proxy/planetscale-darwin.so
CHANGED
Binary file
|
data/proxy/planetscale-linux.so
CHANGED
Binary file
|
@@ -103,17 +103,9 @@ type databaseBranchesService struct {
|
|
103
103
|
client *Client
|
104
104
|
}
|
105
105
|
|
106
|
-
type DatabaseBranchCredentials struct {
|
107
|
-
GatewayHost string `json:"mysql_gateway_host"`
|
108
|
-
GatewayPort int `json:"mysql_gateway_port"`
|
109
|
-
User string `json:"mysql_gateway_user"`
|
110
|
-
Password string `json:"mysql_gateway_pass"`
|
111
|
-
}
|
112
|
-
|
113
106
|
// DatabaseBranchStatus represents the status of a PlanetScale database branch.
|
114
107
|
type DatabaseBranchStatus struct {
|
115
|
-
Ready
|
116
|
-
Credentials DatabaseBranchCredentials `json:"credentials"`
|
108
|
+
Ready bool `json:"ready"`
|
117
109
|
}
|
118
110
|
|
119
111
|
var _ DatabaseBranchesService = &databaseBranchesService{}
|
@@ -22,6 +22,13 @@ type GetOrganizationRequest struct {
|
|
22
22
|
type OrganizationsService interface {
|
23
23
|
Get(context.Context, *GetOrganizationRequest) (*Organization, error)
|
24
24
|
List(context.Context) ([]*Organization, error)
|
25
|
+
ListRegions(context.Context, *ListOrganizationRegionsRequest) ([]*Region, error)
|
26
|
+
}
|
27
|
+
|
28
|
+
// ListRegionsRequest encapsulates the request for getting a list of regions for
|
29
|
+
// an organization.
|
30
|
+
type ListOrganizationRegionsRequest struct {
|
31
|
+
Organization string
|
25
32
|
}
|
26
33
|
|
27
34
|
// Organization represents a PlanetScale organization.
|
@@ -76,3 +83,21 @@ func (o *organizationsService) List(ctx context.Context) ([]*Organization, error
|
|
76
83
|
|
77
84
|
return orgResponse.Organizations, nil
|
78
85
|
}
|
86
|
+
|
87
|
+
type listRegionsResponse struct {
|
88
|
+
Regions []*Region `json:"data"`
|
89
|
+
}
|
90
|
+
|
91
|
+
func (o *organizationsService) ListRegions(ctx context.Context, listReq *ListOrganizationRegionsRequest) ([]*Region, error) {
|
92
|
+
req, err := o.client.newRequest(http.MethodGet, fmt.Sprintf("%s/%s/regions", organizationsAPIPath, listReq.Organization), nil)
|
93
|
+
if err != nil {
|
94
|
+
return nil, err
|
95
|
+
}
|
96
|
+
|
97
|
+
listResponse := &listRegionsResponse{}
|
98
|
+
if err := o.client.do(ctx, req, &listResponse); err != nil {
|
99
|
+
return nil, err
|
100
|
+
}
|
101
|
+
|
102
|
+
return listResponse.Regions, nil
|
103
|
+
}
|
data/vendor/modules.txt
CHANGED
@@ -14,7 +14,7 @@ github.com/hashicorp/go-cleanhttp
|
|
14
14
|
github.com/mitchellh/go-homedir
|
15
15
|
# github.com/pkg/errors v0.9.1
|
16
16
|
github.com/pkg/errors
|
17
|
-
# github.com/planetscale/planetscale-go v0.
|
17
|
+
# github.com/planetscale/planetscale-go v0.38.0
|
18
18
|
## explicit
|
19
19
|
github.com/planetscale/planetscale-go/planetscale
|
20
20
|
# github.com/planetscale/sql-proxy v0.8.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: planetscale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Van Wiggeren
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-08-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|