-
Notifications
You must be signed in to change notification settings - Fork 336
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
1 parent
5a924f6
commit 1945ea4
Showing
38 changed files
with
475 additions
and
190 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,46 @@ | ||
use quickwit_auth::Authorization; | ||
use quickwit_auth::AuthorizationError; | ||
use quickwit_auth::AuthorizationToken; | ||
use quickwit_auth::StreamAuthorization; | ||
// The Quickwit Enterprise Edition (EE) license | ||
// Copyright (c) 2024-present Quickwit Inc. | ||
// | ||
// With regard to the Quickwit Software: | ||
// | ||
// This software and associated documentation files (the "Software") may only be | ||
// used in production, if you (and any entity that you represent) hold a valid | ||
// Quickwit Enterprise license corresponding to your usage. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
use crate::GoodbyeRequest; | ||
use crate::HelloRequest; | ||
use crate::PingRequest; | ||
use quickwit_auth::{Authorization, AuthorizationError, AuthorizationToken, StreamAuthorization}; | ||
|
||
use crate::{GoodbyeRequest, HelloRequest, PingRequest}; | ||
|
||
impl Authorization for HelloRequest { | ||
fn attenuate(&self, auth_token: quickwit_auth::AuthorizationToken) -> Result<quickwit_auth::AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
&self, | ||
auth_token: quickwit_auth::AuthorizationToken, | ||
) -> Result<quickwit_auth::AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} | ||
|
||
impl Authorization for GoodbyeRequest { | ||
fn attenuate(&self, auth_token: quickwit_auth::AuthorizationToken) -> Result<AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
&self, | ||
auth_token: quickwit_auth::AuthorizationToken, | ||
) -> Result<AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} | ||
|
||
impl StreamAuthorization for PingRequest { | ||
fn attenuate(auth_token: quickwit_auth::AuthorizationToken) -> Result<AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
auth_token: quickwit_auth::AuthorizationToken, | ||
) -> Result<AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} |
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,25 +1,47 @@ | ||
use quickwit_auth::Authorization; | ||
use quickwit_auth::AuthorizationError; | ||
use quickwit_auth::AuthorizationToken; | ||
// The Quickwit Enterprise Edition (EE) license | ||
// Copyright (c) 2024-present Quickwit Inc. | ||
// | ||
// With regard to the Quickwit Software: | ||
// | ||
// This software and associated documentation files (the "Software") may only be | ||
// used in production, if you (and any entity that you represent) hold a valid | ||
// Quickwit Enterprise license corresponding to your usage. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
use crate::FetchRequest; | ||
use crate::IngestRequest; | ||
use crate::TailRequest; | ||
use quickwit_auth::{Authorization, AuthorizationError, AuthorizationToken}; | ||
|
||
use crate::{FetchRequest, IngestRequest, TailRequest}; | ||
|
||
impl Authorization for TailRequest { | ||
fn attenuate(&self, auth_token: AuthorizationToken) -> Result<AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
&self, | ||
auth_token: AuthorizationToken, | ||
) -> Result<AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} | ||
|
||
impl Authorization for IngestRequest { | ||
fn attenuate(&self, auth_token: AuthorizationToken) -> Result<AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
&self, | ||
auth_token: AuthorizationToken, | ||
) -> Result<AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} | ||
|
||
impl Authorization for FetchRequest { | ||
fn attenuate(&self, auth_token: AuthorizationToken) -> Result<AuthorizationToken, AuthorizationError> { | ||
fn attenuate( | ||
&self, | ||
auth_token: AuthorizationToken, | ||
) -> Result<AuthorizationToken, AuthorizationError> { | ||
Ok(auth_token) | ||
} | ||
} |
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
Oops, something went wrong.