feat(client): searchStore takes provider + namespace filter params
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
7569e2aa53
commit
332d11af1d
3 changed files with 41 additions and 1 deletions
|
|
@ -1634,6 +1634,8 @@ class SearchStoreRequest extends $pb.GeneratedMessage {
|
|||
$core.String? tag,
|
||||
$core.String? status,
|
||||
$core.int? limit,
|
||||
$core.String? provider,
|
||||
$core.String? namespace,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (query != null) {
|
||||
|
|
@ -1651,6 +1653,12 @@ class SearchStoreRequest extends $pb.GeneratedMessage {
|
|||
if (limit != null) {
|
||||
$result.limit = limit;
|
||||
}
|
||||
if (provider != null) {
|
||||
$result.provider = provider;
|
||||
}
|
||||
if (namespace != null) {
|
||||
$result.namespace = namespace;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
SearchStoreRequest._() : super();
|
||||
|
|
@ -1663,6 +1671,8 @@ class SearchStoreRequest extends $pb.GeneratedMessage {
|
|||
..aOS(3, _omitFieldNames ? '' : 'tag')
|
||||
..aOS(4, _omitFieldNames ? '' : 'status')
|
||||
..a<$core.int>(5, _omitFieldNames ? '' : 'limit', $pb.PbFieldType.O3)
|
||||
..aOS(6, _omitFieldNames ? '' : 'provider')
|
||||
..aOS(7, _omitFieldNames ? '' : 'namespace')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
|
|
@ -1730,6 +1740,29 @@ class SearchStoreRequest extends $pb.GeneratedMessage {
|
|||
$core.bool hasLimit() => $_has(4);
|
||||
@$pb.TagNumber(5)
|
||||
void clearLimit() => $_clearField(5);
|
||||
|
||||
/// Exact-match provider segment filter (0.12+). Empty string
|
||||
/// matches any provider.
|
||||
@$pb.TagNumber(6)
|
||||
$core.String get provider => $_getSZ(5);
|
||||
@$pb.TagNumber(6)
|
||||
set provider($core.String v) { $_setString(5, v); }
|
||||
@$pb.TagNumber(6)
|
||||
$core.bool hasProvider() => $_has(5);
|
||||
@$pb.TagNumber(6)
|
||||
void clearProvider() => $_clearField(6);
|
||||
|
||||
/// First-dotted-segment-of-name filter (0.12+). E.g. "text"
|
||||
/// matches text.extract, text.summarize, … but not
|
||||
/// image.classify. Empty matches any namespace.
|
||||
@$pb.TagNumber(7)
|
||||
$core.String get namespace => $_getSZ(6);
|
||||
@$pb.TagNumber(7)
|
||||
set namespace($core.String v) { $_setString(6, v); }
|
||||
@$pb.TagNumber(7)
|
||||
$core.bool hasNamespace() => $_has(6);
|
||||
@$pb.TagNumber(7)
|
||||
void clearNamespace() => $_clearField(7);
|
||||
}
|
||||
|
||||
class StoreSearchResponse extends $pb.GeneratedMessage {
|
||||
|
|
|
|||
|
|
@ -432,6 +432,8 @@ const SearchStoreRequest$json = {
|
|||
{'1': 'tag', '3': 3, '4': 1, '5': 9, '10': 'tag'},
|
||||
{'1': 'status', '3': 4, '4': 1, '5': 9, '10': 'status'},
|
||||
{'1': 'limit', '3': 5, '4': 1, '5': 5, '10': 'limit'},
|
||||
{'1': 'provider', '3': 6, '4': 1, '5': 9, '10': 'provider'},
|
||||
{'1': 'namespace', '3': 7, '4': 1, '5': 9, '10': 'namespace'},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
@ -439,7 +441,8 @@ const SearchStoreRequest$json = {
|
|||
final $typed_data.Uint8List searchStoreRequestDescriptor = $convert.base64Decode(
|
||||
'ChJTZWFyY2hTdG9yZVJlcXVlc3QSFAoFcXVlcnkYASABKAlSBXF1ZXJ5EhoKCGNhdGVnb3J5GA'
|
||||
'IgASgJUghjYXRlZ29yeRIQCgN0YWcYAyABKAlSA3RhZxIWCgZzdGF0dXMYBCABKAlSBnN0YXR1'
|
||||
'cxIUCgVsaW1pdBgFIAEoBVIFbGltaXQ=');
|
||||
'cxIUCgVsaW1pdBgFIAEoBVIFbGltaXQSGgoIcHJvdmlkZXIYBiABKAlSCHByb3ZpZGVyEhwKCW'
|
||||
'5hbWVzcGFjZRgHIAEoCVIJbmFtZXNwYWNl');
|
||||
|
||||
@$core.Deprecated('Use storeSearchResponseDescriptor instead')
|
||||
const StoreSearchResponse$json = {
|
||||
|
|
|
|||
|
|
@ -518,6 +518,8 @@ class HubClient {
|
|||
String category = '',
|
||||
String tag = '',
|
||||
String status = '',
|
||||
String provider = '',
|
||||
String namespace = '',
|
||||
int limit = 50,
|
||||
}) async {
|
||||
final r = await _admin.searchStore(pb.SearchStoreRequest(
|
||||
|
|
@ -525,6 +527,8 @@ class HubClient {
|
|||
category: category,
|
||||
tag: tag,
|
||||
status: status,
|
||||
provider: provider,
|
||||
namespace: namespace,
|
||||
limit: limit,
|
||||
));
|
||||
return r.entries;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue