gcp-api is a Clojure library which provides programmatic access to GCP services from your Clojure program.
See aws-api's rationale here.
Much the same as aws-api's approach, this library publishes descriptor files that specify the operations, inputs, and outputs. These descriptor files are created from the GCP discovery documents.
The generated descriptor files are published in a separate repository located here.
Using gcp-api requires you to add gcp-api
and the service(s) of your choosing.
In the below example we add the GCP Compute Engine API gcp-api/compute
.
Note that you must replace part of the :deps/root
path with the API version you want to use.
gcp-api {:git/url "https://github.com/ComputeSoftware/gcp-api.git"
:sha "<most recent sha>"}
gcp-api/compute {:git/url "[email protected]:ComputeSoftware/gcp-api-descriptors.git"
:sha "<most recent sha>"
:deps/root "compute/<version>"}
(require '[compute.gcp.api :as gcp-api])
(def client
(gcp-api/client {:api :compute
:version "v1"}))
(gcp-api/invoke
client
{:op "compute.instances.list"
:request {:project "my-project"
:zone "us-central1-c"}})
- Cognitect's aws-api
Copyright © 2020 Compute Software
Distributed under the Eclipse Public License either version 2.0 or (at your option) any later version.