blob: fc0f740eabb2ab83a206a192278caf4c696e315f [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;
using fuchsia.auth;
using fuchsia.ledger.cloud;
// 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_manager| is used to get the appropriate auth tokens
// associated with user for whom the cloud provider is running.
1: GetCloudProvider(
Config config,
fuchsia.auth.TokenManager? token_manager,
request<fuchsia.ledger.cloud.CloudProvider> cloud_provider)
-> (fuchsia.ledger.cloud.Status status);
};