Skip to content

Commit cb32f6f

Browse files
committed
Expose access url in database branch struct
This ensures we have access in dependencies to the host URL and we can use that instead of trying to construct something manually. Also removes the dbutil package which isn't used anywhere and would need big refactors for the new access url pattern. It's easier to remove it.
1 parent e4deb7e commit cb32f6f

File tree

3 files changed

+8
-342
lines changed

3 files changed

+8
-342
lines changed

Diff for: planetscale/branches.go

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import (
1111

1212
// DatabaseBranch represents a database branch.
1313
type DatabaseBranch struct {
14-
Name string `json:"name"`
15-
ParentBranch string `json:"parent_branch"`
16-
Region Region `json:"region"`
17-
Production bool `json:"production"`
18-
CreatedAt time.Time `json:"created_at"`
19-
UpdatedAt time.Time `json:"updated_at"`
20-
Status string `json:"status,omitempty"`
14+
Name string `json:"name"`
15+
ParentBranch string `json:"parent_branch"`
16+
Region Region `json:"region"`
17+
Production bool `json:"production"`
18+
CreatedAt time.Time `json:"created_at"`
19+
UpdatedAt time.Time `json:"updated_at"`
20+
AccessHostURL string `json:"access_host_url"`
21+
Status string `json:"status,omitempty"`
2122
}
2223

2324
type databaseBranchesResponse struct {

Diff for: planetscale/dbutil/dbutil.go

-147
This file was deleted.

Diff for: planetscale/dbutil/dbutil_test.go

-188
This file was deleted.

0 commit comments

Comments
 (0)