Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
solid-dimakoniaiev authored and mergify-bot committed Mar 3, 2021
1 parent 9a5d618 commit a57f4a8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
9 changes: 5 additions & 4 deletions metrics/cli/docs/04_managing_firestore_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ As we've analyzed above, the [Cloud Functions](#using-cloud-functions-for-fireba

The following sections provide an implementation of managing Firestore data integration into the Metrics CLI tool.

Let's take a look on the main classes the managing firestore data integration requires.
Let's take a look on the main classes the managing Firestore data integration requires.
### FirestoreConfigRepository
The `FirestoreConfigRepository` is a repository, which provides methods for managing the [feature config](https://github.com/platform-platform/monorepo/blob/master/docs/19_security_audit_document.md#the-feature_config-collection)
and [allowed domains](https://github.com/platform-platform/monorepo/blob/master/docs/19_security_audit_document.md#the-allowed_email_domains-collection) collections data. For this, purposes the repository using the [dartbase_admin package](https://pub.dev/packages/dartbase_admin) as described in the [decision](#decision).
and [allowed domains](https://github.com/platform-platform/monorepo/blob/master/docs/19_security_audit_document.md#the-allowed_email_domains-collection) collections data.
To implement these methods, the repository using the [dartbase_admin package](https://pub.dev/packages/dartbase_admin) as described in the [decision](#decision).
### FirebaseService
Expand All @@ -146,8 +147,8 @@ The `GcloudService` is an existing service interface, in which we should add the
### FirebaseServiceAdapter
The `FirebaseServiceAdapter` is an adapter for the [`FirebaseService`](#FirebaseService), which implements new added features using the [`FirestoreConfigRepository`](#FirestoreConfigRepository) and the [dartbase_admin package](https://pub.dev/packages/dartbase_admin).
The `FirebaseServiceAdapter` is an adapter for the [`FirebaseService`](#FirebaseService), which implements new added methods using the [`FirestoreConfigRepository`](#FirestoreConfigRepository) and the [dartbase_admin package](https://pub.dev/packages/dartbase_admin).
Here is a class diagram, which demonstrates the structure and relationships of classes the Managing Firestore data integration requires:
Here is a class diagram, which demonstrates the structure and relationships of classes the managing Firestore data integration requires:
![Managing Firestore Data class diagram](http://www.plantuml.com/plantuml/proxy?cache=no&fmt=svg&src=https://github.com/platform-platform/monorepo/raw/design_doc_firestore_data/metrics/cli/docs/diagrams/managing_firestore_data_class_diagram.puml)
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
@startuml firestore_managing_data_class_diagram

package deploy {
class Deployer {
- _fileHelper: FileHelper
- _npmService : NpmService
- _gitService : GitService
- _flutterService : FlutterService
- _gcloudService : GCloudService
- _firebaseService : FirebaseService
+ deploy() : Future<void>
}
}

package firebase {
package service as firebase.service {
interface FirebaseService {
+ login(): Future<String>
+ addProject(String gcloudProjectId): Future<void>
+ initAdminFirestore(String projectId, String service) : Future<void>
+ initAdminFirestore(String projectId, String servicePath) : Future<void>
+ seedFirestoreData() : Future<void>
+ deployHosting(String appPath): Future<void>
+ deployFirestore(String firestorePath): Future<void>
Expand All @@ -16,11 +28,7 @@ package firebase {
class FirebaseServiceAdapter {
- _firebaseCli: FirebaseCli
- _firestoreConfigRepository: FirestoreConfigRepository
}
}

package cli as firebase.cli {
class FirebaseCli {
- _ prompter: Prompter
}
}

Expand All @@ -33,14 +41,6 @@ package firebase {
}
}

package interfaces {
package service {
interface InfoService {
+ version() : Future<void>
}
}
}

package core {
package data.model {
class FeatureConfigData {
Expand All @@ -57,14 +57,23 @@ package core {
}
}

package dartbase_admin {
package dartbase_admin {}

package gcloud {
interface GCloudService {
+ login() : Future<void>
+ createProject() : Future<String>
+ downloadServiceKey(String path, String serviceEmail) : Future<void>
+ deactivateServiceKey(String path) : Future<void>
}
}

FirebaseService --|> InfoService
Deployer --> FirebaseServiceAdapter : uses
Deployer --> GCloudService : uses

FeatureConfigData --|> FeatureConfig

FirebaseServiceAdapter ..|> FirebaseService
FirebaseServiceAdapter --> FirebaseCli : uses
FirebaseServiceAdapter --> FirestoreConfigRepository : uses
FirebaseServiceAdapter -up-> dartbase_admin : uses

Expand Down

0 comments on commit a57f4a8

Please sign in to comment.