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 BranchChanges
- func (s *BranchChanges) GetBranchChangeRequest(ctx context.Context, request operations.GetBranchChangeRequestRequest, ...) (*operations.GetBranchChangeRequestResponse, error)
- func (s *BranchChanges) GetBranchChangeRequestWaitForChangeRequestComplete() polling.ConfigFunc
- func (s *BranchChanges) UpdateBranchChangeRequest(ctx context.Context, request operations.UpdateBranchChangeRequestRequest, ...) (*operations.UpdateBranchChangeRequestResponse, error)
- 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) GetPostgresDatabaseWaitForReady() polling.ConfigFunc
- func (s *Databases) GetVitessDatabase(ctx context.Context, request operations.GetVitessDatabaseRequest, ...) (*operations.GetVitessDatabaseResponse, error)
- func (s *Databases) GetVitessDatabaseWaitForReady() polling.ConfigFunc
- 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 BranchChanges ¶
type BranchChanges struct {
// contains filtered or unexported fields
}
BranchChanges - Resources for managing cluster changes.
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.
func (*BranchChanges) UpdateBranchChangeRequest ¶
func (s *BranchChanges) UpdateBranchChangeRequest(ctx context.Context, request operations.UpdateBranchChangeRequestRequest, opts ...operations.Option) (*operations.UpdateBranchChangeRequestResponse, error)
UpdateBranchChangeRequest - Upsert a 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**
`write_database`
**OAuth Scopes**
| Resource | Scopes |
| :------- | :---------- | | Organization | `write_databases` | | Database | `write_database` |
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) GetPostgresDatabaseWaitForReady ¶
func (s *Databases) GetPostgresDatabaseWaitForReady() polling.ConfigFunc
Use with GetPostgresDatabase 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 (*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) GetVitessDatabaseWaitForReady ¶
func (s *Databases) GetVitessDatabaseWaitForReady() polling.ConfigFunc
Use with GetVitessDatabase 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 (*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
// 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 the overriding of the default 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