blob: f446c2dd1a2d93b128012a1f11d481e1aa19c9fe [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.sys.index;
/// Errors that the FuzzySearch interface presents.
type FuzzySearchError = strict enum : uint32 {
MALFORMED_INPUT = 1;
};
/// ComponentIndex provides search and indexing interfaces for components.
@discoverable
protocol ComponentIndex {
/// Returns a list of fuchsia-pkg URL components that matches the input
/// string based on fuzzy matching.
///
/// The input string must be a single alphanumeric word with optional '_'
/// and '-' characters -- the allowed character set of a component name.
/// Additionally, the forward slash '/' is allowed, to match URI path
/// segments. Period '.' is also allowed, to match file extensions.
///
/// There is no support for globbing.
///
/// Returns an empty list if there are no matches, or if needle is empty.
FuzzySearch(struct {
needle string;
}) -> (struct {
uris vector<string>;
}) error FuzzySearchError;
};