• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

brendanhay/gogol: A comprehensive Google Services SDK for Haskell.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

brendanhay/gogol

开源软件地址(OpenSource Url):

https://github.com/brendanhay/gogol

开源编程语言(OpenSource Language):

Haskell 100.0%

开源软件介绍(OpenSource Introduction):

Gogol

Hackage Version

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.

Organisation

This repository is organised into the following directory structure:

  • lib/gogol: Actual operational logic, you'll need to import this to send requests etc.
  • lib/gogol-core: The gogol-core library upon which each of the services depends.
  • lib/services/gogol-*: Data types for each of the individual Google Compute Engine Service libraries.
  • examples: A currently sparse collection of examples for the various services.
  • configs, Configuration, templates, and assets for the code generator.
  • gen: The code generation binary.
  • 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.

Contribute

For any problems, comments, or feedback please create an issue here on GitHub.

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

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mongodb-haskell/mongodb: MongoDB driver for Haskell发布时间:2022-06-22
下一篇:
informatikr/hedis: A Redis client library for Haskell.发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap