repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_params.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_params.rs
use std::{ marker::PhantomData, path::{Path, PathBuf}, }; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// S3Object item parameters. /// /// The `Id` type parameter is needed for each S3 object params to be a /// distinct type. /// /// # Type Parameters /// /// *...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_state_diff.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; /// Diff between current (dest) and goal (src) state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum S3ObjectStateDiff { /// S3 object would be added. Added, /// S3 object would be removed. Removed, /// S3 bucket for the o...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_error.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_error.rs
use aws_sdk_iam::{ error::SdkError, operation::{ add_role_to_instance_profile::AddRoleToInstanceProfileError, create_instance_profile::CreateInstanceProfileError, delete_instance_profile::DeleteInstanceProfileError, get_instance_profile::GetInstanceProfileError, remove_ro...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_goal_fn.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_goal_fn.rs
use std::marker::PhantomData; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_instance_profile::{ InstanceProfileData, InstanceProfileError, InstanceProfileParams, InstanceProfileState, }; /// Reads the goal state of the instance profile state. #[derive(Debug)]...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_state.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_state.rs
use std::fmt; use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; use crate::items::peace_aws_instance_profile::model::InstanceProfileIdAndArn; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// Instance profile state. #[derive(Clone, Debug, Deserialize,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_diff_fn.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_diff_fn.rs
use crate::items::peace_aws_instance_profile::{ InstanceProfileError, InstanceProfileState, InstanceProfileStateDiff, }; /// Tar extraction status diff function. #[derive(Debug)] pub struct InstanceProfileStateDiffFn; impl InstanceProfileStateDiffFn { pub async fn state_diff( state_current: &InstanceP...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_diff.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; /// Diff between current (dest) and goal (src) state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum InstanceProfileStateDiff { /// InstanceProfile would be added. Added, /// InstanceProfile would be removed. Removed, /// ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_current_fn.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_state_current_fn.rs
use std::marker::PhantomData; use aws_sdk_iam::{error::SdkError, operation::get_instance_profile::GetInstanceProfileError}; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_instance_profile::{ model::InstanceProfileIdAndArn, InstanceProfileData, InstanceProfileEr...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_data.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_data.rs
use std::marker::PhantomData; use peace::data::{accessors::R, Data}; /// Data used to manage instance profile state. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different instance profile /// parameters from each other. #[derive(Data, Debug)] pub struct InstanceProfileData<'exec,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_apply_fns.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_apply_fns.rs
use std::marker::PhantomData; use peace::cfg::{state::Generated, ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_model::{ProgressLimit, ProgressMsgUpdate, ProgressSender}; use crate::items::peace_aws_instance_profile::{ model::InstanceProfileIdAndArn, InstanceProfileData, InstanceProfi...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_item.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_item.rs
use std::marker::PhantomData; use aws_config::BehaviorVersion; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::items::peace_aws_instance_profile::{ InstanceProfileApplyFns, InstanceProfileDa...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/model.rs
examples/envman/src/items/peace_aws_instance_profile/model.rs
pub use self::instance_profile_id_and_arn::InstanceProfileIdAndArn; mod instance_profile_id_and_arn;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/instance_profile_params.rs
examples/envman/src/items/peace_aws_instance_profile/instance_profile_params.rs
use std::marker::PhantomData; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// InstanceProfile item parameters. /// /// The `Id` type parameter is needed for each instance profile params to be a /// distinct type. /// /// # Type Parameters /// /// * `Id`: A zero-sized ty...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile/model/instance_profile_id_and_arn.rs
examples/envman/src/items/peace_aws_instance_profile/model/instance_profile_id_and_arn.rs
use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub struct InstanceProfileIdAndArn { /// The stable and unique string identifying the instance profile. For more /// information about IDs, see [IAM identifiers] in the *IAM User /// Guide*. /// /// ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_state.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_state.rs
use std::fmt; use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; use crate::items::peace_aws_iam_role::model::{ManagedPolicyAttachment, RoleIdAndArn}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// IAM role state. #[derive(Clone, Debug, Deserialize,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_apply_fns.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_apply_fns.rs
use std::marker::PhantomData; use peace::cfg::{state::Generated, ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_model::{ProgressLimit, ProgressMsgUpdate, ProgressSender}; use crate::items::peace_aws_iam_role::{ model::RoleIdAndArn, IamRoleData, IamRoleError, IamRoleParams, IamRoleStat...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_state_diff_fn.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_state_diff_fn.rs
use crate::items::peace_aws_iam_role::{IamRoleError, IamRoleState, IamRoleStateDiff}; /// Tar extraction status diff function. #[derive(Debug)] pub struct IamRoleStateDiffFn; impl IamRoleStateDiffFn { pub async fn state_diff( state_current: &IamRoleState, state_goal: &IamRoleState, ) -> Result...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_state_current_fn.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_state_current_fn.rs
use std::marker::PhantomData; use aws_sdk_iam::{error::SdkError, operation::get_role::GetRoleError}; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_iam_role::{ model::{ManagedPolicyAttachment, RoleIdAndArn}, IamRoleData, IamRoleError, IamRoleParams, IamRole...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_state_diff.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_state_diff.rs
use std::fmt; use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; use crate::items::peace_aws_iam_role::model::ManagedPolicyAttachment; /// Diff between current (dest) and goal (src) state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum IamRoleStateDiff { /// Role woul...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_params.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_params.rs
use std::marker::PhantomData; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// IamRole item parameters. /// /// The `Id` type parameter is needed for each instance profile params to be a /// distinct type. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/model.rs
examples/envman/src/items/peace_aws_iam_role/model.rs
pub use self::{managed_policy_attachment::ManagedPolicyAttachment, role_id_and_arn::RoleIdAndArn}; mod managed_policy_attachment; mod role_id_and_arn;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_error.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_error.rs
use aws_sdk_iam::{ error::SdkError, operation::{ attach_role_policy::AttachRolePolicyError, create_role::CreateRoleError, delete_role::DeleteRoleError, detach_role_policy::DetachRolePolicyError, get_role::GetRoleError, list_attached_role_policies::ListAttachedRolePoliciesError, }, };...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_item.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_item.rs
use std::marker::PhantomData; use aws_config::BehaviorVersion; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::items::peace_aws_iam_role::{ IamRoleApplyFns, IamRoleData, IamRoleError, IamRol...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_data.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_data.rs
use std::marker::PhantomData; use peace::data::{accessors::R, Data}; /// Data used to manage instance profile state. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different instance profile /// parameters from each other. #[derive(Data, Debug)] pub struct IamRoleData<'exec, Id> whe...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/iam_role_state_goal_fn.rs
examples/envman/src/items/peace_aws_iam_role/iam_role_state_goal_fn.rs
use std::marker::PhantomData; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_iam_role::{ model::ManagedPolicyAttachment, IamRoleData, IamRoleError, IamRoleParams, IamRoleState, }; /// Reads the goal state of the instance profile state. #[derive(Debug)] pub str...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/model/managed_policy_attachment.rs
examples/envman/src/items/peace_aws_iam_role/model/managed_policy_attachment.rs
use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; /// Managed policy to attach to the role. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub struct ManagedPolicyAttachment { /// ARN of the managed policy to attach to the role. arn: Generated<String>, /// Whether the p...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role/model/role_id_and_arn.rs
examples/envman/src/items/peace_aws_iam_role/model/role_id_and_arn.rs
use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub struct RoleIdAndArn { /// The stable and unique string identifying the role. For more information /// about IDs, see [IAM identifiers] in the *IAM User Guide*. /// /// [IAM identifiers]: https://docs...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_goal_fn.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_goal_fn.rs
use std::marker::PhantomData; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_iam_policy::{ IamPolicyData, IamPolicyError, IamPolicyParams, IamPolicyState, }; /// Reads the goal state of the instance profile state. #[derive(Debug)] pub struct IamPolicyStateGoal...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_data.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_data.rs
use std::marker::PhantomData; use peace::data::{accessors::R, Data}; /// Data used to manage instance profile state. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different instance profile /// parameters from each other. #[derive(Data, Debug)] pub struct IamPolicyData<'exec, Id> w...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_diff_fn.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_diff_fn.rs
use crate::items::peace_aws_iam_policy::{IamPolicyError, IamPolicyState, IamPolicyStateDiff}; /// Tar extraction status diff function. #[derive(Debug)] pub struct IamPolicyStateDiffFn; impl IamPolicyStateDiffFn { pub async fn state_diff( state_current: &IamPolicyState, state_goal: &IamPolicyState,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_state.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_state.rs
use std::fmt; use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; use crate::items::peace_aws_iam_policy::model::PolicyIdArnVersion; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// Instance profile state. #[derive(Clone, Debug, Deserialize, Serialize,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_item.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_item.rs
use std::marker::PhantomData; use aws_config::BehaviorVersion; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::items::peace_aws_iam_policy::{ IamPolicyApplyFns, IamPolicyData, IamPolicyError...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_error.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_error.rs
use aws_sdk_iam::{ error::SdkError, operation::{ create_policy::CreatePolicyError, create_policy_version::CreatePolicyVersionError, delete_policy::DeletePolicyError, delete_policy_version::DeletePolicyVersionError, get_policy::GetPolicyError, get_policy_version::GetPolicyVersionError, ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/model.rs
examples/envman/src/items/peace_aws_iam_policy/model.rs
pub use self::policy_id_arn_version::PolicyIdArnVersion; mod policy_id_arn_version;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_apply_fns.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_apply_fns.rs
use std::marker::PhantomData; use aws_sdk_iam::{error::SdkError, operation::list_policy_versions::ListPolicyVersionsError}; use peace::cfg::{state::Generated, ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_model::{ProgressLimit, ProgressMsgUpdate}; use crate::items::peace_aws_iam_policy::...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_current_fn.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_current_fn.rs
use std::marker::PhantomData; use aws_sdk_iam::{error::SdkError, operation::get_policy::GetPolicyError}; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_iam_policy::{ model::PolicyIdArnVersion, IamPolicyData, IamPolicyError, IamPolicyParams, IamPolicyState, }; ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_diff.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; /// Diff between current (dest) and goal (src) state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum IamPolicyStateDiff { /// Policy would be added. Added, /// Policy would be removed. Removed, /// Policy would be replaced...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/iam_policy_params.rs
examples/envman/src/items/peace_aws_iam_policy/iam_policy_params.rs
use std::marker::PhantomData; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// IamPolicy item parameters. /// /// The `Id` type parameter is needed for each instance profile params to be a /// distinct type. /// /// # Type Parameters /// /// * `Id`: A zero-sized type use...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy/model/policy_id_arn_version.rs
examples/envman/src/items/peace_aws_iam_policy/model/policy_id_arn_version.rs
use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub struct PolicyIdArnVersion { /// The stable and unique string identifying the policy. For more /// information about IDs, see [IAM identifiers] in the *IAM User /// Guide*. /// /// [IAM identifier...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_status_cmd.rs
examples/envman/src/cmds/env_status_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields}, cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, rt::cmds::StatesCurrentReadCmd, rt_model::output::OutputWrite, }; use crate::{ cmds::{ ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/cmd_opts.rs
examples/envman/src/cmds/cmd_opts.rs
/// Options to configure a `Cmd`'s output. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct CmdOpts { /// Whether or not to print the active profile. pub profile_print: bool, } impl CmdOpts { /// Sets whether or not to print the active profile. pub fn with_profile_print(mut self, profile_print: ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/profile_list_cmd.rs
examples/envman/src/cmds/profile_list_cmd.rs
use peace::{ cmd_ctx::{CmdCtxMpnf, CmdCtxMpnfFields}, fmt::presentable::{Heading, HeadingLevel}, rt_model::output::OutputWrite, }; use crate::{ cmds::common::workspace, model::{EnvManError, EnvManFlow, EnvType, ProfileParamsKey, WorkspaceParamsKey}, rt_model::EnvmanCmdCtxTypes, }; /// Command ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_goal_cmd.rs
examples/envman/src/cmds/env_goal_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields}, cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, rt::cmds::StatesGoalReadCmd, rt_model::output::OutputWrite, }; use crate::{ cmds::{ ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/profile_switch_cmd.rs
examples/envman/src/cmds/profile_switch_cmd.rs
use peace::{ cfg::app_name, cmd_ctx::{CmdCtxMpnf, CmdCtxMpnfFields}, profile_model::Profile, rt_model::output::OutputWrite, }; use crate::{ cmds::{ common::{env_man_flow, workspace}, ProfileInitCmd, }, model::{EnvManError, EnvManFlow, ProfileSwitch, WorkspaceParamsKey}, ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/profile_show_cmd.rs
examples/envman/src/cmds/profile_show_cmd.rs
use peace::{ cmd_ctx::{CmdCtxSpnf, CmdCtxSpnfFields, ProfileSelection}, fmt::presentln, profile_model::Profile, rt_model::output::OutputWrite, }; use crate::{ cmds::common::workspace, model::{EnvManError, EnvType, ProfileParamsKey, WorkspaceParamsKey}, rt_model::EnvmanCmdCtxTypes, }; /// C...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_cmd.rs
examples/envman/src/cmds/env_cmd.rs
use futures::future::LocalBoxFuture; use peace::{ cmd_ctx::{CmdCtxMpsf, CmdCtxSpsf, CmdCtxSpsfFields, ProfileSelection}, fmt::presentln, profile_model::Profile, rt_model::output::OutputWrite, }; use crate::{ cmds::{common::workspace, CmdOpts}, flows::EnvDeployFlow, model::{EnvManError, EnvM...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_discover_cmd.rs
examples/envman/src/cmds/env_discover_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields}, cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, rt::cmds::StatesDiscoverCmd, rt_model::output::OutputWrite, }; use crate::{ cmds::{ ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_diff_cmd.rs
examples/envman/src/cmds/env_diff_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxMpsf, CmdCtxMpsfFields, CmdCtxSpsf, CmdCtxSpsfFields}, flow_rt::Flow, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, profile_model::Profile, resource_rt::states::StateDiffs, rt::cmds::D...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_clean_cmd.rs
examples/envman/src/cmds/env_clean_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields}, cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, rt::cmds::{ApplyStoredStateSync, CleanCmd}, rt_model::output::OutputWrite, }; use crate::{ ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/common.rs
examples/envman/src/cmds/common.rs
use peace::{ cfg::app_name, cmd_ctx::CmdCtxNpnf, rt_model::{output::OutputWrite, Workspace, WorkspaceSpec}, }; use crate::{ model::{EnvManError, EnvManFlow, WorkspaceParamsKey}, rt_model::EnvmanCmdCtxTypes, }; /// Returns the `Workspace` for all commands. pub fn workspace() -> Result<Workspace, En...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/cmd_ctx_builder.rs
examples/envman/src/cmds/cmd_ctx_builder.rs
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/4609 #[macro_export] macro_rules! interruptibility_augment { ($cmd_ctx_builder:ident) => { let (interrupt_tx, interrupt_rx) = tokio::sync::mpsc::channel::< peace::cmd_ctx::interruptible::InterruptSignal >(16); tokio:...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/app_upload_cmd.rs
examples/envman/src/cmds/app_upload_cmd.rs
use futures::future::LocalBoxFuture; use peace::{ cmd_ctx::{CmdCtxMpsf, CmdCtxSpsf, CmdCtxSpsfFields, ProfileSelection}, fmt::presentln, profile_model::Profile, rt_model::output::OutputWrite, }; use crate::{ cmds::{common::workspace, CmdOpts}, flows::AppUploadFlow, model::{EnvManError, EnvM...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/profile_init_cmd.rs
examples/envman/src/cmds/profile_init_cmd.rs
use peace::{ cfg::app_name, cmd_ctx::{CmdCtxMpnf, CmdCtxSpnf, CmdCtxSpsf, ProfileSelection}, cmd_model::CmdOutcome, flow_rt::Flow, fmt::{presentable::CodeInline, presentln}, item_model::item_id, profile_model::Profile, rt::cmds::StatesDiscoverCmd, rt_model::{output::OutputWrite, Work...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds/env_deploy_cmd.rs
examples/envman/src/cmds/env_deploy_cmd.rs
use futures::FutureExt; use peace::{ cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields}, cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel, ListNumberedAligned}, PresentableExt, }, rt::cmds::{ApplyStoredStateSync, EnsureCmd}, rt_model::output::OutputWrite, }; use crate::{ ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/file_id.rs
examples/download/src/file_id.rs
/// Marker type for `FileDownloadParams`. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct FileId;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/download_cmd_ctx_types.rs
examples/download/src/download_cmd_ctx_types.rs
use std::marker::PhantomData; use peace::{cmd_ctx::CmdCtxTypes, rt_model::output::OutputWrite}; use crate::DownloadError; #[derive(Debug)] pub struct DownloadCmdCtxTypes<Output>(PhantomData<Output>); impl<Output> CmdCtxTypes for DownloadCmdCtxTypes<Output> where Output: OutputWrite, DownloadError: From<<Out...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/lib.rs
examples/download/src/lib.rs
use peace::{ cfg::app_name, cmd_ctx::{CmdCtxSpsf, ProfileSelection}, cmd_model::CmdOutcome, flow_model::FlowId, flow_rt::{Flow, ItemGraphBuilder}, item_model::{item_id, ItemId}, profile_model::Profile, rt::cmds::{ CleanCmd, DiffCmd, EnsureCmd, StatesCurrentStoredDisplayCmd, State...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/download_error.rs
examples/download/src/download_error.rs
#[cfg(feature = "error_reporting")] use peace::miette; /// Error while managing a file download. #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[derive(Debug, thiserror::Error)] pub enum DownloadError { /// A `FileDownload` error occurred. #[error("A `FileDownload` error occurred....
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/download_args.rs
examples/download/src/download_args.rs
use std::path::PathBuf; use clap::{Parser, Subcommand, ValueHint}; use peace::cli_model::OutputFormat; use url::Url; #[derive(Parser)] #[clap( author, version, about = "Downloads a file", long_about = "Downloads a file from a URL only if the local copy is out of sync with the remote copy." )] pub stru...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/main.rs
examples/download/src/main.rs
use clap::Parser; use peace::{cfg::profile, cli::output::CliOutput, flow_model::flow_id, rt_model::WorkspaceSpec}; use peace_items::file_download::FileDownloadParams; use download::{ clean, clean_dry, cmd_ctx, diff, ensure, ensure_dry, fetch, goal, status, workspace_and_flow_setup, DownloadArgs, DownloadComman...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/download/src/wasm.rs
examples/download/src/wasm.rs
use peace::{ flow_model::flow_id, profile_model::profile, rt_model::{InMemoryTextOutput, WorkspaceSpec}, }; use peace_items::file_download::{FileDownloadParams, StorageForm}; use url::Url; use wasm_bindgen::prelude::*; pub use crate::{ clean, clean_dry, cmd_ctx, diff, ensure, ensure_dry, fetch, goal, s...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state.rs
items/file_download/src/file_download_state.rs
use std::fmt; use peace::cfg::{state::FetchedOpt, State}; use serde::{Deserialize, Serialize}; use crate::{ETag, FileDownloadStateLogical}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// Newtype wrapper for `State<FileDownloadStatePhysical, FetchedOpt<ETag>>`. #[derive...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state_current_fn.rs
items/file_download/src/file_download_state_current_fn.rs
use std::{marker::PhantomData, path::Path}; use peace::{ cfg::{state::FetchedOpt, FnCtx}, params::Params, }; #[cfg(not(target_arch = "wasm32"))] use tokio::{fs::File, io::AsyncReadExt}; #[cfg(target_arch = "wasm32")] use peace::rt_model::Storage; use crate::{ FileDownloadData, FileDownloadError, FileDown...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state_goal_fn.rs
items/file_download/src/file_download_state_goal_fn.rs
use std::{marker::PhantomData, path::Path}; use peace::{ cfg::{state::FetchedOpt, FnCtx}, params::Params, }; use reqwest::{header::ETAG, Url}; use crate::{ ETag, FileDownloadData, FileDownloadError, FileDownloadParams, FileDownloadState, FileDownloadStateLogical, }; /// Reads the goal state of the fi...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_apply_fns.rs
items/file_download/src/file_download_apply_fns.rs
use std::marker::PhantomData; cfg_if::cfg_if! { if #[cfg(not(target_arch = "wasm32"))] { use bytes::Bytes; use futures::{Stream, StreamExt, TryStreamExt}; use tokio::io::AsyncWriteExt; use tokio::{fs::File, io::BufWriter}; } else if #[cfg(target_arch = "wasm32")] { use s...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/lib.rs
items/file_download/src/lib.rs
//! Manages downloading a file for the peace framework pub use crate::{ e_tag::ETag, file_download_apply_fns::FileDownloadApplyFns, file_download_data::FileDownloadData, file_download_error::FileDownloadError, file_download_item::FileDownloadItem, file_download_params::{ FileDownloadPar...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/e_tag.rs
items/file_download/src/e_tag.rs
use serde::{Deserialize, Serialize}; /// Represents an ETag returned from a server. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] pub struct ETag(String); impl ETag { /// Returns a new `ETag`. pub fn new<S>(s: S) -> Self where S: Into<String>, { Self(s.into()) } } ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state_diff.rs
items/file_download/src/file_download_state_diff.rs
use std::{fmt, path::PathBuf}; use peace::diff::{Changeable, Tracked}; use serde::{Deserialize, Serialize}; /// Diff between the current and goal downloaded file. #[derive(Clone, Debug, Deserialize, Serialize)] pub enum FileDownloadStateDiff { /// File exists locally, but does not exist on server. Deleted { ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state_diff_fn.rs
items/file_download/src/file_download_state_diff_fn.rs
use peace::{ cfg::{state::FetchedOpt, State}, diff::{Changeable, Tracked}, }; use crate::{ FileDownloadError, FileDownloadState, FileDownloadStateDiff, FileDownloadStateLogical, }; /// Download status diff function. #[derive(Debug)] pub struct FileDownloadStateDiffFn; impl FileDownloadStateDiffFn { p...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_item.rs
items/file_download/src/file_download_item.rs
use std::{marker::PhantomData, path::Path}; use peace::{ cfg::{async_trait, state::FetchedOpt, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::{ FileDownloadApplyFns, FileDownloadData, FileDownloadError, FileDownloadParams...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/storage_form.rs
items/file_download/src/storage_form.rs
use serde::{Deserialize, Serialize}; /// Form to store the response. #[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)] pub enum StorageForm { /// Download and store the response text as-is. /// /// This must only be used if the response is valid UTF-8. Text, /// Base64 encode the...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_params.rs
items/file_download/src/file_download_params.rs
use std::{ fmt, marker::PhantomData, path::{Path, PathBuf}, }; use peace::params::Params; use serde::{Deserialize, Serialize}; use url::Url; /// File download parameters. /// /// The `Id` type parameter is needed for each file download params to be a /// distinct type. /// /// # Type Parameters /// /// * ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_error.rs
items/file_download/src/file_download_error.rs
use std::path::PathBuf; #[cfg(feature = "error_reporting")] use peace::miette::{self, SourceSpan}; /// Error while managing a file download. #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[derive(Debug, thiserror::Error)] pub enum FileDownloadError { #[error("Failed to open destinati...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_data.rs
items/file_download/src/file_download_data.rs
use std::marker::PhantomData; #[cfg(target_arch = "wasm32")] use peace::rt_model::Storage; use peace::{ cfg::accessors::Stored, data::{accessors::R, marker::Current, Data}, }; use crate::FileDownloadState; /// Data used to download a file. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/file_download/src/file_download_state_logical.rs
items/file_download/src/file_download_state_logical.rs
use std::{fmt, path::PathBuf}; use serde::{Deserialize, Serialize}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// State of the contents of the file to download. /// /// This is used to represent the state of the source file, as well as the /// destination file. #[deriv...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_apply_fns.rs
items/sh_cmd/src/sh_cmd_apply_fns.rs
use std::marker::PhantomData; use peace::cfg::{ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_model::ProgressLimit; use crate::{ ShCmd, ShCmdData, ShCmdError, ShCmdExecutor, ShCmdParams, ShCmdState, ShCmdStateDiff, ShCmdStateLogical, }; /// ApplyFns for the command to execute. #[...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_item.rs
items/sh_cmd/src/sh_cmd_item.rs
use std::marker::PhantomData; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::{ ShCmdApplyFns, ShCmdData, ShCmdError, ShCmdExecutor, ShCmdParams, ShCmdState, ShCmdStateDiff, ShCmdStateDi...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_error.rs
items/sh_cmd/src/sh_cmd_error.rs
#[cfg(feature = "error_reporting")] use peace::miette::{self, SourceSpan}; use crate::{CmdVariant, ShCmd}; /// Error while managing command execution. #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[derive(Debug, thiserror::Error)] pub enum ShCmdError { /// A command script was not r...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/lib.rs
items/sh_cmd/src/lib.rs
//! Manages running a shell command for the peace framework. //! //! This item is designed to take in separate shell commands for each of //! the following: //! //! * Current state logic, whose stdout defines the current state (`String`). //! * Goal state logic, whose stdout defines the goal state (`String`). //! * Sta...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_execution_record.rs
items/sh_cmd/src/sh_cmd_execution_record.rs
use std::fmt; use chrono::{offset::Local, DateTime, Utc}; use serde::{Deserialize, Serialize}; /// Record of a shell command execution. #[derive(Clone, Debug, Serialize, Deserialize)] pub enum ShCmdExecutionRecord { /// There is no execution record. /// /// Represents when the command has either never bee...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_state_diff.rs
items/sh_cmd/src/sh_cmd_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; /// Diff between the current and goal file extraction. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ShCmdStateDiff { /// stdout output. stdout: String, /// stderr output. stderr: String, } impl ShCmdStateDiff { /// Returns a new `Sh...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_params.rs
items/sh_cmd/src/sh_cmd_params.rs
use std::marker::PhantomData; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; use crate::ShCmd; /// Grouping of commands to run a shell command idempotently. /// /// The `Id` type parameter is needed for each command execution params to be a /// distinct type. /// /// # Ty...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/cmd_variant.rs
items/sh_cmd/src/cmd_variant.rs
use std::fmt; /// Command variants which take in scripts in `ShCmdParams`. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum CmdVariant { /// The `state_clean` command. StateClean, /// The `state_current` command. StateCurrent, /// The `state_goal` command. StateGoal, /// The `state_dif...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_state.rs
items/sh_cmd/src/sh_cmd_state.rs
use std::fmt; use derivative::Derivative; use peace::cfg::State; use serde::{Deserialize, Serialize}; use crate::{ShCmdExecutionRecord, ShCmdStateLogical}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// Newtype wrapper for `State<ShCmdStatePhysical<Id>, ShCmdExecutionR...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_executor.rs
items/sh_cmd/src/sh_cmd_executor.rs
use std::{marker::PhantomData, process::Stdio}; use chrono::Utc; use tokio::process::Command; use crate::{ShCmd, ShCmdError, ShCmdExecutionRecord, ShCmdState, ShCmdStateLogical}; /// Common code to run `ShCmd`s. #[derive(Debug)] pub(crate) struct ShCmdExecutor<Id>(PhantomData<Id>); impl<Id> ShCmdExecutor<Id> { ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_data.rs
items/sh_cmd/src/sh_cmd_data.rs
use std::marker::PhantomData; use peace::{ cfg::{accessors::Stored, State}, data::Data, }; use crate::{ShCmdExecutionRecord, ShCmdStateLogical}; /// Data used to run a shell command. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different command execution /// parameters f...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd.rs
items/sh_cmd/src/sh_cmd.rs
use std::{ffi::OsString, fmt}; use peace::params::Params; use serde::{Deserialize, Serialize}; use tokio::process::Command; /// Shell command to execute. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Params)] pub struct ShCmd { /// Command to run. program: OsString, /// Arguments to pass t...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_state_logical.rs
items/sh_cmd/src/sh_cmd_state_logical.rs
use std::{fmt, marker::PhantomData}; use derivative::Derivative; use serde::{Deserialize, Serialize}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// State of the shell command execution. /// /// * If the command has never been executed, this will be `None`. /// * If it ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/sh_cmd/src/sh_cmd_state_diff_fn.rs
items/sh_cmd/src/sh_cmd_state_diff_fn.rs
use std::marker::PhantomData; use crate::{ShCmd, ShCmdError, ShCmdExecutor, ShCmdState, ShCmdStateDiff, ShCmdStateLogical}; /// Runs a shell command to obtain the `ShCmd` diff. #[derive(Debug)] pub struct ShCmdStateDiffFn<Id>(PhantomData<Id>); impl<Id> ShCmdStateDiffFn<Id> where Id: Send + Sync + 'static, { ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/src/lib.rs
items/src/lib.rs
//! Collection of items the peace framework. //! //! Every item crate needs to be enabled with its own feature. Example: //! //! ```toml //! peace_items = { version = "0.0.3", features = ["file_download"] } //! ``` //! //! In code: //! //! ```rust //! #[cfg(feature = "file_download")] //! # fn main() { //! use peace::i...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_error.rs
items/tar_x/src/tar_x_error.rs
use std::path::PathBuf; #[cfg(feature = "error_reporting")] use peace::miette; /// Error while managing tar extraction. #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[derive(Debug, thiserror::Error)] pub enum TarXError { /// Tar file to extract doesn't exist. #[error( r#...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/file_metadata.rs
items/tar_x/src/file_metadata.rs
use std::path::{Path, PathBuf}; use serde::{Deserialize, Serialize}; /// Metadata about a file in the tar. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub struct FileMetadata { /// Path to the file, relative to either the tar root, or the extraction /// directory root. path: PathBuf, ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_params.rs
items/tar_x/src/tar_x_params.rs
use std::{ marker::PhantomData, path::{Path, PathBuf}, }; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// Tar extraction parameters. /// /// The `Id` type parameter is needed for each tar extraction params to be a /// distinct type. /// /// # Type Parameters ///...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/lib.rs
items/tar_x/src/lib.rs
#![cfg_attr(coverage_nightly, feature(coverage_attribute))] //! Manages extracting a tar file for the peace framework pub use crate::{ file_metadata::FileMetadata, file_metadatas::FileMetadatas, tar_x_apply_fns::TarXApplyFns, tar_x_data::TarXData, tar_x_error::TarXError, tar_x_item::TarXItem, ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_item.rs
items/tar_x/src/tar_x_item.rs
use std::marker::PhantomData; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::{ FileMetadatas, TarXApplyFns, TarXData, TarXError, TarXParams, TarXStateCurrentFn, TarXStateDiff, TarXState...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/native.rs
items/tar_x/src/native.rs
pub(crate) use self::{dest_dir_entry::DestDirEntry, dir_unfold::DirUnfold}; mod dest_dir_entry; mod dir_unfold;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_data.rs
items/tar_x/src/tar_x_data.rs
use std::marker::PhantomData; use peace::{ data::{accessors::R, Data}, rt_model::Storage, }; /// Data used to extract a tar file. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different tar extraction /// parameters from each other. #[derive(Data, Debug)] pub struct TarXDat...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_state_diff_fn.rs
items/tar_x/src/tar_x_state_diff_fn.rs
use std::cmp::Ordering; use crate::{FileMetadata, FileMetadatas, TarXError, TarXStateDiff}; /// Tar extraction status diff function. #[derive(Debug)] pub struct TarXStateDiffFn; impl TarXStateDiffFn { pub async fn state_diff( file_metadatas_current: &FileMetadatas, file_metadatas_goal: &FileMetad...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/file_metadatas.rs
items/tar_x/src/file_metadatas.rs
use std::fmt; use serde::{Deserialize, Serialize}; use crate::FileMetadata; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// Metadata of files to extract. /// /// The `FileMetadata`s are sorted by their path. /// /// This should be constructed using the `From<Vec<FileMet...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/items/tar_x/src/tar_x_state_diff.rs
items/tar_x/src/tar_x_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; use crate::FileMetadatas; /// Diff between the tar and extraction directory. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum TarXStateDiff { /// Files in the tar are in sync with extraction directory. ExtractionInSync, /// Files in th...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false