-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor config whoami (#633)
- Loading branch information
1 parent
b5db7ba
commit 26eda8b
Showing
11 changed files
with
134 additions
and
105 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
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 was deleted.
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,5 +1,5 @@ | ||
/// runner for rover config whoami | ||
pub mod whoami; | ||
pub mod who_am_i; | ||
|
||
/// runner is_federated check | ||
pub mod is_federated; |
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,4 @@ | ||
mod types; | ||
|
||
pub mod query_runner; | ||
pub use types::{Actor, ConfigWhoAmIInput, RegistryIdentity}; |
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,31 @@ | ||
use super::query_runner::config_who_am_i_query; | ||
|
||
use houston::CredentialOrigin; | ||
|
||
pub(crate) type QueryResponseData = config_who_am_i_query::ResponseData; | ||
pub(crate) type QueryVariables = config_who_am_i_query::Variables; | ||
pub(crate) type QueryActorType = config_who_am_i_query::ActorType; | ||
|
||
#[derive(Debug, PartialEq)] | ||
pub struct RegistryIdentity { | ||
pub id: String, | ||
pub graph_title: Option<String>, | ||
pub key_actor_type: Actor, | ||
pub credential_origin: CredentialOrigin, | ||
} | ||
|
||
#[derive(Debug, PartialEq)] | ||
pub enum Actor { | ||
GRAPH, | ||
USER, | ||
OTHER, | ||
} | ||
|
||
#[derive(Debug, PartialEq)] | ||
pub struct ConfigWhoAmIInput {} | ||
|
||
impl From<ConfigWhoAmIInput> for QueryVariables { | ||
fn from(_input: ConfigWhoAmIInput) -> Self { | ||
Self {} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...er-client/src/query/config/whoami.graphql → ...ry/config/who_am_i/who_am_i_query.graphql
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,4 +1,4 @@ | ||
query WhoAmIQuery { | ||
query ConfigWhoAmIQuery { | ||
me { | ||
__typename | ||
... on Service { | ||
|
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