| 114 | } |
| 115 | |
| 116 | func (*cloudFrontClient) pathsToInvalidationBatch(ref string, paths ...string) *types.InvalidationBatch { |
| 117 | cfpaths := &types.Paths{} |
| 118 | for _, p := range paths { |
| 119 | cfpaths.Items = append(cfpaths.Items, pathEscapeRFC1738(p)) |
| 120 | } |
| 121 | |
| 122 | qty := int32(len(paths)) |
| 123 | cfpaths.Quantity = &qty |
| 124 | |
| 125 | return &types.InvalidationBatch{ |
| 126 | CallerReference: &ref, |
| 127 | Paths: cfpaths, |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // determineRootAndSubPath takes the bucketPath, as set as a flag, |
| 132 | // and the originPath, as set in the CDN config, and |