Documentation ¶
Index ¶
- Constants
- Variables
- type ACL
- type ACLEntry
- type ACLsByName
- type ActivateVCLInput
- type ActivateVersionInput
- type Backend
- type Billing
- type BillingExtra
- type BillingStatus
- type BillingTotal
- type CacheSetting
- type CacheSettingAction
- type Client
- func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error)
- func (c *Client) ActivateVersion(i *ActivateVersionInput) (*Version, error)
- func (c *Client) CloneVersion(i *CloneVersionInput) (*Version, error)
- func (c *Client) CreateACL(i *CreateACLInput) (*ACL, error)
- func (c *Client) CreateACLEntry(i *CreateACLEntryInput) (*ACLEntry, error)
- func (c *Client) CreateBackend(i *CreateBackendInput) (*Backend, error)
- func (c *Client) CreateCacheSetting(i *CreateCacheSettingInput) (*CacheSetting, error)
- func (c *Client) CreateCondition(i *CreateConditionInput) (*Condition, error)
- func (c *Client) CreateDictionary(i *CreateDictionaryInput) (*Dictionary, error)
- func (c *Client) CreateDictionaryItem(i *CreateDictionaryItemInput) (*DictionaryItem, error)
- func (c *Client) CreateDirector(i *CreateDirectorInput) (*Director, error)
- func (c *Client) CreateDirectorBackend(i *CreateDirectorBackendInput) (*DirectorBackend, error)
- func (c *Client) CreateDomain(i *CreateDomainInput) (*Domain, error)
- func (c *Client) CreateFTP(i *CreateFTPInput) (*FTP, error)
- func (c *Client) CreateGCS(i *CreateGCSInput) (*GCS, error)
- func (c *Client) CreateGzip(i *CreateGzipInput) (*Gzip, error)
- func (c *Client) CreateHeader(i *CreateHeaderInput) (*Header, error)
- func (c *Client) CreateHealthCheck(i *CreateHealthCheckInput) (*HealthCheck, error)
- func (c *Client) CreateLogentries(i *CreateLogentriesInput) (*Logentries, error)
- func (c *Client) CreatePapertrail(i *CreatePapertrailInput) (*Papertrail, error)
- func (c *Client) CreateRequestSetting(i *CreateRequestSettingInput) (*RequestSetting, error)
- func (c *Client) CreateResponseObject(i *CreateResponseObjectInput) (*ResponseObject, error)
- func (c *Client) CreateS3(i *CreateS3Input) (*S3, error)
- func (c *Client) CreateService(i *CreateServiceInput) (*Service, error)
- func (c *Client) CreateSumologic(i *CreateSumologicInput) (*Sumologic, error)
- func (c *Client) CreateSyslog(i *CreateSyslogInput) (*Syslog, error)
- func (c *Client) CreateVCL(i *CreateVCLInput) (*VCL, error)
- func (c *Client) CreateVersion(i *CreateVersionInput) (*Version, error)
- func (c *Client) CreateWAF(i *CreateWAFInput) (*WAF, error)
- func (c *Client) DeactivateVersion(i *DeactivateVersionInput) (*Version, error)
- func (c *Client) Delete(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) DeleteACL(i *DeleteACLInput) error
- func (c *Client) DeleteACLEntry(i *DeleteACLEntryInput) error
- func (c *Client) DeleteBackend(i *DeleteBackendInput) error
- func (c *Client) DeleteCacheSetting(i *DeleteCacheSettingInput) error
- func (c *Client) DeleteCondition(i *DeleteConditionInput) error
- func (c *Client) DeleteDictionary(i *DeleteDictionaryInput) error
- func (c *Client) DeleteDictionaryItem(i *DeleteDictionaryItemInput) error
- func (c *Client) DeleteDirector(i *DeleteDirectorInput) error
- func (c *Client) DeleteDirectorBackend(i *DeleteDirectorBackendInput) error
- func (c *Client) DeleteDomain(i *DeleteDomainInput) error
- func (c *Client) DeleteFTP(i *DeleteFTPInput) error
- func (c *Client) DeleteGCS(i *DeleteGCSInput) error
- func (c *Client) DeleteGzip(i *DeleteGzipInput) error
- func (c *Client) DeleteHeader(i *DeleteHeaderInput) error
- func (c *Client) DeleteHealthCheck(i *DeleteHealthCheckInput) error
- func (c *Client) DeleteLogentries(i *DeleteLogentriesInput) error
- func (c *Client) DeletePapertrail(i *DeletePapertrailInput) error
- func (c *Client) DeleteRequestSetting(i *DeleteRequestSettingInput) error
- func (c *Client) DeleteResponseObject(i *DeleteResponseObjectInput) error
- func (c *Client) DeleteS3(i *DeleteS3Input) error
- func (c *Client) DeleteService(i *DeleteServiceInput) error
- func (c *Client) DeleteSumologic(i *DeleteSumologicInput) error
- func (c *Client) DeleteSyslog(i *DeleteSyslogInput) error
- func (c *Client) DeleteVCL(i *DeleteVCLInput) error
- func (c *Client) DeleteWAF(i *DeleteWAFInput) error
- func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error)
- func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) GetACL(i *GetACLInput) (*ACL, error)
- func (c *Client) GetACLEntry(i *GetACLEntryInput) (*ACLEntry, error)
- func (c *Client) GetBackend(i *GetBackendInput) (*Backend, error)
- func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error)
- func (c *Client) GetCacheSetting(i *GetCacheSettingInput) (*CacheSetting, error)
- func (c *Client) GetCondition(i *GetConditionInput) (*Condition, error)
- func (c *Client) GetDictionary(i *GetDictionaryInput) (*Dictionary, error)
- func (c *Client) GetDictionaryItem(i *GetDictionaryItemInput) (*DictionaryItem, error)
- func (c *Client) GetDiff(i *GetDiffInput) (*Diff, error)
- func (c *Client) GetDirector(i *GetDirectorInput) (*Director, error)
- func (c *Client) GetDirectorBackend(i *GetDirectorBackendInput) (*DirectorBackend, error)
- func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error)
- func (c *Client) GetFTP(i *GetFTPInput) (*FTP, error)
- func (c *Client) GetGCS(i *GetGCSInput) (*GCS, error)
- func (c *Client) GetGeneratedVCL(i *GetGeneratedVCLInput) (*VCL, error)
- func (c *Client) GetGzip(i *GetGzipInput) (*Gzip, error)
- func (c *Client) GetHeader(i *GetHeaderInput) (*Header, error)
- func (c *Client) GetHealthCheck(i *GetHealthCheckInput) (*HealthCheck, error)
- func (c *Client) GetLogentries(i *GetLogentriesInput) (*Logentries, error)
- func (c *Client) GetPapertrail(i *GetPapertrailInput) (*Papertrail, error)
- func (c *Client) GetRegions() (*RegionsResponse, error)
- func (c *Client) GetRequestSetting(i *GetRequestSettingInput) (*RequestSetting, error)
- func (c *Client) GetResponseObject(i *GetResponseObjectInput) (*ResponseObject, error)
- func (c *Client) GetS3(i *GetS3Input) (*S3, error)
- func (c *Client) GetService(i *GetServiceInput) (*Service, error)
- func (c *Client) GetServiceDetails(i *GetServiceInput) (*ServiceDetail, error)
- func (c *Client) GetSettings(i *GetSettingsInput) (*Settings, error)
- func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error)
- func (c *Client) GetSumologic(i *GetSumologicInput) (*Sumologic, error)
- func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error)
- func (c *Client) GetUsage(i *GetUsageInput) (*UsageResponse, error)
- func (c *Client) GetUsageByService(i *GetUsageInput) (*UsageByServiceResponse, error)
- func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error)
- func (c *Client) GetVersion(i *GetVersionInput) (*Version, error)
- func (c *Client) GetWAF(i *GetWAFInput) (*WAF, error)
- func (c *Client) Head(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) IPs() (IPAddrs, error)
- func (c *Client) LatestVersion(i *LatestVersionInput) (*Version, error)
- func (c *Client) ListACLEntries(i *ListACLEntriesInput) ([]*ACLEntry, error)
- func (c *Client) ListACLs(i *ListACLsInput) ([]*ACL, error)
- func (c *Client) ListBackends(i *ListBackendsInput) ([]*Backend, error)
- func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error)
- func (c *Client) ListConditions(i *ListConditionsInput) ([]*Condition, error)
- func (c *Client) ListDictionaries(i *ListDictionariesInput) ([]*Dictionary, error)
- func (c *Client) ListDictionaryItems(i *ListDictionaryItemsInput) ([]*DictionaryItem, error)
- func (c *Client) ListDirectors(i *ListDirectorsInput) ([]*Director, error)
- func (c *Client) ListDomains(i *ListDomainsInput) ([]*Domain, error)
- func (c *Client) ListFTPs(i *ListFTPsInput) ([]*FTP, error)
- func (c *Client) ListGCSs(i *ListGCSsInput) ([]*GCS, error)
- func (c *Client) ListGzips(i *ListGzipsInput) ([]*Gzip, error)
- func (c *Client) ListHeaders(i *ListHeadersInput) ([]*Header, error)
- func (c *Client) ListHealthChecks(i *ListHealthChecksInput) ([]*HealthCheck, error)
- func (c *Client) ListLogentries(i *ListLogentriesInput) ([]*Logentries, error)
- func (c *Client) ListPapertrails(i *ListPapertrailsInput) ([]*Papertrail, error)
- func (c *Client) ListRequestSettings(i *ListRequestSettingsInput) ([]*RequestSetting, error)
- func (c *Client) ListResponseObjects(i *ListResponseObjectsInput) ([]*ResponseObject, error)
- func (c *Client) ListS3s(i *ListS3sInput) ([]*S3, error)
- func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error)
- func (c *Client) ListSumologics(i *ListSumologicsInput) ([]*Sumologic, error)
- func (c *Client) ListSyslogs(i *ListSyslogsInput) ([]*Syslog, error)
- func (c *Client) ListVCLs(i *ListVCLsInput) ([]*VCL, error)
- func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error)
- func (c *Client) ListWAFs(i *ListWAFsInput) ([]*WAF, error)
- func (c *Client) LockVersion(i *LockVersionInput) (*Version, error)
- func (c *Client) Patch(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PatchForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PatchJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PatchJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) Post(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PostForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PostJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PostJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) Purge(i *PurgeInput) (*Purge, error)
- func (c *Client) PurgeAll(i *PurgeAllInput) (*Purge, error)
- func (c *Client) PurgeKey(i *PurgeKeyInput) (*Purge, error)
- func (c *Client) Put(p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PutForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PutJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) PutJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) RawRequest(verb, p string, ro *RequestOptions) (*http.Request, error)
- func (c *Client) Request(verb, p string, ro *RequestOptions) (*http.Response, error)
- func (c *Client) RequestForm(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) RequestJSON(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) RequestJSONAPI(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)
- func (c *Client) SearchService(i *SearchServiceInput) (*Service, error)
- func (c *Client) UpdateACL(i *UpdateACLInput) (*ACL, error)
- func (c *Client) UpdateACLEntry(i *UpdateACLEntryInput) (*ACLEntry, error)
- func (c *Client) UpdateBackend(i *UpdateBackendInput) (*Backend, error)
- func (c *Client) UpdateCacheSetting(i *UpdateCacheSettingInput) (*CacheSetting, error)
- func (c *Client) UpdateCondition(i *UpdateConditionInput) (*Condition, error)
- func (c *Client) UpdateDictionary(i *UpdateDictionaryInput) (*Dictionary, error)
- func (c *Client) UpdateDictionaryItem(i *UpdateDictionaryItemInput) (*DictionaryItem, error)
- func (c *Client) UpdateDirector(i *UpdateDirectorInput) (*Director, error)
- func (c *Client) UpdateDomain(i *UpdateDomainInput) (*Domain, error)
- func (c *Client) UpdateFTP(i *UpdateFTPInput) (*FTP, error)
- func (c *Client) UpdateGCS(i *UpdateGCSInput) (*GCS, error)
- func (c *Client) UpdateGzip(i *UpdateGzipInput) (*Gzip, error)
- func (c *Client) UpdateHeader(i *UpdateHeaderInput) (*Header, error)
- func (c *Client) UpdateHealthCheck(i *UpdateHealthCheckInput) (*HealthCheck, error)
- func (c *Client) UpdateLogentries(i *UpdateLogentriesInput) (*Logentries, error)
- func (c *Client) UpdatePapertrail(i *UpdatePapertrailInput) (*Papertrail, error)
- func (c *Client) UpdateRequestSetting(i *UpdateRequestSettingInput) (*RequestSetting, error)
- func (c *Client) UpdateResponseObject(i *UpdateResponseObjectInput) (*ResponseObject, error)
- func (c *Client) UpdateS3(i *UpdateS3Input) (*S3, error)
- func (c *Client) UpdateService(i *UpdateServiceInput) (*Service, error)
- func (c *Client) UpdateSettings(i *UpdateSettingsInput) (*Settings, error)
- func (c *Client) UpdateSumologic(i *UpdateSumologicInput) (*Sumologic, error)
- func (c *Client) UpdateSyslog(i *UpdateSyslogInput) (*Syslog, error)
- func (c *Client) UpdateVCL(i *UpdateVCLInput) (*VCL, error)
- func (c *Client) UpdateVersion(i *UpdateVersionInput) (*Version, error)
- func (c *Client) UpdateWAF(i *UpdateWAFInput) (*WAF, error)
- func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error)
- type CloneVersionInput
- type Compatibool
- type Condition
- type CreateACLEntryInput
- type CreateACLInput
- type CreateBackendInput
- type CreateCacheSettingInput
- type CreateConditionInput
- type CreateDictionaryInput
- type CreateDictionaryItemInput
- type CreateDirectorBackendInput
- type CreateDirectorInput
- type CreateDomainInput
- type CreateFTPInput
- type CreateGCSInput
- type CreateGzipInput
- type CreateHeaderInput
- type CreateHealthCheckInput
- type CreateLogentriesInput
- type CreatePapertrailInput
- type CreateRequestSettingInput
- type CreateResponseObjectInput
- type CreateS3Input
- type CreateServiceInput
- type CreateSumologicInput
- type CreateSyslogInput
- type CreateVCLInput
- type CreateVersionInput
- type CreateWAFInput
- type DeactivateVersionInput
- type DeleteACLEntryInput
- type DeleteACLInput
- type DeleteBackendInput
- type DeleteCacheSettingInput
- type DeleteConditionInput
- type DeleteDictionaryInput
- type DeleteDictionaryItemInput
- type DeleteDirectorBackendInput
- type DeleteDirectorInput
- type DeleteDomainInput
- type DeleteFTPInput
- type DeleteGCSInput
- type DeleteGzipInput
- type DeleteHeaderInput
- type DeleteHealthCheckInput
- type DeleteLogentriesInput
- type DeletePapertrailInput
- type DeleteRequestSettingInput
- type DeleteResponseObjectInput
- type DeleteS3Input
- type DeleteServiceInput
- type DeleteSumologicInput
- type DeleteSyslogInput
- type DeleteVCLInput
- type DeleteWAFInput
- type Dictionary
- type DictionaryItem
- type Diff
- type Director
- type DirectorBackend
- type DirectorType
- type Domain
- type EdgeCheck
- type EdgeCheckInput
- type EdgeCheckRequest
- type EdgeCheckResponse
- type ErrorObject
- type FTP
- type GCS
- type GetACLEntryInput
- type GetACLInput
- type GetBackendInput
- type GetBillingInput
- type GetCacheSettingInput
- type GetConditionInput
- type GetDictionaryInput
- type GetDictionaryItemInput
- type GetDiffInput
- type GetDirectorBackendInput
- type GetDirectorInput
- type GetDomainInput
- type GetFTPInput
- type GetGCSInput
- type GetGeneratedVCLInput
- type GetGzipInput
- type GetHeaderInput
- type GetHealthCheckInput
- type GetLogentriesInput
- type GetPapertrailInput
- type GetRealtimeStatsInput
- type GetRequestSettingInput
- type GetResponseObjectInput
- type GetS3Input
- type GetServiceInput
- type GetSettingsInput
- type GetStatsInput
- type GetSumologicInput
- type GetSyslogInput
- type GetUsageInput
- type GetVCLInput
- type GetVersionInput
- type GetWAFInput
- type Gzip
- type HTTPError
- type Header
- type HeaderAction
- type HeaderType
- type HealthCheck
- type IPAddrs
- type LatestVersionInput
- type ListACLEntriesInput
- type ListACLsInput
- type ListBackendsInput
- type ListCacheSettingsInput
- type ListConditionsInput
- type ListDictionariesInput
- type ListDictionaryItemsInput
- type ListDirectorsInput
- type ListDomainsInput
- type ListFTPsInput
- type ListGCSsInput
- type ListGzipsInput
- type ListHeadersInput
- type ListHealthChecksInput
- type ListLogentriesInput
- type ListPapertrailsInput
- type ListRequestSettingsInput
- type ListResponseObjectsInput
- type ListS3sInput
- type ListServicesInput
- type ListSumologicsInput
- type ListSyslogsInput
- type ListVCLsInput
- type ListVersionsInput
- type ListWAFsInput
- type LockVersionInput
- type Logentries
- type Papertrail
- type Purge
- type PurgeAllInput
- type PurgeInput
- type PurgeKeyInput
- type RTSClient
- type RealtimeData
- type RealtimeStatsResponse
- type RegionsResponse
- type RegionsUsage
- type RequestOptions
- type RequestSetting
- type RequestSettingAction
- type RequestSettingXFF
- type ResponseObject
- type S3
- type S3Redundancy
- type SearchServiceInput
- type Service
- type ServiceDetail
- type ServicesByRegionsUsage
- type ServicesUsage
- type Settings
- type Stats
- type StatsResponse
- type Sumologic
- type Syslog
- type UpdateACLEntryInput
- type UpdateACLInput
- type UpdateBackendInput
- type UpdateCacheSettingInput
- type UpdateConditionInput
- type UpdateDictionaryInput
- type UpdateDictionaryItemInput
- type UpdateDirectorInput
- type UpdateDomainInput
- type UpdateFTPInput
- type UpdateGCSInput
- type UpdateGzipInput
- type UpdateHeaderInput
- type UpdateHealthCheckInput
- type UpdateLogentriesInput
- type UpdatePapertrailInput
- type UpdateRequestSettingInput
- type UpdateResponseObjectInput
- type UpdateS3Input
- type UpdateServiceInput
- type UpdateSettingsInput
- type UpdateSumologicInput
- type UpdateSyslogInput
- type UpdateVCLInput
- type UpdateVersionInput
- type UpdateWAFInput
- type Usage
- type UsageByServiceResponse
- type UsageResponse
- type UsageStatsResponse
- type VCL
- type ValidateVersionInput
- type Version
- type WAF
- type WAFConfigurationSet
Constants ¶
const APIKeyEnvVar = "FASTLY_API_KEY"
APIKeyEnvVar is the name of the environment variable where the Fastly API key should be read from.
const APIKeyHeader = "Fastly-Key"
APIKeyHeader is the name of the header that contains the Fastly API key.
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.
const RealtimeStatsEndpoint = "https://rt.fastly.com"
RealtimeStatsEndpoint is the realtime stats endpoint for Fastly.
Variables ¶
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
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.
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.
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.
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.
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.
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
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.
var ErrMissingKey = errors.New("Missing required field 'Key'")
ErrMissingKey is an error that is returned when an input struct requires a "Name" key, but one was not set.
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.
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.
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
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.
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.
var ErrMissingURL = errors.New("Missing required field 'URL'")
ErrMissingURL is an error that is returned when an input struct requires a "Name" key, but one was not set.
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.
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
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.
var ProjectURL = "github.com/sethvargo/go-fastly"
ProjectURL is the url for this library.
var ProjectVersion = "0.4.2"
ProjectVersion is the version of this library.
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 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"` 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 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 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 ¶
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 ¶
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) 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) 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) 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) 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. There are no request parameters, but you should consult the resulting version number. 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) 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) 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) 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) 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) GetBackend ¶
func (c *Client) GetBackend(i *GetBackendInput) (*Backend, error)
GetBackend gets the backend configuration with the given parameters.
func (*Client) GetBilling ¶
func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error)
GetBilling returns the billing information for the current account.
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) 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) 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) 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) 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) 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) 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) ListServices ¶
func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error)
ListServices returns the full list of services for the current account.
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) PatchForm ¶ added in v0.4.2
PatchForm issues an HTTP PUT request with the given interface form-encoded.
func (*Client) PatchJSON ¶ added in v0.4.2
PatchJSON issues an HTTP PUT request with the given interface json-encoded.
func (*Client) PatchJSONAPI ¶ added in v0.4.2
PatchJSONAPI issues an HTTP PUT request with the given interface json-encoded.
func (*Client) PostForm ¶
PostForm issues an HTTP POST request with the given interface form-encoded.
func (*Client) PostJSON ¶ added in v0.4.2
PostJSON issues an HTTP POST request with the given interface json-encoded.
func (*Client) PostJSONAPI ¶ added in v0.4.2
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) PutJSON ¶ added in v0.4.2
PutJSON issues an HTTP PUT request with the given interface json-encoded.
func (*Client) PutJSONAPI ¶ added in v0.4.2
PutJSONAPI issues an HTTP PUT request with the given interface json-encoded.
func (*Client) RawRequest ¶
RawRequest accepts a verb, URL, and RequestOptions struct and returns the constructed http.Request and any errors that occurred
func (*Client) Request ¶
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 (*Client) RequestJSONAPI ¶ added in v0.4.2
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) 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) 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) 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) 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) 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) 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 (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"` Statement string `mapstructure:"statement"` Type string `mapstructure:"type"` Priority int `mapstructure:"priority"` }
Condition represents a condition response from the Fastly API.
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"` 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 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"` }
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"` Quorum uint `form:"quorum,omitempty"` Type DirectorType `form:"type,omitempty"` Retries uint `form:"retries,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"` }
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"` }
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"` 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"` }
CreateLogentriesInput is used as input to the CreateLogentries 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"` }
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"` }
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 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"` }
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"` }
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"` }
CreateVCLInput is used as input to the CreateVCL function.
type CreateVersionInput ¶
type CreateVersionInput struct { // Service is the ID of the service (required). Service string }
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
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 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 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 GetWAF function.
type Dictionary ¶
type Dictionary struct { ServiceID string `mapstructure:"service_id"` Version int `mapstructure:"version"` ID string `mapstructure:"id"` Name string `mapstructure:"name"` Address string `mapstructure:"address"` }
Dictionary represents a dictionary response from the Fastly API.
type DictionaryItem ¶
type DictionaryItem struct { ServiceID string `mapstructure:"service_id"` DictionaryID string `mapstructure:"dictionary_id"` ItemKey string `mapstructure:"item_key"` ItemValue string `mapstructure:"item_value"` }
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"` Quorum uint `mapstructure:"quorum"` Type DirectorType `mapstructure:"type"` Retries uint `mapstructure:"retries"` Capacity uint `mapstructure:"capacity"` }
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"` Locked bool `mapstructure:"locked"` }
Domain represents the the domain name Fastly will serve content for.
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 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"` 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"` }
GCS represents an GCS logging response from the Fastly API.
type GetACLEntryInput ¶ added in v0.4.0
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 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 GetBillingInput ¶
GetBillingInput is used as input to the GetBilling 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 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 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
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 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 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
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 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 ¶
NewHTTPError creates a new HTTP error from the given code.
func (*HTTPError) Error ¶
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 ¶
IsNotFound returns true if the HTTP error code is a 404, false otherwise.
type Header ¶
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"` 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
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 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 ListServicesInput ¶
type ListServicesInput struct{}
ListServicesInput is used as input to the ListServices 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"` }
Logentries represents a logentries response from the Fastly API.
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"` }
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
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 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"` 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 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
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"` }
Settings represents a backend 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"` }
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"` 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"` 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 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 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"` }
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 Comment string `form:"comment,omitempty"` Quorum uint `form:"quorum,omitempty"` Type DirectorType `form:"type,omitempty"` Retries uint `form:"retries,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 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"` }
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"` }
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"` 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"` }
UpdateLogentriesInput is used as input to the UpdateLogentries 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"` }
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"` }
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"` }
UpdateSettingsInput is used as input to the UpdateSettings 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"` }
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"` }
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 Comment string `form:"comment,omitempty"` }
UpdateVersionInput is the input to the UpdateVersion function.
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 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"` 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.
Source Files ¶
- acl.go
- acl_entry.go
- backend.go
- billing.go
- cache_setting.go
- client.go
- condition.go
- content.go
- decode_hooks.go
- dictionary.go
- dictionary_item.go
- diff.go
- director.go
- director_backend.go
- domain.go
- errors.go
- fastly.go
- ftp.go
- gcs.go
- gzip.go
- header.go
- health_check.go
- ip.go
- logentries.go
- papertrail.go
- purge.go
- realtime_stats.go
- request.go
- request_setting.go
- response_object.go
- s3.go
- service.go
- settings.go
- stats.go
- sumologic.go
- syslog.go
- vcl.go
- version.go
- waf.go