-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'static-file-server' into blobs
- Loading branch information
Showing
9 changed files
with
96 additions
and
23 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,16 +1,24 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
use std::path::PathBuf; | ||
|
||
use crate::graphql::GraphQLSchemaManager; | ||
|
||
#[derive(Clone)] | ||
pub struct HttpServiceContext { | ||
/// Dynamic GraphQL schema manager. | ||
pub schema: GraphQLSchemaManager, | ||
|
||
/// Path of the directory where blobs should be served from | ||
pub blob_dir_path: PathBuf, | ||
} | ||
|
||
impl HttpServiceContext { | ||
/// Create a new HttpServiceContext. | ||
pub fn new(schema: GraphQLSchemaManager) -> Self { | ||
Self { schema } | ||
pub fn new(schema: GraphQLSchemaManager, blob_dir_path: PathBuf) -> Self { | ||
Self { | ||
schema, | ||
blob_dir_path, | ||
} | ||
} | ||
} |
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