Skip to main content

Over

Struct Over 

Source
pub struct Over<E>(pub E);
Expand description

An Exchange as an UpCloudApi: the ONE place a typed call becomes a method, a path and a body.

Tuple Fields§

§0: E

Trait Implementations§

Source§

impl<E: Exchange> UpCloudApi for Over<E>

Source§

fn describe(&self) -> String

A word for what answered, for a report that must never read as a measurement of the account when it was not one.
Source§

fn is_the_account(&self) -> bool

Is this the real account? A question about the implementation, never a handle to one.
Source§

fn account(&self) -> Result<Reply, String>

GET /account. Callers: private-gunnar-ops, gunnar-loadbench, private-holger-ops, monetize-cloud-impl (credential probe, grow judge).
Source§

fn price(&self) -> Result<Reply, String>

GET /price. Caller: monetize-cloud-impl price.
Source§

fn servers(&self) -> Result<Reply, String>

GET /server. Callers: private-gunnar-ops / private-holger-ops orphan sweeps, gunnar-loadbench.
Source§

fn servers_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>

GET /server?label=… — every label must match. Caller: monetize-cloud-impl (the label search, and the inventory with none).
Source§

fn server(&self, uuid: &str) -> Result<Reply, String>

GET /server/{uuid}. Callers: everywhere.
Source§

fn firewall_rules(&self, uuid: &str) -> Result<Reply, String>

GET /server/{uuid}/firewall_rule. Caller: private-gunnar-ops estate.
Source§

fn storages_private(&self) -> Result<Reply, String>

GET /storage/private. Callers: the orphan sweeps, gunnar-upcloud (adopting media already on the account).
Source§

fn storages_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>

GET /storage?label=… — every label must match; no label lists everything the account can see. Caller: monetize-cloud-impl.
Source§

fn storage(&self, uuid: &str) -> Result<Reply, String>

GET /storage/{uuid}. Callers: grow, gunnar-upcloud’s online wait, monetize-cloud-impl.
Source§

fn zones(&self) -> Result<Reply, String>

GET /zone. Caller: gunnar-loadbench --from-upcloud.
Source§

fn plans(&self) -> Result<Reply, String>

GET /plan. Caller: gunnar-loadbench --from-upcloud.
Source§

fn create_server(&self, document: &Value) -> Result<Reply, String>

POST /server with the caller’s server document ({"server": {…}}). The DOCUMENT is the caller’s — a plan, a template clone, labels, SSH keys; the PATH is not. Caller: monetize-cloud-impl ensure.
Source§

fn stop_server(&self, uuid: &str, stop: Stop) -> Result<Reply, String>

POST /server/{uuid}/stop.
Source§

fn start_server(&self, uuid: &str) -> Result<Reply, String>

POST /server/{uuid}/start.
Source§

fn modify_server_plan(&self, uuid: &str, plan: &str) -> Result<Reply, String>

PUT /server/{uuid} with a plan — a plan change, which ALSO mints a Resize Backup. Callers: private-gunnar-ops grow, monetize-cloud-impl.
Source§

fn set_boot_order(&self, uuid: &str, order: BootOrder) -> Result<Reply, String>

PUT /server/{uuid} with a boot order. Caller: gunnar-upcloud.
Source§

fn set_console(&self, uuid: &str, console: Console<'_>) -> Result<Reply, String>

PUT /server/{uuid} toggling the VNC console. Caller: gunnar-upcloud console::open (the toggle that defeats the stale port).
Source§

fn attach_storage( &self, server: &str, kind: DeviceKind, storage: &str, at: Option<&str>, ) -> Result<Reply, String>

POST /server/{uuid}/storage/attach, optionally AT an address (virtio, virtio:5). Callers: gunnar-upcloud (no address), monetize-cloud-impl (always an address).
Source§

fn detach_storage(&self, server: &str, address: &str) -> Result<Reply, String>

POST /server/{uuid}/storage/detach — names an ADDRESS (ide:0:0, virtio:5), never a storage uuid. Callers: gunnar-upcloud, monetize-cloud-impl.
Source§

fn eject_cdrom(&self, server: &str) -> Result<Reply, String>

POST /server/{uuid}/cdrom/eject — legal on a STARTED server (MEASURED). Caller: gunnar-upcloud (the never-loop primitive).
Source§

fn delete_server(&self, uuid: &str, with: WithStorages) -> Result<Reply, String>

DELETE /server/{uuid}. This really deletes.
Source§

fn create_storage(&self, new: &NewStorage<'_>) -> Result<Reply, String>

POST /storage. Callers: gunnar-upcloud (the seed a medium is imported into), monetize-cloud-impl (a labelled volume).
Source§

fn clone_storage( &self, uuid: &str, title: &str, zone: &str, tier: &str, ) -> Result<Reply, String>

POST /storage/{uuid}/clone. Caller: gunnar-upcloud clone_probe.
Source§

fn import_direct_upload(&self, uuid: &str) -> Result<Reply, String>

POST /storage/{uuid}/import with source: direct_upload — the reply carries the URL UpCloudApi::upload_direct PUTs to. Caller: gunnar-upcloud.
Source§

fn upload_direct(&self, url: &str, file: &Path) -> Result<Reply, String>

PUT <direct_upload_url> with the file’s bytes. The URL is the one UpCloudApi::import_direct_upload answered, is itself a credential (never printed whole; no bearer sent), and must belong to the same cloud this implementation talks to — the account’s upload host for the account, loopback for a mock. Caller: gunnar-upcloud.
Source§

fn modify_storage_size_as( &self, uuid: &str, gb: u64, spelling: SizeSpelling, ) -> Result<Reply, String>

PUT /storage/{uuid} with the size spelled as the CALLER has always sent it. A port must not change a request’s wire format, and the two callers disagree: private-gunnar-ops sends a string, monetize-cloud-impl (the live money path) a number — and UpCloud’s own SDK declares sizes int (T7, 2026-09-21). Nobody here holds a recorded account answer that either spelling is accepted where the other is, so neither is chosen for the other. Caller: monetize-cloud-impl grow (SizeSpelling::Number). Read more
Source§

fn modify_storage_size(&self, uuid: &str, gb: u64) -> Result<Reply, String>

PUT /storage/{uuid} with a new size as a STRING ("64") — the volume grows. Caller: private-gunnar-ops grow (its spelling since before this crate; unchanged by the port).
Source§

fn resize_filesystem(&self, uuid: &str) -> Result<Reply, String>

POST /storage/{uuid}/resize — the FILESYSTEM grows, and the provider mints a Resize Backup that nothing deletes.
Source§

fn delete_storage(&self, uuid: &str, backups: Backups) -> Result<Reply, String>

DELETE /storage/{uuid}. This really deletes.

Auto Trait Implementations§

§

impl<E> Freeze for Over<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for Over<E>
where E: RefUnwindSafe,

§

impl<E> Send for Over<E>
where E: Send,

§

impl<E> Sync for Over<E>
where E: Sync,

§

impl<E> Unpin for Over<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for Over<E>
where E: UnsafeUnpin,

§

impl<E> UnwindSafe for Over<E>
where E: UnwindSafe,

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, 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.