Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from golemcloud/dep_updates
Browse files Browse the repository at this point in the history
golem clients 0.0.58, golem-wasm-rpc-stubgen 0.0.12, fmt
  • Loading branch information
vigoo authored Mar 8, 2024
2 parents a5dca00 + 8de5d77 commit e1978fa
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 78 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ clap = { version = "4.4.12", features = ["derive"] }
clap-verbosity-flag = "2.1.1"
derive_more = "0.99.17"
futures-util = "0.3.30"
golem-cloud-client = "0.0.55"
golem-gateway-client = "0.0.55"
golem-examples = "0.1.11"
golem-wasm-rpc-stubgen = { version = "0.0.11", optional = true }
golem-cloud-client = "0.0.58"
golem-gateway-client = "0.0.58"
golem-examples = "0.1.12"
golem-wasm-rpc-stubgen = { version = "0.0.12", optional = true }
http = "1.0.0"
indoc = "2.0.4"
itertools = "0.11.0"
Expand Down
5 changes: 1 addition & 4 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ use std::path::{Path, PathBuf};

use async_trait::async_trait;
use chrono::{DateTime, Utc};
use golem_cloud_client::model::OAuth2Data;
use golem_cloud_client::model::Token;
use golem_cloud_client::model::TokenSecret;
use golem_cloud_client::model::UnsafeToken;
use golem_cloud_client::model::{OAuth2Data, Token, TokenSecret, UnsafeToken};
use indoc::printdoc;
use serde::{Deserialize, Serialize};
use tracing::info;
Expand Down
4 changes: 2 additions & 2 deletions src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use golem_cloud_client::model::{TokenSecret, UnsafeToken};

use crate::model::{AccountId, ProjectAction};
use golem_cloud_client::model::TokenSecret;
use golem_cloud_client::model::UnsafeToken;

pub mod account;
pub mod errors;
Expand Down
4 changes: 1 addition & 3 deletions src/clients/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_cloud_client::model::Account;
use golem_cloud_client::model::AccountData;
use golem_cloud_client::model::Plan;
use golem_cloud_client::model::{Account, AccountData, Plan};
use tracing::info;

use crate::model::{AccountId, GolemError};
Expand Down
13 changes: 4 additions & 9 deletions src/clients/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use golem_cloud_client::api::AccountError;
use golem_cloud_client::api::GrantError;
use golem_cloud_client::api::LoginError;
use golem_cloud_client::api::ProjectError;
use golem_cloud_client::api::ProjectGrantError;
use golem_cloud_client::api::ProjectPolicyError;
use golem_cloud_client::api::TemplateError;
use golem_cloud_client::api::TokenError;
use golem_cloud_client::api::WorkerError;
use golem_cloud_client::api::{
AccountError, GrantError, LoginError, ProjectError, ProjectGrantError, ProjectPolicyError,
TemplateError, TokenError, WorkerError,
};

pub trait ResponseContentErrorMapper {
fn map(self) -> String;
Expand Down
3 changes: 1 addition & 2 deletions src/clients/gateway/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_gateway_client::model::Certificate;
use golem_gateway_client::model::CertificateRequest;
use golem_gateway_client::model::{Certificate, CertificateRequest};
use uuid::Uuid;

use crate::model::{GolemError, ProjectId};
Expand Down
3 changes: 1 addition & 2 deletions src/clients/gateway/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_gateway_client::model::ApiDomain;
use golem_gateway_client::model::DomainRequest;
use golem_gateway_client::model::{ApiDomain, DomainRequest};

use crate::model::{GolemError, ProjectId};

Expand Down
8 changes: 3 additions & 5 deletions src/clients/gateway/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use golem_gateway_client::api::ApiCertificateError;
use golem_gateway_client::api::ApiDefinitionError;
use golem_gateway_client::api::ApiDeploymentError;
use golem_gateway_client::api::ApiDomainError;
use golem_gateway_client::api::HealthcheckError;
use golem_gateway_client::api::{
ApiCertificateError, ApiDefinitionError, ApiDeploymentError, ApiDomainError, HealthcheckError,
};

pub trait ResponseContentErrorMapper {
fn map(self) -> String;
Expand Down
5 changes: 1 addition & 4 deletions src/clients/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

use async_trait::async_trait;
use golem_cloud_client::api::LoginClient as HttpClient;
use golem_cloud_client::model::OAuth2Data;
use golem_cloud_client::model::Token;
use golem_cloud_client::model::TokenSecret;
use golem_cloud_client::model::UnsafeToken;
use golem_cloud_client::model::{OAuth2Data, Token, TokenSecret, UnsafeToken};
use golem_cloud_client::{Context, Security};
use tracing::info;

Expand Down
4 changes: 1 addition & 3 deletions src/clients/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_cloud_client::model::ProjectActions;
use golem_cloud_client::model::ProjectPolicy;
use golem_cloud_client::model::ProjectPolicyData;
use golem_cloud_client::model::{ProjectActions, ProjectPolicy, ProjectPolicyData};
use tracing::info;

use crate::clients::action_cli_to_api;
Expand Down
3 changes: 1 addition & 2 deletions src/clients/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_cloud_client::model::Project;
use golem_cloud_client::model::ProjectDataRequest;
use golem_cloud_client::model::{Project, ProjectDataRequest};
use indoc::formatdoc;
use tracing::info;

Expand Down
3 changes: 1 addition & 2 deletions src/clients/project_grant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// limitations under the License.

use async_trait::async_trait;
use golem_cloud_client::model::ProjectGrant;
use golem_cloud_client::model::ProjectGrantDataRequest;
use golem_cloud_client::model::{ProjectGrant, ProjectGrantDataRequest};
use tracing::info;

use crate::clients::action_cli_to_api;
Expand Down
24 changes: 9 additions & 15 deletions src/clients/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,11 @@
use std::io::Read;

use async_trait::async_trait;
use golem_cloud_client::model::Export;
use golem_cloud_client::model::ExportFunction;
use golem_cloud_client::model::ExportInstance;
use golem_cloud_client::model::FunctionParameter;
use golem_cloud_client::model::FunctionResult;
use golem_cloud_client::model::NameOptionTypePair;
use golem_cloud_client::model::NameTypePair;
use golem_cloud_client::model::Template;
use golem_cloud_client::model::TemplateQuery;
use golem_cloud_client::model::Type;
use golem_cloud_client::model::TypeEnum;
use golem_cloud_client::model::TypeFlags;
use golem_cloud_client::model::TypeRecord;
use golem_cloud_client::model::TypeTuple;
use golem_cloud_client::model::TypeVariant;
use golem_cloud_client::model::{
Export, ExportFunction, ExportInstance, FunctionParameter, FunctionResult, NameOptionTypePair,
NameTypePair, ResourceMode, Template, TemplateQuery, Type, TypeEnum, TypeFlags, TypeRecord,
TypeTuple, TypeVariant,
};
use serde::Serialize;
use tokio::fs::File;
use tracing::info;
Expand Down Expand Up @@ -168,6 +158,10 @@ fn render_type(typ: &Type) -> String {
Type::U8 { .. } => "u8".to_string(),
Type::S8 { .. } => "s8".to_string(),
Type::Bool { .. } => "bool".to_string(),
Type::Handle(handle) => match handle.mode {
ResourceMode::Borrowed => format!("&handle<{}>", handle.resource_id),
ResourceMode::Owned => format!("handle<{}>", handle.resource_id),
},
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/clients/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

use async_trait::async_trait;
use chrono::{DateTime, Utc};
use golem_cloud_client::model::CreateTokenDto;
use golem_cloud_client::model::Token;
use golem_cloud_client::model::UnsafeToken;
use golem_cloud_client::model::{CreateTokenDto, Token, UnsafeToken};
use tracing::info;

use crate::model::{AccountId, GolemError, TokenId};
Expand Down
10 changes: 4 additions & 6 deletions src/clients/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ use std::time::Duration;

use async_trait::async_trait;
use futures_util::{future, pin_mut, SinkExt, StreamExt};
use golem_cloud_client::model::CallingConvention;
use golem_cloud_client::model::InvokeParameters;
use golem_cloud_client::model::InvokeResult;
use golem_cloud_client::model::VersionedWorkerId;
use golem_cloud_client::model::WorkerCreationRequest;
use golem_cloud_client::model::WorkerMetadata;
use golem_cloud_client::model::{
CallingConvention, InvokeParameters, InvokeResult, VersionedWorkerId, WorkerCreationRequest,
WorkerMetadata,
};
use golem_cloud_client::Context;
use native_tls::TlsConnector;
use serde::Deserialize;
Expand Down
3 changes: 1 addition & 2 deletions src/gateway/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

use async_trait::async_trait;
use clap::Subcommand;
use golem_gateway_client::model::ApiDeployment;
use golem_gateway_client::model::ApiSite;
use golem_gateway_client::model::{ApiDeployment, ApiSite};

use crate::clients::gateway::deployment::DeploymentClient;
use crate::clients::project::ProjectClient;
Expand Down

0 comments on commit e1978fa

Please sign in to comment.