dbsync_core.t_dbsync_source type
The t_dbsync_source
type defines a record
that contains source parameters for DB Sync client apps to connect to the DB Sync server.
Syntax
TYPE t_dbsync_source RECORD
app_id dbsync_core.t_app_id,
protocol STRING,
authority RECORD
host STRING,
port INTEGER
END RECORD,
service_name STRING,
use_gas BOOLEAN,
gas RECORD
connector STRING,
group STRING
END RECORD,
sso RECORD
idp_issuer STRING,
client_id STRING,
client_secret STRING
END RECORD
END RECORD
- For details about
t_dbsync_source
fields, see Client configuration file.
Usage
Define a variable with the t_dbsync_source
type, to hold DB Sync client
application configuration parameters such as the app id, GAS RESTful service information and SSO
parameters for user authentication.
When filled with parameter values, the record variable must be passed to the dbsync_app.register_dbsync_source()
function.
Example
DEFINE dbsync_source dbsync_core.t_dbsync_source
IF dbsync_core.read_dbsync_source_file(filename, dbsync_source) < 0 THEN
DISPLAY "ERROR: Failed to read JSON DB Sync source config file"
EXIT PROGRAM 1
END IF
CALL dbsync_app.register_dbsync_source(dbsync_source)