repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
awslabs/goformation
cloudformation/all.go
GetAWSServerlessFunctionWithName
func (t *Template) GetAWSServerlessFunctionWithName(name string) (*resources.AWSServerlessFunction, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessFunction: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessFunction not found", name) }
go
func (t *Template) GetAWSServerlessFunctionWithName(name string) (*resources.AWSServerlessFunction, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessFunction: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessFunction not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServerlessFunctionWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServerlessFunction", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServerlessFunction", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServerlessFunctionWithName retrieves all AWSServerlessFunction items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServerlessFunctionWithName", "retrieves", "all", "AWSServerlessFunction", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8792-L8800
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServerlessLayerVersionResources
func (t *Template) GetAllAWSServerlessLayerVersionResources() map[string]*resources.AWSServerlessLayerVersion { results := map[string]*resources.AWSServerlessLayerVersion{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServerlessLayerVersion: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServerlessLayerVersionResources() map[string]*resources.AWSServerlessLayerVersion { results := map[string]*resources.AWSServerlessLayerVersion{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServerlessLayerVersion: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServerlessLayerVersionResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServerlessLayerVersion", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServerlessLayerVersion", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServerlessLayerVersion", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServerlessLayerVersionResources retrieves all AWSServerlessLayerVersion items from an AWS CloudFormation template
[ "GetAllAWSServerlessLayerVersionResources", "retrieves", "all", "AWSServerlessLayerVersion", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8803-L8812
train
awslabs/goformation
cloudformation/all.go
GetAWSServerlessLayerVersionWithName
func (t *Template) GetAWSServerlessLayerVersionWithName(name string) (*resources.AWSServerlessLayerVersion, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessLayerVersion: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessLayerVersion not found", name) }
go
func (t *Template) GetAWSServerlessLayerVersionWithName(name string) (*resources.AWSServerlessLayerVersion, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessLayerVersion: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessLayerVersion not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServerlessLayerVersionWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServerlessLayerVersion", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServerlessLayerVersion", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServerlessLayerVersionWithName retrieves all AWSServerlessLayerVersion items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServerlessLayerVersionWithName", "retrieves", "all", "AWSServerlessLayerVersion", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8816-L8824
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServerlessSimpleTableResources
func (t *Template) GetAllAWSServerlessSimpleTableResources() map[string]*resources.AWSServerlessSimpleTable { results := map[string]*resources.AWSServerlessSimpleTable{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServerlessSimpleTable: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServerlessSimpleTableResources() map[string]*resources.AWSServerlessSimpleTable { results := map[string]*resources.AWSServerlessSimpleTable{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServerlessSimpleTable: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServerlessSimpleTableResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServerlessSimpleTable", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServerlessSimpleTable", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServerlessSimpleTable", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServerlessSimpleTableResources retrieves all AWSServerlessSimpleTable items from an AWS CloudFormation template
[ "GetAllAWSServerlessSimpleTableResources", "retrieves", "all", "AWSServerlessSimpleTable", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8827-L8836
train
awslabs/goformation
cloudformation/all.go
GetAWSServerlessSimpleTableWithName
func (t *Template) GetAWSServerlessSimpleTableWithName(name string) (*resources.AWSServerlessSimpleTable, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessSimpleTable: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessSimpleTable not found", name) }
go
func (t *Template) GetAWSServerlessSimpleTableWithName(name string) (*resources.AWSServerlessSimpleTable, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServerlessSimpleTable: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServerlessSimpleTable not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServerlessSimpleTableWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServerlessSimpleTable", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServerlessSimpleTable", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServerlessSimpleTableWithName retrieves all AWSServerlessSimpleTable items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServerlessSimpleTableWithName", "retrieves", "all", "AWSServerlessSimpleTable", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8840-L8848
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogAcceptedPortfolioShareResources
func (t *Template) GetAllAWSServiceCatalogAcceptedPortfolioShareResources() map[string]*resources.AWSServiceCatalogAcceptedPortfolioShare { results := map[string]*resources.AWSServiceCatalogAcceptedPortfolioShare{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogAcceptedPortfolioShare: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogAcceptedPortfolioShareResources() map[string]*resources.AWSServiceCatalogAcceptedPortfolioShare { results := map[string]*resources.AWSServiceCatalogAcceptedPortfolioShare{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogAcceptedPortfolioShare: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogAcceptedPortfolioShareResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogAcceptedPortfolioShare", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogAcceptedPortfolioShare", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogAcceptedPortfolioShare", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogAcceptedPortfolioShareResources retrieves all AWSServiceCatalogAcceptedPortfolioShare items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogAcceptedPortfolioShareResources", "retrieves", "all", "AWSServiceCatalogAcceptedPortfolioShare", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8851-L8860
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogAcceptedPortfolioShareWithName
func (t *Template) GetAWSServiceCatalogAcceptedPortfolioShareWithName(name string) (*resources.AWSServiceCatalogAcceptedPortfolioShare, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogAcceptedPortfolioShare: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogAcceptedPortfolioShare not found", name) }
go
func (t *Template) GetAWSServiceCatalogAcceptedPortfolioShareWithName(name string) (*resources.AWSServiceCatalogAcceptedPortfolioShare, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogAcceptedPortfolioShare: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogAcceptedPortfolioShare not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogAcceptedPortfolioShareWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogAcceptedPortfolioShare", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogAcceptedPortfolioShare", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogAcceptedPortfolioShareWithName retrieves all AWSServiceCatalogAcceptedPortfolioShare items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogAcceptedPortfolioShareWithName", "retrieves", "all", "AWSServiceCatalogAcceptedPortfolioShare", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8864-L8872
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogCloudFormationProductResources
func (t *Template) GetAllAWSServiceCatalogCloudFormationProductResources() map[string]*resources.AWSServiceCatalogCloudFormationProduct { results := map[string]*resources.AWSServiceCatalogCloudFormationProduct{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProduct: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogCloudFormationProductResources() map[string]*resources.AWSServiceCatalogCloudFormationProduct { results := map[string]*resources.AWSServiceCatalogCloudFormationProduct{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProduct: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogCloudFormationProductResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogCloudFormationProduct", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogCloudFormationProduct", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogCloudFormationProduct", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogCloudFormationProductResources retrieves all AWSServiceCatalogCloudFormationProduct items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogCloudFormationProductResources", "retrieves", "all", "AWSServiceCatalogCloudFormationProduct", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8875-L8884
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogCloudFormationProductWithName
func (t *Template) GetAWSServiceCatalogCloudFormationProductWithName(name string) (*resources.AWSServiceCatalogCloudFormationProduct, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProduct: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogCloudFormationProduct not found", name) }
go
func (t *Template) GetAWSServiceCatalogCloudFormationProductWithName(name string) (*resources.AWSServiceCatalogCloudFormationProduct, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProduct: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogCloudFormationProduct not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogCloudFormationProductWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogCloudFormationProduct", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogCloudFormationProduct", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogCloudFormationProductWithName retrieves all AWSServiceCatalogCloudFormationProduct items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogCloudFormationProductWithName", "retrieves", "all", "AWSServiceCatalogCloudFormationProduct", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8888-L8896
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogCloudFormationProvisionedProductResources
func (t *Template) GetAllAWSServiceCatalogCloudFormationProvisionedProductResources() map[string]*resources.AWSServiceCatalogCloudFormationProvisionedProduct { results := map[string]*resources.AWSServiceCatalogCloudFormationProvisionedProduct{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProvisionedProduct: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogCloudFormationProvisionedProductResources() map[string]*resources.AWSServiceCatalogCloudFormationProvisionedProduct { results := map[string]*resources.AWSServiceCatalogCloudFormationProvisionedProduct{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProvisionedProduct: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogCloudFormationProvisionedProductResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogCloudFormationProvisionedProduct", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogCloudFormationProvisionedProduct", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogCloudFormationProvisionedProduct", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogCloudFormationProvisionedProductResources retrieves all AWSServiceCatalogCloudFormationProvisionedProduct items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogCloudFormationProvisionedProductResources", "retrieves", "all", "AWSServiceCatalogCloudFormationProvisionedProduct", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8899-L8908
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogCloudFormationProvisionedProductWithName
func (t *Template) GetAWSServiceCatalogCloudFormationProvisionedProductWithName(name string) (*resources.AWSServiceCatalogCloudFormationProvisionedProduct, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProvisionedProduct: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogCloudFormationProvisionedProduct not found", name) }
go
func (t *Template) GetAWSServiceCatalogCloudFormationProvisionedProductWithName(name string) (*resources.AWSServiceCatalogCloudFormationProvisionedProduct, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogCloudFormationProvisionedProduct: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogCloudFormationProvisionedProduct not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogCloudFormationProvisionedProductWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogCloudFormationProvisionedProduct", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogCloudFormationProvisionedProduct", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogCloudFormationProvisionedProductWithName retrieves all AWSServiceCatalogCloudFormationProvisionedProduct items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogCloudFormationProvisionedProductWithName", "retrieves", "all", "AWSServiceCatalogCloudFormationProvisionedProduct", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8912-L8920
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogLaunchNotificationConstraintResources
func (t *Template) GetAllAWSServiceCatalogLaunchNotificationConstraintResources() map[string]*resources.AWSServiceCatalogLaunchNotificationConstraint { results := map[string]*resources.AWSServiceCatalogLaunchNotificationConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchNotificationConstraint: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogLaunchNotificationConstraintResources() map[string]*resources.AWSServiceCatalogLaunchNotificationConstraint { results := map[string]*resources.AWSServiceCatalogLaunchNotificationConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchNotificationConstraint: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogLaunchNotificationConstraintResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchNotificationConstraint", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchNotificationConstraint", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchNotificationConstraint", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogLaunchNotificationConstraintResources retrieves all AWSServiceCatalogLaunchNotificationConstraint items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogLaunchNotificationConstraintResources", "retrieves", "all", "AWSServiceCatalogLaunchNotificationConstraint", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8923-L8932
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogLaunchNotificationConstraintWithName
func (t *Template) GetAWSServiceCatalogLaunchNotificationConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchNotificationConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchNotificationConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchNotificationConstraint not found", name) }
go
func (t *Template) GetAWSServiceCatalogLaunchNotificationConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchNotificationConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchNotificationConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchNotificationConstraint not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogLaunchNotificationConstraintWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogLaunchNotificationConstraint", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchNotificationConstraint", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogLaunchNotificationConstraintWithName retrieves all AWSServiceCatalogLaunchNotificationConstraint items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogLaunchNotificationConstraintWithName", "retrieves", "all", "AWSServiceCatalogLaunchNotificationConstraint", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8936-L8944
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogLaunchRoleConstraintResources
func (t *Template) GetAllAWSServiceCatalogLaunchRoleConstraintResources() map[string]*resources.AWSServiceCatalogLaunchRoleConstraint { results := map[string]*resources.AWSServiceCatalogLaunchRoleConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchRoleConstraint: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogLaunchRoleConstraintResources() map[string]*resources.AWSServiceCatalogLaunchRoleConstraint { results := map[string]*resources.AWSServiceCatalogLaunchRoleConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchRoleConstraint: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogLaunchRoleConstraintResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchRoleConstraint", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchRoleConstraint", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchRoleConstraint", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogLaunchRoleConstraintResources retrieves all AWSServiceCatalogLaunchRoleConstraint items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogLaunchRoleConstraintResources", "retrieves", "all", "AWSServiceCatalogLaunchRoleConstraint", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8947-L8956
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogLaunchRoleConstraintWithName
func (t *Template) GetAWSServiceCatalogLaunchRoleConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchRoleConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchRoleConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchRoleConstraint not found", name) }
go
func (t *Template) GetAWSServiceCatalogLaunchRoleConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchRoleConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchRoleConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchRoleConstraint not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogLaunchRoleConstraintWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogLaunchRoleConstraint", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchRoleConstraint", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogLaunchRoleConstraintWithName retrieves all AWSServiceCatalogLaunchRoleConstraint items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogLaunchRoleConstraintWithName", "retrieves", "all", "AWSServiceCatalogLaunchRoleConstraint", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8960-L8968
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogLaunchTemplateConstraintResources
func (t *Template) GetAllAWSServiceCatalogLaunchTemplateConstraintResources() map[string]*resources.AWSServiceCatalogLaunchTemplateConstraint { results := map[string]*resources.AWSServiceCatalogLaunchTemplateConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchTemplateConstraint: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogLaunchTemplateConstraintResources() map[string]*resources.AWSServiceCatalogLaunchTemplateConstraint { results := map[string]*resources.AWSServiceCatalogLaunchTemplateConstraint{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchTemplateConstraint: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogLaunchTemplateConstraintResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchTemplateConstraint", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogLaunchTemplateConstraint", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchTemplateConstraint", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogLaunchTemplateConstraintResources retrieves all AWSServiceCatalogLaunchTemplateConstraint items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogLaunchTemplateConstraintResources", "retrieves", "all", "AWSServiceCatalogLaunchTemplateConstraint", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8971-L8980
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogLaunchTemplateConstraintWithName
func (t *Template) GetAWSServiceCatalogLaunchTemplateConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchTemplateConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchTemplateConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchTemplateConstraint not found", name) }
go
func (t *Template) GetAWSServiceCatalogLaunchTemplateConstraintWithName(name string) (*resources.AWSServiceCatalogLaunchTemplateConstraint, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogLaunchTemplateConstraint: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogLaunchTemplateConstraint not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogLaunchTemplateConstraintWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogLaunchTemplateConstraint", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogLaunchTemplateConstraint", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogLaunchTemplateConstraintWithName retrieves all AWSServiceCatalogLaunchTemplateConstraint items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogLaunchTemplateConstraintWithName", "retrieves", "all", "AWSServiceCatalogLaunchTemplateConstraint", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8984-L8992
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogPortfolioResources
func (t *Template) GetAllAWSServiceCatalogPortfolioResources() map[string]*resources.AWSServiceCatalogPortfolio { results := map[string]*resources.AWSServiceCatalogPortfolio{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolio: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogPortfolioResources() map[string]*resources.AWSServiceCatalogPortfolio { results := map[string]*resources.AWSServiceCatalogPortfolio{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolio: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogPortfolioResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolio", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolio", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolio", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogPortfolioResources retrieves all AWSServiceCatalogPortfolio items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogPortfolioResources", "retrieves", "all", "AWSServiceCatalogPortfolio", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L8995-L9004
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogPortfolioWithName
func (t *Template) GetAWSServiceCatalogPortfolioWithName(name string) (*resources.AWSServiceCatalogPortfolio, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolio: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolio not found", name) }
go
func (t *Template) GetAWSServiceCatalogPortfolioWithName(name string) (*resources.AWSServiceCatalogPortfolio, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolio: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolio not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogPortfolioWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogPortfolio", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolio", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogPortfolioWithName retrieves all AWSServiceCatalogPortfolio items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogPortfolioWithName", "retrieves", "all", "AWSServiceCatalogPortfolio", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9008-L9016
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources
func (t *Template) GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources() map[string]*resources.AWSServiceCatalogPortfolioPrincipalAssociation { results := map[string]*resources.AWSServiceCatalogPortfolioPrincipalAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioPrincipalAssociation: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources() map[string]*resources.AWSServiceCatalogPortfolioPrincipalAssociation { results := map[string]*resources.AWSServiceCatalogPortfolioPrincipalAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioPrincipalAssociation: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioPrincipalAssociation", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioPrincipalAssociation", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioPrincipalAssociation", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources retrieves all AWSServiceCatalogPortfolioPrincipalAssociation items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogPortfolioPrincipalAssociationResources", "retrieves", "all", "AWSServiceCatalogPortfolioPrincipalAssociation", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9019-L9028
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogPortfolioPrincipalAssociationWithName
func (t *Template) GetAWSServiceCatalogPortfolioPrincipalAssociationWithName(name string) (*resources.AWSServiceCatalogPortfolioPrincipalAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioPrincipalAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioPrincipalAssociation not found", name) }
go
func (t *Template) GetAWSServiceCatalogPortfolioPrincipalAssociationWithName(name string) (*resources.AWSServiceCatalogPortfolioPrincipalAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioPrincipalAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioPrincipalAssociation not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogPortfolioPrincipalAssociationWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogPortfolioPrincipalAssociation", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioPrincipalAssociation", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogPortfolioPrincipalAssociationWithName retrieves all AWSServiceCatalogPortfolioPrincipalAssociation items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogPortfolioPrincipalAssociationWithName", "retrieves", "all", "AWSServiceCatalogPortfolioPrincipalAssociation", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9032-L9040
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogPortfolioProductAssociationResources
func (t *Template) GetAllAWSServiceCatalogPortfolioProductAssociationResources() map[string]*resources.AWSServiceCatalogPortfolioProductAssociation { results := map[string]*resources.AWSServiceCatalogPortfolioProductAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioProductAssociation: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogPortfolioProductAssociationResources() map[string]*resources.AWSServiceCatalogPortfolioProductAssociation { results := map[string]*resources.AWSServiceCatalogPortfolioProductAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioProductAssociation: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogPortfolioProductAssociationResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioProductAssociation", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioProductAssociation", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioProductAssociation", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogPortfolioProductAssociationResources retrieves all AWSServiceCatalogPortfolioProductAssociation items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogPortfolioProductAssociationResources", "retrieves", "all", "AWSServiceCatalogPortfolioProductAssociation", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9043-L9052
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogPortfolioProductAssociationWithName
func (t *Template) GetAWSServiceCatalogPortfolioProductAssociationWithName(name string) (*resources.AWSServiceCatalogPortfolioProductAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioProductAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioProductAssociation not found", name) }
go
func (t *Template) GetAWSServiceCatalogPortfolioProductAssociationWithName(name string) (*resources.AWSServiceCatalogPortfolioProductAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioProductAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioProductAssociation not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogPortfolioProductAssociationWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogPortfolioProductAssociation", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioProductAssociation", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogPortfolioProductAssociationWithName retrieves all AWSServiceCatalogPortfolioProductAssociation items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogPortfolioProductAssociationWithName", "retrieves", "all", "AWSServiceCatalogPortfolioProductAssociation", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9056-L9064
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogPortfolioShareResources
func (t *Template) GetAllAWSServiceCatalogPortfolioShareResources() map[string]*resources.AWSServiceCatalogPortfolioShare { results := map[string]*resources.AWSServiceCatalogPortfolioShare{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioShare: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogPortfolioShareResources() map[string]*resources.AWSServiceCatalogPortfolioShare { results := map[string]*resources.AWSServiceCatalogPortfolioShare{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioShare: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogPortfolioShareResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioShare", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogPortfolioShare", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioShare", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogPortfolioShareResources retrieves all AWSServiceCatalogPortfolioShare items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogPortfolioShareResources", "retrieves", "all", "AWSServiceCatalogPortfolioShare", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9067-L9076
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogPortfolioShareWithName
func (t *Template) GetAWSServiceCatalogPortfolioShareWithName(name string) (*resources.AWSServiceCatalogPortfolioShare, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioShare: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioShare not found", name) }
go
func (t *Template) GetAWSServiceCatalogPortfolioShareWithName(name string) (*resources.AWSServiceCatalogPortfolioShare, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogPortfolioShare: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogPortfolioShare not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogPortfolioShareWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogPortfolioShare", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogPortfolioShare", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogPortfolioShareWithName retrieves all AWSServiceCatalogPortfolioShare items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogPortfolioShareWithName", "retrieves", "all", "AWSServiceCatalogPortfolioShare", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9080-L9088
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogTagOptionResources
func (t *Template) GetAllAWSServiceCatalogTagOptionResources() map[string]*resources.AWSServiceCatalogTagOption { results := map[string]*resources.AWSServiceCatalogTagOption{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOption: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogTagOptionResources() map[string]*resources.AWSServiceCatalogTagOption { results := map[string]*resources.AWSServiceCatalogTagOption{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOption: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogTagOptionResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogTagOption", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogTagOption", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogTagOption", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogTagOptionResources retrieves all AWSServiceCatalogTagOption items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogTagOptionResources", "retrieves", "all", "AWSServiceCatalogTagOption", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9091-L9100
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogTagOptionWithName
func (t *Template) GetAWSServiceCatalogTagOptionWithName(name string) (*resources.AWSServiceCatalogTagOption, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOption: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogTagOption not found", name) }
go
func (t *Template) GetAWSServiceCatalogTagOptionWithName(name string) (*resources.AWSServiceCatalogTagOption, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOption: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogTagOption not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogTagOptionWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogTagOption", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogTagOption", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogTagOptionWithName retrieves all AWSServiceCatalogTagOption items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogTagOptionWithName", "retrieves", "all", "AWSServiceCatalogTagOption", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9104-L9112
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceCatalogTagOptionAssociationResources
func (t *Template) GetAllAWSServiceCatalogTagOptionAssociationResources() map[string]*resources.AWSServiceCatalogTagOptionAssociation { results := map[string]*resources.AWSServiceCatalogTagOptionAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOptionAssociation: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceCatalogTagOptionAssociationResources() map[string]*resources.AWSServiceCatalogTagOptionAssociation { results := map[string]*resources.AWSServiceCatalogTagOptionAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOptionAssociation: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceCatalogTagOptionAssociationResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogTagOptionAssociation", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceCatalogTagOptionAssociation", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogTagOptionAssociation", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceCatalogTagOptionAssociationResources retrieves all AWSServiceCatalogTagOptionAssociation items from an AWS CloudFormation template
[ "GetAllAWSServiceCatalogTagOptionAssociationResources", "retrieves", "all", "AWSServiceCatalogTagOptionAssociation", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9115-L9124
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceCatalogTagOptionAssociationWithName
func (t *Template) GetAWSServiceCatalogTagOptionAssociationWithName(name string) (*resources.AWSServiceCatalogTagOptionAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOptionAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogTagOptionAssociation not found", name) }
go
func (t *Template) GetAWSServiceCatalogTagOptionAssociationWithName(name string) (*resources.AWSServiceCatalogTagOptionAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceCatalogTagOptionAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceCatalogTagOptionAssociation not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceCatalogTagOptionAssociationWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceCatalogTagOptionAssociation", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceCatalogTagOptionAssociation", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceCatalogTagOptionAssociationWithName retrieves all AWSServiceCatalogTagOptionAssociation items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceCatalogTagOptionAssociationWithName", "retrieves", "all", "AWSServiceCatalogTagOptionAssociation", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9128-L9136
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceDiscoveryHttpNamespaceResources
func (t *Template) GetAllAWSServiceDiscoveryHttpNamespaceResources() map[string]*resources.AWSServiceDiscoveryHttpNamespace { results := map[string]*resources.AWSServiceDiscoveryHttpNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryHttpNamespace: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceDiscoveryHttpNamespaceResources() map[string]*resources.AWSServiceDiscoveryHttpNamespace { results := map[string]*resources.AWSServiceDiscoveryHttpNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryHttpNamespace: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceDiscoveryHttpNamespaceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryHttpNamespace", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryHttpNamespace", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryHttpNamespace", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceDiscoveryHttpNamespaceResources retrieves all AWSServiceDiscoveryHttpNamespace items from an AWS CloudFormation template
[ "GetAllAWSServiceDiscoveryHttpNamespaceResources", "retrieves", "all", "AWSServiceDiscoveryHttpNamespace", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9139-L9148
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceDiscoveryHttpNamespaceWithName
func (t *Template) GetAWSServiceDiscoveryHttpNamespaceWithName(name string) (*resources.AWSServiceDiscoveryHttpNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryHttpNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryHttpNamespace not found", name) }
go
func (t *Template) GetAWSServiceDiscoveryHttpNamespaceWithName(name string) (*resources.AWSServiceDiscoveryHttpNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryHttpNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryHttpNamespace not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceDiscoveryHttpNamespaceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceDiscoveryHttpNamespace", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryHttpNamespace", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceDiscoveryHttpNamespaceWithName retrieves all AWSServiceDiscoveryHttpNamespace items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceDiscoveryHttpNamespaceWithName", "retrieves", "all", "AWSServiceDiscoveryHttpNamespace", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9152-L9160
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceDiscoveryInstanceResources
func (t *Template) GetAllAWSServiceDiscoveryInstanceResources() map[string]*resources.AWSServiceDiscoveryInstance { results := map[string]*resources.AWSServiceDiscoveryInstance{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryInstance: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceDiscoveryInstanceResources() map[string]*resources.AWSServiceDiscoveryInstance { results := map[string]*resources.AWSServiceDiscoveryInstance{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryInstance: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceDiscoveryInstanceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryInstance", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryInstance", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryInstance", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceDiscoveryInstanceResources retrieves all AWSServiceDiscoveryInstance items from an AWS CloudFormation template
[ "GetAllAWSServiceDiscoveryInstanceResources", "retrieves", "all", "AWSServiceDiscoveryInstance", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9163-L9172
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceDiscoveryInstanceWithName
func (t *Template) GetAWSServiceDiscoveryInstanceWithName(name string) (*resources.AWSServiceDiscoveryInstance, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryInstance: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryInstance not found", name) }
go
func (t *Template) GetAWSServiceDiscoveryInstanceWithName(name string) (*resources.AWSServiceDiscoveryInstance, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryInstance: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryInstance not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceDiscoveryInstanceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceDiscoveryInstance", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryInstance", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceDiscoveryInstanceWithName retrieves all AWSServiceDiscoveryInstance items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceDiscoveryInstanceWithName", "retrieves", "all", "AWSServiceDiscoveryInstance", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9176-L9184
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources
func (t *Template) GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources() map[string]*resources.AWSServiceDiscoveryPrivateDnsNamespace { results := map[string]*resources.AWSServiceDiscoveryPrivateDnsNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPrivateDnsNamespace: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources() map[string]*resources.AWSServiceDiscoveryPrivateDnsNamespace { results := map[string]*resources.AWSServiceDiscoveryPrivateDnsNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPrivateDnsNamespace: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryPrivateDnsNamespace", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryPrivateDnsNamespace", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryPrivateDnsNamespace", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources retrieves all AWSServiceDiscoveryPrivateDnsNamespace items from an AWS CloudFormation template
[ "GetAllAWSServiceDiscoveryPrivateDnsNamespaceResources", "retrieves", "all", "AWSServiceDiscoveryPrivateDnsNamespace", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9187-L9196
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceDiscoveryPrivateDnsNamespaceWithName
func (t *Template) GetAWSServiceDiscoveryPrivateDnsNamespaceWithName(name string) (*resources.AWSServiceDiscoveryPrivateDnsNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPrivateDnsNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryPrivateDnsNamespace not found", name) }
go
func (t *Template) GetAWSServiceDiscoveryPrivateDnsNamespaceWithName(name string) (*resources.AWSServiceDiscoveryPrivateDnsNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPrivateDnsNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryPrivateDnsNamespace not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceDiscoveryPrivateDnsNamespaceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceDiscoveryPrivateDnsNamespace", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryPrivateDnsNamespace", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceDiscoveryPrivateDnsNamespaceWithName retrieves all AWSServiceDiscoveryPrivateDnsNamespace items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceDiscoveryPrivateDnsNamespaceWithName", "retrieves", "all", "AWSServiceDiscoveryPrivateDnsNamespace", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9200-L9208
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceDiscoveryPublicDnsNamespaceResources
func (t *Template) GetAllAWSServiceDiscoveryPublicDnsNamespaceResources() map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace { results := map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPublicDnsNamespace: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceDiscoveryPublicDnsNamespaceResources() map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace { results := map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPublicDnsNamespace: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceDiscoveryPublicDnsNamespaceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryPublicDnsNamespace", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryPublicDnsNamespace", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryPublicDnsNamespace", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceDiscoveryPublicDnsNamespaceResources retrieves all AWSServiceDiscoveryPublicDnsNamespace items from an AWS CloudFormation template
[ "GetAllAWSServiceDiscoveryPublicDnsNamespaceResources", "retrieves", "all", "AWSServiceDiscoveryPublicDnsNamespace", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9211-L9220
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceDiscoveryPublicDnsNamespaceWithName
func (t *Template) GetAWSServiceDiscoveryPublicDnsNamespaceWithName(name string) (*resources.AWSServiceDiscoveryPublicDnsNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPublicDnsNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryPublicDnsNamespace not found", name) }
go
func (t *Template) GetAWSServiceDiscoveryPublicDnsNamespaceWithName(name string) (*resources.AWSServiceDiscoveryPublicDnsNamespace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryPublicDnsNamespace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryPublicDnsNamespace not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceDiscoveryPublicDnsNamespaceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceDiscoveryPublicDnsNamespace", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryPublicDnsNamespace", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceDiscoveryPublicDnsNamespaceWithName retrieves all AWSServiceDiscoveryPublicDnsNamespace items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceDiscoveryPublicDnsNamespaceWithName", "retrieves", "all", "AWSServiceDiscoveryPublicDnsNamespace", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9224-L9232
train
awslabs/goformation
cloudformation/all.go
GetAllAWSServiceDiscoveryServiceResources
func (t *Template) GetAllAWSServiceDiscoveryServiceResources() map[string]*resources.AWSServiceDiscoveryService { results := map[string]*resources.AWSServiceDiscoveryService{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryService: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSServiceDiscoveryServiceResources() map[string]*resources.AWSServiceDiscoveryService { results := map[string]*resources.AWSServiceDiscoveryService{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryService: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSServiceDiscoveryServiceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryService", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSServiceDiscoveryService", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryService", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSServiceDiscoveryServiceResources retrieves all AWSServiceDiscoveryService items from an AWS CloudFormation template
[ "GetAllAWSServiceDiscoveryServiceResources", "retrieves", "all", "AWSServiceDiscoveryService", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9235-L9244
train
awslabs/goformation
cloudformation/all.go
GetAWSServiceDiscoveryServiceWithName
func (t *Template) GetAWSServiceDiscoveryServiceWithName(name string) (*resources.AWSServiceDiscoveryService, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryService: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryService not found", name) }
go
func (t *Template) GetAWSServiceDiscoveryServiceWithName(name string) (*resources.AWSServiceDiscoveryService, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSServiceDiscoveryService: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSServiceDiscoveryService not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSServiceDiscoveryServiceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSServiceDiscoveryService", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSServiceDiscoveryService", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSServiceDiscoveryServiceWithName retrieves all AWSServiceDiscoveryService items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSServiceDiscoveryServiceWithName", "retrieves", "all", "AWSServiceDiscoveryService", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9248-L9256
train
awslabs/goformation
cloudformation/all.go
GetAllAWSStepFunctionsActivityResources
func (t *Template) GetAllAWSStepFunctionsActivityResources() map[string]*resources.AWSStepFunctionsActivity { results := map[string]*resources.AWSStepFunctionsActivity{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSStepFunctionsActivity: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSStepFunctionsActivityResources() map[string]*resources.AWSStepFunctionsActivity { results := map[string]*resources.AWSStepFunctionsActivity{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSStepFunctionsActivity: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSStepFunctionsActivityResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSStepFunctionsActivity", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSStepFunctionsActivity", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSStepFunctionsActivity", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSStepFunctionsActivityResources retrieves all AWSStepFunctionsActivity items from an AWS CloudFormation template
[ "GetAllAWSStepFunctionsActivityResources", "retrieves", "all", "AWSStepFunctionsActivity", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9259-L9268
train
awslabs/goformation
cloudformation/all.go
GetAWSStepFunctionsActivityWithName
func (t *Template) GetAWSStepFunctionsActivityWithName(name string) (*resources.AWSStepFunctionsActivity, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSStepFunctionsActivity: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSStepFunctionsActivity not found", name) }
go
func (t *Template) GetAWSStepFunctionsActivityWithName(name string) (*resources.AWSStepFunctionsActivity, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSStepFunctionsActivity: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSStepFunctionsActivity not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSStepFunctionsActivityWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSStepFunctionsActivity", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSStepFunctionsActivity", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSStepFunctionsActivityWithName retrieves all AWSStepFunctionsActivity items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSStepFunctionsActivityWithName", "retrieves", "all", "AWSStepFunctionsActivity", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9272-L9280
train
awslabs/goformation
cloudformation/all.go
GetAllAWSStepFunctionsStateMachineResources
func (t *Template) GetAllAWSStepFunctionsStateMachineResources() map[string]*resources.AWSStepFunctionsStateMachine { results := map[string]*resources.AWSStepFunctionsStateMachine{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSStepFunctionsStateMachine: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSStepFunctionsStateMachineResources() map[string]*resources.AWSStepFunctionsStateMachine { results := map[string]*resources.AWSStepFunctionsStateMachine{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSStepFunctionsStateMachine: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSStepFunctionsStateMachineResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSStepFunctionsStateMachine", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSStepFunctionsStateMachine", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSStepFunctionsStateMachine", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSStepFunctionsStateMachineResources retrieves all AWSStepFunctionsStateMachine items from an AWS CloudFormation template
[ "GetAllAWSStepFunctionsStateMachineResources", "retrieves", "all", "AWSStepFunctionsStateMachine", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9283-L9292
train
awslabs/goformation
cloudformation/all.go
GetAWSStepFunctionsStateMachineWithName
func (t *Template) GetAWSStepFunctionsStateMachineWithName(name string) (*resources.AWSStepFunctionsStateMachine, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSStepFunctionsStateMachine: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSStepFunctionsStateMachine not found", name) }
go
func (t *Template) GetAWSStepFunctionsStateMachineWithName(name string) (*resources.AWSStepFunctionsStateMachine, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSStepFunctionsStateMachine: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSStepFunctionsStateMachine not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSStepFunctionsStateMachineWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSStepFunctionsStateMachine", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSStepFunctionsStateMachine", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSStepFunctionsStateMachineWithName retrieves all AWSStepFunctionsStateMachine items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSStepFunctionsStateMachineWithName", "retrieves", "all", "AWSStepFunctionsStateMachine", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9296-L9304
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFByteMatchSetResources
func (t *Template) GetAllAWSWAFByteMatchSetResources() map[string]*resources.AWSWAFByteMatchSet { results := map[string]*resources.AWSWAFByteMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFByteMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFByteMatchSetResources() map[string]*resources.AWSWAFByteMatchSet { results := map[string]*resources.AWSWAFByteMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFByteMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFByteMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFByteMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFByteMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFByteMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFByteMatchSetResources retrieves all AWSWAFByteMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFByteMatchSetResources", "retrieves", "all", "AWSWAFByteMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9307-L9316
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFByteMatchSetWithName
func (t *Template) GetAWSWAFByteMatchSetWithName(name string) (*resources.AWSWAFByteMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFByteMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFByteMatchSet not found", name) }
go
func (t *Template) GetAWSWAFByteMatchSetWithName(name string) (*resources.AWSWAFByteMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFByteMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFByteMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFByteMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFByteMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFByteMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFByteMatchSetWithName retrieves all AWSWAFByteMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFByteMatchSetWithName", "retrieves", "all", "AWSWAFByteMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9320-L9328
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFIPSetResources
func (t *Template) GetAllAWSWAFIPSetResources() map[string]*resources.AWSWAFIPSet { results := map[string]*resources.AWSWAFIPSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFIPSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFIPSetResources() map[string]*resources.AWSWAFIPSet { results := map[string]*resources.AWSWAFIPSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFIPSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFIPSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFIPSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFIPSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFIPSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFIPSetResources retrieves all AWSWAFIPSet items from an AWS CloudFormation template
[ "GetAllAWSWAFIPSetResources", "retrieves", "all", "AWSWAFIPSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9331-L9340
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFIPSetWithName
func (t *Template) GetAWSWAFIPSetWithName(name string) (*resources.AWSWAFIPSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFIPSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFIPSet not found", name) }
go
func (t *Template) GetAWSWAFIPSetWithName(name string) (*resources.AWSWAFIPSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFIPSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFIPSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFIPSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFIPSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFIPSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFIPSetWithName retrieves all AWSWAFIPSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFIPSetWithName", "retrieves", "all", "AWSWAFIPSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9344-L9352
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRuleResources
func (t *Template) GetAllAWSWAFRuleResources() map[string]*resources.AWSWAFRule { results := map[string]*resources.AWSWAFRule{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRule: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRuleResources() map[string]*resources.AWSWAFRule { results := map[string]*resources.AWSWAFRule{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRule: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRuleResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRule", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRule", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRule", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRuleResources retrieves all AWSWAFRule items from an AWS CloudFormation template
[ "GetAllAWSWAFRuleResources", "retrieves", "all", "AWSWAFRule", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9355-L9364
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRuleWithName
func (t *Template) GetAWSWAFRuleWithName(name string) (*resources.AWSWAFRule, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRule: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRule not found", name) }
go
func (t *Template) GetAWSWAFRuleWithName(name string) (*resources.AWSWAFRule, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRule: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRule not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRuleWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRule", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRule", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRuleWithName retrieves all AWSWAFRule items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRuleWithName", "retrieves", "all", "AWSWAFRule", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9368-L9376
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFSizeConstraintSetResources
func (t *Template) GetAllAWSWAFSizeConstraintSetResources() map[string]*resources.AWSWAFSizeConstraintSet { results := map[string]*resources.AWSWAFSizeConstraintSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFSizeConstraintSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFSizeConstraintSetResources() map[string]*resources.AWSWAFSizeConstraintSet { results := map[string]*resources.AWSWAFSizeConstraintSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFSizeConstraintSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFSizeConstraintSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFSizeConstraintSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFSizeConstraintSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFSizeConstraintSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFSizeConstraintSetResources retrieves all AWSWAFSizeConstraintSet items from an AWS CloudFormation template
[ "GetAllAWSWAFSizeConstraintSetResources", "retrieves", "all", "AWSWAFSizeConstraintSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9379-L9388
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFSizeConstraintSetWithName
func (t *Template) GetAWSWAFSizeConstraintSetWithName(name string) (*resources.AWSWAFSizeConstraintSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFSizeConstraintSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFSizeConstraintSet not found", name) }
go
func (t *Template) GetAWSWAFSizeConstraintSetWithName(name string) (*resources.AWSWAFSizeConstraintSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFSizeConstraintSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFSizeConstraintSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFSizeConstraintSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFSizeConstraintSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFSizeConstraintSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFSizeConstraintSetWithName retrieves all AWSWAFSizeConstraintSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFSizeConstraintSetWithName", "retrieves", "all", "AWSWAFSizeConstraintSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9392-L9400
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFSqlInjectionMatchSetResources
func (t *Template) GetAllAWSWAFSqlInjectionMatchSetResources() map[string]*resources.AWSWAFSqlInjectionMatchSet { results := map[string]*resources.AWSWAFSqlInjectionMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFSqlInjectionMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFSqlInjectionMatchSetResources() map[string]*resources.AWSWAFSqlInjectionMatchSet { results := map[string]*resources.AWSWAFSqlInjectionMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFSqlInjectionMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFSqlInjectionMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFSqlInjectionMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFSqlInjectionMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFSqlInjectionMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFSqlInjectionMatchSetResources retrieves all AWSWAFSqlInjectionMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFSqlInjectionMatchSetResources", "retrieves", "all", "AWSWAFSqlInjectionMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9403-L9412
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFSqlInjectionMatchSetWithName
func (t *Template) GetAWSWAFSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFSqlInjectionMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFSqlInjectionMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFSqlInjectionMatchSet not found", name) }
go
func (t *Template) GetAWSWAFSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFSqlInjectionMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFSqlInjectionMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFSqlInjectionMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFSqlInjectionMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFSqlInjectionMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFSqlInjectionMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFSqlInjectionMatchSetWithName retrieves all AWSWAFSqlInjectionMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFSqlInjectionMatchSetWithName", "retrieves", "all", "AWSWAFSqlInjectionMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9416-L9424
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFWebACLResources
func (t *Template) GetAllAWSWAFWebACLResources() map[string]*resources.AWSWAFWebACL { results := map[string]*resources.AWSWAFWebACL{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFWebACL: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFWebACLResources() map[string]*resources.AWSWAFWebACL { results := map[string]*resources.AWSWAFWebACL{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFWebACL: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFWebACLResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFWebACL", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFWebACL", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFWebACL", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFWebACLResources retrieves all AWSWAFWebACL items from an AWS CloudFormation template
[ "GetAllAWSWAFWebACLResources", "retrieves", "all", "AWSWAFWebACL", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9427-L9436
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFWebACLWithName
func (t *Template) GetAWSWAFWebACLWithName(name string) (*resources.AWSWAFWebACL, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFWebACL: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFWebACL not found", name) }
go
func (t *Template) GetAWSWAFWebACLWithName(name string) (*resources.AWSWAFWebACL, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFWebACL: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFWebACL not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFWebACLWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFWebACL", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFWebACL", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFWebACLWithName retrieves all AWSWAFWebACL items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFWebACLWithName", "retrieves", "all", "AWSWAFWebACL", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9440-L9448
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFXssMatchSetResources
func (t *Template) GetAllAWSWAFXssMatchSetResources() map[string]*resources.AWSWAFXssMatchSet { results := map[string]*resources.AWSWAFXssMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFXssMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFXssMatchSetResources() map[string]*resources.AWSWAFXssMatchSet { results := map[string]*resources.AWSWAFXssMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFXssMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFXssMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFXssMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFXssMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFXssMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFXssMatchSetResources retrieves all AWSWAFXssMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFXssMatchSetResources", "retrieves", "all", "AWSWAFXssMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9451-L9460
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFXssMatchSetWithName
func (t *Template) GetAWSWAFXssMatchSetWithName(name string) (*resources.AWSWAFXssMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFXssMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFXssMatchSet not found", name) }
go
func (t *Template) GetAWSWAFXssMatchSetWithName(name string) (*resources.AWSWAFXssMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFXssMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFXssMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFXssMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFXssMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFXssMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFXssMatchSetWithName retrieves all AWSWAFXssMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFXssMatchSetWithName", "retrieves", "all", "AWSWAFXssMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9464-L9472
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalByteMatchSetResources
func (t *Template) GetAllAWSWAFRegionalByteMatchSetResources() map[string]*resources.AWSWAFRegionalByteMatchSet { results := map[string]*resources.AWSWAFRegionalByteMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalByteMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalByteMatchSetResources() map[string]*resources.AWSWAFRegionalByteMatchSet { results := map[string]*resources.AWSWAFRegionalByteMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalByteMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalByteMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalByteMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalByteMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalByteMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalByteMatchSetResources retrieves all AWSWAFRegionalByteMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalByteMatchSetResources", "retrieves", "all", "AWSWAFRegionalByteMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9475-L9484
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalByteMatchSetWithName
func (t *Template) GetAWSWAFRegionalByteMatchSetWithName(name string) (*resources.AWSWAFRegionalByteMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalByteMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalByteMatchSet not found", name) }
go
func (t *Template) GetAWSWAFRegionalByteMatchSetWithName(name string) (*resources.AWSWAFRegionalByteMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalByteMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalByteMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalByteMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalByteMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalByteMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalByteMatchSetWithName retrieves all AWSWAFRegionalByteMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalByteMatchSetWithName", "retrieves", "all", "AWSWAFRegionalByteMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9488-L9496
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalIPSetResources
func (t *Template) GetAllAWSWAFRegionalIPSetResources() map[string]*resources.AWSWAFRegionalIPSet { results := map[string]*resources.AWSWAFRegionalIPSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalIPSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalIPSetResources() map[string]*resources.AWSWAFRegionalIPSet { results := map[string]*resources.AWSWAFRegionalIPSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalIPSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalIPSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalIPSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalIPSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalIPSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalIPSetResources retrieves all AWSWAFRegionalIPSet items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalIPSetResources", "retrieves", "all", "AWSWAFRegionalIPSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9499-L9508
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalIPSetWithName
func (t *Template) GetAWSWAFRegionalIPSetWithName(name string) (*resources.AWSWAFRegionalIPSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalIPSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalIPSet not found", name) }
go
func (t *Template) GetAWSWAFRegionalIPSetWithName(name string) (*resources.AWSWAFRegionalIPSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalIPSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalIPSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalIPSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalIPSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalIPSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalIPSetWithName retrieves all AWSWAFRegionalIPSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalIPSetWithName", "retrieves", "all", "AWSWAFRegionalIPSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9512-L9520
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalRuleResources
func (t *Template) GetAllAWSWAFRegionalRuleResources() map[string]*resources.AWSWAFRegionalRule { results := map[string]*resources.AWSWAFRegionalRule{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalRule: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalRuleResources() map[string]*resources.AWSWAFRegionalRule { results := map[string]*resources.AWSWAFRegionalRule{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalRule: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalRuleResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalRule", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalRule", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalRule", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalRuleResources retrieves all AWSWAFRegionalRule items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalRuleResources", "retrieves", "all", "AWSWAFRegionalRule", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9523-L9532
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalRuleWithName
func (t *Template) GetAWSWAFRegionalRuleWithName(name string) (*resources.AWSWAFRegionalRule, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalRule: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalRule not found", name) }
go
func (t *Template) GetAWSWAFRegionalRuleWithName(name string) (*resources.AWSWAFRegionalRule, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalRule: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalRule not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalRuleWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalRule", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalRule", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalRuleWithName retrieves all AWSWAFRegionalRule items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalRuleWithName", "retrieves", "all", "AWSWAFRegionalRule", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9536-L9544
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalSizeConstraintSetResources
func (t *Template) GetAllAWSWAFRegionalSizeConstraintSetResources() map[string]*resources.AWSWAFRegionalSizeConstraintSet { results := map[string]*resources.AWSWAFRegionalSizeConstraintSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSizeConstraintSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalSizeConstraintSetResources() map[string]*resources.AWSWAFRegionalSizeConstraintSet { results := map[string]*resources.AWSWAFRegionalSizeConstraintSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSizeConstraintSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalSizeConstraintSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalSizeConstraintSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalSizeConstraintSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalSizeConstraintSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalSizeConstraintSetResources retrieves all AWSWAFRegionalSizeConstraintSet items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalSizeConstraintSetResources", "retrieves", "all", "AWSWAFRegionalSizeConstraintSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9547-L9556
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalSizeConstraintSetWithName
func (t *Template) GetAWSWAFRegionalSizeConstraintSetWithName(name string) (*resources.AWSWAFRegionalSizeConstraintSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSizeConstraintSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalSizeConstraintSet not found", name) }
go
func (t *Template) GetAWSWAFRegionalSizeConstraintSetWithName(name string) (*resources.AWSWAFRegionalSizeConstraintSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSizeConstraintSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalSizeConstraintSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalSizeConstraintSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalSizeConstraintSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalSizeConstraintSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalSizeConstraintSetWithName retrieves all AWSWAFRegionalSizeConstraintSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalSizeConstraintSetWithName", "retrieves", "all", "AWSWAFRegionalSizeConstraintSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9560-L9568
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalSqlInjectionMatchSetResources
func (t *Template) GetAllAWSWAFRegionalSqlInjectionMatchSetResources() map[string]*resources.AWSWAFRegionalSqlInjectionMatchSet { results := map[string]*resources.AWSWAFRegionalSqlInjectionMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSqlInjectionMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalSqlInjectionMatchSetResources() map[string]*resources.AWSWAFRegionalSqlInjectionMatchSet { results := map[string]*resources.AWSWAFRegionalSqlInjectionMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSqlInjectionMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalSqlInjectionMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalSqlInjectionMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalSqlInjectionMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalSqlInjectionMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalSqlInjectionMatchSetResources retrieves all AWSWAFRegionalSqlInjectionMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalSqlInjectionMatchSetResources", "retrieves", "all", "AWSWAFRegionalSqlInjectionMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9571-L9580
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalSqlInjectionMatchSetWithName
func (t *Template) GetAWSWAFRegionalSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFRegionalSqlInjectionMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSqlInjectionMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalSqlInjectionMatchSet not found", name) }
go
func (t *Template) GetAWSWAFRegionalSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFRegionalSqlInjectionMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalSqlInjectionMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalSqlInjectionMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalSqlInjectionMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalSqlInjectionMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalSqlInjectionMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalSqlInjectionMatchSetWithName retrieves all AWSWAFRegionalSqlInjectionMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalSqlInjectionMatchSetWithName", "retrieves", "all", "AWSWAFRegionalSqlInjectionMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9584-L9592
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalWebACLResources
func (t *Template) GetAllAWSWAFRegionalWebACLResources() map[string]*resources.AWSWAFRegionalWebACL { results := map[string]*resources.AWSWAFRegionalWebACL{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACL: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalWebACLResources() map[string]*resources.AWSWAFRegionalWebACL { results := map[string]*resources.AWSWAFRegionalWebACL{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACL: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalWebACLResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalWebACL", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalWebACL", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalWebACL", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalWebACLResources retrieves all AWSWAFRegionalWebACL items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalWebACLResources", "retrieves", "all", "AWSWAFRegionalWebACL", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9595-L9604
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalWebACLWithName
func (t *Template) GetAWSWAFRegionalWebACLWithName(name string) (*resources.AWSWAFRegionalWebACL, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACL: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalWebACL not found", name) }
go
func (t *Template) GetAWSWAFRegionalWebACLWithName(name string) (*resources.AWSWAFRegionalWebACL, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACL: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalWebACL not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalWebACLWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalWebACL", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalWebACL", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalWebACLWithName retrieves all AWSWAFRegionalWebACL items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalWebACLWithName", "retrieves", "all", "AWSWAFRegionalWebACL", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9608-L9616
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalWebACLAssociationResources
func (t *Template) GetAllAWSWAFRegionalWebACLAssociationResources() map[string]*resources.AWSWAFRegionalWebACLAssociation { results := map[string]*resources.AWSWAFRegionalWebACLAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACLAssociation: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalWebACLAssociationResources() map[string]*resources.AWSWAFRegionalWebACLAssociation { results := map[string]*resources.AWSWAFRegionalWebACLAssociation{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACLAssociation: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalWebACLAssociationResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalWebACLAssociation", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalWebACLAssociation", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalWebACLAssociation", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalWebACLAssociationResources retrieves all AWSWAFRegionalWebACLAssociation items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalWebACLAssociationResources", "retrieves", "all", "AWSWAFRegionalWebACLAssociation", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9619-L9628
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalWebACLAssociationWithName
func (t *Template) GetAWSWAFRegionalWebACLAssociationWithName(name string) (*resources.AWSWAFRegionalWebACLAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACLAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalWebACLAssociation not found", name) }
go
func (t *Template) GetAWSWAFRegionalWebACLAssociationWithName(name string) (*resources.AWSWAFRegionalWebACLAssociation, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalWebACLAssociation: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalWebACLAssociation not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalWebACLAssociationWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalWebACLAssociation", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalWebACLAssociation", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalWebACLAssociationWithName retrieves all AWSWAFRegionalWebACLAssociation items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalWebACLAssociationWithName", "retrieves", "all", "AWSWAFRegionalWebACLAssociation", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9632-L9640
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWAFRegionalXssMatchSetResources
func (t *Template) GetAllAWSWAFRegionalXssMatchSetResources() map[string]*resources.AWSWAFRegionalXssMatchSet { results := map[string]*resources.AWSWAFRegionalXssMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalXssMatchSet: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWAFRegionalXssMatchSetResources() map[string]*resources.AWSWAFRegionalXssMatchSet { results := map[string]*resources.AWSWAFRegionalXssMatchSet{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWAFRegionalXssMatchSet: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWAFRegionalXssMatchSetResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalXssMatchSet", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWAFRegionalXssMatchSet", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalXssMatchSet", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWAFRegionalXssMatchSetResources retrieves all AWSWAFRegionalXssMatchSet items from an AWS CloudFormation template
[ "GetAllAWSWAFRegionalXssMatchSetResources", "retrieves", "all", "AWSWAFRegionalXssMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9643-L9652
train
awslabs/goformation
cloudformation/all.go
GetAWSWAFRegionalXssMatchSetWithName
func (t *Template) GetAWSWAFRegionalXssMatchSetWithName(name string) (*resources.AWSWAFRegionalXssMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalXssMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalXssMatchSet not found", name) }
go
func (t *Template) GetAWSWAFRegionalXssMatchSetWithName(name string) (*resources.AWSWAFRegionalXssMatchSet, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWAFRegionalXssMatchSet: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWAFRegionalXssMatchSet not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWAFRegionalXssMatchSetWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWAFRegionalXssMatchSet", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWAFRegionalXssMatchSet", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWAFRegionalXssMatchSetWithName retrieves all AWSWAFRegionalXssMatchSet items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWAFRegionalXssMatchSetWithName", "retrieves", "all", "AWSWAFRegionalXssMatchSet", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9656-L9664
train
awslabs/goformation
cloudformation/all.go
GetAllAWSWorkSpacesWorkspaceResources
func (t *Template) GetAllAWSWorkSpacesWorkspaceResources() map[string]*resources.AWSWorkSpacesWorkspace { results := map[string]*resources.AWSWorkSpacesWorkspace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWorkSpacesWorkspace: results[name] = resource } } return results }
go
func (t *Template) GetAllAWSWorkSpacesWorkspaceResources() map[string]*resources.AWSWorkSpacesWorkspace { results := map[string]*resources.AWSWorkSpacesWorkspace{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AWSWorkSpacesWorkspace: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAWSWorkSpacesWorkspaceResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AWSWorkSpacesWorkspace", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AWSWorkSpacesWorkspace", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWorkSpacesWorkspace", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAWSWorkSpacesWorkspaceResources retrieves all AWSWorkSpacesWorkspace items from an AWS CloudFormation template
[ "GetAllAWSWorkSpacesWorkspaceResources", "retrieves", "all", "AWSWorkSpacesWorkspace", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9667-L9676
train
awslabs/goformation
cloudformation/all.go
GetAWSWorkSpacesWorkspaceWithName
func (t *Template) GetAWSWorkSpacesWorkspaceWithName(name string) (*resources.AWSWorkSpacesWorkspace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWorkSpacesWorkspace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWorkSpacesWorkspace not found", name) }
go
func (t *Template) GetAWSWorkSpacesWorkspaceWithName(name string) (*resources.AWSWorkSpacesWorkspace, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AWSWorkSpacesWorkspace: return resource, nil } } return nil, fmt.Errorf("resource %q of type AWSWorkSpacesWorkspace not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAWSWorkSpacesWorkspaceWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AWSWorkSpacesWorkspace", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AWSWorkSpacesWorkspace", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAWSWorkSpacesWorkspaceWithName retrieves all AWSWorkSpacesWorkspace items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAWSWorkSpacesWorkspaceWithName", "retrieves", "all", "AWSWorkSpacesWorkspace", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9680-L9688
train
awslabs/goformation
cloudformation/all.go
GetAllAlexaASKSkillResources
func (t *Template) GetAllAlexaASKSkillResources() map[string]*resources.AlexaASKSkill { results := map[string]*resources.AlexaASKSkill{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AlexaASKSkill: results[name] = resource } } return results }
go
func (t *Template) GetAllAlexaASKSkillResources() map[string]*resources.AlexaASKSkill { results := map[string]*resources.AlexaASKSkill{} for name, untyped := range t.Resources { switch resource := untyped.(type) { case *resources.AlexaASKSkill: results[name] = resource } } return results }
[ "func", "(", "t", "*", "Template", ")", "GetAllAlexaASKSkillResources", "(", ")", "map", "[", "string", "]", "*", "resources", ".", "AlexaASKSkill", "{", "results", ":=", "map", "[", "string", "]", "*", "resources", ".", "AlexaASKSkill", "{", "}", "\n", "for", "name", ",", "untyped", ":=", "range", "t", ".", "Resources", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AlexaASKSkill", ":", "results", "[", "name", "]", "=", "resource", "\n", "}", "\n", "}", "\n", "return", "results", "\n", "}" ]
// GetAllAlexaASKSkillResources retrieves all AlexaASKSkill items from an AWS CloudFormation template
[ "GetAllAlexaASKSkillResources", "retrieves", "all", "AlexaASKSkill", "items", "from", "an", "AWS", "CloudFormation", "template" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9691-L9700
train
awslabs/goformation
cloudformation/all.go
GetAlexaASKSkillWithName
func (t *Template) GetAlexaASKSkillWithName(name string) (*resources.AlexaASKSkill, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AlexaASKSkill: return resource, nil } } return nil, fmt.Errorf("resource %q of type AlexaASKSkill not found", name) }
go
func (t *Template) GetAlexaASKSkillWithName(name string) (*resources.AlexaASKSkill, error) { if untyped, ok := t.Resources[name]; ok { switch resource := untyped.(type) { case *resources.AlexaASKSkill: return resource, nil } } return nil, fmt.Errorf("resource %q of type AlexaASKSkill not found", name) }
[ "func", "(", "t", "*", "Template", ")", "GetAlexaASKSkillWithName", "(", "name", "string", ")", "(", "*", "resources", ".", "AlexaASKSkill", ",", "error", ")", "{", "if", "untyped", ",", "ok", ":=", "t", ".", "Resources", "[", "name", "]", ";", "ok", "{", "switch", "resource", ":=", "untyped", ".", "(", "type", ")", "{", "case", "*", "resources", ".", "AlexaASKSkill", ":", "return", "resource", ",", "nil", "\n", "}", "\n", "}", "\n", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ")", "\n", "}" ]
// GetAlexaASKSkillWithName retrieves all AlexaASKSkill items from an AWS CloudFormation template // whose logical ID matches the provided name. Returns an error if not found.
[ "GetAlexaASKSkillWithName", "retrieves", "all", "AlexaASKSkill", "items", "from", "an", "AWS", "CloudFormation", "template", "whose", "logical", "ID", "matches", "the", "provided", "name", ".", "Returns", "an", "error", "if", "not", "found", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/all.go#L9704-L9712
train
awslabs/goformation
goformation.go
OpenWithOptions
func OpenWithOptions(filename string, options *intrinsics.ProcessorOptions) (*cloudformation.Template, error) { data, err := ioutil.ReadFile(filename) if err != nil { return nil, err } if strings.HasSuffix(filename, ".json") { // This is definitely JSON return ParseJSONWithOptions(data, options) } return ParseYAMLWithOptions(data, options) }
go
func OpenWithOptions(filename string, options *intrinsics.ProcessorOptions) (*cloudformation.Template, error) { data, err := ioutil.ReadFile(filename) if err != nil { return nil, err } if strings.HasSuffix(filename, ".json") { // This is definitely JSON return ParseJSONWithOptions(data, options) } return ParseYAMLWithOptions(data, options) }
[ "func", "OpenWithOptions", "(", "filename", "string", ",", "options", "*", "intrinsics", ".", "ProcessorOptions", ")", "(", "*", "cloudformation", ".", "Template", ",", "error", ")", "{", "data", ",", "err", ":=", "ioutil", ".", "ReadFile", "(", "filename", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "strings", ".", "HasSuffix", "(", "filename", ",", "\"", "\"", ")", "{", "// This is definitely JSON", "return", "ParseJSONWithOptions", "(", "data", ",", "options", ")", "\n", "}", "\n\n", "return", "ParseYAMLWithOptions", "(", "data", ",", "options", ")", "\n", "}" ]
// OpenWithOptions opens and parse a AWS CloudFormation template from file. // Works with either JSON or YAML formatted templates. // Parsing can be tweaked via the specified options.
[ "OpenWithOptions", "opens", "and", "parse", "a", "AWS", "CloudFormation", "template", "from", "file", ".", "Works", "with", "either", "JSON", "or", "YAML", "formatted", "templates", ".", "Parsing", "can", "be", "tweaked", "via", "the", "specified", "options", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/goformation.go#L23-L36
train
awslabs/goformation
cloudformation/resources/aws-efs-filesystem.go
MarshalJSON
func (r AWSEFSFileSystem) MarshalJSON() ([]byte, error) { type Properties AWSEFSFileSystem return json.Marshal(&struct { Type string Properties Properties DependsOn []string `json:"DependsOn,omitempty"` Metadata map[string]interface{} `json:"Metadata,omitempty"` DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` }{ Type: r.AWSCloudFormationType(), Properties: (Properties)(r), DependsOn: r._dependsOn, Metadata: r._metadata, DeletionPolicy: r._deletionPolicy, }) }
go
func (r AWSEFSFileSystem) MarshalJSON() ([]byte, error) { type Properties AWSEFSFileSystem return json.Marshal(&struct { Type string Properties Properties DependsOn []string `json:"DependsOn,omitempty"` Metadata map[string]interface{} `json:"Metadata,omitempty"` DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"` }{ Type: r.AWSCloudFormationType(), Properties: (Properties)(r), DependsOn: r._dependsOn, Metadata: r._metadata, DeletionPolicy: r._deletionPolicy, }) }
[ "func", "(", "r", "AWSEFSFileSystem", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "type", "Properties", "AWSEFSFileSystem", "\n", "return", "json", ".", "Marshal", "(", "&", "struct", "{", "Type", "string", "\n", "Properties", "Properties", "\n", "DependsOn", "[", "]", "string", "`json:\"DependsOn,omitempty\"`", "\n", "Metadata", "map", "[", "string", "]", "interface", "{", "}", "`json:\"Metadata,omitempty\"`", "\n", "DeletionPolicy", "policies", ".", "DeletionPolicy", "`json:\"DeletionPolicy,omitempty\"`", "\n", "}", "{", "Type", ":", "r", ".", "AWSCloudFormationType", "(", ")", ",", "Properties", ":", "(", "Properties", ")", "(", "r", ")", ",", "DependsOn", ":", "r", ".", "_dependsOn", ",", "Metadata", ":", "r", ".", "_metadata", ",", "DeletionPolicy", ":", "r", ".", "_deletionPolicy", ",", "}", ")", "\n", "}" ]
// MarshalJSON is a custom JSON marshalling hook that embeds this object into // an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'.
[ "MarshalJSON", "is", "a", "custom", "JSON", "marshalling", "hook", "that", "embeds", "this", "object", "into", "an", "AWS", "CloudFormation", "JSON", "resource", "s", "Properties", "field", "and", "adds", "a", "Type", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/resources/aws-efs-filesystem.go#L91-L106
train
awslabs/goformation
cloudformation/resources/aws-efs-filesystem.go
UnmarshalJSON
func (r *AWSEFSFileSystem) UnmarshalJSON(b []byte) error { type Properties AWSEFSFileSystem res := &struct { Type string Properties *Properties DependsOn []string Metadata map[string]interface{} }{} dec := json.NewDecoder(bytes.NewReader(b)) dec.DisallowUnknownFields() // Force error if unknown field is found if err := dec.Decode(&res); err != nil { fmt.Printf("ERROR: %s\n", err) return err } // If the resource has no Properties set, it could be nil if res.Properties != nil { *r = AWSEFSFileSystem(*res.Properties) } if res.DependsOn != nil { r._dependsOn = res.DependsOn } if res.Metadata != nil { r._metadata = res.Metadata } return nil }
go
func (r *AWSEFSFileSystem) UnmarshalJSON(b []byte) error { type Properties AWSEFSFileSystem res := &struct { Type string Properties *Properties DependsOn []string Metadata map[string]interface{} }{} dec := json.NewDecoder(bytes.NewReader(b)) dec.DisallowUnknownFields() // Force error if unknown field is found if err := dec.Decode(&res); err != nil { fmt.Printf("ERROR: %s\n", err) return err } // If the resource has no Properties set, it could be nil if res.Properties != nil { *r = AWSEFSFileSystem(*res.Properties) } if res.DependsOn != nil { r._dependsOn = res.DependsOn } if res.Metadata != nil { r._metadata = res.Metadata } return nil }
[ "func", "(", "r", "*", "AWSEFSFileSystem", ")", "UnmarshalJSON", "(", "b", "[", "]", "byte", ")", "error", "{", "type", "Properties", "AWSEFSFileSystem", "\n", "res", ":=", "&", "struct", "{", "Type", "string", "\n", "Properties", "*", "Properties", "\n", "DependsOn", "[", "]", "string", "\n", "Metadata", "map", "[", "string", "]", "interface", "{", "}", "\n", "}", "{", "}", "\n\n", "dec", ":=", "json", ".", "NewDecoder", "(", "bytes", ".", "NewReader", "(", "b", ")", ")", "\n", "dec", ".", "DisallowUnknownFields", "(", ")", "// Force error if unknown field is found", "\n\n", "if", "err", ":=", "dec", ".", "Decode", "(", "&", "res", ")", ";", "err", "!=", "nil", "{", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ",", "err", ")", "\n", "return", "err", "\n", "}", "\n\n", "// If the resource has no Properties set, it could be nil", "if", "res", ".", "Properties", "!=", "nil", "{", "*", "r", "=", "AWSEFSFileSystem", "(", "*", "res", ".", "Properties", ")", "\n", "}", "\n", "if", "res", ".", "DependsOn", "!=", "nil", "{", "r", ".", "_dependsOn", "=", "res", ".", "DependsOn", "\n", "}", "\n", "if", "res", ".", "Metadata", "!=", "nil", "{", "r", ".", "_metadata", "=", "res", ".", "Metadata", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer // AWS CloudFormation resource object, and just keeps the 'Properties' field.
[ "UnmarshalJSON", "is", "a", "custom", "JSON", "unmarshalling", "hook", "that", "strips", "the", "outer", "AWS", "CloudFormation", "resource", "object", "and", "just", "keeps", "the", "Properties", "field", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/resources/aws-efs-filesystem.go#L110-L139
train
awslabs/goformation
intrinsics/conditions.go
condition
func condition(name string, input interface{}, template interface{}, options *ProcessorOptions) interface{} { if v, ok := input.(string); ok { if v, ok := retrieveCondition(input, template); ok { return v } if c := getCondition(v, template); c != nil { res := search(c, template, options) // replace the value in the template so the value can be reused setCondition(v, res, template) return res } } return nil }
go
func condition(name string, input interface{}, template interface{}, options *ProcessorOptions) interface{} { if v, ok := input.(string); ok { if v, ok := retrieveCondition(input, template); ok { return v } if c := getCondition(v, template); c != nil { res := search(c, template, options) // replace the value in the template so the value can be reused setCondition(v, res, template) return res } } return nil }
[ "func", "condition", "(", "name", "string", ",", "input", "interface", "{", "}", ",", "template", "interface", "{", "}", ",", "options", "*", "ProcessorOptions", ")", "interface", "{", "}", "{", "if", "v", ",", "ok", ":=", "input", ".", "(", "string", ")", ";", "ok", "{", "if", "v", ",", "ok", ":=", "retrieveCondition", "(", "input", ",", "template", ")", ";", "ok", "{", "return", "v", "\n", "}", "\n\n", "if", "c", ":=", "getCondition", "(", "v", ",", "template", ")", ";", "c", "!=", "nil", "{", "res", ":=", "search", "(", "c", ",", "template", ",", "options", ")", "\n", "// replace the value in the template so the value can be reused", "setCondition", "(", "v", ",", "res", ",", "template", ")", "\n\n", "return", "res", "\n", "}", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// condition evaluates a condition
[ "condition", "evaluates", "a", "condition" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/intrinsics/conditions.go#L4-L21
train
awslabs/goformation
intrinsics/fnsub.go
Sub
func Sub(value string) string { i := `{ "Fn::Sub" : "` + value + `" }` return base64.StdEncoding.EncodeToString([]byte(i)) }
go
func Sub(value string) string { i := `{ "Fn::Sub" : "` + value + `" }` return base64.StdEncoding.EncodeToString([]byte(i)) }
[ "func", "Sub", "(", "value", "string", ")", "string", "{", "i", ":=", "`{ \"Fn::Sub\" : \"`", "+", "value", "+", "`\" }`", "\n", "return", "base64", ".", "StdEncoding", ".", "EncodeToString", "(", "[", "]", "byte", "(", "i", ")", ")", "\n", "}" ]
// NewSub substitutes variables in an input string with values that you specify. In your templates, you can use this function to construct commands or outputs that include values that aren't available until you create or update a stack.
[ "NewSub", "substitutes", "variables", "in", "an", "input", "string", "with", "values", "that", "you", "specify", ".", "In", "your", "templates", "you", "can", "use", "this", "function", "to", "construct", "commands", "or", "outputs", "that", "include", "values", "that", "aren", "t", "available", "until", "you", "create", "or", "update", "a", "stack", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/intrinsics/fnsub.go#L70-L73
train
awslabs/goformation
generate/generate.go
Generate
func (rg *ResourceGenerator) Generate() error { // Process the primary template first, since the primary template resources // are added to the JSON schema for fragment transform specs fmt.Printf("Downloading cloudformation specification from %s\n", rg.primaryUrl) primaryData, err := rg.downloadSpec(rg.primaryUrl) if err != nil { return err } primarySpec, err := rg.processSpec("cloudformation", primaryData) if err != nil { return err } if err := rg.generateJSONSchema("cloudformation", primarySpec); err != nil { return err } for name, url := range rg.fragmentUrls { fmt.Printf("Downloading %s specification from %s\n", name, url) data, err := rg.downloadSpec(url) if err != nil { return err } spec, err := rg.processSpec(name, data) if err != nil { return err } // Append main CloudFormation schema resource types and property types to this fragment for k, v := range primarySpec.Resources { spec.Resources[k] = v } for k, v := range primarySpec.Properties { spec.Properties[k] = v } if err := rg.generateJSONSchema(name, spec); err != nil { return err } } if err := rg.generateAllResourcesMap(rg.Results.AllResources); err != nil { return err } return nil }
go
func (rg *ResourceGenerator) Generate() error { // Process the primary template first, since the primary template resources // are added to the JSON schema for fragment transform specs fmt.Printf("Downloading cloudformation specification from %s\n", rg.primaryUrl) primaryData, err := rg.downloadSpec(rg.primaryUrl) if err != nil { return err } primarySpec, err := rg.processSpec("cloudformation", primaryData) if err != nil { return err } if err := rg.generateJSONSchema("cloudformation", primarySpec); err != nil { return err } for name, url := range rg.fragmentUrls { fmt.Printf("Downloading %s specification from %s\n", name, url) data, err := rg.downloadSpec(url) if err != nil { return err } spec, err := rg.processSpec(name, data) if err != nil { return err } // Append main CloudFormation schema resource types and property types to this fragment for k, v := range primarySpec.Resources { spec.Resources[k] = v } for k, v := range primarySpec.Properties { spec.Properties[k] = v } if err := rg.generateJSONSchema(name, spec); err != nil { return err } } if err := rg.generateAllResourcesMap(rg.Results.AllResources); err != nil { return err } return nil }
[ "func", "(", "rg", "*", "ResourceGenerator", ")", "Generate", "(", ")", "error", "{", "// Process the primary template first, since the primary template resources", "// are added to the JSON schema for fragment transform specs", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ",", "rg", ".", "primaryUrl", ")", "\n", "primaryData", ",", "err", ":=", "rg", ".", "downloadSpec", "(", "rg", ".", "primaryUrl", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "primarySpec", ",", "err", ":=", "rg", ".", "processSpec", "(", "\"", "\"", ",", "primaryData", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "if", "err", ":=", "rg", ".", "generateJSONSchema", "(", "\"", "\"", ",", "primarySpec", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "for", "name", ",", "url", ":=", "range", "rg", ".", "fragmentUrls", "{", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ",", "name", ",", "url", ")", "\n", "data", ",", "err", ":=", "rg", ".", "downloadSpec", "(", "url", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "spec", ",", "err", ":=", "rg", ".", "processSpec", "(", "name", ",", "data", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "// Append main CloudFormation schema resource types and property types to this fragment", "for", "k", ",", "v", ":=", "range", "primarySpec", ".", "Resources", "{", "spec", ".", "Resources", "[", "k", "]", "=", "v", "\n", "}", "\n", "for", "k", ",", "v", ":=", "range", "primarySpec", ".", "Properties", "{", "spec", ".", "Properties", "[", "k", "]", "=", "v", "\n", "}", "\n", "if", "err", ":=", "rg", ".", "generateJSONSchema", "(", "name", ",", "spec", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "}", "\n\n", "if", "err", ":=", "rg", ".", "generateAllResourcesMap", "(", "rg", ".", "Results", ".", "AllResources", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// Generate generates Go structs and a JSON Schema from the AWS CloudFormation // Resource Specifications provided to NewResourceGenerator
[ "Generate", "generates", "Go", "structs", "and", "a", "JSON", "Schema", "from", "the", "AWS", "CloudFormation", "Resource", "Specifications", "provided", "to", "NewResourceGenerator" ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/generate/generate.go#L71-L115
train
awslabs/goformation
cloudformation/intrinsics.go
FindInMap
func FindInMap(mapName, topLevelKey, secondLevelKey interface{}) string { return encode(fmt.Sprintf(`{ "Fn::FindInMap" : [ "%v", "%v", "%v" ] }`, mapName, topLevelKey, secondLevelKey)) }
go
func FindInMap(mapName, topLevelKey, secondLevelKey interface{}) string { return encode(fmt.Sprintf(`{ "Fn::FindInMap" : [ "%v", "%v", "%v" ] }`, mapName, topLevelKey, secondLevelKey)) }
[ "func", "FindInMap", "(", "mapName", ",", "topLevelKey", ",", "secondLevelKey", "interface", "{", "}", ")", "string", "{", "return", "encode", "(", "fmt", ".", "Sprintf", "(", "`{ \"Fn::FindInMap\" : [ \"%v\", \"%v\", \"%v\" ] }`", ",", "mapName", ",", "topLevelKey", ",", "secondLevelKey", ")", ")", "\n", "}" ]
// FindInMap returns the value corresponding to keys in a two-level map that is declared in the Mappings section.
[ "FindInMap", "returns", "the", "value", "corresponding", "to", "keys", "in", "a", "two", "-", "level", "map", "that", "is", "declared", "in", "the", "Mappings", "section", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/intrinsics.go#L141-L143
train
awslabs/goformation
cloudformation/intrinsics.go
Select
func Select(index interface{}, list []string) string { return encode(fmt.Sprintf(`{ "Fn::Select": [ "%v", [ "%v" ] ] }`, index, strings.Trim(strings.Join(list, `", "`), `, "`))) }
go
func Select(index interface{}, list []string) string { return encode(fmt.Sprintf(`{ "Fn::Select": [ "%v", [ "%v" ] ] }`, index, strings.Trim(strings.Join(list, `", "`), `, "`))) }
[ "func", "Select", "(", "index", "interface", "{", "}", ",", "list", "[", "]", "string", ")", "string", "{", "return", "encode", "(", "fmt", ".", "Sprintf", "(", "`{ \"Fn::Select\": [ \"%v\", [ \"%v\" ] ] }`", ",", "index", ",", "strings", ".", "Trim", "(", "strings", ".", "Join", "(", "list", ",", "`\", \"`", ")", ",", "`, \"`", ")", ")", ")", "\n", "}" ]
// Select returns a single object from a list of objects by index.
[ "Select", "returns", "a", "single", "object", "from", "a", "list", "of", "objects", "by", "index", "." ]
8898b813a27809556420fcf0427a32765a567302
https://github.com/awslabs/goformation/blob/8898b813a27809556420fcf0427a32765a567302/cloudformation/intrinsics.go#L158-L160
train
grafana/metrictank
idx/memory/partitioned_idx.go
Init
func (p *PartitionedMemoryIdx) Init() error { for _, m := range p.Partition { err := m.Init() if err != nil { return err } } return nil }
go
func (p *PartitionedMemoryIdx) Init() error { for _, m := range p.Partition { err := m.Init() if err != nil { return err } } return nil }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "Init", "(", ")", "error", "{", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "err", ":=", "m", ".", "Init", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "}", "\n", "return", "nil", "\n", "}" ]
// Init initializes the index at startup and // blocks until the index is ready for use.
[ "Init", "initializes", "the", "index", "at", "startup", "and", "blocks", "until", "the", "index", "is", "ready", "for", "use", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L35-L43
train
grafana/metrictank
idx/memory/partitioned_idx.go
AddOrUpdate
func (p *PartitionedMemoryIdx) AddOrUpdate(mkey schema.MKey, data *schema.MetricData, partition int32) (idx.Archive, int32, bool) { return p.Partition[partition].AddOrUpdate(mkey, data, partition) }
go
func (p *PartitionedMemoryIdx) AddOrUpdate(mkey schema.MKey, data *schema.MetricData, partition int32) (idx.Archive, int32, bool) { return p.Partition[partition].AddOrUpdate(mkey, data, partition) }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "AddOrUpdate", "(", "mkey", "schema", ".", "MKey", ",", "data", "*", "schema", ".", "MetricData", ",", "partition", "int32", ")", "(", "idx", ".", "Archive", ",", "int32", ",", "bool", ")", "{", "return", "p", ".", "Partition", "[", "partition", "]", ".", "AddOrUpdate", "(", "mkey", ",", "data", ",", "partition", ")", "\n", "}" ]
// AddOrUpdate makes sure a metric is known in the index, // and should be called for every received metric.
[ "AddOrUpdate", "makes", "sure", "a", "metric", "is", "known", "in", "the", "index", "and", "should", "be", "called", "for", "every", "received", "metric", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L60-L62
train
grafana/metrictank
idx/memory/partitioned_idx.go
Get
func (p *PartitionedMemoryIdx) Get(key schema.MKey) (idx.Archive, bool) { g, _ := errgroup.WithContext(context.Background()) resultChan := make(chan *idx.Archive, len(p.Partition)) for _, m := range p.Partition { m := m g.Go(func() error { if a, ok := m.Get(key); ok { resultChan <- &a } return nil }) } var err atomic.Value go func() { if e := g.Wait(); e != nil { err.Store(e) } close(resultChan) }() result, ok := <-resultChan if !ok { e := err.Load() if e != nil { log.Errorf("memory-idx: failed to get Archive with key %v. %s", key, e) } return idx.Archive{}, false } return *result, true }
go
func (p *PartitionedMemoryIdx) Get(key schema.MKey) (idx.Archive, bool) { g, _ := errgroup.WithContext(context.Background()) resultChan := make(chan *idx.Archive, len(p.Partition)) for _, m := range p.Partition { m := m g.Go(func() error { if a, ok := m.Get(key); ok { resultChan <- &a } return nil }) } var err atomic.Value go func() { if e := g.Wait(); e != nil { err.Store(e) } close(resultChan) }() result, ok := <-resultChan if !ok { e := err.Load() if e != nil { log.Errorf("memory-idx: failed to get Archive with key %v. %s", key, e) } return idx.Archive{}, false } return *result, true }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "Get", "(", "key", "schema", ".", "MKey", ")", "(", "idx", ".", "Archive", ",", "bool", ")", "{", "g", ",", "_", ":=", "errgroup", ".", "WithContext", "(", "context", ".", "Background", "(", ")", ")", "\n", "resultChan", ":=", "make", "(", "chan", "*", "idx", ".", "Archive", ",", "len", "(", "p", ".", "Partition", ")", ")", "\n", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "m", ":=", "m", "\n", "g", ".", "Go", "(", "func", "(", ")", "error", "{", "if", "a", ",", "ok", ":=", "m", ".", "Get", "(", "key", ")", ";", "ok", "{", "resultChan", "<-", "&", "a", "\n", "}", "\n", "return", "nil", "\n", "}", ")", "\n", "}", "\n\n", "var", "err", "atomic", ".", "Value", "\n", "go", "func", "(", ")", "{", "if", "e", ":=", "g", ".", "Wait", "(", ")", ";", "e", "!=", "nil", "{", "err", ".", "Store", "(", "e", ")", "\n", "}", "\n", "close", "(", "resultChan", ")", "\n", "}", "(", ")", "\n\n", "result", ",", "ok", ":=", "<-", "resultChan", "\n", "if", "!", "ok", "{", "e", ":=", "err", ".", "Load", "(", ")", "\n", "if", "e", "!=", "nil", "{", "log", ".", "Errorf", "(", "\"", "\"", ",", "key", ",", "e", ")", "\n", "}", "\n", "return", "idx", ".", "Archive", "{", "}", ",", "false", "\n", "}", "\n\n", "return", "*", "result", ",", "true", "\n", "}" ]
// Get returns the archive for the requested id.
[ "Get", "returns", "the", "archive", "for", "the", "requested", "id", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L70-L101
train
grafana/metrictank
idx/memory/partitioned_idx.go
GetPath
func (p *PartitionedMemoryIdx) GetPath(orgId uint32, path string) []idx.Archive { g, _ := errgroup.WithContext(context.Background()) result := make([][]idx.Archive, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { result[pos] = m.GetPath(orgId, path) return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to getPath: orgId=%d path=%s. %s", orgId, path, err) return nil } // get our total count, so we can allocate our response in one go. items := 0 for _, r := range result { items += len(r) } response := make([]idx.Archive, 0, items) for _, r := range result { response = append(response, r...) } return response }
go
func (p *PartitionedMemoryIdx) GetPath(orgId uint32, path string) []idx.Archive { g, _ := errgroup.WithContext(context.Background()) result := make([][]idx.Archive, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { result[pos] = m.GetPath(orgId, path) return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to getPath: orgId=%d path=%s. %s", orgId, path, err) return nil } // get our total count, so we can allocate our response in one go. items := 0 for _, r := range result { items += len(r) } response := make([]idx.Archive, 0, items) for _, r := range result { response = append(response, r...) } return response }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "GetPath", "(", "orgId", "uint32", ",", "path", "string", ")", "[", "]", "idx", ".", "Archive", "{", "g", ",", "_", ":=", "errgroup", ".", "WithContext", "(", "context", ".", "Background", "(", ")", ")", "\n", "result", ":=", "make", "(", "[", "]", "[", "]", "idx", ".", "Archive", ",", "len", "(", "p", ".", "Partition", ")", ")", "\n", "var", "i", "int", "\n", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "pos", ",", "m", ":=", "i", ",", "m", "\n", "g", ".", "Go", "(", "func", "(", ")", "error", "{", "result", "[", "pos", "]", "=", "m", ".", "GetPath", "(", "orgId", ",", "path", ")", "\n", "return", "nil", "\n", "}", ")", "\n", "i", "++", "\n", "}", "\n", "if", "err", ":=", "g", ".", "Wait", "(", ")", ";", "err", "!=", "nil", "{", "log", ".", "Errorf", "(", "\"", "\"", ",", "orgId", ",", "path", ",", "err", ")", "\n", "return", "nil", "\n", "}", "\n\n", "// get our total count, so we can allocate our response in one go.", "items", ":=", "0", "\n", "for", "_", ",", "r", ":=", "range", "result", "{", "items", "+=", "len", "(", "r", ")", "\n", "}", "\n", "response", ":=", "make", "(", "[", "]", "idx", ".", "Archive", ",", "0", ",", "items", ")", "\n", "for", "_", ",", "r", ":=", "range", "result", "{", "response", "=", "append", "(", "response", ",", "r", "...", ")", "\n", "}", "\n", "return", "response", "\n", "}" ]
// GetPath returns the archives under the given path.
[ "GetPath", "returns", "the", "archives", "under", "the", "given", "path", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L104-L131
train
grafana/metrictank
idx/memory/partitioned_idx.go
Prune
func (p *PartitionedMemoryIdx) Prune(oldest time.Time) ([]idx.Archive, error) { // Prune each partition sequentially. result := []idx.Archive{} for _, m := range p.Partition { found, err := m.Prune(oldest) if err != nil { return result, err } result = append(result, found...) } return result, nil }
go
func (p *PartitionedMemoryIdx) Prune(oldest time.Time) ([]idx.Archive, error) { // Prune each partition sequentially. result := []idx.Archive{} for _, m := range p.Partition { found, err := m.Prune(oldest) if err != nil { return result, err } result = append(result, found...) } return result, nil }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "Prune", "(", "oldest", "time", ".", "Time", ")", "(", "[", "]", "idx", ".", "Archive", ",", "error", ")", "{", "// Prune each partition sequentially.", "result", ":=", "[", "]", "idx", ".", "Archive", "{", "}", "\n", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "found", ",", "err", ":=", "m", ".", "Prune", "(", "oldest", ")", "\n", "if", "err", "!=", "nil", "{", "return", "result", ",", "err", "\n", "}", "\n", "result", "=", "append", "(", "result", ",", "found", "...", ")", "\n", "}", "\n", "return", "result", ",", "nil", "\n", "}" ]
// Prune deletes all metrics that haven't been seen since the given timestamp. // It returns all Archives deleted and any error encountered.
[ "Prune", "deletes", "all", "metrics", "that", "haven", "t", "been", "seen", "since", "the", "given", "timestamp", ".", "It", "returns", "all", "Archives", "deleted", "and", "any", "error", "encountered", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L259-L270
train
grafana/metrictank
idx/memory/partitioned_idx.go
FindTagValues
func (p *PartitionedMemoryIdx) FindTagValues(orgId uint32, tag string, prefix string, expressions []string, from int64, limit uint) ([]string, error) { g, _ := errgroup.WithContext(context.Background()) result := make([][]string, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { found, err := m.FindTagValues(orgId, tag, prefix, expressions, from, limit) if err != nil { return err } result[pos] = found return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to FindTagValues: orgId=%d tag=%s prefix=%s expressions=%v from=%d limit=%d. %s", orgId, tag, prefix, expressions, from, limit, err) return nil, err } // merge our results into the unique set of tags merged := map[string]struct{}{} for _, tags := range result { for _, t := range tags { merged[t] = struct{}{} } } response := make([]string, 0, len(merged)) for tag := range merged { response = append(response, tag) } return response, nil }
go
func (p *PartitionedMemoryIdx) FindTagValues(orgId uint32, tag string, prefix string, expressions []string, from int64, limit uint) ([]string, error) { g, _ := errgroup.WithContext(context.Background()) result := make([][]string, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { found, err := m.FindTagValues(orgId, tag, prefix, expressions, from, limit) if err != nil { return err } result[pos] = found return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to FindTagValues: orgId=%d tag=%s prefix=%s expressions=%v from=%d limit=%d. %s", orgId, tag, prefix, expressions, from, limit, err) return nil, err } // merge our results into the unique set of tags merged := map[string]struct{}{} for _, tags := range result { for _, t := range tags { merged[t] = struct{}{} } } response := make([]string, 0, len(merged)) for tag := range merged { response = append(response, tag) } return response, nil }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "FindTagValues", "(", "orgId", "uint32", ",", "tag", "string", ",", "prefix", "string", ",", "expressions", "[", "]", "string", ",", "from", "int64", ",", "limit", "uint", ")", "(", "[", "]", "string", ",", "error", ")", "{", "g", ",", "_", ":=", "errgroup", ".", "WithContext", "(", "context", ".", "Background", "(", ")", ")", "\n", "result", ":=", "make", "(", "[", "]", "[", "]", "string", ",", "len", "(", "p", ".", "Partition", ")", ")", "\n", "var", "i", "int", "\n", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "pos", ",", "m", ":=", "i", ",", "m", "\n", "g", ".", "Go", "(", "func", "(", ")", "error", "{", "found", ",", "err", ":=", "m", ".", "FindTagValues", "(", "orgId", ",", "tag", ",", "prefix", ",", "expressions", ",", "from", ",", "limit", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "result", "[", "pos", "]", "=", "found", "\n", "return", "nil", "\n", "}", ")", "\n", "i", "++", "\n", "}", "\n", "if", "err", ":=", "g", ".", "Wait", "(", ")", ";", "err", "!=", "nil", "{", "log", ".", "Errorf", "(", "\"", "\"", ",", "orgId", ",", "tag", ",", "prefix", ",", "expressions", ",", "from", ",", "limit", ",", "err", ")", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "// merge our results into the unique set of tags", "merged", ":=", "map", "[", "string", "]", "struct", "{", "}", "{", "}", "\n", "for", "_", ",", "tags", ":=", "range", "result", "{", "for", "_", ",", "t", ":=", "range", "tags", "{", "merged", "[", "t", "]", "=", "struct", "{", "}", "{", "}", "\n", "}", "\n", "}", "\n", "response", ":=", "make", "(", "[", "]", "string", ",", "0", ",", "len", "(", "merged", ")", ")", "\n", "for", "tag", ":=", "range", "merged", "{", "response", "=", "append", "(", "response", ",", "tag", ")", "\n", "}", "\n\n", "return", "response", ",", "nil", "\n", "}" ]
// FindTagValues generates a list of possible values that could // complete a given value prefix. It requires a tag to be specified and only values // of the given tag will be returned. It also accepts additional conditions to // further narrow down the result set in the format of graphite's tag queries
[ "FindTagValues", "generates", "a", "list", "of", "possible", "values", "that", "could", "complete", "a", "given", "value", "prefix", ".", "It", "requires", "a", "tag", "to", "be", "specified", "and", "only", "values", "of", "the", "given", "tag", "will", "be", "returned", ".", "It", "also", "accepts", "additional", "conditions", "to", "further", "narrow", "down", "the", "result", "set", "in", "the", "format", "of", "graphite", "s", "tag", "queries" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L402-L436
train
grafana/metrictank
idx/memory/partitioned_idx.go
TagDetails
func (p *PartitionedMemoryIdx) TagDetails(orgId uint32, key string, filter string, from int64) (map[string]uint64, error) { g, _ := errgroup.WithContext(context.Background()) result := make([]map[string]uint64, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { found, err := m.TagDetails(orgId, key, filter, from) if err != nil { return err } result[pos] = found return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to get TagDetails: orgId=%d key=%s filter=%s from=%d. %s", orgId, key, filter, from, err) return nil, err } // merge our results into the unique set of tags merged := map[string]uint64{} for _, tagCounts := range result { for tag, count := range tagCounts { merged[tag] = merged[tag] + count } } return merged, nil }
go
func (p *PartitionedMemoryIdx) TagDetails(orgId uint32, key string, filter string, from int64) (map[string]uint64, error) { g, _ := errgroup.WithContext(context.Background()) result := make([]map[string]uint64, len(p.Partition)) var i int for _, m := range p.Partition { pos, m := i, m g.Go(func() error { found, err := m.TagDetails(orgId, key, filter, from) if err != nil { return err } result[pos] = found return nil }) i++ } if err := g.Wait(); err != nil { log.Errorf("memory-idx: failed to get TagDetails: orgId=%d key=%s filter=%s from=%d. %s", orgId, key, filter, from, err) return nil, err } // merge our results into the unique set of tags merged := map[string]uint64{} for _, tagCounts := range result { for tag, count := range tagCounts { merged[tag] = merged[tag] + count } } return merged, nil }
[ "func", "(", "p", "*", "PartitionedMemoryIdx", ")", "TagDetails", "(", "orgId", "uint32", ",", "key", "string", ",", "filter", "string", ",", "from", "int64", ")", "(", "map", "[", "string", "]", "uint64", ",", "error", ")", "{", "g", ",", "_", ":=", "errgroup", ".", "WithContext", "(", "context", ".", "Background", "(", ")", ")", "\n", "result", ":=", "make", "(", "[", "]", "map", "[", "string", "]", "uint64", ",", "len", "(", "p", ".", "Partition", ")", ")", "\n", "var", "i", "int", "\n", "for", "_", ",", "m", ":=", "range", "p", ".", "Partition", "{", "pos", ",", "m", ":=", "i", ",", "m", "\n", "g", ".", "Go", "(", "func", "(", ")", "error", "{", "found", ",", "err", ":=", "m", ".", "TagDetails", "(", "orgId", ",", "key", ",", "filter", ",", "from", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "result", "[", "pos", "]", "=", "found", "\n", "return", "nil", "\n", "}", ")", "\n", "i", "++", "\n", "}", "\n", "if", "err", ":=", "g", ".", "Wait", "(", ")", ";", "err", "!=", "nil", "{", "log", ".", "Errorf", "(", "\"", "\"", ",", "orgId", ",", "key", ",", "filter", ",", "from", ",", "err", ")", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "// merge our results into the unique set of tags", "merged", ":=", "map", "[", "string", "]", "uint64", "{", "}", "\n", "for", "_", ",", "tagCounts", ":=", "range", "result", "{", "for", "tag", ",", "count", ":=", "range", "tagCounts", "{", "merged", "[", "tag", "]", "=", "merged", "[", "tag", "]", "+", "count", "\n", "}", "\n", "}", "\n\n", "return", "merged", ",", "nil", "\n", "}" ]
// TagDetails returns a list of all values associated with a given tag key in the // given org. The occurrences of each value is counted and the count is referred to by // the metric names in the returned map. // If the third parameter is not "" it will be used as a regular expression to filter // the values before accounting for them. // If the fourth parameter is > 0 then only those metrics of which the LastUpdate // time is >= the from timestamp will be included.
[ "TagDetails", "returns", "a", "list", "of", "all", "values", "associated", "with", "a", "given", "tag", "key", "in", "the", "given", "org", ".", "The", "occurrences", "of", "each", "value", "is", "counted", "and", "the", "count", "is", "referred", "to", "by", "the", "metric", "names", "in", "the", "returned", "map", ".", "If", "the", "third", "parameter", "is", "not", "it", "will", "be", "used", "as", "a", "regular", "expression", "to", "filter", "the", "values", "before", "accounting", "for", "them", ".", "If", "the", "fourth", "parameter", "is", ">", "0", "then", "only", "those", "metrics", "of", "which", "the", "LastUpdate", "time", "is", ">", "=", "the", "from", "timestamp", "will", "be", "included", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/idx/memory/partitioned_idx.go#L445-L475
train
grafana/metrictank
expr/parse.go
Parse
func Parse(e string) (*expr, string, error) { // skip whitespace for len(e) > 1 && e[0] == ' ' { e = e[1:] } if len(e) == 0 { return nil, "", ErrMissingExpr } if '0' <= e[0] && e[0] <= '9' || e[0] == '-' || e[0] == '+' { return parseConst(e) } if val, ok := strToBool(e); ok { // 'false' is 5 chars, 'true' is 4 size := 5 if val { size = 4 } return &expr{bool: val, str: e[:size], etype: etBool}, e[size:], nil } if e[0] == '\'' || e[0] == '"' { val, e, err := parseString(e) return &expr{str: val, etype: etString}, e, err } name, e := parseName(e) if name == "" { return nil, e, ErrMissingArg } if e != "" && e[0] == '(' { for i := range name { if !isFnChar(name[i]) { return nil, "", ErrIllegalCharacter } } exp := &expr{str: name, etype: etFunc} ArgString, posArgs, namedArgs, e, err := parseArgList(e) exp.argsStr = ArgString exp.args = posArgs exp.namedArgs = namedArgs return exp, e, err } return &expr{str: name, etype: etName}, e, nil }
go
func Parse(e string) (*expr, string, error) { // skip whitespace for len(e) > 1 && e[0] == ' ' { e = e[1:] } if len(e) == 0 { return nil, "", ErrMissingExpr } if '0' <= e[0] && e[0] <= '9' || e[0] == '-' || e[0] == '+' { return parseConst(e) } if val, ok := strToBool(e); ok { // 'false' is 5 chars, 'true' is 4 size := 5 if val { size = 4 } return &expr{bool: val, str: e[:size], etype: etBool}, e[size:], nil } if e[0] == '\'' || e[0] == '"' { val, e, err := parseString(e) return &expr{str: val, etype: etString}, e, err } name, e := parseName(e) if name == "" { return nil, e, ErrMissingArg } if e != "" && e[0] == '(' { for i := range name { if !isFnChar(name[i]) { return nil, "", ErrIllegalCharacter } } exp := &expr{str: name, etype: etFunc} ArgString, posArgs, namedArgs, e, err := parseArgList(e) exp.argsStr = ArgString exp.args = posArgs exp.namedArgs = namedArgs return exp, e, err } return &expr{str: name, etype: etName}, e, nil }
[ "func", "Parse", "(", "e", "string", ")", "(", "*", "expr", ",", "string", ",", "error", ")", "{", "// skip whitespace", "for", "len", "(", "e", ")", ">", "1", "&&", "e", "[", "0", "]", "==", "' '", "{", "e", "=", "e", "[", "1", ":", "]", "\n", "}", "\n\n", "if", "len", "(", "e", ")", "==", "0", "{", "return", "nil", ",", "\"", "\"", ",", "ErrMissingExpr", "\n", "}", "\n\n", "if", "'0'", "<=", "e", "[", "0", "]", "&&", "e", "[", "0", "]", "<=", "'9'", "||", "e", "[", "0", "]", "==", "'-'", "||", "e", "[", "0", "]", "==", "'+'", "{", "return", "parseConst", "(", "e", ")", "\n", "}", "\n\n", "if", "val", ",", "ok", ":=", "strToBool", "(", "e", ")", ";", "ok", "{", "// 'false' is 5 chars, 'true' is 4", "size", ":=", "5", "\n", "if", "val", "{", "size", "=", "4", "\n", "}", "\n", "return", "&", "expr", "{", "bool", ":", "val", ",", "str", ":", "e", "[", ":", "size", "]", ",", "etype", ":", "etBool", "}", ",", "e", "[", "size", ":", "]", ",", "nil", "\n", "}", "\n\n", "if", "e", "[", "0", "]", "==", "'\\''", "||", "e", "[", "0", "]", "==", "'\"'", "{", "val", ",", "e", ",", "err", ":=", "parseString", "(", "e", ")", "\n", "return", "&", "expr", "{", "str", ":", "val", ",", "etype", ":", "etString", "}", ",", "e", ",", "err", "\n", "}", "\n\n", "name", ",", "e", ":=", "parseName", "(", "e", ")", "\n\n", "if", "name", "==", "\"", "\"", "{", "return", "nil", ",", "e", ",", "ErrMissingArg", "\n", "}", "\n\n", "if", "e", "!=", "\"", "\"", "&&", "e", "[", "0", "]", "==", "'('", "{", "for", "i", ":=", "range", "name", "{", "if", "!", "isFnChar", "(", "name", "[", "i", "]", ")", "{", "return", "nil", ",", "\"", "\"", ",", "ErrIllegalCharacter", "\n", "}", "\n", "}", "\n\n", "exp", ":=", "&", "expr", "{", "str", ":", "name", ",", "etype", ":", "etFunc", "}", "\n\n", "ArgString", ",", "posArgs", ",", "namedArgs", ",", "e", ",", "err", ":=", "parseArgList", "(", "e", ")", "\n", "exp", ".", "argsStr", "=", "ArgString", "\n", "exp", ".", "args", "=", "posArgs", "\n", "exp", ".", "namedArgs", "=", "namedArgs", "\n\n", "return", "exp", ",", "e", ",", "err", "\n", "}", "\n\n", "return", "&", "expr", "{", "str", ":", "name", ",", "etype", ":", "etName", "}", ",", "e", ",", "nil", "\n", "}" ]
// Parses an expression string and turns it into an expression // also returns any leftover data that could not be parsed
[ "Parses", "an", "expression", "string", "and", "turns", "it", "into", "an", "expression", "also", "returns", "any", "leftover", "data", "that", "could", "not", "be", "parsed" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/expr/parse.go#L102-L154
train
grafana/metrictank
expr/parse.go
parseArgList
func parseArgList(e string) (string, []*expr, map[string]*expr, string, error) { var ( posArgs []*expr namedArgs map[string]*expr ) if e[0] != '(' { panic("arg list should start with paren. calling code should have asserted this") } ArgString := e[1:] e = e[1:] for { var arg *expr var err error arg, e, err = Parse(e) if err != nil { return "", nil, nil, e, err } if e == "" { return "", nil, nil, "", ErrMissingComma } // we now know we're parsing a key-value pair // in the future we should probably add validation here that the key // can't contain otherwise-valid-name chars like {, }, etc if arg.etype == etName && e[0] == '=' { e = e[1:] argCont, eCont, errCont := Parse(e) if errCont != nil { return "", nil, nil, eCont, errCont } if eCont == "" { return "", nil, nil, "", ErrMissingComma } if argCont.etype != etInt && argCont.etype != etFloat && argCont.etype != etName && argCont.etype != etString && argCont.etype != etBool { return "", nil, nil, eCont, ErrBadArgumentStr{"int, float, name, bool or string", string(argCont.etype)} } if namedArgs == nil { namedArgs = make(map[string]*expr) } namedArgs[arg.str] = argCont e = eCont } else { posArgs = append(posArgs, arg) } // after the argument, trim any trailing spaces for len(e) > 0 && e[0] == ' ' { e = e[1:] } if e[0] == ')' { return ArgString[:len(ArgString)-len(e)], posArgs, namedArgs, e[1:], nil } if e[0] != ',' && e[0] != ' ' { return "", nil, nil, "", ErrUnexpectedCharacter } e = e[1:] } }
go
func parseArgList(e string) (string, []*expr, map[string]*expr, string, error) { var ( posArgs []*expr namedArgs map[string]*expr ) if e[0] != '(' { panic("arg list should start with paren. calling code should have asserted this") } ArgString := e[1:] e = e[1:] for { var arg *expr var err error arg, e, err = Parse(e) if err != nil { return "", nil, nil, e, err } if e == "" { return "", nil, nil, "", ErrMissingComma } // we now know we're parsing a key-value pair // in the future we should probably add validation here that the key // can't contain otherwise-valid-name chars like {, }, etc if arg.etype == etName && e[0] == '=' { e = e[1:] argCont, eCont, errCont := Parse(e) if errCont != nil { return "", nil, nil, eCont, errCont } if eCont == "" { return "", nil, nil, "", ErrMissingComma } if argCont.etype != etInt && argCont.etype != etFloat && argCont.etype != etName && argCont.etype != etString && argCont.etype != etBool { return "", nil, nil, eCont, ErrBadArgumentStr{"int, float, name, bool or string", string(argCont.etype)} } if namedArgs == nil { namedArgs = make(map[string]*expr) } namedArgs[arg.str] = argCont e = eCont } else { posArgs = append(posArgs, arg) } // after the argument, trim any trailing spaces for len(e) > 0 && e[0] == ' ' { e = e[1:] } if e[0] == ')' { return ArgString[:len(ArgString)-len(e)], posArgs, namedArgs, e[1:], nil } if e[0] != ',' && e[0] != ' ' { return "", nil, nil, "", ErrUnexpectedCharacter } e = e[1:] } }
[ "func", "parseArgList", "(", "e", "string", ")", "(", "string", ",", "[", "]", "*", "expr", ",", "map", "[", "string", "]", "*", "expr", ",", "string", ",", "error", ")", "{", "var", "(", "posArgs", "[", "]", "*", "expr", "\n", "namedArgs", "map", "[", "string", "]", "*", "expr", "\n", ")", "\n\n", "if", "e", "[", "0", "]", "!=", "'('", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "ArgString", ":=", "e", "[", "1", ":", "]", "\n\n", "e", "=", "e", "[", "1", ":", "]", "\n\n", "for", "{", "var", "arg", "*", "expr", "\n", "var", "err", "error", "\n", "arg", ",", "e", ",", "err", "=", "Parse", "(", "e", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "e", ",", "err", "\n", "}", "\n\n", "if", "e", "==", "\"", "\"", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "\"", "\"", ",", "ErrMissingComma", "\n", "}", "\n\n", "// we now know we're parsing a key-value pair", "// in the future we should probably add validation here that the key", "// can't contain otherwise-valid-name chars like {, }, etc", "if", "arg", ".", "etype", "==", "etName", "&&", "e", "[", "0", "]", "==", "'='", "{", "e", "=", "e", "[", "1", ":", "]", "\n", "argCont", ",", "eCont", ",", "errCont", ":=", "Parse", "(", "e", ")", "\n", "if", "errCont", "!=", "nil", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "eCont", ",", "errCont", "\n", "}", "\n\n", "if", "eCont", "==", "\"", "\"", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "\"", "\"", ",", "ErrMissingComma", "\n", "}", "\n\n", "if", "argCont", ".", "etype", "!=", "etInt", "&&", "argCont", ".", "etype", "!=", "etFloat", "&&", "argCont", ".", "etype", "!=", "etName", "&&", "argCont", ".", "etype", "!=", "etString", "&&", "argCont", ".", "etype", "!=", "etBool", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "eCont", ",", "ErrBadArgumentStr", "{", "\"", "\"", ",", "string", "(", "argCont", ".", "etype", ")", "}", "\n", "}", "\n\n", "if", "namedArgs", "==", "nil", "{", "namedArgs", "=", "make", "(", "map", "[", "string", "]", "*", "expr", ")", "\n", "}", "\n\n", "namedArgs", "[", "arg", ".", "str", "]", "=", "argCont", "\n\n", "e", "=", "eCont", "\n", "}", "else", "{", "posArgs", "=", "append", "(", "posArgs", ",", "arg", ")", "\n", "}", "\n\n", "// after the argument, trim any trailing spaces", "for", "len", "(", "e", ")", ">", "0", "&&", "e", "[", "0", "]", "==", "' '", "{", "e", "=", "e", "[", "1", ":", "]", "\n", "}", "\n\n", "if", "e", "[", "0", "]", "==", "')'", "{", "return", "ArgString", "[", ":", "len", "(", "ArgString", ")", "-", "len", "(", "e", ")", "]", ",", "posArgs", ",", "namedArgs", ",", "e", "[", "1", ":", "]", ",", "nil", "\n", "}", "\n\n", "if", "e", "[", "0", "]", "!=", "','", "&&", "e", "[", "0", "]", "!=", "' '", "{", "return", "\"", "\"", ",", "nil", ",", "nil", ",", "\"", "\"", ",", "ErrUnexpectedCharacter", "\n", "}", "\n\n", "e", "=", "e", "[", "1", ":", "]", "\n", "}", "\n", "}" ]
// caller must assure s starts with opening paren
[ "caller", "must", "assure", "s", "starts", "with", "opening", "paren" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/expr/parse.go#L169-L240
train
grafana/metrictank
expr/parse.go
parseString
func parseString(s string) (string, string, error) { if s[0] != '\'' && s[0] != '"' { panic("string should start with open quote. calling code should have asserted this") } match := s[0] s = s[1:] var i int for i < len(s) && s[i] != match { i++ } if i == len(s) { return "", "", ErrMissingQuote } return s[:i], s[i+1:], nil }
go
func parseString(s string) (string, string, error) { if s[0] != '\'' && s[0] != '"' { panic("string should start with open quote. calling code should have asserted this") } match := s[0] s = s[1:] var i int for i < len(s) && s[i] != match { i++ } if i == len(s) { return "", "", ErrMissingQuote } return s[:i], s[i+1:], nil }
[ "func", "parseString", "(", "s", "string", ")", "(", "string", ",", "string", ",", "error", ")", "{", "if", "s", "[", "0", "]", "!=", "'\\''", "&&", "s", "[", "0", "]", "!=", "'\"'", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "match", ":=", "s", "[", "0", "]", "\n\n", "s", "=", "s", "[", "1", ":", "]", "\n\n", "var", "i", "int", "\n", "for", "i", "<", "len", "(", "s", ")", "&&", "s", "[", "i", "]", "!=", "match", "{", "i", "++", "\n", "}", "\n\n", "if", "i", "==", "len", "(", "s", ")", "{", "return", "\"", "\"", ",", "\"", "\"", ",", "ErrMissingQuote", "\n\n", "}", "\n\n", "return", "s", "[", ":", "i", "]", ",", "s", "[", "i", "+", "1", ":", "]", ",", "nil", "\n", "}" ]
// caller must assure s starts with a single or double quote
[ "caller", "must", "assure", "s", "starts", "with", "a", "single", "or", "double", "quote" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/expr/parse.go#L330-L351
train
grafana/metrictank
expr/parse.go
aggKey
func aggKey(serie models.Series, nodes []expr) string { metric := extractMetric(serie.Target) if len(metric) == 0 { metric = serie.Tags["name"] } // Trim off tags (if they are there) and split on '.' parts := strings.Split(strings.SplitN(metric, ";", 2)[0], ".") var name []string for _, n := range nodes { if n.etype == etInt { idx := int(n.int) if idx < 0 { idx += len(parts) } if idx >= len(parts) || idx < 0 { continue } name = append(name, parts[idx]) } else if n.etype == etString { s := n.str name = append(name, serie.Tags[s]) } } return strings.Join(name, ".") }
go
func aggKey(serie models.Series, nodes []expr) string { metric := extractMetric(serie.Target) if len(metric) == 0 { metric = serie.Tags["name"] } // Trim off tags (if they are there) and split on '.' parts := strings.Split(strings.SplitN(metric, ";", 2)[0], ".") var name []string for _, n := range nodes { if n.etype == etInt { idx := int(n.int) if idx < 0 { idx += len(parts) } if idx >= len(parts) || idx < 0 { continue } name = append(name, parts[idx]) } else if n.etype == etString { s := n.str name = append(name, serie.Tags[s]) } } return strings.Join(name, ".") }
[ "func", "aggKey", "(", "serie", "models", ".", "Series", ",", "nodes", "[", "]", "expr", ")", "string", "{", "metric", ":=", "extractMetric", "(", "serie", ".", "Target", ")", "\n", "if", "len", "(", "metric", ")", "==", "0", "{", "metric", "=", "serie", ".", "Tags", "[", "\"", "\"", "]", "\n", "}", "\n", "// Trim off tags (if they are there) and split on '.'", "parts", ":=", "strings", ".", "Split", "(", "strings", ".", "SplitN", "(", "metric", ",", "\"", "\"", ",", "2", ")", "[", "0", "]", ",", "\"", "\"", ")", "\n", "var", "name", "[", "]", "string", "\n", "for", "_", ",", "n", ":=", "range", "nodes", "{", "if", "n", ".", "etype", "==", "etInt", "{", "idx", ":=", "int", "(", "n", ".", "int", ")", "\n", "if", "idx", "<", "0", "{", "idx", "+=", "len", "(", "parts", ")", "\n", "}", "\n", "if", "idx", ">=", "len", "(", "parts", ")", "||", "idx", "<", "0", "{", "continue", "\n", "}", "\n", "name", "=", "append", "(", "name", ",", "parts", "[", "idx", "]", ")", "\n", "}", "else", "if", "n", ".", "etype", "==", "etString", "{", "s", ":=", "n", ".", "str", "\n", "name", "=", "append", "(", "name", ",", "serie", ".", "Tags", "[", "s", "]", ")", "\n", "}", "\n", "}", "\n", "return", "strings", ".", "Join", "(", "name", ",", "\"", "\"", ")", "\n", "}" ]
// aggKey creates a key for a serie based on its target metric as well // as a list of nodes which need to be extracted // returns a single string
[ "aggKey", "creates", "a", "key", "for", "a", "serie", "based", "on", "its", "target", "metric", "as", "well", "as", "a", "list", "of", "nodes", "which", "need", "to", "be", "extracted", "returns", "a", "single", "string" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/expr/parse.go#L406-L430
train
grafana/metrictank
expr/funcs.go
summarizeCons
func summarizeCons(series []models.Series) (consolidation.Consolidator, consolidation.Consolidator) { for _, serie := range series { if serie.QueryCons != 0 { return serie.Consolidator, serie.QueryCons } } return series[0].Consolidator, series[0].QueryCons }
go
func summarizeCons(series []models.Series) (consolidation.Consolidator, consolidation.Consolidator) { for _, serie := range series { if serie.QueryCons != 0 { return serie.Consolidator, serie.QueryCons } } return series[0].Consolidator, series[0].QueryCons }
[ "func", "summarizeCons", "(", "series", "[", "]", "models", ".", "Series", ")", "(", "consolidation", ".", "Consolidator", ",", "consolidation", ".", "Consolidator", ")", "{", "for", "_", ",", "serie", ":=", "range", "series", "{", "if", "serie", ".", "QueryCons", "!=", "0", "{", "return", "serie", ".", "Consolidator", ",", "serie", ".", "QueryCons", "\n", "}", "\n", "}", "\n", "return", "series", "[", "0", "]", ".", "Consolidator", ",", "series", "[", "0", "]", ".", "QueryCons", "\n", "}" ]
// summarizeCons returns the first explicitly specified Consolidator, QueryCons for the given set of input series, // or the first one, otherwise.
[ "summarizeCons", "returns", "the", "first", "explicitly", "specified", "Consolidator", "QueryCons", "for", "the", "given", "set", "of", "input", "series", "or", "the", "first", "one", "otherwise", "." ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/expr/funcs.go#L107-L114
train
grafana/metrictank
mdata/cache/ccache.go
NewCCache
func NewCCache() *CCache { if maxSize == 0 { return nil } cc := &CCache{ metricCache: make(map[schema.AMKey]*CCacheMetric), metricRawKeys: make(map[schema.MKey]map[schema.Archive]struct{}), accnt: accnt.NewFlatAccnt(maxSize), stop: make(chan interface{}), tracer: opentracing.NoopTracer{}, } go cc.evictLoop() return cc }
go
func NewCCache() *CCache { if maxSize == 0 { return nil } cc := &CCache{ metricCache: make(map[schema.AMKey]*CCacheMetric), metricRawKeys: make(map[schema.MKey]map[schema.Archive]struct{}), accnt: accnt.NewFlatAccnt(maxSize), stop: make(chan interface{}), tracer: opentracing.NoopTracer{}, } go cc.evictLoop() return cc }
[ "func", "NewCCache", "(", ")", "*", "CCache", "{", "if", "maxSize", "==", "0", "{", "return", "nil", "\n", "}", "\n\n", "cc", ":=", "&", "CCache", "{", "metricCache", ":", "make", "(", "map", "[", "schema", ".", "AMKey", "]", "*", "CCacheMetric", ")", ",", "metricRawKeys", ":", "make", "(", "map", "[", "schema", ".", "MKey", "]", "map", "[", "schema", ".", "Archive", "]", "struct", "{", "}", ")", ",", "accnt", ":", "accnt", ".", "NewFlatAccnt", "(", "maxSize", ")", ",", "stop", ":", "make", "(", "chan", "interface", "{", "}", ")", ",", "tracer", ":", "opentracing", ".", "NoopTracer", "{", "}", ",", "}", "\n", "go", "cc", ".", "evictLoop", "(", ")", "\n", "return", "cc", "\n", "}" ]
// NewCCache creates a new chunk cache. // When cache is disabled, this will return nil // but the caller doesn't have to worry about this and can call methods as usual on a nil cache
[ "NewCCache", "creates", "a", "new", "chunk", "cache", ".", "When", "cache", "is", "disabled", "this", "will", "return", "nil", "but", "the", "caller", "doesn", "t", "have", "to", "worry", "about", "this", "and", "can", "call", "methods", "as", "usual", "on", "a", "nil", "cache" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/mdata/cache/ccache.go#L55-L69
train
grafana/metrictank
mdata/cache/ccache.go
DelMetric
func (c *CCache) DelMetric(rawMetric schema.MKey) (int, int) { if c == nil { return 0, 0 } archives, series := 0, 0 c.Lock() defer c.Unlock() archs, ok := c.metricRawKeys[rawMetric] if !ok { return archives, series } metric := schema.AMKey{MKey: rawMetric} for arch := range archs { metric.Archive = arch delete(c.metricCache, metric) c.accnt.DelMetric(metric) archives++ } delete(c.metricRawKeys, rawMetric) series++ return series, archives }
go
func (c *CCache) DelMetric(rawMetric schema.MKey) (int, int) { if c == nil { return 0, 0 } archives, series := 0, 0 c.Lock() defer c.Unlock() archs, ok := c.metricRawKeys[rawMetric] if !ok { return archives, series } metric := schema.AMKey{MKey: rawMetric} for arch := range archs { metric.Archive = arch delete(c.metricCache, metric) c.accnt.DelMetric(metric) archives++ } delete(c.metricRawKeys, rawMetric) series++ return series, archives }
[ "func", "(", "c", "*", "CCache", ")", "DelMetric", "(", "rawMetric", "schema", ".", "MKey", ")", "(", "int", ",", "int", ")", "{", "if", "c", "==", "nil", "{", "return", "0", ",", "0", "\n", "}", "\n", "archives", ",", "series", ":=", "0", ",", "0", "\n\n", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n\n", "archs", ",", "ok", ":=", "c", ".", "metricRawKeys", "[", "rawMetric", "]", "\n", "if", "!", "ok", "{", "return", "archives", ",", "series", "\n", "}", "\n\n", "metric", ":=", "schema", ".", "AMKey", "{", "MKey", ":", "rawMetric", "}", "\n", "for", "arch", ":=", "range", "archs", "{", "metric", ".", "Archive", "=", "arch", "\n", "delete", "(", "c", ".", "metricCache", ",", "metric", ")", "\n", "c", ".", "accnt", ".", "DelMetric", "(", "metric", ")", "\n", "archives", "++", "\n", "}", "\n\n", "delete", "(", "c", ".", "metricRawKeys", ",", "rawMetric", ")", "\n", "series", "++", "\n\n", "return", "series", ",", "archives", "\n", "}" ]
// takes a raw key and deletes all archives associated with it from cache
[ "takes", "a", "raw", "key", "and", "deletes", "all", "archives", "associated", "with", "it", "from", "cache" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/mdata/cache/ccache.go#L90-L116
train
grafana/metrictank
mdata/cache/ccache.go
AddIfHot
func (c *CCache) AddIfHot(metric schema.AMKey, prev uint32, itergen chunk.IterGen) { if c == nil { return } c.RLock() var met *CCacheMetric var ok bool // if this metric is not cached at all it is not hot if met, ok = c.metricCache[metric]; !ok { c.RUnlock() return } // if the previous chunk is not cached we consider the metric not hot enough to cache this chunk // only works reliably if the last chunk of that metric is span aware, otherwise lastTs() will be guessed // conservatively which means that the returned value will probably be lower than the real last ts if met.lastTs() < itergen.T0 { c.RUnlock() return } accnt.CacheChunkPushHot.Inc() c.RUnlock() met.Add(prev, itergen) }
go
func (c *CCache) AddIfHot(metric schema.AMKey, prev uint32, itergen chunk.IterGen) { if c == nil { return } c.RLock() var met *CCacheMetric var ok bool // if this metric is not cached at all it is not hot if met, ok = c.metricCache[metric]; !ok { c.RUnlock() return } // if the previous chunk is not cached we consider the metric not hot enough to cache this chunk // only works reliably if the last chunk of that metric is span aware, otherwise lastTs() will be guessed // conservatively which means that the returned value will probably be lower than the real last ts if met.lastTs() < itergen.T0 { c.RUnlock() return } accnt.CacheChunkPushHot.Inc() c.RUnlock() met.Add(prev, itergen) }
[ "func", "(", "c", "*", "CCache", ")", "AddIfHot", "(", "metric", "schema", ".", "AMKey", ",", "prev", "uint32", ",", "itergen", "chunk", ".", "IterGen", ")", "{", "if", "c", "==", "nil", "{", "return", "\n", "}", "\n", "c", ".", "RLock", "(", ")", "\n\n", "var", "met", "*", "CCacheMetric", "\n", "var", "ok", "bool", "\n\n", "// if this metric is not cached at all it is not hot", "if", "met", ",", "ok", "=", "c", ".", "metricCache", "[", "metric", "]", ";", "!", "ok", "{", "c", ".", "RUnlock", "(", ")", "\n", "return", "\n", "}", "\n\n", "// if the previous chunk is not cached we consider the metric not hot enough to cache this chunk", "// only works reliably if the last chunk of that metric is span aware, otherwise lastTs() will be guessed", "// conservatively which means that the returned value will probably be lower than the real last ts", "if", "met", ".", "lastTs", "(", ")", "<", "itergen", ".", "T0", "{", "c", ".", "RUnlock", "(", ")", "\n", "return", "\n", "}", "\n\n", "accnt", ".", "CacheChunkPushHot", ".", "Inc", "(", ")", "\n\n", "c", ".", "RUnlock", "(", ")", "\n", "met", ".", "Add", "(", "prev", ",", "itergen", ")", "\n", "}" ]
// adds the given chunk to the cache, but only if the metric is sufficiently hot
[ "adds", "the", "given", "chunk", "to", "the", "cache", "but", "only", "if", "the", "metric", "is", "sufficiently", "hot" ]
dd9b92db72d27553d9a8214bff5f01d2531f63b0
https://github.com/grafana/metrictank/blob/dd9b92db72d27553d9a8214bff5f01d2531f63b0/mdata/cache/ccache.go#L119-L146
train