storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/config/notify/help.go (about) 1 /* 2 * MinIO Cloud Storage, (C) 2019 MinIO, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package notify 18 19 import ( 20 "storj.io/minio/cmd/config" 21 "storj.io/minio/pkg/event/target" 22 ) 23 24 const ( 25 formatComment = `'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'` 26 queueDirComment = `staging dir for undelivered messages e.g. '/home/events'` 27 queueLimitComment = `maximum limit for undelivered messages, defaults to '100000'` 28 ) 29 30 // Help template inputs for all notification targets 31 var ( 32 HelpWebhook = config.HelpKVS{ 33 config.HelpKV{ 34 Key: target.WebhookEndpoint, 35 Description: "webhook server endpoint e.g. http://localhost:8080/minio/events", 36 Type: "url", 37 }, 38 config.HelpKV{ 39 Key: target.WebhookAuthToken, 40 Description: "opaque string or JWT authorization token", 41 Optional: true, 42 Type: "string", 43 }, 44 config.HelpKV{ 45 Key: target.WebhookQueueDir, 46 Description: queueDirComment, 47 Optional: true, 48 Type: "path", 49 }, 50 config.HelpKV{ 51 Key: target.WebhookQueueLimit, 52 Description: queueLimitComment, 53 Optional: true, 54 Type: "number", 55 }, 56 config.HelpKV{ 57 Key: config.Comment, 58 Description: config.DefaultComment, 59 Optional: true, 60 Type: "sentence", 61 }, 62 config.HelpKV{ 63 Key: target.WebhookClientCert, 64 Description: "client cert for Webhook mTLS auth", 65 Optional: true, 66 Type: "string", 67 }, 68 config.HelpKV{ 69 Key: target.WebhookClientKey, 70 Description: "client cert key for Webhook mTLS auth", 71 Optional: true, 72 Type: "string", 73 }, 74 } 75 76 HelpAMQP = config.HelpKVS{ 77 config.HelpKV{ 78 Key: target.AmqpURL, 79 Description: "AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`", 80 Type: "url", 81 }, 82 config.HelpKV{ 83 Key: target.AmqpExchange, 84 Description: "name of the AMQP exchange", 85 Optional: true, 86 Type: "string", 87 }, 88 config.HelpKV{ 89 Key: target.AmqpExchangeType, 90 Description: "AMQP exchange type", 91 Optional: true, 92 Type: "string", 93 }, 94 config.HelpKV{ 95 Key: target.AmqpRoutingKey, 96 Description: "routing key for publishing", 97 Optional: true, 98 Type: "string", 99 }, 100 config.HelpKV{ 101 Key: target.AmqpMandatory, 102 Description: "quietly ignore undelivered messages when set to 'off', default is 'on'", 103 Optional: true, 104 Type: "on|off", 105 }, 106 config.HelpKV{ 107 Key: target.AmqpDurable, 108 Description: "persist queue across broker restarts when set to 'on', default is 'off'", 109 Optional: true, 110 Type: "on|off", 111 }, 112 config.HelpKV{ 113 Key: target.AmqpNoWait, 114 Description: "non-blocking message delivery when set to 'on', default is 'off'", 115 Optional: true, 116 Type: "on|off", 117 }, 118 config.HelpKV{ 119 Key: target.AmqpInternal, 120 Description: "set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges", 121 Optional: true, 122 Type: "on|off", 123 }, 124 config.HelpKV{ 125 Key: target.AmqpAutoDeleted, 126 Description: "auto delete queue when set to 'on', when there are no consumers", 127 Optional: true, 128 Type: "on|off", 129 }, 130 config.HelpKV{ 131 Key: target.AmqpDeliveryMode, 132 Description: "set to '1' for non-persistent or '2' for persistent queue", 133 Optional: true, 134 Type: "number", 135 }, 136 config.HelpKV{ 137 Key: target.AmqpQueueDir, 138 Description: queueDirComment, 139 Optional: true, 140 Type: "path", 141 }, 142 config.HelpKV{ 143 Key: target.AmqpQueueLimit, 144 Description: queueLimitComment, 145 Optional: true, 146 Type: "number", 147 }, 148 config.HelpKV{ 149 Key: config.Comment, 150 Description: config.DefaultComment, 151 Optional: true, 152 Type: "sentence", 153 }, 154 } 155 156 HelpKafka = config.HelpKVS{ 157 config.HelpKV{ 158 Key: target.KafkaBrokers, 159 Description: "comma separated list of Kafka broker addresses", 160 Type: "csv", 161 }, 162 config.HelpKV{ 163 Key: target.KafkaTopic, 164 Description: "Kafka topic used for bucket notifications", 165 Optional: true, 166 Type: "string", 167 }, 168 config.HelpKV{ 169 Key: target.KafkaSASLUsername, 170 Description: "username for SASL/PLAIN or SASL/SCRAM authentication", 171 Optional: true, 172 Type: "string", 173 }, 174 config.HelpKV{ 175 Key: target.KafkaSASLPassword, 176 Description: "password for SASL/PLAIN or SASL/SCRAM authentication", 177 Optional: true, 178 Type: "string", 179 }, 180 config.HelpKV{ 181 Key: target.KafkaSASLMechanism, 182 Description: "sasl authentication mechanism, default 'plain'", 183 Optional: true, 184 Type: "string", 185 }, 186 config.HelpKV{ 187 Key: target.KafkaTLSClientAuth, 188 Description: "clientAuth determines the Kafka server's policy for TLS client auth", 189 Optional: true, 190 Type: "string", 191 }, 192 config.HelpKV{ 193 Key: target.KafkaSASL, 194 Description: "set to 'on' to enable SASL authentication", 195 Optional: true, 196 Type: "on|off", 197 }, 198 config.HelpKV{ 199 Key: target.KafkaTLS, 200 Description: "set to 'on' to enable TLS", 201 Optional: true, 202 Type: "on|off", 203 }, 204 config.HelpKV{ 205 Key: target.KafkaTLSSkipVerify, 206 Description: `trust server TLS without verification, defaults to "on" (verify)`, 207 Optional: true, 208 Type: "on|off", 209 }, 210 config.HelpKV{ 211 Key: target.KafkaClientTLSCert, 212 Description: "path to client certificate for mTLS auth", 213 Optional: true, 214 Type: "path", 215 }, 216 config.HelpKV{ 217 Key: target.KafkaClientTLSKey, 218 Description: "path to client key for mTLS auth", 219 Optional: true, 220 Type: "path", 221 }, 222 config.HelpKV{ 223 Key: target.KafkaQueueDir, 224 Description: queueDirComment, 225 Optional: true, 226 Type: "path", 227 }, 228 config.HelpKV{ 229 Key: target.KafkaQueueLimit, 230 Description: queueLimitComment, 231 Optional: true, 232 Type: "number", 233 }, 234 config.HelpKV{ 235 Key: target.KafkaVersion, 236 Description: "specify the version of the Kafka cluster", 237 Optional: true, 238 Type: "string", 239 }, 240 config.HelpKV{ 241 Key: config.Comment, 242 Description: config.DefaultComment, 243 Optional: true, 244 Type: "sentence", 245 }, 246 } 247 248 HelpMQTT = config.HelpKVS{ 249 config.HelpKV{ 250 Key: target.MqttBroker, 251 Description: "MQTT server endpoint e.g. `tcp://localhost:1883`", 252 Type: "uri", 253 }, 254 config.HelpKV{ 255 Key: target.MqttTopic, 256 Description: "name of the MQTT topic to publish", 257 Type: "string", 258 }, 259 config.HelpKV{ 260 Key: target.MqttUsername, 261 Description: "MQTT username", 262 Optional: true, 263 Type: "string", 264 }, 265 config.HelpKV{ 266 Key: target.MqttPassword, 267 Description: "MQTT password", 268 Optional: true, 269 Type: "string", 270 }, 271 config.HelpKV{ 272 Key: target.MqttQoS, 273 Description: "set the quality of service priority, defaults to '0'", 274 Optional: true, 275 Type: "number", 276 }, 277 config.HelpKV{ 278 Key: target.MqttKeepAliveInterval, 279 Description: "keep-alive interval for MQTT connections in s,m,h,d", 280 Optional: true, 281 Type: "duration", 282 }, 283 config.HelpKV{ 284 Key: target.MqttReconnectInterval, 285 Description: "reconnect interval for MQTT connections in s,m,h,d", 286 Optional: true, 287 Type: "duration", 288 }, 289 config.HelpKV{ 290 Key: target.MqttQueueDir, 291 Description: queueDirComment, 292 Optional: true, 293 Type: "path", 294 }, 295 config.HelpKV{ 296 Key: target.MqttQueueLimit, 297 Description: queueLimitComment, 298 Optional: true, 299 Type: "number", 300 }, 301 config.HelpKV{ 302 Key: config.Comment, 303 Description: config.DefaultComment, 304 Optional: true, 305 Type: "sentence", 306 }, 307 } 308 309 HelpPostgres = config.HelpKVS{ 310 config.HelpKV{ 311 Key: target.PostgresConnectionString, 312 Description: `Postgres server connection-string e.g. "host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable"`, 313 Type: "string", 314 }, 315 config.HelpKV{ 316 Key: target.PostgresTable, 317 Description: "DB table name to store/update events, table is auto-created", 318 Type: "string", 319 }, 320 config.HelpKV{ 321 Key: target.PostgresFormat, 322 Description: formatComment, 323 Type: "namespace*|access", 324 }, 325 config.HelpKV{ 326 Key: target.PostgresQueueDir, 327 Description: queueDirComment, 328 Optional: true, 329 Type: "path", 330 }, 331 config.HelpKV{ 332 Key: target.PostgresQueueLimit, 333 Description: queueLimitComment, 334 Optional: true, 335 Type: "number", 336 }, 337 config.HelpKV{ 338 Key: config.Comment, 339 Description: config.DefaultComment, 340 Optional: true, 341 Type: "sentence", 342 }, 343 config.HelpKV{ 344 Key: target.PostgresMaxOpenConnections, 345 Description: "To set the maximum number of open connections to the database. The value is set to `2` by default.", 346 Optional: true, 347 Type: "number", 348 }, 349 } 350 351 HelpMySQL = config.HelpKVS{ 352 config.HelpKV{ 353 Key: target.MySQLDSNString, 354 Description: `MySQL data-source-name connection string e.g. "<user>:<password>@tcp(<host>:<port>)/<database>"`, 355 Optional: true, 356 Type: "string", 357 }, 358 config.HelpKV{ 359 Key: target.MySQLTable, 360 Description: "DB table name to store/update events, table is auto-created", 361 Type: "string", 362 }, 363 config.HelpKV{ 364 Key: target.MySQLFormat, 365 Description: formatComment, 366 Type: "namespace*|access", 367 }, 368 config.HelpKV{ 369 Key: target.MySQLQueueDir, 370 Description: queueDirComment, 371 Optional: true, 372 Type: "path", 373 }, 374 config.HelpKV{ 375 Key: target.MySQLQueueLimit, 376 Description: queueLimitComment, 377 Optional: true, 378 Type: "number", 379 }, 380 config.HelpKV{ 381 Key: config.Comment, 382 Description: config.DefaultComment, 383 Optional: true, 384 Type: "sentence", 385 }, 386 config.HelpKV{ 387 Key: target.MySQLMaxOpenConnections, 388 Description: "To set the maximum number of open connections to the database. The value is set to `2` by default.", 389 Optional: true, 390 Type: "number", 391 }, 392 } 393 394 HelpNATS = config.HelpKVS{ 395 config.HelpKV{ 396 Key: target.NATSAddress, 397 Description: "NATS server address e.g. '0.0.0.0:4222'", 398 Type: "address", 399 }, 400 config.HelpKV{ 401 Key: target.NATSSubject, 402 Description: "NATS subscription subject", 403 Type: "string", 404 }, 405 config.HelpKV{ 406 Key: target.NATSUsername, 407 Description: "NATS username", 408 Optional: true, 409 Type: "string", 410 }, 411 config.HelpKV{ 412 Key: target.NATSPassword, 413 Description: "NATS password", 414 Optional: true, 415 Type: "string", 416 }, 417 config.HelpKV{ 418 Key: target.NATSToken, 419 Description: "NATS token", 420 Optional: true, 421 Type: "string", 422 }, 423 config.HelpKV{ 424 Key: target.NATSTLS, 425 Description: "set to 'on' to enable TLS", 426 Optional: true, 427 Type: "on|off", 428 }, 429 config.HelpKV{ 430 Key: target.NATSTLSSkipVerify, 431 Description: `trust server TLS without verification, defaults to "on" (verify)`, 432 Optional: true, 433 Type: "on|off", 434 }, 435 config.HelpKV{ 436 Key: target.NATSPingInterval, 437 Description: "client ping commands interval in s,m,h,d. Disabled by default", 438 Optional: true, 439 Type: "duration", 440 }, 441 config.HelpKV{ 442 Key: target.NATSStreaming, 443 Description: "set to 'on', to use streaming NATS server", 444 Optional: true, 445 Type: "on|off", 446 }, 447 config.HelpKV{ 448 Key: target.NATSStreamingAsync, 449 Description: "set to 'on', to enable asynchronous publish", 450 Optional: true, 451 Type: "on|off", 452 }, 453 config.HelpKV{ 454 Key: target.NATSStreamingMaxPubAcksInFlight, 455 Description: "number of messages to publish without waiting for ACKs", 456 Optional: true, 457 Type: "number", 458 }, 459 config.HelpKV{ 460 Key: target.NATSStreamingClusterID, 461 Description: "unique ID for NATS streaming cluster", 462 Optional: true, 463 Type: "string", 464 }, 465 config.HelpKV{ 466 Key: target.NATSCertAuthority, 467 Description: "path to certificate chain of the target NATS server", 468 Optional: true, 469 Type: "string", 470 }, 471 config.HelpKV{ 472 Key: target.NATSClientCert, 473 Description: "client cert for NATS mTLS auth", 474 Optional: true, 475 Type: "string", 476 }, 477 config.HelpKV{ 478 Key: target.NATSClientKey, 479 Description: "client cert key for NATS mTLS auth", 480 Optional: true, 481 Type: "string", 482 }, 483 config.HelpKV{ 484 Key: target.NATSQueueDir, 485 Description: queueDirComment, 486 Optional: true, 487 Type: "path", 488 }, 489 config.HelpKV{ 490 Key: target.NATSQueueLimit, 491 Description: queueLimitComment, 492 Optional: true, 493 Type: "number", 494 }, 495 config.HelpKV{ 496 Key: config.Comment, 497 Description: config.DefaultComment, 498 Optional: true, 499 Type: "sentence", 500 }, 501 } 502 503 HelpNSQ = config.HelpKVS{ 504 config.HelpKV{ 505 Key: target.NSQAddress, 506 Description: "NSQ server address e.g. '127.0.0.1:4150'", 507 Type: "address", 508 }, 509 config.HelpKV{ 510 Key: target.NSQTopic, 511 Description: "NSQ topic", 512 Type: "string", 513 }, 514 config.HelpKV{ 515 Key: target.NSQTLS, 516 Description: "set to 'on' to enable TLS", 517 Optional: true, 518 Type: "on|off", 519 }, 520 config.HelpKV{ 521 Key: target.NSQTLSSkipVerify, 522 Description: `trust server TLS without verification, defaults to "on" (verify)`, 523 Optional: true, 524 Type: "on|off", 525 }, 526 config.HelpKV{ 527 Key: target.NSQQueueDir, 528 Description: queueDirComment, 529 Optional: true, 530 Type: "path", 531 }, 532 config.HelpKV{ 533 Key: target.NSQQueueLimit, 534 Description: queueLimitComment, 535 Optional: true, 536 Type: "number", 537 }, 538 config.HelpKV{ 539 Key: config.Comment, 540 Description: config.DefaultComment, 541 Optional: true, 542 Type: "sentence", 543 }, 544 } 545 546 HelpES = config.HelpKVS{ 547 config.HelpKV{ 548 Key: target.ElasticURL, 549 Description: "Elasticsearch server's address, with optional authentication info", 550 Type: "url", 551 }, 552 config.HelpKV{ 553 Key: target.ElasticIndex, 554 Description: `Elasticsearch index to store/update events, index is auto-created`, 555 Type: "string", 556 }, 557 config.HelpKV{ 558 Key: target.ElasticFormat, 559 Description: formatComment, 560 Type: "namespace*|access", 561 }, 562 config.HelpKV{ 563 Key: target.ElasticQueueDir, 564 Description: queueDirComment, 565 Optional: true, 566 Type: "path", 567 }, 568 config.HelpKV{ 569 Key: target.ElasticQueueLimit, 570 Description: queueLimitComment, 571 Optional: true, 572 Type: "number", 573 }, 574 config.HelpKV{ 575 Key: target.ElasticUsername, 576 Description: "username for Elasticsearch basic-auth", 577 Optional: true, 578 Type: "string", 579 }, 580 config.HelpKV{ 581 Key: target.ElasticPassword, 582 Description: "password for Elasticsearch basic-auth", 583 Optional: true, 584 Type: "string", 585 }, 586 config.HelpKV{ 587 Key: config.Comment, 588 Description: config.DefaultComment, 589 Optional: true, 590 Type: "sentence", 591 }, 592 } 593 594 HelpRedis = config.HelpKVS{ 595 config.HelpKV{ 596 Key: target.RedisAddress, 597 Description: "Redis server's address. For example: `localhost:6379`", 598 Type: "address", 599 }, 600 config.HelpKV{ 601 Key: target.RedisKey, 602 Description: "Redis key to store/update events, key is auto-created", 603 Type: "string", 604 }, 605 config.HelpKV{ 606 Key: target.RedisFormat, 607 Description: formatComment, 608 Type: "namespace*|access", 609 }, 610 config.HelpKV{ 611 Key: target.RedisPassword, 612 Description: "Redis server password", 613 Optional: true, 614 Type: "string", 615 }, 616 config.HelpKV{ 617 Key: target.RedisQueueDir, 618 Description: queueDirComment, 619 Optional: true, 620 Type: "path", 621 }, 622 config.HelpKV{ 623 Key: target.RedisQueueLimit, 624 Description: queueLimitComment, 625 Optional: true, 626 Type: "number", 627 }, 628 config.HelpKV{ 629 Key: config.Comment, 630 Description: config.DefaultComment, 631 Optional: true, 632 Type: "sentence", 633 }, 634 } 635 )