cfl

package
v0.0.0-...-27b28e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2016 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

package cfl provides a utility for interacting with CloudFlare

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Util

type Util struct {
	Client *cloudflare.Client
	// contains filtered or unexported fields
}

func New

func New(domain string, username string, apiKey string) *Util

func (*Util) DestroyRecord

func (util *Util) DestroyRecord(r *cloudflare.Record) error

func (*Util) EnsureRegistered

func (util *Util) EnsureRegistered(name string, ip string, rec *cloudflare.Record) (*cloudflare.Record, bool, error)

Register ensures that a record with the given name and ip is registered and proxying (orange cloud enabled). An existing record can optionally be passed in, in which case the record is assumed to be registered and we enable the orange cloud for the existing record. EnsureRegistered returns:

  • the record if registration was successful
  • true of it was able to turn on proxying
  • any error encountered

func (*Util) GetAllRecords

func (util *Util) GetAllRecords() ([]cloudflare.Record, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL