Skip to content

Commit

Permalink
Update module to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mweagle committed Nov 13, 2021
1 parent 0fb267a commit 2b89ef2
Show file tree
Hide file tree
Showing 100 changed files with 3,275 additions and 3,276 deletions.
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ This is a _BREAKING RELEASE_ with many breaking changes noted below.
```go
import (
"github.com/mweagle/Sparta/validator"
"github.com/mweagle/Sparta/v3/validator"
)
workflowHooks := &sparta.WorkflowHooks{
Validators: []sparta.ServiceValidationHookHandler{
Expand Down Expand Up @@ -529,7 +529,7 @@ This is a _BREAKING RELEASE_ with many breaking changes noted below.
- Usage:

```go
import spartaCloudWatch "github.com/mweagle/Sparta/aws/cloudwatch"
import spartaCloudWatch "github.com/mweagle/Sparta/v3/aws/cloudwatch"
func main() {
...
spartaCloudWatch.RegisterLambdaUtilizationMetricPublisher(map[string]string{
Expand All @@ -554,7 +554,7 @@ This is a _BREAKING RELEASE_ with many breaking changes noted below.
package main
import (
spartaMage "github.com/mweagle/Sparta/magefile"
spartaMage "github.com/mweagle/Sparta/v3/magefile"
)
// Provision the service
Expand Down
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,36 +84,38 @@ To get started building and verifying local changes:
1. `go get -u -d github.com/magefile/mage`
1. In the .../mweagle/Sparta directory, run `mage -l` to list the current targets:

```
```bash
\$ mage -l
Targets:
build the application
clean the working directory
compareAgainstMasterBranch is a convenience function to show the comparisons of the current pushed branch against the master branch
describe runs the `TestDescribe` test to generate a describe HTML output file at graph.html
docsBuild builds the public documentation site in the /docs folder
docsCommit builds and commits the current documentation with an autogenerated comment
docsEdit starts a Hugo server and hot reloads the documentation at http://localhost:1313
docsInstallRequirements installs the required Hugo version
ensureAllPreconditions ensures that the source passes _ALL_ static `ensure*` precondition steps
ensureCleanTree ensures that the git tree is clean
ensureFormatted ensures that the source code is formatted with goimports
ensureGoFmt ensures that the source is `gofmt -s` is empty
ensureLint ensures that the source is `golint`ed
ensureMarkdownSpelling ensures that all \*.MD files are checked for common spelling mistakes
ensurePrealloc ensures that slices that could be preallocated are enforced
ensureSpelling ensures that there are no misspellings in the source
ensureStaticChecks ensures that the source code passes static code checks
ensureTravisBuildEnvironment is the command that sets up the Travis environment to run the build.
ensureVet ensures that the source has been `go vet`ted
generateBuildInfo creates the automatic buildinfo.go file so that we can stamp the SHA into the binaries we build...
generateConstants runs the set of commands that update the embedded CONSTANTS for both local and AWS Lambda execution
installBuildRequirements installs or updates the dependent packages that aren't referenced by the source, but are needed to build the Sparta source
logCodeMetrics ensures that the source code is formatted with goimports
publish the latest source
test runs the Sparta tests
testCover runs the test and opens up the resulting report
travisBuild is the task to build in the context of a Travis CI pipeline
build the application
ciBuild is the task to build in the context of CI pipeline
clean the working directory
compareAgainstMasterBranch is a convenience function to show the comparisons of the current pushed branch against the master branch
describe runs the `TestDescribe` test to generate a describe HTML output file at graph.html
docsBuild builds the public documentation site in the /docs folder
docsCommit builds and commits the current documentation with an autogenerated comment
docsEdit starts a Hugo server and hot reloads the documentation at http://localhost:1313
docsInstallRequirements installs the required Hugo version
ensureAllPreconditions ensures that the source passes *ALL* static `ensure*` precondition steps
ensureCIBuildEnvironment is the command that sets up the CI environment to run the build.
ensureCleanTree ensures that the git tree is clean
ensureFormatted ensures that the source code is formatted with goimports
ensureGoFmt ensures that the source is `gofmt -s` is empty
ensureLint ensures that the source is `golint`ed
ensureMarkdownSpelling ensures that all *.MD files are checked for common spelling mistakes
ensurePrealloc ensures that slices that could be preallocated are enforced
ensureSpelling ensures that there are no misspellings in the source
ensureStaticChecks ensures that the source code passes static code checks
ensureVet ensures that the source has been `go vet`ted
fetchCloudFormationSchema we have the latest CloudFormation schema as part of generating constants.
generateAutomaticCode is the handler that runs the codegen part of things
generateBuildInfo creates the automatic buildinfo.go file so that we can stamp the SHA into the binaries we build...
generateConstants runs the set of commands that update the embedded CONSTANTS for both local and AWS Lambda execution
logCodeMetrics ensures that the source code is formatted with goimports
publish the latest source
test runs the Sparta tests
testCover runs the test and opens up the resulting report
unitTest only runs the unit tests
```

Confirm tests are passing on `HEAD` by first running `mage -v test`.
Expand Down
4 changes: 2 additions & 2 deletions apigateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

spartaAPIGateway "github.com/mweagle/Sparta/aws/apigateway"
spartaAWSEvents "github.com/mweagle/Sparta/aws/events"
spartaAPIGateway "github.com/mweagle/Sparta/v3/aws/apigateway"
spartaAWSEvents "github.com/mweagle/Sparta/v3/aws/events"
"github.com/rs/zerolog"
)

Expand Down
4 changes: 2 additions & 2 deletions archetype/archetype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
spartaTesting "github.com/mweagle/Sparta/testing"
sparta "github.com/mweagle/Sparta/v3"
spartaTesting "github.com/mweagle/Sparta/v3/testing"
)

func TestReactorName(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion archetype/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/codecommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/doc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
_ "net/http/pprof" // include pprop

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/rs/zerolog"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/event_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"
"runtime"

sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions archetype/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/Masterminds/sprig"
awsEvents "github.com/aws/aws-lambda-go/events"
awsv2 "github.com/aws/aws-sdk-go-v2/aws"
sparta "github.com/mweagle/Sparta"
"github.com/mweagle/Sparta/archetype/xformer"
sparta "github.com/mweagle/Sparta/v3"
"github.com/mweagle/Sparta/v3/archetype/xformer"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)
Expand Down
2 changes: 1 addition & 1 deletion archetype/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"
"strings"

sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions archetype/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
awsv2S3Types "github.com/aws/aws-sdk-go-v2/service/s3/types"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
sparta "github.com/mweagle/Sparta/v3"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion archetype/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"

awsLambdaEvents "github.com/aws/aws-lambda-go/events"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion aws/accessor/accessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
"github.com/rs/zerolog"
)

Expand Down
4 changes: 2 additions & 2 deletions aws/accessor/dynamo.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
awsv2DynamoAttributeValue "github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
awsv2Dynamo "github.com/aws/aws-sdk-go-v2/service/dynamodb"
awsv2DynamoTypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
sparta "github.com/mweagle/Sparta"
spartaAWS "github.com/mweagle/Sparta/aws"
sparta "github.com/mweagle/Sparta/v3"
spartaAWS "github.com/mweagle/Sparta/v3/aws"
"github.com/rs/zerolog"
)

Expand Down
6 changes: 3 additions & 3 deletions aws/accessor/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
awsv2 "github.com/aws/aws-sdk-go-v2/aws"
awsv2S3 "github.com/aws/aws-sdk-go-v2/service/s3"

sparta "github.com/mweagle/Sparta"
spartaAWS "github.com/mweagle/Sparta/aws"
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
sparta "github.com/mweagle/Sparta/v3"
spartaAWS "github.com/mweagle/Sparta/v3/aws"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
"github.com/rs/zerolog"
)

Expand Down
2 changes: 1 addition & 1 deletion aws/cloudformation/resources/customResource.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
awsv2CFTypes "github.com/aws/aws-sdk-go-v2/service/cloudformation/types"

smithyLogging "github.com/aws/smithy-go/logging"
cwCustomProvider "github.com/mweagle/Sparta/aws/cloudformation/provider"
cwCustomProvider "github.com/mweagle/Sparta/v3/aws/cloudformation/provider"

gof "github.com/awslabs/goformation/v5/cloudformation"

Expand Down
2 changes: 1 addition & 1 deletion aws/cloudformation/resources/helloWorldResource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

cwCustomProvider "github.com/mweagle/Sparta/aws/cloudformation/provider"
cwCustomProvider "github.com/mweagle/Sparta/v3/aws/cloudformation/provider"

"github.com/rs/zerolog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

awsv2Config "github.com/aws/aws-sdk-go-v2/config"

cwCustomProvider "github.com/mweagle/Sparta/aws/cloudformation/provider"
cwCustomProvider "github.com/mweagle/Sparta/v3/aws/cloudformation/provider"

"github.com/rs/zerolog"
)
Expand Down
2 changes: 1 addition & 1 deletion aws/cloudformation/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
gofintrinsics "github.com/awslabs/goformation/v5/intrinsics"
"github.com/go-test/deep"

spartaAWS "github.com/mweagle/Sparta/aws"
spartaAWS "github.com/mweagle/Sparta/v3/aws"
"github.com/rs/zerolog"
)

Expand Down
4 changes: 2 additions & 2 deletions aws/cloudwatch/metrics_awsbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
awsv2 "github.com/aws/aws-sdk-go-v2/aws"
awsv2CW "github.com/aws/aws-sdk-go-v2/service/cloudwatch"
awsv2CWTypes "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
sparta "github.com/mweagle/Sparta"
spartaAWS "github.com/mweagle/Sparta/aws"
sparta "github.com/mweagle/Sparta/v3"
spartaAWS "github.com/mweagle/Sparta/v3/aws"
"github.com/rs/zerolog"
gopsutilCPU "github.com/shirou/gopsutil/v3/cpu"
gopsutilDisk "github.com/shirou/gopsutil/v3/disk"
Expand Down
4 changes: 2 additions & 2 deletions aws/cloudwatch/metrics_publisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

sparta "github.com/mweagle/Sparta"
spartaTesting "github.com/mweagle/Sparta/testing"
sparta "github.com/mweagle/Sparta/v3"
spartaTesting "github.com/mweagle/Sparta/v3/testing"
)

func testLambdaData(t *testing.T) []*sparta.LambdaAWSInfo {
Expand Down
6 changes: 3 additions & 3 deletions aws/iam/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package iambuilder

import (
gof "github.com/awslabs/goformation/v5/cloudformation"
sparta "github.com/mweagle/Sparta"
spartaIAM "github.com/mweagle/Sparta/aws/iam"
iamtypes "github.com/mweagle/Sparta/aws/iam/builder/types"
sparta "github.com/mweagle/Sparta/v3"
spartaIAM "github.com/mweagle/Sparta/v3/aws/iam"
iamtypes "github.com/mweagle/Sparta/v3/aws/iam/builder/types"
)

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion aws/iam/builder/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

gofintrinsics "github.com/awslabs/goformation/v5/intrinsics"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
)

// Set of iamBuilders whose output is required to match the corresponding
Expand Down
2 changes: 1 addition & 1 deletion aws/iam/iam.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package iam

import (
iamtypes "github.com/mweagle/Sparta/aws/iam/builder/types"
iamtypes "github.com/mweagle/Sparta/v3/aws/iam/builder/types"
)

// PolicyStatement represents an entry in an IAM policy document
Expand Down
2 changes: 1 addition & 1 deletion aws/step/aws_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

gof "github.com/awslabs/goformation/v5/cloudformation"
sparta "github.com/mweagle/Sparta"
sparta "github.com/mweagle/Sparta/v3"
)

func TestAWSAPIStepFunction(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion aws/step/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

gofecs "github.com/awslabs/goformation/v5/cloudformation/ecs"

spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
)

func TestFargateSNSServices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions aws/step/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
gofiam "github.com/awslabs/goformation/v5/cloudformation/iam"
goflambda "github.com/awslabs/goformation/v5/cloudformation/lambda"
gofstep "github.com/awslabs/goformation/v5/cloudformation/stepfunctions"
sparta "github.com/mweagle/Sparta"
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
spartaIAM "github.com/mweagle/Sparta/aws/iam"
sparta "github.com/mweagle/Sparta/v3"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
spartaIAM "github.com/mweagle/Sparta/v3/aws/iam"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)
Expand Down
6 changes: 3 additions & 3 deletions aws/step/step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

sparta "github.com/mweagle/Sparta"
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
spartaTesting "github.com/mweagle/Sparta/testing"
sparta "github.com/mweagle/Sparta/v3"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
spartaTesting "github.com/mweagle/Sparta/v3/testing"
)

func testStepProvisionAssertError(t *testing.T,
Expand Down
4 changes: 2 additions & 2 deletions cloudformation_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"text/template"

gof "github.com/awslabs/goformation/v5/cloudformation"
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
cwCustomProvider "github.com/mweagle/Sparta/aws/cloudformation/provider"
spartaCF "github.com/mweagle/Sparta/v3/aws/cloudformation"
cwCustomProvider "github.com/mweagle/Sparta/v3/aws/cloudformation/provider"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)
Expand Down
2 changes: 1 addition & 1 deletion cloudtest/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
awsv2CW "github.com/aws/aws-sdk-go-v2/service/cloudwatch"
awsv2CWTypes "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
awsv2Lambda "github.com/aws/aws-sdk-go-v2/service/lambda"
spartaCWLogs "github.com/mweagle/Sparta/aws/cloudwatch/logs"
spartaCWLogs "github.com/mweagle/Sparta/v3/aws/cloudwatch/logs"
"github.com/pkg/errors"
)

Expand Down
Loading

0 comments on commit 2b89ef2

Please sign in to comment.