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
privilegesrepeated ConnectionRolePrivilege

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

ClientTlsConfig

Config for providing client-side TLS certificates

NameTypeDescription
root_certoptional stringRoot Certificate in PEM Format
client_certoptional stringClient Certificate in PEM format. Must also provide key.
client_keyoptional stringClient Key in PEM format. Must also provide cert.

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

Configuration for all of the supported Neosync connection types

NameTypeDescription
pg_configPostgresConnectionConfigConfigures a PostgreSQL connection
aws_s3_configAwsS3ConnectionConfigConfigures an AWS S3 Connection
mysql_configMysqlConnectionConfigConfigures a MySQL connection
local_dir_configLocalDirectoryConnectionConfigConfigures a connection to a directory available on the local file system
openai_configOpenAiConnectionConfigConnection config for an OpenAI (or compatible) Connection
mongo_configMongoConnectionConfigConfigures a MongoDB Connection
gcp_cloudstorage_configGcpCloudStorageConnectionConfigConfigures a GCP Cloud Storage Connection

ConnectionRolePrivilege

NameTypeDescription
granteestringThe role that was given the permissions
schemastringThe database schema. Ex: public
tablestringThe name of the table in the schema
privilege_typerepeated stringThe privileges given to that role

CreateConnectionRequest

NameTypeDescription
account_idstring
namestringThe friendly name of the connection
connection_configConnectionConfig

CreateConnectionResponse

NameTypeDescription
connectionConnection

DeleteConnectionRequest

NameTypeDescription
idstring

DeleteConnectionResponse

NameTypeDescription

GcpCloudStorageConnectionConfig

Configuration for GCP Cloud Storage Buckets

NameTypeDescription
bucketstringThe GCP Cloud Storage bucket that will be accessed.
path_prefixoptional stringThe path prefix that will be appended to each file
service_account_credentialsoptional stringstringified json of the service account credentials file

GetConnectionRequest

NameTypeDescription
idstring

GetConnectionResponse

NameTypeDescription
connectionConnection

GetConnectionsRequest

NameTypeDescription
account_idstring

GetConnectionsResponse

NameTypeDescription
connectionsrepeated Connection

IsConnectionNameAvailableRequest

NameTypeDescription
account_idstring
connection_namestring

IsConnectionNameAvailableResponse

NameTypeDescription
is_availablebool

LocalDirectoryConnectionConfig

Configures a connection to a directory available on the local file system

NameTypeDescription
pathstringThe absolute path to a directory that is available on the local file system to the API and Worker nodes

MongoConnectionConfig

NameTypeDescription
urlstringThe full mongo connection url
tunnelSSHTunnelProvide tunnel configuration that can be used to access a connection that is not publicly accessible to the internet
client_tlsClientTlsConfigProvide client-side TLS Certificates

MysqlConnection

NameTypeDescription
userstring
passstring
protocolstring
hoststring
portint32
namestring

MysqlConnectionConfig

NameTypeDescription
urlstring
connectionMysqlConnection
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptions

OpenAiConnectionConfig

Configures a connection to OpenAI or OpenAI compatible API.

NameTypeDescription
api_keystringOpenAI Api Key
api_urlstringOpenAI URL

PostgresConnection

NameTypeDescription
hoststring
portint32
namestring
userstring
passstring
ssl_modeoptional string

PostgresConnectionConfig

NameTypeDescription
urlstring
connectionPostgresConnection
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptions
client_tlsClientTlsConfigProvide client-side TLS Certificates

SSHAuthentication

SSH Authentication

NameTypeDescription
passphraseSSHPassphrase
private_keySSHPrivateKey

SSHPassphrase

Contains the configuration needed to retrieve the SSH passphrase for the tunnel

NameTypeDescription
valuestringThe password to be used to connect to the SSH server eventually we can expand this to allow pulling from other sources.

SSHPrivateKey

Contains the configuration needed to retrieve the SSH private key for the tunnel

NameTypeDescription
valuestringThe private key in PEM format.
passphraseoptional stringIf the private key is encrypted, this value should decrypt it.

SSHTunnel

NameTypeDescription
hoststringThe host of the SSH server
portint32The port of the SSH server, typically 22
userstringThe user that will be used to authenticate
known_host_public_keyoptional stringOptionally provide the public key of the known host of the SSH tunnel that we are connecting to. If this is not provided, the server will blindly connect to the host with the given credentials. This is not recommended for production use!
authenticationSSHAuthenticationProvide the authentication required to successfully connect to the SSH server for tunneling

SqlConnectionOptions

NameTypeDescription
max_connection_limitoptional int32Limits the number of open connections in the pool.

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.

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