Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rust): add a payment role #8708

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -801,6 +801,7 @@ mod test {
RoleInShare::Admin => "me@ockam.io",
RoleInShare::Service => "service@ockam.com",
RoleInShare::Guest => "guest@ockam.com",
RoleInShare::Payment => "payment@ockam.com",
},
}
.try_into()
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ pub enum RoleInShare {
#[n(0)] Admin,
#[n(1)] Guest,
#[n(2)] Service,
#[n(3)] Payment,
}

impl Display for RoleInShare {
@@ -24,6 +25,7 @@ impl Display for RoleInShare {
Self::Admin => write!(f, "admin"),
Self::Guest => write!(f, "guest"),
Self::Service => write!(f, "service_user"),
Self::Payment => write!(f, "payment"),
}
}
}
@@ -36,6 +38,7 @@ impl FromStr for RoleInShare {
"admin" => Ok(Self::Admin),
"guest" => Ok(Self::Guest),
"service_user" => Ok(Self::Service),
"payment" => Ok(Self::Payment),
other => Err(format!("unknown role: {other}")),
}
}