getSecret method

Future<FileContent?> getSecret({
  1. String? secretId,
  2. String? type,
  3. String? name,
  4. String? delegatedTo,
})

Implementation

Future<FileContent?> getSecret({String? secretId, String? type, String? name, String? delegatedTo}) async {
  final req = <String, dynamic>{"secret_id": secretId, "type": type, "name": name, "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");
}