Skip to content

Commit 7ca559d

Browse files
authored
Merge pull request #82 from planetscale/dbussink/cleanup-unused-code
Cleanup code that is not used / provided
2 parents a1acc10 + 5bc6708 commit 7ca559d

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

Diff for: planetscale/branches.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,9 @@ type databaseBranchesService struct {
103103
client *Client
104104
}
105105

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-
113106
// DatabaseBranchStatus represents the status of a PlanetScale database branch.
114107
type DatabaseBranchStatus struct {
115-
Ready bool `json:"ready"`
116-
Credentials DatabaseBranchCredentials `json:"credentials"`
108+
Ready bool `json:"ready"`
117109
}
118110

119111
var _ DatabaseBranchesService = &databaseBranchesService{}

Diff for: planetscale/branches_test.go

+1-13
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,7 @@ func TestDatabaseBranches_Status(t *testing.T) {
149149
"type": "BranchStatus",
150150
"ready": true,
151151
"created_at": "2021-01-14T10:19:23.000Z",
152-
"updated_at": "2021-01-14T10:19:23.000Z",
153-
"credentials": {
154-
"mysql_gateway_host": "test-host",
155-
"mysql_gateway_port": 3306,
156-
"mysql_gateway_user": "root",
157-
"mysql_gateway_pass": "password"
158-
}
152+
"updated_at": "2021-01-14T10:19:23.000Z"
159153
}`
160154

161155
_, err := w.Write([]byte(out))
@@ -178,12 +172,6 @@ func TestDatabaseBranches_Status(t *testing.T) {
178172

179173
want := &DatabaseBranchStatus{
180174
Ready: true,
181-
Credentials: DatabaseBranchCredentials{
182-
GatewayHost: "test-host",
183-
GatewayPort: 3306,
184-
User: "root",
185-
Password: "password",
186-
},
187175
}
188176

189177
c.Assert(err, qt.IsNil)

0 commit comments

Comments
 (0)