pub struct Store {
access_key: String,
secret_key: String,
bucket: String,
endpoint: String,
}Expand description
Credentials and endpoint for the artifacts bucket.
Fields§
§access_key: String§secret_key: String§bucket: String§endpoint: StringImplementations§
Source§impl Store
impl Store
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Reads the bucket configuration, failing closed.
Only ever called on a branch where the workflow decided this run may hold the write key; a PR run builds and verifies everything and never reaches here.
fn s3(&self, args: &[&str]) -> Result<()>
Sourcefn run_s3(&self, program: &str, args: &[&str]) -> Result<()>
fn run_s3(&self, program: &str, args: &[&str]) -> Result<()>
Credentials go in a private config file, never in argv: argv is printed on failure and readable from /proc.
Sourcepub fn publish(
&self,
kind: Kind,
tarball: &Path,
identity: &Identity,
) -> Result<Meta>
pub fn publish( &self, kind: Kind, tarball: &Path, identity: &Identity, ) -> Result<Meta>
Uploads a payload under its content-addressed key, then the meta that
points at it, then for coverage the latest copy deploy reads. Order
matters: a meta must never name an object that is not there yet, since a
reader that sees the meta will go fetch it.
Source§impl Store
impl Store
fn s3_get(&self, remote: &str, local: &Path) -> Result<()>
Sourcepub fn fetch_meta(
&self,
kind: Kind,
identity: &Identity,
into: &Path,
) -> Result<Meta>
pub fn fetch_meta( &self, kind: Kind, identity: &Identity, into: &Path, ) -> Result<Meta>
Reads one kind’s meta out of a run’s prefix.
Sourcepub fn verify_object(
&self,
meta: &Meta,
identity: &Identity,
into: &Path,
) -> Result<PathBuf>
pub fn verify_object( &self, meta: &Meta, identity: &Identity, into: &Path, ) -> Result<PathBuf>
Downloads a payload and checks it against what its meta claims.
The key is content-addressed, so bytes cannot change under a name — but verifying on read is what turns that from an argument into a check.
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more