blob: dbbfb0e47dce3d1d489dce1f7fc7db02f3eacad4 [file] [log] [blame]
// Copyright 2017 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.ledger.cloud.firestore;
// Configuration to use when connecting to the Firestore server.
struct Config {
// ID of the Firestore instance.
string server_id;
// API key to use when authenticating with Firebase Auth.
string api_key;
};
[Discoverable]
interface Factory {
// Creates a cloud provider instance using the given |config|.
//
// Parameters:
// |config| configuration
// |token_provider| is used to get the appropriate auth tokens
// associated with user for whom the cloud provider is running.
1: GetCloudProvider(
Config config,
fuchsia.modular.auth.TokenProvider token_provider,
request<fuchsia.ledger.cloud.CloudProvider> cloud_provider)
-> (fuchsia.ledger.cloud.Status @status);
};