Skip to content

Commit

Permalink
spelling fix and add missing deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
chad-cwc committed Oct 10, 2023
1 parent 234cbae commit b574bc2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bastionzero/service/connections/connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type CreateUniversalConnectionResponse struct {
AgentVersion string `json:"agentVersion"`
ConnectionAuthDetails ConnectionAuthDetails `json:"connectionAuthDetails"`
SshScpOnly bool `json:"sshScpOnly"`
// Deprecated: SplitCert exist for historical compatibility and should not be used.
// Deprecated: SplitCert exists for historical compatibility and should not be used.
// Use IsPasswordless instead.
SplitCert bool `json:"splitCert"`
IsPasswordless bool `json:"isPasswordless"`
Expand Down
44 changes: 26 additions & 18 deletions bastionzero/service/targets/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ type CreateDatabaseTargetRequest struct {
// RemotePort is required for all databases except GCP-hosted ones. For GCP-hosted databases,
// Port.Value can be specified but will be ignored when connecting to the database.
// If not provided when creating a CGP database target, Port.Value will be set to 0.
RemotePort *Port `json:"remotePort,omitempty"`
LocalPort *Port `json:"localPort,omitempty"`
LocalHost string `json:"localHost,omitempty"`
IsSplitCert bool `json:"splitCert,omitempty"`
DatabaseType string `json:"databaseType,omitempty"`
EnvironmentID string `json:"environmentId,omitempty"`
EnvironmentName string `json:"environmentName,omitempty"`
DatabaseAuthenticationConfig dbauthconfig.DatabaseAuthenticationConfig `json:"databaseAuthenticationConfig,omitempty"`
RemotePort *Port `json:"remotePort,omitempty"`
LocalPort *Port `json:"localPort,omitempty"`
LocalHost string `json:"localHost,omitempty"`
// Deprecated: IsSplitCert exists for historical compatibility and should not be used.
// Set AuthenticationType in DatabaseAuthenticationConfig appropriately instead.
IsSplitCert bool `json:"splitCert,omitempty"`
// Deprecated: DatabaseType exists for historical compatibility and should not be used.
// Set Database in DatabaseAuthenticationConfig appropriately instead.
DatabaseType string `json:"databaseType,omitempty"`
EnvironmentID string `json:"environmentId,omitempty"`
EnvironmentName string `json:"environmentName,omitempty"`
DatabaseAuthenticationConfig *dbauthconfig.DatabaseAuthenticationConfig `json:"databaseAuthenticationConfig,omitempty"`
}

// CreateDatabaseTargetResponse is the response returned if a Database target is
Expand All @@ -42,16 +46,20 @@ type CreateDatabaseTargetResponse struct {

// ModifyDatabaseTargetRequest is used to modify a Database target
type ModifyDatabaseTargetRequest struct {
TargetName *string `json:"targetName,omitempty"`
ProxyTargetID *string `json:"proxyTargetId,omitempty"`
RemoteHost *string `json:"remoteHost,omitempty"`
RemotePort *Port `json:"remotePort,omitempty"`
LocalPort *Port `json:"localPort,omitempty"`
LocalHost *string `json:"localHost,omitempty"`
IsSplitCert *bool `json:"splitCert,omitempty"`
DatabaseType *string `json:"databaseType,omitempty"`
EnvironmentID *string `json:"environmentId,omitempty"`
DatabaseAuthenticationConfig dbauthconfig.DatabaseAuthenticationConfig `json:"databaseAuthenticationConfig,omitempty"`
TargetName *string `json:"targetName,omitempty"`
ProxyTargetID *string `json:"proxyTargetId,omitempty"`
RemoteHost *string `json:"remoteHost,omitempty"`
RemotePort *Port `json:"remotePort,omitempty"`
LocalPort *Port `json:"localPort,omitempty"`
LocalHost *string `json:"localHost,omitempty"`
// Deprecated: IsSplitCert exists for historical compatibility and should not be used.
// Set AuthenticationType in DatabaseAuthenticationConfig appropriately instead.
IsSplitCert *bool `json:"splitCert,omitempty"`
// Deprecated: DatabaseType exists for historical compatibility and should not be used.
// Set Database in DatabaseAuthenticationConfig appropriately instead.
DatabaseType *string `json:"databaseType,omitempty"`
EnvironmentID *string `json:"environmentId,omitempty"`
DatabaseAuthenticationConfig *dbauthconfig.DatabaseAuthenticationConfig `json:"databaseAuthenticationConfig,omitempty"`
}

// ListDatabaseTargetsOptions specifies the optional parameters when querying
Expand Down

0 comments on commit b574bc2

Please sign in to comment.