Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brendanhay/gogol
A comprehensive Google Services SDK for Haskell.
https://github.com/brendanhay/gogol
google haskell
Last synced: 16 days ago
JSON representation
A comprehensive Google Services SDK for Haskell.
- Host: GitHub
- URL: https://github.com/brendanhay/gogol
- Owner: brendanhay
- License: other
- Created: 2015-09-24T18:19:43.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-07-12T15:15:03.000Z (4 months ago)
- Last Synced: 2024-10-09T09:23:57.498Z (27 days ago)
- Topics: google, haskell
- Language: Haskell
- Homepage:
- Size: 116 MB
- Stars: 280
- Watchers: 16
- Forks: 105
- Open Issues: 58
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome - brendanhay/gogol - 10 star:0.3k fork:0.1k A comprehensive Google Services SDK for Haskell. (Haskell)
README
# Gogol
[![Hackage Version](https://img.shields.io/hackage/v/gogol.svg)](http://hackage.haskell.org/package/gogol)
* [Description](#description)
* [Documentation](#documentation)
* [Organisation](#organisation)
* [Change Log](#change-log)
* [Contribute](#contribute)
* [Code Generation](#code-generation)
* [Licence](#licence)## Description
A comprehensive Google Services SDK for Haskell supporting all of the publicly available services.
## Documentation
You can find the latest stable release documentation for each respective library
on Hackage under the [Google section](http://hackage.haskell.org/packages/#cat:Google).## Organisation
This repository is organised into the following directory structure:
* [`lib/gogol`](lib/gogol): Actual operational logic, you'll need to import this to send requests etc.
* [`lib/gogol-core`](lib/gogol-core): The `gogol-core` library upon which each of the services depends.
* [`lib/services/gogol-*`](lib/services): Data types for each of the individual Google Compute Engine Service libraries.
* [`examples`](examples): A currently sparse collection of examples for the various services.
* [`configs`](configs), Configuration, templates, and assets for the code generator.
* [`gen`](gen): The code generation binary.
* [`scripts`](scripts): Scripts to manage the release lifecycle of the service libraries.## Change Log
A change log for the entire project can be found under [`gogol/CHANGELOG.md`](gogol/CHANGELOG.md).
## Contribute
For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).
## Code Generation
For pull requests which affect generated output, please _do not include_ the actual regenerated service code, only commit the updates to the generator and related configuration.
This ensures the Continuous Integration process is the single source of truth for generated code changes, and keeps pull requests readable and focused on actual generator code/logic changes.
### Adding New Services
The configuration for the generation step of each individual service endpoint lives under `./configs/services`. The naming matches the Google Discovery Service naming of endpoints, which are vendored under `./configs/models`.
Rather than actually crawling the Discovery Service, the [Google API Go Client](https://www.github.com/google/google-api-go-client) is vendored under `./vendor`, and the JSON service definitions are copied to `./configs/models` to ensure reproducibility of the generation steps and the abilitry to diff across versions.
### Example: Cloud Dataproc
To add a new endpoint, first create the related JSON configuration in the `./configs/services` directory.
Since the Cloud Dataproc API is called `dataproc-api.json` in the Google Discovery API,
you would create the configuration `./configs/services/dataproc.json` with the following contents:```
{
"library": "dataproc",
"canonicalName": "Dataproc"
}
```Then, the `Makefile` is used:
```
make clean
make
```This will build the `./bin/gogol-gen` binary, and will generate a Haskell library for each API that has matching `./configs/services/*.json` configuration.
For the above example, the result would be a `./lib/services/gogol-dataproc` directory at the top-level of the project containing the generated API client.
> `make full-clean` can be used to cause a complete re-download of all (including new) service models.
> Individual clients/SDKs can be generated by passing a specific `MODELS` environment variable to the `make` command, for example: `MODELS=configs/models/admin/directory/v1/admin-api.json make`
## Licence
Gogol is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
Parts of the code are derived from Google Compute Engine service descriptions, licensed under Apache 2.0.
Source files subject to this contain an additional licensing clause in their header.