UNPKG

@itentialopensource/adapter-db_mysql

Version:
242 lines 6.08 kB
{ "$id": "adapter-db_mysql", "type": "object", "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "database": { "type": "string", "description": "The name of the database", "default": "test", "examples": [ "test" ] }, "host": { "type": "string", "description": "Host where the MySQL database resides.", "default": "localhost", "examples": [ "localhost" ] }, "port": { "type": "integer", "description": "Port to be used to connect to MySQL.", "default": 27017, "minimum": 1, "maximum": 65535 }, "authentication": { "$ref": "#/definitions/authentication", "default": {} }, "ssl": { "$ref": "#/definitions/ssl", "default": {} }, "connectionOptions": { "$ref": "#/definitions/connectionOptions", "default": {} }, "healthcheck": { "$ref": "#/definitions/healthcheck", "default": {} } }, "required": [ "database", "host", "port", "authentication", "healthcheck", "connectionOptions" ], "definitions": { "authentication": { "$id": "/authentication", "type": "object", "properties": { "dbAuth": { "$id": "/credentials/properties/dbAuth", "type": "boolean", "description": "whether or not to use user authentication to connect to mysql", "default": false }, "password": { "type": "string", "description": "Password used when authentication is enabled.", "default": "pronghorn", "examples": [ "itentialPassword" ] }, "username": { "type": "string", "description": "Username used when authentication is enabled.", "default": "pronghorn", "examples": [ "itentialUser" ] } }, "required": [ "username", "password" ] }, "ssl": { "$id": "/ssl", "type": "object", "properties": { "enabled": { "$id": "/ssl/properties/enabled", "type": "boolean", "description": "Whether or not ssl is enabled on PostgreSQL", "default": false }, "accept_invalid_cert": { "$id": "/ssl/properties/accept_invalid_cert", "type": "boolean", "description": "Whether IAP should be configured to accept invalid certificates", "default": false }, "ca_file": { "$id": "/ssl/properties/ca_file", "type": "string", "description": "The fully qualified path name to the CA pem file used for SSL", "default": "", "examples": [ "keys/key.pem" ] } }, "required": [ "enabled" ], "allOf": [ { "if": { "properties": { "enabled": { "enum": [ true ] } } }, "then": { "required": [ "acceptInvalidCerts", "checkServerIdentity" ] } }, { "if": { "allOf": [ { "properties": { "enabled": { "enum": [ true ] } } }, { "properties": { "acceptInvalidCerts": { "enum": [ false ] } } } ] }, "then": { "required": [ "sslCA" ] } } ] }, "healthcheck": { "$id": "/healthcheck", "type": "object", "properties": { "type": { "type": "string", "description": "The type of healthcheck to run", "default": "intermittent", "enum": [ "none", "startup", "intermittent" ] }, "frequency": { "type": "integer", "description": "How often the healthcheck should run (in milliseconds).", "default": 300000, "minimum": 60000, "maximum": 3600000 } }, "required": [ "type" ], "allOf": [ { "if": { "properties": { "type": { "enum": [ "intermittent" ] } } }, "then": { "required": [ "frequency" ] } } ] }, "connectionOptions": { "$id": "/connectionOptions", "type": "object", "properties": { "connectTimeout": { "type": "number", "description": "The milliseconds before a timeout occurs during the initial connection to the MySQL server.", "default": 10000 }, "acquireTimeout": { "type": "number", "description": "The milliseconds before a timeout occurs during the connection acquisition", "default": 10000 }, "waitForConnections": { "type": "boolean", "description": "Determines the pool's action when no connections are available and the limit has been reached", "default": true }, "connectionLimit": { "type": "number", "description": "The maximum number of connections to create at once", "default": 10 }, "queueLimit": { "type": "number", "description": "The maximum number of connection requests the pool will queue before returning an error from getConnection", "default": 0 } }, "additionalProperties": false } } }