GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Zonemaster::Backend::Config(3) User Contributed Perl Documentation Zonemaster::Backend::Config(3)

Determine the path for the default backend_config.ini file. A list of values and locations are checked and the first match is returned. If all places are checked and no file is found, an exception is thrown.

This procedure is idempotent - i.e. if you call this procedure multiple times the same value is returned no matter if environment variables or the file system have changed.

The following checks are made in order:

$ZONEMASTER_BACKEND_CONFIG_FILE
If this environment variable is set ot a truthy value, that path is returned.
/etc/zonemaster/backend_config.ini
If a file exists at this path, it is returned.
/usr/local/etc/zonemaster/backend_config.ini
If a file exists at such a path, it is returned.
If a file exists at this path, it is returned. DIST_DIR is wherever File::ShareDir installs the Zonemaster-Backend dist.

Loads and returns a set of named profiles.

    my %all_profiles = (
        $config->PUBLIC_PROFILES,
        $config->PRIVATE_PROFILES,
    );
    my %profiles = %{ Zonemaster::Backend::Config->load_profiles( %all_profiles ) };

Takes a hash mapping profile names to profile paths. An `undef` path value means the default profile.

Returns a hashref mapping profile names to profile objects.

The returned profiles have omitted values filled in with defaults from the default profile.

Dies if any of the given paths cannot be read or their contents cannot be parsed as JSON.

A wrapper around parse that also determines where the config file is located in the file system and reads it.

Throws an exception if the determined configuration file cannot be read. See parse for details on additional parsing-related error modes.

Construct a new Zonemaster::Backend::Config based on a given configuration.

    my $config = Zonemaster::Backend::Config->parse(
        q{
            [DB]
            engine = SQLite
            [SQLITE]
            database_file = /var/db/zonemaster.sqlite
        }
    );

The configuration is interpreted according to the configuration format specification <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md>.

Returns a new Zonemaster::Backend::Config instance with its properties set to normalized and untainted values according to the given configuration with defaults according to the configuration format.

Emits a log warning with a deprecation message for each deprecated property that is present.

Throws an exception if the given configuration contains errors.

In a valid config file:

  • all required properties are present, and
  • all sections and properties are recognized.

Returns a normalized string based on the supported databases.

EXCEPTION

Dies if the value is not one of SQLite, PostgreSQL or MySQL.

Get the value of DB.engine <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#engine>.

Returns one of "SQLite", "PostgreSQL" or "MySQL".

Get the value of DB.polling_interval <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#polling_interval>.

Returns a number.

Get the value of MYSQL.database <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#database>.

Returns a string.

Get the value of MYSQL.host <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#host>.

Returns a string.

Returns the MYSQL.port <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#port> property from the loaded config.

Returns a number.

Get the value of MYSQL.password <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#password>.

Returns a string.

Get the value of MYSQL.user <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#user>.

Returns a string.

Get the value of POSTGRESQL.database <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#database-1>.

Returns a string.

Get the value of POSTGRESQL.host <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#host-1>.

Returns a string.

Returns the POSTGRESQL.port <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#port-1> property from the loaded config.

Returns a number.

Get the value of POSTGRESQL.password <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#password-1>.

Returns a string.

Get the value of POSTGRESQL.user <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#user-1>.

Returns a string.

Get the value of SQLITE.database_file <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#database_file>.

Returns a string.

Get the value of LANGUAGE.locale <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#locale>.

Returns a mapping from two-letter locale tag prefixes to full locale tags. This is represented by a hash mapping prefix to full locale tag.

E.g.:

    (
        en => "en_US",
        sv => "sv_SE",
    )

Get the set of PUBLIC PROFILES <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#public-profiles-and-private-profiles-sections>.

Returns a hash mapping profile names to profile paths. The profile names are normalized to lowercase. Profile paths are either strings or "undef". "undef" means that the Zonemaster Engine default profile should be used.

Get the set of PRIVATE PROFILES <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#public-profiles-and-private-profiles-sections>.

Returns a hash mapping profile names to profile paths. The profile names are normalized to lowercase. Profile paths are always strings (contrast with PUBLIC_PROFILES).

Get the value of ZONEMASTER.max_zonemaster_execution_time <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#max_zonemaster_execution_time>.

Returns a number.

Get the value of ZONEMASTER.number_of_processes_for_frontend_testing <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#number_of_processes_for_frontend_testing>.

Returns a number.

Get the value of ZONEMASTER.number_of_processes_for_batch_testing <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#number_of_processes_for_batch_testing>.

Returns a number.

Get the value of ZONEMASTER.lock_on_queue <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#lock_on_queue>.

Returns a number.

Get the value of ZONEMASTER.age_reuse_previous_test <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#age_reuse_previous_test>.

Returns a number.

Get the value of METRICS.statsd_host <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#statsd_host>.

Returns a string.

Get the value of METRICS.statsd_host <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#statsd_port>.

Returns a number.

Experimental. Get the value of RPCAPI.enable_user_create <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#enable_user_create>.

Return 0 or 1

Experimental. Get the value of RPCAPI.enable_batch_create <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#enable_batch_create>.

Return 0 or 1

Get the value of RPCAPI.enable_add_api_user <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#enable_add_api_user>.

Return 0 or 1

Get the value of RPCAPI.enable_add_batch_job <https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md#enable_add_batch_job>.

Return 0 or 1

Create a new database adapter object according to configuration.

The adapter connects to the database before it is returned.

INPUT

The database adapter class is selected based on the return value of DB_engine. The database adapter class constructor is called without arguments and is expected to configure itself according to available global configuration.

RETURNS

A configured Zonemaster::Backend::DB object.

EXCEPTIONS

Create a new processing manager object according to configuration.

INPUT

The values of the following attributes affect the construction of the returned object:

RETURNS

A configured Parallel::ForkManager object.

2024-12-04 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.