Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

splice/cloudfront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cloudfront signer

This signs cloudfront urls.

Usage

// From a byte slice
var key []byte
signer, err := cloudfront.NewSigner(key, "APKA9ONS7QCOWEXAMPLE", "http://d111111abcdef8.cloudfront.net")

// From a path
signer, err := cloudfront.NewSignerFromPath("./ssh/pk-APKA9ONS7QCOWEXAMPLE.pem", "APKA9ONS7QCOWEXAMPLE", "http://d111111abcdef8.cloudfront.net")
if err != nil {
	log.Fatal(err)
}

url, err := signer.SignedURL("/images/image.jpg", 5*time.Minute)
if err != nil {
	log.Fatal(err)
}

Releases

No releases published

Packages

No packages published

Languages