getSecret method

Future<FileContent?> getSecret({
  1. required String secretId,
  2. String? delegatedTo,
})

Implementation

Future<FileContent?> getSecret({required String secretId, String? delegatedTo}) async {
  final req = <String, dynamic>{"secret_id": secretId, "type": null, "name": null, "delegated_to": delegatedTo};

  final res = await _invoke("get_secret", req);
  if (res is EmptyContent) {
    return null;
  }
  if (res is FileContent) {
    return res;
  }
  throw _unexpectedResponseError("get_secret");
}