Documentation
¶
Overview ¶
Package cloudfront emulates Amazon CloudFront (REST-XML, global): distributions with their invalidations, tags and monitoring subscriptions; cache, origin request and response headers policies (the managed ones built in); origin access controls and identities; key groups and public keys; and CloudFront Functions. Distributions serve traffic on <id>.cloudfront.localhost (edge.go).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distribution ¶
type Distribution struct {
Id string `json:"id"`
ARN string `json:"arn"`
Account string `json:"account"`
ETag string `json:"etag"`
Config string `json:"config"` // inner XML of DistributionConfig
Modified time.Time `json:"modified"`
Monitoring string `json:"monitoring,omitempty"` // inner XML of MonitoringSubscription
Invalidations []*Invalidation `json:"invalidations,omitempty"`
}
Distribution keeps its DistributionConfig as sent: Terraform compares it field by field, so it round-trips untouched.
type Function ¶
type Function struct {
Name string `json:"name"`
ARN string `json:"arn"`
Account string `json:"account"`
Created time.Time `json:"created"`
Dev *Stage `json:"dev"`
Live *Stage `json:"live,omitempty"`
}
Function is a CloudFront Function: DEVELOPMENT and, once published, LIVE.
type Invalidation ¶
type Invalidation struct {
Id string `json:"id"`
Created time.Time `json:"created"`
CallerRef string `json:"callerRef"`
Batch string `json:"batch"` // inner XML of InvalidationBatch
}
Invalidation purges cached paths when it is created; it reads back as Completed.
type Item ¶
type Item struct {
Id string `json:"id"`
Kind string `json:"kind"` // kind.Elem
Account string `json:"account"` // "" for managed policies
ETag string `json:"etag"`
Config string `json:"config"` // inner XML of <Kind>Config
Modified time.Time `json:"modified"`
Extra string `json:"extra,omitempty"` // S3CanonicalUserId of an origin access identity
}
Item is a resource defined by one config document: a cache, origin request or response headers policy, an origin access control or identity, a key group or a public key.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the CloudFront emulator.