cloudfront

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Behavior

type Behavior struct {
	// PathPattern is the path pattern used when configuring the Behavior
	PathPattern string
	// ViewerFnARN is the ARN of the function to be associated with the Behavior's viewer requests
	ViewerFnARN string
}

Behavior represents a CloudFront Cache Behavior

type Origin

type Origin struct {
	// Host is the origin's hostname
	Host string
	// Behaviors is the collection of Behaviors associated with this Origin
	Behaviors []Behavior
}

Origin represents a CloudFront Origin and aggregates Behaviors associated with it

type OriginBuilder

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

OriginBuilder allows the construction of a Origin

func NewOriginBuilder

func NewOriginBuilder(host string) OriginBuilder

NewOriginBuilder returns an OriginBuilder for a given host

func (OriginBuilder) Build

func (b OriginBuilder) Build() Origin

Build creates an Origin based on configuration made so far

func (OriginBuilder) WithBehavior

func (b OriginBuilder) WithBehavior(pathPattern string) OriginBuilder

WithBehavior adds a Behavior to the Origin being built given a path pattern the Behavior should respond for

func (OriginBuilder) WithViewerFunction added in v0.0.5

func (b OriginBuilder) WithViewerFunction(fnARN string) OriginBuilder

WithViewerFunction associates a function with all viewer requests of all Behaviors in the Origin being built

type OriginRepository

type OriginRepository interface {
	// Save ensures the given origin exists on the CloudFront distribution of given ID
	Save(id string, o Origin) error
}

OriginRepository provides a repository for manipulating CloudFront distributions to match desired configuration

func NewOriginRepository

func NewOriginRepository(awsClient cloudfrontiface.CloudFrontAPI) OriginRepository

NewOriginRepository creates a new AWS CloudFront Origin repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL