Documentation
¶
Index ¶
- Constants
- func ErrorBadRequest(err error) bool
- func ErrorIsUnauthorized(err error) bool
- func ErrorResourceNotFound(err error) bool
- func NewInvalidationError(code int, err error, args ...interface{}) error
- type Distribution
- type DistributionService
- func (d *DistributionService) CreateInvalidation(ctx context.Context, distributionName string, paths []string) (*InvalidationResponse, error)
- func (d *DistributionService) GetInvalidationStatus(ctx context.Context, distributionName string, invalidationID string) (*InvalidationResponse, error)
- func (d *DistributionService) List(ctx context.Context) ([]string, error)
- type DistributionsResponse
- type ErrorResponse
- type Fake
- func (f *Fake) CreateInvalidation(ctx context.Context, distributionName string, paths []string) (*InvalidationResponse, error)
- func (f *Fake) GetInvalidationStatus(ctx context.Context, distributionName string, invalidationID string) (*InvalidationResponse, error)
- func (f *Fake) List(ctx context.Context) ([]string, error)
- type InvalidationError
- type InvalidationMeta
- type InvalidationRequest
- type InvalidationResponse
- type VanityDistributionName
Constants ¶
View Source
const ( BadRequestErrorCode = 400 ResourceNotFoundErrorCode = 404 )
Variables ¶
This section is empty.
Functions ¶
func ErrorBadRequest ¶ added in v0.0.2
func ErrorIsUnauthorized ¶
func ErrorResourceNotFound ¶
func NewInvalidationError ¶
Types ¶
type Distribution ¶
type DistributionService ¶
type DistributionService struct {
Config *config.Config
Cloudfront *cloudfront.Client
}
func New ¶
func New(config *config.Config, cloudfront *cloudfront.Client) *DistributionService
func (*DistributionService) CreateInvalidation ¶
func (d *DistributionService) CreateInvalidation(ctx context.Context, distributionName string, paths []string) (*InvalidationResponse, error)
func (*DistributionService) GetInvalidationStatus ¶
func (d *DistributionService) GetInvalidationStatus(ctx context.Context, distributionName string, invalidationID string) (*InvalidationResponse, error)
type DistributionsResponse ¶
type DistributionsResponse struct {
// The Distributions a user is entitled to perform invalidations against.
Distributions map[VanityDistributionName]Distribution `json:"distributions"`
}
swagger:model DistributionResponse
type Fake ¶
type Fake struct {
}
func (*Fake) CreateInvalidation ¶
func (*Fake) GetInvalidationStatus ¶
type InvalidationError ¶
type InvalidationError struct {
InvalidationMeta
Err error `json:"-"`
Code int `json:"-"`
}
swagger:model InvalidationError
func (InvalidationError) Error ¶
func (err InvalidationError) Error() string
func (InvalidationError) Unwrap ¶
func (err InvalidationError) Unwrap() error
type InvalidationMeta ¶
type InvalidationMeta struct {
// The Status of the invalidation request
Status string `json:"status"`
}
type InvalidationRequest ¶
type InvalidationRequest struct {
// The Paths to submit for invalidation
Paths []string `json:"paths"`
}
swagger:model InvalidationRequest
type InvalidationResponse ¶
type InvalidationResponse struct {
InvalidationMeta
// The ID of the Invalidation Request
ID string `json:"id,omitempty"`
// The Created time of invalidation
Created time.Time `json:"createTime"`
// The Paths array requested for invalidation
Paths []string `json:"paths,omitempty"`
}
swagger:model InvalidationResponse
type VanityDistributionName ¶
type VanityDistributionName string
Click to show internal directories.
Click to hide internal directories.