Documentation
¶
Index ¶
- type Client
- type Options
- type Record
- type Records
- func (records *Records) Create(ctx context.Context, record *Record) (err error)
- func (records *Records) Delete(ctx context.Context, zoneID, recordID string) (err error)
- func (records *Records) Details(ctx context.Context, zoneID, recordID string) (record *Record, err error)
- func (records *Records) List(ctx context.Context, zoneID string) ([]*Record, error)
- func (records *Records) Patch(ctx context.Context, record *Record) (err error)
- type Response
- type ResponseError
- type ResultInfo
- type Zone
- type ZoneMeta
- type ZoneOwner
- type ZonePatch
- type ZonePlan
- type Zones
- func (zones *Zones) Create(ctx context.Context, domain string) (zone *Zone, err error)
- func (zones *Zones) Delete(ctx context.Context, id string) (err error)
- func (zones *Zones) Details(ctx context.Context, id string) (zone *Zone, err error)
- func (zones *Zones) List(ctx context.Context) ([]*Zone, error)
- func (zones *Zones) Patch(ctx context.Context, id string, patch *ZonePatch) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record 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,omitempty"`
Locked bool `json:"locked,omitempty"`
TTL int `json:"ttl,omitempty"`
CreatedOn time.Time `json:"created_on,omitempty"`
ModifiedOn time.Time `json:"modified_on,omitempty"`
ZoneID string `json:"zone_id,omitempty"`
ZoneName string `json:"zone_name,omitempty"`
}
Record - Cloudflare DNS Record.
type Records ¶
type Records struct {
// contains filtered or unexported fields
}
Records - Cloudflare Records API Client.
func (*Records) Create ¶
Create - Creates a zone DNS record. Required parameters of a record are - `type`, `name` and `content`. Optional parameters of a record are - `ttl`.
func (*Records) Details ¶
func (records *Records) Details(ctx context.Context, zoneID, recordID string) (record *Record, err error)
Details - Requests zone DNS record details by zone ID and record ID.
type Response ¶
type Response struct {
Result json.RawMessage `json:"result"`
ResultInfo *ResultInfo `json:"result_info"`
Errors []*ResponseError `json:"errors"`
Success bool `json:"success"`
}
Response - Cloudflare API Response.
type ResponseError ¶
type ResponseError struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
ResponseError - Cloudflare API Response error.
func (*ResponseError) Error ¶
func (err *ResponseError) Error() string
Error - Returns response error message.
type ResultInfo ¶
type ResultInfo struct {
Page int `json:"page,omitempty"`
PerPage int `json:"per_page,omitempty"`
TotalPages int `json:"total_pages,omitempty"`
Count int `json:"count,omitempty"`
TotalCount int `json:"total_count,omitempty"`
}
ResultInfo - Cloudflare API Response Result Info.
type Zone ¶
type Zone struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
Paused bool `json:"paused,omitempty"`
Type string `json:"type,omitempty"`
DevelopmentMode int `json:"development_mode,omitempty"`
NameServers []string `json:"name_servers,omitempty"`
OriginalNameServers []string `json:"original_name_servers,omitempty"`
ModifiedOn time.Time `json:"modified_on,omitempty"`
CreatedOn time.Time `json:"created_on,omitempty"`
CheckedOn time.Time `json:"checked_on,omitempty"`
Meta *ZoneMeta `json:"meta,omitempty"`
Owner *ZoneOwner `json:"owner,omitempty"`
Plan *ZonePlan `json:"plan,omitempty"`
Permissions []string `json:"permissions,omitempty"`
}
Zone - Cloudflare Zone.
type ZoneMeta ¶
type ZoneMeta struct {
Step int `json:"step,omitempty"`
PageRuleQuota string `json:"page_rule_quota,omitempty"`
CustomCertificateQuota int `json:"custom_certificate_quota,omitempty"`
WildcardProxiable bool `json:"wildcard_proxiable,omitempty"`
PhishingDetected bool `json:"phishing_detected,omitempty"`
MultipleRailgunsAllowed bool `json:"multiple_railguns_allowed,omitempty"`
}
ZoneMeta -
type ZoneOwner ¶
type ZoneOwner struct {
Type string `json:"type,omitempty"`
ID string `json:"id,omitempty"`
Email string `json:"email,omitempty"`
}
ZoneOwner -
type ZonePatch ¶
type ZonePatch struct {
Plan *ZonePlan `json:"plan,omitempty"`
Paused bool `json:"paused,omitempty"`
VanityNameServers []string `json:"vanity_name_servers,omitempty"`
}
ZonePatch -
type ZonePlan ¶
type ZonePlan struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Price int `json:"price,omitempty"`
Currency string `json:"currency,omitempty"`
Frequency string `json:"frequency,omitempty"`
LegacyID string `json:"legacy_id,omitempty"`
IsSubscribed bool `json:"is_subscribed,omitempty"`
CanSubscribe bool `json:"can_subscribe,omitempty"`
ExternallyManaged bool `json:"externally_managed,omitempty"`
}
ZonePlan -
type Zones ¶
type Zones struct {
// contains filtered or unexported fields
}
Zones - Cloudflare Zones API Client.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Godeps
|
|
|
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
|
Package cli provides a minimal framework for creating and organizing command line Go applications. |
|
_workspace/src/github.com/olekukonko/tablewriter
Create & Generate text based table
|
Create & Generate text based table |
|
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
|
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes. |
|
_workspace/src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
|
Package ctxhttp provides helper functions for performing context-aware HTTP requests. |
|
cmd
Package cmd implements cloudflare cli commands.
|
Package cmd implements cloudflare cli commands. |
Click to show internal directories.
Click to hide internal directories.