-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,872 additions
and
1,367 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { onRequest } from 'firebase-functions/v2/https'; | ||
import { Request, onRequest } from 'firebase-functions/v2/https'; | ||
import { createServerless } from './agentprotocol'; | ||
import { useAnyCloudStorage } from '../../../utils/fileStorage'; | ||
|
||
const app = createServerless({ | ||
// artifactStorage: new FirebaseStorage(storage), | ||
}); | ||
// export const agentprotocol = onRequest(app); | ||
const promisedStorage = useAnyCloudStorage({ type: 'firebase', bucket: 'my-bucket' }); | ||
|
||
const app = createServerless<Request, Express.Response>( | ||
{ | ||
// artifactStorage: new AnyCloudArtifactStorage(storage), | ||
}, | ||
promisedStorage, | ||
); | ||
export const agentprotocol = onRequest(app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import functions from '@google-cloud/functions-framework'; | ||
import { createServerless } from './agentprotocol'; | ||
import { useAnyCloudStorage } from '../../../utils/fileStorage'; | ||
|
||
const app = createServerless({ | ||
// artifactStorage: new GcpStorage(storage, "my-agent-artifacts") | ||
}); | ||
const promisedStorage = useAnyCloudStorage({ type: 'gcp', bucket: 'my-bucket' }); | ||
|
||
const app = createServerless( | ||
{ | ||
// artifactStorage: new AnyCloudArtifactStorage(storage) | ||
}, | ||
promisedStorage, | ||
); | ||
// functions.http('agentprotocol', app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import createStorage, { FileStorage, FileStorageConfig, LocalFileStorage } from 'any-cloud-storage'; | ||
|
||
export let fileStorage: FileStorage = new LocalFileStorage({ type: 'file', basePath: '' }); | ||
|
||
export const useAnyCloudStorage = async (config: FileStorageConfig) => { | ||
fileStorage = await createStorage(config); | ||
return fileStorage; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters