-
Notifications
You must be signed in to change notification settings - Fork 101
Drop support for ScaleGrid Databases #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,15 +33,9 @@ type MySQLDatabase struct { | |
| // Members has dynamic keys so it is a map | ||
| Members map[string]DatabaseMemberType `json:"members"` | ||
|
|
||
| // Deprecated: ReplicationType is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| ReplicationType string `json:"replication_type"` | ||
| // Deprecated: SSLConnection is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| SSLConnection bool `json:"ssl_connection"` | ||
| // Deprecated: Encrypted is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| Encrypted bool `json:"encrypted"` | ||
|
|
||
| SSLConnection bool `json:"ssl_connection"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those properties were initially marked as deprecated because they were mistakenly omitted from the API Spec during the migration from DBaaS V1 to V2, but this was a mistake. The API is still returning these fields now. |
||
| Encrypted bool `json:"encrypted"` | ||
| AllowList []string `json:"allow_list"` | ||
| InstanceURI string `json:"instance_uri"` | ||
| Created *time.Time `json:"-"` | ||
|
Comment on lines
38
to
39
|
||
| Updated *time.Time `json:"-"` | ||
| Updates DatabaseMaintenanceWindow `json:"updates"` | ||
|
|
@@ -406,13 +400,6 @@ type MySQLCreateOptions struct { | |
| AllowList []string `json:"allow_list,omitempty"` | ||
| ClusterSize int `json:"cluster_size,omitempty"` | ||
|
|
||
| // Deprecated: ReplicationType is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| ReplicationType string `json:"replication_type,omitempty"` | ||
| // Deprecated: Encrypted is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| Encrypted bool `json:"encrypted,omitempty"` | ||
| // Deprecated: SSLConnection is a deprecated property, as it is no longer supported in DBaaS V2. | ||
| SSLConnection bool `json:"ssl_connection,omitempty"` | ||
|
|
||
| Fork *DatabaseFork `json:"fork,omitempty"` | ||
| EngineConfig *MySQLDatabaseEngineConfig `json:"engine_config,omitempty"` | ||
| PrivateNetwork *DatabasePrivateNetwork `json:"private_network,omitempty"` | ||
|
|
@@ -430,46 +417,6 @@ type MySQLUpdateOptions struct { | |
| PrivateNetwork **DatabasePrivateNetwork `json:"private_network,omitempty"` | ||
| } | ||
|
|
||
| // MySQLDatabaseBackup is information for interacting with a backup for the existing MySQL Database | ||
|
|
||
| // Deprecated: MySQLDatabaseBackup is a deprecated struct, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| type MySQLDatabaseBackup struct { | ||
| ID int `json:"id"` | ||
| Label string `json:"label"` | ||
| Type string `json:"type"` | ||
| Created *time.Time `json:"-"` | ||
| } | ||
|
|
||
| // MySQLBackupCreateOptions are options used for CreateMySQLDatabaseBackup(...) | ||
| // | ||
| // Deprecated: MySQLBackupCreateOptions is a deprecated struct, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| type MySQLBackupCreateOptions struct { | ||
| Label string `json:"label"` | ||
| Target MySQLDatabaseTarget `json:"target"` | ||
| } | ||
|
|
||
| func (d *MySQLDatabaseBackup) UnmarshalJSON(b []byte) error { | ||
| type Mask MySQLDatabaseBackup | ||
|
|
||
| p := struct { | ||
| *Mask | ||
|
|
||
| Created *parseabletime.ParseableTime `json:"created"` | ||
| }{ | ||
| Mask: (*Mask)(d), | ||
| } | ||
|
|
||
| if err := json.Unmarshal(b, &p); err != nil { | ||
| return err | ||
| } | ||
|
|
||
| d.Created = (*time.Time)(p.Created) | ||
|
|
||
| return nil | ||
| } | ||
|
|
||
| // MySQLDatabaseCredential is the Root Credentials to access the Linode Managed Database | ||
| type MySQLDatabaseCredential struct { | ||
| Username string `json:"username"` | ||
|
|
@@ -486,14 +433,6 @@ func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]M | |
| return getPaginatedResults[MySQLDatabase](ctx, c, "databases/mysql/instances", opts) | ||
| } | ||
|
|
||
| // ListMySQLDatabaseBackups lists all MySQL Database Backups associated with the given MySQL Database | ||
| // | ||
| // Deprecated: ListMySQLDatabaseBackups is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| func (c *Client) ListMySQLDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MySQLDatabaseBackup, error) { | ||
| return getPaginatedResults[MySQLDatabaseBackup](ctx, c, formatAPIPath("databases/mysql/instances/%d/backups", databaseID), opts) | ||
| } | ||
|
|
||
| // GetMySQLDatabase returns a single MySQL Database matching the id | ||
| func (c *Client) GetMySQLDatabase(ctx context.Context, databaseID int) (*MySQLDatabase, error) { | ||
| e := formatAPIPath("databases/mysql/instances/%d", databaseID) | ||
|
|
@@ -535,33 +474,6 @@ func (c *Client) ResetMySQLDatabaseCredentials(ctx context.Context, databaseID i | |
| return doPOSTRequestNoRequestResponseBody(ctx, c, e) | ||
| } | ||
|
|
||
| // GetMySQLDatabaseBackup returns a specific MySQL Database Backup with the given ids | ||
| // | ||
| // Deprecated: GetMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MySQLDatabaseBackup, error) { | ||
| e := formatAPIPath("databases/mysql/instances/%d/backups/%d", databaseID, backupID) | ||
| return doGETRequest[MySQLDatabaseBackup](ctx, c, e) | ||
| } | ||
|
|
||
| // RestoreMySQLDatabaseBackup returns the given MySQL Database with the given Backup | ||
| // | ||
| // Deprecated: RestoreMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| func (c *Client) RestoreMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) error { | ||
| e := formatAPIPath("databases/mysql/instances/%d/backups/%d/restore", databaseID, backupID) | ||
| return doPOSTRequestNoRequestResponseBody(ctx, c, e) | ||
| } | ||
|
|
||
| // CreateMySQLDatabaseBackup creates a snapshot for the given MySQL database | ||
| // | ||
| // Deprecated: CreateMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2. | ||
| // In DBaaS V2, databases can be backed up via database forking. | ||
| func (c *Client) CreateMySQLDatabaseBackup(ctx context.Context, databaseID int, opts MySQLBackupCreateOptions) error { | ||
| e := formatAPIPath("databases/mysql/instances/%d/backups", databaseID) | ||
| return doPOSTRequestNoResponseBody(ctx, c, e, opts) | ||
| } | ||
|
|
||
| // PatchMySQLDatabase applies security patches and updates to the underlying operating system of the Managed MySQL Database | ||
| func (c *Client) PatchMySQLDatabase(ctx context.Context, databaseID int) error { | ||
| e := formatAPIPath("databases/mysql/instances/%d/patch", databaseID) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/linode/linodego/pull/894/changes#r2803463221