connection.proto
path mgmt/v1alpha1/connection.proto
package mgmt.v1alpha1
Messages
AwsS3ConnectionConfig
Name | Type | Description |
---|---|---|
bucket_arn | string | |
path_prefix | optional string | |
credentials | optional AwsS3Credentials | |
region | optional string | |
endpoint | optional string |
AwsS3Credentials
S3 Credentials that are used by the worker process. Note: this may be optionally provided if the worker that is being hosted has environment credentials to the S3 bucket instead.
Name | Type | Description |
---|---|---|
profile | optional string | |
access_key_id | optional string | |
secret_access_key | optional string | |
session_token | optional string | |
from_ec2_role | optional bool | |
role_arn | optional string | |
role_external_id | optional string |
CheckConnectionConfigRequest
Name | Type | Description |
---|---|---|
connection_config | ConnectionConfig |
CheckConnectionConfigResponse
Name | Type | Description |
---|---|---|
is_connected | bool | Whether or not the API was able to ping the connection |
connection_error | optional string | This is the error that was received if the API was unable to connect |
CheckSqlQueryRequest
Name | Type | Description |
---|---|---|
id | string | The connection id that the query will be checked against |
query | string | The full query that will be run through a PREPARE statement |
CheckSqlQueryResponse
Name | Type | Description |
---|---|---|
is_valid | bool | The query is run through PREPARE. Returns valid if it correctly compiled |
erorr_message | optional string | The error message returned by the sql client if the prepare did not return successfully |
Connection
Name | Type | Description |
---|---|---|
id | string | |
name | string | |
connection_config | ConnectionConfig | |
created_by_user_id | string | |
created_at | google.protobuf.Timestamp | |
updated_by_user_id | string | |
updated_at | google.protobuf.Timestamp | |
account_id | string |
ConnectionConfig
Name | Type | Description |
---|---|---|
pg_config | PostgresConnectionConfig | |
aws_s3_config | AwsS3ConnectionConfig | |
mysql_config | MysqlConnectionConfig |
CreateConnectionRequest
Name | Type | Description |
---|---|---|
account_id | string | |
name | string | The friendly name of the connection |
connection_config | ConnectionConfig |
CreateConnectionResponse
Name | Type | Description |
---|---|---|
connection | Connection |
DatabaseColumn
Name | Type | Description |
---|---|---|
schema | string | The database schema. Ex: public |
table | string | The name of the table in the schema |
column | string | The name of the column |
data_type | string | The datatype of the column |
DeleteConnectionRequest
Name | Type | Description |
---|---|---|
id | string |
DeleteConnectionResponse
Name | Type | Description |
---|
ForeignConstraintTables
Name | Type | Description |
---|---|---|
tables | repeated string |
GetConnectionDataStreamRequest
Name | Type | Description |
---|---|---|
connection_id | string | |
schema | string | |
table | string |
GetConnectionDataStreamResponse
Each stream response is a single row in the requested schema and table
Name | Type | Description |
---|---|---|
row | repeated GetConnectionDataStreamResponse.RowEntry | A map of column name to the bytes value of the data that was found for that column and row |
GetConnectionDataStreamResponse.RowEntry
Name | Type | Description |
---|---|---|
key | string | |
value | bytes |
GetConnectionForeignConstraintsRequest
Name | Type | Description |
---|---|---|
connection_id | string |
GetConnectionForeignConstraintsResponse
Dependency constraints for a specific table
Name | Type | Description |
---|---|---|
table_constraints | repeated GetConnectionForeignConstraintsResponse.TableConstraintsEntry | the key here is <schema>.<table> and the list of tables that it depends on, also `<schema>.<table>` format. |
GetConnectionForeignConstraintsResponse.TableConstraintsEntry
Name | Type | Description |
---|---|---|
key | string | |
value | ForeignConstraintTables |
GetConnectionRequest
Name | Type | Description |
---|---|---|
id | string |
GetConnectionResponse
Name | Type | Description |
---|---|---|
connection | Connection |
GetConnectionSchemaRequest
Name | Type | Description |
---|---|---|
id | string |
GetConnectionSchemaResponse
Name | Type | Description |
---|---|---|
schemas | repeated DatabaseColumn |
GetConnectionsRequest
Name | Type | Description |
---|---|---|
account_id | string |
GetConnectionsResponse
Name | Type | Description |
---|---|---|
connections | repeated Connection |
IsConnectionNameAvailableRequest
Name | Type | Description |
---|---|---|
account_id | string | |
connection_name | string |
IsConnectionNameAvailableResponse
Name | Type | Description |
---|---|---|
is_available | bool |
MysqlConnection
Name | Type | Description |
---|---|---|
user | string | |
pass | string | |
protocol | string | |
host | string | |
port | int32 | |
name | string |
MysqlConnectionConfig
Name | Type | Description |
---|---|---|
url | string | |
connection | MysqlConnection |
PostgresConnection
Name | Type | Description |
---|---|---|
host | string | |
port | int32 | |
name | string | |
user | string | |
pass | string | |
ssl_mode | optional string |
PostgresConnectionConfig
Name | Type | Description |
---|---|---|
url | string | |
connection | PostgresConnection |
UpdateConnectionRequest
Name | Type | Description |
---|---|---|
id | string | |
name | string | |
connection_config | ConnectionConfig |
UpdateConnectionResponse
Name | Type | Description |
---|---|---|
connection | Connection |
Services
ConnectionService
Service for managing datasource connections. This is a primary data model in Neosync and is used in reference when hooking up Jobs to synchronize and generate data.
GetConnections
Method | GetConnections |
---|---|
Request | GetConnectionsRequest |
Response | GetConnectionsResponse |
Description | Returns a list of connections associated with the account |
GetConnection
Method | GetConnection |
---|---|
Request | GetConnectionRequest |
Response | GetConnectionResponse |
Description | Returns a single connection |
CreateConnection
Method | CreateConnection |
---|---|
Request | CreateConnectionRequest |
Response | CreateConnectionResponse |
Description | Creates a new connection |
UpdateConnection
Method | UpdateConnection |
---|---|
Request | UpdateConnectionRequest |
Response | UpdateConnectionResponse |
Description | Updates an existing connection |
DeleteConnection
Method | DeleteConnection |
---|---|
Request | DeleteConnectionRequest |
Response | DeleteConnectionResponse |
Description | Removes a connection from the system. |
IsConnectionNameAvailable
Method | IsConnectionNameAvailable |
---|---|
Request | IsConnectionNameAvailableRequest |
Response | IsConnectionNameAvailableResponse |
Description | Connections have friendly names, this method checks if the requested name is available in the system based on the account |
CheckConnectionConfig
Method | CheckConnectionConfig |
---|---|
Request | CheckConnectionConfigRequest |
Response | CheckConnectionConfigResponse |
Description | Checks if the connection config is connectable by the backend. Used mostly to verify that a connection is valid prior to creating a Connection object. |
GetConnectionSchema
Method | GetConnectionSchema |
---|---|
Request | GetConnectionSchemaRequest |
Response | GetConnectionSchemaResponse |
Description | Returns the schema for a specific connection. Used mostly for SQL-based connections |
CheckSqlQuery
Method | CheckSqlQuery |
---|---|
Request | CheckSqlQueryRequest |
Response | CheckSqlQueryResponse |
Description | Checks a constructed SQL query against a sql-based connection to see if it's valid based on that connection's data schema This is useful when constructing subsets to see if the WHERE clause is correct |
GetConnectionDataStream
Method | GetConnectionDataStream |
---|---|
Request | GetConnectionDataStreamRequest |
Response | GetConnectionDataStreamResponse stream |
Description | Streaming endpoint that will stream the data available from the Connection to the client. Used primarily by the CLI sync command. |
GetConnectionForeignConstraints
Method | GetConnectionForeignConstraints |
---|---|
Request | GetConnectionForeignConstraintsRequest |
Response | GetConnectionForeignConstraintsResponse |
Description | For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. Used primarily by the CLI sync command to determine stream order. |