Skip to content
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

Add support for DBaaS FerretDB offering #272

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 43 additions & 32 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,38 +114,49 @@ type DBListOptions struct {

// Database represents a Managed Database subscription
type Database struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Plan string `json:"plan"`
PlanDisk int `json:"plan_disk"`
PlanRAM int `json:"plan_ram"`
PlanVCPUs int `json:"plan_vcpus"`
PlanReplicas int `json:"plan_replicas"`
Region string `json:"region"`
DatabaseEngine string `json:"database_engine"`
DatabaseEngineVersion string `json:"database_engine_version"`
VPCID string `json:"vpc_id"`
Status string `json:"status"`
Label string `json:"label"`
Tag string `json:"tag"`
DBName string `json:"dbname,omitempty"`
Host string `json:"host"`
PublicHost string `json:"public_host,omitempty"`
User string `json:"user"`
Password string `json:"password"`
Port string `json:"port"`
MaintenanceDOW string `json:"maintenance_dow"`
MaintenanceTime string `json:"maintenance_time"`
LatestBackup string `json:"latest_backup"`
TrustedIPs []string `json:"trusted_ips"`
MySQLSQLModes []string `json:"mysql_sql_modes,omitempty"`
MySQLRequirePrimaryKey *bool `json:"mysql_require_primary_key,omitempty"`
MySQLSlowQueryLog *bool `json:"mysql_slow_query_log,omitempty"`
MySQLLongQueryTime int `json:"mysql_long_query_time,omitempty"`
PGAvailableExtensions []PGExtension `json:"pg_available_extensions,omitempty"`
RedisEvictionPolicy string `json:"redis_eviction_policy,omitempty"`
ClusterTimeZone string `json:"cluster_time_zone,omitempty"`
ReadReplicas []Database `json:"read_replicas,omitempty"`
ID string `json:"id"`
DateCreated string `json:"date_created"`
Plan string `json:"plan"`
PlanDisk int `json:"plan_disk"`
PlanRAM int `json:"plan_ram"`
PlanVCPUs int `json:"plan_vcpus"`
PlanReplicas int `json:"plan_replicas"`
Region string `json:"region"`
DatabaseEngine string `json:"database_engine"`
DatabaseEngineVersion string `json:"database_engine_version"`
VPCID string `json:"vpc_id"`
Status string `json:"status"`
Label string `json:"label"`
Tag string `json:"tag"`
DBName string `json:"dbname,omitempty"`
FerretDBCredentials *FerretDBCredentials `json:"ferretdb_credentials,omitempty"`
Host string `json:"host"`
PublicHost string `json:"public_host,omitempty"`
User string `json:"user"`
Password string `json:"password"`
Port string `json:"port"`
MaintenanceDOW string `json:"maintenance_dow"`
MaintenanceTime string `json:"maintenance_time"`
LatestBackup string `json:"latest_backup"`
TrustedIPs []string `json:"trusted_ips"`
MySQLSQLModes []string `json:"mysql_sql_modes,omitempty"`
MySQLRequirePrimaryKey *bool `json:"mysql_require_primary_key,omitempty"`
MySQLSlowQueryLog *bool `json:"mysql_slow_query_log,omitempty"`
MySQLLongQueryTime int `json:"mysql_long_query_time,omitempty"`
PGAvailableExtensions []PGExtension `json:"pg_available_extensions,omitempty"`
RedisEvictionPolicy string `json:"redis_eviction_policy,omitempty"`
ClusterTimeZone string `json:"cluster_time_zone,omitempty"`
ReadReplicas []Database `json:"read_replicas,omitempty"`
}

// FerretDBCredentials represents connection details and IP address information for FerretDB engine type subscriptions
type FerretDBCredentials struct {
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user"`
Password string `json:"password"`
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip,omitempty"`
}

// PGExtension represents an object containing extension name and version information
Expand Down
Loading