mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 21:27:22 +00:00
Refactor crypto utils and grpc credentials client
This commit is contained in:
parent
fffdd53c18
commit
5346a4922e
3 changed files with 16 additions and 19 deletions
|
|
@ -11,7 +11,7 @@ import '../types/connection_config.dart';
|
|||
import '../types/credential.dart';
|
||||
|
||||
class GRPCCredentialsClient implements CredentialsRepo {
|
||||
static GRPCCredentialsClient _cached;
|
||||
static GRPCCredentialsClient _instance;
|
||||
grpc.CredentialsClient _client;
|
||||
|
||||
GRPCCredentialsClient(ConnectionConfig config) {
|
||||
|
|
@ -32,8 +32,8 @@ class GRPCCredentialsClient implements CredentialsRepo {
|
|||
));
|
||||
}
|
||||
|
||||
factory GRPCCredentialsClient.cached({ConnectionConfig config}) =>
|
||||
config == null ? _cached : _cached = GRPCCredentialsClient(config);
|
||||
factory GRPCCredentialsClient.getInstance({ConnectionConfig config}) =>
|
||||
config == null ? _instance : _instance = GRPCCredentialsClient(config);
|
||||
|
||||
Stream<Metadata> getAllMetadata(String sourceHost) {
|
||||
final request = grpc.SourceHostRequest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue