Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix copyright #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
632 changes: 632 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

595 changes: 0 additions & 595 deletions LICENSE.md

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,7 @@ firebase deploy --only functions
Once deployed, view the Functions in [Firebase console](https://console.firebase.google.com/) or at [GCP Cloud Functions](https://console.cloud.google.com/functions/list).

If you have set up either the [Android app](https://github.com/opentrace-community/opentrace-android) or [iOS app](https://github.com/opentrace-community/opentrace-ios), you can test the functions by opening the app, going through the registration and verifying that the app displays a pin code in the Upload page.

## License

[GPL 3.0](LICENSE0)
632 changes: 632 additions & 0 deletions functions/LICENSE

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
"@types/chai": "^4.2.0",
"ts-node": "^8.8.2"
},
"private": true
"private": true,
"license": "GPL-3.0+",
"copyright.owner": "Singapore Government Agency"
}
5 changes: 5 additions & 0 deletions functions/src/config.example.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import FunctionConfig from "./opentrace/types/FunctionConfig";
import Authenticator from "./opentrace/utils/Authenticator";
import PinGenerator from "./opentrace/utils/PinGenerator";
Expand Down
5 changes: 5 additions & 0 deletions functions/src/firebaseFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as functions from "firebase-functions";

import config from "./config";
Expand Down
5 changes: 5 additions & 0 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as admin from "firebase-admin";
admin.initializeApp();

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/getHandshakePin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as functions from "firebase-functions";

import config from "../config";
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/getTempIDs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as moment from "moment";

import config from "../config";
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/getUploadToken.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as functions from "firebase-functions";
import * as admin from "firebase-admin";

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/processUploadedData.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as functions from "firebase-functions";
import {ObjectMetadata} from "firebase-functions/lib/providers/storage";

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/types/FunctionConfig.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import Authenticator from "../utils/Authenticator";
import PinGenerator from "../utils/PinGenerator";

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/types/HeartBeatEvent.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

interface HeartBeatEvent {
timestamp: number,
msg?: string,
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/types/StreetPassRecord.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

/**
* Format:
* Timestamp timestamp
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/utils/Authenticator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as functions from "firebase-functions";
import {CallableContext} from "firebase-functions/lib/providers/https";

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/utils/CustomEncrypter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as crypto from "crypto";
import config from "../../config";

Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/utils/PinGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

/**
* This class uses a plain substring to generate a pin from user uid.
* It should be subclassed with a secure implementation.
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/utils/formatTimestamp.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

/**
* Convert timestamp (expressed in seconds since the Epoch) to "DD-MMM-YYYY HH:mm:ss Z" format
* @param timestamp
Expand Down
5 changes: 5 additions & 0 deletions functions/src/opentrace/utils/getEncryptionKey.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import {SecretManagerServiceClient} from "@google-cloud/secret-manager";

import config from "../../config";
Expand Down
5 changes: 5 additions & 0 deletions functions/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as admin from "firebase-admin";
import config from "../src/config";

Expand Down
5 changes: 5 additions & 0 deletions functions/test/opentrace/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright Singapore Government Agency 2020. All Rights Reserved.
// Node module: functions
// This file is licensed under the GNU General Public License v3.0 or later.
// License text available at https://www.gnu.org/licenses/gpl-3.0-standalone.html

import * as admin from "firebase-admin";
import * as functions from "firebase-functions";
import * as chai from "chai";
Expand Down