flag

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: BSD-2-Clause Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArangoFlags added in v0.4.0

func ArangoFlags() []cli.Flag

The ArangoFlags function returns a []cli.Flag containing the following flags:

  • arangodb-pass: The password for the ArangoDB database.

    This flag is required and can be set using the ARANGODB_PASS environment variable.

  • arangodb-user: The user for the ArangoDB database.

    This flag is required and can be set using the ARANGODB_USER environment variable.

  • arangodb-host: The host for the ArangoDB database.

    The default value is "arangodb" and can be overridden using the ARANGODB_SERVICE_HOST environment variable. This flag is required.

  • arangodb-port: The port for the ArangoDB database.

    The default value is "8529" and can be overridden using the ARANGODB_SERVICE_PORT environment variable.

  • is-secure: A boolean flag indicating whether the ArangoDB endpoint is secured or unsecured.

Example usage:

flags := ArangoFlags()
app := cli.NewApp()
app.Flags = flags
...
err := app.Run(os.Args)

The ArangoFlags function can be used in a command-line application to easily configure ArangoDB connection details.

func ArangodbFlags

func ArangodbFlags() []cli.Flag

ArangodbFlags returns a slice of cli.Flag for configuring an ArangoDB connection. This version includes a database name flag (arangodb-database) in addition to the basic connection flags provided by ArangoFlags().

The returned flags include:

  • arangodb-pass: Password for ArangoDB (required, can be set via ARANGODB_PASS)
  • arangodb-database: Database name (required, can be set via ARANGODB_DATABASE)
  • arangodb-user: Username for ArangoDB (required, can be set via ARANGODB_USER)
  • arangodb-host: Host address (defaults to "arangodb", can be set via ARANGODB_SERVICE_HOST)
  • arangodb-port: Port number (defaults to "8529", can be set via ARANGODB_SERVICE_PORT)
  • is-secure: Flag for secured connection (defaults to true)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL