Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 9c49679

Browse files
author
David Smith
committed
release: v0.1.3
This release updates several first/third-party dependencies. - feat - --version now prints details about the build's paths and modules. - notable dependency changes - Bump github.com/pkg/errors to v0.9.1. - Bump internal/cage/... to latest from monorepo. - refactor - Migrate to latest cage/cli/handler API (e.g. handler.Session and handler.Input) and conventions (e.g. "func NewCommand").
1 parent 9ae6075 commit 9c49679

File tree

17 files changed

+723
-96
lines changed

17 files changed

+723
-96
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
**/testdata/dynamic
21
**/testdata/cover/*.html
32
**/testdata/dynamic
43
*.log
54
/build
6-
core
75
cover.out

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ script:
2626
- cd $HOME/go_get_test
2727
- go mod init go_get_test
2828
- 'go get -v github.com/codeactual/aws-req/cmd/aws-req@${TRAVIS_COMMIT}'
29-
- aws-req --help
29+
- aws-req --version
3030
# Integration test
3131
- cd -
3232
- './build/aws-req -v "https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&Version=2016-11-15"'

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## v0.1.3
4+
5+
> This release updates several first/third-party dependencies.
6+
7+
- feat
8+
- --version now prints details about the build's paths and modules.
9+
- notable dependency changes
10+
- Bump github.com/pkg/errors to v0.9.1.
11+
- Bump internal/cage/... to latest from monorepo.
12+
- refactor
13+
- Migrate to latest cage/cli/handler API (e.g. handler.Session and handler.Input) and conventions (e.g. "func NewCommand").
14+
315
## v0.1.2
416

517
- chore: re-export from private repo

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# aws-req [![GoDoc](https://godoc.org/github.com/codeactual/aws-req?status.svg)](https://godoc.org/github.com/codeactual/aws-req) [![Go Report Card](https://goreportcard.com/badge/github.com/codeactual/aws-req)](https://goreportcard.com/report/github.com/codeactual/aws-req) [![Build Status](https://travis-ci.org/codeactual/aws-req.png)](https://travis-ci.org/codeactual/aws-req)
1+
# aws-req [![GoDoc](https://godoc.org/github.com/codeactual/aws-req?status.svg)](https://pkg.go.dev/mod/github.com/codeactual/aws-req) [![Go Report Card](https://goreportcard.com/badge/github.com/codeactual/aws-req)](https://goreportcard.com/report/github.com/codeactual/aws-req) [![Build Status](https://travis-ci.org/codeactual/aws-req.png)](https://travis-ci.org/codeactual/aws-req)
22

33
aws-req is a program which reads IAM credentials from standard environment variables to perform signed HTTPS requests to arbitrary AWS service URLs.
44

@@ -57,13 +57,19 @@ aws-exec-cmd role --chain instance -- aws-req --verbose https://ec2.amazonaws.co
5757
### Config
5858

5959
- Generate AWS API credentials which will be added to the config file as encrypted environment variables.
60-
- [travis-iam.json](travis-iam.json) is the IAM policy which creates the required grants. The [Travis CI IP addresses](https://docs.travis-ci.com/user/ip-addresses/) in the policy conditions may be out-of-date.
60+
- [travis-iam.json](testdata/iam/travis-iam.json) is the IAM policy which creates the required grants. The [Travis CI IP addresses](https://docs.travis-ci.com/user/ip-addresses/) in the policy conditions may be out-of-date.
61+
- The IAM JSON lists the IPs in this order: `nat.gce-us-central1.travisci.net`, `nat.gce-us-east1.travisci.net`
6162
- To configure the environment variables used by the functional test against the EC2 API, use the [Travis CLI](https://docs.travis-ci.com/user/encryption-keys/#usage) to generate the `secure` string value.
6263
- Each `env` item expects all key/value pairs as one string, and multiple items define multiple build permutations so that all pair sets are tested. Input an entire set, e.g. `AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...`, in the `encrypt` command.
6364
- Launch `travis` in interactive mode `-i` and input the pair set without trailing newline.
6465

65-
# License
66+
# Development
67+
68+
## License
6669

6770
[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) ([About](https://www.mozilla.org/en-US/MPL/), [FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/))
6871

69-
*(Exported from a private monorepo with [transplant](https://github.com/codeactual/transplant).)*
72+
## Contributing
73+
74+
- Please feel free to submit issues, PRs, questions, and feedback.
75+
- Although this repository consists of snapshots extracted from a private monorepo using [transplant](https://github.com/codeactual/transplant), PRs are welcome. Standard GitHub workflows are still used.

cmd/aws-req/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,17 @@ const (
6161
)
6262

6363
func main() {
64-
err := handler_cobra.NewHandler(&Handler{}).Execute()
64+
err := handler_cobra.NewHandler(&Handler{
65+
Session: &handler.DefaultSession{},
66+
}).Execute()
6567
if err != nil {
6668
panic(errors.WithStack(err))
6769
}
6870
}
6971

7072
// Handler defines the sub-command flags and logic.
7173
type Handler struct {
72-
handler.IO
74+
handler.Session
7375

7476
Body string `usage:"HTTP body"`
7577
Header string `usage:"Headers in JSON format"`
@@ -106,8 +108,8 @@ func (h *Handler) BindFlags(cmd *cobra.Command) []string {
106108
// Run performs the sub-command logic.
107109
//
108110
// It implements cli/handler/cobra.Handler.
109-
func (h *Handler) Run(ctx context.Context, args []string) {
110-
u, parseErr := url.Parse(args[0])
111+
func (h *Handler) Run(ctx context.Context, input handler.Input) {
112+
u, parseErr := url.Parse(input.Args[0])
111113
h.ExitOnErr(parseErr, "failed to parse URL", 1)
112114
urlStr := u.String()
113115

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ module github.com/codeactual/aws-req
33
go 1.13
44

55
require (
6-
github.com/aws/aws-sdk-go v1.19.1
6+
github.com/aws/aws-sdk-go v1.29.8
77
github.com/fsnotify/fsnotify v1.4.7 // indirect
88
github.com/hashicorp/hcl v1.0.0 // indirect
99
github.com/inconshreveable/mousetrap v1.0.0 // indirect
1010
github.com/magiconair/properties v1.8.1 // indirect
1111
github.com/mitchellh/mapstructure v1.1.2 // indirect
1212
github.com/pelletier/go-toml v1.6.0 // indirect
13-
github.com/pkg/errors v0.8.1
13+
github.com/pkg/errors v0.9.1
1414
github.com/spf13/afero v1.2.2 // indirect
15-
github.com/spf13/cast v1.3.0 // indirect
15+
github.com/spf13/cast v1.3.1 // indirect
1616
github.com/spf13/cobra v0.0.3
1717
github.com/spf13/jwalterweatherman v1.1.0 // indirect
18-
github.com/spf13/pflag v1.0.1
18+
github.com/spf13/pflag v1.0.5
1919
github.com/spf13/viper v1.0.0
20-
github.com/stretchr/testify v1.3.1-0.20190712000136-221dbe5ed467
21-
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 // indirect
22-
golang.org/x/sys v0.0.0-20191027211539-f8518d3b3627 // indirect
20+
github.com/stretchr/testify v1.4.0
21+
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect
22+
gopkg.in/yaml.v2 v2.2.8 // indirect
2323
)

go.sum

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
22
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
3-
github.com/aws/aws-sdk-go v1.19.1 h1:8kOP0/XGJwXIFlYoD1DAtA39cAjc15Iv/QiDMKitD9U=
4-
github.com/aws/aws-sdk-go v1.19.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
3+
github.com/aws/aws-sdk-go v1.29.8 h1:Kma1ikL7MHs/XH5Q4Aqj53AAhgttW6UFykc8Qj16HGo=
4+
github.com/aws/aws-sdk-go v1.29.8/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg=
55
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
77
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
88
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
99
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
10+
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
1011
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
1112
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
1213
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
@@ -19,37 +20,38 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz
1920
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
2021
github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4=
2122
github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys=
22-
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
23-
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
23+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
24+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2425
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2526
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2627
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
2728
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
28-
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
29-
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
29+
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
30+
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
3031
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
3132
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
3233
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
3334
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
34-
github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
35-
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
35+
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
36+
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
3637
github.com/spf13/viper v1.0.0 h1:RUA/ghS2i64rlnn4ydTfblY8Og8QzcPtCcHvgMn+w/I=
3738
github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
3839
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
3940
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
4041
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
41-
github.com/stretchr/testify v1.3.1-0.20190712000136-221dbe5ed467 h1:/pva5wyh0PKqe0bnHBbndEzbqsilMKFNXI0GPbO+L8c=
42-
github.com/stretchr/testify v1.3.1-0.20190712000136-221dbe5ed467/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
42+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
43+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
4344
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
44-
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss=
45-
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
45+
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
46+
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
4647
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
47-
golang.org/x/sys v0.0.0-20191027211539-f8518d3b3627 h1:/FZUR3d/QsXe4AcJyJFCc40TOj3y6Hs23Y3YJlvVkWo=
48-
golang.org/x/sys v0.0.0-20191027211539-f8518d3b3627/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
48+
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
49+
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
4950
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
5051
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
5152
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
5253
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5354
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
54-
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
5555
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
56+
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
57+
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 commit comments

Comments
 (0)