Skip to content

config

dev_tool.services.portal.config

PortalServiceConfig dataclass

A data class for portal service configuration and endpoints.

This class stores both configuration parameters and provides endpoint methods.

base_url = 'https://guardian-webapp-3h6sm.ondigitalocean.app' class-attribute instance-attribute

admin_dump

A method that gets the admin dump endpoint URL.

Returns:

  • str

    The admin dump endpoint URL.

Source code in dev_tool/services/portal/config.py
def admin_dump(self) -> str:
    """
    A method that gets the admin dump endpoint URL.

    :return: The admin dump endpoint URL.
    """

    return '/dump/admin/'

decrypt

A method that gets the decrypt endpoint URL.

Parameters:

  • identifier (str) –

    The identifier for the resource to decrypt.

Returns:

  • str

    The decrypt endpoint URL.

Source code in dev_tool/services/portal/config.py
def decrypt(self, identifier: str) -> str:
    """
    A method that gets the decrypt endpoint URL.

    :param identifier: The identifier for the resource to decrypt.
    :return: The decrypt endpoint URL.
    """

    return f'/decrypt/{identifier}/'

download

A method that gets the download endpoint URL.

Parameters:

  • job_id (str) –

    The job ID for the dump.

Returns:

  • str

    The download endpoint URL.

Source code in dev_tool/services/portal/config.py
def download(self, job_id: str) -> str:
    """
    A method that gets the download endpoint URL.

    :param job_id: The job ID for the dump.
    :return: The download endpoint URL.
    """

    return f'/dump/download/{job_id}/'

dump

A method that gets the dump endpoint URL.

Returns:

  • str

    The dump endpoint URL.

Source code in dev_tool/services/portal/config.py
def dump(self) -> str:
    """
    A method that gets the dump endpoint URL.

    :return: The dump endpoint URL.
    """

    return '/dump/'

dump_status

A method that gets the dump status endpoint URL.

Parameters:

  • job_id (str) –

    The job ID to check status for.

Returns:

  • str

    The dump status endpoint URL.

Source code in dev_tool/services/portal/config.py
def dump_status(self, job_id: str) -> str:
    """
    A method that gets the dump status endpoint URL.

    :param job_id: The job ID to check status for.
    :return: The dump status endpoint URL.
    """

    return f'/dump/status/{job_id}/'

environment

A method that gets the environment variables download endpoint URL.

Parameters:

  • name (str) –

    The name of the environment to download.

Returns:

  • str

    The environment endpoint URL.

Source code in dev_tool/services/portal/config.py
def environment(self, name: str) -> str:
    """
    A method that gets the environment variables download endpoint URL.

    :param name: The name of the environment to download.
    :return: The environment endpoint URL.
    """

    return f'/environment/{name}/'

health

A method that gets the health endpoint URL.

Returns:

  • str

    The health endpoint URL.

Source code in dev_tool/services/portal/config.py
def health(self) -> str:
    """
    A method that gets the health endpoint URL.

    :return: The health endpoint URL.
    """

    return '/health/'