Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
danylo-safonov-solid committed Sep 19, 2023
1 parent 38540f1 commit b0391f1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
31 changes: 28 additions & 3 deletions lib/src/client_configuration.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
import 'dart:js_interop';
import 'dart:js_util';

import 'package:deno_postgres_interop/src/connection_options.dart';
import 'package:deno_postgres_interop/src/tls_options.dart';
import 'package:deno_postgres_interop/src/transport.dart';

/// [[email protected]/ClientConfiguration](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration).
@JS()
class ClientConfiguration {
/// [[email protected]/ClientConfiguration/applicationName](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_applicationName).
external String get applicationName;
// external ConnectionOptions get connection;

/// [[email protected]/ClientConfiguration/connection](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_connection).
external ConnectionOptions get connection;

/// [[email protected]/ClientConfiguration/database](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_database).
external String get database;

/// [[email protected]/ClientConfiguration/hostname](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_hostname).
external String get hostname;
external Transport get host_type;

/// [[email protected]/ClientConfiguration/options](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_options).
// external Record<String, String> get options;

/// [[email protected]/ClientConfiguration/password](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_password).
external String? get password;

/// [[email protected]/ClientConfiguration/port](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_port).
external int get port;
// external TLSOptions get tls;

/// [[email protected]/ClientConfiguration/tls](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_tls).
external TLSOptions get tls;

/// [[email protected]/ClientConfiguration/user](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_user).
external String get user;
}

/// [[email protected]/ClientConfiguration](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration).
extension ClientConfigurationProps on ClientConfiguration {
/// [[email protected]/ClientConfiguration/host_type](https://deno.land/x/[email protected]/connection/connection_params.ts?s=ClientConfiguration#prop_host_type).
Transport get hostType => getProperty(this, 'host_type');
}
1 change: 1 addition & 0 deletions lib/src/connection_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class ConnectionOptions {}
1 change: 1 addition & 0 deletions lib/src/tls_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class TLSOptions {}

0 comments on commit b0391f1

Please sign in to comment.