Skip to content

Commit

Permalink
Add user info to database
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Anarse <vishal@civo.com>
  • Loading branch information
Vishal Anarse committed Dec 19, 2023
1 parent 08daeec commit 0a313e1
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import (
"strings"
)

// DatabaseUserInfo represents the user information
type DatabaseUserInfo struct {
Username string `json:"username"`
Password string `json:"password"`
Port int `json:"port"`
}

// Database holds the database information
type Database struct {
ID string `json:"id"`
Expand Down Expand Up @@ -34,15 +41,16 @@ type PaginatedDatabases struct {

// CreateDatabaseRequest holds fields required to creates a new database
type CreateDatabaseRequest struct {
Name string `json:"name" validate:"required"`
Size string `json:"size" validate:"required"`
Software string `json:"software" validate:"required"`
SoftwareVersion string `json:"software_version"`
NetworkID string `json:"network_id"`
Nodes int `json:"nodes"`
FirewallID string `json:"firewall_id"`
FirewallRules string `json:"firewall_rule"`
Region string `json:"region"`
Name string `json:"name" validate:"required"`
Size string `json:"size" validate:"required"`
Software string `json:"software" validate:"required"`
SoftwareVersion string `json:"software_version"`
NetworkID string `json:"network_id"`
Nodes int `json:"nodes"`
FirewallID string `json:"firewall_id"`
FirewallRules string `json:"firewall_rule"`
DatabaseUserInfo []DatabaseUserInfo `json:"database_user_info"`
Region string `json:"region"`
}

// UpdateDatabaseRequest holds fields required to update a database
Expand Down

0 comments on commit 0a313e1

Please sign in to comment.