Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { GetAwsSigningKeyPath() string GetAwsSigningKeyID() string GetAzureSigningKey() string }
Config for Signer
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer capable of producing signed urls for various services
func (Signer) SignAzureURL ¶
SignAzureURL with a token as the query param The token is valid for 6 hours. The URL remains unchanged otherwise
func (Signer) SignCloudfrontURL ¶
func (s Signer) SignCloudfrontURL(path string, domain string, duration time.Duration) (string, error)
SignCloudfrontURL takes the path and the domain and returns a string with the following properties:
- HTTPS
- Unchanged path
- QueryParameter "EncodedPolicy" with a url encoded string representing full signature parameters, needed for signed urls. The URL specified in the canned policy is truncated to the first 2 folders after the /out/v1/ part
For example: https://CLOUDFLARE-CDN.com/out/v1/2da6f0ab51344ff4a1048741da66d6df/1b5a8f5803a4459eb1bb430f8a79e524/2e0c61ef235f4945813fc7490745c8ff/index.m3u8?EncodedPolicy=<URL ENCODED POLICY>
Click to show internal directories.
Click to hide internal directories.