Skip to main content

EggfetchTransport

Struct EggfetchTransport 

Source
pub struct EggfetchTransport { /* private fields */ }
Expand description

Production GitHub transport with fixed hosts.

Uses eggfetch-core 0.4.0 with explicit lean features (standard-http1, tls-rustls, tls-native-roots, json) rather than the default retry/redirect policy. Retries are disabled and redirects are not followed; 3xx responses fail closed. Bounded timeouts and body sizes apply to every request. The Debug implementation redacts the credential.

Implementations§

Source§

impl EggfetchTransport

Source

pub fn new( token: String, timeout_secs: u64, max_metadata_bytes: usize, ) -> Result<Self, GithubError>

Create a production transport. The token is held in memory only and never serialized or logged.

Trait Implementations§

Source§

impl Debug for EggfetchTransport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl GithubApi for EggfetchTransport

Source§

async fn get_ref( &self, owner: &str, repo: &str, tag: &str, ) -> Result<RefTarget, GithubError>

Fetch exact refs/tags/<tag> reference.
Source§

async fn get_tag( &self, owner: &str, repo: &str, sha: &str, ) -> Result<TagObject, GithubError>

Fetch one annotated tag object by SHA.
Source§

async fn list_releases( &self, owner: &str, repo: &str, page: u32, ) -> Result<Vec<RemoteRelease>, GithubError>

List releases for one page (1-indexed, per_page=100).
Source§

async fn create_release( &self, owner: &str, repo: &str, tag: &str, title: &str, body: &str, prerelease: bool, ) -> Result<RemoteRelease, GithubError>

Create a new draft release for an exact existing tag.
Source§

async fn list_assets( &self, owner: &str, repo: &str, release_id: u64, page: u32, ) -> Result<Vec<RemoteAsset>, GithubError>

List all assets for one release.
Source§

async fn upload_asset( &self, owner: &str, repo: &str, release_id: u64, name: &str, file: Box<dyn Read + Send>, length: u64, content_type: &str, ) -> Result<RemoteAsset, GithubError>

Upload one asset; 502/422 are reported as errors with http_502 / http_422_duplicate prefixes so the caller can apply narrow recovery.
Source§

async fn delete_asset( &self, owner: &str, repo: &str, asset_id: u64, ) -> Result<(), GithubError>

Delete one asset by id (only the narrow starter recovery may call this).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more