cloudfront

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

README

go-aws-cloudfront

Go package providing opinionated tools and methods for working with the aws-sdk-go/service/cloudfront package.

Documentation

Go Reference

Tools

$> make cli
go build -mod vendor -o bin/invalidate cmd/invalidate/main.go
invalidate

Invalidate one or more URIs from a CloudFront distribution.

$> ./bin/invalidate -h
Invalidate one or more URIs from a CloudFront distribution.
Usage:
	 ./bin/invalidate uri(N) uri(N)
  -client-uri string
    	A valid client URI in the form of 'aws://?region={AWS_REGION}&credentials={CREDENTIALS}' where '{CREDENTIAL}' is expected to be a valid aaronland/go-aws-session credential string.
  -distribution-id string
    	A valid AWS CloudFront distribution ID.

See also

Documentation

Overview

package cloudfront provides opinionated tools and methods for working with the `aws-sdk-go/service/cloudfront` package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidatePaths added in v0.0.2

func InvalidatePaths(ctx context.Context, svc *aws_cloudfront.CloudFront, distribution_id string, uris ...string) (string, string, error)

InvalidatePaths will issue a "CreateInvalidation" request for 'uris' in 'distribution_id'. It will return the invalidation ID and caller reference associated with the request.

func NewClientWithURI added in v0.0.2

func NewClientWithURI(ctx context.Context, uri string) (*aws_cloudfront.CloudFront, error)

NewClientWithURI will return a new `aws-sdk-go/service/cloudfront.CloudFront` instance derived from 'uri' which is expected to take the form of:

aws://?region={AWS_REGION}&credentials={CREDENTIALS}

Where '{CREDENTIALS}' is expected to be a valid `aaronland/go-aws-session` credentials string.

func NewSessionWithURI added in v0.0.2

func NewSessionWithURI(ctx context.Context, uri string) (*aws_session.Session, error)

NewSessionWithURI will return a new `aws-sdk-go/aws/session.Session` instance derived from 'uri' which is expected to take the form of:

aws://?region={AWS_REGION}&credentials={CREDENTIALS}

Where '{CREDENTIALS}' is expected to be a valid `aaronland/go-aws-session` credentials string.

Types

This section is empty.

Directories

Path Synopsis
cmd
package cmd provides opinionate command-line tools for performing CloudFront-related operations.
package cmd provides opinionate command-line tools for performing CloudFront-related operations.
invalidate
Invalidate one or more URIs from a CloudFront distribution.
Invalidate one or more URIs from a CloudFront distribution.

Jump to

Keyboard shortcuts

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