terraform/vendor/github.com/mitchellh/cloudflare-go
Paul Hinze 12eb536b25
godeps: fixup missing deps
This diff was generated by:

 * `godep restore -v`, correcting any hiccups until it succeeded
 * `rm -rf vendor/ Godep`
 * `godep save -v ./...`
2016-05-04 10:54:22 -05:00
..
.travis.yml Add new cloudflare lib 2016-05-03 09:54:47 -07:00
LICENSE Add new cloudflare lib 2016-05-03 09:54:47 -07:00
README.md Add new cloudflare lib 2016-05-03 09:54:47 -07:00
cloudflare.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
cpage.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
dns.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
ips.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
keyless.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
pagerules.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
railgun.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
ssl.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
user.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
waf.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00
zone.go Add new cloudflare lib 2016-05-03 09:54:47 -07:00

README.md

GoDoc

cloudflare

A Go library for interacting with CloudFlare's API v4.

Installation

You need a working Go environment.

go get github.com/cloudflare/cloudflare-go

Getting Started

package main

import (
	"fmt"

	"github.com/cloudflare/cloudflare-go"
)

var api *cloudflare.API

func main() {
	// Construct a new API object
	api = cloudflare.New(os.Getenv("CF_API_KEY"), os.Getenv("CF_API_EMAIL"))

	// Fetch the list of zones on the account
	zones, err := api.ListZones()
	if err != nil {
		fmt.Println(err)
	}
	// Print the zone names
	for _, z := range zones {
		fmt.Println(z.Name)
	}
}

An example application, flarectl, is in this repository.