-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathinterface.go
More file actions
executable file
·115 lines (85 loc) · 4.9 KB
/
interface.go
File metadata and controls
executable file
·115 lines (85 loc) · 4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package postgres
import (
"context"
)
// Use the Postgres API to create and manage Lakebase Autoscaling Postgres
// infrastructure, including projects, branches, compute endpoints, and roles.
//
// This API manages database infrastructure only. To query or modify data, use
// the Data API or direct SQL connections.
//
// **About resource IDs and names**
//
// Resources are identified by hierarchical resource names like
// `projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}`. The
// `name` field on each resource contains this full path and is output-only.
// Note that `name` refers to this resource path, not the user-visible
// `display_name`.
//
// Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type PostgresService interface {
// Creates a new database branch in the project.
CreateBranch(ctx context.Context, request CreateBranchRequest) (*Operation, error)
// Create a Database.
//
// Creates a database in the specified branch. A branch can have multiple
// databases.
CreateDatabase(ctx context.Context, request CreateDatabaseRequest) (*Operation, error)
// Creates a new compute endpoint in the branch.
CreateEndpoint(ctx context.Context, request CreateEndpointRequest) (*Operation, error)
// Creates a new Lakebase Autoscaling Postgres database project, which
// contains branches and compute endpoints.
CreateProject(ctx context.Context, request CreateProjectRequest) (*Operation, error)
// Creates a new Postgres role in the branch.
CreateRole(ctx context.Context, request CreateRoleRequest) (*Operation, error)
// Deletes the specified database branch.
DeleteBranch(ctx context.Context, request DeleteBranchRequest) (*Operation, error)
// Delete a Database.
DeleteDatabase(ctx context.Context, request DeleteDatabaseRequest) (*Operation, error)
// Deletes the specified compute endpoint.
DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) (*Operation, error)
// Deletes the specified database project.
DeleteProject(ctx context.Context, request DeleteProjectRequest) (*Operation, error)
// Deletes the specified Postgres role.
DeleteRole(ctx context.Context, request DeleteRoleRequest) (*Operation, error)
// Generate OAuth credentials for a Postgres database.
GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
// Retrieves information about the specified database branch.
GetBranch(ctx context.Context, request GetBranchRequest) (*Branch, error)
// Get a Database.
GetDatabase(ctx context.Context, request GetDatabaseRequest) (*Database, error)
// Retrieves information about the specified compute endpoint, including its
// connection details and operational state.
GetEndpoint(ctx context.Context, request GetEndpointRequest) (*Endpoint, error)
// Retrieves the status of a long-running operation.
GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)
// Retrieves information about the specified database project.
GetProject(ctx context.Context, request GetProjectRequest) (*Project, error)
// Retrieves information about the specified Postgres role, including its
// authentication method and permissions.
GetRole(ctx context.Context, request GetRoleRequest) (*Role, error)
// Returns a paginated list of database branches in the project.
ListBranches(ctx context.Context, request ListBranchesRequest) (*ListBranchesResponse, error)
// List Databases.
ListDatabases(ctx context.Context, request ListDatabasesRequest) (*ListDatabasesResponse, error)
// Returns a paginated list of compute endpoints in the branch.
ListEndpoints(ctx context.Context, request ListEndpointsRequest) (*ListEndpointsResponse, error)
// Returns a paginated list of database projects in the workspace that the
// user has permission to access.
ListProjects(ctx context.Context, request ListProjectsRequest) (*ListProjectsResponse, error)
// Returns a paginated list of Postgres roles in the branch.
ListRoles(ctx context.Context, request ListRolesRequest) (*ListRolesResponse, error)
// Updates the specified database branch. You can set this branch as the
// project's default branch, or protect/unprotect it.
UpdateBranch(ctx context.Context, request UpdateBranchRequest) (*Operation, error)
// Update a Database.
UpdateDatabase(ctx context.Context, request UpdateDatabaseRequest) (*Operation, error)
// Updates the specified compute endpoint. You can update autoscaling
// limits, suspend timeout, or enable/disable the compute endpoint.
UpdateEndpoint(ctx context.Context, request UpdateEndpointRequest) (*Operation, error)
// Updates the specified database project.
UpdateProject(ctx context.Context, request UpdateProjectRequest) (*Operation, error)
// Update a role for a branch.
UpdateRole(ctx context.Context, request UpdateRoleRequest) (*Operation, error)
}