feature/fix-clippy-on-stable-channel
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | use smbcloud_network::environment::Environment; |
| 2 | |
| 3 | /// API credentials for a GresIQ-managed database. |
| 4 | /// |
| 5 | /// Obtain these from the smbCloud console after registering a GresIQ app. |
| 6 | /// The `api_key` identifies the app; the `api_secret` authenticates it. |
| 7 | #[derive(Clone, Copy)] |
| 8 | pub struct GresiqCredentials<'a> { |
| 9 | pub api_key: &'a str, |
| 10 | pub api_secret: &'a str, |
| 11 | } |
| 12 | |
| 13 | /// Resolve the GresIQ gateway base URL for the given environment. |
| 14 | /// |
| 15 | /// - **Dev** → `http://localhost:8088` |
| 16 | /// - **Production** → `https://api.smbcloud.xyz` |
| 17 | pub fn base_url(environment: &Environment) -> String { |
| 18 | format!( |
| 19 | "{}://{}", |
| 20 | environment.api_protocol(), |
| 21 | environment.api_host() |
| 22 | ) |
| 23 | } |