2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, IDisplayOptions, INodeProperties } from 'n8n-workflow';
|
2020-12-22 23:05:02 -08:00
|
|
|
|
|
|
|
export class RabbitMQ implements ICredentialType {
|
|
|
|
name = 'rabbitmq';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-12-22 23:05:02 -08:00
|
|
|
displayName = 'RabbitMQ';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-12-22 23:05:02 -08:00
|
|
|
documentationUrl = 'rabbitmq';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-12-22 23:05:02 -08:00
|
|
|
{
|
|
|
|
displayName: 'Hostname',
|
|
|
|
name: 'hostname',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
default: '',
|
|
|
|
placeholder: 'localhost',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Port',
|
|
|
|
name: 'port',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2020-12-22 23:05:02 -08:00
|
|
|
default: 5672,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'User',
|
|
|
|
name: 'username',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
default: '',
|
|
|
|
placeholder: 'guest',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
placeholder: 'guest',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Vhost',
|
|
|
|
name: 'vhost',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
default: '/',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'SSL',
|
|
|
|
name: 'ssl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2020-12-22 23:05:02 -08:00
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
2021-04-15 07:20:56 -07:00
|
|
|
displayName: 'Passwordless',
|
|
|
|
name: 'passwordless',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2021-04-15 07:20:56 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
ssl: [true],
|
2021-04-15 07:20:56 -07:00
|
|
|
},
|
|
|
|
},
|
2021-04-17 00:27:28 -07:00
|
|
|
default: true,
|
2022-07-24 08:36:17 -07:00
|
|
|
description:
|
|
|
|
'Whether to use passwordless connection with certificates (SASL mechanism EXTERNAL)',
|
2021-04-15 07:20:56 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'CA Certificates',
|
|
|
|
name: 'ca',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
ssl: [true],
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'SSL CA Certificates to use',
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
{
|
2021-04-15 07:20:56 -07:00
|
|
|
displayName: 'Client Certificate',
|
|
|
|
name: 'cert',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
ssl: [true],
|
|
|
|
passwordless: [true],
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
2021-04-15 07:20:56 -07:00
|
|
|
} as IDisplayOptions,
|
2020-12-22 23:05:02 -08:00
|
|
|
default: '',
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'SSL Client Certificate to use',
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
{
|
2021-04-15 07:20:56 -07:00
|
|
|
displayName: 'Client Key',
|
|
|
|
name: 'key',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
ssl: [true],
|
|
|
|
passwordless: [true],
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'SSL Client Key to use',
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
{
|
2021-04-15 07:20:56 -07:00
|
|
|
displayName: 'Passphrase',
|
|
|
|
name: 'passphrase',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
ssl: [true],
|
|
|
|
passwordless: [true],
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'SSL passphrase to use',
|
2020-12-22 23:05:02 -08:00
|
|
|
},
|
|
|
|
// {
|
|
|
|
// displayName: 'Client ID',
|
|
|
|
// name: 'clientId',
|
2021-06-12 09:39:55 -07:00
|
|
|
// type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
// default: '',
|
|
|
|
// placeholder: 'my-app',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// displayName: 'Brokers',
|
|
|
|
// name: 'brokers',
|
2021-06-12 09:39:55 -07:00
|
|
|
// type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
// default: '',
|
|
|
|
// placeholder: 'kafka1:9092,kafka2:9092',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// displayName: 'Username',
|
|
|
|
// name: 'username',
|
2021-06-12 09:39:55 -07:00
|
|
|
// type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
// default: '',
|
|
|
|
// description: 'Optional username if authenticated is required.',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// displayName: 'Password',
|
|
|
|
// name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
// type: 'string',
|
2020-12-22 23:05:02 -08:00
|
|
|
// typeOptions: {
|
|
|
|
// password: true,
|
|
|
|
// },
|
|
|
|
// default: '',
|
|
|
|
// description: 'Optional password if authenticated is required.',
|
|
|
|
// },
|
|
|
|
];
|
|
|
|
}
|