Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

nicolai86/go-contentful-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-contentful-generator

generate a complete contentful SDK client from your existing schema

Features

  • generates typed contentful content delivery api SDK
  • generates typed contentful content preview api SDK
  • generates typed contentful content management api SDK
  • supports recursive type definitions
  • supports assets

Installation

go get -u github.com/nicolai86/go-contentful-generator

Examples

See the test folder for an example usage as well as an example client.

Usage

first, export the necessary credentials into your env:

$ export CONTENTFUL_SPACE_ID=awesome-space
$ export CONTENTFUL_AUTH_TOKEN=secret-token

the CONTENTFUL_AUTH_TOKEN has to be for the CMA.

Then generate your package:

$ go-contentful-generator -pkg contentful -o contentful.go

Or, you can use a go-generate flag like this:

//go:generate go-contentful-generator -pkg main -o contentful.go

TODO

  • multi-language schema
  • content-type management
  • tests

About

A client SDK generator for contentful

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages