Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func Pointer[T any](v T) *T
- func String(s string) *string
- type BackupPolicies
- func (s *BackupPolicies) CreatePostgresBackupPolicy(ctx context.Context, request operations.CreatePostgresBackupPolicyRequest, ...) (*operations.CreatePostgresBackupPolicyResponse, error)
- func (s *BackupPolicies) CreateVitessBackupPolicy(ctx context.Context, request operations.CreateVitessBackupPolicyRequest, ...) (*operations.CreateVitessBackupPolicyResponse, error)
- func (s *BackupPolicies) DeletePostgresBackupPolicy(ctx context.Context, request operations.DeletePostgresBackupPolicyRequest, ...) (*operations.DeletePostgresBackupPolicyResponse, error)
- func (s *BackupPolicies) DeleteVitessBackupPolicy(ctx context.Context, request operations.DeleteVitessBackupPolicyRequest, ...) (*operations.DeleteVitessBackupPolicyResponse, error)
- func (s *BackupPolicies) GetPostgresBackupPolicy(ctx context.Context, request operations.GetPostgresBackupPolicyRequest, ...) (*operations.GetPostgresBackupPolicyResponse, error)
- func (s *BackupPolicies) GetVitessBackupPolicy(ctx context.Context, request operations.GetVitessBackupPolicyRequest, ...) (*operations.GetVitessBackupPolicyResponse, error)
- func (s *BackupPolicies) ListPostgresBackupPolicies(ctx context.Context, request operations.ListPostgresBackupPoliciesRequest, ...) (*operations.ListPostgresBackupPoliciesResponse, error)
- func (s *BackupPolicies) ListVitessBackupPolicies(ctx context.Context, request operations.ListVitessBackupPoliciesRequest, ...) (*operations.ListVitessBackupPoliciesResponse, error)
- func (s *BackupPolicies) UpdatePostgresBackupPolicy(ctx context.Context, request operations.UpdatePostgresBackupPolicyRequest, ...) (*operations.UpdatePostgresBackupPolicyResponse, error)
- func (s *BackupPolicies) UpdateVitessBackupPolicy(ctx context.Context, request operations.UpdateVitessBackupPolicyRequest, ...) (*operations.UpdateVitessBackupPolicyResponse, error)
- type Backups
- func (s *Backups) CreatePostgresBranchBackup(ctx context.Context, request operations.CreatePostgresBranchBackupRequest, ...) (*operations.CreatePostgresBranchBackupResponse, error)
- func (s *Backups) CreateVitessBranchBackup(ctx context.Context, request operations.CreateVitessBranchBackupRequest, ...) (*operations.CreateVitessBranchBackupResponse, error)
- func (s *Backups) DeletePostgresBranchBackup(ctx context.Context, request operations.DeletePostgresBranchBackupRequest, ...) (*operations.DeletePostgresBranchBackupResponse, error)
- func (s *Backups) DeleteVitessBranchBackup(ctx context.Context, request operations.DeleteVitessBranchBackupRequest, ...) (*operations.DeleteVitessBranchBackupResponse, error)
- func (s *Backups) GetPostgresBranchBackup(ctx context.Context, request operations.GetPostgresBranchBackupRequest, ...) (*operations.GetPostgresBranchBackupResponse, error)
- func (s *Backups) GetPostgresBranchBackupWaitForComplete() polling.ConfigFunc
- func (s *Backups) GetVitessBranchBackup(ctx context.Context, request operations.GetVitessBranchBackupRequest, ...) (*operations.GetVitessBranchBackupResponse, error)
- func (s *Backups) GetVitessBranchBackupWaitForComplete() polling.ConfigFunc
- func (s *Backups) ListPostgresBranchBackups(ctx context.Context, request operations.ListPostgresBranchBackupsRequest, ...) (*operations.ListPostgresBranchBackupsResponse, error)
- func (s *Backups) ListVitessBranchBackups(ctx context.Context, request operations.ListVitessBranchBackupsRequest, ...) (*operations.ListVitessBranchBackupsResponse, error)
- type BranchChanges
- func (s *BranchChanges) ApplyPostgresBranchTerraformChanges(ctx context.Context, ...) (*operations.ApplyPostgresBranchTerraformChangesResponse, error)
- func (s *BranchChanges) GetBranchChangeRequest(ctx context.Context, request operations.GetBranchChangeRequestRequest, ...) (*operations.GetBranchChangeRequestResponse, error)
- func (s *BranchChanges) GetBranchChangeRequestWaitForChangeRequestComplete() polling.ConfigFunc
- type DatabaseBranchPasswords
- func (s *DatabaseBranchPasswords) CreatePassword(ctx context.Context, request operations.CreatePasswordRequest, ...) (*operations.CreatePasswordResponse, error)
- func (s *DatabaseBranchPasswords) DeletePassword(ctx context.Context, request operations.DeletePasswordRequest, ...) (*operations.DeletePasswordResponse, error)
- func (s *DatabaseBranchPasswords) GetPassword(ctx context.Context, request operations.GetPasswordRequest, ...) (*operations.GetPasswordResponse, error)
- func (s *DatabaseBranchPasswords) ListPasswords(ctx context.Context, request operations.ListPasswordsRequest, ...) (*operations.ListPasswordsResponse, error)
- func (s *DatabaseBranchPasswords) UpdatePassword(ctx context.Context, request operations.UpdatePasswordRequest, ...) (*operations.UpdatePasswordResponse, error)
- type DatabaseBranches
- func (s *DatabaseBranches) CreatePostgresBranch(ctx context.Context, request operations.CreatePostgresBranchRequest, ...) (*operations.CreatePostgresBranchResponse, error)
- func (s *DatabaseBranches) CreateVitessBranch(ctx context.Context, request operations.CreateVitessBranchRequest, ...) (*operations.CreateVitessBranchResponse, error)
- func (s *DatabaseBranches) DeletePostgresBranch(ctx context.Context, request operations.DeletePostgresBranchRequest, ...) (*operations.DeletePostgresBranchResponse, error)
- func (s *DatabaseBranches) DeleteVitessBranch(ctx context.Context, request operations.DeleteVitessBranchRequest, ...) (*operations.DeleteVitessBranchResponse, error)
- func (s *DatabaseBranches) GetPostgresBranch(ctx context.Context, request operations.GetPostgresBranchRequest, ...) (*operations.GetPostgresBranchResponse, error)
- func (s *DatabaseBranches) GetPostgresBranchWaitForReady() polling.ConfigFunc
- func (s *DatabaseBranches) GetVitessBranch(ctx context.Context, request operations.GetVitessBranchRequest, ...) (*operations.GetVitessBranchResponse, error)
- func (s *DatabaseBranches) GetVitessBranchWaitForReady() polling.ConfigFunc
- func (s *DatabaseBranches) UpdatePostgresBranch(ctx context.Context, request operations.UpdatePostgresBranchRequest, ...) (*operations.UpdatePostgresBranchResponse, error)
- func (s *DatabaseBranches) UpdateVitessBranch(ctx context.Context, request operations.UpdateVitessBranchRequest, ...) (*operations.UpdateVitessBranchResponse, error)
- type Databases
- func (s *Databases) GetPostgresDatabase(ctx context.Context, request operations.GetPostgresDatabaseRequest, ...) (*operations.GetPostgresDatabaseResponse, error)
- func (s *Databases) GetVitessDatabase(ctx context.Context, request operations.GetVitessDatabaseRequest, ...) (*operations.GetVitessDatabaseResponse, error)
- func (s *Databases) ListDatabases(ctx context.Context, request operations.ListDatabasesRequest, ...) (*operations.ListDatabasesResponse, error)
- type HTTPClient
- type Organizations
- func (s *Organizations) GetOrganization(ctx context.Context, request operations.GetOrganizationRequest, ...) (*operations.GetOrganizationResponse, error)
- func (s *Organizations) ListOrganizations(ctx context.Context, request operations.ListOrganizationsRequest, ...) (*operations.ListOrganizationsResponse, error)
- type PlanetScale
- type Roles
- func (s *Roles) CreateRole(ctx context.Context, request operations.CreateRoleRequest, ...) (*operations.CreateRoleResponse, error)
- func (s *Roles) DeleteRole(ctx context.Context, request operations.DeleteRoleRequest, ...) (*operations.DeleteRoleResponse, error)
- func (s *Roles) GetRole(ctx context.Context, request operations.GetRoleRequest, ...) (*operations.GetRoleResponse, error)
- func (s *Roles) ListRoles(ctx context.Context, request operations.ListRolesRequest, ...) (*operations.ListRolesResponse, error)
- func (s *Roles) UpdateRole(ctx context.Context, request operations.UpdateRoleRequest, ...) (*operations.UpdateRoleResponse, error)
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig retry.Config) SDKOption
- func WithSecurity(security shared.Security) SDKOption
- func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTimeout(timeout time.Duration) SDKOption
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://api.planetscale.com/v1",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type BackupPolicies ¶ added in v1.2.0
type BackupPolicies struct {
// contains filtered or unexported fields
}
BackupPolicies - Resources for managing database backup policies.
func (*BackupPolicies) CreatePostgresBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) CreatePostgresBackupPolicy(ctx context.Context, request operations.CreatePostgresBackupPolicyRequest, opts ...operations.Option) (*operations.CreatePostgresBackupPolicyResponse, error)
CreatePostgresBackupPolicy - Create a Postgres backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
func (*BackupPolicies) CreateVitessBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) CreateVitessBackupPolicy(ctx context.Context, request operations.CreateVitessBackupPolicyRequest, opts ...operations.Option) (*operations.CreateVitessBackupPolicyResponse, error)
CreateVitessBackupPolicy - Create a Vitess backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
func (*BackupPolicies) DeletePostgresBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) DeletePostgresBackupPolicy(ctx context.Context, request operations.DeletePostgresBackupPolicyRequest, opts ...operations.Option) (*operations.DeletePostgresBackupPolicyResponse, error)
DeletePostgresBackupPolicy - Delete a Postgres backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
func (*BackupPolicies) DeleteVitessBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) DeleteVitessBackupPolicy(ctx context.Context, request operations.DeleteVitessBackupPolicyRequest, opts ...operations.Option) (*operations.DeleteVitessBackupPolicyResponse, error)
DeleteVitessBackupPolicy - Delete a Vitess backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
func (*BackupPolicies) GetPostgresBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) GetPostgresBackupPolicy(ctx context.Context, request operations.GetPostgresBackupPolicyRequest, opts ...operations.Option) (*operations.GetPostgresBackupPolicyResponse, error)
GetPostgresBackupPolicy - Get a Postgres backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` |
func (*BackupPolicies) GetVitessBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) GetVitessBackupPolicy(ctx context.Context, request operations.GetVitessBackupPolicyRequest, opts ...operations.Option) (*operations.GetVitessBackupPolicyResponse, error)
GetVitessBackupPolicy - Get a Vitess backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` |
func (*BackupPolicies) ListPostgresBackupPolicies ¶ added in v1.2.0
func (s *BackupPolicies) ListPostgresBackupPolicies(ctx context.Context, request operations.ListPostgresBackupPoliciesRequest, opts ...operations.Option) (*operations.ListPostgresBackupPoliciesResponse, error)
ListPostgresBackupPolicies - List Postgres backup policies ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` |
func (*BackupPolicies) ListVitessBackupPolicies ¶ added in v1.2.0
func (s *BackupPolicies) ListVitessBackupPolicies(ctx context.Context, request operations.ListVitessBackupPoliciesRequest, opts ...operations.Option) (*operations.ListVitessBackupPoliciesResponse, error)
ListVitessBackupPolicies - List Vitess backup policies ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` |
func (*BackupPolicies) UpdatePostgresBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) UpdatePostgresBackupPolicy(ctx context.Context, request operations.UpdatePostgresBackupPolicyRequest, opts ...operations.Option) (*operations.UpdatePostgresBackupPolicyResponse, error)
UpdatePostgresBackupPolicy - Update a Postgres backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
func (*BackupPolicies) UpdateVitessBackupPolicy ¶ added in v1.2.0
func (s *BackupPolicies) UpdateVitessBackupPolicy(ctx context.Context, request operations.UpdateVitessBackupPolicyRequest, opts ...operations.Option) (*operations.UpdateVitessBackupPolicyResponse, error)
UpdateVitessBackupPolicy - Update a Vitess backup policy ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` |
type Backups ¶ added in v1.2.0
type Backups struct {
// contains filtered or unexported fields
}
Backups - Resources for managing database branch backups.
func (*Backups) CreatePostgresBranchBackup ¶ added in v1.2.0
func (s *Backups) CreatePostgresBranchBackup(ctx context.Context, request operations.CreatePostgresBranchBackupRequest, opts ...operations.Option) (*operations.CreatePostgresBranchBackupResponse, error)
CreatePostgresBranchBackup - Create a Postgres branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` | | Branch | `write_backups` |
func (*Backups) CreateVitessBranchBackup ¶ added in v1.2.0
func (s *Backups) CreateVitessBranchBackup(ctx context.Context, request operations.CreateVitessBranchBackupRequest, opts ...operations.Option) (*operations.CreateVitessBranchBackupResponse, error)
CreateVitessBranchBackup - Create a Vitess branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_backups` | | Database | `write_backups` | | Branch | `write_backups` |
func (*Backups) DeletePostgresBranchBackup ¶ added in v1.2.0
func (s *Backups) DeletePostgresBranchBackup(ctx context.Context, request operations.DeletePostgresBranchBackupRequest, opts ...operations.Option) (*operations.DeletePostgresBranchBackupResponse, error)
DeletePostgresBranchBackup - Delete a Postgres branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_backups`, `delete_production_branch_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `delete_backups`, `delete_production_branch_backups` | | Database | `delete_backups`, `delete_production_branch_backups` | | Branch | `delete_backups` |
func (*Backups) DeleteVitessBranchBackup ¶ added in v1.2.0
func (s *Backups) DeleteVitessBranchBackup(ctx context.Context, request operations.DeleteVitessBranchBackupRequest, opts ...operations.Option) (*operations.DeleteVitessBranchBackupResponse, error)
DeleteVitessBranchBackup - Delete a Vitess branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_backups`, `delete_production_branch_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `delete_backups`, `delete_production_branch_backups` | | Database | `delete_backups`, `delete_production_branch_backups` | | Branch | `delete_backups` |
func (*Backups) GetPostgresBranchBackup ¶ added in v1.2.0
func (s *Backups) GetPostgresBranchBackup(ctx context.Context, request operations.GetPostgresBranchBackupRequest, opts ...operations.Option) (*operations.GetPostgresBranchBackupResponse, error)
GetPostgresBranchBackup - Get a Postgres branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` | | Branch | `read_backups` |
func (*Backups) GetPostgresBranchBackupWaitForComplete ¶ added in v1.2.0
func (s *Backups) GetPostgresBranchBackupWaitForComplete() polling.ConfigFunc
Use with GetPostgresBranchBackup by adding the operations.WithPolling option. Responses are returned when enabling polling, however additional errors may be returned:
- polling.FailureCriteriaError: If the polling option has explicit failure criteria defined, polling will immediately stop and return this error.
- polling.LimitCountError: When polling has reached the maximum number of attempts. Use the polling.WithLimitCountOverride polling option to override the predefined limit.
func (*Backups) GetVitessBranchBackup ¶ added in v1.2.0
func (s *Backups) GetVitessBranchBackup(ctx context.Context, request operations.GetVitessBranchBackupRequest, opts ...operations.Option) (*operations.GetVitessBranchBackupResponse, error)
GetVitessBranchBackup - Get a Vitess branch backup ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` | | Branch | `read_backups` |
func (*Backups) GetVitessBranchBackupWaitForComplete ¶ added in v1.2.0
func (s *Backups) GetVitessBranchBackupWaitForComplete() polling.ConfigFunc
Use with GetVitessBranchBackup by adding the operations.WithPolling option. Responses are returned when enabling polling, however additional errors may be returned:
- polling.FailureCriteriaError: If the polling option has explicit failure criteria defined, polling will immediately stop and return this error.
- polling.LimitCountError: When polling has reached the maximum number of attempts. Use the polling.WithLimitCountOverride polling option to override the predefined limit.
func (*Backups) ListPostgresBranchBackups ¶ added in v1.2.0
func (s *Backups) ListPostgresBranchBackups(ctx context.Context, request operations.ListPostgresBranchBackupsRequest, opts ...operations.Option) (*operations.ListPostgresBranchBackupsResponse, error)
ListPostgresBranchBackups - List Postgres branch backups ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` | | Branch | `read_backups` |
func (*Backups) ListVitessBranchBackups ¶ added in v1.2.0
func (s *Backups) ListVitessBranchBackups(ctx context.Context, request operations.ListVitessBranchBackupsRequest, opts ...operations.Option) (*operations.ListVitessBranchBackupsResponse, error)
ListVitessBranchBackups - List Vitess branch backups ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_backups`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_backups` | | Database | `read_backups` | | Branch | `read_backups` |
type BranchChanges ¶
type BranchChanges struct {
// contains filtered or unexported fields
}
BranchChanges - Resources for managing cluster changes.
func (*BranchChanges) ApplyPostgresBranchTerraformChanges ¶ added in v1.2.0
func (s *BranchChanges) ApplyPostgresBranchTerraformChanges(ctx context.Context, request operations.ApplyPostgresBranchTerraformChangesRequest, opts ...operations.Option) (*operations.ApplyPostgresBranchTerraformChangesResponse, error)
ApplyPostgresBranchTerraformChanges - Apply a PostgreSQL branch's cluster size and parameters
func (*BranchChanges) GetBranchChangeRequest ¶
func (s *BranchChanges) GetBranchChangeRequest(ctx context.Context, request operations.GetBranchChangeRequestRequest, opts ...operations.Option) (*operations.GetBranchChangeRequestResponse, error)
GetBranchChangeRequest - Get a branch change request ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_branches` | | Database | `read_branches` | | Branch | `read_branch` |
func (*BranchChanges) GetBranchChangeRequestWaitForChangeRequestComplete ¶
func (s *BranchChanges) GetBranchChangeRequestWaitForChangeRequestComplete() polling.ConfigFunc
Use with GetBranchChangeRequest by adding the operations.WithPolling option. Responses are returned when enabling polling, however additional errors may be returned:
- polling.FailureCriteriaError: If the polling option has explicit failure criteria defined, polling will immediately stop and return this error.
- polling.LimitCountError: When polling has reached the maximum number of attempts. Use the polling.WithLimitCountOverride polling option to override the predefined limit.
type DatabaseBranchPasswords ¶
type DatabaseBranchPasswords struct {
// contains filtered or unexported fields
}
DatabaseBranchPasswords - Resources for managing database branch passwords.
func (*DatabaseBranchPasswords) CreatePassword ¶
func (s *DatabaseBranchPasswords) CreatePassword(ctx context.Context, request operations.CreatePasswordRequest, opts ...operations.Option) (*operations.CreatePasswordResponse, error)
CreatePassword - Create a password ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*DatabaseBranchPasswords) DeletePassword ¶
func (s *DatabaseBranchPasswords) DeletePassword(ctx context.Context, request operations.DeletePasswordRequest, opts ...operations.Option) (*operations.DeletePasswordResponse, error)
DeletePassword - Delete a password ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_production_branch_password`, `delete_production_read_only_branch_password`, `delete_branch_password`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*DatabaseBranchPasswords) GetPassword ¶
func (s *DatabaseBranchPasswords) GetPassword(ctx context.Context, request operations.GetPasswordRequest, opts ...operations.Option) (*operations.GetPasswordResponse, error)
GetPassword - Get a password ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*DatabaseBranchPasswords) ListPasswords ¶
func (s *DatabaseBranchPasswords) ListPasswords(ctx context.Context, request operations.ListPasswordsRequest, opts ...operations.Option) (*operations.ListPasswordsResponse, error)
ListPasswords - List passwords ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*DatabaseBranchPasswords) UpdatePassword ¶
func (s *DatabaseBranchPasswords) UpdatePassword(ctx context.Context, request operations.UpdatePasswordRequest, opts ...operations.Option) (*operations.UpdatePasswordResponse, error)
UpdatePassword - Update a password ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
type DatabaseBranches ¶
type DatabaseBranches struct {
// contains filtered or unexported fields
}
func (*DatabaseBranches) CreatePostgresBranch ¶
func (s *DatabaseBranches) CreatePostgresBranch(ctx context.Context, request operations.CreatePostgresBranchRequest, opts ...operations.Option) (*operations.CreatePostgresBranchResponse, error)
CreatePostgresBranch - Create a PostgreSQL branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`create_branch`, `restore_production_branch_backup`, `restore_backup`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_branches`, `restore_production_branch_backups`, `restore_backups` | | Database | `write_branches`, `restore_production_branch_backups`, `restore_backups` | | Branch | `restore_backups` |
func (*DatabaseBranches) CreateVitessBranch ¶
func (s *DatabaseBranches) CreateVitessBranch(ctx context.Context, request operations.CreateVitessBranchRequest, opts ...operations.Option) (*operations.CreateVitessBranchResponse, error)
CreateVitessBranch - Create a Vitess branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`create_branch`, `restore_production_branch_backup`, `restore_backup`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_branches`, `restore_production_branch_backups`, `restore_backups` | | Database | `write_branches`, `restore_production_branch_backups`, `restore_backups` | | Branch | `restore_backups` |
func (*DatabaseBranches) DeletePostgresBranch ¶
func (s *DatabaseBranches) DeletePostgresBranch(ctx context.Context, request operations.DeletePostgresBranchRequest, opts ...operations.Option) (*operations.DeletePostgresBranchResponse, error)
DeletePostgresBranch - Delete a PostgreSQL branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `delete_branches`, `delete_production_branches` | | Database | `delete_branches`, `delete_production_branches` | | Branch | `delete_branch` |
func (*DatabaseBranches) DeleteVitessBranch ¶
func (s *DatabaseBranches) DeleteVitessBranch(ctx context.Context, request operations.DeleteVitessBranchRequest, opts ...operations.Option) (*operations.DeleteVitessBranchResponse, error)
DeleteVitessBranch - Delete a Vitess branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `delete_branches`, `delete_production_branches` | | Database | `delete_branches`, `delete_production_branches` | | Branch | `delete_branch` |
func (*DatabaseBranches) GetPostgresBranch ¶
func (s *DatabaseBranches) GetPostgresBranch(ctx context.Context, request operations.GetPostgresBranchRequest, opts ...operations.Option) (*operations.GetPostgresBranchResponse, error)
GetPostgresBranch - Get a PostgreSQL branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_branches` | | Database | `read_branches` | | Branch | `read_branch` |
func (*DatabaseBranches) GetPostgresBranchWaitForReady ¶
func (s *DatabaseBranches) GetPostgresBranchWaitForReady() polling.ConfigFunc
Use with GetPostgresBranch by adding the operations.WithPolling option. Responses are returned when enabling polling, however additional errors may be returned:
- polling.FailureCriteriaError: If the polling option has explicit failure criteria defined, polling will immediately stop and return this error.
- polling.LimitCountError: When polling has reached the maximum number of attempts. Use the polling.WithLimitCountOverride polling option to override the predefined limit.
func (*DatabaseBranches) GetVitessBranch ¶
func (s *DatabaseBranches) GetVitessBranch(ctx context.Context, request operations.GetVitessBranchRequest, opts ...operations.Option) (*operations.GetVitessBranchResponse, error)
GetVitessBranch - Get a Vitess branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_branches` | | Database | `read_branches` | | Branch | `read_branch` |
func (*DatabaseBranches) GetVitessBranchWaitForReady ¶
func (s *DatabaseBranches) GetVitessBranchWaitForReady() polling.ConfigFunc
Use with GetVitessBranch by adding the operations.WithPolling option. Responses are returned when enabling polling, however additional errors may be returned:
- polling.FailureCriteriaError: If the polling option has explicit failure criteria defined, polling will immediately stop and return this error.
- polling.LimitCountError: When polling has reached the maximum number of attempts. Use the polling.WithLimitCountOverride polling option to override the predefined limit.
func (*DatabaseBranches) UpdatePostgresBranch ¶
func (s *DatabaseBranches) UpdatePostgresBranch(ctx context.Context, request operations.UpdatePostgresBranchRequest, opts ...operations.Option) (*operations.UpdatePostgresBranchResponse, error)
UpdatePostgresBranch - Update a PostgreSQL branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_database`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_branches` | | Database | `write_branches` | | Branch | `write_branch` |
func (*DatabaseBranches) UpdateVitessBranch ¶
func (s *DatabaseBranches) UpdateVitessBranch(ctx context.Context, request operations.UpdateVitessBranchRequest, opts ...operations.Option) (*operations.UpdateVitessBranchResponse, error)
UpdateVitessBranch - Update a Vitess branch ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`write_database`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_branches` | | Database | `write_branches` | | Branch | `write_branch` |
type Databases ¶
type Databases struct {
// contains filtered or unexported fields
}
Databases - Resources for managing databases within an organization.
func (*Databases) GetPostgresDatabase ¶
func (s *Databases) GetPostgresDatabase(ctx context.Context, request operations.GetPostgresDatabaseRequest, opts ...operations.Option) (*operations.GetPostgresDatabaseResponse, error)
GetPostgresDatabase - Get a PostgreSQL database ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `delete_branch_password`, `delete_production_branch_password`, `delete_production_read_only_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_databases` | | Database | `read_database` |
func (*Databases) GetVitessDatabase ¶
func (s *Databases) GetVitessDatabase(ctx context.Context, request operations.GetVitessDatabaseRequest, opts ...operations.Option) (*operations.GetVitessDatabaseResponse, error)
GetVitessDatabase - Get a Vitess database ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `delete_branch_password`, `delete_production_branch_password`, `delete_production_read_only_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_databases` | | Database | `read_database` |
func (*Databases) ListDatabases ¶
func (s *Databases) ListDatabases(ctx context.Context, request operations.ListDatabasesRequest, opts ...operations.Option) (*operations.ListDatabasesResponse, error)
ListDatabases - List databases ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `delete_branch_password`, `delete_production_branch_password`, `delete_production_read_only_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `read_databases` |
type HTTPClient ¶
HTTPClient provides an interface for supplying the SDK with a custom HTTP client
type Organizations ¶
type Organizations struct {
// contains filtered or unexported fields
}
Organizations - Resources for managing organizations.
func (*Organizations) GetOrganization ¶
func (s *Organizations) GetOrganization(ctx context.Context, request operations.GetOrganizationRequest, opts ...operations.Option) (*operations.GetOrganizationResponse, error)
GetOrganization - Get an organization ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_organization`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | User | `read_organizations` | | Organization | `read_organization` |
func (*Organizations) ListOrganizations ¶
func (s *Organizations) ListOrganizations(ctx context.Context, request operations.ListOrganizationsRequest, opts ...operations.Option) (*operations.ListOrganizationsResponse, error)
ListOrganizations - List organizations When using a service token, returns the list of organizations the service token has access to. When using an OAuth token, returns the list of organizations the user has access to. ### Authorization A OAuth token must have at least one of the following scopes in order to use this API endpoint:
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | User | `read_organizations` |
type PlanetScale ¶
type PlanetScale struct {
SDKVersion string
// Resources for managing organizations.
//
Organizations *Organizations
// Resources for managing databases within an organization.
//
Databases *Databases
// Resources for managing cluster changes.
//
BranchChanges *BranchChanges
// Resources for managing database branch passwords.
//
DatabaseBranchPasswords *DatabaseBranchPasswords
// Resources for managing role credentials.
//
Roles *Roles
DatabaseBranches *DatabaseBranches
// Resources for managing database backup policies.
//
BackupPolicies *BackupPolicies
// Resources for managing database branch backups.
//
Backups *Backups
// contains filtered or unexported fields
}
PlanetScale - Terraform Provider for PlanetScale: Manage your PlanetScale resources with Terraform
func New ¶
func New(opts ...SDKOption) *PlanetScale
New creates a new instance of the SDK with the provided options
type Roles ¶
type Roles struct {
// contains filtered or unexported fields
}
Roles - Resources for managing role credentials.
func (*Roles) CreateRole ¶
func (s *Roles) CreateRole(ctx context.Context, request operations.CreateRoleRequest, opts ...operations.Option) (*operations.CreateRoleResponse, error)
CreateRole - Create role credentials ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`create_production_branch_password`, `create_production_read_only_branch_password`, `create_branch_password`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*Roles) DeleteRole ¶
func (s *Roles) DeleteRole(ctx context.Context, request operations.DeleteRoleRequest, opts ...operations.Option) (*operations.DeleteRoleResponse, error)
DeleteRole - Delete role credentials ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`delete_production_branch_password`, `delete_production_read_only_branch_password`, `delete_branch_password`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*Roles) GetRole ¶
func (s *Roles) GetRole(ctx context.Context, request operations.GetRoleRequest, opts ...operations.Option) (*operations.GetRoleResponse, error)
GetRole - Get a role ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*Roles) ListRoles ¶
func (s *Roles) ListRoles(ctx context.Context, request operations.ListRolesRequest, opts ...operations.Option) (*operations.ListRolesResponse, error)
ListRoles - List roles ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_production_read_only_branch`, `connect_branch`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
func (*Roles) UpdateRole ¶
func (s *Roles) UpdateRole(ctx context.Context, request operations.UpdateRoleRequest, opts ...operations.Option) (*operations.UpdateRoleResponse, error)
UpdateRole - Update role name ### Authorization A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
**Service Token Accesses**
`create_production_branch_password`, `create_production_read_only_branch_password`, `create_branch_password`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Database | `manage_passwords`, `manage_production_branch_passwords`, `manage_read_only_passwords`, `manage_production_read_only_passwords` | | Branch | `manage_passwords`, `manage_read_only_passwords` |
type SDKOption ¶
type SDKOption func(*PlanetScale)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows providing an alternative server URL
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTimeout ¶
WithTimeout Optional request timeout applied to each operation