dm_api_status Module

HTTP-RPC API status message.


Uses

  • module~~dm_api_status~~UsesGraph module~dm_api_status dm_api_status module~dm_ascii dm_ascii module~dm_api_status->module~dm_ascii module~dm_error dm_error module~dm_api_status->module~dm_error module~dm_time dm_time module~dm_api_status->module~dm_time module~dm_util dm_util module~dm_api_status->module~dm_util module~dm_version dm_version module~dm_api_status->module~dm_version module~dm_error->module~dm_ascii module~dm_kind dm_kind module~dm_error->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_util module~dm_time->module~dm_kind module~dm_util->module~dm_error module~dm_util->module~dm_kind iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Used by

  • module~~dm_api_status~~UsedByGraph module~dm_api_status dm_api_status module~dmpack dmpack module~dmpack->module~dm_api_status

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: API_STATUS_NKEYS = 7

Number of elements in derived type.

integer, public, parameter :: API_STATUS_LEN = 32

Max. length of element values.


Interfaces

public interface operator (==)

Returns whether api status types are equal.

  • public pure elemental function dm_api_status_equals(api1, api2) result(equals)

    Returns .true. if given API status types are equal.

    Arguments

    Type IntentOptional Attributes Name
    type(api_status_type), intent(in) :: api1

    The first status type.

    type(api_status_type), intent(in) :: api2

    The second status type.

    Return Value logical


Derived Types

type, public ::  api_status_type

API status type that stores an HTTP-RPC API response.

Components

Type Visibility Attributes Name Initial
character(len=API_STATUS_LEN), public :: version = ' '

Server application version.

character(len=API_STATUS_LEN), public :: dmpack = DM_VERSION_STRING

Server library version.

character(len=API_STATUS_LEN), public :: host = ' '

Server host name.

character(len=API_STATUS_LEN), public :: server = ' '

Server software (web server).

character(len=API_STATUS_LEN), public :: timestamp = TIME_DEFAULT

Server date and time in ISO 8601.

character(len=API_STATUS_LEN), public :: message = ' '

Status message.

integer, public :: error = E_NONE

Error code.


Functions

public function dm_api_status_from_string(string, api) result(rc)

Reads API status type from given string. Only keys found in the string are overwritten in the derived type. No error is returned if the string does not contain any of the keys. The function returns E_EMPTY if the passed string is empty.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String representation of API status.

type(api_status_type), intent(out) :: api

Result.

Return Value integer

public pure elemental function dm_api_status_equals(api1, api2) result(equals)

Returns .true. if given API status types are equal.

Arguments

Type IntentOptional Attributes Name
type(api_status_type), intent(in) :: api1

The first status type.

type(api_status_type), intent(in) :: api2

The second status type.

Return Value logical

public function dm_api_status_to_string(api) result(str)

Returns string representation of given API status type. The string contains new-line characters.

Arguments

Type IntentOptional Attributes Name
type(api_status_type), intent(inout) :: api

API status type.

Return Value character(len=:), allocatable

String representation.