cloudflare

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyExpression

func EmptyExpression() *expression.Expression

func HostnameExpressionContains

func HostnameExpressionContains(hostname string) *expression.Expression

func HostnameExpressionEquals

func HostnameExpressionEquals(hostname string) *expression.Expression

func HostnameExpressionIsIn

func HostnameExpressionIsIn(hostnames []string) *expression.Expression

func IPExpressionEquals

func IPExpressionEquals(IP string) *expression.Expression

func IPExpressionIsIn

func IPExpressionIsIn(list []string) *expression.Expression

func NotSSLExpression

func NotSSLExpression() *expression.Expression

func SSLExpression

func SSLExpression() *expression.Expression

Types

type Cloudflare

type Cloudflare struct {
	// contains filtered or unexported fields
}

func New

func New(user string, key string, userServiceKey string) (*Cloudflare, error)

func (*Cloudflare) CreateDNSRecords

func (c *Cloudflare) CreateDNSRecords(domain string, records []*DNSRecord) ([]*DNSRecord, error)

func (*Cloudflare) CreateFilters

func (c *Cloudflare) CreateFilters(domain string, filters []*Filter) ([]*Filter, error)

func (*Cloudflare) CreateFirewallRules

func (c *Cloudflare) CreateFirewallRules(domain string, rules []*FirewallRule) ([]*FirewallRule, error)

func (*Cloudflare) CreateOriginCACertificate

func (c *Cloudflare) CreateOriginCACertificate(domain string, hosts []string, key *rsa.PrivateKey) (*cloudflare.OriginCACertificate, error)

func (*Cloudflare) DeleteDNSRecords

func (c *Cloudflare) DeleteDNSRecords(domain string, recordIDs []string) error

func (*Cloudflare) DeleteFilters

func (c *Cloudflare) DeleteFilters(domain string, filterIDs []string) error

func (*Cloudflare) DeleteFirewallRules

func (c *Cloudflare) DeleteFirewallRules(domain string, ruleIDs []string) error

func (*Cloudflare) GetDNSRecords

func (c *Cloudflare) GetDNSRecords(domain string) ([]*DNSRecord, error)

func (*Cloudflare) GetFilters

func (c *Cloudflare) GetFilters(domain string) ([]*Filter, error)

func (*Cloudflare) GetFirewallRules

func (c *Cloudflare) GetFirewallRules(domain string) ([]*FirewallRule, error)

func (*Cloudflare) GetOriginCACertificates

func (c *Cloudflare) GetOriginCACertificates(domain string) ([]cloudflare.OriginCACertificate, error)

func (*Cloudflare) RevokeOriginCACertificate

func (c *Cloudflare) RevokeOriginCACertificate(id string) error

func (*Cloudflare) UpdateDNSRecords

func (c *Cloudflare) UpdateDNSRecords(domain string, records []*DNSRecord) ([]*DNSRecord, error)

func (*Cloudflare) UpdateFilters

func (c *Cloudflare) UpdateFilters(domain string, filters []*Filter) ([]*Filter, error)

func (*Cloudflare) UpdateFirewallRules

func (c *Cloudflare) UpdateFirewallRules(domain string, rules []*FirewallRule) ([]*FirewallRule, error)

type DNSRecord

type DNSRecord struct {
	ID         string      `json:"id,omitempty"`
	Type       string      `json:"type,omitempty"`
	Name       string      `json:"name,omitempty"`
	Content    string      `json:"content,omitempty"`
	Proxiable  bool        `json:"proxiable,omitempty"`
	Proxied    bool        `json:"proxied"`
	TTL        int         `json:"ttl,omitempty"`
	Locked     bool        `json:"locked,omitempty"`
	ZoneID     string      `json:"zone_id,omitempty"`
	ZoneName   string      `json:"zone_name,omitempty"`
	CreatedOn  time.Time   `json:"created_on,omitempty"`
	ModifiedOn time.Time   `json:"modified_on,omitempty"`
	Data       interface{} `json:"data,omitempty"` // data returned by: SRV, LOC
	Meta       interface{} `json:"meta,omitempty"`
	Priority   int         `json:"priority"`
}

type Filter

type Filter struct {
	ID          string `json:"id,omitempty"`
	Expression  string `json:"expression"`
	Paused      bool   `json:"paused"`
	Description string `json:"description"`
}

type FirewallRule

type FirewallRule struct {
	ID          string      `json:"id,omitempty"`
	Paused      bool        `json:"paused"`
	Description string      `json:"description"`
	Action      string      `json:"action"`
	Priority    interface{} `json:"priority"`
	Filter      *Filter     `json:"filter"`
	Products    []string    `json:"products,omitempty"`
	CreatedOn   time.Time   `json:"created_on,omitempty"`
	ModifiedOn  time.Time   `json:"modified_on,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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