-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat]: [DBOPS-308]: Onboard JDBC connector (#539)
- Loading branch information
1 parent
c6a8384
commit 5a3b700
Showing
13 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# JdbcAuthCredentialsDto | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# JdbcAuthenticationDto | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**Type_** | **string** | | [default to null] | ||
**Spec** | [***JdbcAuthCredentialsDto**](JDBCAuthCredentialsDTO.md) | | [optional] [default to null] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# JdbcConnector | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**Url** | **string** | | [default to null] | ||
**Auth** | [***JdbcAuthenticationDto**](JDBCAuthenticationDTO.md) | | [optional] [default to null] | ||
**DelegateSelectors** | **[]string** | | [optional] [default to null] | ||
**ConnectorType** | **string** | | [default to null] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# JdbcUserNamePasswordDto | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**Username** | **string** | | [optional] [default to null] | ||
**UsernameRef** | **string** | | [optional] [default to null] | ||
**PasswordRef** | **string** | | [default to null] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package nextgen | ||
|
||
type JDBCAuthType string | ||
|
||
var JDBCAuthTypes = struct { | ||
UsernamePassword JDBCAuthType | ||
}{ | ||
UsernamePassword: "UsernamePassword", | ||
} | ||
|
||
func (e JDBCAuthType) String() string { | ||
return string(e) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Harness NextGen Software Delivery Platform API Reference | ||
* | ||
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub | ||
* | ||
* API version: 3.0 | ||
* Contact: contact@harness.io | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package nextgen | ||
|
||
// This contains details of credentials for JDBC Authentication | ||
type JdbcAuthCredentialsDto struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Harness NextGen Software Delivery Platform API Reference | ||
* | ||
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub | ||
* | ||
* API version: 3.0 | ||
* Contact: contact@harness.io | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package nextgen | ||
|
||
import "encoding/json" | ||
|
||
// This entity contains the details for JDBC Authentication | ||
type JdbcAuthenticationDto struct { | ||
Type_ JDBCAuthType `json:"type"` | ||
UsernamePassword *JdbcUserNamePasswordDto `json:"-"` | ||
Spec json.RawMessage `json:"spec,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package nextgen | ||
|
||
import ( | ||
"encoding/json" | ||
) | ||
|
||
func (a *JdbcAuthenticationDto) UnmarshalJSON(data []byte) error { | ||
|
||
type Alias JdbcAuthenticationDto | ||
|
||
aux := &struct { | ||
*Alias | ||
}{ | ||
Alias: (*Alias)(a), | ||
} | ||
|
||
err := json.Unmarshal(data, &aux) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = json.Unmarshal(aux.Spec, &a.UsernamePassword) | ||
|
||
return err | ||
} | ||
|
||
func (a *JdbcAuthenticationDto) MarshalJSON() ([]byte, error) { | ||
type Alias JdbcAuthenticationDto | ||
|
||
var spec []byte | ||
var err error | ||
|
||
spec, err = json.Marshal(a.UsernamePassword) | ||
|
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
a.Spec = json.RawMessage(spec) | ||
|
||
return json.Marshal((*Alias)(a)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Harness NextGen Software Delivery Platform API Reference | ||
* | ||
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub | ||
* | ||
* API version: 3.0 | ||
* Contact: contact@harness.io | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package nextgen | ||
|
||
// This contains details of the JDBC connector | ||
type JdbcConnector struct { | ||
Url string `json:"url"` | ||
Auth *JdbcAuthenticationDto `json:"auth,omitempty"` | ||
DelegateSelectors []string `json:"delegateSelectors,omitempty"` | ||
ConnectorType string `json:"connectorType"` | ||
ExecuteOnDelegate bool `json:"executeOnDelegate"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Harness NextGen Software Delivery Platform API Reference | ||
* | ||
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub | ||
* | ||
* API version: 3.0 | ||
* Contact: contact@harness.io | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package nextgen | ||
|
||
// This entity contains the details of the JDBC Username and Password | ||
type JdbcUserNamePasswordDto struct { | ||
Username string `json:"username,omitempty"` | ||
UsernameRef string `json:"usernameRef,omitempty"` | ||
PasswordRef string `json:"passwordRef"` | ||
} |