Documentation ¶
Index ¶
- Constants
- Variables
- 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) 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) CreateWordpress(i *CreateWordpressInput) (*Wordpress, error)
- func (c *Client) DeactivateVersion(i *DeactivateVersionInput) (*Version, error)
- func (c *Client) Delete(p string, ro *RequestOptions) (*http.Response, 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) DeleteWordpress(i *DeleteWordpressInput) error
- func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error)
- func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, 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) 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) GetSumologic(i *GetSumologicInput) (*Sumologic, error)
- func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error)
- func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error)
- func (c *Client) GetVersion(i *GetVersionInput) (*Version, error)
- func (c *Client) GetWordpress(i *GetWordpressInput) (*Wordpress, 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) 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) ListWordpresses(i *ListWordpressesInput) ([]*Wordpress, error)
- func (c *Client) LockVersion(i *LockVersionInput) (*Version, 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) 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) 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) SearchService(i *SearchServiceInput) (*Service, 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) UpdateWordpress(i *UpdateWordpressInput) (*Wordpress, error)
- func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error)
- type CloneVersionInput
- type Compatibool
- type Condition
- 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 CreateWordpressInput
- type DeactivateVersionInput
- 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 DeleteWordpressInput
- type Dictionary
- type DictionaryItem
- type Diff
- type Director
- type DirectorBackend
- type DirectorType
- type Domain
- type EdgeCheck
- type EdgeCheckInput
- type EdgeCheckRequest
- type EdgeCheckResponse
- type FTP
- type GCS
- 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 GetRequestSettingInput
- type GetResponseObjectInput
- type GetS3Input
- type GetServiceInput
- type GetSettingsInput
- type GetSumologicInput
- type GetSyslogInput
- type GetVCLInput
- type GetVersionInput
- type GetWordpressInput
- type Gzip
- type HTTPError
- type Header
- type HeaderAction
- type HeaderType
- type HealthCheck
- type IPAddrs
- type LatestVersionInput
- 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 ListWordpressesInput
- type LockVersionInput
- type Logentries
- type Papertrail
- type Purge
- type PurgeAllInput
- type PurgeInput
- type PurgeKeyInput
- type RequestOptions
- type RequestSetting
- type RequestSettingAction
- type RequestSettingXFF
- type ResponseObject
- type S3
- type S3Redundancy
- type SearchServiceInput
- type Service
- type ServiceDetail
- type Settings
- type Sumologic
- type Syslog
- 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 UpdateWordpressInput
- type VCL
- type ValidateVersionInput
- type Version
- type Wordpress
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.
Variables ¶
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 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 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 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.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 ActivateVCLInput ¶
type ActivateVCLInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string // 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 string }
ActivateVersionInput is the input to the ActivateVersion function.
type Backend ¶
type Backend struct { ServiceID string `mapstructure:"service_id"` Version string `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 string `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. 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) 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) CreateWordpress ¶
func (c *Client) CreateWordpress(i *CreateWordpressInput) (*Wordpress, error)
CreateWordpress creates a new Fastly wordpress.
func (*Client) DeactivateVersion ¶
func (c *Client) DeactivateVersion(i *DeactivateVersionInput) (*Version, error)
DeactivateVersion deactivates the given version.
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) DeleteWordpress ¶
func (c *Client) DeleteWordpress(i *DeleteWordpressInput) error
DeleteWordpress deletes the given wordpress version.
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) 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) 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) 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) 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) GetWordpress ¶
func (c *Client) GetWordpress(i *GetWordpressInput) (*Wordpress, error)
GetWordpress gets the wordpress configuration with the given parameters.
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) 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) ListWordpresses ¶
func (c *Client) ListWordpresses(i *ListWordpressesInput) ([]*Wordpress, error)
ListWordpresses returns the list of wordpresses for the configuration version.
func (*Client) LockVersion ¶
func (c *Client) LockVersion(i *LockVersionInput) (*Version, error)
LockVersion locks the specified version.
func (*Client) PostForm ¶
PostForm issues an HTTP POST request with the given interface form-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) 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) 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) 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) UpdateWordpress ¶
func (c *Client) UpdateWordpress(i *UpdateWordpressInput) (*Wordpress, error)
UpdateWordpress updates a specific wordpress.
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 string }
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 string `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 CreateBackendInput ¶
type CreateBackendInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string 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 string 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 string 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 string 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 string // 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 string 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 string // 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 string 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 string 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"` 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 string 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 string 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 string 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 string 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"` 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 string 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 string 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 string 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 string 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"` 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 string 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"` }
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 string Name string `form:"name,omitempty"` Address string `form:"address,omitempty"` Port uint `form:"port,omitempty"` UseTLS *Compatibool `form:"use_tls,omitempty"` TLSCACert string `form:"tls_ca_cert,omitempty"` Token string `form:"token,omitempty"` Format string `form:"format,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 string 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 CreateWordpressInput ¶
type CreateWordpressInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string Name string `form:"name,omitempty"` Path string `form:"path,omitempty"` Comment string `form:"comment,omitempty"` }
CreateWordpressInput is used as input to the CreateWordpress 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 string }
DeactivateVersionInput is the input to the DeactivateVersion 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // Name is the name of the VCL to delete (required). Name string }
DeleteVCLInput is the input parameter to DeleteVCL.
type DeleteWordpressInput ¶
type DeleteWordpressInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string // Name is the name of the wordpress to delete (required). Name string }
DeleteWordpressInput is the input parameter to DeleteWordpress.
type Dictionary ¶
type Dictionary struct { ServiceID string `mapstructure:"service_id"` Version string `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 string `mapstructure:"from"` To string `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 string `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 string `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 string `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 FTP ¶
type FTP struct { ServiceID string `mapstructure:"service_id"` Version string `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 string `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"` ResponseCondition string `mapstructure:"response_condition"` TimestampFormat string `mapstructure:"timestamp_format"` }
GCS represents an GCS logging response from the Fastly API.
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 string // 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 string // 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 string // 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 string // 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 string // To is the version to diff up to. The same rules for From apply. To string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string }
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 string // 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 string // 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 string // 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 string // 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 string // Name is the name of the papertrail to fetch. Name string }
GetPapertrailInput is used as input to the GetPapertrail 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 string // 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 string // 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 string // 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 string }
GetSettingsInput is used as input to the GetSettings function.
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 string // 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 string // Name is the name of the syslog to fetch. Name string }
GetSyslogInput is used as input to the GetSyslog function.
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 string // 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 string }
GetVersionInput is the input to the GetVersion function.
type GetWordpressInput ¶
type GetWordpressInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string // Name is the name of the wordpress to fetch. Name string }
GetWordpressInput is used as input to the GetWordpress function.
type Gzip ¶
type Gzip struct { ServiceID string `mapstructure:"service_id"` Version string `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 // Message and Detail are information returned by the Fastly API. Message string `mapstructure:"msg"` Detail string `mapstructure:"detail"` }
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 string `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 string `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 ListBackendsInput ¶
type ListBackendsInput struct { // Service is the ID of the service (required). Service string // Version is the specific configuration version (required). Version string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 string }
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 ListWordpressesInput ¶
type ListWordpressesInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string }
ListWordpressesInput is used as input to the ListWordpresses 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 string }
LockVersionInput is the input to the LockVersion function.
type Logentries ¶
type Logentries struct { ServiceID string `mapstructure:"service_id"` Version string `mapstructure:"version"` Name string `mapstructure:"name"` Port uint `mapstructure:"port"` UseTLS bool `mapstructure:"use_tls"` Token string `mapstructure:"token"` 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"` }
Logentries represents a logentries response from the Fastly API.
type Papertrail ¶
type Papertrail struct { ServiceID string `mapstructure:"service_id"` Version string `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 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 string `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 string `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 string `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"` 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 Settings ¶
type Settings struct { ServiceID string `mapstructure:"service_id"` Version string `mapstructure:"version"` DefaultTTL uint `mapstructure:"general.default_ttl"` DefaultHost string `mapstructure:"general.default_host"` }
Settings represents a backend response from the Fastly API.
type Sumologic ¶
type Sumologic struct { ServiceID string `mapstructure:"service_id"` Version string `mapstructure:"version"` Name string `mapstructure:"name"` Address string `mapstructure:"address"` URL string `mapstructure:"url"` 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"` }
Sumologic represents a sumologic response from the Fastly API.
type Syslog ¶
type Syslog struct { ServiceID string `mapstructure:"service_id"` Version string `mapstructure:"version"` Name string `mapstructure:"name"` Address string `mapstructure:"address"` Port uint `mapstructure:"port"` UseTLS bool `mapstructure:"use_tls"` TLSCACert string `mapstructure:"tls_ca_cert"` Token string `mapstructure:"token"` 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"` }
Syslog represents a syslog response from the Fastly API.
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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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 string // 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"` 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 string // 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 string // 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 string // 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 string // 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"` 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 string DefaultTTL uint `form:"general.default_ttl,omitempty"` 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 string // 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"` }
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 string // Name is the name of the syslog to update. Name string NewName string `form:"name,omitempty"` Address string `form:"address,omitempty"` Port uint `form:"port,omitempty"` UseTLS *Compatibool `form:"use_tls,omitempty"` TLSCACert string `form:"tls_ca_cert,omitempty"` Token string `form:"token,omitempty"` Format string `form:"format,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 string // 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 string Comment string `form:"comment,omitempty"` }
UpdateVersionInput is the input to the UpdateVersion function.
type UpdateWordpressInput ¶
type UpdateWordpressInput struct { // Service is the ID of the service. Version is the specific configuration // version. Both fields are required. Service string Version string // Name is the name of the wordpress to update. Name string NewName string `form:"name,omitempty"` Path string `form:"path,omitempty"` Comment string `form:"comment,omitempty"` }
UpdateWordpressInput is used as input to the UpdateWordpress function.
type VCL ¶
type VCL struct { ServiceID string `mapstructure:"service_id"` Version string `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 string }
ValidateVersionInput is the input to the ValidateVersion function.
type Version ¶
type Version struct { Number string `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.
Source Files ¶
- 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
- request.go
- request_setting.go
- response_object.go
- s3.go
- service.go
- settings.go
- sumologic.go
- syslog.go
- vcl.go
- version.go
- wordpress.go