repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest // DeprecatedALBSecurityGroupsConfig represents security group configuration settings for an ALB. type DeprecatedALBSecurityGroupsConfig struct { DeprecatedIngress DeprecatedIngress `yaml:"in...
26
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package manifest provides functionality to create Manifest files. package manifest
6
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "sort" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/aws/copilot-cli/internal/pkg/template" "gopkg.in/yaml.v3" ) ...
580
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/stretchr/testify/requi...
1,177
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "github.com/aws/copilot-cli/internal/pkg/aws/cloudfront" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/dustin/go-humanize/english" "strconv" "strings" ) ...
238
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "strings" "time" "github.com/aws/aws-sdk-go/aws" "gopkg.in/yaml.v3" ) // HTTPOrBool holds advanced configuration for routing rule or a boolean switch. type HTTPOrBool ...
190
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func TestHTTPOrBool_Disabled(t *testing.T) { testCases := map[string]struct...
290
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "bytes" "encoding/json" "fmt" "os" "regexp" "strings" "gopkg.in/yaml.v3" ) const ( reservedEnvVarKeyForAppName = "COPILOT_APPLICATION_NAME" reservedEnvVarKeyForEnvName = "C...
146
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "os" "testing" "github.com/stretchr/testify/require" ) func TestInterpolator_Interpolate(t *testing.T) { testCases := map[string]struct { inputEnvVar map[string]string ...
131
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/imdario/mergo" ) co...
206
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/stretchr...
451
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "strconv" "time" "github.com/aws/copilot-cli/internal/pkg/term/color" "github.com/aws/copilot-cli/internal/pkg/term/log" "github.com/aws/aws-sdk-go/aws" "github.com/imdario/me...
315
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "path/filepath" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg...
2,894
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" ) type subnetIDsGetter interface { SubnetIDs(filters ...ec2.Filter) ([]string, error) } ...
76
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-cli/...
93
copilot-cli
aws
Go
//go:build localintegration // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "os" "path/filepath" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/golang/mock/gom...
486
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/fatih/structs" "gopkg.in/yaml.v3" ) // Valid source providers for Copilot Pipelines. const ( Gith...
284
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "bytes" "errors" "fmt" "testing" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/aws/copilot-cli/internal/pkg/template/mocks" "github.com/fatih/structs" "githu...
320
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/imdario/mergo" ) co...
210
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "bytes" "errors" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/temp...
668
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/imdario/mergo" ) co...
113
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/stretchr/testify/require" ) func TestStaticSite_ApplyEnv(t ...
123
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/template" "gopkg.in/yaml.v3" ) var ( errUnmarshalEFSOpts = errors.New(`cannot unmarshal "efs" ...
197
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) type testVolume struct { EFS EFSConfigOrBool `yaml:"efs"` } func TestEFSCo...
311
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "math" "sort" "strconv" "strings" "time" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" ...
705
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/stretchr/testify/require" "gopkg.i...
1,035
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "reflect" "strings" "time" "github.com/imdario/mergo" ) var fmtExclusiveFieldsSpecifiedTogether = "invalid manifest: %s %s mutually exclusive with %s and shouldn't be spe...
625
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/imdario/mergo" "github.com/stretchr/testify/require" ) func TestBasicTransformer_Transformer(t *testing.T) { type...
1,387
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "reflect" "gopkg.in/yaml.v3" ) // Union is a type used for yaml keys that may be of type Basic or Advanced. // Union will only ever hold one of the underlying types, never ...
177
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "bytes" "strings" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) type unionTest[A, B any] struct { yaml string expecte...
299
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "net" "path/filepath" "regexp" "sort" "strconv" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/graph" "github.com/aws/co...
2,365
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/copilot-cli/internal/pkg/aws/cloudfront" ) var ( errAZsNotEqual = errors.New...
458
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" ) func TestEnvironment_Validate(t *testing.T) { mockVPCCIDR := IPNet("10.0.0.0/1...
1,101
copilot-cli
aws
Go
//go:build integration || localintegration // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "fmt" "reflect" "testing" "time" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func basicTypesString() []string { var...
111
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/stretchr/testify/require" ) func T...
4,257
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "g...
393
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/...
1,839
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "path/filepath" "strings" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-cli/internal/pkg/doc...
867
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/docker/dockerengine" "gopkg.in/yaml.v3" ) // Defaults for Firelens co...
441
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func TestExec_UnmarshalYAML(t *testing.T) { testCases := map[stri...
521
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "errors" "fmt" "path/filepath" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/manifest/manifestinfo" "github.com/stretchr/testify/require" ...
1,322
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package manifestinfo provides access to information embedded in a manifest. package manifestinfo const ( // LoadBalancedWebServiceType is a web service with a load balancer and Fargate as compute. LoadBal...
64
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifestinfo import ( "testing" "github.com/stretchr/testify/require" ) func Test_IsTypeAService(t *testing.T) { testCases := map[string]struct { inType string wanted bool }{ "return false ...
55
copilot-cli
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: ./internal/pkg/manifest/loader.go // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" ec2 "github.com/aws/copilot-cli/internal/pkg/aws/ec2" gomock "github.com/golang/mock/gomock" ) // MocksubnetIDsGetter is a mock of subne...
92
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "bytes" "fmt" "io" "os" "os/exec" "path/filepath" "strings" "gopkg.in/yaml.v3" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/spf13/afero" ) // CDK is an ...
201
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "bytes" "fmt" "os/exec" "path/filepath" "strings" "testing" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/spf13/afero" "github.com/stretchr/testify/requir...
258
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "fmt" ) type errNPMUnavailable struct { parent error } func (err *errNPMUnavailable) Error() string { return fmt.Sprintf(`"npm" cannot be found: "npm" is required to override wit...
31
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "testing" "github.com/stretchr/testify/require" ) func TestErrNPMUnavailable_RecommendActions(t *testing.T) { require.Equal(t, `Please follow instructions at: "https://docs.npmjs...
15
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override // Noop represents an Overrider that does not do any transformations. type Noop struct{} // Override does nothing. func (no *Noop) Override(body []byte) ([]byte, error) { return body, nil }
13
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "testing" "github.com/stretchr/testify/require" ) func TestNoop_Override(t *testing.T) { // GIVEN overrider := new(Noop) // WHEN out, err := overrider.Override([]byte("hello,...
23
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package override defines functionality to interact with the "overrides/" directory // for accessing and mutating the Copilot generated AWS CloudFormation templates. package override import ( "fmt" "path/f...
104
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "fmt" "path/filepath" "testing" "github.com/stretchr/testify/require" "github.com/spf13/afero" ) func TestLookup(t *testing.T) { t.Parallel() t.Run("should return ErrNotExis...
122
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "fmt" "path/filepath" "strconv" "strings" "github.com/spf13/afero" "gopkg.in/yaml.v3" ) const ( jsonPointerSeparator = "/" yamlPatchFile = "cfn.patches.yml" ) // Sca...
357
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package override import ( "fmt" "path/filepath" "strings" "testing" "github.com/spf13/afero" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func TestScaffoldWithPatch(t *testing.T) { t.Ru...
577
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package repository provides support for building and pushing images to a repository. package repository import ( "context" "fmt" "io" "github.com/aws/copilot-cli/internal/pkg/exec" "github.com/aws/co...
112
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package repository import ( "context" "errors" "fmt" "path/filepath" "strings" "testing" "github.com/aws/copilot-cli/internal/pkg/docker/dockerengine" "github.com/aws/copilot-cli/internal/pkg/reposit...
196
copilot-cli
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: ./internal/pkg/repository/repository.go // Package mocks is a generated GoMock package. package mocks import ( context "context" io "io" reflect "reflect" dockerengine "github.com/aws/copilot-cli/internal/pkg/docker/dockerengine" gomock "github.com/golang/mo...
154
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package jobrunner provides support for invoking jobs. package jobrunner import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" "github.com/aws/copil...
81
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package jobrunner import ( "errors" "fmt" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" "github.com/aws/copilot-cli/internal/pkg/runner/jobrunner...
128
copilot-cli
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: ./internal/pkg/runner/jobrunner/jobrunner.go // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" cloudformation "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" gomock "github.com/golang/mock/gomock" ) // MockS...
88
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package s3 provides a client to retrieve Copilot S3 information. package s3 import ( "fmt" "sort" "strings" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/copilot-cli/internal/pkg/aws/resourc...
84
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package s3 import ( "errors" "fmt" "testing" "github.com/aws/copilot-cli/internal/pkg/aws/resourcegroups" "github.com/aws/copilot-cli/internal/pkg/deploy" "github.com/aws/copilot-cli/internal/pkg/s3/moc...
126
copilot-cli
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: ./internal/pkg/s3/s3.go // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" resourcegroups "github.com/aws/copilot-cli/internal/pkg/aws/resourcegroups" gomock "github.com/golang/mock/gomock" ) // MockresourceGetter is a mo...
51
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "fmt" "math/rand" "strings" "sync" "time" awsarn "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/a...
247
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "fmt" "math/rand" "sync" "time" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation/stackset" ) // StackSetDescriber is the Clou...
171
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "errors" "testing" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/stretchr/testify/require" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation/stackset" ) ...
334
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "errors" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/stretchr/testify/...
348
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "fmt" "math/rand" "strings" "sync" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/copilot-cli/internal/pkg/aws/cloudwatch" "git...
248
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "errors" "github.com/aws/copilot-cli/internal/pkg/aws/cloudwatch" "testing" "time" "github.com/aws/aws-sdk-go/aws" awsecs "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws...
489
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package stream implements streamers that publish AWS events periodically. // A streamer fetches AWS events periodically and notifies subscribed channels of them. package stream import ( "context" "time" )...
81
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stream import ( "context" "errors" "testing" "time" "github.com/stretchr/testify/require" ) // counterStreamer counts the number of times Fetch and Notify are invoked. type counterStreamer struc...
92
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package task import ( "fmt" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-cli/internal/pkg/aws/ecs" ) const ( fmtErrDefaultSubnets = "get default subnet IDs: %w" ) // ConfigRu...
118
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package task import ( "errors" "fmt" "testing" awsecs "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-...
441
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package task import ( "fmt" "strings" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-cli/internal/pkg/aws/ecs" "github.com/aws/copilot-cli/internal/pkg/deploy" ) const ( fmtE...
175
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package task import ( "errors" "fmt" "testing" awsecs "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-...
439
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package task import ( "errors" "fmt" ) var ( errNoSubnetFound = errors.New("no subnets found") errVPCGetterNil = errors.New("vpc getter is not set") errClusterGetterNil = errors.New("cluster getter ...
35
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package task provides support for running Amazon ECS tasks. package task import ( "fmt" "time" "github.com/aws/copilot-cli/internal/pkg/aws/ec2" "github.com/aws/copilot-cli/internal/pkg/aws/ecs" "gith...
120
copilot-cli
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: ./internal/pkg/task/task.go // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" ec2 "github.com/aws/copilot-cli/internal/pkg/aws/ec2" ecs "github.com/aws/copilot-cli/internal/pkg/aws/ecs" describe "github.com/aws/copilot-c...
265
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "bytes" "fmt" "strconv" "text/template" "github.com/aws/copilot-cli/internal/pkg/aws/s3" ) const ( envCFTemplatePath = "environment/cf.yml" fmtEnvCFSubTemplatePath ...
310
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "fmt" "regexp" "testing" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) var featureRegexp = regexp.MustCompile(`\$\{(\w+)}`) // E.g. match ${ALB} and ${EFS}. func ...
50
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "testing" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) func TestTemplate_ParseEnv(t *testing.T) { // GIVEN fs := afero.NewMemMapFs() _ = fs.MkdirAll("temp...
102
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "fmt" "sort" "strings" "unicode" ) const ( cdkVersion = "2.56.0" cdkConstructsMinVersion = "10.0.0" cdkTemplatesPath = "overrides/cdk" yamlPatchTemplates...
140
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "testing" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) func TestCFNType_ImportName(t *testing.T) { require.Equal(t, "aws_autoscaling", CFNType("AWS::AutoSca...
240
copilot-cli
aws
Go
//go:build integration || localintegration // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "bytes" "github.com/stretchr/testify/require" "io/fs" "os" "path/filepath" "testing" ) func TestPermissions_Boundary(t *testing.T) {...
33
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package template renders the static files under the "/templates/" directory. package template import ( "bytes" "embed" "fmt" "io/fs" "path" "path/filepath" "strings" "text/template" "github.com/aw...
273
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "encoding/json" "fmt" "regexp" "strconv" "strings" "golang.org/x/text/cases" "golang.org/x/text/language" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aw...
208
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" ) func TestReplaceDashesFunc(t *testing.T) { testCases := map[string]struct { in string w...
317
copilot-cli
aws
Go
//go:build integration // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template_test import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/copilot-cli/internal/pkg/aws/sessions" ...
608
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "errors" "fmt" "io/fs" "os" "testing" "github.com/spf13/afero" "github.com/aws/copilot-cli/internal/pkg/aws/s3" "github.com/stretchr/testify/require" ) // mockFS implements...
226
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "bytes" "crypto/sha256" "fmt" "strconv" "text/template" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/dustin/go-humanize/english" "github.com/google/uuid" ...
1,008
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "fmt" "testing" "github.com/spf13/afero" "github.com/aws/aws-sdk-go/aws" "github.com/stretchr/testify/require" ) func TestTemplate_ParseSvc(t *testing.T) { const ( testSvcN...
534
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package artifactpath holds functions to generate the S3 object path for artifacts. package artifactpath import ( "crypto/sha256" "fmt" "path" "path/filepath" ) const ( s3ArtifactDirName = "m...
72
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package artifactpath import ( "testing" "github.com/stretchr/testify/require" ) func TestCustomResource(t *testing.T) { require.Equal(t, "manual/scripts/custom-resources/envcontrollerfunction/e3b0c44298fc...
23
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package diff provides functionalities to compare two YAML documents. package diff import ( "fmt" "io" "sort" "gopkg.in/yaml.v3" ) // Tree represents a difference tree between two YAML documents. type ...
320
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff import ( "errors" "reflect" "testing" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func TestFrom_Parse(t *testing.T) { testCases := map[string]struct { curr string ...
505
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff import ( "fmt" "strings" "github.com/aws/copilot-cli/internal/pkg/term/color" "gopkg.in/yaml.v3" ) type formatter interface { formatInsert(node diffNode) (string, error) formatDel(node dif...
203
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff import ( "gopkg.in/yaml.v3" ) type action int const ( actionMatch action = iota actionMod actionDel actionInsert actionDone ) type tracker[T any] struct { index int data []T } func ne...
119
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff type eqFunc func(inA, inB int) bool type lcsIndex struct { inA int inB int } // longestCommonSubsequence computes the longest common subsequence of two lists, and returns two lists that contai...
71
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff import ( "fmt" "testing" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) func Test_longestCommonSubsequence_string(t *testing.T) { testCases := []struct { inA []string in...
218
copilot-cli
aws
Go
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package diff import ( "fmt" "strings" "gopkg.in/yaml.v3" ) // overrider overrides the parsing behavior between two yaml nodes under certain keys. type overrider interface { match(from, to *yaml.Node, key...
263