Skip to main content

connection.proto

path mgmt/v1alpha1/connection.proto

package mgmt.v1alpha1


Messages

AwsS3ConnectionConfig

NameTypeDescription
bucket_arnstring
path_prefixoptional string
credentialsoptional AwsS3Credentials
regionoptional string
endpointoptional string
bucketstring

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.

NameTypeDescription
profileoptional string
access_key_idoptional string
secret_access_keyoptional string
session_tokenoptional string
from_ec2_roleoptional bool
role_arnoptional string
role_external_idoptional string

CheckConnectionConfigRequest

NameTypeDescription
connection_configConnectionConfig

CheckConnectionConfigResponse

NameTypeDescription
is_connectedboolWhether or not the API was able to ping the connection
connection_erroroptional stringThis is the error that was received if the API was unable to connect

CheckSqlQueryRequest

NameTypeDescription
idstringThe connection id that the query will be checked against
querystringThe full query that will be run through a PREPARE statement

CheckSqlQueryResponse

NameTypeDescription
is_validboolThe query is run through PREPARE. Returns valid if it correctly compiled
erorr_messageoptional stringThe error message returned by the sql client if the prepare did not return successfully

Connection

NameTypeDescription
idstring
namestring
connection_configConnectionConfig
created_by_user_idstring
created_atgoogle.protobuf.Timestamp
updated_by_user_idstring
updated_atgoogle.protobuf.Timestamp
account_idstring

ConnectionConfig

NameTypeDescription
pg_configPostgresConnectionConfig
aws_s3_configAwsS3ConnectionConfig
mysql_configMysqlConnectionConfig

CreateConnectionRequest

NameTypeDescription
account_idstring
namestringThe friendly name of the connection
connection_configConnectionConfig

CreateConnectionResponse

NameTypeDescription
connectionConnection

DatabaseColumn

NameTypeDescription
schemastringThe database schema. Ex: public
tablestringThe name of the table in the schema
columnstringThe name of the column
data_typestringThe datatype of the column

DeleteConnectionRequest

NameTypeDescription
idstring

DeleteConnectionResponse

NameTypeDescription

ForeignConstraintTables

NameTypeDescription
tablesrepeated string

GetConnectionDataStreamRequest

NameTypeDescription
connection_idstring
schemastring
tablestring

GetConnectionDataStreamResponse

Each stream response is a single row in the requested schema and table

NameTypeDescription
rowrepeated GetConnectionDataStreamResponse.RowEntryA map of column name to the bytes value of the data that was found for that column and row

GetConnectionDataStreamResponse.RowEntry

NameTypeDescription
keystring
valuebytes

GetConnectionForeignConstraintsRequest

NameTypeDescription
connection_idstring

GetConnectionForeignConstraintsResponse

Dependency constraints for a specific table

NameTypeDescription
table_constraintsrepeated GetConnectionForeignConstraintsResponse.TableConstraintsEntrythe key here is <schema>.<table> and the list of tables that it depends on, also `<schema>.<table>` format.

GetConnectionForeignConstraintsResponse.TableConstraintsEntry

NameTypeDescription
keystring
valueForeignConstraintTables

GetConnectionInitStatementsRequest

NameTypeDescription
connection_idstring
optionsInitStatementOptions

GetConnectionInitStatementsResponse

Init statement for a specific table

NameTypeDescription
table_init_statementsrepeated GetConnectionInitStatementsResponse.TableInitStatementsEntrythe key here is <schema>.<table> and value is the table init statement.

GetConnectionInitStatementsResponse.TableInitStatementsEntry

NameTypeDescription
keystring
valuestring

GetConnectionRequest

NameTypeDescription
idstring

GetConnectionResponse

NameTypeDescription
connectionConnection

GetConnectionSchemaRequest

NameTypeDescription
idstring

GetConnectionSchemaResponse

NameTypeDescription
schemasrepeated DatabaseColumn

GetConnectionsRequest

NameTypeDescription
account_idstring

GetConnectionsResponse

NameTypeDescription
connectionsrepeated Connection

InitStatementOptions

NameTypeDescription
init_schemabool
truncate_before_insertbool
truncate_cascadebool

IsConnectionNameAvailableRequest

NameTypeDescription
account_idstring
connection_namestring

IsConnectionNameAvailableResponse

NameTypeDescription
is_availablebool

MysqlConnection

NameTypeDescription
userstring
passstring
protocolstring
hoststring
portint32
namestring

MysqlConnectionConfig

NameTypeDescription
urlstring
connectionMysqlConnection

PostgresConnection

NameTypeDescription
hoststring
portint32
namestring
userstring
passstring
ssl_modeoptional string

PostgresConnectionConfig

NameTypeDescription
urlstring
connectionPostgresConnection

UpdateConnectionRequest

NameTypeDescription
idstring
namestring
connection_configConnectionConfig

UpdateConnectionResponse

NameTypeDescription
connectionConnection

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

MethodGetConnections
RequestGetConnectionsRequest
ResponseGetConnectionsResponse
DescriptionReturns a list of connections associated with the account

GetConnection

MethodGetConnection
RequestGetConnectionRequest
ResponseGetConnectionResponse
DescriptionReturns a single connection

CreateConnection

MethodCreateConnection
RequestCreateConnectionRequest
ResponseCreateConnectionResponse
DescriptionCreates a new connection

UpdateConnection

MethodUpdateConnection
RequestUpdateConnectionRequest
ResponseUpdateConnectionResponse
DescriptionUpdates an existing connection

DeleteConnection

MethodDeleteConnection
RequestDeleteConnectionRequest
ResponseDeleteConnectionResponse
DescriptionRemoves a connection from the system.

IsConnectionNameAvailable

MethodIsConnectionNameAvailable
RequestIsConnectionNameAvailableRequest
ResponseIsConnectionNameAvailableResponse
DescriptionConnections have friendly names, this method checks if the requested name is available in the system based on the account

CheckConnectionConfig

MethodCheckConnectionConfig
RequestCheckConnectionConfigRequest
ResponseCheckConnectionConfigResponse
DescriptionChecks 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

MethodGetConnectionSchema
RequestGetConnectionSchemaRequest
ResponseGetConnectionSchemaResponse
DescriptionReturns the schema for a specific connection. Used mostly for SQL-based connections

CheckSqlQuery

MethodCheckSqlQuery
RequestCheckSqlQueryRequest
ResponseCheckSqlQueryResponse
DescriptionChecks 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

MethodGetConnectionDataStream
RequestGetConnectionDataStreamRequest
ResponseGetConnectionDataStreamResponse stream
DescriptionStreaming endpoint that will stream the data available from the Connection to the client. Used primarily by the CLI sync command.

GetConnectionForeignConstraints

MethodGetConnectionForeignConstraints
RequestGetConnectionForeignConstraintsRequest
ResponseGetConnectionForeignConstraintsResponse
DescriptionFor 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.

GetConnectionInitStatements

MethodGetConnectionInitStatements
RequestGetConnectionInitStatementsRequest
ResponseGetConnectionInitStatementsResponse
DescriptionFor a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. Used primarily by the CLI sync command to create table schema init statement.