fastly

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const APIKeyEnvVar = "FASTLY_API_KEY"

APIKeyEnvVar is the name of the environment variable where the Fastly API key should be read from.

View Source
const APIKeyHeader = "Fastly-Key"

APIKeyHeader is the name of the header that contains the Fastly API key.

View Source
const DefaultEndpoint = "https://api.fastly.com"

DefaultEndpoint is the default endpoint for Fastly. Since Fastly does not support an on-premise solution, this is likely to always be the default.

View Source
const RealtimeStatsEndpoint = "https://rt.fastly.com"

RealtimeStatsEndpoint is the realtime stats endpoint for Fastly.

Variables

View Source
var ErrMissingACL = errors.New("Missing required field 'ACL'")

ErrMissingAcl is an error that is returned when an unout struct required an "Acl" key, but one is not set

View Source
var ErrMissingBackend = errors.New("Missing required field 'Backend'")

ErrMissingBackend is an error that is returned when an input struct requires a "Backend" key, but one was not set.

View Source
var ErrMissingConfigSetID = errors.New("Missing required field 'ConfigSetID'")

ErrMissingConfigSetID is an error that is returned was an input struct requires a "ConfigSetID" key, but one was not set

View Source
var ErrMissingContent = errors.New("Missing required field 'Content'")

ErrMissingContent is an error that is returned when an input struct requires a "Content" key, but one was not set.

View Source
var ErrMissingDataset = errors.New("Missing required field 'Dataset'")

ErrMissingDataset is an error that is returned was an input struct requires a Dataset, but one was not set

View Source
var ErrMissingDictionary = errors.New("Missing required field 'Dictionary'")

ErrMissingDictionary is an error that is returned when an input struct requires a "Dictionary" key, but one was not set.

View Source
var ErrMissingDirector = errors.New("Missing required field 'Director'")

ErrMissingDirector is an error that is returned when an input struct requires a "From" key, but one was not set.

View Source
var ErrMissingEventID = errors.New("Missing required field 'EventID'")

ErrMissingEventID is an error that is returned was an input struct requires a "EventID" key, but one was not set

View Source
var ErrMissingFrom = errors.New("Missing required field 'From'")

ErrMissingFrom is an error that is returned when an input struct requires a "From" key, but one was not set.

View Source
var ErrMissingID = errors.New("Missing required field 'ID'")

ErrMissingID is an error that is returned when an input struct requires an "ID" key, but one was not set.

View Source
var ErrMissingIP = errors.New("Missing requried field 'IP'")

ErrMissingIP is an error that is returned when an unout struct required an "IP" key, but one is not set

View Source
var ErrMissingItemKey = errors.New("Missing required field 'ItemKey'")

ErrMissingItemKey is an error that is returned when an input struct requires a "ItemKey" key, but one was not set.

View Source
var ErrMissingKey = errors.New("Missing required field 'Key'")

ErrMissingKey is an error that is returned when an input struct requires a "Key" key, but one was not set.

View Source
var ErrMissingMonth = errors.New("Missing required field 'Month'")

ErrMissingMonth is an error that is returned when an input struct requires a "Month" key, but one was not set.

View Source
var ErrMissingName = errors.New("Missing required field 'Name'")

ErrMissingName is an error that is returned when an input struct requires a "Name" key, but one was not set.

View Source
var ErrMissingNewName = errors.New("Missing required field 'NewName'")

ErrMissingNewName is an erorr that is returned when an input struct requires a "NewName" key, but one was not set

View Source
var ErrMissingOWASPID = errors.New("Missing required field 'OWASPID'")

ErrMissingOWASPID is an error that is returned was an input struct requires a "OWASPID" key, but one was not set

View Source
var ErrMissingProjectID = errors.New("Missing required field 'ProjectID'")

ErrMissingProjectID is an error that is returned was an input struct requires a Project ID, but one was not set

View Source
var ErrMissingRuleID = errors.New("Missing required field 'RuleID'")

ErrMissingRuleID is an error that is returned was an input struct requires a "RuleID" key, but one was not set

View Source
var ErrMissingSecretKey = errors.New("Missing required field 'SecretKey'")

ErrMissingSecretKey is an error that is returned was an input struct requires a Secret Key, but one was not set

View Source
var ErrMissingService = errors.New("Missing required field 'Service'")

ErrMissingService is an error that is returned when an input struct requires a "Service" key, but one was not set.

View Source
var ErrMissingStatus = errors.New("Missing required field 'Status'")

ErrMissingStatus is an error that is returned when an input struct requires a "Status" key, but one was not set.

View Source
var ErrMissingTable = errors.New("Missing required field 'Table'")

ErrMissingTable is an error that is returned was an input struct requires a Table, but one was not set

View Source
var ErrMissingTag = errors.New("Missing required field 'Tag'")

ErrMissingTag is an error that is returned when an input struct requires a "Tag" key, but one was not set.

View Source
var ErrMissingTo = errors.New("Missing required field 'To'")

ErrMissingTo is an error that is returned when an input struct requires a "To" key, but one was not set.

View Source
var ErrMissingURL = errors.New("Missing required field 'URL'")

ErrMissingURL is an error that is returned when an input struct requires a "URL" key, but one was not set.

View Source
var ErrMissingUser = errors.New("Missing required field 'User'")

ErrMissingUser is an error that is returned was an input struct requires a User, but one was not set

View Source
var ErrMissingVersion = errors.New("Missing required field 'Version'")

ErrMissingVersion is an error that is returned when an input struct requires a "Version" key, but one was not set.

View Source
var ErrMissingWAFID = errors.New("Missing required field 'WAFID'")

ErrMissingWafID is an error that is returned was an input struct requires a "WafID" key, but one was not set

View Source
var ErrMissingWAFList = errors.New("WAF slice is empty")

ErrMissingWAFList is an error that is returned was an input struct requires a list of WAF id's, but it is empty

View Source
var ErrMissingYear = errors.New("Missing required field 'Year'")

ErrMissingYear is an error that is returned when an input struct requires a "Year" key, but one was not set.

View Source
var ProjectURL = "github.com/fastly/go-fastly"

ProjectURL is the url for this library.

View Source
var ProjectVersion = "0.4.3.dev"

ProjectVersion is the version of this library.

View Source
var UserAgent = fmt.Sprintf("FastlyGo/%s (+%s; %s)",
	ProjectVersion, ProjectURL, runtime.Version())

UserAgent is the user agent for this particular client.

Functions

This section is empty.

Types

type ACL added in v0.4.0

type ACL struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name string `mapstructure:"name"`
	ID   string `mapstructure:"id"`

	DeletedAt string `mapstructure:"deleted_at"`
	CreatedAt string `mapstructure:"created_at"`
	UpdatedAt string `mapstructure:"updated_at"`
}

type ACLEntry added in v0.4.0

type ACLEntry struct {
	ServiceID string `mapstructure:"service_id"`
	ACLID     string `mapstructure:"acl_id"`

	ID      string `mapstructure:"id"`
	IP      string `mapstructure:"ip"`
	Subnet  string `mapstructure:"subnet"`
	Negated bool   `mapstructure:"negated"`
	Comment string `mapstructure:"comment"`

	DeletedAt string `mapstructure:"deleted_at"`
	CreatedAt string `mapstructure:"created_at"`
	UpdatedAt string `mapstructure:"updated_at"`
}

type ACLsByName added in v0.4.0

type ACLsByName []*ACL

ACLsByName is a sortable list of ACLs.

func (ACLsByName) Len added in v0.4.0

func (s ACLsByName) Len() int

Len, Swap, and Less implement the sortable interface.

func (ACLsByName) Less added in v0.4.0

func (s ACLsByName) Less(i, j int) bool

func (ACLsByName) Swap added in v0.4.0

func (s ACLsByName) Swap(i, j int)

type ActivateVCLInput

type ActivateVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the VCL to mark as main (required).
	Name string
}

ActivateVCLInput is used as input to the ActivateVCL function.

type ActivateVersionInput

type ActivateVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

ActivateVersionInput is the input to the ActivateVersion function.

type Backend

type Backend struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name                string   `mapstructure:"name"`
	Comment             string   `mapstructure:"comment"`
	Address             string   `mapstructure:"address"`
	Port                uint     `mapstructure:"port"`
	ConnectTimeout      uint     `mapstructure:"connect_timeout"`
	MaxConn             uint     `mapstructure:"max_conn"`
	ErrorThreshold      uint     `mapstructure:"error_threshold"`
	FirstByteTimeout    uint     `mapstructure:"first_byte_timeout"`
	BetweenBytesTimeout uint     `mapstructure:"between_bytes_timeout"`
	AutoLoadbalance     bool     `mapstructure:"auto_loadbalance"`
	Weight              uint     `mapstructure:"weight"`
	RequestCondition    string   `mapstructure:"request_condition"`
	HealthCheck         string   `mapstructure:"healthcheck"`
	Hostname            string   `mapstructure:"hostname"`
	Shield              string   `mapstructure:"shield"`
	UseSSL              bool     `mapstructure:"use_ssl"`
	SSLCheckCert        bool     `mapstructure:"ssl_check_cert"`
	SSLCACert           string   `mapstructure:"ssl_ca_cert"`
	SSLClientCert       string   `mapstructure:"ssl_client_cert"`
	SSLClientKey        string   `mapstructure:"ssl_client_key"`
	SSLHostname         string   `mapstructure:"ssl_hostname"`
	SSLCertHostname     string   `mapstructure:"ssl_cert_hostname"`
	SSLSNIHostname      string   `mapstructure:"ssl_sni_hostname"`
	MinTLSVersion       string   `mapstructure:"min_tls_version"`
	MaxTLSVersion       string   `mapstructure:"max_tls_version"`
	SSLCiphers          []string `mapstructure:"ssl_ciphers"`
}

Backend represents a backend response from the Fastly API.

type BigQuery added in v0.4.3

type BigQuery struct {
	ServiceID         string `mapstructure:"service_id"`
	Name              string `mapstructure:"name"`
	Format            string `mapstructure:"format"`
	User              string `mapstructure:"user"`
	ProjectID         string `mapstructure:"project_id"`
	Dataset           string `mapstructure:"dataset"`
	Table             string `mapstructure:"table"`
	Template          string `mapstructure:"template_suffix"`
	SecretKey         string `mapstructure:"secret_key"`
	CreatedAt         string `mapstructure:"created_at"`
	UpdatedAt         string `mapstructure:"updated_at"`
	DeletedAt         string `mapstructure:"deleted_at"`
	ResponseCondition string `mapstructure:"response_condition"`
	Placement         string `mapstructure:"placement"`
}

BigQuery represents a BigQuery logging response from the Fastly API.

type Billing

type Billing struct {
	InvoiceID string         `mapstructure:"invoice_id"`
	StartTime *time.Time     `mapstructure:"start_time"`
	EndTime   *time.Time     `mapstructure:"end_time"`
	Status    *BillingStatus `mapstructure:"status"`
	Total     *BillingTotal  `mapstructure:"total"`
}

Billing is the top-level representation of a billing response from the Fastly API.

type BillingExtra

type BillingExtra struct {
	Name      string  `mapstructure:"name"`
	Setup     float64 `mapstructure:"setup"`
	Recurring float64 `mapstructure:"recurring"`
}

BillingExtra is a representation of extras (such as SSL addons) from the Fastly API.

type BillingStatus

type BillingStatus struct {
	InvoiceID string     `mapstructure:"invoice_id"`
	Status    string     `mapstructure:"status"`
	SentAt    *time.Time `mapstructure:"sent_at"`
}

BillingStatus is a representation of the status of the bill from the Fastly API.

type BillingTotal

type BillingTotal struct {
	PlanName           string          `mapstructure:"plan_name"`
	PlanCode           string          `mapstructure:"plan_code"`
	PlanMinimum        string          `mapstructure:"plan_minimum"`
	Bandwidth          float64         `mapstructure:"bandwidth"`
	BandwidthCost      float64         `mapstructure:"bandwidth_cost"`
	Requests           uint64          `mapstructure:"requests"`
	RequestsCost       float64         `mapstructure:"requests_cost"`
	IncurredCost       float64         `mapstructure:"incurred_cost"`
	Overage            float64         `mapstructure:"overage"`
	Extras             []*BillingExtra `mapstructure:"extras"`
	ExtrasCost         float64         `mapstructure:"extras_cost"`
	CostBeforeDiscount float64         `mapstructure:"cost_before_discount"`
	Discount           float64         `mapstructure:"discount"`
	Cost               float64         `mapstructure:"cost"`
	Terms              string          `mapstructure:"terms"`
}

BillingTotal is a repsentation of the status of the usage for this bill from the Fastly API.

type BlobStorage added in v0.4.3

type BlobStorage struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Path              string     `mapstructure:"path"`
	AccountName       string     `mapstructure:"account_name"`
	Container         string     `mapstructure:"container"`
	SASToken          string     `mapstructure:"sas_token"`
	Period            uint       `mapstructure:"period"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	GzipLevel         uint       `mapstructure:"gzip_level"`
	PublicKey         string     `mapstructure:"public_key"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	MessageType       string     `mapstructure:"message_type"`
	Placement         string     `mapstructure:"placement"`
	ResponseCondition string     `mapstructure:"response_condition"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

BlobStorage represents a blob storage response from the Fastly API.

type CacheSetting

type CacheSetting struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name           string             `mapstructure:"name"`
	Action         CacheSettingAction `mapstructure:"action"`
	TTL            uint               `mapstructure:"ttl"`
	StaleTTL       uint               `mapstructure:"stale_ttl"`
	CacheCondition string             `mapstructure:"cache_condition"`
}

CacheSetting represents a response from Fastly's API for cache settings.

type CacheSettingAction

type CacheSettingAction string

CacheSettingAction is the type of cache action.

const (
	// CacheSettingActionCache sets the cache to cache.
	CacheSettingActionCache CacheSettingAction = "cache"

	// CacheSettingActionPass sets the cache to pass through.
	CacheSettingActionPass CacheSettingAction = "pass"

	// CacheSettingActionRestart sets the cache to restart the request.
	CacheSettingActionRestart CacheSettingAction = "restart"
)

type Client

type Client struct {
	// Address is the address of Fastly's API endpoint.
	Address string

	// HTTPClient is the HTTP client to use. If one is not provided, a default
	// client will be used.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client is the main entrypoint to the Fastly golang API library.

func DefaultClient

func DefaultClient() *Client

DefaultClient instantiates a new Fastly API client. This function requires the environment variable `FASTLY_API_KEY` is set and contains a valid API key to authenticate with Fastly.

func NewClient

func NewClient(key string) (*Client, error)

NewClient creates a new API client with the given key and the default API endpoint. Because Fastly allows some requests without an API key, this function will not error if the API token is not supplied. Attempts to make a request that requires an API key will return a 403 response.

func NewClientForEndpoint

func NewClientForEndpoint(key string, endpoint string) (*Client, error)

NewClientForEndpoint creates a new API client with the given key and API endpoint. Because Fastly allows some requests without an API key, this function will not error if the API token is not supplied. Attempts to make a request that requires an API key will return a 403 response.

func (*Client) ActivateVCL

func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error)

ActivateVCL creates a new Fastly VCL.

func (*Client) ActivateVersion

func (c *Client) ActivateVersion(i *ActivateVersionInput) (*Version, error)

ActivateVersion activates the given version.

func (*Client) CloneVersion

func (c *Client) CloneVersion(i *CloneVersionInput) (*Version, error)

CloneVersion creates a clone of the version with and returns a new configuration version with all the same configuration options, but an incremented number.

func (*Client) CreateACL added in v0.4.0

func (c *Client) CreateACL(i *CreateACLInput) (*ACL, error)

func (*Client) CreateACLEntry added in v0.4.0

func (c *Client) CreateACLEntry(i *CreateACLEntryInput) (*ACLEntry, error)

CreateACLEntry creates and returns a new ACL entry.

func (*Client) CreateBackend

func (c *Client) CreateBackend(i *CreateBackendInput) (*Backend, error)

CreateBackend creates a new Fastly backend.

func (*Client) CreateBigQuery added in v0.4.3

func (c *Client) CreateBigQuery(i *CreateBigQueryInput) (*BigQuery, error)

CreateBigQuery creates a new Fastly BigQuery logging endpoint.

func (*Client) CreateBlobStorage added in v0.4.3

func (c *Client) CreateBlobStorage(i *CreateBlobStorageInput) (*BlobStorage, error)

CreateBlobStorage creates a new Fastly blob storage.

func (*Client) CreateCacheSetting

func (c *Client) CreateCacheSetting(i *CreateCacheSettingInput) (*CacheSetting, error)

CreateCacheSetting creates a new Fastly cache setting.

func (*Client) CreateCondition

func (c *Client) CreateCondition(i *CreateConditionInput) (*Condition, error)

CreateCondition creates a new Fastly condition.

func (*Client) CreateDictionary

func (c *Client) CreateDictionary(i *CreateDictionaryInput) (*Dictionary, error)

CreateDictionary creates a new Fastly dictionary.

func (*Client) CreateDictionaryItem

func (c *Client) CreateDictionaryItem(i *CreateDictionaryItemInput) (*DictionaryItem, error)

CreateDictionaryItem creates a new Fastly dictionary item.

func (*Client) CreateDictionaryItems added in v0.4.3

func (c *Client) CreateDictionaryItems(i []CreateDictionaryItemInput) ([]DictionaryItem, error)

CreateDictionaryItems creates new Fastly dictionary items from a slice.

func (*Client) CreateDirector

func (c *Client) CreateDirector(i *CreateDirectorInput) (*Director, error)

CreateDirector creates a new Fastly director.

func (*Client) CreateDirectorBackend

func (c *Client) CreateDirectorBackend(i *CreateDirectorBackendInput) (*DirectorBackend, error)

CreateDirectorBackend creates a new Fastly backend.

func (*Client) CreateDomain

func (c *Client) CreateDomain(i *CreateDomainInput) (*Domain, error)

CreateDomain creates a new domain with the given information.

func (*Client) CreateFTP

func (c *Client) CreateFTP(i *CreateFTPInput) (*FTP, error)

CreateFTP creates a new Fastly FTP.

func (*Client) CreateGCS

func (c *Client) CreateGCS(i *CreateGCSInput) (*GCS, error)

CreateGCS creates a new Fastly GCS.

func (*Client) CreateGzip

func (c *Client) CreateGzip(i *CreateGzipInput) (*Gzip, error)

CreateGzip creates a new Fastly Gzip.

func (*Client) CreateHeader

func (c *Client) CreateHeader(i *CreateHeaderInput) (*Header, error)

CreateHeader creates a new Fastly header.

func (*Client) CreateHealthCheck

func (c *Client) CreateHealthCheck(i *CreateHealthCheckInput) (*HealthCheck, error)

CreateHealthCheck creates a new Fastly health check.

func (*Client) CreateLogentries

func (c *Client) CreateLogentries(i *CreateLogentriesInput) (*Logentries, error)

CreateLogentries creates a new Fastly logentries.

func (*Client) CreateOWASP added in v0.4.3

func (c *Client) CreateOWASP(i *CreateOWASPInput) (*OWASP, error)

CreateOWASP creates an OWASP settings object for a service firewall object.

func (*Client) CreatePapertrail

func (c *Client) CreatePapertrail(i *CreatePapertrailInput) (*Papertrail, error)

CreatePapertrail creates a new Fastly papertrail.

func (*Client) CreateRequestSetting

func (c *Client) CreateRequestSetting(i *CreateRequestSettingInput) (*RequestSetting, error)

CreateRequestSetting creates a new Fastly request settings.

func (*Client) CreateResponseObject

func (c *Client) CreateResponseObject(i *CreateResponseObjectInput) (*ResponseObject, error)

CreateResponseObject creates a new Fastly response object.

func (*Client) CreateS3

func (c *Client) CreateS3(i *CreateS3Input) (*S3, error)

CreateS3 creates a new Fastly S3.

func (*Client) CreateService

func (c *Client) CreateService(i *CreateServiceInput) (*Service, error)

CreateService creates a new service with the given information.

func (*Client) CreateSnippet added in v0.4.3

func (c *Client) CreateSnippet(i *CreateSnippetInput) (*Snippet, error)

CreateSnippet creates a new snippet or dynamic snippet on a unlocked version

func (*Client) CreateSplunk added in v0.4.3

func (c *Client) CreateSplunk(i *CreateSplunkInput) (*Splunk, error)

CreateSplunk creates a new Fastly splunk.

func (*Client) CreateSumologic

func (c *Client) CreateSumologic(i *CreateSumologicInput) (*Sumologic, error)

CreateSumologic creates a new Fastly sumologic.

func (*Client) CreateSyslog

func (c *Client) CreateSyslog(i *CreateSyslogInput) (*Syslog, error)

CreateSyslog creates a new Fastly syslog.

func (*Client) CreateVCL

func (c *Client) CreateVCL(i *CreateVCLInput) (*VCL, error)

CreateVCL creates a new Fastly VCL.

func (*Client) CreateVersion

func (c *Client) CreateVersion(i *CreateVersionInput) (*Version, error)

CreateVersion constructs a new version. Note that `CloneVersion` is preferred in almost all scenarios, since `Create()` creates a _blank_ configuration where `Clone()` builds off of an existing configuration.

func (*Client) CreateWAF added in v0.4.2

func (c *Client) CreateWAF(i *CreateWAFInput) (*WAF, error)

CreateWAF creates a new Fastly WAF.

func (*Client) DeactivateVersion

func (c *Client) DeactivateVersion(i *DeactivateVersionInput) (*Version, error)

DeactivateVersion deactivates the given version.

func (*Client) Delete

func (c *Client) Delete(p string, ro *RequestOptions) (*http.Response, error)

Delete issues an HTTP DELETE request.

func (*Client) DeleteACL added in v0.4.0

func (c *Client) DeleteACL(i *DeleteACLInput) error

DeleteACL deletes the given ACL version.

func (*Client) DeleteACLEntry added in v0.4.0

func (c *Client) DeleteACLEntry(i *DeleteACLEntryInput) error

DeleteACLEntry deletes an entry from an ACL based on its ID

func (*Client) DeleteBackend

func (c *Client) DeleteBackend(i *DeleteBackendInput) error

DeleteBackend deletes the given backend version.

func (*Client) DeleteBigQuery added in v0.4.3

func (c *Client) DeleteBigQuery(i *DeleteBigQueryInput) error

DeleteBigQuery deletes the given BigQuery logging endpoint.

func (*Client) DeleteBlobStorage added in v0.4.3

func (c *Client) DeleteBlobStorage(i *DeleteBlobStorageInput) error

DeleteBlobStorage deletes the given blob storage version.

func (*Client) DeleteCacheSetting

func (c *Client) DeleteCacheSetting(i *DeleteCacheSettingInput) error

DeleteCacheSetting deletes the given cache setting version.

func (*Client) DeleteCondition

func (c *Client) DeleteCondition(i *DeleteConditionInput) error

DeleteCondition deletes the given condition version.

func (*Client) DeleteDictionary

func (c *Client) DeleteDictionary(i *DeleteDictionaryInput) error

DeleteDictionary deletes the given dictionary version.

func (*Client) DeleteDictionaryItem

func (c *Client) DeleteDictionaryItem(i *DeleteDictionaryItemInput) error

DeleteDictionaryItem deletes the given dictionary item.

func (*Client) DeleteDirector

func (c *Client) DeleteDirector(i *DeleteDirectorInput) error

DeleteDirector deletes the given director version.

func (*Client) DeleteDirectorBackend

func (c *Client) DeleteDirectorBackend(i *DeleteDirectorBackendInput) error

DeleteDirectorBackend deletes the given backend version.

func (*Client) DeleteDomain

func (c *Client) DeleteDomain(i *DeleteDomainInput) error

DeleteDomain removes a single domain by the given name.

func (*Client) DeleteFTP

func (c *Client) DeleteFTP(i *DeleteFTPInput) error

DeleteFTP deletes the given FTP version.

func (*Client) DeleteGCS

func (c *Client) DeleteGCS(i *DeleteGCSInput) error

DeleteGCS deletes the given GCS version.

func (*Client) DeleteGzip

func (c *Client) DeleteGzip(i *DeleteGzipInput) error

DeleteGzip deletes the given Gzip version.

func (*Client) DeleteHeader

func (c *Client) DeleteHeader(i *DeleteHeaderInput) error

DeleteHeader deletes the given header version.

func (*Client) DeleteHealthCheck

func (c *Client) DeleteHealthCheck(i *DeleteHealthCheckInput) error

DeleteHealthCheck deletes the given health check.

func (*Client) DeleteLogentries

func (c *Client) DeleteLogentries(i *DeleteLogentriesInput) error

DeleteLogentries deletes the given logentries version.

func (*Client) DeletePapertrail

func (c *Client) DeletePapertrail(i *DeletePapertrailInput) error

DeletePapertrail deletes the given papertrail version.

func (*Client) DeleteRequestSetting

func (c *Client) DeleteRequestSetting(i *DeleteRequestSettingInput) error

DeleteRequestSetting deletes the given request settings version.

func (*Client) DeleteResponseObject

func (c *Client) DeleteResponseObject(i *DeleteResponseObjectInput) error

DeleteResponseObject deletes the given response object version.

func (*Client) DeleteS3

func (c *Client) DeleteS3(i *DeleteS3Input) error

DeleteS3 deletes the given S3 version.

func (*Client) DeleteService

func (c *Client) DeleteService(i *DeleteServiceInput) error

DeleteService updates the service with the given input.

func (*Client) DeleteSnippet added in v0.4.3

func (c *Client) DeleteSnippet(i *DeleteSnippetInput) error

func (*Client) DeleteSplunk added in v0.4.3

func (c *Client) DeleteSplunk(i *DeleteSplunkInput) error

DeleteSplunk deletes the given splunk version.

func (*Client) DeleteSumologic

func (c *Client) DeleteSumologic(i *DeleteSumologicInput) error

DeleteSumologic deletes the given sumologic version.

func (*Client) DeleteSyslog

func (c *Client) DeleteSyslog(i *DeleteSyslogInput) error

DeleteSyslog deletes the given syslog version.

func (*Client) DeleteVCL

func (c *Client) DeleteVCL(i *DeleteVCLInput) error

DeleteVCL deletes the given VCL version.

func (*Client) DeleteWAF added in v0.4.2

func (c *Client) DeleteWAF(i *DeleteWAFInput) error

func (*Client) EdgeCheck

func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error)

EdgeCheck queries the edge cache for all of Fastly's servers for the given URL.

func (*Client) Get

func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error)

Get issues an HTTP GET request.

func (*Client) GetACL added in v0.4.0

func (c *Client) GetACL(i *GetACLInput) (*ACL, error)

GetACL gets the ACL configuration with the given parameters.

func (*Client) GetACLEntry added in v0.4.0

func (c *Client) GetACLEntry(i *GetACLEntryInput) (*ACLEntry, error)

GetACLEntry returns a single ACL entry based on its ID.

func (*Client) GetAPIEvent added in v0.4.3

func (c *Client) GetAPIEvent(i *GetAPIEventInput) (*Event, error)

GetAPIEvent gets a specific event

func (*Client) GetAPIEvents added in v0.4.3

GetAPIEvents lists all the events for a particular customer

func (*Client) GetBackend

func (c *Client) GetBackend(i *GetBackendInput) (*Backend, error)

GetBackend gets the backend configuration with the given parameters.

func (*Client) GetBigQuery added in v0.4.3

func (c *Client) GetBigQuery(i *GetBigQueryInput) ([]*BigQuery, error)

GetBigQuery lists all BigQuerys associated with a service version.

func (*Client) GetBilling

func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error)

GetBilling returns the billing information for the current account.

func (*Client) GetBlobStorage added in v0.4.3

func (c *Client) GetBlobStorage(i *GetBlobStorageInput) (*BlobStorage, error)

GetBlobStorage gets the blob storage configuration with the given parameters.

func (*Client) GetCacheSetting

func (c *Client) GetCacheSetting(i *GetCacheSettingInput) (*CacheSetting, error)

GetCacheSetting gets the cache setting configuration with the given parameters.

func (*Client) GetCondition

func (c *Client) GetCondition(i *GetConditionInput) (*Condition, error)

GetCondition gets the condition configuration with the given parameters.

func (*Client) GetDictionary

func (c *Client) GetDictionary(i *GetDictionaryInput) (*Dictionary, error)

GetDictionary gets the dictionary configuration with the given parameters.

func (*Client) GetDictionaryItem

func (c *Client) GetDictionaryItem(i *GetDictionaryItemInput) (*DictionaryItem, error)

GetDictionaryItem gets the dictionary item with the given parameters.

func (*Client) GetDiff

func (c *Client) GetDiff(i *GetDiffInput) (*Diff, error)

GetDiff returns the diff of the given versions.

func (*Client) GetDirector

func (c *Client) GetDirector(i *GetDirectorInput) (*Director, error)

GetDirector gets the director configuration with the given parameters.

func (*Client) GetDirectorBackend

func (c *Client) GetDirectorBackend(i *GetDirectorBackendInput) (*DirectorBackend, error)

GetDirectorBackend gets the backend configuration with the given parameters.

func (*Client) GetDomain

func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error)

GetDomain retrieves information about the given domain name.

func (*Client) GetDynamicSnippet added in v0.4.3

func (c *Client) GetDynamicSnippet(i *GetDynamicSnippetInput) (*DynamicSnippet, error)

GetDynamicSnippet gets the Snippet configuration with the given parameters. This will show the current content associated with a Dynamic Snippet.

func (*Client) GetFTP

func (c *Client) GetFTP(i *GetFTPInput) (*FTP, error)

GetFTP gets the FTP configuration with the given parameters.

func (*Client) GetGCS

func (c *Client) GetGCS(i *GetGCSInput) (*GCS, error)

GetGCS gets the GCS configuration with the given parameters.

func (*Client) GetGeneratedVCL

func (c *Client) GetGeneratedVCL(i *GetGeneratedVCLInput) (*VCL, error)

GetGeneratedVCL gets the VCL configuration with the given parameters.

func (*Client) GetGzip

func (c *Client) GetGzip(i *GetGzipInput) (*Gzip, error)

GetGzip gets the Gzip configuration with the given parameters.

func (*Client) GetHeader

func (c *Client) GetHeader(i *GetHeaderInput) (*Header, error)

GetHeader gets the header configuration with the given parameters.

func (*Client) GetHealthCheck

func (c *Client) GetHealthCheck(i *GetHealthCheckInput) (*HealthCheck, error)

GetHealthCheck gets the health check configuration with the given parameters.

func (*Client) GetLogentries

func (c *Client) GetLogentries(i *GetLogentriesInput) (*Logentries, error)

GetLogentries gets the logentries configuration with the given parameters.

func (*Client) GetOWASP added in v0.4.3

func (c *Client) GetOWASP(i *GetOWASPInput) (*OWASP, error)

GetOWASP gets OWASP settings for a service firewall object.

func (*Client) GetPapertrail

func (c *Client) GetPapertrail(i *GetPapertrailInput) (*Papertrail, error)

GetPapertrail gets the papertrail configuration with the given parameters.

func (*Client) GetRegions added in v0.4.0

func (c *Client) GetRegions() (*RegionsResponse, error)

GetRegions returns a list of Fastly regions

func (*Client) GetRequestSetting

func (c *Client) GetRequestSetting(i *GetRequestSettingInput) (*RequestSetting, error)

GetRequestSetting gets the request settings configuration with the given parameters.

func (*Client) GetResponseObject

func (c *Client) GetResponseObject(i *GetResponseObjectInput) (*ResponseObject, error)

GetResponseObject gets the response object configuration with the given parameters.

func (*Client) GetRule added in v0.4.3

func (c *Client) GetRule(i *GetRuleInput) (*Rule, error)

GetRule gets a Rule using the Rule ID.

func (*Client) GetRuleVCL added in v0.4.3

func (c *Client) GetRuleVCL(i *GetRuleInput) (*RuleVCL, error)

GetRuleVCL gets the VCL for a Rule.

func (*Client) GetRules added in v0.4.3

func (c *Client) GetRules() ([]*Rule, error)

GetRules returns the list of wafs for the configuration version.

func (*Client) GetS3

func (c *Client) GetS3(i *GetS3Input) (*S3, error)

GetS3 gets the S3 configuration with the given parameters.

func (*Client) GetService

func (c *Client) GetService(i *GetServiceInput) (*Service, error)

GetService retrieves the service information for the service with the given id. If no service exists for the given id, the API returns a 400 response (not a 404).

func (*Client) GetServiceDetails

func (c *Client) GetServiceDetails(i *GetServiceInput) (*ServiceDetail, error)

GetService retrieves the details for the service with the given id. If no service exists for the given id, the API returns a 400 response (not a 404).

func (*Client) GetSettings

func (c *Client) GetSettings(i *GetSettingsInput) (*Settings, error)

GetSettings gets the backend configuration with the given parameters.

func (*Client) GetSnippet added in v0.4.3

func (c *Client) GetSnippet(i *GetSnippetInput) (*Snippet, error)

GetSnippet gets the Snippet configuration with the given parameters. Dynamic Snippets will not show content due to them being versionless, use GetDynamicSnippet to see content.

func (*Client) GetSplunk added in v0.4.3

func (c *Client) GetSplunk(i *GetSplunkInput) (*Splunk, error)

GetSplunk gets the splunk configuration with the given parameters.

func (*Client) GetStats added in v0.4.0

func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error)

GetStats returns stats data based on GetStatsInput

func (*Client) GetSumologic

func (c *Client) GetSumologic(i *GetSumologicInput) (*Sumologic, error)

GetSumologic gets the sumologic configuration with the given parameters.

func (*Client) GetSyslog

func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error)

GetSyslog gets the syslog configuration with the given parameters.

func (*Client) GetUsage added in v0.4.0

func (c *Client) GetUsage(i *GetUsageInput) (*UsageResponse, error)

GetUsage returns usage information aggregated across all Fastly services and grouped by region.

func (*Client) GetUsageByService added in v0.4.0

func (c *Client) GetUsageByService(i *GetUsageInput) (*UsageByServiceResponse, error)

GetUsageByService returns usage information aggregated by service and grouped by service and region.

func (*Client) GetVCL

func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error)

GetVCL gets the VCL configuration with the given parameters.

func (*Client) GetVersion

func (c *Client) GetVersion(i *GetVersionInput) (*Version, error)

GetVersion fetches a version with the given information.

func (*Client) GetWAF added in v0.4.2

func (c *Client) GetWAF(i *GetWAFInput) (*WAF, error)

func (*Client) GetWAFRuleRuleSets added in v0.4.3

func (c *Client) GetWAFRuleRuleSets(i *GetWAFRuleRuleSetsInput) (*Ruleset, error)

GetWAFRuleRuleSets gets the VCL for rulesets associated with a firewall WAF.

func (*Client) GetWAFRuleStatus added in v0.4.3

func (c *Client) GetWAFRuleStatus(i *GetWAFRuleStatusInput) (WAFRuleStatus, error)

GetWAFRuleStatus fetches the status of a single rule associated with a WAF.

func (*Client) GetWAFRuleStatuses added in v0.4.3

func (c *Client) GetWAFRuleStatuses(i *GetWAFRuleStatusesInput) (GetWAFRuleStatusesResponse, error)

GetWAFRuleStatuses fetches the status of a subset of rules associated with a WAF.

func (*Client) GetWAFRuleVCL added in v0.4.3

func (c *Client) GetWAFRuleVCL(i *GetWAFRuleVCLInput) (*RuleVCL, error)

GetWAFRuleVCL gets the VCL for a role associated with a firewall WAF.

func (*Client) Head

func (c *Client) Head(p string, ro *RequestOptions) (*http.Response, error)

Head issues an HTTP HEAD request.

func (*Client) IPs

func (c *Client) IPs() (IPAddrs, error)

IPs returns the list of public IP addresses for Fastly's network.

func (*Client) LatestVersion

func (c *Client) LatestVersion(i *LatestVersionInput) (*Version, error)

LatestVersion fetches the latest version. If there are no versions, this function will return nil (but not an error).

func (*Client) ListACLEntries added in v0.4.0

func (c *Client) ListACLEntries(i *ListACLEntriesInput) ([]*ACLEntry, error)

ListACLEntries return a list of entries for an ACL

func (*Client) ListACLs added in v0.4.0

func (c *Client) ListACLs(i *ListACLsInput) ([]*ACL, error)

ListACLs returns the list of ACLs for the configuration version.

func (*Client) ListBackends

func (c *Client) ListBackends(i *ListBackendsInput) ([]*Backend, error)

ListBackends returns the list of backends for the configuration version.

func (*Client) ListBlobStorages added in v0.4.3

func (c *Client) ListBlobStorages(i *ListBlobStoragesInput) ([]*BlobStorage, error)

ListBlobStorages returns the list of blob storages for the configuration version.

func (*Client) ListCacheSettings

func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error)

ListCacheSettings returns the list of cache settings for the configuration version.

func (*Client) ListConditions

func (c *Client) ListConditions(i *ListConditionsInput) ([]*Condition, error)

ListConditions returns the list of conditions for the configuration version.

func (*Client) ListDictionaries

func (c *Client) ListDictionaries(i *ListDictionariesInput) ([]*Dictionary, error)

ListDictionaries returns the list of dictionaries for the configuration version.

func (*Client) ListDictionaryItems

func (c *Client) ListDictionaryItems(i *ListDictionaryItemsInput) ([]*DictionaryItem, error)

ListDictionaryItems returns the list of dictionary items for the configuration version.

func (*Client) ListDirectors

func (c *Client) ListDirectors(i *ListDirectorsInput) ([]*Director, error)

ListDirectors returns the list of directors for the configuration version.

func (*Client) ListDomains

func (c *Client) ListDomains(i *ListDomainsInput) ([]*Domain, error)

ListDomains returns the list of domains for this Service.

func (*Client) ListFTPs

func (c *Client) ListFTPs(i *ListFTPsInput) ([]*FTP, error)

ListFTPs returns the list of ftps for the configuration version.

func (*Client) ListGCSs

func (c *Client) ListGCSs(i *ListGCSsInput) ([]*GCS, error)

ListGCSs returns the list of gcses for the configuration version.

func (*Client) ListGzips

func (c *Client) ListGzips(i *ListGzipsInput) ([]*Gzip, error)

ListGzips returns the list of gzips for the configuration version.

func (*Client) ListHeaders

func (c *Client) ListHeaders(i *ListHeadersInput) ([]*Header, error)

ListHeaders returns the list of headers for the configuration version.

func (*Client) ListHealthChecks

func (c *Client) ListHealthChecks(i *ListHealthChecksInput) ([]*HealthCheck, error)

ListHealthChecks returns the list of health checks for the configuration version.

func (*Client) ListLogentries

func (c *Client) ListLogentries(i *ListLogentriesInput) ([]*Logentries, error)

ListLogentries returns the list of logentries for the configuration version.

func (*Client) ListPapertrails

func (c *Client) ListPapertrails(i *ListPapertrailsInput) ([]*Papertrail, error)

ListPapertrails returns the list of papertrails for the configuration version.

func (*Client) ListRequestSettings

func (c *Client) ListRequestSettings(i *ListRequestSettingsInput) ([]*RequestSetting, error)

ListRequestSettings returns the list of request settings for the configuration version.

func (*Client) ListResponseObjects

func (c *Client) ListResponseObjects(i *ListResponseObjectsInput) ([]*ResponseObject, error)

ListResponseObjects returns the list of response objects for the configuration version.

func (*Client) ListS3s

func (c *Client) ListS3s(i *ListS3sInput) ([]*S3, error)

ListS3s returns the list of S3s for the configuration version.

func (*Client) ListServiceDomains added in v0.4.3

func (c *Client) ListServiceDomains(i *ListServiceDomainInput) (ServiceDomainsList, error)

ListServiceDomains lists all domains associated with a given service

func (*Client) ListServices

func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error)

ListServices returns the full list of services for the current account.

func (*Client) ListSnippets added in v0.4.3

func (c *Client) ListSnippets(i *ListSnippetsInput) ([]*Snippet, error)

ListSnippets returns the list of Snippets for the configuration version. Content is not displayed for Dynmanic Snippets due to them being versionless, use the GetDynamicSnippet function to show current content.

func (*Client) ListSplunks added in v0.4.3

func (c *Client) ListSplunks(i *ListSplunksInput) ([]*Splunk, error)

ListSplunks returns the list of splunks for the configuration version.

func (*Client) ListSumologics

func (c *Client) ListSumologics(i *ListSumologicsInput) ([]*Sumologic, error)

ListSumologics returns the list of sumologics for the configuration version.

func (*Client) ListSyslogs

func (c *Client) ListSyslogs(i *ListSyslogsInput) ([]*Syslog, error)

ListSyslogs returns the list of syslogs for the configuration version.

func (*Client) ListVCLs

func (c *Client) ListVCLs(i *ListVCLsInput) ([]*VCL, error)

ListVCLs returns the list of VCLs for the configuration version.

func (*Client) ListVersions

func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error)

ListVersions returns the full list of all versions of the given service.

func (*Client) ListWAFs added in v0.4.2

func (c *Client) ListWAFs(i *ListWAFsInput) ([]*WAF, error)

ListWAFs returns the list of wafs for the configuration version.

func (*Client) LockVersion

func (c *Client) LockVersion(i *LockVersionInput) (*Version, error)

LockVersion locks the specified version.

func (*Client) Patch added in v0.4.2

func (c *Client) Patch(p string, ro *RequestOptions) (*http.Response, error)

Patch issues an HTTP PATCH request.

func (*Client) PatchForm added in v0.4.2

func (c *Client) PatchForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchForm issues an HTTP PUT request with the given interface form-encoded.

func (*Client) PatchJSON added in v0.4.2

func (c *Client) PatchJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchJSON issues an HTTP PUT request with the given interface json-encoded.

func (*Client) PatchJSONAPI added in v0.4.2

func (c *Client) PatchJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchJSONAPI issues an HTTP PUT request with the given interface json-encoded.

func (*Client) Post

func (c *Client) Post(p string, ro *RequestOptions) (*http.Response, error)

Post issues an HTTP POST request.

func (*Client) PostForm

func (c *Client) PostForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostForm issues an HTTP POST request with the given interface form-encoded.

func (*Client) PostJSON added in v0.4.2

func (c *Client) PostJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostJSON issues an HTTP POST request with the given interface json-encoded.

func (*Client) PostJSONAPI added in v0.4.2

func (c *Client) PostJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostJSONAPI issues an HTTP POST request with the given interface json-encoded.

func (*Client) Purge

func (c *Client) Purge(i *PurgeInput) (*Purge, error)

Purge instantly purges an individual URL.

func (*Client) PurgeAll

func (c *Client) PurgeAll(i *PurgeAllInput) (*Purge, error)

PurgeAll instantly purges everything from a service.

func (*Client) PurgeKey

func (c *Client) PurgeKey(i *PurgeKeyInput) (*Purge, error)

PurgeKey instantly purges a particular service of items tagged with a key.

func (*Client) Put

func (c *Client) Put(p string, ro *RequestOptions) (*http.Response, error)

Put issues an HTTP PUT request.

func (*Client) PutForm

func (c *Client) PutForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutForm issues an HTTP PUT request with the given interface form-encoded.

func (*Client) PutJSON added in v0.4.2

func (c *Client) PutJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutJSON issues an HTTP PUT request with the given interface json-encoded.

func (*Client) PutJSONAPI added in v0.4.2

func (c *Client) PutJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutJSONAPI issues an HTTP PUT request with the given interface json-encoded.

func (*Client) RawRequest

func (c *Client) RawRequest(verb, p string, ro *RequestOptions) (*http.Request, error)

RawRequest accepts a verb, URL, and RequestOptions struct and returns the constructed http.Request and any errors that occurred

func (*Client) Request

func (c *Client) Request(verb, p string, ro *RequestOptions) (*http.Response, error)

Request makes an HTTP request against the HTTPClient using the given verb, Path, and request options.

func (*Client) RequestForm

func (c *Client) RequestForm(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

RequestForm makes an HTTP request with the given interface being encoded as form data.

func (*Client) RequestJSON added in v0.4.2

func (c *Client) RequestJSON(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

func (*Client) RequestJSONAPI added in v0.4.2

func (c *Client) RequestJSONAPI(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

func (*Client) SearchService

func (c *Client) SearchService(i *SearchServiceInput) (*Service, error)

SearchService gets a specific service by name. If no service exists by that name, the API returns a 400 response (not a 404).

func (*Client) SimpleGet added in v0.4.3

func (c *Client) SimpleGet(target string) (*http.Response, error)

SimpleGet combines the RawRequest and Request methods, but doesn't add any parameters or change any encoding in the URL passed to it. It's mostly for calling the URLs given to us directly from Fastly without mangling them.

func (*Client) UpdateACL added in v0.4.0

func (c *Client) UpdateACL(i *UpdateACLInput) (*ACL, error)

UpdateACL updates the name of the ACL with the given parameters.

func (*Client) UpdateACLEntry added in v0.4.0

func (c *Client) UpdateACLEntry(i *UpdateACLEntryInput) (*ACLEntry, error)

UpdateACLEntry updates an ACL entry

func (*Client) UpdateBackend

func (c *Client) UpdateBackend(i *UpdateBackendInput) (*Backend, error)

UpdateBackend updates a specific backend.

func (*Client) UpdateBigQuery added in v0.4.3

func (c *Client) UpdateBigQuery(i *UpdateBigQueryInput) (*BigQuery, error)

UpdateBigQuery updates a BigQuery logging endpoint.

func (*Client) UpdateBlobStorage added in v0.4.3

func (c *Client) UpdateBlobStorage(i *UpdateBlobStorageInput) (*BlobStorage, error)

UpdateBlobStorage updates a specific blob storage.

func (*Client) UpdateCacheSetting

func (c *Client) UpdateCacheSetting(i *UpdateCacheSettingInput) (*CacheSetting, error)

UpdateCacheSetting updates a specific cache setting.

func (*Client) UpdateCondition

func (c *Client) UpdateCondition(i *UpdateConditionInput) (*Condition, error)

UpdateCondition updates a specific condition.

func (*Client) UpdateDictionary

func (c *Client) UpdateDictionary(i *UpdateDictionaryInput) (*Dictionary, error)

UpdateDictionary updates a specific dictionary.

func (*Client) UpdateDictionaryItem

func (c *Client) UpdateDictionaryItem(i *UpdateDictionaryItemInput) (*DictionaryItem, error)

UpdateDictionaryItem updates a specific dictionary item.

func (*Client) UpdateDirector

func (c *Client) UpdateDirector(i *UpdateDirectorInput) (*Director, error)

UpdateDirector updates a specific director.

func (*Client) UpdateDomain

func (c *Client) UpdateDomain(i *UpdateDomainInput) (*Domain, error)

UpdateDomain updates a single domain for the current service. The only allowed parameters are `Name` and `Comment`.

func (*Client) UpdateDynamicSnippet added in v0.4.3

func (c *Client) UpdateDynamicSnippet(i *UpdateDynamicSnippetInput) (*DynamicSnippet, error)

UpdateDynamicSnippet replaces the content of a Dynamic Snippet

func (*Client) UpdateFTP

func (c *Client) UpdateFTP(i *UpdateFTPInput) (*FTP, error)

UpdateFTP updates a specific FTP.

func (*Client) UpdateGCS

func (c *Client) UpdateGCS(i *UpdateGCSInput) (*GCS, error)

UpdateGCS updates a specific GCS.

func (*Client) UpdateGzip

func (c *Client) UpdateGzip(i *UpdateGzipInput) (*Gzip, error)

UpdateGzip updates a specific Gzip.

func (*Client) UpdateHeader

func (c *Client) UpdateHeader(i *UpdateHeaderInput) (*Header, error)

UpdateHeader updates a specific header.

func (*Client) UpdateHealthCheck

func (c *Client) UpdateHealthCheck(i *UpdateHealthCheckInput) (*HealthCheck, error)

UpdateHealthCheck updates a specific health check.

func (*Client) UpdateLogentries

func (c *Client) UpdateLogentries(i *UpdateLogentriesInput) (*Logentries, error)

UpdateLogentries updates a specific logentries.

func (*Client) UpdateOWASP added in v0.4.3

func (c *Client) UpdateOWASP(i *UpdateOWASPInput) (*OWASP, error)

CreateOWASP creates an OWASP settings object for a service firewall object.

func (*Client) UpdatePapertrail

func (c *Client) UpdatePapertrail(i *UpdatePapertrailInput) (*Papertrail, error)

UpdatePapertrail updates a specific papertrail.

func (*Client) UpdateRequestSetting

func (c *Client) UpdateRequestSetting(i *UpdateRequestSettingInput) (*RequestSetting, error)

UpdateRequestSetting updates a specific request settings.

func (*Client) UpdateResponseObject

func (c *Client) UpdateResponseObject(i *UpdateResponseObjectInput) (*ResponseObject, error)

UpdateResponseObject updates a specific response object.

func (*Client) UpdateS3

func (c *Client) UpdateS3(i *UpdateS3Input) (*S3, error)

UpdateS3 updates a specific S3.

func (*Client) UpdateService

func (c *Client) UpdateService(i *UpdateServiceInput) (*Service, error)

UpdateService updates the service with the given input.

func (*Client) UpdateSettings

func (c *Client) UpdateSettings(i *UpdateSettingsInput) (*Settings, error)

UpdateSettings updates a specific backend.

func (*Client) UpdateSnippet added in v0.4.3

func (c *Client) UpdateSnippet(i *UpdateSnippetInput) (*Snippet, error)

UpdateSnippet updates a snippet on a unlocked version

func (*Client) UpdateSplunk added in v0.4.3

func (c *Client) UpdateSplunk(i *UpdateSplunkInput) (*Splunk, error)

UpdateSplunk updates a specific splunk.

func (*Client) UpdateSumologic

func (c *Client) UpdateSumologic(i *UpdateSumologicInput) (*Sumologic, error)

UpdateSumologic updates a specific sumologic.

func (*Client) UpdateSyslog

func (c *Client) UpdateSyslog(i *UpdateSyslogInput) (*Syslog, error)

UpdateSyslog updates a specific syslog.

func (*Client) UpdateVCL

func (c *Client) UpdateVCL(i *UpdateVCLInput) (*VCL, error)

UpdateVCL creates a new Fastly VCL.

func (*Client) UpdateVersion

func (c *Client) UpdateVersion(i *UpdateVersionInput) (*Version, error)

UpdateVersion updates the given version

func (*Client) UpdateWAF added in v0.4.2

func (c *Client) UpdateWAF(i *UpdateWAFInput) (*WAF, error)

UpdateWAF updates a specific WAF.

func (*Client) UpdateWAFConfigSet added in v0.4.3

func (c *Client) UpdateWAFConfigSet(i *UpdateWAFConfigSetInput) (UpdateWAFConfigSetResponse, error)

UpdateWAFConfigSet updates a list of WAFs with the given configset

func (*Client) UpdateWAFRuleSets added in v0.4.3

func (c *Client) UpdateWAFRuleSets(i *UpdateWAFRuleRuleSetsInput) (*Ruleset, error)

UpdateWAFRuleSets updates the rulesets for a role associated with a firewall WAF.

func (*Client) UpdateWAFRuleStatus added in v0.4.3

func (c *Client) UpdateWAFRuleStatus(i *UpdateWAFRuleStatusInput) (WAFRuleStatus, error)

UpdateWAFRuleStatus changes the status of a single rule associated with a WAF.

func (*Client) UpdateWAFRuleTagStatus added in v0.4.3

func (c *Client) UpdateWAFRuleTagStatus(input *UpdateWAFRuleTagStatusInput) (GetWAFRuleStatusesResponse, error)

UpdateWAFRuleTagStatus changes the status of a single rule associated with a WAF. NOTE: This call currently appears to return *all* rules attached to the WAF, rather than just the ones that were modified by the call.

func (*Client) ValidateVersion

func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error)

ValidateVersion validates if the given version is okay.

type CloneVersionInput

type CloneVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

CloneVersionInput is the input to the CloneVersion function.

type Compatibool

type Compatibool bool

Compatibool is a boolean value that marshalls to 0/1 instead of true/false for compatability with Fastly's API.

func CBool

func CBool(b bool) *Compatibool

Helper function to get a pointer to bool

func (Compatibool) MarshalText

func (b Compatibool) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Compatibool) UnmarshalText

func (b *Compatibool) UnmarshalText(t []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Condition

type Condition struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name      string `mapstructure:"name"`
	Comment   string `mapstructure:"comment"`
	Statement string `mapstructure:"statement"`
	Type      string `mapstructure:"type"`
	Priority  int    `mapstructure:"priority"`
}

Condition represents a condition response from the Fastly API.

type ConfigSetWAFs added in v0.4.3

type ConfigSetWAFs struct {
	ID string `jsonapi:"primary,waf"`
}

ConfigSetWAFs used to store the ID of a WAF needed to update config set relationships

type CreateACLEntryInput added in v0.4.0

type CreateACLEntryInput struct {
	// Required fields
	Service string
	ACL     string
	IP      string `form:"ip"`

	// Optional fields
	Subnet  string `form:"subnet,omitempty"`
	Negated bool   `form:"negated,omitempty"`
	Comment string `form:"comment,omitempty"`
}

CreateACLEntryInput the input parameter to CreateACLEntry function.

type CreateACLInput added in v0.4.0

type CreateACLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the ACL to create (required)
	Name string `form:"name"`
}

CreateACLInput is used as input to the CreateACL function.

type CreateBackendInput

type CreateBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name                string       `form:"name,omitempty"`
	Comment             string       `form:"comment,omitempty"`
	Address             string       `form:"address,omitempty"`
	Port                uint         `form:"port,omitempty"`
	ConnectTimeout      uint         `form:"connect_timeout,omitempty"`
	MaxConn             uint         `form:"max_conn,omitempty"`
	ErrorThreshold      uint         `form:"error_threshold,omitempty"`
	FirstByteTimeout    uint         `form:"first_byte_timeout,omitempty"`
	BetweenBytesTimeout uint         `form:"between_bytes_timeout,omitempty"`
	AutoLoadbalance     *Compatibool `form:"auto_loadbalance,omitempty"`
	Weight              uint         `form:"weight,omitempty"`
	RequestCondition    string       `form:"request_condition,omitempty"`
	HealthCheck         string       `form:"healthcheck,omitempty"`
	Shield              string       `form:"shield,omitempty"`
	UseSSL              *Compatibool `form:"use_ssl,omitempty"`
	SSLCheckCert        *Compatibool `form:"ssl_check_cert,omitempty"`
	SSLCACert           string       `form:"ssl_ca_cert,omitempty"`
	SSLClientCert       string       `form:"ssl_client_cert,omitempty"`
	SSLClientKey        string       `form:"ssl_client_key,omitempty"`
	SSLHostname         string       `form:"ssl_hostname,omitempty"`
	SSLCertHostname     string       `form:"ssl_cert_hostname,omitempty"`
	SSLSNIHostname      string       `form:"ssl_sni_hostname,omitempty"`
	MinTLSVersion       string       `form:"min_tls_version,omitempty"`
	MaxTLSVersion       string       `form:"max_tls_version,omitempty"`
	SSLCiphers          []string     `form:"ssl_ciphers,omitempty"`
}

CreateBackendInput is used as input to the CreateBackend function.

type CreateBigQueryInput added in v0.4.3

type CreateBigQueryInput struct {
	// All fields other than format are required.
	// Service is the ID of the service.
	Service string

	//Version is the specific configuration version.
	Version int

	// Name is the name if your bigquery logging endpoint.
	Name string

	// Project ID your GCP project ID.
	ProjectID string

	// Dataset is your BigQuery dataset.
	Dataset string

	// Table is your BigQuery table.
	Table string

	// Template is your BigQuery template suffix.
	Template string

	// User is the user with access to write to your BigQuery dataset.
	User string

	// Secret key is the user's secret key.
	SecretKey string

	// Format is the log formatting desired for your BigQuery dataset.
	// Optional.
	Format string

	// ResponseCondition allows you to attach a response condition to your BigQuery logging endpoint.
	// Optional.
	ResponseCondition string

	// Placement is the log placement desired for your BigQuery logging endpoint.
	// Optional.
	Placement string
}

CreateBigQueryInput is used as input to the CreateBigQuery function.

type CreateBlobStorageInput added in v0.4.3

type CreateBlobStorageInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string `form:"name,omitempty"`
	Path              string `form:"path,omitempty"`
	AccountName       string `form:"account_name,omitempty"`
	Container         string `form:"container,omitempty"`
	SASToken          string `form:"sas_token,omitempty"`
	Period            uint   `form:"period,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	GzipLevel         uint   `form:"gzip_level,omitempty"`
	PublicKey         string `form:"public_key,omitempty"`
	Format            string `form:"format,omitempty"`
	FormatVersion     uint   `form:"format_version,omitempty"`
	MessageType       string `form:"message_type,omitempty"`
	Placement         string `form:"placement,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
}

CreateBlobStorageInput is used as input to the CreateBlobStorage function.

type CreateCacheSettingInput

type CreateCacheSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name           string             `form:"name,omitempty"`
	Action         CacheSettingAction `form:"action,omitempty"`
	TTL            uint               `form:"ttl,omitempty"`
	StaleTTL       uint               `form:"stale_ttl,omitempty"`
	CacheCondition string             `form:"cache_condition,omitempty"`
}

CreateCacheSettingInput is used as input to the CreateCacheSetting function.

type CreateConditionInput

type CreateConditionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name      string `form:"name,omitempty"`
	Statement string `form:"statement,omitempty"`
	Type      string `form:"type,omitempty"`
	Priority  int    `form:"priority,omitempty"`
}

CreateConditionInput is used as input to the CreateCondition function.

type CreateDictionaryInput

type CreateDictionaryInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name      string       `form:"name,omitempty"`
	WriteOnly *Compatibool `form:"write_only,omitempty"`
}

CreateDictionaryInput is used as input to the CreateDictionary function.

type CreateDictionaryItemInput

type CreateDictionaryItemInput struct {
	// Service is the ID of the service. Dictionary is the ID of the dictionary.
	// Both fields are required.
	Service    string
	Dictionary string

	ItemKey   string `form:"item_key,omitempty"`
	ItemValue string `form:"item_value,omitempty"`
}

CreateDictionaryItemInput is used as input to the CreateDictionaryItem function.

type CreateDirectorBackendInput

type CreateDirectorBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

CreateDirectorBackendInput is used as input to the CreateDirectorBackend function.

type CreateDirectorInput

type CreateDirectorInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name     string       `form:"name,omitempty"`
	Comment  string       `form:"comment,omitempty"`
	Shield   string       `form:"shield,omitempty"`
	Quorum   uint         `form:"quorum,omitempty"`
	Type     DirectorType `form:"type,omitempty"`
	Retries  uint         `form:"retries,omitempty"`
	Capacity uint         `form:"capacity,omitempty"`
}

CreateDirectorInput is used as input to the CreateDirector function.

type CreateDomainInput

type CreateDomainInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the domain that the service will respond to (required).
	Name string `form:"name"`

	// Comment is a personal, freeform descriptive note.
	Comment string `form:"comment,omitempty"`
}

CreateDomainInput is used as input to the CreateDomain function.

type CreateFTPInput

type CreateFTPInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string `form:"name,omitempty"`
	Address           string `form:"address,omitempty"`
	Port              uint   `form:"port,omitempty"`
	Username          string `form:"user,omitempty"`
	Password          string `form:"password,omitempty"`
	Path              string `form:"path,omitempty"`
	Period            uint   `form:"period,omitempty"`
	GzipLevel         uint8  `form:"gzip_level,omitempty"`
	Format            string `form:"format,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

CreateFTPInput is used as input to the CreateFTP function.

type CreateGCSInput

type CreateGCSInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string `form:"name,omitempty"`
	Bucket            string `form:"bucket_name,omitempty"`
	User              string `form:"user,omitempty"`
	SecretKey         string `form:"secret_key,omitempty"`
	Path              string `form:"path,omitempty"`
	Period            uint   `form:"period,omitempty"`
	GzipLevel         uint8  `form:"gzip_level,omitempty"`
	Format            string `form:"format,omitempty"`
	MessageType       string `form:"message_type,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

CreateGCSInput is used as input to the CreateGCS function.

type CreateGzipInput

type CreateGzipInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name           string `form:"name,omitempty"`
	ContentTypes   string `form:"content_types"`
	Extensions     string `form:"extensions"`
	CacheCondition string `form:"cache_condition,omitempty"`
}

CreateGzipInput is used as input to the CreateGzip function.

type CreateHeaderInput

type CreateHeaderInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string       `form:"name,omitempty"`
	Action            HeaderAction `form:"action,omitempty"`
	IgnoreIfSet       *Compatibool `form:"ignore_if_set,omitempty"`
	Type              HeaderType   `form:"type,omitempty"`
	Destination       string       `form:"dst,omitempty"`
	Source            string       `form:"src,omitempty"`
	Regex             string       `form:"regex,omitempty"`
	Substitution      string       `form:"substitution,omitempty"`
	Priority          uint         `form:"priority,omitempty"`
	RequestCondition  string       `form:"request_condition,omitempty"`
	CacheCondition    string       `form:"cache_condition,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
}

CreateHeaderInput is used as input to the CreateHeader function.

type CreateHealthCheckInput

type CreateHealthCheckInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name             string `form:"name,omitempty"`
	Comment          string `form:"comment,omitempty"`
	Method           string `form:"method,omitempty"`
	Host             string `form:"host,omitempty"`
	Path             string `form:"path,omitempty"`
	HTTPVersion      string `form:"http_version,omitempty"`
	Timeout          uint   `form:"timeout,omitempty"`
	CheckInterval    uint   `form:"check_interval,omitempty"`
	ExpectedResponse uint   `form:"expected_response,omitempty"`
	Window           uint   `form:"window,omitempty"`
	Threshold        uint   `form:"threshold,omitempty"`
	Initial          uint   `form:"initial,omitempty"`
}

CreateHealthCheckInput is used as input to the CreateHealthCheck function.

type CreateLogentriesInput

type CreateLogentriesInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string       `form:"name,omitempty"`
	Port              uint         `form:"port,omitempty"`
	UseTLS            *Compatibool `form:"use_tls,omitempty"`
	Token             string       `form:"token,omitempty"`
	Format            string       `form:"format,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

CreateLogentriesInput is used as input to the CreateLogentries function.

type CreateOWASPInput added in v0.4.3

type CreateOWASPInput struct {
	// Service is the ID of the service. ID is the ID of the firewall.
	// Both fields are required.
	Service string
	ID      string `jsonapi:"primary,owasp"`
	Type    string `jsonapi:"attr,type"`
}

CreateOWASPInput is used as input to the CreateOWASP function.

type CreatePapertrailInput

type CreatePapertrailInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string     `form:"name,omitempty"`
	Address           string     `form:"address,omitempty"`
	Port              uint       `form:"port,omitempty"`
	Format            string     `form:"format,omitempty"`
	ResponseCondition string     `form:"response_condition,omitempty"`
	CreatedAt         *time.Time `form:"created_at,omitempty"`
	UpdatedAt         *time.Time `form:"updated_at,omitempty"`
	DeletedAt         *time.Time `form:"deleted_at,omitempty"`
	Placement         string     `form:"placement,omitempty"`
}

CreatePapertrailInput is used as input to the CreatePapertrail function.

type CreateRequestSettingInput

type CreateRequestSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name             string               `form:"name,omitempty"`
	ForceMiss        *Compatibool         `form:"force_miss,omitempty"`
	ForceSSL         *Compatibool         `form:"force_ssl,omitempty"`
	Action           RequestSettingAction `form:"action,omitempty"`
	BypassBusyWait   *Compatibool         `form:"bypass_busy_wait,omitempty"`
	MaxStaleAge      uint                 `form:"max_stale_age,omitempty"`
	HashKeys         string               `form:"hash_keys,omitempty"`
	XForwardedFor    RequestSettingXFF    `form:"xff,omitempty"`
	TimerSupport     *Compatibool         `form:"timer_support,omitempty"`
	GeoHeaders       *Compatibool         `form:"geo_headers,omitempty"`
	DefaultHost      string               `form:"default_host,omitempty"`
	RequestCondition string               `form:"request_condition,omitempty"`
}

CreateRequestSettingInput is used as input to the CreateRequestSetting function.

type CreateResponseObjectInput

type CreateResponseObjectInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name             string `form:"name,omitempty"`
	Status           uint   `form:"status,omitempty"`
	Response         string `form:"response,omitempty"`
	Content          string `form:"content,omitempty"`
	ContentType      string `form:"content_type,omitempty"`
	RequestCondition string `form:"request_condition,omitempty"`
	CacheCondition   string `form:"cache_condition,omitempty"`
}

CreateResponseObjectInput is used as input to the CreateResponseObject function.

type CreateS3Input

type CreateS3Input struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string       `form:"name,omitempty"`
	BucketName        string       `form:"bucket_name,omitempty"`
	Domain            string       `form:"domain,omitempty"`
	AccessKey         string       `form:"access_key,omitempty"`
	SecretKey         string       `form:"secret_key,omitempty"`
	Path              string       `form:"path,omitempty"`
	Period            uint         `form:"period,omitempty"`
	GzipLevel         uint         `form:"gzip_level,omitempty"`
	Format            string       `form:"format,omitempty"`
	MessageType       string       `form:"message_type,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	TimestampFormat   string       `form:"timestamp_format,omitempty"`
	Redundancy        S3Redundancy `form:"redundancy,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

CreateS3Input is used as input to the CreateS3 function.

type CreateServiceInput

type CreateServiceInput struct {
	Name    string `form:"name,omitempty"`
	Comment string `form:"comment,omitempty"`
}

CreateServiceInput is used as input to the CreateService function.

type CreateSnippetInput added in v0.4.3

type CreateSnippetInput struct {
	// Service is the ID of the Service to add the snippet to.
	Service string

	// Version is the editable version of the service
	Version int

	// Name is the name for the snippet.
	Name string `form:"name"`

	// Priority determines the ordering for multiple snippets. Lower numbers execute first.
	Priority int `form:"priority"`

	// Dynamic sets the snippet version to regular (0) or dynamic (1).
	Dynamic int `form:"dynamic"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `form:"content"`

	// Type is the location in generated VCL where the snippet should be placed.
	Type SnippetType `form:"type"`
}

CreateSnippetInput is the input for CreateSnippet

type CreateSplunkInput added in v0.4.3

type CreateSplunkInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string `form:"name,omitempty"`
	URL               string `form:"url,omitempty"`
	Format            string `form:"format,omitempty"`
	FormatVersion     uint   `form:"format_version,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	Placement         string `form:"placement,omitempty"`
	Token             string `form:"token,omitempty"`
}

CreateSplunkInput is used as input to the CreateSplunk function.

type CreateSumologicInput

type CreateSumologicInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string `form:"name,omitempty"`
	Address           string `form:"address,omitempty"`
	URL               string `form:"url,omitempty"`
	Format            string `form:"format,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	MessageType       string `form:"message_type,omitempty"`
	FormatVersion     int    `form:"format_version,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

CreateSumologicInput is used as input to the CreateSumologic function.

type CreateSyslogInput

type CreateSyslogInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name              string       `form:"name,omitempty"`
	Address           string       `form:"address,omitempty"`
	Hostname          string       `form:"hostname,omitempty"`
	Port              uint         `form:"port,omitempty"`
	UseTLS            *Compatibool `form:"use_tls,omitempty"`
	IPV4              string       `form:"ipv4,omitempty"`
	TLSCACert         string       `form:"tls_ca_cert,omitempty"`
	TLSHostname       string       `form:"tls_hostname,omitempty"`
	Token             string       `form:"token,omitempty"`
	Format            string       `form:"format,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	MessageType       string       `form:"message_type,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

CreateSyslogInput is used as input to the CreateSyslog function.

type CreateVCLInput

type CreateVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	Name    string `form:"name,omitempty"`
	Content string `form:"content,omitempty"`
	Main    bool   `form:"main,omitempty"`
}

CreateVCLInput is used as input to the CreateVCL function.

type CreateVersionInput

type CreateVersionInput struct {
	// Service is the ID of the service (required).
	Service string

	// A personal freeform descriptive note.
	Comment string `form:"comment,omitempty"`
}

CreateVersionInput is the input to the CreateVersion function.

type CreateWAFInput added in v0.4.2

type CreateWAFInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	ID                string `jsonapi:"primary,waf"`
	PrefetchCondition string `jsonapi:"attr,prefetch_condition,omitempty"`
	Response          string `jsonapi:"attr,response,omitempty"`
}

CreateWAFInput is used as input to the CreateWAF function.

type DeactivateVersionInput

type DeactivateVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

DeactivateVersionInput is the input to the DeactivateVersion function.

type DeleteACLEntryInput added in v0.4.0

type DeleteACLEntryInput struct {
	Service string
	ACL     string
	ID      string
}

DeleteACLEntryInput the input parameter to DeleteACLEntry function.

type DeleteACLInput added in v0.4.0

type DeleteACLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the ACL to delete (required).
	Name string
}

DeleteACLInput is the input parameter to DeleteACL function.

type DeleteBackendInput

type DeleteBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the backend to delete (required).
	Name string
}

DeleteBackendInput is the input parameter to DeleteBackend.

type DeleteBigQueryInput added in v0.4.3

type DeleteBigQueryInput struct {
	// Service is the ID of the service.
	Service string

	// Version is the specific configuration.
	Version int

	// Name is the name of the BigQuery logging endpoint to delete.
	Name string
}

DeleteBigQueryInput is the input parameter to DeleteBigQuery. All fields are required.

type DeleteBlobStorageInput added in v0.4.3

type DeleteBlobStorageInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the blob storage to delete (required).
	Name string
}

DeleteBlobStorageInput is the input parameter to DeleteBlobStorage.

type DeleteCacheSettingInput

type DeleteCacheSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the cache setting to delete (required).
	Name string
}

DeleteCacheSettingInput is the input parameter to DeleteCacheSetting.

type DeleteConditionInput

type DeleteConditionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the condition to delete (required).
	Name string
}

DeleteConditionInput is the input parameter to DeleteCondition.

type DeleteDictionaryInput

type DeleteDictionaryInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the dictionary to delete (required).
	Name string
}

DeleteDictionaryInput is the input parameter to DeleteDictionary.

type DeleteDictionaryItemInput

type DeleteDictionaryItemInput struct {
	// Service is the ID of the service. Dictionary is the ID of the dictionary.
	// Both fields are required.
	Service    string
	Dictionary string

	// ItemKey is the name of the dictionary item to delete.
	ItemKey string
}

DeleteDictionaryItemInput is the input parameter to DeleteDictionaryItem.

type DeleteDirectorBackendInput

type DeleteDirectorBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

DeleteDirectorBackendInput is the input parameter to DeleteDirectorBackend.

type DeleteDirectorInput

type DeleteDirectorInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the director to delete (required).
	Name string
}

DeleteDirectorInput is the input parameter to DeleteDirector.

type DeleteDomainInput

type DeleteDomainInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the domain that the service will respond to (required).
	Name string `form:"name"`
}

DeleteDomainInput is used as input to the DeleteDomain function.

type DeleteFTPInput

type DeleteFTPInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the FTP to delete (required).
	Name string
}

DeleteFTPInput is the input parameter to DeleteFTP.

type DeleteGCSInput

type DeleteGCSInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the GCS to delete (required).
	Name string
}

DeleteGCSInput is the input parameter to DeleteGCS.

type DeleteGzipInput

type DeleteGzipInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the Gzip to delete (required).
	Name string
}

DeleteGzipInput is the input parameter to DeleteGzip.

type DeleteHeaderInput

type DeleteHeaderInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the header to delete (required).
	Name string
}

DeleteHeaderInput is the input parameter to DeleteHeader.

type DeleteHealthCheckInput

type DeleteHealthCheckInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the health check to delete (required).
	Name string
}

DeleteHealthCheckInput is the input parameter to DeleteHealthCheck.

type DeleteLogentriesInput

type DeleteLogentriesInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the logentries to delete (required).
	Name string
}

DeleteLogentriesInput is the input parameter to DeleteLogentries.

type DeletePapertrailInput

type DeletePapertrailInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the papertrail to delete (required).
	Name string
}

DeletePapertrailInput is the input parameter to DeletePapertrail.

type DeleteRequestSettingInput

type DeleteRequestSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the request settings to delete (required).
	Name string
}

DeleteRequestSettingInput is the input parameter to DeleteRequestSetting.

type DeleteResponseObjectInput

type DeleteResponseObjectInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the response object to delete (required).
	Name string
}

DeleteResponseObjectInput is the input parameter to DeleteResponseObject.

type DeleteS3Input

type DeleteS3Input struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the S3 to delete (required).
	Name string
}

DeleteS3Input is the input parameter to DeleteS3.

type DeleteServiceInput

type DeleteServiceInput struct {
	ID string
}

DeleteServiceInput is used as input to the DeleteService function.

type DeleteSnippetInput added in v0.4.3

type DeleteSnippetInput struct {
	// Service is the ID of the Service to add the snippet to.
	Service string

	// Name is the Name of the Snippet to Delete
	Name string

	// Version is the editable version of the service
	Version int
}

type DeleteSplunkInput added in v0.4.3

type DeleteSplunkInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the splunk to delete (required).
	Name string
}

DeleteSplunkInput is the input parameter to DeleteSplunk.

type DeleteSumologicInput

type DeleteSumologicInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the sumologic to delete (required).
	Name string
}

DeleteSumologicInput is the input parameter to DeleteSumologic.

type DeleteSyslogInput

type DeleteSyslogInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the syslog to delete (required).
	Name string
}

DeleteSyslogInput is the input parameter to DeleteSyslog.

type DeleteVCLInput

type DeleteVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the VCL to delete (required).
	Name string
}

DeleteVCLInput is the input parameter to DeleteVCL.

type DeleteWAFInput added in v0.4.2

type DeleteWAFInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// ID is the id of the WAF to delete.
	ID string
}

DeleteWAFInput is used as input to the DeleteWAFInput function.

type Dictionary

type Dictionary struct {
	// CreatedAt is the Time-stamp (GMT) when the dictionary was created.
	CreatedAt string `mapstructure:"created_at"`

	// DeletedAt is the Time-stamp (GMT) when the dictionary was deleted.
	DeletedAt string `mapstructure:"deleted_at"`

	// ID is the alphanumeric string identifying a dictionary.
	ID string `mapstructure:"id"`

	// Name is the name for the Dictionary.
	Name string `mapstructure:"name"`

	// ServiceID is the alphanumeric string identifying a service.
	ServiceID string `mapstructure:"service_id"`

	// UpdatedAt is the Time-stamp (GMT) when the dictionary was updated.
	UpdatedAt string `mapstructure:"updated_at"`

	// Version is the current version of the service.
	Version int `mapstructure:"version"`

	// WriteOnly Determines if items in the dictionary are readable or not.
	WriteOnly bool `mapstructure:"write_only"`
}

Dictionary represents a dictionary response from the Fastly API.

type DictionaryItem

type DictionaryItem struct {
	// DictionaryID is the alphanumeric string identifying the dictionary for this Item.
	DictionaryID string `mapstructure:"dictionary_id"`

	// ServiceID is the service the Dictionary belongs to.
	ServiceID string `mapstructure:"service_id"`

	// ItemKey is the value for the DictionaryKey.
	ItemKey string `mapstructure:"item_key"`

	// ItemValue is the value for the DictionaryItem.
	ItemValue string `mapstructure:"item_value"`

	// CreatedAt is the Time-stamp (GMT) when the dictionary was created.
	CreatedAt string `mapstructure:"created_at"`

	// DeletedAt is the Time-stamp (GMT) when the dictionary was deleted.
	DeletedAt string `mapstructure:"deleted_at"`

	// UpdatedAt is the Time-stamp (GMT) when the dictionary was updated.
	UpdatedAt string `mapstructure:"updated_at"`
}

DictionaryItem represents a dictionary item response from the Fastly API.

type Diff

type Diff struct {
	Format string `mapstructure:"format"`
	From   int    `mapstructure:"from"`
	To     int    `mapstructure:"to"`
	Diff   string `mapstructure:"diff"`
}

Diff represents a diff of two versions as a response from the Fastly API.

type Director

type Director struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name     string       `mapstructure:"name"`
	Comment  string       `mapstructure:"comment"`
	Shield   string       `mapstructure:"shield"`
	Quorum   uint         `mapstructure:"quorum"`
	Type     DirectorType `mapstructure:"type"`
	Retries  uint         `mapstructure:"retries"`
	Capacity uint         `mapstructure:"capacity"`

	DeletedAt string `mapstructure:"deleted_at"`
	CreatedAt string `mapstructure:"created_at"`
	UpdatedAt string `mapstructure:"updated_at"`
}

Director represents a director response from the Fastly API.

type DirectorBackend

type DirectorBackend struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Director  string     `mapstructure:"director_name"`
	Backend   string     `mapstructure:"backend_name"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

DirectorBackend is the relationship between a director and a backend in the Fastly API.

type DirectorType

type DirectorType uint8

DirectorType is a type of director.

const (
	// DirectorTypeRandom is a director that does random direction.
	DirectorTypeRandom DirectorType = 1

	// DirectorTypeRoundRobin is a director that does round-robin direction.
	DirectorTypeRoundRobin DirectorType = 2

	// DirectorTypeHash is a director that does hash direction.
	DirectorTypeHash DirectorType = 3

	// DirectorTypeClient is a director that does client direction.
	DirectorTypeClient DirectorType = 4
)

type Domain

type Domain struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name    string `mapstructure:"name"`
	Comment string `mapstructure:"comment"`
}

Domain represents the the domain name Fastly will serve content for.

type DynamicSnippet added in v0.4.3

type DynamicSnippet struct {
	// Service is the ID of the Service to add the snippet to.
	ServiceID string `mapstructure:"service_id"`

	// ID is the ID of the Snippet to modify
	ID string `mapstructure:"snippet_id"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `mapstructure:"content"`

	CreatedAt string `mapstructure:"created_at"`
	UpdatedAt string `mapstructure:"updated_at"`
}

DynamicSnippet is the object returned when updating or retrieving a Dynamic Snippet

type EdgeCheck

type EdgeCheck struct {
	Hash         string             `mapstructure:"hash"`
	Server       string             `mapstructure:"server"`
	ResponseTime float64            `mapstructure:"response_time"`
	Request      *EdgeCheckRequest  `mapstructure:"request"`
	Response     *EdgeCheckResponse `mapstructure:"response"`
}

EdgeCheck represents an edge check response from the Fastly API.

type EdgeCheckInput

type EdgeCheckInput struct {
	URL string `form:"url,omitempty"`
}

EdgeCheckInput is used as input to the EdgeCheck function.

type EdgeCheckRequest

type EdgeCheckRequest struct {
	URL     string       `mapstructure:"url"`
	Method  string       `mapstructure:"method"`
	Headers *http.Header `mapstructure:"headers"`
}

EdgeCheckRequest is the request part of an EdgeCheck response.

type EdgeCheckResponse

type EdgeCheckResponse struct {
	Status  uint         `mapstructure:"status"`
	Headers *http.Header `mapstructure:"headers"`
}

EdgeCheckResponse is the response part of an EdgeCheck response.

type ErrorObject added in v0.4.2

type ErrorObject struct {
	ID     string `mapstructure:"id"`
	Title  string `mapstructure:"title"`
	Detail string `mapstructure:"detail"`
	Status string `mapstructure:"status"`
	Code   string `mapstructure:"code"`

	Meta *map[string]interface{} `mapstructure:"meta"`
}

ErrorObject is a single error.

type Event added in v0.4.3

type Event struct {
	ID          string                 `jsonapi:"primary,event"`
	CustomerID  string                 `jsonapi:"attr,customer_id"`
	Description string                 `jsonapi:"attr,description"`
	EventType   string                 `jsonapi:"attr,event_type"`
	IP          string                 `jsonapi:"attr,ip"`
	Metadata    map[string]interface{} `jsonapi:"attr,metadata,omitempty"`
	ServiceID   string                 `jsonapi:"attr,service_id"`
	UserID      string                 `jsonapi:"attr,user_id"`
	CreatedAt   string                 `jsonapi:"attr,created_at"`
	Admin       bool                   `jsonapi:"attr,admin"`
}

Events represents an event_logs item response from the Fastly API.

type EventsPaginationInfo added in v0.4.3

type EventsPaginationInfo struct {
	First string `json:"first,omitempty"`
	Last  string `json:"last,omitempty"`
	Next  string `json:"next,omitempty"`
}

EventsPaginationInfo stores links to searches related to the current one, showing any information about additional results being stored on another page

type FTP

type FTP struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Port              uint       `mapstructure:"port"`
	Username          string     `mapstructure:"user"`
	Password          string     `mapstructure:"password"`
	Path              string     `mapstructure:"path"`
	Period            uint       `mapstructure:"period"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	ResponseCondition string     `mapstructure:"response_condition"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

FTP represents an FTP logging response from the Fastly API.

type GCS

type GCS struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string `mapstructure:"name"`
	Bucket            string `mapstructure:"bucket_name"`
	User              string `mapstructure:"user"`
	SecretKey         string `mapstructure:"secret_key"`
	Path              string `mapstructure:"path"`
	Period            uint   `mapstructure:"period"`
	GzipLevel         uint8  `mapstructure:"gzip_level"`
	Format            string `mapstructure:"format"`
	MessageType       string `mapstructure:"message_type"`
	ResponseCondition string `mapstructure:"response_condition"`
	TimestampFormat   string `mapstructure:"timestamp_format"`
	Placement         string `mapstructure:"placement"`
}

GCS represents an GCS logging response from the Fastly API.

type GetACLEntryInput added in v0.4.0

type GetACLEntryInput struct {
	Service string
	ACL     string
	ID      string
}

GetACLEntryInput is the input parameter to GetACLEntry function.

type GetACLInput added in v0.4.0

type GetACLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the ACL to get (required).
	Name string
}

GetACLInput is the input parameter to GetACL function.

type GetAPIEventInput added in v0.4.3

type GetAPIEventInput struct {
	// EventID is the ID of the event and is required.
	EventID string
}

GetAPIEventInput is used as input to the GetAPIEvent function.

type GetAPIEventsFilterInput added in v0.4.3

type GetAPIEventsFilterInput struct {
	// CustomerID to Limit the returned events to a specific customer.
	CustomerID string

	// ServiceID to Limit the returned events to a specific service.
	ServiceID string

	// EventType to Limit the returned events to a specific event type. See above for event codes.
	EventType string

	// UserID to Limit the returned events to a specific user.
	UserID string

	// Number is the Pagination page number.
	PageNumber int

	// Size is the Number of items to return on each paginated page.
	MaxResults int
}

GetAPIEventsFilter is used as input to the GetAPIEvents function.

type GetAPIEventsResponse added in v0.4.3

type GetAPIEventsResponse struct {
	Events []*Event
	Links  EventsPaginationInfo `json:"links"`
}

GetAPIEventsResponse is the data returned to the user from a GetAPIEvents call

type GetBackendInput

type GetBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the backend to fetch.
	Name string
}

GetBackendInput is used as input to the GetBackend function.

type GetBigQueryInput added in v0.4.3

type GetBigQueryInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

GetBigQueryInput is used as input to the GetBigQuery function.

type GetBillingInput

type GetBillingInput struct {
	Year  uint16
	Month uint8
}

GetBillingInput is used as input to the GetBilling function.

type GetBlobStorageInput added in v0.4.3

type GetBlobStorageInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the blob storage to fetch.
	Name string
}

GetBlobStorageInput is used as input to the GetBlobStorage function.

type GetCacheSettingInput

type GetCacheSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the cache setting to fetch.
	Name string
}

GetCacheSettingInput is used as input to the GetCacheSetting function.

type GetConditionInput

type GetConditionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the condition to fetch.
	Name string
}

GetConditionInput is used as input to the GetCondition function.

type GetDictionaryInput

type GetDictionaryInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the dictionary to fetch.
	Name string
}

GetDictionaryInput is used as input to the GetDictionary function.

type GetDictionaryItemInput

type GetDictionaryItemInput struct {
	// Service is the ID of the service. Dictionary is the ID of the dictionary.
	// Both fields are required.
	Service    string
	Dictionary string

	// ItemKey is the name of the dictionary item to fetch.
	ItemKey string
}

GetDictionaryItemInput is used as input to the GetDictionaryItem function.

type GetDiffInput

type GetDiffInput struct {
	// Service is the ID of the service (required).
	Service string

	// From is the version to diff from. This can either be a string indicating a
	// positive number (e.g. "1") or a negative number from "-1" down ("-1" is the
	// latest version).
	From int

	// To is the version to diff up to. The same rules for From apply.
	To int

	// Format is an optional field to specify the format with which the diff will
	// be returned. Acceptable values are "text" (default), "html", or
	// "html_simple".
	Format string
}

GetDiffInput is used as input to the GetDiff function.

type GetDirectorBackendInput

type GetDirectorBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

GetDirectorBackendInput is used as input to the GetDirectorBackend function.

type GetDirectorInput

type GetDirectorInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the director to fetch.
	Name string
}

GetDirectorInput is used as input to the GetDirector function.

type GetDomainInput

type GetDomainInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the domain to fetch.
	Name string `form:"name"`
}

GetDomainInput is used as input to the GetDomain function.

type GetDynamicSnippetInput added in v0.4.3

type GetDynamicSnippetInput struct {
	// Service is the ID of the service.
	Service string

	// ID is the ID of the Snippet to fetch.
	ID string
}

GetDynamicSnippetInput is used as input to the GetDynamicSnippet function.

type GetFTPInput

type GetFTPInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the FTP to fetch.
	Name string
}

GetFTPInput is used as input to the GetFTP function.

type GetGCSInput

type GetGCSInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the GCS to fetch.
	Name string
}

GetGCSInput is used as input to the GetGCS function.

type GetGeneratedVCLInput

type GetGeneratedVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

GetGeneratedVCLInput is used as input to the GetGeneratedVCL function.

type GetGzipInput

type GetGzipInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the Gzip to fetch.
	Name string
}

GetGzipInput is used as input to the GetGzip function.

type GetHeaderInput

type GetHeaderInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the header to fetch.
	Name string
}

GetHeaderInput is used as input to the GetHeader function.

type GetHealthCheckInput

type GetHealthCheckInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the health check to fetch.
	Name string
}

GetHealthCheckInput is used as input to the GetHealthCheck function.

type GetLogentriesInput

type GetLogentriesInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the logentries to fetch.
	Name string
}

GetLogentriesInput is used as input to the GetLogentries function.

type GetOWASPInput added in v0.4.3

type GetOWASPInput struct {
	// Service is the ID of the service. ID is the ID of the firewall.
	// Both fields are required.
	Service string
	ID      string
}

GetOWASPInput is used as input to the GetOWASP function.

type GetPapertrailInput

type GetPapertrailInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the papertrail to fetch.
	Name string
}

GetPapertrailInput is used as input to the GetPapertrail function.

type GetRealtimeStatsInput added in v0.4.0

type GetRealtimeStatsInput struct {
	Service   string
	Timestamp uint64
	Limit     uint32
}

GetRealtimeStatsInput is an input parameter to GetRealtimeStats function

type GetRequestSettingInput

type GetRequestSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the request settings to fetch.
	Name string
}

GetRequestSettingInput is used as input to the GetRequestSetting function.

type GetResponseObjectInput

type GetResponseObjectInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the response object to fetch.
	Name string
}

GetResponseObjectInput is used as input to the GetResponseObject function.

type GetRuleInput added in v0.4.3

type GetRuleInput struct {
	// RuleID is the ID of the rule and is required.
	RuleID string
}

GetRuleVCLInput is used as input to the GetRuleVCL function.

type GetS3Input

type GetS3Input struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the S3 to fetch.
	Name string
}

GetS3Input is used as input to the GetS3 function.

type GetServiceInput

type GetServiceInput struct {
	ID string
}

GetServiceInput is used as input to the GetService function.

type GetSettingsInput

type GetSettingsInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

GetSettingsInput is used as input to the GetSettings function.

type GetSnippetInput added in v0.4.3

type GetSnippetInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the Snippet to fetch.
	Name string
}

GetSnippetInput is used as input to the GetSnippet function.

type GetSplunkInput added in v0.4.3

type GetSplunkInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the splunk to fetch.
	Name string
}

GetSplunkInput is used as input to the GetSplunk function.

type GetStatsInput added in v0.4.0

type GetStatsInput struct {
	Service string
	Field   string
	From    string
	To      string
	By      string
	Region  string
}

GetStatsInput is an input to the GetStats function. Stats can be filtered by a Service ID, an individual stats field, time range (From and To), sampling rate (By) and/or Fastly region (Region) Allowed values for the fields are described at https://docs.fastly.com/api/stats

type GetSumologicInput

type GetSumologicInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the sumologic to fetch.
	Name string
}

GetSumologicInput is used as input to the GetSumologic function.

type GetSyslogInput

type GetSyslogInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the syslog to fetch.
	Name string
}

GetSyslogInput is used as input to the GetSyslog function.

type GetUsageInput added in v0.4.0

type GetUsageInput struct {
	From   string
	To     string
	By     string
	Region string
}

GetUsageInput is used as an input to the GetUsage function Value for the input are described at https://docs.fastly.com/api/stats

type GetVCLInput

type GetVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the VCL to fetch.
	Name string
}

GetVCLInput is used as input to the GetVCL function.

type GetVersionInput

type GetVersionInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the version number to fetch (required).
	Version int
}

GetVersionInput is the input to the GetVersion function.

type GetWAFInput added in v0.4.2

type GetWAFInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// ID is the id of the WAF to get.
	ID string
}

GetWAFInput is used as input to the GetWAF function.

type GetWAFRuleRuleSetsInput added in v0.4.3

type GetWAFRuleRuleSetsInput struct {
	// Service is the ID of the service. ID is the ID of the firewall.
	// Both fields are required.
	Service string
	ID      string
}

GetWAFRuleRuleSetsInput is used as input to the GetWAFRuleRuleSets function.

type GetWAFRuleStatusInput added in v0.4.3

type GetWAFRuleStatusInput struct {
	ID      int
	Service string
	WAF     string
}

GetWAFRuleStatusInput specifies the parameters for the GetWAFRuleStatus call.

type GetWAFRuleStatusesFilters added in v0.4.3

type GetWAFRuleStatusesFilters struct {
	Status     string
	Accuracy   int
	Maturity   int
	Message    string
	Revision   int
	RuleID     string
	TagID      int    // Filter by a single tag ID.
	TagName    string // Filter by single tag name.
	Version    string
	Tags       []int // Return all rules with any of the specified tag IDs.
	MaxResults int   // Max number of returned results per request.
	Page       int   // Which page of results to return.
}

GetWAFRuleStatusesFilters provides a set of parameters for filtering the results of the call to get the rules associated with a WAF.

type GetWAFRuleStatusesInput added in v0.4.3

type GetWAFRuleStatusesInput struct {
	Service string
	WAF     string
	Filters GetWAFRuleStatusesFilters
}

GetWAFRuleStatusesInput specifies the parameters for the GetWAFRuleStatuses call

type GetWAFRuleStatusesResponse added in v0.4.3

type GetWAFRuleStatusesResponse struct {
	Rules []*WAFRuleStatus
}

GetWAFRuleStatusesResponse is the data returned to the user from a GetWAFRuleStatus call

type GetWAFRuleVCLInput added in v0.4.3

type GetWAFRuleVCLInput struct {
	// ID is the ID of the firewall. RuleID is the ID of the rule.
	// Both are required.
	ID     string
	RuleID string
}

GetWAFRuleVCLInput is used as input to the GetWAFRuleVCL function.

type Gzip

type Gzip struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name           string `mapstructure:"name"`
	ContentTypes   string `mapstructure:"content_types"`
	Extensions     string `mapstructure:"extensions"`
	CacheCondition string `mapstructure:"cache_condition"`
}

Gzip represents an Gzip logging response from the Fastly API.

type HTTPError

type HTTPError struct {
	// StatusCode is the HTTP status code (2xx-5xx).
	StatusCode int

	Errors []*ErrorObject `mapstructure:"errors"`
}

HTTPError is a custom error type that wraps an HTTP status code with some helper functions.

func NewHTTPError

func NewHTTPError(resp *http.Response) *HTTPError

NewHTTPError creates a new HTTP error from the given code.

func (*HTTPError) Error

func (e *HTTPError) Error() string

Error implements the error interface and returns the string representing the error text that includes the status code and the corresponding status text.

func (*HTTPError) IsNotFound

func (e *HTTPError) IsNotFound() bool

IsNotFound returns true if the HTTP error code is a 404, false otherwise.

func (*HTTPError) String

func (e *HTTPError) String() string

String implements the stringer interface and returns the string representing the string text that includes the status code and corresponding status text.

type Header struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string       `mapstructure:"name"`
	Action            HeaderAction `mapstructure:"action"`
	IgnoreIfSet       bool         `mapstructure:"ignore_if_set"`
	Type              HeaderType   `mapstructure:"type"`
	Destination       string       `mapstructure:"dst"`
	Source            string       `mapstructure:"src"`
	Regex             string       `mapstructure:"regex"`
	Substitution      string       `mapstructure:"substitution"`
	Priority          uint         `mapstructure:"priority"`
	RequestCondition  string       `mapstructure:"request_condition"`
	CacheCondition    string       `mapstructure:"cache_condition"`
	ResponseCondition string       `mapstructure:"response_condition"`
}

Header represents a header response from the Fastly API.

type HeaderAction

type HeaderAction string

HeaderAction is a type of header action.

const (
	// HeaderActionSet is a header action that sets or resets a header.
	HeaderActionSet HeaderAction = "set"

	// HeaderActionAppend is a header action that appends to an existing header.
	HeaderActionAppend HeaderAction = "append"

	// HeaderActionDelete is a header action that deletes a header.
	HeaderActionDelete HeaderAction = "delete"

	// HeaderActionRegex is a header action that performs a single regex
	// replacement on a header.
	HeaderActionRegex HeaderAction = "regex"

	// HeaderActionRegexRepeat is a header action that performs a global regex
	// replacement on a header.
	HeaderActionRegexRepeat HeaderAction = "regex_repeat"
)

type HeaderType

type HeaderType string

HeaderType is a type of header.

const (
	// HeaderTypeRequest is a header type that performs on the request before
	// lookups.
	HeaderTypeRequest HeaderType = "request"

	// HeaderTypeFetch is a header type that performs on the request to the origin
	// server.
	HeaderTypeFetch HeaderType = "fetch"

	// HeaderTypeCache is a header type that performs on the response before it's
	// store in the cache.
	HeaderTypeCache HeaderType = "cache"

	// HeaderTypeResponse is a header type that performs on the response before
	// delivering to the client.
	HeaderTypeResponse HeaderType = "response"
)

type HealthCheck

type HealthCheck struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name             string `mapstructure:"name"`
	Comment          string `mapstructure:"comment"`
	Method           string `mapstructure:"method"`
	Host             string `mapstructure:"host"`
	Path             string `mapstructure:"path"`
	HTTPVersion      string `mapstructure:"http_version"`
	Timeout          uint   `mapstructure:"timeout"`
	CheckInterval    uint   `mapstructure:"check_interval"`
	ExpectedResponse uint   `mapstructure:"expected_response"`
	Window           uint   `mapstructure:"window"`
	Threshold        uint   `mapstructure:"threshold"`
	Initial          uint   `mapstructure:"initial"`
}

HealthCheck represents a health check response from the Fastly API.

type IPAddrs

type IPAddrs []string

IPAddrs is a sortable list of IP addresses returned by the Fastly API.

type LatestVersionInput

type LatestVersionInput struct {
	// Service is the ID of the service (required).
	Service string
}

LatestVersionInput is the input to the LatestVersion function.

type ListACLEntriesInput added in v0.4.0

type ListACLEntriesInput struct {
	Service string
	ACL     string
}

ListACLEntriesInput is the input parameter to ListACLEntries function.

type ListACLsInput added in v0.4.0

type ListACLsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListACLsInput is used as input to the ListACLs function.

type ListBackendsInput

type ListBackendsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListBackendsInput is used as input to the ListBackends function.

type ListBlobStoragesInput added in v0.4.3

type ListBlobStoragesInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListBlobStoragesInput is used as input to the ListBlobStorages function.

type ListCacheSettingsInput

type ListCacheSettingsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListCacheSettingsInput is used as input to the ListCacheSettings function.

type ListConditionsInput

type ListConditionsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListConditionsInput is used as input to the ListConditions function.

type ListDictionariesInput

type ListDictionariesInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListDictionariesInput is used as input to the ListDictionaries function.

type ListDictionaryItemsInput

type ListDictionaryItemsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Dictionary is the ID of the dictionary to retrieve items for (required).
	Dictionary string
}

ListDictionaryItemsInput is used as input to the ListDictionaryItems function.

type ListDirectorsInput

type ListDirectorsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListDirectorsInput is used as input to the ListDirectors function.

type ListDomainsInput

type ListDomainsInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

ListDomainsInput is used as input to the ListDomains function.

type ListFTPsInput

type ListFTPsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListFTPsInput is used as input to the ListFTPs function.

type ListGCSsInput

type ListGCSsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListGCSsInput is used as input to the ListGCSs function.

type ListGzipsInput

type ListGzipsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListGzipsInput is used as input to the ListGzips function.

type ListHeadersInput

type ListHeadersInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListHeadersInput is used as input to the ListHeaders function.

type ListHealthChecksInput

type ListHealthChecksInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListHealthChecksInput is used as input to the ListHealthChecks function.

type ListLogentriesInput

type ListLogentriesInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListLogentriesInput is used as input to the ListLogentries function.

type ListPapertrailsInput

type ListPapertrailsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListPapertrailsInput is used as input to the ListPapertrails function.

type ListRequestSettingsInput

type ListRequestSettingsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListRequestSettingsInput is used as input to the ListRequestSettings function.

type ListResponseObjectsInput

type ListResponseObjectsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListResponseObjectsInput is used as input to the ListResponseObjects function.

type ListS3sInput

type ListS3sInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListS3sInput is used as input to the ListS3s function.

type ListServiceDomainInput added in v0.4.3

type ListServiceDomainInput struct {
	ID string
}

type ListServicesInput

type ListServicesInput struct{}

ListServicesInput is used as input to the ListServices function.

type ListSnippetsInput added in v0.4.3

type ListSnippetsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListSnippetsInput is used as input to the ListSnippets function.

type ListSplunksInput added in v0.4.3

type ListSplunksInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListSplunksInput is used as input to the ListSplunks function.

type ListSumologicsInput

type ListSumologicsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListSumologicsInput is used as input to the ListSumologics function.

type ListSyslogsInput

type ListSyslogsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListSyslogsInput is used as input to the ListSyslogs function.

type ListVCLsInput

type ListVCLsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListVCLsInput is used as input to the ListVCLs function.

type ListVersionsInput

type ListVersionsInput struct {
	// Service is the ID of the service (required).
	Service string
}

ListVersionsInput is the input to the ListVersions function.

type ListWAFsInput added in v0.4.2

type ListWAFsInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version int
}

ListWAFsInput is used as input to the ListWAFs function.

type LockVersionInput

type LockVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

LockVersionInput is the input to the LockVersion function.

type Logentries

type Logentries struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Port              uint       `mapstructure:"port"`
	UseTLS            bool       `mapstructure:"use_tls"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Logentries represents a logentries response from the Fastly API.

type OWASP added in v0.4.3

type OWASP struct {
	ID                               string     `jsonapi:"primary,owasp"`
	AllowedHTTPVersions              string     `jsonapi:"attr,allowed_http_versions"`
	AllowedMethods                   string     `jsonapi:"attr,allowed_methods"`
	AllowedRequestContentType        string     `jsonapi:"attr,allowed_request_content_type"`
	AllowedRequestContentTypeCharset string     `jsonapi:"attr,allowed_request_content_type_charset"`
	ArgLength                        int        `jsonapi:"attr,arg_length"`
	ArgNameLength                    int        `jsonapi:"attr,arg_name_length"`
	CombinedFileSizes                int        `jsonapi:"attr,combined_file_sizes"`
	CreatedAt                        *time.Time `jsonapi:"attr,created_at,iso8601"`
	CriticalAnomalyScore             int        `jsonapi:"attr,critical_anomaly_score"`
	CRSValidateUTF8Encoding          bool       `jsonapi:"attr,crs_validate_utf8_encoding"`
	ErrorAnomalyScore                int        `jsonapi:"attr,error_anomaly_score"`
	HighRiskCountryCodes             string     `jsonapi:"attr,high_risk_country_codes"`
	HTTPViolationScoreThreshold      int        `jsonapi:"attr,http_violation_score_threshold"`
	InboundAnomalyScoreThreshold     int        `jsonapi:"attr,inbound_anomaly_score_threshold"`
	LFIScoreThreshold                int        `jsonapi:"attr,lfi_score_threshold"`
	MaxFileSize                      int        `jsonapi:"attr,max_file_size"`
	MaxNumArgs                       int        `jsonapi:"attr,max_num_args"`
	NoticeAnomalyScore               int        `jsonapi:"attr,notice_anomaly_score"`
	ParanoiaLevel                    int        `jsonapi:"attr,paranoia_level"`
	PHPInjectionScoreThreshold       int        `jsonapi:"attr,php_injection_score_threshold"`
	RCEScoreThreshold                int        `jsonapi:"attr,rce_score_threshold"`
	RestrictedExtensions             string     `jsonapi:"attr,restricted_extensions"`
	RestrictedHeaders                string     `jsonapi:"attr,restricted_headers"`
	RFIScoreThreshold                int        `jsonapi:"attr,rfi_score_threshold"`
	SessionFixationScoreThreshold    int        `jsonapi:"attr,session_fixation_score_threshold"`
	SQLInjectionScoreThreshold       int        `jsonapi:"attr,sql_injection_score_threshold"`
	TotalArgLength                   int        `jsonapi:"attr,total_arg_length"`
	UpdatedAt                        *time.Time `jsonapi:"attr,updated_at,iso8601"`
	WarningAnomalyScore              int        `jsonapi:"attr,warning_anomaly_score"`
	XSSScoreThreshold                int        `jsonapi:"attr,xss_score_threshold"`
}

OWASP is the information about an OWASP object.

type Papertrail

type Papertrail struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Port              uint       `mapstructure:"port"`
	Format            string     `mapstructure:"format"`
	ResponseCondition string     `mapstructure:"response_condition"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Papertrail represents a papertrail response from the Fastly API.

type Purge

type Purge struct {
	// Status is the status of the purge, usually "ok".
	Status string `mapstructure:"status"`

	// ID is the unique ID of the purge request.
	ID string `mapstructure:"id"`
}

Purge is a response from a purge request.

type PurgeAllInput

type PurgeAllInput struct {
	// Service is the ID of the service (required).
	Service string

	// Soft performs a soft purge.
	Soft bool
}

PurgeAllInput is used as input to the Purge function.

type PurgeInput

type PurgeInput struct {
	// URL is the URL to purge (required).
	URL string

	// Soft performs a soft purge.
	Soft bool
}

PurgeInput is used as input to the Purge function.

type PurgeKeyInput

type PurgeKeyInput struct {
	// Service is the ID of the service (required).
	Service string

	// Key is the key to purge (required).
	Key string

	// Soft performs a soft purge.
	Soft bool
}

PurgeKeyInput is used as input to the Purge function.

type RTSClient added in v0.4.0

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

RTSClient is the entrypoint to the Fastly's Realtime Stats API.

func NewRealtimeStatsClient added in v0.4.0

func NewRealtimeStatsClient() *RTSClient

NewRealtimeStatsClient instantiates a new Fastly API client for the realtime stats. This function requires the environment variable `FASTLY_API_KEY` is set and contains a valid API key to authenticate with Fastly.

func (*RTSClient) GetRealtimeStats added in v0.4.0

func (c *RTSClient) GetRealtimeStats(i *GetRealtimeStatsInput) (*RealtimeStatsResponse, error)

GetRealtimeStats returns realtime stats for a service based on the GetRealtimeStatsInput parameter. The realtime stats work in a rolling fasion where first request will return a timestamp which should be passed to consequentive call and so on. More details at https://docs.fastly.com/api/analytics

type RealtimeData added in v0.4.0

type RealtimeData struct {
	Datacenter map[string]*Stats `mapstructure:"datacenter"`
	Aggregated *Stats            `mapstructure:"aggregated"`
	Recorded   uint64            `mapstructure:"recorded"`
}

RealtimeData represents combined stats for all Fastly's POPs and aggregate of them. It also includes a timestamp of when the stats were recorded

type RealtimeStatsResponse added in v0.4.0

type RealtimeStatsResponse struct {
	Timestamp      uint64          `mapstructure:"Timestamp"`
	Data           []*RealtimeData `mapstructure:"Data"`
	Error          string          `mapstructure:"Error"`
	AggregateDelay uint32          `mapstructure:"AggregateDelay"`
}

RealtimeStats is a response from Fastly's real-time analytics endpoint

type RegionsResponse added in v0.4.0

type RegionsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    []string          `mapstructure:"data"`
}

RegionsResponse is a response from Fastly regions API endpoint

type RegionsUsage added in v0.4.0

type RegionsUsage map[string]*Usage

RegionsUsage is a list of aggregated usage data by Fastly's region

type RequestOptions

type RequestOptions struct {
	// Params is a map of key-value pairs that will be added to the Request.
	Params map[string]string

	// Headers is a map of key-value pairs that will be added to the Request.
	Headers map[string]string

	// Body is an io.Reader object that will be streamed or uploaded with the
	// Request. BodyLength is the final size of the Body.
	Body       io.Reader
	BodyLength int64
}

RequestOptions is the list of options to pass to the request.

type RequestSetting

type RequestSetting struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name             string               `mapstructure:"name"`
	ForceMiss        bool                 `mapstructure:"force_miss"`
	ForceSSL         bool                 `mapstructure:"force_ssl"`
	Action           RequestSettingAction `mapstructure:"action"`
	BypassBusyWait   bool                 `mapstructure:"bypass_busy_wait"`
	MaxStaleAge      uint                 `mapstructure:"max_stale_age"`
	HashKeys         string               `mapstructure:"hash_keys"`
	XForwardedFor    RequestSettingXFF    `mapstructure:"xff"`
	TimerSupport     bool                 `mapstructure:"timer_support"`
	GeoHeaders       bool                 `mapstructure:"geo_headers"`
	DefaultHost      string               `mapstructure:"default_host"`
	RequestCondition string               `mapstructure:"request_condition"`
}

RequestSetting represents a request setting response from the Fastly API.

type RequestSettingAction

type RequestSettingAction string

RequestSettingAction is a type of request setting action.

const (
	// RequestSettingActionLookup sets request handling to lookup via the cache.
	RequestSettingActionLookup RequestSettingAction = "lookup"

	// RequestSettingActionPass sets request handling to pass the cache.
	RequestSettingActionPass RequestSettingAction = "pass"
)

type RequestSettingXFF

type RequestSettingXFF string

RequestSettingXFF is a type of X-Forwarded-For value to set.

const (
	// RequestSettingXFFClear clears any X-Forwarded-For headers.
	RequestSettingXFFClear RequestSettingXFF = "clear"

	// RequestSettingXFFLeave leaves any X-Forwarded-For headers untouched.
	RequestSettingXFFLeave RequestSettingXFF = "leave"

	// RequestSettingXFFAppend adds Fastly X-Forwarded-For headers.
	RequestSettingXFFAppend RequestSettingXFF = "append"

	// RequestSettingXFFAppendAll appends all Fastly X-Forwarded-For headers.
	RequestSettingXFFAppendAll RequestSettingXFF = "append_all"

	// RequestSettingXFFOverwrite clears any X-Forwarded-For headers and replaces
	// with Fastly ones.
	RequestSettingXFFOverwrite RequestSettingXFF = "overwrite"
)

type ResponseObject

type ResponseObject struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name             string `mapstructure:"name"`
	Status           uint   `mapstructure:"status"`
	Response         string `mapstructure:"response"`
	Content          string `mapstructure:"content"`
	ContentType      string `mapstructure:"content_type"`
	RequestCondition string `mapstructure:"request_condition"`
	CacheCondition   string `mapstructure:"cache_condition"`
}

ResponseObject represents a response object response from the Fastly API.

type Rule added in v0.4.3

type Rule struct {
	ID       string `jsonapi:"primary,rule"`
	RuleID   string `jsonapi:"attr,rule_id,omitempty"`
	Severity int    `jsonapi:"attr,severity,omitempty"`
	Message  string `jsonapi:"attr,message,omitempty"`
}

Rule is the information about a WAF rule.

type RuleVCL added in v0.4.3

type RuleVCL struct {
	ID  string `jsonapi:"primary,rule_vcl"`
	VCL string `jsonapi:"attr,vcl,omitempty"`
}

RuleVCL is the information about a Rule's VCL.

type Ruleset added in v0.4.3

type Ruleset struct {
	ID       string     `jsonapi:"primary,ruleset"`
	VCL      string     `jsonapi:"attr,vcl,omitempty"`
	LastPush *time.Time `jsonapi:"attr,last_push,omitempty,iso8601"`
}

Ruleset is the information about a firewall object's ruleset.

type S3

type S3 struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string       `mapstructure:"name"`
	BucketName        string       `mapstructure:"bucket_name"`
	Domain            string       `mapstructure:"domain"`
	AccessKey         string       `mapstructure:"access_key"`
	SecretKey         string       `mapstructure:"secret_key"`
	Path              string       `mapstructure:"path"`
	Period            uint         `mapstructure:"period"`
	GzipLevel         uint         `mapstructure:"gzip_level"`
	Format            string       `mapstructure:"format"`
	FormatVersion     uint         `mapstructure:"format_version"`
	ResponseCondition string       `mapstructure:"response_condition"`
	MessageType       string       `mapstructure:"message_type"`
	TimestampFormat   string       `mapstructure:"timestamp_format"`
	Placement         string       `mapstructure:"placement"`
	Redundancy        S3Redundancy `mapstructure:"redundancy"`
	CreatedAt         *time.Time   `mapstructure:"created_at"`
	UpdatedAt         *time.Time   `mapstructure:"updated_at"`
	DeletedAt         *time.Time   `mapstructure:"deleted_at"`
}

S3 represents a S3 response from the Fastly API.

type S3Redundancy

type S3Redundancy string
const (
	S3RedundancyStandard S3Redundancy = "standard"
	S3RedundancyReduced  S3Redundancy = "reduced_redundancy"
)

type SearchServiceInput

type SearchServiceInput struct {
	Name string
}

SearchServiceInput is used as input to the SearchService function.

type Service

type Service struct {
	ID            string     `mapstructure:"id"`
	Name          string     `mapstructure:"name"`
	Comment       string     `mapstructure:"comment"`
	CustomerID    string     `mapstructure:"customer_id"`
	CreatedAt     string     `mapstructure:"created_at"`
	UpdatedAt     string     `mapstructure:"updated_at"`
	DeletedAt     string     `mapstructure:"deleted_at"`
	ActiveVersion uint       `mapstructure:"version"`
	Versions      []*Version `mapstructure:"versions"`
}

Service represents a single service for the Fastly account.

type ServiceDetail

type ServiceDetail struct {
	ID            string     `mapstructure:"id"`
	Name          string     `mapstructure:"name"`
	Comment       string     `mapstructure:"comment"`
	CustomerID    string     `mapstructure:"customer_id"`
	ActiveVersion Version    `mapstructure:"active_version"`
	Version       Version    `mapstructure:"version"`
	Versions      []*Version `mapstructure:"versions"`
}

type ServiceDomain added in v0.4.3

type ServiceDomain struct {
	Locked    bool       `mapstructure:"locked"`
	Version   int64      `mapstructure:"version"`
	Name      string     `mapstructure:"name"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
	ServiceID string     `mapstructure: "service_id"`
	CreatedAt time.Time  `mapstructure: "created_at"`
	Comment   string     `mapstructure:"comment"`
	UpdatedAt time.Time  `mapstructure:"updated_at"`
}

type ServiceDomainsList added in v0.4.3

type ServiceDomainsList []*ServiceDomain

type ServicesByRegionsUsage added in v0.4.0

type ServicesByRegionsUsage map[string]*ServicesUsage

ServicesByRegionsUsage is a list of ServicesUsage by Fastly's region

type ServicesUsage added in v0.4.0

type ServicesUsage map[string]*Usage

ServicesUsage is a list of usage data by a service

type Settings

type Settings struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	DefaultTTL      uint   `mapstructure:"general.default_ttl"`
	DefaultHost     string `mapstructure:"general.default_host"`
	StaleIfError    bool   `mapstructure:"general.stale_if_error"`
	StaleIfErrorTTL uint   `mapstructure:"general.stale_if_error_ttl"`
}

Settings represents a backend response from the Fastly API.

type Snippet added in v0.4.3

type Snippet struct {
	// ServiceID is the ID of the Service to add the snippet to.
	ServiceID string `mapstructure:"service_id"`

	// Version is the editable version of the service.
	Version int `mapstructure:"version"`

	// Name is the name for the snippet.
	Name string `mapstructure:"name"`

	// ID is the snippet ID
	ID string `mapstructure:"id"`

	// Priority determines the ordering for multiple snippets. Lower numbers execute first.
	Priority int `mapstructure:"priority"`

	// Dynamic sets the snippet version to regular (0) or dynamic (1).
	Dynamic int `mapstructure:"dynamic"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `mapstructure:"content"`

	// Type is the location in generated VCL where the snippet should be placed.
	Type SnippetType `mapstructure:"type"`

	DeletedAt string `mapstructure:"deleted_at"`
	CreatedAt string `mapstructure:"created_at"`
	UpdatedAt string `mapstructure:"updated_at"`
}

Snippet is the Fastly Snippet object

type SnippetType added in v0.4.3

type SnippetType string

SnippetType is the type of VCL Snippet

const (
	// SnippetTypeInit sets the type to init
	SnippetTypeInit SnippetType = "init"

	// SnippetTypeRecv sets the type to recv
	SnippetTypeRecv SnippetType = "recv"

	// SnippetTypeHit sets the type to hit
	SnippetTypeHit SnippetType = "hit"

	// SnippetTypeMiss sets the type to miss
	SnippetTypeMiss SnippetType = "miss"

	// SnippetTypePass sets the type to pass
	SnippetTypePass SnippetType = "pass"

	// SnippetTypeFetch sets the type to fetch
	SnippetTypeFetch SnippetType = "fetch"

	// SnippetTypeError sets the type to error
	SnippetTypeError SnippetType = "error"

	// SnippetTypeDeliver sets the type to deliver
	SnippetTypeDeliver SnippetType = "deliver"

	// SnippetTypeLog sets the type to log
	SnippetTypeLog SnippetType = "log"

	// SnippetTypeNone sets the type to none
	SnippetTypeNone SnippetType = "none"
)

type Splunk added in v0.4.3

type Splunk struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	URL               string     `mapstructure:"url"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	Token             string     `mapstructure:"token"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Splunk represents a splunk response from the Fastly API.

type Stats added in v0.4.0

type Stats struct {
	Requests                  uint64      `mapstructure:"requests"`                 // Number of requests processed.
	Hits                      uint64      `mapstructure:"hits"`                     // Number of cache hits.
	HitsTime                  float64     `mapstructure:"hits_time"`                // Total amount of time spent processing cache hits (in seconds).
	Miss                      uint64      `mapstructure:"miss"`                     // Number of cache misses.
	MissTime                  float64     `mapstructure:"miss_time"`                // Amount of time spent processing cache misses (in seconds).
	Pass                      uint64      `mapstructure:"pass"`                     // Number of requests that passed through the CDN without being cached.
	PassTime                  float64     `mapstructure:"pass_time"`                // Amount of time spent processing cache passes (in seconds).
	Synth                     uint64      `mapstructure:"synth"`                    // Number of requests that returned synth response.
	Errors                    uint64      `mapstructure:"errors"`                   // Number of cache errors.
	Restarts                  uint64      `mapstructure:"restarts"`                 // Number of restarts performed.
	HitRatio                  float64     `mapstructure:"hit_ratio"`                // Ratio of cache hits to cache misses (between 0 and 1).
	Bandwidth                 uint64      `mapstructure:"bandwidth"`                // Total bytes delivered (body_size + header_size).
	RequestBodyBytes          uint64      `mapstructure:"req_body_bytes"`           // Total body bytes received.
	RequestHeaderBytes        uint64      `mapstructure:"req_header_bytes"`         // Total header bytes received.
	ResponseBodyBytes         uint64      `mapstructure:"resp_body_bytes"`          // Total body bytes delivered.
	ResponseHeaderBytes       uint64      `mapstructure:"resp_header_bytes"`        // Total header bytes delivered.
	BERequestBodyBytes        uint64      `mapstructure:"bereq_body_bytes"`         // Total body bytes sent to origin.
	BERequestHeaderbytes      uint64      `mapstructure:"bereq_header_bytes"`       // Total header bytes sent to origin.
	Uncachable                uint64      `mapstructure:"uncachable"`               // Number of requests that were designated uncachable.
	Pipe                      uint64      `mapstructure:"pipe"`                     // Optional. Pipe operations performed (legacy feature).
	TLS                       uint64      `mapstructure:"tls"`                      // Number of requests that were received over TLS.
	TLSv10                    uint64      `mapstructure:"tls_v10"`                  // Number of requests received over TLS 1.0.
	TLSv11                    uint64      `mapstructure:"tls_v11"`                  // Number of requests received over TLS 1.`.
	TLSv12                    uint64      `mapstructure:"tls_v12"`                  // Number of requests received over TLS 1.2.
	TLSv13                    uint64      `mapstructure:"tls_v13"`                  // Number of requests received over TLS 1.3.
	Shield                    uint64      `mapstructure:"shield"`                   // Number of requests from shield to origin.
	ShieldResponseBodyBytes   uint64      `mapstructure:"shield_resp_body_bytes"`   // Total body bytes delivered via a shield.
	ShieldResponseHeaderBytes uint64      `mapstructure:"shield_resp_header_bytes"` // Total header bytes delivered via a shield.
	IPv6                      uint64      `mapstructure:"ipv6"`                     // Number of requests that were received over IPv6.
	OTFP                      uint64      `mapstructure:"otfp"`                     // Number of responses that came from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand.
	Video                     uint64      `mapstructure:"video"`                    // Number of responses with the video segment or video manifest MIME type (i.e., application/x-mpegurl, application/vnd.apple.mpegurl, application/f4m, application/dash+xml, application/vnd.ms-sstr+xml, ideo/mp2t, audio/aac, video/f4f, video/x-flv, video/mp4, audio/mp4).
	PCI                       uint64      `mapstructure:"pci"`                      // Number of responses with the PCI flag turned on.
	Log                       uint64      `mapstructure:"log"`                      // Number of log lines sent.
	HTTP2                     uint64      `mapstructure:"http2"`                    // Number of requests received over HTTP2.
	WAFLogged                 uint64      `mapstructure:"waf_logged"`               // Number of requests that triggered a WAF rule and were logged.
	WAFBlocked                uint64      `mapstructure:"waf_blocked"`              // Number of requests that triggered a WAF rule and were blocked.
	WAFPassed                 uint64      `mapstructure:"waf_passed"`               // Number of requests that triggered a WAF rule and were passed.
	AttackRequestBodyBytes    uint64      `mapstructure:"attack_req_body_bytes"`    // Total body bytes received from requests that triggered a WAF rule.
	AttachRequestHeaderBytes  uint64      `mapstructure:"attack_req_header_bytes"`  // Total header bytes received from requests that triggered a WAF rule.
	AttackResponseSynthBytes  uint64      `mapstructure:"attack_resp_synth_bytes"`  // Total bytes delivered for requests that triggered a WAF rule and returned a synthetic response.
	ImageOptimizer            uint64      `mapstructure:"imgopto"`                  // Number of responses that came from the Fastly Image Optimizer service.
	Status200                 uint64      `mapstructure:"status_200"`               // Number of responses sent with status code 200 (Success).
	Status204                 uint64      `mapstructure:"status_204"`               // Number of responses sent with status code 204 (No Content).
	Status301                 uint64      `mapstructure:"status_301"`               // Number of responses sent with status code 301 (Moved Permanently).
	Status302                 uint64      `mapstructure:"status_302"`               // Number of responses sent with status code 302 (Found).
	Status304                 uint64      `mapstructure:"status_304"`               // Number of responses sent with status code 304 (Not Modified).
	Status400                 uint64      `mapstructure:"status_400"`               // Number of responses sent with status code 400 (Bad Request).
	Status401                 uint64      `mapstructure:"status_401"`               // Number of responses sent with status code 401 (Unauthorized).
	Status403                 uint64      `mapstructure:"status_403"`               // Number of responses sent with status code 403 (Forbidden).
	Status404                 uint64      `mapstructure:"status_404"`               // Number of responses sent with status code 404 (Not Found).
	Status416                 uint64      `mapstructure:"status_416"`               // Number of responses sent with status code 416 (Range Not Satisfiable).
	Status500                 uint64      `mapstructure:"status_500"`               // Number of responses sent with status code 500 (Internal Server Error).
	Status501                 uint64      `mapstructure:"status_501"`               // Number of responses sent with status code 501 (Not Implemented).
	Status502                 uint64      `mapstructure:"status_502"`               // Number of responses sent with status code 502 (Bad Gateway).
	Status503                 uint64      `mapstructure:"status_503"`               // Number of responses sent with status code 503 (Service Unavailable).
	Status504                 uint64      `mapstructure:"status_504"`               // Number of responses sent with status code 504 (Gateway Timeout).
	Status505                 uint64      `mapstructure:"status_505"`               // Number of responses sent with status code 505 (HTTP Version Not Supported).
	Status1xx                 uint64      `mapstructure:"status_1xx"`               // Number of "Informational" category status codes delivered.
	Status2xx                 uint64      `mapstructure:"status_2xx"`               // Number of "Success" status codes delivered.
	Status3xx                 uint64      `mapstructure:"status_3xx"`               // Number of "Redirection" codes delivered.
	Status4xx                 uint64      `mapstructure:"status_4xx"`               // Number of "Client Error" codes delivered.
	Status5xx                 uint64      `mapstructure:"status_5xx"`               // Number of "Server Error" codes delivered.
	ObjectSize1k              uint64      `mapstructure:"object_size_1k"`           // Number of objects served that were under 1KB in size.
	ObjectSize10k             uint64      `mapstructure:"object_size_10k"`          // Number of objects served that were between 1KB and 10KB in size.
	ObjectSize100k            uint64      `mapstructure:"object_size_100k"`         // Number of objects served that were between 10KB and 100KB in size.
	ObjectSize1m              uint64      `mapstructure:"object_size_1m"`           // Number of objects served that were between 100KB and 1MB in size.
	ObjectSize10m             uint64      `mapstructure:"object_size_10m"`          // Number of objects served that were between 1MB and 10MB in size.
	ObjectSize100m            uint64      `mapstructure:"object_size_100m"`         // Number of objects served that were between 10MB and 100MB in size.
	ObjectSize1g              uint64      `mapstructure:"object_size_1g"`           // Number of objects served that were between 100MB and 1GB in size.
	MissHistogram             map[int]int `mapstructure:"miss_histogram"`           // Number of requests to origin in time buckets of 10s of milliseconds
	BilledHeaderBytes         uint64      `mapstructure:"billed_header_bytes"`
	BilledBodyBytes           uint64      `mapstructure:"billed_body_bytes"`
}

Stats represent metrics of a Fastly service

type StatsResponse added in v0.4.0

type StatsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    []*Stats          `mapstructure:"data"`
}

StatsResponse is a response from the service stats API endpoint

type Sumologic

type Sumologic struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	URL               string     `mapstructure:"url"`
	Format            string     `mapstructure:"format"`
	ResponseCondition string     `mapstructure:"response_condition"`
	MessageType       string     `mapstructure:"message_type"`
	FormatVersion     int        `mapstructure:"format_version"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Sumologic represents a sumologic response from the Fastly API.

type Syslog

type Syslog struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Hostname          string     `mapstructure:"hostname"`
	Port              uint       `mapstructure:"port"`
	UseTLS            bool       `mapstructure:"use_tls"`
	IPV4              string     `mapstructure:"ipv4"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	MessageType       string     `mapstructure:"message_type"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Syslog represents a syslog response from the Fastly API.

type UpdateACLEntryInput added in v0.4.0

type UpdateACLEntryInput struct {
	// Required fields
	Service string
	ACL     string
	ID      string

	// Optional fields
	IP      string `form:"ip,omitempty"`
	Subnet  string `form:"subnet,omitempty"`
	Negated bool   `form:"negated,omitempty"`
	Comment string `form:"comment,omitempty"`
}

UpdateACLEntryInput is the input parameter to UpdateACLEntry function.

type UpdateACLInput added in v0.4.0

type UpdateACLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the ACL to update (required).
	Name string

	// NewName is the new name of the ACL to update (required).
	NewName string `form:"name"`
}

UpdateACLInput is the input parameter to UpdateACL function.

type UpdateBackendInput

type UpdateBackendInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the backend to update.
	Name string

	NewName             string       `form:"name,omitempty"`
	Comment             string       `form:"comment,omitempty"`
	Address             string       `form:"address,omitempty"`
	Port                uint         `form:"port,omitempty"`
	ConnectTimeout      uint         `form:"connect_timeout,omitempty"`
	MaxConn             uint         `form:"max_conn,omitempty"`
	ErrorThreshold      uint         `form:"error_threshold,omitempty"`
	FirstByteTimeout    uint         `form:"first_byte_timeout,omitempty"`
	BetweenBytesTimeout uint         `form:"between_bytes_timeout,omitempty"`
	AutoLoadbalance     *Compatibool `form:"auto_loadbalance,omitempty"`
	Weight              uint         `form:"weight,omitempty"`
	RequestCondition    string       `form:"request_condition,omitempty"`
	HealthCheck         string       `form:"healthcheck,omitempty"`
	Shield              string       `form:"shield,omitempty"`
	UseSSL              *Compatibool `form:"use_ssl,omitempty"`
	SSLCheckCert        *Compatibool `form:"ssl_check_cert,omitempty"`
	SSLCACert           string       `form:"ssl_ca_cert,omitempty"`
	SSLClientCert       string       `form:"ssl_client_cert,omitempty"`
	SSLClientKey        string       `form:"ssl_client_key,omitempty"`
	SSLHostname         string       `form:"ssl_hostname,omitempty"`
	SSLCertHostname     string       `form:"ssl_cert_hostname,omitempty"`
	SSLSNIHostname      string       `form:"ssl_sni_hostname,omitempty"`
	MinTLSVersion       string       `form:"min_tls_version,omitempty"`
	MaxTLSVersion       string       `form:"max_tls_version,omitempty"`
	SSLCiphers          []string     `form:"ssl_ciphers,omitempty"`
}

UpdateBackendInput is used as input to the UpdateBackend function.

type UpdateBigQueryInput added in v0.4.3

type UpdateBigQueryInput struct {
	// Service is the ID of the service.
	// This field is required.
	Service string

	//Version is the specific configuration version.
	// This field is required.
	Version int

	// Name is the old name if your bigquery logging endpoint.
	// Used to identify the correct BigQuery logging endpoint if there
	// is a name change.
	// This field is required.
	Name string

	// NewName is the new name of your BigQuery logging endpoint.
	// This field is required.
	NewName string

	// Project ID your GCP project ID.
	ProjectID string

	// Dataset is your BigQuery dataset.
	Dataset string

	// Table is your BigQuery table.
	Table string

	// Template is your BigQuery template suffix.
	Template string

	// User is the user with access to write to your BigQuery dataset.
	User string

	// Secret key is the user's secret key.
	SecretKey string

	// Format is the log formatting desired for your BigQuery dataset.
	// Optional.
	Format string

	// ResponseCondition allows you to attach a response condition to your BigQuery logging endpoint.
	// Optional.
	ResponseCondition string

	// Placement is the log placement desired for your BigQuery logging endpoint.
	// Optional.
	Placement string
}

UpdateBigQueryInput is used as input to the UpdateBigQuery function.

type UpdateBlobStorageInput added in v0.4.3

type UpdateBlobStorageInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the blob storage to update.
	Name string

	NewName           string `form:"name,omitempty"`
	Path              string `form:"path,omitempty"`
	AccountName       string `form:"account_name,omitempty"`
	Container         string `form:"container,omitempty"`
	SASToken          string `form:"sas_token,omitempty"`
	Period            uint   `form:"period,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	GzipLevel         uint   `form:"gzip_level,omitempty"`
	PublicKey         string `form:"public_key,omitempty"`
	Format            string `form:"format,omitempty"`
	FormatVersion     uint   `form:"format_version,omitempty"`
	MessageType       string `form:"message_type,omitempty"`
	Placement         string `form:"placement,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
}

UpdateBlobStorageInput is used as input to the UpdateBlobStorage function.

type UpdateCacheSettingInput

type UpdateCacheSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the cache setting to update.
	Name string

	NewName        string             `form:"name,omitempty"`
	Action         CacheSettingAction `form:"action,omitempty"`
	TTL            uint               `form:"ttl,omitempty"`
	StaleTTL       uint               `form:"stale_ttl,omitempty"`
	CacheCondition string             `form:"cache_condition,omitempty"`
}

UpdateCacheSettingInput is used as input to the UpdateCacheSetting function.

type UpdateConditionInput

type UpdateConditionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the condition to update.
	Name string

	Comment   string `form:"comment,omitempty"`
	Statement string `form:"statement,omitempty"`
	Type      string `form:"type,omitempty"`
	Priority  int    `form:"priority,omitempty"`
}

UpdateConditionInput is used as input to the UpdateCondition function.

type UpdateDictionaryInput

type UpdateDictionaryInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the dictionary to update.
	Name string

	NewName   string       `form:"name,omitempty"`
	WriteOnly *Compatibool `form:"write_only,omitempty"`
}

UpdateDictionaryInput is used as input to the UpdateDictionary function.

type UpdateDictionaryItemInput

type UpdateDictionaryItemInput struct {
	// Service is the ID of the service. Dictionary is the ID of the dictionary.
	// Both fields are required.
	Service    string
	Dictionary string

	// ItemKey is the name of the dictionary item to fetch.
	ItemKey string

	ItemValue string `form:"item_value,omitempty"`
}

UpdateDictionaryItemInput is used as input to the UpdateDictionaryItem function.

type UpdateDirectorInput

type UpdateDirectorInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the director to update.
	Name string

	NewName  string       `form:"name,omitempty"`
	Comment  string       `form:"comment,omitempty"`
	Shield   string       `form:"shield,omitempty"`
	Quorum   uint         `form:"quorum,omitempty"`
	Type     DirectorType `form:"type,omitempty"`
	Retries  uint         `form:"retries,omitempty"`
	Capacity uint         `form:"capacity,omitempty"`
}

UpdateDirectorInput is used as input to the UpdateDirector function.

type UpdateDomainInput

type UpdateDomainInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the domain that the service will respond to (required).
	Name string

	// NewName is the updated name of the domain
	NewName string `form:"name"`

	// Comment is a personal, freeform descriptive note.
	Comment string `form:"comment,omitempty"`
}

UpdateDomainInput is used as input to the UpdateDomain function.

type UpdateDynamicSnippetInput added in v0.4.3

type UpdateDynamicSnippetInput struct {
	// Service is the ID of the Service to add the snippet to.
	Service string

	// ID is the ID of the Snippet to modify
	ID string

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `form:"content"`
}

UpdateDynamicSnippetInput is the input for UpdateDynamicSnippet

type UpdateFTPInput

type UpdateFTPInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the FTP to update.
	Name string

	NewName           string `form:"name,omitempty"`
	Address           string `form:"address,omitempty"`
	Port              uint   `form:"port,omitempty"`
	Username          string `form:"user,omitempty"`
	Password          string `form:"password,omitempty"`
	Path              string `form:"path,omitempty"`
	Period            uint   `form:"period,omitempty"`
	GzipLevel         uint8  `form:"gzip_level,omitempty"`
	Format            string `form:"format,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

UpdateFTPInput is used as input to the UpdateFTP function.

type UpdateGCSInput

type UpdateGCSInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the GCS to update.
	Name string

	NewName           string `form:"name,omitempty"`
	Bucket            string `form:"bucket_name,omitempty"`
	User              string `form:"user,omitempty"`
	SecretKey         string `form:"secret_key,omitempty"`
	Path              string `form:"path,omitempty"`
	Period            uint   `form:"period,omitempty"`
	GzipLevel         uint8  `form:"gzip_level,omitempty"`
	Format            string `form:"format,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	TimestampFormat   string `form:"timestamp_format,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

UpdateGCSInput is used as input to the UpdateGCS function.

type UpdateGzipInput

type UpdateGzipInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the Gzip to update.
	Name string

	NewName        string `form:"name,omitempty"`
	ContentTypes   string `form:"content_types,omitempty"`
	Extensions     string `form:"extensions,omitempty"`
	CacheCondition string `form:"cache_condition,omitempty"`
}

UpdateGzipInput is used as input to the UpdateGzip function.

type UpdateHeaderInput

type UpdateHeaderInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the header to update.
	Name string

	NewName           string       `form:"name,omitempty"`
	Action            HeaderAction `form:"action,omitempty"`
	IgnoreIfSet       *Compatibool `form:"ignore_if_set,omitempty"`
	Type              HeaderType   `form:"type,omitempty"`
	Destination       string       `form:"dst,omitempty"`
	Source            string       `form:"src,omitempty"`
	Regex             string       `form:"regex,omitempty"`
	Substitution      string       `form:"substitution,omitempty"`
	Priority          uint         `form:"priority,omitempty"`
	RequestCondition  string       `form:"request_condition,omitempty"`
	CacheCondition    string       `form:"cache_condition,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
}

UpdateHeaderInput is used as input to the UpdateHeader function.

type UpdateHealthCheckInput

type UpdateHealthCheckInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the health check to update.
	Name string

	NewName          string `form:"name,omitempty"`
	Comment          string `form:"comment,omitempty"`
	Method           string `form:"method,omitempty"`
	Host             string `form:"host,omitempty"`
	Path             string `form:"path,omitempty"`
	HTTPVersion      string `form:"http_version,omitempty"`
	Timeout          uint   `form:"timeout,omitempty"`
	CheckInterval    uint   `form:"check_interval,omitempty"`
	ExpectedResponse uint   `form:"expected_response,omitempty"`
	Window           uint   `form:"window,omitempty"`
	Threshold        uint   `form:"threshold,omitempty"`
	Initial          uint   `form:"initial,omitempty"`
}

UpdateHealthCheckInput is used as input to the UpdateHealthCheck function.

type UpdateLogentriesInput

type UpdateLogentriesInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the logentries to update.
	Name string

	NewName           string       `form:"name,omitempty"`
	Port              uint         `form:"port,omitempty"`
	UseTLS            *Compatibool `form:"use_tls,omitempty"`
	Token             string       `form:"token,omitempty"`
	Format            string       `form:"format,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

UpdateLogentriesInput is used as input to the UpdateLogentries function.

type UpdateOWASPInput added in v0.4.3

type UpdateOWASPInput struct {
	// Service is the ID of the service. ID is the ID of the firewall.
	// Both fields are required.
	Service string
	ID      string
	OWASPID string `jsonapi:"primary,owasp,omitempty"`

	Type                             string     `jsonapi:"attr,type"`
	AllowedHTTPVersions              string     `jsonapi:"attr,allowed_http_versions,omitempty"`
	AllowedMethods                   string     `jsonapi:"attr,allowed_methods,omitempty"`
	AllowedRequestContentType        string     `jsonapi:"attr,allowed_request_content_type,omitempty"`
	AllowedRequestContentTypeCharset string     `jsonapi:"attr,allowed_request_content_type_charset,omitempty"`
	ArgLength                        int        `jsonapi:"attr,arg_length,omitempty"`
	ArgNameLength                    int        `jsonapi:"attr,arg_name_length,omitempty"`
	CombinedFileSizes                int        `jsonapi:"attr,combined_file_sizes,omitempty"`
	CreatedAt                        *time.Time `jsonapi:"attr,created_at,omitempty,iso8601"`
	CriticalAnomalyScore             int        `jsonapi:"attr,critical_anomaly_score,omitempty"`
	CRSValidateUTF8Encoding          bool       `jsonapi:"attr,crs_validate_utf8_encoding,omitempty"`
	ErrorAnomalyScore                int        `jsonapi:"attr,error_anomaly_score,omitempty"`
	HighRiskCountryCodes             string     `jsonapi:"attr,high_risk_country_codes,omitempty"`
	HTTPViolationScoreThreshold      int        `jsonapi:"attr,http_violation_score_threshold,omitempty"`
	InboundAnomalyScoreThreshold     int        `jsonapi:"attr,inbound_anomaly_score_threshold,omitempty"`
	LFIScoreThreshold                int        `jsonapi:"attr,lfi_score_threshold,omitempty"`
	MaxFileSize                      int        `jsonapi:"attr,max_file_size,omitempty"`
	MaxNumArgs                       int        `jsonapi:"attr,max_num_args,omitempty"`
	NoticeAnomalyScore               int        `jsonapi:"attr,notice_anomaly_score,omitempty"`
	ParanoiaLevel                    int        `jsonapi:"attr,paranoia_level,omitempty"`
	PHPInjectionScoreThreshold       int        `jsonapi:"attr,php_injection_score_threshold,omitempty"`
	RCEScoreThreshold                int        `jsonapi:"attr,rce_score_threshold,omitempty"`
	RestrictedExtensions             string     `jsonapi:"attr,restricted_extensions,omitempty"`
	RestrictedHeaders                string     `jsonapi:"attr,restricted_headers,omitempty"`
	RFIScoreThreshold                int        `jsonapi:"attr,rfi_score_threshold,omitempty"`
	SessionFixationScoreThreshold    int        `jsonapi:"attr,session_fixation_score_threshold,omitempty"`
	SQLInjectionScoreThreshold       int        `jsonapi:"attr,sql_injection_score_threshold,omitempty"`
	TotalArgLength                   int        `jsonapi:"attr,total_arg_length,omitempty"`
	UpdatedAt                        *time.Time `jsonapi:"attr,updated_at,omitempty,iso8601"`
	WarningAnomalyScore              int        `jsonapi:"attr,warning_anomaly_score,omitempty"`
	XSSScoreThreshold                int        `jsonapi:"attr,xss_score_threshold,omitempty"`
}

UpdateOWASPInput is used as input to the CreateOWASP function.

type UpdatePapertrailInput

type UpdatePapertrailInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the papertrail to update.
	Name string

	NewName           string     `form:"name,omitempty"`
	Address           string     `form:"address,omitempty"`
	Port              uint       `form:"port,omitempty"`
	Format            string     `form:"format,omitempty"`
	ResponseCondition string     `form:"response_condition,omitempty"`
	CreatedAt         *time.Time `form:"created_at,omitempty"`
	UpdatedAt         *time.Time `form:"updated_at,omitempty"`
	DeletedAt         *time.Time `form:"deleted_at,omitempty"`
	Placement         string     `form:"placement,omitempty"`
}

UpdatePapertrailInput is used as input to the UpdatePapertrail function.

type UpdateRequestSettingInput

type UpdateRequestSettingInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the request settings to update.
	Name string

	NewName          string               `form:"name,omitempty"`
	ForceMiss        *Compatibool         `form:"force_miss,omitempty"`
	ForceSSL         *Compatibool         `form:"force_ssl,omitempty"`
	Action           RequestSettingAction `form:"action,omitempty"`
	BypassBusyWait   *Compatibool         `form:"bypass_busy_wait,omitempty"`
	MaxStaleAge      uint                 `form:"max_stale_age,omitempty"`
	HashKeys         string               `form:"hash_keys,omitempty"`
	XForwardedFor    RequestSettingXFF    `form:"xff,omitempty"`
	TimerSupport     *Compatibool         `form:"timer_support,omitempty"`
	GeoHeaders       *Compatibool         `form:"geo_headers,omitempty"`
	DefaultHost      string               `form:"default_host,omitempty"`
	RequestCondition string               `form:"request_condition,omitempty"`
}

UpdateRequestSettingInput is used as input to the UpdateRequestSetting function.

type UpdateResponseObjectInput

type UpdateResponseObjectInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the response object to update.
	Name string

	NewName          string `form:"name,omitempty"`
	Status           uint   `form:"status,omitempty"`
	Response         string `form:"response,omitempty"`
	Content          string `form:"content,omitempty"`
	ContentType      string `form:"content_type,omitempty"`
	RequestCondition string `form:"request_condition,omitempty"`
	CacheCondition   string `form:"cache_condition,omitempty"`
}

UpdateResponseObjectInput is used as input to the UpdateResponseObject function.

type UpdateS3Input

type UpdateS3Input struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the S3 to update.
	Name string

	NewName           string       `form:"name,omitempty"`
	BucketName        string       `form:"bucket_name,omitempty"`
	Domain            string       `form:"domain,omitempty"`
	AccessKey         string       `form:"access_key,omitempty"`
	SecretKey         string       `form:"secret_key,omitempty"`
	Path              string       `form:"path,omitempty"`
	Period            uint         `form:"period,omitempty"`
	GzipLevel         uint         `form:"gzip_level,omitempty"`
	Format            string       `form:"format,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	MessageType       string       `form:"message_type,omitempty"`
	TimestampFormat   string       `form:"timestamp_format,omitempty"`
	Redundancy        S3Redundancy `form:"redundancy,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

UpdateS3Input is used as input to the UpdateS3 function.

type UpdateServiceInput

type UpdateServiceInput struct {
	ID string

	Name    string `form:"name,omitempty"`
	Comment string `form:"comment,omitempty"`
}

UpdateServiceInput is used as input to the UpdateService function.

type UpdateSettingsInput

type UpdateSettingsInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	DefaultTTL      uint   `form:"general.default_ttl"`
	DefaultHost     string `form:"general.default_host,omitempty"`
	StaleIfError    bool   `form:"general.stale_if_error,omitempty"`
	StaleIfErrorTTL uint   `form:"general.stale_if_error_ttl,omitempty"`
}

UpdateSettingsInput is used as input to the UpdateSettings function.

type UpdateSnippetInput added in v0.4.3

type UpdateSnippetInput struct {
	// Service is the ID of the Service to add the snippet to.
	Service string

	// Version is the editable version of the service
	Version int

	Name string

	// Name is the name for the snippet.
	NewName string `form:"name"`

	// Priority determines the ordering for multiple snippets. Lower numbers execute first.
	Priority int `form:"priority"`

	// Dynamic sets the snippet version to regular (0) or dynamic (1).
	Dynamic int `form:"dynamic"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `form:"content"`

	// Type is the location in generated VCL where the snippet should be placed.
	Type SnippetType `form:"type"`
}

UpdateSnippetInput is the input for UpdateSnippet

type UpdateSplunkInput added in v0.4.3

type UpdateSplunkInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the splunk to update.
	Name string

	NewName           string `form:"name,omitempty"`
	URL               string `form:"url,omitempty"`
	Format            string `form:"format,omitempty"`
	FormatVersion     uint   `form:"format_version,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	Placement         string `form:"placement,omitempty"`
	Token             string `form:"token,omitempty"`
}

UpdateSplunkInput is used as input to the UpdateSplunk function.

type UpdateSumologicInput

type UpdateSumologicInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the sumologic to update.
	Name string

	NewName           string `form:"name,omitempty"`
	Address           string `form:"address,omitempty"`
	URL               string `form:"url,omitempty"`
	Format            string `form:"format,omitempty"`
	ResponseCondition string `form:"response_condition,omitempty"`
	MessageType       string `form:"message_type,omitempty"`
	FormatVersion     int    `form:"format_version,omitempty"`
	Placement         string `form:"placement,omitempty"`
}

UpdateSumologicInput is used as input to the UpdateSumologic function.

type UpdateSyslogInput

type UpdateSyslogInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the syslog to update.
	Name string

	NewName           string       `form:"name,omitempty"`
	Address           string       `form:"address,omitempty"`
	Hostname          string       `form:"hostname,omitempty"`
	Port              uint         `form:"port,omitempty"`
	UseTLS            *Compatibool `form:"use_tls,omitempty"`
	IPV4              string       `form:"ipv4,omitempty"`
	TLSCACert         string       `form:"tls_ca_cert,omitempty"`
	TLSHostname       string       `form:"tls_hostname,omitempty"`
	Token             string       `form:"token,omitempty"`
	Format            string       `form:"format,omitempty"`
	FormatVersion     uint         `form:"format_version,omitempty"`
	MessageType       string       `form:"message_type,omitempty"`
	ResponseCondition string       `form:"response_condition,omitempty"`
	Placement         string       `form:"placement,omitempty"`
}

UpdateSyslogInput is used as input to the UpdateSyslog function.

type UpdateVCLInput

type UpdateVCLInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// Name is the name of the VCL to update (required).
	Name string

	NewName string `form:"name,omitempty"`
	Content string `form:"content,omitempty"`
}

UpdateVCLInput is used as input to the UpdateVCL function.

type UpdateVersionInput

type UpdateVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	// A personal freeform descriptive note.
	Comment string `form:"comment,omitempty"`
}

UpdateVersionInput is the input to the UpdateVersion function.

type UpdateWAFConfigSetInput added in v0.4.3

type UpdateWAFConfigSetInput struct {
	WAFList     []ConfigSetWAFs
	ConfigSetID string
}

UpdateWAFConfigSetInput is used as input to the UpdateWAFConfigSet function.

type UpdateWAFConfigSetResponse added in v0.4.3

type UpdateWAFConfigSetResponse struct {
	IDs []ConfigSetWAFs `jsonapi:"primary,waf"`
}

UpdateWAFConfigSetResponse stores the list of WAFs returned from the call to update its config set

type UpdateWAFInput added in v0.4.2

type UpdateWAFInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int

	ID                string `jsonapi:"primary,waf"`
	PrefetchCondition string `jsonapi:"attr,prefetch_condition,omitempty"`
	Response          string `jsonapi:"attr,response,omitempty"`
}

UpdateWAFInput is used as input to the UpdateWAF function.

type UpdateWAFRuleRuleSetsInput added in v0.4.3

type UpdateWAFRuleRuleSetsInput struct {
	// Service is the ID of the service. ID is the ID of the firewall.
	// Both fields are required.
	Service string
	ID      string `jsonapi:"primary,ruleset"`
}

UpdateWAFRuleRuleSetsInput is used as input to the UpdateWAFRuleSets function.

type UpdateWAFRuleStatusInput added in v0.4.3

type UpdateWAFRuleStatusInput struct {
	ID      string `jsonapi:"primary,rule_status"` // The ID of the rule status. Currently in the format ${WAF_ID}-${rule_ID}.
	RuleID  int
	Service string
	WAF     string
	Status  string `jsonapi:"attr,status"`
}

UpdateWAFRuleStatusInput specifies the parameters for the UpdateWAFRuleStatus call.

type UpdateWAFRuleTagStatusInput added in v0.4.3

type UpdateWAFRuleTagStatusInput struct {
	Service string
	WAF     string
	Status  string `json:"status"` // `jsonapi:"attr,status"`
	Tag     string `json:"name"`   // `jsonapi:"attr,name"`
	Force   bool   `json:"force"`  // `jsonapi:"attr,force"`

}

UpdateWAFRuleTagStatusInput specifies the parameters for the UpdateWAFRuleStatus call.

type Usage added in v0.4.0

type Usage struct {
	Requests  uint64 `mapstructure:"requests"`
	Bandwidth uint64 `mapstructure:"bandwidth"`
}

Usage represents usage data of a single service or region

type UsageByServiceResponse added in v0.4.0

type UsageByServiceResponse struct {
	Status  string                  `mapstructure:"status"`
	Meta    map[string]string       `mapstructure:"meta"`
	Message string                  `mapstructure:"msg"`
	Data    *ServicesByRegionsUsage `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type UsageResponse added in v0.4.0

type UsageResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    *RegionsUsage     `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type UsageStatsResponse added in v0.4.0

type UsageStatsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    map[string]*Usage `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type VCL

type VCL struct {
	ServiceID string `mapstructure:"service_id"`
	Version   int    `mapstructure:"version"`

	Name    string `mapstructure:"name"`
	Main    bool   `mapstructure:"main"`
	Content string `mapstructure:"content"`
}

VCL represents a response about VCL from the Fastly API.

type ValidateVersionInput

type ValidateVersionInput struct {
	// Service is the ID of the service. Version is the specific configuration
	// version. Both fields are required.
	Service string
	Version int
}

ValidateVersionInput is the input to the ValidateVersion function.

type Version

type Version struct {
	Number    int    `mapstructure:"number"`
	Comment   string `mapstructure:"comment"`
	ServiceID string `mapstructure:"service_id"`
	Active    bool   `mapstructure:"active"`
	Locked    bool   `mapstructure:"locked"`
	Deployed  bool   `mapstructure:"deployed"`
	Staging   bool   `mapstructure:"staging"`
	Testing   bool   `mapstructure:"testing"`
}

Version represents a distinct configuration version.

type WAF added in v0.4.2

type WAF struct {
	ID                string     `jsonapi:"primary,waf"`
	Version           int        `jsonapi:"attr,version"`
	PrefetchCondition string     `jsonapi:"attr,prefetch_condition"`
	Response          string     `jsonapi:"attr,response"`
	LastPush          *time.Time `jsonapi:"attr,last_push,iso8601"`

	ConfigurationSet *WAFConfigurationSet `jsonapi:"relation,configuration_set"`
}

WAF is the information about a firewall object.

type WAFConfigurationSet added in v0.4.2

type WAFConfigurationSet struct {
	ID string `jsonapi:"primary,configuration_set"`
}

WAFConfigurationSet represents information about a configuration_set.

type WAFRuleStatus added in v0.4.3

type WAFRuleStatus struct {
	ID     string `jsonapi:"primary,rule_status"` // This is the ID of the status, not the ID of the rule. Currently, it is of the format ${WAF_ID}-${rule_ID}, if you want to infer those based on this field.
	Status string `jsonapi:"attr,status"`

	Tag string `jsonapi:"attr,name,omitempty"` // This will only be set in a response for modifying rules based on tag.

}

WAFRuleStatus stores the information about a rule received from Fastly

Jump to

Keyboard shortcuts

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