n8n/packages/nodes-base/credentials/Postgres.credentials.ts

89 lines
1.5 KiB
TypeScript
Raw Normal View History

2019-08-21 09:44:10 -07:00
import {
ICredentialType,
INodeProperties,
2019-08-21 09:44:10 -07:00
} from 'n8n-workflow';
export class Postgres implements ICredentialType {
name = 'postgres';
displayName = 'Postgres';
documentationUrl = 'postgres';
properties: INodeProperties[] = [
2019-08-21 09:44:10 -07:00
{
displayName: 'Host',
name: 'host',
type: 'string',
2019-08-21 09:44:10 -07:00
default: 'localhost',
},
{
displayName: 'Database',
name: 'database',
type: 'string',
2019-08-21 09:44:10 -07:00
default: 'postgres',
},
{
displayName: 'User',
name: 'user',
type: 'string',
2019-08-21 09:44:10 -07:00
default: 'postgres',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
2019-08-21 09:44:10 -07:00
typeOptions: {
password: true,
},
default: '',
},
{
displayName: 'Ignore SSL Issues',
name: 'allowUnauthorizedCerts',
type: 'boolean',
default: false,
description: 'Whether to connect even if SSL certificate validation is not possible',
},
{
displayName: 'SSL',
name: 'ssl',
type: 'options',
displayOptions: {
show: {
allowUnauthorizedCerts: [
false,
],
},
},
options: [
2020-01-14 15:26:01 -08:00
{
name: 'Allow',
value: 'allow',
2020-01-14 15:26:01 -08:00
},
{
name: 'Disable',
value: 'disable',
2020-01-14 15:26:01 -08:00
},
{
name: 'Require',
2020-01-14 15:26:01 -08:00
value: 'require',
},
{
name: 'Verify (Not Implemented)',
2020-01-14 15:26:01 -08:00
value: 'verify',
},
{
name: 'Verify-Full (Not Implemented)',
2020-01-14 15:26:01 -08:00
value: 'verify-full',
2020-10-22 06:46:03 -07:00
},
],
default: 'disable',
},
2019-08-21 09:44:10 -07:00
{
displayName: 'Port',
name: 'port',
type: 'number',
2019-08-21 09:44:10 -07:00
default: 5432,
},
];
}