From 2ea4a5a11cc26284ff898718909584e05c2ce1de Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 02:14:22 +0000 Subject: [PATCH 1/6] feat: auto-generate ServiceResourcePath constants for consistent error strings Fixes #75 - extends gen-imports to generate constants.go in each resource package with ServiceResourcePath constant, updates all 163 DAO files to use it instead of hardcoded strings. --- custom/accessanalyzer/analyzers/constants.go | 7 ++ custom/accessanalyzer/analyzers/dao.go | 2 +- custom/accessanalyzer/findings/constants.go | 7 ++ custom/accessanalyzer/findings/dao.go | 2 +- custom/acm/certificates/constants.go | 7 ++ custom/acm/certificates/dao.go | 2 +- custom/apigateway/http-apis/constants.go | 7 ++ custom/apigateway/http-apis/dao.go | 2 +- custom/apigateway/rest-apis/constants.go | 7 ++ custom/apigateway/rest-apis/dao.go | 2 +- custom/apigateway/stages-v2/constants.go | 7 ++ custom/apigateway/stages-v2/dao.go | 2 +- custom/apigateway/stages/constants.go | 7 ++ custom/apigateway/stages/dao.go | 2 +- custom/apprunner/operations/constants.go | 7 ++ custom/apprunner/operations/dao.go | 2 +- custom/apprunner/services/constants.go | 7 ++ custom/apprunner/services/dao.go | 2 +- custom/appsync/data-sources/constants.go | 7 ++ custom/appsync/data-sources/dao.go | 2 +- custom/appsync/graphql-apis/constants.go | 7 ++ custom/appsync/graphql-apis/dao.go | 2 +- custom/athena/query-executions/constants.go | 7 ++ custom/athena/query-executions/dao.go | 2 +- custom/athena/workgroups/constants.go | 7 ++ custom/athena/workgroups/dao.go | 2 +- custom/autoscaling/activities/constants.go | 7 ++ custom/autoscaling/activities/dao.go | 2 +- custom/autoscaling/groups/constants.go | 7 ++ custom/autoscaling/groups/dao.go | 2 +- custom/backup/backup-jobs/constants.go | 7 ++ custom/backup/backup-jobs/dao.go | 2 +- custom/backup/copy-jobs/constants.go | 7 ++ custom/backup/copy-jobs/dao.go | 2 +- custom/backup/plans/constants.go | 7 ++ custom/backup/plans/dao.go | 2 +- .../backup/protected-resources/constants.go | 7 ++ custom/backup/protected-resources/dao.go | 2 +- custom/backup/recovery-points/constants.go | 7 ++ custom/backup/recovery-points/dao.go | 2 +- custom/backup/restore-jobs/constants.go | 7 ++ custom/backup/restore-jobs/dao.go | 2 +- custom/backup/selections/constants.go | 7 ++ custom/backup/selections/dao.go | 2 +- custom/backup/vaults/constants.go | 7 ++ custom/backup/vaults/dao.go | 2 +- .../batch/compute-environments/constants.go | 7 ++ custom/batch/compute-environments/dao.go | 2 +- custom/batch/job-definitions/constants.go | 7 ++ custom/batch/job-definitions/dao.go | 2 +- custom/batch/job-queues/constants.go | 7 ++ custom/batch/job-queues/dao.go | 2 +- custom/batch/jobs/constants.go | 7 ++ custom/batch/jobs/dao.go | 2 +- custom/bedrock-agent/agents/constants.go | 7 ++ custom/bedrock-agent/agents/dao.go | 2 +- .../bedrock-agent/data-sources/constants.go | 7 ++ custom/bedrock-agent/data-sources/dao.go | 2 +- custom/bedrock-agent/flows/constants.go | 7 ++ custom/bedrock-agent/flows/dao.go | 2 +- .../knowledge-bases/constants.go | 7 ++ custom/bedrock-agent/knowledge-bases/dao.go | 2 +- custom/bedrock-agent/prompts/constants.go | 7 ++ custom/bedrock-agent/prompts/dao.go | 2 +- .../bedrock-agentcore/endpoints/constants.go | 7 ++ custom/bedrock-agentcore/endpoints/dao.go | 2 +- .../bedrock-agentcore/runtimes/constants.go | 7 ++ custom/bedrock-agentcore/runtimes/dao.go | 2 +- .../bedrock-agentcore/versions/constants.go | 7 ++ custom/bedrock-agentcore/versions/dao.go | 2 +- custom/bedrock/foundation-models/constants.go | 7 ++ custom/bedrock/foundation-models/dao.go | 2 +- custom/bedrock/guardrails/constants.go | 7 ++ custom/bedrock/guardrails/dao.go | 2 +- .../bedrock/inference-profiles/constants.go | 7 ++ custom/bedrock/inference-profiles/dao.go | 2 +- custom/budgets/budgets/constants.go | 7 ++ custom/budgets/budgets/dao.go | 2 +- custom/budgets/notifications/constants.go | 7 ++ custom/budgets/notifications/dao.go | 2 +- custom/ce/anomalies/constants.go | 7 ++ custom/ce/anomalies/dao.go | 2 +- custom/ce/costs/constants.go | 7 ++ custom/ce/costs/dao.go | 2 +- custom/ce/monitors/constants.go | 7 ++ custom/ce/monitors/dao.go | 2 +- custom/cfn/events/constants.go | 7 ++ custom/cfn/events/dao.go | 2 +- custom/cfn/outputs/constants.go | 7 ++ custom/cfn/outputs/dao.go | 2 +- custom/cfn/resources/constants.go | 7 ++ custom/cfn/resources/dao.go | 2 +- custom/cfn/stacks/constants.go | 7 ++ custom/cfn/stacks/dao.go | 2 +- custom/cloudfront/distributions/constants.go | 7 ++ custom/cloudfront/distributions/dao.go | 2 +- custom/cloudtrail/events/constants.go | 7 ++ custom/cloudtrail/events/dao.go | 2 +- custom/cloudtrail/trails/constants.go | 7 ++ custom/cloudtrail/trails/dao.go | 2 +- custom/cloudwatch/alarms/constants.go | 7 ++ custom/cloudwatch/alarms/dao.go | 2 +- custom/cloudwatch/log-groups/constants.go | 7 ++ custom/cloudwatch/log-groups/dao.go | 2 +- custom/cloudwatch/log-streams/constants.go | 7 ++ custom/cloudwatch/log-streams/dao.go | 2 +- custom/codebuild/builds/constants.go | 7 ++ custom/codebuild/builds/dao.go | 2 +- custom/codebuild/projects/constants.go | 7 ++ custom/codebuild/projects/dao.go | 2 +- custom/codepipeline/executions/constants.go | 7 ++ custom/codepipeline/executions/dao.go | 2 +- custom/codepipeline/pipelines/constants.go | 7 ++ custom/codepipeline/pipelines/dao.go | 2 +- custom/cognito-idp/user-pools/constants.go | 7 ++ custom/cognito-idp/user-pools/dao.go | 2 +- custom/cognito-idp/users/constants.go | 7 ++ custom/cognito-idp/users/dao.go | 2 +- .../recommendations/constants.go | 7 ++ .../compute-optimizer/recommendations/dao.go | 2 +- custom/compute-optimizer/summary/constants.go | 7 ++ custom/compute-optimizer/summary/dao.go | 2 +- custom/configservice/rules/constants.go | 7 ++ custom/configservice/rules/dao.go | 2 +- custom/datasync/locations/constants.go | 7 ++ custom/datasync/locations/dao.go | 2 +- custom/datasync/task-executions/constants.go | 7 ++ custom/datasync/task-executions/dao.go | 2 +- custom/datasync/tasks/constants.go | 7 ++ custom/datasync/tasks/dao.go | 2 +- custom/detective/graphs/constants.go | 7 ++ custom/detective/graphs/dao.go | 2 +- custom/detective/investigations/constants.go | 7 ++ custom/detective/investigations/dao.go | 2 +- custom/directconnect/connections/constants.go | 7 ++ custom/directconnect/connections/dao.go | 2 +- .../virtual-interfaces/constants.go | 7 ++ .../directconnect/virtual-interfaces/dao.go | 2 +- custom/dynamodb/tables/constants.go | 7 ++ custom/dynamodb/tables/dao.go | 2 +- custom/ec2/capacity-reservations/constants.go | 7 ++ custom/ec2/capacity-reservations/dao.go | 2 +- custom/ec2/elastic-ips/constants.go | 7 ++ custom/ec2/elastic-ips/dao.go | 2 +- custom/ec2/images/constants.go | 7 ++ custom/ec2/images/dao.go | 2 +- custom/ec2/instances/constants.go | 7 ++ custom/ec2/instances/dao.go | 2 +- custom/ec2/key-pairs/constants.go | 7 ++ custom/ec2/key-pairs/dao.go | 2 +- custom/ec2/launch-templates/constants.go | 7 ++ custom/ec2/launch-templates/dao.go | 2 +- custom/ec2/security-groups/constants.go | 7 ++ custom/ec2/security-groups/dao.go | 2 +- custom/ec2/snapshots/constants.go | 7 ++ custom/ec2/snapshots/dao.go | 2 +- custom/ec2/volumes/constants.go | 7 ++ custom/ec2/volumes/dao.go | 2 +- custom/ecr/images/constants.go | 7 ++ custom/ecr/images/dao.go | 2 +- custom/ecr/repositories/constants.go | 7 ++ custom/ecr/repositories/dao.go | 2 +- custom/ecs/clusters/constants.go | 7 ++ custom/ecs/clusters/dao.go | 2 +- custom/ecs/services/constants.go | 7 ++ custom/ecs/services/dao.go | 2 +- custom/ecs/tasks/constants.go | 7 ++ custom/ecs/tasks/dao.go | 2 +- custom/elasticache/clusters/constants.go | 7 ++ custom/elasticache/clusters/dao.go | 2 +- custom/elbv2/load-balancers/constants.go | 7 ++ custom/elbv2/load-balancers/dao.go | 2 +- custom/elbv2/target-groups/constants.go | 7 ++ custom/elbv2/target-groups/dao.go | 2 +- custom/elbv2/targets/constants.go | 7 ++ custom/elbv2/targets/dao.go | 2 +- custom/emr/clusters/constants.go | 7 ++ custom/emr/clusters/dao.go | 2 +- custom/emr/steps/constants.go | 7 ++ custom/emr/steps/dao.go | 2 +- custom/events/buses/constants.go | 7 ++ custom/events/buses/dao.go | 2 +- custom/events/rules/constants.go | 7 ++ custom/events/rules/dao.go | 2 +- custom/fms/policies/constants.go | 7 ++ custom/fms/policies/dao.go | 2 +- custom/glue/crawlers/constants.go | 7 ++ custom/glue/crawlers/dao.go | 2 +- custom/glue/databases/constants.go | 7 ++ custom/glue/databases/dao.go | 2 +- custom/glue/job-runs/constants.go | 7 ++ custom/glue/job-runs/dao.go | 2 +- custom/glue/jobs/constants.go | 7 ++ custom/glue/jobs/dao.go | 2 +- custom/glue/tables/constants.go | 7 ++ custom/glue/tables/dao.go | 2 +- custom/guardduty/detectors/constants.go | 7 ++ custom/guardduty/detectors/dao.go | 2 +- custom/guardduty/findings/constants.go | 7 ++ custom/guardduty/findings/dao.go | 2 +- custom/health/events/constants.go | 7 ++ custom/health/events/dao.go | 2 +- custom/iam/groups/constants.go | 7 ++ custom/iam/groups/dao.go | 2 +- custom/iam/instance-profiles/constants.go | 7 ++ custom/iam/instance-profiles/dao.go | 2 +- custom/iam/policies/constants.go | 7 ++ custom/iam/policies/dao.go | 2 +- custom/iam/roles/constants.go | 7 ++ custom/iam/roles/dao.go | 2 +- custom/iam/users/constants.go | 7 ++ custom/iam/users/dao.go | 2 +- custom/inspector2/findings/constants.go | 7 ++ custom/inspector2/findings/dao.go | 2 +- custom/kinesis/streams/constants.go | 7 ++ custom/kinesis/streams/dao.go | 2 +- custom/kms/keys/constants.go | 7 ++ custom/kms/keys/dao.go | 2 +- custom/lambda/functions/constants.go | 7 ++ custom/lambda/functions/dao.go | 2 +- .../configurations/constants.go | 7 ++ custom/license-manager/configurations/dao.go | 2 +- custom/license-manager/grants/constants.go | 7 ++ custom/license-manager/grants/dao.go | 2 +- custom/license-manager/licenses/constants.go | 7 ++ custom/license-manager/licenses/dao.go | 2 +- custom/macie2/buckets/constants.go | 7 ++ custom/macie2/buckets/dao.go | 2 +- .../macie2/classification-jobs/constants.go | 7 ++ custom/macie2/classification-jobs/dao.go | 2 +- custom/macie2/findings/constants.go | 7 ++ custom/macie2/findings/dao.go | 2 +- .../firewall-policies/constants.go | 7 ++ .../network-firewall/firewall-policies/dao.go | 2 +- .../network-firewall/firewalls/constants.go | 7 ++ custom/network-firewall/firewalls/dao.go | 2 +- .../network-firewall/rule-groups/constants.go | 7 ++ custom/network-firewall/rule-groups/dao.go | 2 +- custom/opensearch/domains/constants.go | 7 ++ custom/opensearch/domains/dao.go | 2 +- custom/organizations/accounts/constants.go | 7 ++ custom/organizations/accounts/dao.go | 2 +- custom/organizations/ous/constants.go | 7 ++ custom/organizations/ous/dao.go | 2 +- custom/organizations/policies/constants.go | 7 ++ custom/organizations/policies/dao.go | 2 +- custom/organizations/roots/constants.go | 7 ++ custom/organizations/roots/dao.go | 2 +- custom/rds/instances/constants.go | 7 ++ custom/rds/instances/dao.go | 2 +- custom/rds/snapshots/constants.go | 7 ++ custom/rds/snapshots/dao.go | 2 +- custom/redshift/clusters/constants.go | 7 ++ custom/redshift/clusters/dao.go | 2 +- custom/redshift/snapshots/constants.go | 7 ++ custom/redshift/snapshots/dao.go | 2 +- custom/risp/reserved-instances/constants.go | 7 ++ custom/risp/reserved-instances/dao.go | 2 +- custom/risp/savings-plans/constants.go | 7 ++ custom/risp/savings-plans/dao.go | 2 +- custom/route53/hosted-zones/constants.go | 7 ++ custom/route53/hosted-zones/dao.go | 2 +- custom/route53/record-sets/constants.go | 7 ++ custom/route53/record-sets/dao.go | 2 +- custom/s3/buckets/constants.go | 7 ++ custom/s3/buckets/dao.go | 2 +- custom/s3vectors/buckets/constants.go | 7 ++ custom/s3vectors/buckets/dao.go | 2 +- custom/s3vectors/indexes/constants.go | 7 ++ custom/s3vectors/indexes/dao.go | 2 +- custom/sagemaker/endpoints/constants.go | 7 ++ custom/sagemaker/endpoints/dao.go | 2 +- custom/sagemaker/models/constants.go | 7 ++ custom/sagemaker/models/dao.go | 2 +- custom/sagemaker/notebooks/constants.go | 7 ++ custom/sagemaker/notebooks/dao.go | 2 +- custom/sagemaker/training-jobs/constants.go | 7 ++ custom/sagemaker/training-jobs/dao.go | 2 +- custom/secretsmanager/secrets/constants.go | 7 ++ custom/secretsmanager/secrets/dao.go | 2 +- custom/securityhub/findings/constants.go | 7 ++ custom/securityhub/findings/dao.go | 2 +- custom/service-quotas/quotas/constants.go | 7 ++ custom/service-quotas/quotas/dao.go | 2 +- custom/service-quotas/services/constants.go | 7 ++ custom/service-quotas/services/dao.go | 2 +- custom/sns/subscriptions/constants.go | 7 ++ custom/sns/subscriptions/dao.go | 2 +- custom/sns/topics/constants.go | 7 ++ custom/sns/topics/dao.go | 2 +- custom/sqs/queues/constants.go | 7 ++ custom/sqs/queues/dao.go | 2 +- custom/ssm/parameters/constants.go | 7 ++ custom/ssm/parameters/dao.go | 2 +- custom/stepfunctions/executions/constants.go | 7 ++ custom/stepfunctions/executions/dao.go | 2 +- .../stepfunctions/state-machines/constants.go | 7 ++ custom/stepfunctions/state-machines/dao.go | 2 +- custom/transcribe/jobs/constants.go | 7 ++ custom/transcribe/jobs/dao.go | 2 +- custom/transfer/servers/constants.go | 7 ++ custom/transfer/servers/dao.go | 2 +- custom/transfer/users/constants.go | 7 ++ custom/transfer/users/dao.go | 2 +- .../recommendations/constants.go | 7 ++ custom/trustedadvisor/recommendations/dao.go | 2 +- custom/vpc/endpoints/constants.go | 7 ++ custom/vpc/endpoints/dao.go | 2 +- custom/vpc/internet-gateways/constants.go | 7 ++ custom/vpc/internet-gateways/dao.go | 2 +- custom/vpc/nat-gateways/constants.go | 7 ++ custom/vpc/nat-gateways/dao.go | 2 +- custom/vpc/route-tables/constants.go | 7 ++ custom/vpc/route-tables/dao.go | 2 +- custom/vpc/subnets/constants.go | 7 ++ custom/vpc/subnets/dao.go | 2 +- custom/vpc/tgw-attachments/constants.go | 7 ++ custom/vpc/tgw-attachments/dao.go | 2 +- custom/vpc/transit-gateways/constants.go | 7 ++ custom/vpc/transit-gateways/dao.go | 2 +- custom/vpc/vpcs/constants.go | 7 ++ custom/vpc/vpcs/dao.go | 2 +- custom/wafv2/web-acls/constants.go | 7 ++ custom/wafv2/web-acls/dao.go | 2 +- custom/xray/groups/constants.go | 7 ++ custom/xray/groups/dao.go | 2 +- internal/genimports/genimports.go | 69 +++++++++++++++++++ scripts/gen-imports/main.go | 23 +++++++ 328 files changed, 1396 insertions(+), 163 deletions(-) create mode 100644 custom/accessanalyzer/analyzers/constants.go create mode 100644 custom/accessanalyzer/findings/constants.go create mode 100644 custom/acm/certificates/constants.go create mode 100644 custom/apigateway/http-apis/constants.go create mode 100644 custom/apigateway/rest-apis/constants.go create mode 100644 custom/apigateway/stages-v2/constants.go create mode 100644 custom/apigateway/stages/constants.go create mode 100644 custom/apprunner/operations/constants.go create mode 100644 custom/apprunner/services/constants.go create mode 100644 custom/appsync/data-sources/constants.go create mode 100644 custom/appsync/graphql-apis/constants.go create mode 100644 custom/athena/query-executions/constants.go create mode 100644 custom/athena/workgroups/constants.go create mode 100644 custom/autoscaling/activities/constants.go create mode 100644 custom/autoscaling/groups/constants.go create mode 100644 custom/backup/backup-jobs/constants.go create mode 100644 custom/backup/copy-jobs/constants.go create mode 100644 custom/backup/plans/constants.go create mode 100644 custom/backup/protected-resources/constants.go create mode 100644 custom/backup/recovery-points/constants.go create mode 100644 custom/backup/restore-jobs/constants.go create mode 100644 custom/backup/selections/constants.go create mode 100644 custom/backup/vaults/constants.go create mode 100644 custom/batch/compute-environments/constants.go create mode 100644 custom/batch/job-definitions/constants.go create mode 100644 custom/batch/job-queues/constants.go create mode 100644 custom/batch/jobs/constants.go create mode 100644 custom/bedrock-agent/agents/constants.go create mode 100644 custom/bedrock-agent/data-sources/constants.go create mode 100644 custom/bedrock-agent/flows/constants.go create mode 100644 custom/bedrock-agent/knowledge-bases/constants.go create mode 100644 custom/bedrock-agent/prompts/constants.go create mode 100644 custom/bedrock-agentcore/endpoints/constants.go create mode 100644 custom/bedrock-agentcore/runtimes/constants.go create mode 100644 custom/bedrock-agentcore/versions/constants.go create mode 100644 custom/bedrock/foundation-models/constants.go create mode 100644 custom/bedrock/guardrails/constants.go create mode 100644 custom/bedrock/inference-profiles/constants.go create mode 100644 custom/budgets/budgets/constants.go create mode 100644 custom/budgets/notifications/constants.go create mode 100644 custom/ce/anomalies/constants.go create mode 100644 custom/ce/costs/constants.go create mode 100644 custom/ce/monitors/constants.go create mode 100644 custom/cfn/events/constants.go create mode 100644 custom/cfn/outputs/constants.go create mode 100644 custom/cfn/resources/constants.go create mode 100644 custom/cfn/stacks/constants.go create mode 100644 custom/cloudfront/distributions/constants.go create mode 100644 custom/cloudtrail/events/constants.go create mode 100644 custom/cloudtrail/trails/constants.go create mode 100644 custom/cloudwatch/alarms/constants.go create mode 100644 custom/cloudwatch/log-groups/constants.go create mode 100644 custom/cloudwatch/log-streams/constants.go create mode 100644 custom/codebuild/builds/constants.go create mode 100644 custom/codebuild/projects/constants.go create mode 100644 custom/codepipeline/executions/constants.go create mode 100644 custom/codepipeline/pipelines/constants.go create mode 100644 custom/cognito-idp/user-pools/constants.go create mode 100644 custom/cognito-idp/users/constants.go create mode 100644 custom/compute-optimizer/recommendations/constants.go create mode 100644 custom/compute-optimizer/summary/constants.go create mode 100644 custom/configservice/rules/constants.go create mode 100644 custom/datasync/locations/constants.go create mode 100644 custom/datasync/task-executions/constants.go create mode 100644 custom/datasync/tasks/constants.go create mode 100644 custom/detective/graphs/constants.go create mode 100644 custom/detective/investigations/constants.go create mode 100644 custom/directconnect/connections/constants.go create mode 100644 custom/directconnect/virtual-interfaces/constants.go create mode 100644 custom/dynamodb/tables/constants.go create mode 100644 custom/ec2/capacity-reservations/constants.go create mode 100644 custom/ec2/elastic-ips/constants.go create mode 100644 custom/ec2/images/constants.go create mode 100644 custom/ec2/instances/constants.go create mode 100644 custom/ec2/key-pairs/constants.go create mode 100644 custom/ec2/launch-templates/constants.go create mode 100644 custom/ec2/security-groups/constants.go create mode 100644 custom/ec2/snapshots/constants.go create mode 100644 custom/ec2/volumes/constants.go create mode 100644 custom/ecr/images/constants.go create mode 100644 custom/ecr/repositories/constants.go create mode 100644 custom/ecs/clusters/constants.go create mode 100644 custom/ecs/services/constants.go create mode 100644 custom/ecs/tasks/constants.go create mode 100644 custom/elasticache/clusters/constants.go create mode 100644 custom/elbv2/load-balancers/constants.go create mode 100644 custom/elbv2/target-groups/constants.go create mode 100644 custom/elbv2/targets/constants.go create mode 100644 custom/emr/clusters/constants.go create mode 100644 custom/emr/steps/constants.go create mode 100644 custom/events/buses/constants.go create mode 100644 custom/events/rules/constants.go create mode 100644 custom/fms/policies/constants.go create mode 100644 custom/glue/crawlers/constants.go create mode 100644 custom/glue/databases/constants.go create mode 100644 custom/glue/job-runs/constants.go create mode 100644 custom/glue/jobs/constants.go create mode 100644 custom/glue/tables/constants.go create mode 100644 custom/guardduty/detectors/constants.go create mode 100644 custom/guardduty/findings/constants.go create mode 100644 custom/health/events/constants.go create mode 100644 custom/iam/groups/constants.go create mode 100644 custom/iam/instance-profiles/constants.go create mode 100644 custom/iam/policies/constants.go create mode 100644 custom/iam/roles/constants.go create mode 100644 custom/iam/users/constants.go create mode 100644 custom/inspector2/findings/constants.go create mode 100644 custom/kinesis/streams/constants.go create mode 100644 custom/kms/keys/constants.go create mode 100644 custom/lambda/functions/constants.go create mode 100644 custom/license-manager/configurations/constants.go create mode 100644 custom/license-manager/grants/constants.go create mode 100644 custom/license-manager/licenses/constants.go create mode 100644 custom/macie2/buckets/constants.go create mode 100644 custom/macie2/classification-jobs/constants.go create mode 100644 custom/macie2/findings/constants.go create mode 100644 custom/network-firewall/firewall-policies/constants.go create mode 100644 custom/network-firewall/firewalls/constants.go create mode 100644 custom/network-firewall/rule-groups/constants.go create mode 100644 custom/opensearch/domains/constants.go create mode 100644 custom/organizations/accounts/constants.go create mode 100644 custom/organizations/ous/constants.go create mode 100644 custom/organizations/policies/constants.go create mode 100644 custom/organizations/roots/constants.go create mode 100644 custom/rds/instances/constants.go create mode 100644 custom/rds/snapshots/constants.go create mode 100644 custom/redshift/clusters/constants.go create mode 100644 custom/redshift/snapshots/constants.go create mode 100644 custom/risp/reserved-instances/constants.go create mode 100644 custom/risp/savings-plans/constants.go create mode 100644 custom/route53/hosted-zones/constants.go create mode 100644 custom/route53/record-sets/constants.go create mode 100644 custom/s3/buckets/constants.go create mode 100644 custom/s3vectors/buckets/constants.go create mode 100644 custom/s3vectors/indexes/constants.go create mode 100644 custom/sagemaker/endpoints/constants.go create mode 100644 custom/sagemaker/models/constants.go create mode 100644 custom/sagemaker/notebooks/constants.go create mode 100644 custom/sagemaker/training-jobs/constants.go create mode 100644 custom/secretsmanager/secrets/constants.go create mode 100644 custom/securityhub/findings/constants.go create mode 100644 custom/service-quotas/quotas/constants.go create mode 100644 custom/service-quotas/services/constants.go create mode 100644 custom/sns/subscriptions/constants.go create mode 100644 custom/sns/topics/constants.go create mode 100644 custom/sqs/queues/constants.go create mode 100644 custom/ssm/parameters/constants.go create mode 100644 custom/stepfunctions/executions/constants.go create mode 100644 custom/stepfunctions/state-machines/constants.go create mode 100644 custom/transcribe/jobs/constants.go create mode 100644 custom/transfer/servers/constants.go create mode 100644 custom/transfer/users/constants.go create mode 100644 custom/trustedadvisor/recommendations/constants.go create mode 100644 custom/vpc/endpoints/constants.go create mode 100644 custom/vpc/internet-gateways/constants.go create mode 100644 custom/vpc/nat-gateways/constants.go create mode 100644 custom/vpc/route-tables/constants.go create mode 100644 custom/vpc/subnets/constants.go create mode 100644 custom/vpc/tgw-attachments/constants.go create mode 100644 custom/vpc/transit-gateways/constants.go create mode 100644 custom/vpc/vpcs/constants.go create mode 100644 custom/wafv2/web-acls/constants.go create mode 100644 custom/xray/groups/constants.go diff --git a/custom/accessanalyzer/analyzers/constants.go b/custom/accessanalyzer/analyzers/constants.go new file mode 100644 index 00000000..d61f1712 --- /dev/null +++ b/custom/accessanalyzer/analyzers/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package analyzers + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "accessanalyzer/analyzers" diff --git a/custom/accessanalyzer/analyzers/dao.go b/custom/accessanalyzer/analyzers/dao.go index 733e1ddb..bf99861f 100644 --- a/custom/accessanalyzer/analyzers/dao.go +++ b/custom/accessanalyzer/analyzers/dao.go @@ -22,7 +22,7 @@ type AnalyzerDAO struct { func NewAnalyzerDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new accessanalyzer/analyzers dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AnalyzerDAO{ BaseDAO: dao.NewBaseDAO("accessanalyzer", "analyzers"), diff --git a/custom/accessanalyzer/findings/constants.go b/custom/accessanalyzer/findings/constants.go new file mode 100644 index 00000000..b37c0a28 --- /dev/null +++ b/custom/accessanalyzer/findings/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package findings + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "accessanalyzer/findings" diff --git a/custom/accessanalyzer/findings/dao.go b/custom/accessanalyzer/findings/dao.go index 5136556b..21c46a47 100644 --- a/custom/accessanalyzer/findings/dao.go +++ b/custom/accessanalyzer/findings/dao.go @@ -23,7 +23,7 @@ type FindingDAO struct { func NewFindingDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new accessanalyzer/findings dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FindingDAO{ BaseDAO: dao.NewBaseDAO("accessanalyzer", "findings"), diff --git a/custom/acm/certificates/constants.go b/custom/acm/certificates/constants.go new file mode 100644 index 00000000..1ca6d440 --- /dev/null +++ b/custom/acm/certificates/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package certificates + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "acm/certificates" diff --git a/custom/acm/certificates/dao.go b/custom/acm/certificates/dao.go index f54a6a38..e8beb16c 100644 --- a/custom/acm/certificates/dao.go +++ b/custom/acm/certificates/dao.go @@ -21,7 +21,7 @@ type CertificateDAO struct { func NewCertificateDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new acm/certificates dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &CertificateDAO{ BaseDAO: dao.NewBaseDAO("acm", "certificates"), diff --git a/custom/apigateway/http-apis/constants.go b/custom/apigateway/http-apis/constants.go new file mode 100644 index 00000000..397da321 --- /dev/null +++ b/custom/apigateway/http-apis/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package httpapis + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apigateway/http-apis" diff --git a/custom/apigateway/http-apis/dao.go b/custom/apigateway/http-apis/dao.go index beb275ea..9268d4a2 100644 --- a/custom/apigateway/http-apis/dao.go +++ b/custom/apigateway/http-apis/dao.go @@ -22,7 +22,7 @@ type HttpAPIDAO struct { func NewHttpAPIDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apigateway/http-apis dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &HttpAPIDAO{ BaseDAO: dao.NewBaseDAO("apigateway", "http-apis"), diff --git a/custom/apigateway/rest-apis/constants.go b/custom/apigateway/rest-apis/constants.go new file mode 100644 index 00000000..60e5c865 --- /dev/null +++ b/custom/apigateway/rest-apis/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package restapis + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apigateway/rest-apis" diff --git a/custom/apigateway/rest-apis/dao.go b/custom/apigateway/rest-apis/dao.go index 1aef9aa9..b211434a 100644 --- a/custom/apigateway/rest-apis/dao.go +++ b/custom/apigateway/rest-apis/dao.go @@ -22,7 +22,7 @@ type RestAPIDAO struct { func NewRestAPIDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apigateway/rest-apis dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RestAPIDAO{ BaseDAO: dao.NewBaseDAO("apigateway", "rest-apis"), diff --git a/custom/apigateway/stages-v2/constants.go b/custom/apigateway/stages-v2/constants.go new file mode 100644 index 00000000..c2e749dc --- /dev/null +++ b/custom/apigateway/stages-v2/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package stagesv2 + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apigateway/stages-v2" diff --git a/custom/apigateway/stages-v2/dao.go b/custom/apigateway/stages-v2/dao.go index 70d05b3c..faeaa1c0 100644 --- a/custom/apigateway/stages-v2/dao.go +++ b/custom/apigateway/stages-v2/dao.go @@ -23,7 +23,7 @@ type StageV2DAO struct { func NewStageV2DAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apigateway/stages-v2 dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StageV2DAO{ BaseDAO: dao.NewBaseDAO("apigateway", "stages-v2"), diff --git a/custom/apigateway/stages/constants.go b/custom/apigateway/stages/constants.go new file mode 100644 index 00000000..24485063 --- /dev/null +++ b/custom/apigateway/stages/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package stages + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apigateway/stages" diff --git a/custom/apigateway/stages/dao.go b/custom/apigateway/stages/dao.go index 402e3b39..a0534e1b 100644 --- a/custom/apigateway/stages/dao.go +++ b/custom/apigateway/stages/dao.go @@ -23,7 +23,7 @@ type StageDAO struct { func NewStageDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apigateway/stages dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StageDAO{ BaseDAO: dao.NewBaseDAO("apigateway", "stages"), diff --git a/custom/apprunner/operations/constants.go b/custom/apprunner/operations/constants.go new file mode 100644 index 00000000..81965d07 --- /dev/null +++ b/custom/apprunner/operations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package operations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apprunner/operations" diff --git a/custom/apprunner/operations/dao.go b/custom/apprunner/operations/dao.go index 3b6b11be..977bee5c 100644 --- a/custom/apprunner/operations/dao.go +++ b/custom/apprunner/operations/dao.go @@ -23,7 +23,7 @@ type OperationDAO struct { func NewOperationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apprunner/operations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &OperationDAO{ BaseDAO: dao.NewBaseDAO("apprunner", "operations"), diff --git a/custom/apprunner/services/constants.go b/custom/apprunner/services/constants.go new file mode 100644 index 00000000..06ffba3b --- /dev/null +++ b/custom/apprunner/services/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package services + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "apprunner/services" diff --git a/custom/apprunner/services/dao.go b/custom/apprunner/services/dao.go index 5edefcaa..07580134 100644 --- a/custom/apprunner/services/dao.go +++ b/custom/apprunner/services/dao.go @@ -22,7 +22,7 @@ type ServiceDAO struct { func NewServiceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new apprunner/services dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ServiceDAO{ BaseDAO: dao.NewBaseDAO("apprunner", "services"), diff --git a/custom/appsync/data-sources/constants.go b/custom/appsync/data-sources/constants.go new file mode 100644 index 00000000..c447208d --- /dev/null +++ b/custom/appsync/data-sources/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package datasources + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "appsync/data-sources" diff --git a/custom/appsync/data-sources/dao.go b/custom/appsync/data-sources/dao.go index cdc5e0dc..066e0f0f 100644 --- a/custom/appsync/data-sources/dao.go +++ b/custom/appsync/data-sources/dao.go @@ -22,7 +22,7 @@ type DataSourceDAO struct { func NewDataSourceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new appsync/data-sources dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DataSourceDAO{ BaseDAO: dao.NewBaseDAO("appsync", "data-sources"), diff --git a/custom/appsync/graphql-apis/constants.go b/custom/appsync/graphql-apis/constants.go new file mode 100644 index 00000000..be591893 --- /dev/null +++ b/custom/appsync/graphql-apis/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package graphqlapis + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "appsync/graphql-apis" diff --git a/custom/appsync/graphql-apis/dao.go b/custom/appsync/graphql-apis/dao.go index 90554049..ce1ae147 100644 --- a/custom/appsync/graphql-apis/dao.go +++ b/custom/appsync/graphql-apis/dao.go @@ -21,7 +21,7 @@ type GraphQLApiDAO struct { func NewGraphQLApiDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new appsync/graphql-apis dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GraphQLApiDAO{ BaseDAO: dao.NewBaseDAO("appsync", "graphql-apis"), diff --git a/custom/athena/query-executions/constants.go b/custom/athena/query-executions/constants.go new file mode 100644 index 00000000..7a64c89b --- /dev/null +++ b/custom/athena/query-executions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package queryexecutions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "athena/query-executions" diff --git a/custom/athena/query-executions/dao.go b/custom/athena/query-executions/dao.go index 6befaafd..553c98ec 100644 --- a/custom/athena/query-executions/dao.go +++ b/custom/athena/query-executions/dao.go @@ -23,7 +23,7 @@ type QueryExecutionDAO struct { func NewQueryExecutionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new athena/query-executions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &QueryExecutionDAO{ BaseDAO: dao.NewBaseDAO("athena", "query-executions"), diff --git a/custom/athena/workgroups/constants.go b/custom/athena/workgroups/constants.go new file mode 100644 index 00000000..3519c2c1 --- /dev/null +++ b/custom/athena/workgroups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package workgroups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "athena/workgroups" diff --git a/custom/athena/workgroups/dao.go b/custom/athena/workgroups/dao.go index 2d75e0b1..e56fea61 100644 --- a/custom/athena/workgroups/dao.go +++ b/custom/athena/workgroups/dao.go @@ -22,7 +22,7 @@ type WorkgroupDAO struct { func NewWorkgroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new athena/workgroups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &WorkgroupDAO{ BaseDAO: dao.NewBaseDAO("athena", "workgroups"), diff --git a/custom/autoscaling/activities/constants.go b/custom/autoscaling/activities/constants.go new file mode 100644 index 00000000..9e00e508 --- /dev/null +++ b/custom/autoscaling/activities/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package activities + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "autoscaling/activities" diff --git a/custom/autoscaling/activities/dao.go b/custom/autoscaling/activities/dao.go index 32a8be28..ace52548 100644 --- a/custom/autoscaling/activities/dao.go +++ b/custom/autoscaling/activities/dao.go @@ -23,7 +23,7 @@ type ActivityDAO struct { func NewActivityDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new autoscaling/activities dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ActivityDAO{ BaseDAO: dao.NewBaseDAO("autoscaling", "activities"), diff --git a/custom/autoscaling/groups/constants.go b/custom/autoscaling/groups/constants.go new file mode 100644 index 00000000..b4811dca --- /dev/null +++ b/custom/autoscaling/groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package groups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "autoscaling/groups" diff --git a/custom/autoscaling/groups/dao.go b/custom/autoscaling/groups/dao.go index 79076a36..2cc15bb5 100644 --- a/custom/autoscaling/groups/dao.go +++ b/custom/autoscaling/groups/dao.go @@ -23,7 +23,7 @@ type AutoScalingGroupDAO struct { func NewAutoScalingGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new autoscaling/groups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AutoScalingGroupDAO{ BaseDAO: dao.NewBaseDAO("autoscaling", "groups"), diff --git a/custom/backup/backup-jobs/constants.go b/custom/backup/backup-jobs/constants.go new file mode 100644 index 00000000..c84ac5eb --- /dev/null +++ b/custom/backup/backup-jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package backupjobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/backup-jobs" diff --git a/custom/backup/backup-jobs/dao.go b/custom/backup/backup-jobs/dao.go index 967a9155..e2c2c5b3 100644 --- a/custom/backup/backup-jobs/dao.go +++ b/custom/backup/backup-jobs/dao.go @@ -23,7 +23,7 @@ type BackupJobDAO struct { func NewBackupJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/backup-jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BackupJobDAO{ BaseDAO: dao.NewBaseDAO("backup", "backup-jobs"), diff --git a/custom/backup/copy-jobs/constants.go b/custom/backup/copy-jobs/constants.go new file mode 100644 index 00000000..1a35af7a --- /dev/null +++ b/custom/backup/copy-jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package copyjobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/copy-jobs" diff --git a/custom/backup/copy-jobs/dao.go b/custom/backup/copy-jobs/dao.go index 6bce7309..87b31811 100644 --- a/custom/backup/copy-jobs/dao.go +++ b/custom/backup/copy-jobs/dao.go @@ -24,7 +24,7 @@ type CopyJobDAO struct { func NewCopyJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/copy-jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &CopyJobDAO{ BaseDAO: dao.NewBaseDAO("backup", "copy-jobs"), diff --git a/custom/backup/plans/constants.go b/custom/backup/plans/constants.go new file mode 100644 index 00000000..11a3038c --- /dev/null +++ b/custom/backup/plans/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package plans + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/plans" diff --git a/custom/backup/plans/dao.go b/custom/backup/plans/dao.go index 96a4bf03..4b897898 100644 --- a/custom/backup/plans/dao.go +++ b/custom/backup/plans/dao.go @@ -22,7 +22,7 @@ type BackupPlanDAO struct { func NewBackupPlanDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/plans dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BackupPlanDAO{ BaseDAO: dao.NewBaseDAO("backup", "plans"), diff --git a/custom/backup/protected-resources/constants.go b/custom/backup/protected-resources/constants.go new file mode 100644 index 00000000..4fcbcd77 --- /dev/null +++ b/custom/backup/protected-resources/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package protectedresources + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/protected-resources" diff --git a/custom/backup/protected-resources/dao.go b/custom/backup/protected-resources/dao.go index 696b406d..8c536814 100644 --- a/custom/backup/protected-resources/dao.go +++ b/custom/backup/protected-resources/dao.go @@ -23,7 +23,7 @@ type ProtectedResourceDAO struct { func NewProtectedResourceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/protected-resources dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ProtectedResourceDAO{ BaseDAO: dao.NewBaseDAO("backup", "protected-resources"), diff --git a/custom/backup/recovery-points/constants.go b/custom/backup/recovery-points/constants.go new file mode 100644 index 00000000..36078f99 --- /dev/null +++ b/custom/backup/recovery-points/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package recoverypoints + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/recovery-points" diff --git a/custom/backup/recovery-points/dao.go b/custom/backup/recovery-points/dao.go index 9cf71edf..f0c453bf 100644 --- a/custom/backup/recovery-points/dao.go +++ b/custom/backup/recovery-points/dao.go @@ -24,7 +24,7 @@ type RecoveryPointDAO struct { func NewRecoveryPointDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/recovery-points dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RecoveryPointDAO{ BaseDAO: dao.NewBaseDAO("backup", "recovery-points"), diff --git a/custom/backup/restore-jobs/constants.go b/custom/backup/restore-jobs/constants.go new file mode 100644 index 00000000..a11b32b9 --- /dev/null +++ b/custom/backup/restore-jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package restorejobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/restore-jobs" diff --git a/custom/backup/restore-jobs/dao.go b/custom/backup/restore-jobs/dao.go index 50e76e7e..9941e6d6 100644 --- a/custom/backup/restore-jobs/dao.go +++ b/custom/backup/restore-jobs/dao.go @@ -24,7 +24,7 @@ type RestoreJobDAO struct { func NewRestoreJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/restore-jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RestoreJobDAO{ BaseDAO: dao.NewBaseDAO("backup", "restore-jobs"), diff --git a/custom/backup/selections/constants.go b/custom/backup/selections/constants.go new file mode 100644 index 00000000..4e75b286 --- /dev/null +++ b/custom/backup/selections/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package selections + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/selections" diff --git a/custom/backup/selections/dao.go b/custom/backup/selections/dao.go index 42cb40b6..35e35304 100644 --- a/custom/backup/selections/dao.go +++ b/custom/backup/selections/dao.go @@ -22,7 +22,7 @@ type SelectionDAO struct { func NewSelectionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/selections dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SelectionDAO{ BaseDAO: dao.NewBaseDAO("backup", "selections"), diff --git a/custom/backup/vaults/constants.go b/custom/backup/vaults/constants.go new file mode 100644 index 00000000..03db4ca1 --- /dev/null +++ b/custom/backup/vaults/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package vaults + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "backup/vaults" diff --git a/custom/backup/vaults/dao.go b/custom/backup/vaults/dao.go index 80d1655a..bdbf4dfb 100644 --- a/custom/backup/vaults/dao.go +++ b/custom/backup/vaults/dao.go @@ -22,7 +22,7 @@ type VaultDAO struct { func NewVaultDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new backup/vaults dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VaultDAO{ BaseDAO: dao.NewBaseDAO("backup", "vaults"), diff --git a/custom/batch/compute-environments/constants.go b/custom/batch/compute-environments/constants.go new file mode 100644 index 00000000..79abc7b1 --- /dev/null +++ b/custom/batch/compute-environments/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package computeenvironments + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "batch/compute-environments" diff --git a/custom/batch/compute-environments/dao.go b/custom/batch/compute-environments/dao.go index 5c72b40b..6fa58dc5 100644 --- a/custom/batch/compute-environments/dao.go +++ b/custom/batch/compute-environments/dao.go @@ -22,7 +22,7 @@ type ComputeEnvironmentDAO struct { func NewComputeEnvironmentDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new batch/compute-environments dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ComputeEnvironmentDAO{ BaseDAO: dao.NewBaseDAO("batch", "compute-environments"), diff --git a/custom/batch/job-definitions/constants.go b/custom/batch/job-definitions/constants.go new file mode 100644 index 00000000..945aabdf --- /dev/null +++ b/custom/batch/job-definitions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobdefinitions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "batch/job-definitions" diff --git a/custom/batch/job-definitions/dao.go b/custom/batch/job-definitions/dao.go index a09f9f6d..4428e803 100644 --- a/custom/batch/job-definitions/dao.go +++ b/custom/batch/job-definitions/dao.go @@ -23,7 +23,7 @@ type JobDefinitionDAO struct { func NewJobDefinitionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new batch/job-definitions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobDefinitionDAO{ BaseDAO: dao.NewBaseDAO("batch", "job-definitions"), diff --git a/custom/batch/job-queues/constants.go b/custom/batch/job-queues/constants.go new file mode 100644 index 00000000..99104fd2 --- /dev/null +++ b/custom/batch/job-queues/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobqueues + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "batch/job-queues" diff --git a/custom/batch/job-queues/dao.go b/custom/batch/job-queues/dao.go index 17cf0585..ee68fd73 100644 --- a/custom/batch/job-queues/dao.go +++ b/custom/batch/job-queues/dao.go @@ -22,7 +22,7 @@ type JobQueueDAO struct { func NewJobQueueDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new batch/job-queues dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobQueueDAO{ BaseDAO: dao.NewBaseDAO("batch", "job-queues"), diff --git a/custom/batch/jobs/constants.go b/custom/batch/jobs/constants.go new file mode 100644 index 00000000..9e257b75 --- /dev/null +++ b/custom/batch/jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "batch/jobs" diff --git a/custom/batch/jobs/dao.go b/custom/batch/jobs/dao.go index 233f96a6..0f196249 100644 --- a/custom/batch/jobs/dao.go +++ b/custom/batch/jobs/dao.go @@ -23,7 +23,7 @@ type JobDAO struct { func NewJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new batch/jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobDAO{ BaseDAO: dao.NewBaseDAO("batch", "jobs"), diff --git a/custom/bedrock-agent/agents/constants.go b/custom/bedrock-agent/agents/constants.go new file mode 100644 index 00000000..b913951c --- /dev/null +++ b/custom/bedrock-agent/agents/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package agents + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agent/agents" diff --git a/custom/bedrock-agent/agents/dao.go b/custom/bedrock-agent/agents/dao.go index b2826b58..2cf4df91 100644 --- a/custom/bedrock-agent/agents/dao.go +++ b/custom/bedrock-agent/agents/dao.go @@ -22,7 +22,7 @@ type AgentDAO struct { func NewAgentDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agent/agents dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AgentDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agent", "agents"), diff --git a/custom/bedrock-agent/data-sources/constants.go b/custom/bedrock-agent/data-sources/constants.go new file mode 100644 index 00000000..b459b2a1 --- /dev/null +++ b/custom/bedrock-agent/data-sources/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package datasources + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agent/data-sources" diff --git a/custom/bedrock-agent/data-sources/dao.go b/custom/bedrock-agent/data-sources/dao.go index 2b58edc3..fb78d3b8 100644 --- a/custom/bedrock-agent/data-sources/dao.go +++ b/custom/bedrock-agent/data-sources/dao.go @@ -24,7 +24,7 @@ type DataSourceDAO struct { func NewDataSourceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agent/data-sources dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DataSourceDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agent", "data-sources"), diff --git a/custom/bedrock-agent/flows/constants.go b/custom/bedrock-agent/flows/constants.go new file mode 100644 index 00000000..27f22c7c --- /dev/null +++ b/custom/bedrock-agent/flows/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package flows + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agent/flows" diff --git a/custom/bedrock-agent/flows/dao.go b/custom/bedrock-agent/flows/dao.go index 28917da6..a82056ee 100644 --- a/custom/bedrock-agent/flows/dao.go +++ b/custom/bedrock-agent/flows/dao.go @@ -22,7 +22,7 @@ type FlowDAO struct { func NewFlowDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agent/flows dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FlowDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agent", "flows"), diff --git a/custom/bedrock-agent/knowledge-bases/constants.go b/custom/bedrock-agent/knowledge-bases/constants.go new file mode 100644 index 00000000..5bb078db --- /dev/null +++ b/custom/bedrock-agent/knowledge-bases/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package knowledgebases + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agent/knowledge-bases" diff --git a/custom/bedrock-agent/knowledge-bases/dao.go b/custom/bedrock-agent/knowledge-bases/dao.go index 045d054f..f34d3796 100644 --- a/custom/bedrock-agent/knowledge-bases/dao.go +++ b/custom/bedrock-agent/knowledge-bases/dao.go @@ -22,7 +22,7 @@ type KnowledgeBaseDAO struct { func NewKnowledgeBaseDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agent/knowledge-bases dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &KnowledgeBaseDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agent", "knowledge-bases"), diff --git a/custom/bedrock-agent/prompts/constants.go b/custom/bedrock-agent/prompts/constants.go new file mode 100644 index 00000000..c3c8d78f --- /dev/null +++ b/custom/bedrock-agent/prompts/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package prompts + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agent/prompts" diff --git a/custom/bedrock-agent/prompts/dao.go b/custom/bedrock-agent/prompts/dao.go index f56bb034..f0b7fb92 100644 --- a/custom/bedrock-agent/prompts/dao.go +++ b/custom/bedrock-agent/prompts/dao.go @@ -22,7 +22,7 @@ type PromptDAO struct { func NewPromptDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agent/prompts dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &PromptDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agent", "prompts"), diff --git a/custom/bedrock-agentcore/endpoints/constants.go b/custom/bedrock-agentcore/endpoints/constants.go new file mode 100644 index 00000000..977ea650 --- /dev/null +++ b/custom/bedrock-agentcore/endpoints/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package endpoints + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agentcore/endpoints" diff --git a/custom/bedrock-agentcore/endpoints/dao.go b/custom/bedrock-agentcore/endpoints/dao.go index 87f86967..77ec159e 100644 --- a/custom/bedrock-agentcore/endpoints/dao.go +++ b/custom/bedrock-agentcore/endpoints/dao.go @@ -23,7 +23,7 @@ type EndpointDAO struct { func NewEndpointDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agentcore/endpoints dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &EndpointDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agentcore", "endpoints"), diff --git a/custom/bedrock-agentcore/runtimes/constants.go b/custom/bedrock-agentcore/runtimes/constants.go new file mode 100644 index 00000000..49db961c --- /dev/null +++ b/custom/bedrock-agentcore/runtimes/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package runtimes + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agentcore/runtimes" diff --git a/custom/bedrock-agentcore/runtimes/dao.go b/custom/bedrock-agentcore/runtimes/dao.go index befef066..9727ecdb 100644 --- a/custom/bedrock-agentcore/runtimes/dao.go +++ b/custom/bedrock-agentcore/runtimes/dao.go @@ -22,7 +22,7 @@ type RuntimeDAO struct { func NewRuntimeDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agentcore/runtimes dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RuntimeDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agentcore", "runtimes"), diff --git a/custom/bedrock-agentcore/versions/constants.go b/custom/bedrock-agentcore/versions/constants.go new file mode 100644 index 00000000..26d5411c --- /dev/null +++ b/custom/bedrock-agentcore/versions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package versions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock-agentcore/versions" diff --git a/custom/bedrock-agentcore/versions/dao.go b/custom/bedrock-agentcore/versions/dao.go index 86ad596a..a6193563 100644 --- a/custom/bedrock-agentcore/versions/dao.go +++ b/custom/bedrock-agentcore/versions/dao.go @@ -23,7 +23,7 @@ type VersionDAO struct { func NewVersionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock-agentcore/versions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VersionDAO{ BaseDAO: dao.NewBaseDAO("bedrock-agentcore", "versions"), diff --git a/custom/bedrock/foundation-models/constants.go b/custom/bedrock/foundation-models/constants.go new file mode 100644 index 00000000..eb1607e0 --- /dev/null +++ b/custom/bedrock/foundation-models/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package foundationmodels + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock/foundation-models" diff --git a/custom/bedrock/foundation-models/dao.go b/custom/bedrock/foundation-models/dao.go index ae408189..7a9931d4 100644 --- a/custom/bedrock/foundation-models/dao.go +++ b/custom/bedrock/foundation-models/dao.go @@ -23,7 +23,7 @@ type FoundationModelDAO struct { func NewFoundationModelDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock/foundationmodels dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FoundationModelDAO{ BaseDAO: dao.NewBaseDAO("bedrock", "foundation-models"), diff --git a/custom/bedrock/guardrails/constants.go b/custom/bedrock/guardrails/constants.go new file mode 100644 index 00000000..efe7829d --- /dev/null +++ b/custom/bedrock/guardrails/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package guardrails + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock/guardrails" diff --git a/custom/bedrock/guardrails/dao.go b/custom/bedrock/guardrails/dao.go index 2e5ebd51..9b1e54f5 100644 --- a/custom/bedrock/guardrails/dao.go +++ b/custom/bedrock/guardrails/dao.go @@ -22,7 +22,7 @@ type GuardrailDAO struct { func NewGuardrailDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock/guardrails dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GuardrailDAO{ BaseDAO: dao.NewBaseDAO("bedrock", "guardrails"), diff --git a/custom/bedrock/inference-profiles/constants.go b/custom/bedrock/inference-profiles/constants.go new file mode 100644 index 00000000..ed8daf7b --- /dev/null +++ b/custom/bedrock/inference-profiles/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package inferenceprofiles + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "bedrock/inference-profiles" diff --git a/custom/bedrock/inference-profiles/dao.go b/custom/bedrock/inference-profiles/dao.go index dc41813d..996cebbf 100644 --- a/custom/bedrock/inference-profiles/dao.go +++ b/custom/bedrock/inference-profiles/dao.go @@ -23,7 +23,7 @@ type InferenceProfileDAO struct { func NewInferenceProfileDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new bedrock/inferenceprofiles dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InferenceProfileDAO{ BaseDAO: dao.NewBaseDAO("bedrock", "inference-profiles"), diff --git a/custom/budgets/budgets/constants.go b/custom/budgets/budgets/constants.go new file mode 100644 index 00000000..a2a80661 --- /dev/null +++ b/custom/budgets/budgets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package budgets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "budgets/budgets" diff --git a/custom/budgets/budgets/dao.go b/custom/budgets/budgets/dao.go index 36fb8da0..6b1e60eb 100644 --- a/custom/budgets/budgets/dao.go +++ b/custom/budgets/budgets/dao.go @@ -24,7 +24,7 @@ type BudgetDAO struct { func NewBudgetDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new budgets/budgets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BudgetDAO{ BaseDAO: dao.NewBaseDAO("budgets", "budgets"), diff --git a/custom/budgets/notifications/constants.go b/custom/budgets/notifications/constants.go new file mode 100644 index 00000000..318f17f4 --- /dev/null +++ b/custom/budgets/notifications/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package notifications + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "budgets/notifications" diff --git a/custom/budgets/notifications/dao.go b/custom/budgets/notifications/dao.go index 817dc18f..4799f97a 100644 --- a/custom/budgets/notifications/dao.go +++ b/custom/budgets/notifications/dao.go @@ -24,7 +24,7 @@ type NotificationDAO struct { func NewNotificationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new budgets/notifications dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &NotificationDAO{ BaseDAO: dao.NewBaseDAO("budgets", "notifications"), diff --git a/custom/ce/anomalies/constants.go b/custom/ce/anomalies/constants.go new file mode 100644 index 00000000..a63864f0 --- /dev/null +++ b/custom/ce/anomalies/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package anomalies + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ce/anomalies" diff --git a/custom/ce/anomalies/dao.go b/custom/ce/anomalies/dao.go index b34bf63b..76edcff0 100644 --- a/custom/ce/anomalies/dao.go +++ b/custom/ce/anomalies/dao.go @@ -27,7 +27,7 @@ func NewAnomalyDAO(ctx context.Context) (dao.DAO, error) { // Cost Explorer API is only available in us-east-1 cfg, err := appaws.NewConfigWithRegion(ctx, appaws.CostExplorerRegion) if err != nil { - return nil, apperrors.Wrap(err, "new ce/anomalies dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AnomalyDAO{ BaseDAO: dao.NewBaseDAO("ce", "anomalies"), diff --git a/custom/ce/costs/constants.go b/custom/ce/costs/constants.go new file mode 100644 index 00000000..e91b12b1 --- /dev/null +++ b/custom/ce/costs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package costs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ce/costs" diff --git a/custom/ce/costs/dao.go b/custom/ce/costs/dao.go index b24065f1..420d7731 100644 --- a/custom/ce/costs/dao.go +++ b/custom/ce/costs/dao.go @@ -24,7 +24,7 @@ func NewCostDAO(ctx context.Context) (dao.DAO, error) { // Cost Explorer API is only available in us-east-1 cfg, err := appaws.NewConfigWithRegion(ctx, appaws.CostExplorerRegion) if err != nil { - return nil, apperrors.Wrap(err, "new ce/costs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &CostDAO{ BaseDAO: dao.NewBaseDAO("ce", "costs"), diff --git a/custom/ce/monitors/constants.go b/custom/ce/monitors/constants.go new file mode 100644 index 00000000..de019b94 --- /dev/null +++ b/custom/ce/monitors/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package monitors + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ce/monitors" diff --git a/custom/ce/monitors/dao.go b/custom/ce/monitors/dao.go index 6883099f..8b01fd95 100644 --- a/custom/ce/monitors/dao.go +++ b/custom/ce/monitors/dao.go @@ -23,7 +23,7 @@ func NewMonitorDAO(ctx context.Context) (dao.DAO, error) { // Cost Explorer API is only available in us-east-1 cfg, err := appaws.NewConfigWithRegion(ctx, appaws.CostExplorerRegion) if err != nil { - return nil, apperrors.Wrap(err, "new ce/monitors dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &MonitorDAO{ BaseDAO: dao.NewBaseDAO("ce", "monitors"), diff --git a/custom/cfn/events/constants.go b/custom/cfn/events/constants.go new file mode 100644 index 00000000..af357d54 --- /dev/null +++ b/custom/cfn/events/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package events + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cfn/events" diff --git a/custom/cfn/events/dao.go b/custom/cfn/events/dao.go index 2ebede92..f5078987 100644 --- a/custom/cfn/events/dao.go +++ b/custom/cfn/events/dao.go @@ -22,7 +22,7 @@ type EventDAO struct { func NewEventDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cfn/events dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &EventDAO{ BaseDAO: dao.NewBaseDAO("cloudformation", "events"), diff --git a/custom/cfn/outputs/constants.go b/custom/cfn/outputs/constants.go new file mode 100644 index 00000000..61bbd24d --- /dev/null +++ b/custom/cfn/outputs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package outputs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cfn/outputs" diff --git a/custom/cfn/outputs/dao.go b/custom/cfn/outputs/dao.go index 24dde6ba..0e315c3b 100644 --- a/custom/cfn/outputs/dao.go +++ b/custom/cfn/outputs/dao.go @@ -22,7 +22,7 @@ type OutputDAO struct { func NewOutputDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cfn/outputs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &OutputDAO{ BaseDAO: dao.NewBaseDAO("cloudformation", "outputs"), diff --git a/custom/cfn/resources/constants.go b/custom/cfn/resources/constants.go new file mode 100644 index 00000000..a663800e --- /dev/null +++ b/custom/cfn/resources/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package resources + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cfn/resources" diff --git a/custom/cfn/resources/dao.go b/custom/cfn/resources/dao.go index 4c0a752c..d4343f21 100644 --- a/custom/cfn/resources/dao.go +++ b/custom/cfn/resources/dao.go @@ -22,7 +22,7 @@ type ResourceDAO struct { func NewResourceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cfn/resources dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ResourceDAO{ BaseDAO: dao.NewBaseDAO("cloudformation", "resources"), diff --git a/custom/cfn/stacks/constants.go b/custom/cfn/stacks/constants.go new file mode 100644 index 00000000..7ccefbc3 --- /dev/null +++ b/custom/cfn/stacks/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package stacks + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cfn/stacks" diff --git a/custom/cfn/stacks/dao.go b/custom/cfn/stacks/dao.go index 4321cea9..9d822088 100644 --- a/custom/cfn/stacks/dao.go +++ b/custom/cfn/stacks/dao.go @@ -22,7 +22,7 @@ type StackDAO struct { func NewStackDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cfn/stacks dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StackDAO{ BaseDAO: dao.NewBaseDAO("cloudformation", "stacks"), diff --git a/custom/cloudfront/distributions/constants.go b/custom/cloudfront/distributions/constants.go new file mode 100644 index 00000000..d53bb699 --- /dev/null +++ b/custom/cloudfront/distributions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package distributions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudfront/distributions" diff --git a/custom/cloudfront/distributions/dao.go b/custom/cloudfront/distributions/dao.go index 7bf03ea8..9b20695f 100644 --- a/custom/cloudfront/distributions/dao.go +++ b/custom/cloudfront/distributions/dao.go @@ -22,7 +22,7 @@ type DistributionDAO struct { func NewDistributionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudfront/distributions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DistributionDAO{ BaseDAO: dao.NewBaseDAO("cloudfront", "distributions"), diff --git a/custom/cloudtrail/events/constants.go b/custom/cloudtrail/events/constants.go new file mode 100644 index 00000000..ee0fba9b --- /dev/null +++ b/custom/cloudtrail/events/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package events + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudtrail/events" diff --git a/custom/cloudtrail/events/dao.go b/custom/cloudtrail/events/dao.go index 4e4a6765..b3c0b3bb 100644 --- a/custom/cloudtrail/events/dao.go +++ b/custom/cloudtrail/events/dao.go @@ -26,7 +26,7 @@ type EventDAO struct { func NewEventDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudtrail/events dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &EventDAO{ BaseDAO: dao.NewBaseDAO("cloudtrail", "events"), diff --git a/custom/cloudtrail/trails/constants.go b/custom/cloudtrail/trails/constants.go new file mode 100644 index 00000000..1be4a06e --- /dev/null +++ b/custom/cloudtrail/trails/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package trails + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudtrail/trails" diff --git a/custom/cloudtrail/trails/dao.go b/custom/cloudtrail/trails/dao.go index 9f57c72d..c30b778b 100644 --- a/custom/cloudtrail/trails/dao.go +++ b/custom/cloudtrail/trails/dao.go @@ -22,7 +22,7 @@ type TrailDAO struct { func NewTrailDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudtrail/trails dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TrailDAO{ BaseDAO: dao.NewBaseDAO("cloudtrail", "trails"), diff --git a/custom/cloudwatch/alarms/constants.go b/custom/cloudwatch/alarms/constants.go new file mode 100644 index 00000000..76bc50b8 --- /dev/null +++ b/custom/cloudwatch/alarms/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package alarms + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudwatch/alarms" diff --git a/custom/cloudwatch/alarms/dao.go b/custom/cloudwatch/alarms/dao.go index e5ea32ab..cc943188 100644 --- a/custom/cloudwatch/alarms/dao.go +++ b/custom/cloudwatch/alarms/dao.go @@ -23,7 +23,7 @@ type AlarmDAO struct { func NewAlarmDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudwatch/alarms dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AlarmDAO{ BaseDAO: dao.NewBaseDAO("cloudwatch", "alarms"), diff --git a/custom/cloudwatch/log-groups/constants.go b/custom/cloudwatch/log-groups/constants.go new file mode 100644 index 00000000..b7e69d43 --- /dev/null +++ b/custom/cloudwatch/log-groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package loggroups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudwatch/log-groups" diff --git a/custom/cloudwatch/log-groups/dao.go b/custom/cloudwatch/log-groups/dao.go index 8c81ab48..b2c6b2f7 100644 --- a/custom/cloudwatch/log-groups/dao.go +++ b/custom/cloudwatch/log-groups/dao.go @@ -23,7 +23,7 @@ type LogGroupDAO struct { func NewLogGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudwatch/loggroups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LogGroupDAO{ BaseDAO: dao.NewBaseDAO("cloudwatch", "log-groups"), diff --git a/custom/cloudwatch/log-streams/constants.go b/custom/cloudwatch/log-streams/constants.go new file mode 100644 index 00000000..de7ae590 --- /dev/null +++ b/custom/cloudwatch/log-streams/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package logstreams + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cloudwatch/log-streams" diff --git a/custom/cloudwatch/log-streams/dao.go b/custom/cloudwatch/log-streams/dao.go index 4773675f..c632b867 100644 --- a/custom/cloudwatch/log-streams/dao.go +++ b/custom/cloudwatch/log-streams/dao.go @@ -22,7 +22,7 @@ type LogStreamDAO struct { func NewLogStreamDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cloudwatch/logstreams dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LogStreamDAO{ BaseDAO: dao.NewBaseDAO("cloudwatch", "log-streams"), diff --git a/custom/codebuild/builds/constants.go b/custom/codebuild/builds/constants.go new file mode 100644 index 00000000..98e60944 --- /dev/null +++ b/custom/codebuild/builds/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package builds + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "codebuild/builds" diff --git a/custom/codebuild/builds/dao.go b/custom/codebuild/builds/dao.go index c94289e2..3f5d7b15 100644 --- a/custom/codebuild/builds/dao.go +++ b/custom/codebuild/builds/dao.go @@ -23,7 +23,7 @@ type BuildDAO struct { func NewBuildDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new codebuild/builds dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BuildDAO{ BaseDAO: dao.NewBaseDAO("codebuild", "builds"), diff --git a/custom/codebuild/projects/constants.go b/custom/codebuild/projects/constants.go new file mode 100644 index 00000000..ff366560 --- /dev/null +++ b/custom/codebuild/projects/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package projects + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "codebuild/projects" diff --git a/custom/codebuild/projects/dao.go b/custom/codebuild/projects/dao.go index a6fe747b..0e648e1f 100644 --- a/custom/codebuild/projects/dao.go +++ b/custom/codebuild/projects/dao.go @@ -23,7 +23,7 @@ type ProjectDAO struct { func NewProjectDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new codebuild/projects dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ProjectDAO{ BaseDAO: dao.NewBaseDAO("codebuild", "projects"), diff --git a/custom/codepipeline/executions/constants.go b/custom/codepipeline/executions/constants.go new file mode 100644 index 00000000..fe34854a --- /dev/null +++ b/custom/codepipeline/executions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package executions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "codepipeline/executions" diff --git a/custom/codepipeline/executions/dao.go b/custom/codepipeline/executions/dao.go index 60a5acac..3e8d1435 100644 --- a/custom/codepipeline/executions/dao.go +++ b/custom/codepipeline/executions/dao.go @@ -23,7 +23,7 @@ type ExecutionDAO struct { func NewExecutionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new codepipeline/executions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ExecutionDAO{ BaseDAO: dao.NewBaseDAO("codepipeline", "executions"), diff --git a/custom/codepipeline/pipelines/constants.go b/custom/codepipeline/pipelines/constants.go new file mode 100644 index 00000000..8dba64ec --- /dev/null +++ b/custom/codepipeline/pipelines/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package pipelines + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "codepipeline/pipelines" diff --git a/custom/codepipeline/pipelines/dao.go b/custom/codepipeline/pipelines/dao.go index 4b235731..1404c263 100644 --- a/custom/codepipeline/pipelines/dao.go +++ b/custom/codepipeline/pipelines/dao.go @@ -23,7 +23,7 @@ type PipelineDAO struct { func NewPipelineDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new codepipeline/pipelines dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &PipelineDAO{ BaseDAO: dao.NewBaseDAO("codepipeline", "pipelines"), diff --git a/custom/cognito-idp/user-pools/constants.go b/custom/cognito-idp/user-pools/constants.go new file mode 100644 index 00000000..93a191f5 --- /dev/null +++ b/custom/cognito-idp/user-pools/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package userpools + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cognito-idp/user-pools" diff --git a/custom/cognito-idp/user-pools/dao.go b/custom/cognito-idp/user-pools/dao.go index 9bdba074..f76c04f6 100644 --- a/custom/cognito-idp/user-pools/dao.go +++ b/custom/cognito-idp/user-pools/dao.go @@ -21,7 +21,7 @@ type UserPoolDAO struct { func NewUserPoolDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cognito-idp/user-pools dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &UserPoolDAO{ BaseDAO: dao.NewBaseDAO("cognito-idp", "user-pools"), diff --git a/custom/cognito-idp/users/constants.go b/custom/cognito-idp/users/constants.go new file mode 100644 index 00000000..75dc8590 --- /dev/null +++ b/custom/cognito-idp/users/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package users + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "cognito-idp/users" diff --git a/custom/cognito-idp/users/dao.go b/custom/cognito-idp/users/dao.go index 654354ca..c98cc46d 100644 --- a/custom/cognito-idp/users/dao.go +++ b/custom/cognito-idp/users/dao.go @@ -23,7 +23,7 @@ type UserDAO struct { func NewUserDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new cognito-idp/users dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &UserDAO{ BaseDAO: dao.NewBaseDAO("cognito-idp", "users"), diff --git a/custom/compute-optimizer/recommendations/constants.go b/custom/compute-optimizer/recommendations/constants.go new file mode 100644 index 00000000..c9829660 --- /dev/null +++ b/custom/compute-optimizer/recommendations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package recommendations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "compute-optimizer/recommendations" diff --git a/custom/compute-optimizer/recommendations/dao.go b/custom/compute-optimizer/recommendations/dao.go index 2e610e00..efdb93e6 100644 --- a/custom/compute-optimizer/recommendations/dao.go +++ b/custom/compute-optimizer/recommendations/dao.go @@ -27,7 +27,7 @@ type RecommendationDAO struct { func NewRecommendationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new compute-optimizer/recommendations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RecommendationDAO{ BaseDAO: dao.NewBaseDAO("compute-optimizer", "recommendations"), diff --git a/custom/compute-optimizer/summary/constants.go b/custom/compute-optimizer/summary/constants.go new file mode 100644 index 00000000..2907984b --- /dev/null +++ b/custom/compute-optimizer/summary/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package summary + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "compute-optimizer/summary" diff --git a/custom/compute-optimizer/summary/dao.go b/custom/compute-optimizer/summary/dao.go index d730473c..d578c288 100644 --- a/custom/compute-optimizer/summary/dao.go +++ b/custom/compute-optimizer/summary/dao.go @@ -22,7 +22,7 @@ type SummaryDAO struct { func NewSummaryDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new compute-optimizer/summary dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SummaryDAO{ BaseDAO: dao.NewBaseDAO("compute-optimizer", "summary"), diff --git a/custom/configservice/rules/constants.go b/custom/configservice/rules/constants.go new file mode 100644 index 00000000..46a5d5cf --- /dev/null +++ b/custom/configservice/rules/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package rules + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "configservice/rules" diff --git a/custom/configservice/rules/dao.go b/custom/configservice/rules/dao.go index 646fd585..ff018d25 100644 --- a/custom/configservice/rules/dao.go +++ b/custom/configservice/rules/dao.go @@ -22,7 +22,7 @@ type RuleDAO struct { func NewRuleDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new configservice/rules dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RuleDAO{ BaseDAO: dao.NewBaseDAO("configservice", "rules"), diff --git a/custom/datasync/locations/constants.go b/custom/datasync/locations/constants.go new file mode 100644 index 00000000..84ef3413 --- /dev/null +++ b/custom/datasync/locations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package locations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "datasync/locations" diff --git a/custom/datasync/locations/dao.go b/custom/datasync/locations/dao.go index e2efe38a..02ed8cea 100644 --- a/custom/datasync/locations/dao.go +++ b/custom/datasync/locations/dao.go @@ -23,7 +23,7 @@ type LocationDAO struct { func NewLocationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new datasync/locations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LocationDAO{ BaseDAO: dao.NewBaseDAO("datasync", "locations"), diff --git a/custom/datasync/task-executions/constants.go b/custom/datasync/task-executions/constants.go new file mode 100644 index 00000000..f8e98388 --- /dev/null +++ b/custom/datasync/task-executions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package taskexecutions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "datasync/task-executions" diff --git a/custom/datasync/task-executions/dao.go b/custom/datasync/task-executions/dao.go index 32f74e26..2d19627a 100644 --- a/custom/datasync/task-executions/dao.go +++ b/custom/datasync/task-executions/dao.go @@ -24,7 +24,7 @@ type TaskExecutionDAO struct { func NewTaskExecutionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new datasync/task-executions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TaskExecutionDAO{ BaseDAO: dao.NewBaseDAO("datasync", "task-executions"), diff --git a/custom/datasync/tasks/constants.go b/custom/datasync/tasks/constants.go new file mode 100644 index 00000000..40d6d701 --- /dev/null +++ b/custom/datasync/tasks/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package tasks + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "datasync/tasks" diff --git a/custom/datasync/tasks/dao.go b/custom/datasync/tasks/dao.go index ff504327..8ead4f40 100644 --- a/custom/datasync/tasks/dao.go +++ b/custom/datasync/tasks/dao.go @@ -24,7 +24,7 @@ type TaskDAO struct { func NewTaskDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new datasync/tasks dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TaskDAO{ BaseDAO: dao.NewBaseDAO("datasync", "tasks"), diff --git a/custom/detective/graphs/constants.go b/custom/detective/graphs/constants.go new file mode 100644 index 00000000..f095e9dc --- /dev/null +++ b/custom/detective/graphs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package graphs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "detective/graphs" diff --git a/custom/detective/graphs/dao.go b/custom/detective/graphs/dao.go index 666a7cf1..2b42f9df 100644 --- a/custom/detective/graphs/dao.go +++ b/custom/detective/graphs/dao.go @@ -23,7 +23,7 @@ type GraphDAO struct { func NewGraphDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new detective/graphs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GraphDAO{ BaseDAO: dao.NewBaseDAO("detective", "graphs"), diff --git a/custom/detective/investigations/constants.go b/custom/detective/investigations/constants.go new file mode 100644 index 00000000..985e34e9 --- /dev/null +++ b/custom/detective/investigations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package investigations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "detective/investigations" diff --git a/custom/detective/investigations/dao.go b/custom/detective/investigations/dao.go index e6bb703d..14f69851 100644 --- a/custom/detective/investigations/dao.go +++ b/custom/detective/investigations/dao.go @@ -23,7 +23,7 @@ type InvestigationDAO struct { func NewInvestigationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new detective/investigations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InvestigationDAO{ BaseDAO: dao.NewBaseDAO("detective", "investigations"), diff --git a/custom/directconnect/connections/constants.go b/custom/directconnect/connections/constants.go new file mode 100644 index 00000000..1b92e9c6 --- /dev/null +++ b/custom/directconnect/connections/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package connections + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "directconnect/connections" diff --git a/custom/directconnect/connections/dao.go b/custom/directconnect/connections/dao.go index 1695c0ce..3c5dc110 100644 --- a/custom/directconnect/connections/dao.go +++ b/custom/directconnect/connections/dao.go @@ -22,7 +22,7 @@ type ConnectionDAO struct { func NewConnectionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new directconnect/connections dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ConnectionDAO{ BaseDAO: dao.NewBaseDAO("directconnect", "connections"), diff --git a/custom/directconnect/virtual-interfaces/constants.go b/custom/directconnect/virtual-interfaces/constants.go new file mode 100644 index 00000000..b8898071 --- /dev/null +++ b/custom/directconnect/virtual-interfaces/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package virtualinterfaces + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "directconnect/virtual-interfaces" diff --git a/custom/directconnect/virtual-interfaces/dao.go b/custom/directconnect/virtual-interfaces/dao.go index bfbbd214..37416ec7 100644 --- a/custom/directconnect/virtual-interfaces/dao.go +++ b/custom/directconnect/virtual-interfaces/dao.go @@ -22,7 +22,7 @@ type VirtualInterfaceDAO struct { func NewVirtualInterfaceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new directconnect/virtualinterfaces dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VirtualInterfaceDAO{ BaseDAO: dao.NewBaseDAO("directconnect", "virtual-interfaces"), diff --git a/custom/dynamodb/tables/constants.go b/custom/dynamodb/tables/constants.go new file mode 100644 index 00000000..62937c11 --- /dev/null +++ b/custom/dynamodb/tables/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package tables + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "dynamodb/tables" diff --git a/custom/dynamodb/tables/dao.go b/custom/dynamodb/tables/dao.go index f9a302f1..9142b791 100644 --- a/custom/dynamodb/tables/dao.go +++ b/custom/dynamodb/tables/dao.go @@ -23,7 +23,7 @@ type TableDAO struct { func NewTableDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new dynamodb/tables dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TableDAO{ BaseDAO: dao.NewBaseDAO("dynamodb", "tables"), diff --git a/custom/ec2/capacity-reservations/constants.go b/custom/ec2/capacity-reservations/constants.go new file mode 100644 index 00000000..6a9ec18b --- /dev/null +++ b/custom/ec2/capacity-reservations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package capacityreservations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/capacity-reservations" diff --git a/custom/ec2/capacity-reservations/dao.go b/custom/ec2/capacity-reservations/dao.go index 1e8cc433..7162a2d1 100644 --- a/custom/ec2/capacity-reservations/dao.go +++ b/custom/ec2/capacity-reservations/dao.go @@ -23,7 +23,7 @@ type CapacityReservationDAO struct { func NewCapacityReservationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/capacityreservations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &CapacityReservationDAO{ BaseDAO: dao.NewBaseDAO("ec2", "capacity-reservations"), diff --git a/custom/ec2/elastic-ips/constants.go b/custom/ec2/elastic-ips/constants.go new file mode 100644 index 00000000..dff8fdbd --- /dev/null +++ b/custom/ec2/elastic-ips/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package elasticips + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/elastic-ips" diff --git a/custom/ec2/elastic-ips/dao.go b/custom/ec2/elastic-ips/dao.go index fa5066d6..b0280ba8 100644 --- a/custom/ec2/elastic-ips/dao.go +++ b/custom/ec2/elastic-ips/dao.go @@ -22,7 +22,7 @@ type ElasticIPDAO struct { func NewElasticIPDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/elasticips dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ElasticIPDAO{ BaseDAO: dao.NewBaseDAO("ec2", "elastic-ips"), diff --git a/custom/ec2/images/constants.go b/custom/ec2/images/constants.go new file mode 100644 index 00000000..da116ea0 --- /dev/null +++ b/custom/ec2/images/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package images + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/images" diff --git a/custom/ec2/images/dao.go b/custom/ec2/images/dao.go index 37dda7a9..3a7ed624 100644 --- a/custom/ec2/images/dao.go +++ b/custom/ec2/images/dao.go @@ -22,7 +22,7 @@ type ImageDAO struct { func NewImageDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/images dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ImageDAO{ BaseDAO: dao.NewBaseDAO("ec2", "images"), diff --git a/custom/ec2/instances/constants.go b/custom/ec2/instances/constants.go new file mode 100644 index 00000000..bab269d3 --- /dev/null +++ b/custom/ec2/instances/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package instances + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/instances" diff --git a/custom/ec2/instances/dao.go b/custom/ec2/instances/dao.go index d69ab383..7152f914 100644 --- a/custom/ec2/instances/dao.go +++ b/custom/ec2/instances/dao.go @@ -24,7 +24,7 @@ type InstanceDAO struct { func NewInstanceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/instances dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InstanceDAO{ BaseDAO: dao.NewBaseDAO("ec2", "instances"), diff --git a/custom/ec2/key-pairs/constants.go b/custom/ec2/key-pairs/constants.go new file mode 100644 index 00000000..759cf704 --- /dev/null +++ b/custom/ec2/key-pairs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package keypairs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/key-pairs" diff --git a/custom/ec2/key-pairs/dao.go b/custom/ec2/key-pairs/dao.go index 17979ea2..2689b293 100644 --- a/custom/ec2/key-pairs/dao.go +++ b/custom/ec2/key-pairs/dao.go @@ -22,7 +22,7 @@ type KeyPairDAO struct { func NewKeyPairDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/keypairs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &KeyPairDAO{ BaseDAO: dao.NewBaseDAO("ec2", "key-pairs"), diff --git a/custom/ec2/launch-templates/constants.go b/custom/ec2/launch-templates/constants.go new file mode 100644 index 00000000..2823bbef --- /dev/null +++ b/custom/ec2/launch-templates/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package launchtemplates + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/launch-templates" diff --git a/custom/ec2/launch-templates/dao.go b/custom/ec2/launch-templates/dao.go index 97741fa4..1062f569 100644 --- a/custom/ec2/launch-templates/dao.go +++ b/custom/ec2/launch-templates/dao.go @@ -23,7 +23,7 @@ type LaunchTemplateDAO struct { func NewLaunchTemplateDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/launchtemplates dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LaunchTemplateDAO{ BaseDAO: dao.NewBaseDAO("ec2", "launch-templates"), diff --git a/custom/ec2/security-groups/constants.go b/custom/ec2/security-groups/constants.go new file mode 100644 index 00000000..bd700cfa --- /dev/null +++ b/custom/ec2/security-groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package securitygroups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/security-groups" diff --git a/custom/ec2/security-groups/dao.go b/custom/ec2/security-groups/dao.go index fff1b767..4f62fbe0 100644 --- a/custom/ec2/security-groups/dao.go +++ b/custom/ec2/security-groups/dao.go @@ -22,7 +22,7 @@ type SecurityGroupDAO struct { func NewSecurityGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/securitygroups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SecurityGroupDAO{ BaseDAO: dao.NewBaseDAO("ec2", "security-groups"), diff --git a/custom/ec2/snapshots/constants.go b/custom/ec2/snapshots/constants.go new file mode 100644 index 00000000..98739f5f --- /dev/null +++ b/custom/ec2/snapshots/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package snapshots + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/snapshots" diff --git a/custom/ec2/snapshots/dao.go b/custom/ec2/snapshots/dao.go index d2f09df7..ed50280c 100644 --- a/custom/ec2/snapshots/dao.go +++ b/custom/ec2/snapshots/dao.go @@ -22,7 +22,7 @@ type SnapshotDAO struct { func NewSnapshotDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/snapshots dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SnapshotDAO{ BaseDAO: dao.NewBaseDAO("ec2", "snapshots"), diff --git a/custom/ec2/volumes/constants.go b/custom/ec2/volumes/constants.go new file mode 100644 index 00000000..9b9af27a --- /dev/null +++ b/custom/ec2/volumes/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package volumes + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ec2/volumes" diff --git a/custom/ec2/volumes/dao.go b/custom/ec2/volumes/dao.go index 8556f157..8dbcd972 100644 --- a/custom/ec2/volumes/dao.go +++ b/custom/ec2/volumes/dao.go @@ -22,7 +22,7 @@ type VolumeDAO struct { func NewVolumeDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ec2/volumes dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VolumeDAO{ BaseDAO: dao.NewBaseDAO("ec2", "volumes"), diff --git a/custom/ecr/images/constants.go b/custom/ecr/images/constants.go new file mode 100644 index 00000000..75ede4ac --- /dev/null +++ b/custom/ecr/images/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package images + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ecr/images" diff --git a/custom/ecr/images/dao.go b/custom/ecr/images/dao.go index 3c92fe26..76cebd0d 100644 --- a/custom/ecr/images/dao.go +++ b/custom/ecr/images/dao.go @@ -23,7 +23,7 @@ type ImageDAO struct { func NewImageDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ecr/images dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ImageDAO{ BaseDAO: dao.NewBaseDAO("ecr", "images"), diff --git a/custom/ecr/repositories/constants.go b/custom/ecr/repositories/constants.go new file mode 100644 index 00000000..ca9bae57 --- /dev/null +++ b/custom/ecr/repositories/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package repositories + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ecr/repositories" diff --git a/custom/ecr/repositories/dao.go b/custom/ecr/repositories/dao.go index 1c7a0b1f..2137fbb3 100644 --- a/custom/ecr/repositories/dao.go +++ b/custom/ecr/repositories/dao.go @@ -22,7 +22,7 @@ type RepositoryDAO struct { func NewRepositoryDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ecr/repositories dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RepositoryDAO{ BaseDAO: dao.NewBaseDAO("ecr", "repositories"), diff --git a/custom/ecs/clusters/constants.go b/custom/ecs/clusters/constants.go new file mode 100644 index 00000000..984c72a9 --- /dev/null +++ b/custom/ecs/clusters/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package clusters + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ecs/clusters" diff --git a/custom/ecs/clusters/dao.go b/custom/ecs/clusters/dao.go index 274122c5..3932e6cc 100644 --- a/custom/ecs/clusters/dao.go +++ b/custom/ecs/clusters/dao.go @@ -22,7 +22,7 @@ type ClusterDAO struct { func NewClusterDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ecs/clusters dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ClusterDAO{ BaseDAO: dao.NewBaseDAO("ecs", "clusters"), diff --git a/custom/ecs/services/constants.go b/custom/ecs/services/constants.go new file mode 100644 index 00000000..637f71ad --- /dev/null +++ b/custom/ecs/services/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package services + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ecs/services" diff --git a/custom/ecs/services/dao.go b/custom/ecs/services/dao.go index fc5fce18..291f243a 100644 --- a/custom/ecs/services/dao.go +++ b/custom/ecs/services/dao.go @@ -23,7 +23,7 @@ type ServiceDAO struct { func NewServiceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ecs/services dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ServiceDAO{ BaseDAO: dao.NewBaseDAO("ecs", "services"), diff --git a/custom/ecs/tasks/constants.go b/custom/ecs/tasks/constants.go new file mode 100644 index 00000000..503d0237 --- /dev/null +++ b/custom/ecs/tasks/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package tasks + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ecs/tasks" diff --git a/custom/ecs/tasks/dao.go b/custom/ecs/tasks/dao.go index 8fbc3560..09c421c0 100644 --- a/custom/ecs/tasks/dao.go +++ b/custom/ecs/tasks/dao.go @@ -23,7 +23,7 @@ type TaskDAO struct { func NewTaskDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ecs/tasks dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TaskDAO{ BaseDAO: dao.NewBaseDAO("ecs", "tasks"), diff --git a/custom/elasticache/clusters/constants.go b/custom/elasticache/clusters/constants.go new file mode 100644 index 00000000..0e1bc44d --- /dev/null +++ b/custom/elasticache/clusters/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package clusters + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "elasticache/clusters" diff --git a/custom/elasticache/clusters/dao.go b/custom/elasticache/clusters/dao.go index 80a12033..78921cc6 100644 --- a/custom/elasticache/clusters/dao.go +++ b/custom/elasticache/clusters/dao.go @@ -22,7 +22,7 @@ type ClusterDAO struct { func NewClusterDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new elasticache/clusters dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ClusterDAO{ BaseDAO: dao.NewBaseDAO("elasticache", "clusters"), diff --git a/custom/elbv2/load-balancers/constants.go b/custom/elbv2/load-balancers/constants.go new file mode 100644 index 00000000..73e8ea66 --- /dev/null +++ b/custom/elbv2/load-balancers/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package loadbalancers + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "elbv2/load-balancers" diff --git a/custom/elbv2/load-balancers/dao.go b/custom/elbv2/load-balancers/dao.go index 53aa80a2..c5ffe537 100644 --- a/custom/elbv2/load-balancers/dao.go +++ b/custom/elbv2/load-balancers/dao.go @@ -23,7 +23,7 @@ type LoadBalancerDAO struct { func NewLoadBalancerDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new elbv2/loadbalancers dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LoadBalancerDAO{ BaseDAO: dao.NewBaseDAO("elbv2", "load-balancers"), diff --git a/custom/elbv2/target-groups/constants.go b/custom/elbv2/target-groups/constants.go new file mode 100644 index 00000000..18e71f1c --- /dev/null +++ b/custom/elbv2/target-groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package targetgroups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "elbv2/target-groups" diff --git a/custom/elbv2/target-groups/dao.go b/custom/elbv2/target-groups/dao.go index b70b5368..fb5fe9a6 100644 --- a/custom/elbv2/target-groups/dao.go +++ b/custom/elbv2/target-groups/dao.go @@ -22,7 +22,7 @@ type TargetGroupDAO struct { func NewTargetGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new elbv2/targetgroups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TargetGroupDAO{ BaseDAO: dao.NewBaseDAO("elbv2", "target-groups"), diff --git a/custom/elbv2/targets/constants.go b/custom/elbv2/targets/constants.go new file mode 100644 index 00000000..07837be8 --- /dev/null +++ b/custom/elbv2/targets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package targets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "elbv2/targets" diff --git a/custom/elbv2/targets/dao.go b/custom/elbv2/targets/dao.go index ffb202d8..bda6fba5 100644 --- a/custom/elbv2/targets/dao.go +++ b/custom/elbv2/targets/dao.go @@ -22,7 +22,7 @@ type TargetDAO struct { func NewTargetDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new elbv2/targets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TargetDAO{ BaseDAO: dao.NewBaseDAO("elbv2", "targets"), diff --git a/custom/emr/clusters/constants.go b/custom/emr/clusters/constants.go new file mode 100644 index 00000000..e7711558 --- /dev/null +++ b/custom/emr/clusters/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package clusters + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "emr/clusters" diff --git a/custom/emr/clusters/dao.go b/custom/emr/clusters/dao.go index 6a9713c8..9cf06f1c 100644 --- a/custom/emr/clusters/dao.go +++ b/custom/emr/clusters/dao.go @@ -21,7 +21,7 @@ type ClusterDAO struct { func NewClusterDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new emr/clusters dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ClusterDAO{ BaseDAO: dao.NewBaseDAO("emr", "clusters"), diff --git a/custom/emr/steps/constants.go b/custom/emr/steps/constants.go new file mode 100644 index 00000000..c0315bbc --- /dev/null +++ b/custom/emr/steps/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package steps + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "emr/steps" diff --git a/custom/emr/steps/dao.go b/custom/emr/steps/dao.go index 77049260..366d0f78 100644 --- a/custom/emr/steps/dao.go +++ b/custom/emr/steps/dao.go @@ -22,7 +22,7 @@ type StepDAO struct { func NewStepDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new emr/steps dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StepDAO{ BaseDAO: dao.NewBaseDAO("emr", "steps"), diff --git a/custom/events/buses/constants.go b/custom/events/buses/constants.go new file mode 100644 index 00000000..4039ae98 --- /dev/null +++ b/custom/events/buses/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package buses + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "events/buses" diff --git a/custom/events/buses/dao.go b/custom/events/buses/dao.go index 62b553aa..7dabbc3f 100644 --- a/custom/events/buses/dao.go +++ b/custom/events/buses/dao.go @@ -21,7 +21,7 @@ type BusDAO struct { func NewBusDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new events/buses dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BusDAO{ BaseDAO: dao.NewBaseDAO("events", "buses"), diff --git a/custom/events/rules/constants.go b/custom/events/rules/constants.go new file mode 100644 index 00000000..a3189e9c --- /dev/null +++ b/custom/events/rules/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package rules + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "events/rules" diff --git a/custom/events/rules/dao.go b/custom/events/rules/dao.go index 88bb4e35..c827c3b3 100644 --- a/custom/events/rules/dao.go +++ b/custom/events/rules/dao.go @@ -22,7 +22,7 @@ type RuleDAO struct { func NewRuleDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new events/rules dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RuleDAO{ BaseDAO: dao.NewBaseDAO("events", "rules"), diff --git a/custom/fms/policies/constants.go b/custom/fms/policies/constants.go new file mode 100644 index 00000000..92088f38 --- /dev/null +++ b/custom/fms/policies/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package policies + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "fms/policies" diff --git a/custom/fms/policies/dao.go b/custom/fms/policies/dao.go index 22465c3f..acca7526 100644 --- a/custom/fms/policies/dao.go +++ b/custom/fms/policies/dao.go @@ -21,7 +21,7 @@ type PolicyDAO struct { func NewPolicyDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new fms/policies dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &PolicyDAO{ BaseDAO: dao.NewBaseDAO("fms", "policies"), diff --git a/custom/glue/crawlers/constants.go b/custom/glue/crawlers/constants.go new file mode 100644 index 00000000..b03cbc39 --- /dev/null +++ b/custom/glue/crawlers/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package crawlers + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "glue/crawlers" diff --git a/custom/glue/crawlers/dao.go b/custom/glue/crawlers/dao.go index d88a405b..70cd37e9 100644 --- a/custom/glue/crawlers/dao.go +++ b/custom/glue/crawlers/dao.go @@ -22,7 +22,7 @@ type CrawlerDAO struct { func NewCrawlerDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new glue/crawlers dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &CrawlerDAO{ BaseDAO: dao.NewBaseDAO("glue", "crawlers"), diff --git a/custom/glue/databases/constants.go b/custom/glue/databases/constants.go new file mode 100644 index 00000000..a2333e51 --- /dev/null +++ b/custom/glue/databases/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package databases + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "glue/databases" diff --git a/custom/glue/databases/dao.go b/custom/glue/databases/dao.go index c51fa7aa..6917393f 100644 --- a/custom/glue/databases/dao.go +++ b/custom/glue/databases/dao.go @@ -22,7 +22,7 @@ type DatabaseDAO struct { func NewDatabaseDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new glue/databases dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DatabaseDAO{ BaseDAO: dao.NewBaseDAO("glue", "databases"), diff --git a/custom/glue/job-runs/constants.go b/custom/glue/job-runs/constants.go new file mode 100644 index 00000000..cc6cb965 --- /dev/null +++ b/custom/glue/job-runs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobruns + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "glue/job-runs" diff --git a/custom/glue/job-runs/dao.go b/custom/glue/job-runs/dao.go index c900063b..1f5d7973 100644 --- a/custom/glue/job-runs/dao.go +++ b/custom/glue/job-runs/dao.go @@ -23,7 +23,7 @@ type JobRunDAO struct { func NewJobRunDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new glue/jobruns dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobRunDAO{ BaseDAO: dao.NewBaseDAO("glue", "job-runs"), diff --git a/custom/glue/jobs/constants.go b/custom/glue/jobs/constants.go new file mode 100644 index 00000000..393d52e7 --- /dev/null +++ b/custom/glue/jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "glue/jobs" diff --git a/custom/glue/jobs/dao.go b/custom/glue/jobs/dao.go index 0e09b87c..0491f121 100644 --- a/custom/glue/jobs/dao.go +++ b/custom/glue/jobs/dao.go @@ -22,7 +22,7 @@ type JobDAO struct { func NewJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new glue/jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobDAO{ BaseDAO: dao.NewBaseDAO("glue", "jobs"), diff --git a/custom/glue/tables/constants.go b/custom/glue/tables/constants.go new file mode 100644 index 00000000..005b5562 --- /dev/null +++ b/custom/glue/tables/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package tables + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "glue/tables" diff --git a/custom/glue/tables/dao.go b/custom/glue/tables/dao.go index dea1a329..55927805 100644 --- a/custom/glue/tables/dao.go +++ b/custom/glue/tables/dao.go @@ -23,7 +23,7 @@ type TableDAO struct { func NewTableDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new glue/tables dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TableDAO{ BaseDAO: dao.NewBaseDAO("glue", "tables"), diff --git a/custom/guardduty/detectors/constants.go b/custom/guardduty/detectors/constants.go new file mode 100644 index 00000000..42a67af3 --- /dev/null +++ b/custom/guardduty/detectors/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package detectors + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "guardduty/detectors" diff --git a/custom/guardduty/detectors/dao.go b/custom/guardduty/detectors/dao.go index eb21181f..1d34e5be 100644 --- a/custom/guardduty/detectors/dao.go +++ b/custom/guardduty/detectors/dao.go @@ -22,7 +22,7 @@ type DetectorDAO struct { func NewDetectorDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new guardduty/detectors dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DetectorDAO{ BaseDAO: dao.NewBaseDAO("guardduty", "detectors"), diff --git a/custom/guardduty/findings/constants.go b/custom/guardduty/findings/constants.go new file mode 100644 index 00000000..573b297f --- /dev/null +++ b/custom/guardduty/findings/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package findings + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "guardduty/findings" diff --git a/custom/guardduty/findings/dao.go b/custom/guardduty/findings/dao.go index 472e0fb1..82b7d58b 100644 --- a/custom/guardduty/findings/dao.go +++ b/custom/guardduty/findings/dao.go @@ -23,7 +23,7 @@ type FindingDAO struct { func NewFindingDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new guardduty/findings dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FindingDAO{ BaseDAO: dao.NewBaseDAO("guardduty", "findings"), diff --git a/custom/health/events/constants.go b/custom/health/events/constants.go new file mode 100644 index 00000000..d890fa80 --- /dev/null +++ b/custom/health/events/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package events + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "health/events" diff --git a/custom/health/events/dao.go b/custom/health/events/dao.go index 4642e5a0..3ff44a05 100644 --- a/custom/health/events/dao.go +++ b/custom/health/events/dao.go @@ -24,7 +24,7 @@ type EventDAO struct { func NewEventDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new health/events dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } // Health API requires us-east-1 region return &EventDAO{ diff --git a/custom/iam/groups/constants.go b/custom/iam/groups/constants.go new file mode 100644 index 00000000..9222ba64 --- /dev/null +++ b/custom/iam/groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package groups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "iam/groups" diff --git a/custom/iam/groups/dao.go b/custom/iam/groups/dao.go index 3f10186e..55bf8fda 100644 --- a/custom/iam/groups/dao.go +++ b/custom/iam/groups/dao.go @@ -21,7 +21,7 @@ type GroupDAO struct { func NewGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new iam/groups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GroupDAO{ BaseDAO: dao.NewBaseDAO("iam", "groups"), diff --git a/custom/iam/instance-profiles/constants.go b/custom/iam/instance-profiles/constants.go new file mode 100644 index 00000000..cf933973 --- /dev/null +++ b/custom/iam/instance-profiles/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package instanceprofiles + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "iam/instance-profiles" diff --git a/custom/iam/instance-profiles/dao.go b/custom/iam/instance-profiles/dao.go index 6c3bc213..0b15fc8f 100644 --- a/custom/iam/instance-profiles/dao.go +++ b/custom/iam/instance-profiles/dao.go @@ -22,7 +22,7 @@ type InstanceProfileDAO struct { func NewInstanceProfileDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new iam/instanceprofiles dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InstanceProfileDAO{ BaseDAO: dao.NewBaseDAO("iam", "instance-profiles"), diff --git a/custom/iam/policies/constants.go b/custom/iam/policies/constants.go new file mode 100644 index 00000000..fa8736d2 --- /dev/null +++ b/custom/iam/policies/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package policies + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "iam/policies" diff --git a/custom/iam/policies/dao.go b/custom/iam/policies/dao.go index a20c685a..669265dc 100644 --- a/custom/iam/policies/dao.go +++ b/custom/iam/policies/dao.go @@ -21,7 +21,7 @@ type PolicyDAO struct { func NewPolicyDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new iam/policies dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &PolicyDAO{ BaseDAO: dao.NewBaseDAO("iam", "policies"), diff --git a/custom/iam/roles/constants.go b/custom/iam/roles/constants.go new file mode 100644 index 00000000..a1fa0215 --- /dev/null +++ b/custom/iam/roles/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package roles + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "iam/roles" diff --git a/custom/iam/roles/dao.go b/custom/iam/roles/dao.go index fb2b8eb1..59810038 100644 --- a/custom/iam/roles/dao.go +++ b/custom/iam/roles/dao.go @@ -21,7 +21,7 @@ type RoleDAO struct { func NewRoleDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new iam/roles dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RoleDAO{ BaseDAO: dao.NewBaseDAO("iam", "roles"), diff --git a/custom/iam/users/constants.go b/custom/iam/users/constants.go new file mode 100644 index 00000000..43a0816b --- /dev/null +++ b/custom/iam/users/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package users + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "iam/users" diff --git a/custom/iam/users/dao.go b/custom/iam/users/dao.go index a2bd0b50..eb93711e 100644 --- a/custom/iam/users/dao.go +++ b/custom/iam/users/dao.go @@ -31,7 +31,7 @@ type UserDAO struct { func NewUserDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new iam/users dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &UserDAO{ BaseDAO: dao.NewBaseDAO("iam", "users"), diff --git a/custom/inspector2/findings/constants.go b/custom/inspector2/findings/constants.go new file mode 100644 index 00000000..32d12938 --- /dev/null +++ b/custom/inspector2/findings/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package findings + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "inspector2/findings" diff --git a/custom/inspector2/findings/dao.go b/custom/inspector2/findings/dao.go index a2819b19..97d34b43 100644 --- a/custom/inspector2/findings/dao.go +++ b/custom/inspector2/findings/dao.go @@ -23,7 +23,7 @@ type FindingDAO struct { func NewFindingDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new inspector2/findings dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FindingDAO{ BaseDAO: dao.NewBaseDAO("inspector2", "findings"), diff --git a/custom/kinesis/streams/constants.go b/custom/kinesis/streams/constants.go new file mode 100644 index 00000000..0b5ded18 --- /dev/null +++ b/custom/kinesis/streams/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package streams + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "kinesis/streams" diff --git a/custom/kinesis/streams/dao.go b/custom/kinesis/streams/dao.go index 7ce497d4..0f1824a7 100644 --- a/custom/kinesis/streams/dao.go +++ b/custom/kinesis/streams/dao.go @@ -21,7 +21,7 @@ type StreamDAO struct { func NewStreamDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new kinesis/streams dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StreamDAO{ BaseDAO: dao.NewBaseDAO("kinesis", "streams"), diff --git a/custom/kms/keys/constants.go b/custom/kms/keys/constants.go new file mode 100644 index 00000000..78c98fbe --- /dev/null +++ b/custom/kms/keys/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package keys + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "kms/keys" diff --git a/custom/kms/keys/dao.go b/custom/kms/keys/dao.go index 5b64ee70..e67347d4 100644 --- a/custom/kms/keys/dao.go +++ b/custom/kms/keys/dao.go @@ -22,7 +22,7 @@ type KeyDAO struct { func NewKeyDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new kms/keys dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &KeyDAO{ BaseDAO: dao.NewBaseDAO("kms", "keys"), diff --git a/custom/lambda/functions/constants.go b/custom/lambda/functions/constants.go new file mode 100644 index 00000000..b2a0d433 --- /dev/null +++ b/custom/lambda/functions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package functions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "lambda/functions" diff --git a/custom/lambda/functions/dao.go b/custom/lambda/functions/dao.go index e3d13153..5b55fea1 100644 --- a/custom/lambda/functions/dao.go +++ b/custom/lambda/functions/dao.go @@ -22,7 +22,7 @@ type FunctionDAO struct { func NewFunctionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new lambda/functions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FunctionDAO{ BaseDAO: dao.NewBaseDAO("lambda", "functions"), diff --git a/custom/license-manager/configurations/constants.go b/custom/license-manager/configurations/constants.go new file mode 100644 index 00000000..9e72d2a8 --- /dev/null +++ b/custom/license-manager/configurations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package configurations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "license-manager/configurations" diff --git a/custom/license-manager/configurations/dao.go b/custom/license-manager/configurations/dao.go index 9633068d..3e19fc42 100644 --- a/custom/license-manager/configurations/dao.go +++ b/custom/license-manager/configurations/dao.go @@ -21,7 +21,7 @@ type ConfigurationDAO struct { func NewConfigurationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new licensemanager/configurations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ConfigurationDAO{ BaseDAO: dao.NewBaseDAO("license-manager", "configurations"), diff --git a/custom/license-manager/grants/constants.go b/custom/license-manager/grants/constants.go new file mode 100644 index 00000000..ddcc32e6 --- /dev/null +++ b/custom/license-manager/grants/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package grants + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "license-manager/grants" diff --git a/custom/license-manager/grants/dao.go b/custom/license-manager/grants/dao.go index 7fdbb1da..a0e79a74 100644 --- a/custom/license-manager/grants/dao.go +++ b/custom/license-manager/grants/dao.go @@ -23,7 +23,7 @@ type GrantDAO struct { func NewGrantDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new licensemanager/grants dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GrantDAO{ BaseDAO: dao.NewBaseDAO("license-manager", "grants"), diff --git a/custom/license-manager/licenses/constants.go b/custom/license-manager/licenses/constants.go new file mode 100644 index 00000000..989f9ce0 --- /dev/null +++ b/custom/license-manager/licenses/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package licenses + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "license-manager/licenses" diff --git a/custom/license-manager/licenses/dao.go b/custom/license-manager/licenses/dao.go index 280e9cd7..a5f729e1 100644 --- a/custom/license-manager/licenses/dao.go +++ b/custom/license-manager/licenses/dao.go @@ -22,7 +22,7 @@ type LicenseDAO struct { func NewLicenseDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new licensemanager/licenses dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &LicenseDAO{ BaseDAO: dao.NewBaseDAO("license-manager", "licenses"), diff --git a/custom/macie2/buckets/constants.go b/custom/macie2/buckets/constants.go new file mode 100644 index 00000000..e1d7032c --- /dev/null +++ b/custom/macie2/buckets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package buckets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "macie2/buckets" diff --git a/custom/macie2/buckets/dao.go b/custom/macie2/buckets/dao.go index 1dfa34b1..f8c09165 100644 --- a/custom/macie2/buckets/dao.go +++ b/custom/macie2/buckets/dao.go @@ -22,7 +22,7 @@ type BucketDAO struct { func NewBucketDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new macie/buckets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BucketDAO{ BaseDAO: dao.NewBaseDAO("macie2", "buckets"), diff --git a/custom/macie2/classification-jobs/constants.go b/custom/macie2/classification-jobs/constants.go new file mode 100644 index 00000000..38113e12 --- /dev/null +++ b/custom/macie2/classification-jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package classificationjobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "macie2/classification-jobs" diff --git a/custom/macie2/classification-jobs/dao.go b/custom/macie2/classification-jobs/dao.go index 159893d7..6c9f0ac7 100644 --- a/custom/macie2/classification-jobs/dao.go +++ b/custom/macie2/classification-jobs/dao.go @@ -22,7 +22,7 @@ type ClassificationJobDAO struct { func NewClassificationJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new macie/classificationjobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ClassificationJobDAO{ BaseDAO: dao.NewBaseDAO("macie2", "classification-jobs"), diff --git a/custom/macie2/findings/constants.go b/custom/macie2/findings/constants.go new file mode 100644 index 00000000..2d324471 --- /dev/null +++ b/custom/macie2/findings/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package findings + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "macie2/findings" diff --git a/custom/macie2/findings/dao.go b/custom/macie2/findings/dao.go index f751908e..b8c61feb 100644 --- a/custom/macie2/findings/dao.go +++ b/custom/macie2/findings/dao.go @@ -23,7 +23,7 @@ type FindingDAO struct { func NewFindingDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new macie/findings dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FindingDAO{ BaseDAO: dao.NewBaseDAO("macie2", "findings"), diff --git a/custom/network-firewall/firewall-policies/constants.go b/custom/network-firewall/firewall-policies/constants.go new file mode 100644 index 00000000..91f1c3c6 --- /dev/null +++ b/custom/network-firewall/firewall-policies/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package firewallpolicies + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "network-firewall/firewall-policies" diff --git a/custom/network-firewall/firewall-policies/dao.go b/custom/network-firewall/firewall-policies/dao.go index 6f0d744b..90dfadcf 100644 --- a/custom/network-firewall/firewall-policies/dao.go +++ b/custom/network-firewall/firewall-policies/dao.go @@ -21,7 +21,7 @@ type FirewallPolicyDAO struct { func NewFirewallPolicyDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new networkfirewall/firewallpolicies dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FirewallPolicyDAO{ BaseDAO: dao.NewBaseDAO("network-firewall", "firewall-policies"), diff --git a/custom/network-firewall/firewalls/constants.go b/custom/network-firewall/firewalls/constants.go new file mode 100644 index 00000000..08e90387 --- /dev/null +++ b/custom/network-firewall/firewalls/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package firewalls + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "network-firewall/firewalls" diff --git a/custom/network-firewall/firewalls/dao.go b/custom/network-firewall/firewalls/dao.go index 8c2cfcc6..9dca7cfb 100644 --- a/custom/network-firewall/firewalls/dao.go +++ b/custom/network-firewall/firewalls/dao.go @@ -21,7 +21,7 @@ type FirewallDAO struct { func NewFirewallDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new networkfirewall/firewalls dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FirewallDAO{ BaseDAO: dao.NewBaseDAO("network-firewall", "firewalls"), diff --git a/custom/network-firewall/rule-groups/constants.go b/custom/network-firewall/rule-groups/constants.go new file mode 100644 index 00000000..a9e0a5a9 --- /dev/null +++ b/custom/network-firewall/rule-groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package rulegroups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "network-firewall/rule-groups" diff --git a/custom/network-firewall/rule-groups/dao.go b/custom/network-firewall/rule-groups/dao.go index 1f4b9158..9f39698b 100644 --- a/custom/network-firewall/rule-groups/dao.go +++ b/custom/network-firewall/rule-groups/dao.go @@ -21,7 +21,7 @@ type RuleGroupDAO struct { func NewRuleGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new networkfirewall/rulegroups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RuleGroupDAO{ BaseDAO: dao.NewBaseDAO("network-firewall", "rule-groups"), diff --git a/custom/opensearch/domains/constants.go b/custom/opensearch/domains/constants.go new file mode 100644 index 00000000..2f3533b2 --- /dev/null +++ b/custom/opensearch/domains/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package domains + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "opensearch/domains" diff --git a/custom/opensearch/domains/dao.go b/custom/opensearch/domains/dao.go index 3fb8d2c5..3de45edc 100644 --- a/custom/opensearch/domains/dao.go +++ b/custom/opensearch/domains/dao.go @@ -22,7 +22,7 @@ type DomainDAO struct { func NewDomainDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new opensearch/domains dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &DomainDAO{ BaseDAO: dao.NewBaseDAO("opensearch", "domains"), diff --git a/custom/organizations/accounts/constants.go b/custom/organizations/accounts/constants.go new file mode 100644 index 00000000..40d84f80 --- /dev/null +++ b/custom/organizations/accounts/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package accounts + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "organizations/accounts" diff --git a/custom/organizations/accounts/dao.go b/custom/organizations/accounts/dao.go index 750bcf74..28c89f7c 100644 --- a/custom/organizations/accounts/dao.go +++ b/custom/organizations/accounts/dao.go @@ -22,7 +22,7 @@ type AccountDAO struct { func NewAccountDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new organizations/accounts dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &AccountDAO{ BaseDAO: dao.NewBaseDAO("organizations", "accounts"), diff --git a/custom/organizations/ous/constants.go b/custom/organizations/ous/constants.go new file mode 100644 index 00000000..177e6265 --- /dev/null +++ b/custom/organizations/ous/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package ous + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "organizations/ous" diff --git a/custom/organizations/ous/dao.go b/custom/organizations/ous/dao.go index 0e63a59d..9face24a 100644 --- a/custom/organizations/ous/dao.go +++ b/custom/organizations/ous/dao.go @@ -22,7 +22,7 @@ type OUDAO struct { func NewOUDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new organizations/ous dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &OUDAO{ BaseDAO: dao.NewBaseDAO("organizations", "ous"), diff --git a/custom/organizations/policies/constants.go b/custom/organizations/policies/constants.go new file mode 100644 index 00000000..6d619838 --- /dev/null +++ b/custom/organizations/policies/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package policies + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "organizations/policies" diff --git a/custom/organizations/policies/dao.go b/custom/organizations/policies/dao.go index a4e9039f..dab2dad1 100644 --- a/custom/organizations/policies/dao.go +++ b/custom/organizations/policies/dao.go @@ -21,7 +21,7 @@ type PolicyDAO struct { func NewPolicyDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new organizations/policies dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &PolicyDAO{ BaseDAO: dao.NewBaseDAO("organizations", "policies"), diff --git a/custom/organizations/roots/constants.go b/custom/organizations/roots/constants.go new file mode 100644 index 00000000..79fefa0c --- /dev/null +++ b/custom/organizations/roots/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package roots + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "organizations/roots" diff --git a/custom/organizations/roots/dao.go b/custom/organizations/roots/dao.go index 4b32c178..4fa78b76 100644 --- a/custom/organizations/roots/dao.go +++ b/custom/organizations/roots/dao.go @@ -22,7 +22,7 @@ type RootDAO struct { func NewRootDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new organizations/roots dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RootDAO{ BaseDAO: dao.NewBaseDAO("organizations", "roots"), diff --git a/custom/rds/instances/constants.go b/custom/rds/instances/constants.go new file mode 100644 index 00000000..890c603d --- /dev/null +++ b/custom/rds/instances/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package instances + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "rds/instances" diff --git a/custom/rds/instances/dao.go b/custom/rds/instances/dao.go index da650cb5..0264a7c4 100644 --- a/custom/rds/instances/dao.go +++ b/custom/rds/instances/dao.go @@ -22,7 +22,7 @@ type InstanceDAO struct { func NewInstanceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new rds/instances dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InstanceDAO{ BaseDAO: dao.NewBaseDAO("rds", "instances"), diff --git a/custom/rds/snapshots/constants.go b/custom/rds/snapshots/constants.go new file mode 100644 index 00000000..add7577c --- /dev/null +++ b/custom/rds/snapshots/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package snapshots + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "rds/snapshots" diff --git a/custom/rds/snapshots/dao.go b/custom/rds/snapshots/dao.go index 8a12d7b4..f498083a 100644 --- a/custom/rds/snapshots/dao.go +++ b/custom/rds/snapshots/dao.go @@ -22,7 +22,7 @@ type SnapshotDAO struct { func NewSnapshotDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new rds/snapshots dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SnapshotDAO{ BaseDAO: dao.NewBaseDAO("rds", "snapshots"), diff --git a/custom/redshift/clusters/constants.go b/custom/redshift/clusters/constants.go new file mode 100644 index 00000000..2679f41b --- /dev/null +++ b/custom/redshift/clusters/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package clusters + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "redshift/clusters" diff --git a/custom/redshift/clusters/dao.go b/custom/redshift/clusters/dao.go index 46b33a33..bee473b2 100644 --- a/custom/redshift/clusters/dao.go +++ b/custom/redshift/clusters/dao.go @@ -23,7 +23,7 @@ type ClusterDAO struct { func NewClusterDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new redshift/clusters dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ClusterDAO{ BaseDAO: dao.NewBaseDAO("redshift", "clusters"), diff --git a/custom/redshift/snapshots/constants.go b/custom/redshift/snapshots/constants.go new file mode 100644 index 00000000..3c52c3c8 --- /dev/null +++ b/custom/redshift/snapshots/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package snapshots + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "redshift/snapshots" diff --git a/custom/redshift/snapshots/dao.go b/custom/redshift/snapshots/dao.go index fc8ce4f1..357e8e4d 100644 --- a/custom/redshift/snapshots/dao.go +++ b/custom/redshift/snapshots/dao.go @@ -23,7 +23,7 @@ type SnapshotDAO struct { func NewSnapshotDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new redshift/snapshots dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SnapshotDAO{ BaseDAO: dao.NewBaseDAO("redshift", "snapshots"), diff --git a/custom/risp/reserved-instances/constants.go b/custom/risp/reserved-instances/constants.go new file mode 100644 index 00000000..a418dfcc --- /dev/null +++ b/custom/risp/reserved-instances/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package reservedinstances + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "risp/reserved-instances" diff --git a/custom/risp/reserved-instances/dao.go b/custom/risp/reserved-instances/dao.go index a08be924..0646f675 100644 --- a/custom/risp/reserved-instances/dao.go +++ b/custom/risp/reserved-instances/dao.go @@ -23,7 +23,7 @@ type ReservedInstanceDAO struct { func NewReservedInstanceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new risp/reserved-instances dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ReservedInstanceDAO{ BaseDAO: dao.NewBaseDAO("risp", "reserved-instances"), diff --git a/custom/risp/savings-plans/constants.go b/custom/risp/savings-plans/constants.go new file mode 100644 index 00000000..a18b74fd --- /dev/null +++ b/custom/risp/savings-plans/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package savingsplans + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "risp/savings-plans" diff --git a/custom/risp/savings-plans/dao.go b/custom/risp/savings-plans/dao.go index 88364a2a..02fe64d2 100644 --- a/custom/risp/savings-plans/dao.go +++ b/custom/risp/savings-plans/dao.go @@ -24,7 +24,7 @@ type SavingsPlanDAO struct { func NewSavingsPlanDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new risp/savings-plans dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SavingsPlanDAO{ BaseDAO: dao.NewBaseDAO("risp", "savings-plans"), diff --git a/custom/route53/hosted-zones/constants.go b/custom/route53/hosted-zones/constants.go new file mode 100644 index 00000000..4cd03435 --- /dev/null +++ b/custom/route53/hosted-zones/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package hostedzones + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "route53/hosted-zones" diff --git a/custom/route53/hosted-zones/dao.go b/custom/route53/hosted-zones/dao.go index 3866241a..d09ff356 100644 --- a/custom/route53/hosted-zones/dao.go +++ b/custom/route53/hosted-zones/dao.go @@ -23,7 +23,7 @@ type HostedZoneDAO struct { func NewHostedZoneDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new route53/hostedzones dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &HostedZoneDAO{ BaseDAO: dao.NewBaseDAO("route53", "hosted-zones"), diff --git a/custom/route53/record-sets/constants.go b/custom/route53/record-sets/constants.go new file mode 100644 index 00000000..9bd8b525 --- /dev/null +++ b/custom/route53/record-sets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package recordsets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "route53/record-sets" diff --git a/custom/route53/record-sets/dao.go b/custom/route53/record-sets/dao.go index 789dbb61..5112c76c 100644 --- a/custom/route53/record-sets/dao.go +++ b/custom/route53/record-sets/dao.go @@ -23,7 +23,7 @@ type RecordSetDAO struct { func NewRecordSetDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new route53/recordsets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RecordSetDAO{ BaseDAO: dao.NewBaseDAO("route53", "record-sets"), diff --git a/custom/s3/buckets/constants.go b/custom/s3/buckets/constants.go new file mode 100644 index 00000000..4086363e --- /dev/null +++ b/custom/s3/buckets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package buckets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "s3/buckets" diff --git a/custom/s3/buckets/dao.go b/custom/s3/buckets/dao.go index 41d397d4..e3a62336 100644 --- a/custom/s3/buckets/dao.go +++ b/custom/s3/buckets/dao.go @@ -23,7 +23,7 @@ type BucketDAO struct { func NewBucketDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new s3/buckets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &BucketDAO{ BaseDAO: dao.NewBaseDAO("s3", "buckets"), diff --git a/custom/s3vectors/buckets/constants.go b/custom/s3vectors/buckets/constants.go new file mode 100644 index 00000000..0ae2810a --- /dev/null +++ b/custom/s3vectors/buckets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package buckets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "s3vectors/buckets" diff --git a/custom/s3vectors/buckets/dao.go b/custom/s3vectors/buckets/dao.go index 4b72eab4..9b342e92 100644 --- a/custom/s3vectors/buckets/dao.go +++ b/custom/s3vectors/buckets/dao.go @@ -21,7 +21,7 @@ type VectorBucketDAO struct { func NewVectorBucketDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new s3vectors/buckets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VectorBucketDAO{ BaseDAO: dao.NewBaseDAO("s3vectors", "buckets"), diff --git a/custom/s3vectors/indexes/constants.go b/custom/s3vectors/indexes/constants.go new file mode 100644 index 00000000..f7e04348 --- /dev/null +++ b/custom/s3vectors/indexes/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package indexes + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "s3vectors/indexes" diff --git a/custom/s3vectors/indexes/dao.go b/custom/s3vectors/indexes/dao.go index 4daa5b4a..1a17a3a4 100644 --- a/custom/s3vectors/indexes/dao.go +++ b/custom/s3vectors/indexes/dao.go @@ -21,7 +21,7 @@ type VectorIndexDAO struct { func NewVectorIndexDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new s3vectors/indexes dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VectorIndexDAO{ BaseDAO: dao.NewBaseDAO("s3vectors", "indexes"), diff --git a/custom/sagemaker/endpoints/constants.go b/custom/sagemaker/endpoints/constants.go new file mode 100644 index 00000000..698395f6 --- /dev/null +++ b/custom/sagemaker/endpoints/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package endpoints + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sagemaker/endpoints" diff --git a/custom/sagemaker/endpoints/dao.go b/custom/sagemaker/endpoints/dao.go index 21f9309b..30996292 100644 --- a/custom/sagemaker/endpoints/dao.go +++ b/custom/sagemaker/endpoints/dao.go @@ -22,7 +22,7 @@ type EndpointDAO struct { func NewEndpointDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sagemaker/endpoints dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &EndpointDAO{ BaseDAO: dao.NewBaseDAO("sagemaker", "endpoints"), diff --git a/custom/sagemaker/models/constants.go b/custom/sagemaker/models/constants.go new file mode 100644 index 00000000..244db6ec --- /dev/null +++ b/custom/sagemaker/models/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package models + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sagemaker/models" diff --git a/custom/sagemaker/models/dao.go b/custom/sagemaker/models/dao.go index 2dbb56c6..58023783 100644 --- a/custom/sagemaker/models/dao.go +++ b/custom/sagemaker/models/dao.go @@ -22,7 +22,7 @@ type ModelDAO struct { func NewModelDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sagemaker/models dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ModelDAO{ BaseDAO: dao.NewBaseDAO("sagemaker", "models"), diff --git a/custom/sagemaker/notebooks/constants.go b/custom/sagemaker/notebooks/constants.go new file mode 100644 index 00000000..d59ffbef --- /dev/null +++ b/custom/sagemaker/notebooks/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package notebooks + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sagemaker/notebooks" diff --git a/custom/sagemaker/notebooks/dao.go b/custom/sagemaker/notebooks/dao.go index 4c6e1312..61dc0fdd 100644 --- a/custom/sagemaker/notebooks/dao.go +++ b/custom/sagemaker/notebooks/dao.go @@ -22,7 +22,7 @@ type NotebookDAO struct { func NewNotebookDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sagemaker/notebooks dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &NotebookDAO{ BaseDAO: dao.NewBaseDAO("sagemaker", "notebooks"), diff --git a/custom/sagemaker/training-jobs/constants.go b/custom/sagemaker/training-jobs/constants.go new file mode 100644 index 00000000..345fd4ca --- /dev/null +++ b/custom/sagemaker/training-jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package trainingjobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sagemaker/training-jobs" diff --git a/custom/sagemaker/training-jobs/dao.go b/custom/sagemaker/training-jobs/dao.go index 01998825..be4c6264 100644 --- a/custom/sagemaker/training-jobs/dao.go +++ b/custom/sagemaker/training-jobs/dao.go @@ -22,7 +22,7 @@ type TrainingJobDAO struct { func NewTrainingJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sagemaker/trainingjobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TrainingJobDAO{ BaseDAO: dao.NewBaseDAO("sagemaker", "training-jobs"), diff --git a/custom/secretsmanager/secrets/constants.go b/custom/secretsmanager/secrets/constants.go new file mode 100644 index 00000000..52211d8c --- /dev/null +++ b/custom/secretsmanager/secrets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package secrets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "secretsmanager/secrets" diff --git a/custom/secretsmanager/secrets/dao.go b/custom/secretsmanager/secrets/dao.go index 6ebbf589..8bb4fc3e 100644 --- a/custom/secretsmanager/secrets/dao.go +++ b/custom/secretsmanager/secrets/dao.go @@ -21,7 +21,7 @@ type SecretDAO struct { func NewSecretDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new secretsmanager/secrets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SecretDAO{ BaseDAO: dao.NewBaseDAO("secretsmanager", "secrets"), diff --git a/custom/securityhub/findings/constants.go b/custom/securityhub/findings/constants.go new file mode 100644 index 00000000..6d61bc16 --- /dev/null +++ b/custom/securityhub/findings/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package findings + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "securityhub/findings" diff --git a/custom/securityhub/findings/dao.go b/custom/securityhub/findings/dao.go index 9277e549..df4fc97a 100644 --- a/custom/securityhub/findings/dao.go +++ b/custom/securityhub/findings/dao.go @@ -23,7 +23,7 @@ type FindingDAO struct { func NewFindingDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new securityhub/findings dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &FindingDAO{ BaseDAO: dao.NewBaseDAO("securityhub", "findings"), diff --git a/custom/service-quotas/quotas/constants.go b/custom/service-quotas/quotas/constants.go new file mode 100644 index 00000000..bf9a39b7 --- /dev/null +++ b/custom/service-quotas/quotas/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package quotas + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "service-quotas/quotas" diff --git a/custom/service-quotas/quotas/dao.go b/custom/service-quotas/quotas/dao.go index a7f636a6..1cf8888b 100644 --- a/custom/service-quotas/quotas/dao.go +++ b/custom/service-quotas/quotas/dao.go @@ -131,7 +131,7 @@ type QuotaDAO struct { func NewQuotaDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new servicequotas/quotas dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &QuotaDAO{ BaseDAO: dao.NewBaseDAO("service-quotas", "quotas"), diff --git a/custom/service-quotas/services/constants.go b/custom/service-quotas/services/constants.go new file mode 100644 index 00000000..abe10e58 --- /dev/null +++ b/custom/service-quotas/services/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package services + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "service-quotas/services" diff --git a/custom/service-quotas/services/dao.go b/custom/service-quotas/services/dao.go index 8cb39f66..97c923c5 100644 --- a/custom/service-quotas/services/dao.go +++ b/custom/service-quotas/services/dao.go @@ -77,7 +77,7 @@ type ServiceDAO struct { func NewServiceDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new servicequotas/services dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ServiceDAO{ BaseDAO: dao.NewBaseDAO("service-quotas", "services"), diff --git a/custom/sns/subscriptions/constants.go b/custom/sns/subscriptions/constants.go new file mode 100644 index 00000000..0b1ec89c --- /dev/null +++ b/custom/sns/subscriptions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package subscriptions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sns/subscriptions" diff --git a/custom/sns/subscriptions/dao.go b/custom/sns/subscriptions/dao.go index 87666d06..0d2f0d5e 100644 --- a/custom/sns/subscriptions/dao.go +++ b/custom/sns/subscriptions/dao.go @@ -22,7 +22,7 @@ type SubscriptionDAO struct { func NewSubscriptionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sns/subscriptions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SubscriptionDAO{ BaseDAO: dao.NewBaseDAO("sns", "subscriptions"), diff --git a/custom/sns/topics/constants.go b/custom/sns/topics/constants.go new file mode 100644 index 00000000..0c8a3ae3 --- /dev/null +++ b/custom/sns/topics/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package topics + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sns/topics" diff --git a/custom/sns/topics/dao.go b/custom/sns/topics/dao.go index 1d17a8f1..5fc09b74 100644 --- a/custom/sns/topics/dao.go +++ b/custom/sns/topics/dao.go @@ -23,7 +23,7 @@ type TopicDAO struct { func NewTopicDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sns/topics dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TopicDAO{ BaseDAO: dao.NewBaseDAO("sns", "topics"), diff --git a/custom/sqs/queues/constants.go b/custom/sqs/queues/constants.go new file mode 100644 index 00000000..5eeb7a68 --- /dev/null +++ b/custom/sqs/queues/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package queues + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "sqs/queues" diff --git a/custom/sqs/queues/dao.go b/custom/sqs/queues/dao.go index 7db5de4f..07c3b963 100644 --- a/custom/sqs/queues/dao.go +++ b/custom/sqs/queues/dao.go @@ -23,7 +23,7 @@ type QueueDAO struct { func NewQueueDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new sqs/queues dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &QueueDAO{ BaseDAO: dao.NewBaseDAO("sqs", "queues"), diff --git a/custom/ssm/parameters/constants.go b/custom/ssm/parameters/constants.go new file mode 100644 index 00000000..32bc214e --- /dev/null +++ b/custom/ssm/parameters/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package parameters + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "ssm/parameters" diff --git a/custom/ssm/parameters/dao.go b/custom/ssm/parameters/dao.go index 51586973..cd1f6b63 100644 --- a/custom/ssm/parameters/dao.go +++ b/custom/ssm/parameters/dao.go @@ -22,7 +22,7 @@ type ParameterDAO struct { func NewParameterDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new ssm/parameters dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ParameterDAO{ BaseDAO: dao.NewBaseDAO("ssm", "parameters"), diff --git a/custom/stepfunctions/executions/constants.go b/custom/stepfunctions/executions/constants.go new file mode 100644 index 00000000..0b8d920e --- /dev/null +++ b/custom/stepfunctions/executions/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package executions + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "stepfunctions/executions" diff --git a/custom/stepfunctions/executions/dao.go b/custom/stepfunctions/executions/dao.go index 1bda215b..1a5545a4 100644 --- a/custom/stepfunctions/executions/dao.go +++ b/custom/stepfunctions/executions/dao.go @@ -23,7 +23,7 @@ type ExecutionDAO struct { func NewExecutionDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new stepfunctions/executions dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ExecutionDAO{ BaseDAO: dao.NewBaseDAO("stepfunctions", "executions"), diff --git a/custom/stepfunctions/state-machines/constants.go b/custom/stepfunctions/state-machines/constants.go new file mode 100644 index 00000000..f35789ae --- /dev/null +++ b/custom/stepfunctions/state-machines/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package statemachines + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "stepfunctions/state-machines" diff --git a/custom/stepfunctions/state-machines/dao.go b/custom/stepfunctions/state-machines/dao.go index 54035cec..6e92ad62 100644 --- a/custom/stepfunctions/state-machines/dao.go +++ b/custom/stepfunctions/state-machines/dao.go @@ -22,7 +22,7 @@ type StateMachineDAO struct { func NewStateMachineDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new stepfunctions/state-machines dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &StateMachineDAO{ BaseDAO: dao.NewBaseDAO("stepfunctions", "state-machines"), diff --git a/custom/transcribe/jobs/constants.go b/custom/transcribe/jobs/constants.go new file mode 100644 index 00000000..134312af --- /dev/null +++ b/custom/transcribe/jobs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package jobs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "transcribe/jobs" diff --git a/custom/transcribe/jobs/dao.go b/custom/transcribe/jobs/dao.go index 56b2d030..12399d29 100644 --- a/custom/transcribe/jobs/dao.go +++ b/custom/transcribe/jobs/dao.go @@ -22,7 +22,7 @@ type JobDAO struct { func NewJobDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new transcribe/jobs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &JobDAO{ BaseDAO: dao.NewBaseDAO("transcribe", "jobs"), diff --git a/custom/transfer/servers/constants.go b/custom/transfer/servers/constants.go new file mode 100644 index 00000000..63d90867 --- /dev/null +++ b/custom/transfer/servers/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package servers + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "transfer/servers" diff --git a/custom/transfer/servers/dao.go b/custom/transfer/servers/dao.go index 721617f9..6f6e736b 100644 --- a/custom/transfer/servers/dao.go +++ b/custom/transfer/servers/dao.go @@ -21,7 +21,7 @@ type ServerDAO struct { func NewServerDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new transfer/servers dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &ServerDAO{ BaseDAO: dao.NewBaseDAO("transfer", "servers"), diff --git a/custom/transfer/users/constants.go b/custom/transfer/users/constants.go new file mode 100644 index 00000000..ceab3648 --- /dev/null +++ b/custom/transfer/users/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package users + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "transfer/users" diff --git a/custom/transfer/users/dao.go b/custom/transfer/users/dao.go index 4bc74c13..55f7b892 100644 --- a/custom/transfer/users/dao.go +++ b/custom/transfer/users/dao.go @@ -22,7 +22,7 @@ type UserDAO struct { func NewUserDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new transfer/users dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &UserDAO{ BaseDAO: dao.NewBaseDAO("transfer", "users"), diff --git a/custom/trustedadvisor/recommendations/constants.go b/custom/trustedadvisor/recommendations/constants.go new file mode 100644 index 00000000..451573cf --- /dev/null +++ b/custom/trustedadvisor/recommendations/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package recommendations + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "trustedadvisor/recommendations" diff --git a/custom/trustedadvisor/recommendations/dao.go b/custom/trustedadvisor/recommendations/dao.go index 42fc4fee..e68150f2 100644 --- a/custom/trustedadvisor/recommendations/dao.go +++ b/custom/trustedadvisor/recommendations/dao.go @@ -23,7 +23,7 @@ type RecommendationDAO struct { func NewRecommendationDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new trustedadvisor/recommendations dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RecommendationDAO{ BaseDAO: dao.NewBaseDAO("trustedadvisor", "recommendations"), diff --git a/custom/vpc/endpoints/constants.go b/custom/vpc/endpoints/constants.go new file mode 100644 index 00000000..f6633c9a --- /dev/null +++ b/custom/vpc/endpoints/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package vpcendpoints + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/endpoints" diff --git a/custom/vpc/endpoints/dao.go b/custom/vpc/endpoints/dao.go index 7cb54f14..fecccd32 100644 --- a/custom/vpc/endpoints/dao.go +++ b/custom/vpc/endpoints/dao.go @@ -23,7 +23,7 @@ type VpcEndpointDAO struct { func NewVpcEndpointDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/endpoints dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VpcEndpointDAO{ BaseDAO: dao.NewBaseDAO("vpc", "endpoints"), diff --git a/custom/vpc/internet-gateways/constants.go b/custom/vpc/internet-gateways/constants.go new file mode 100644 index 00000000..883ebde4 --- /dev/null +++ b/custom/vpc/internet-gateways/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package internetgateways + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/internet-gateways" diff --git a/custom/vpc/internet-gateways/dao.go b/custom/vpc/internet-gateways/dao.go index 7003b616..6053f19c 100644 --- a/custom/vpc/internet-gateways/dao.go +++ b/custom/vpc/internet-gateways/dao.go @@ -22,7 +22,7 @@ type InternetGatewayDAO struct { func NewInternetGatewayDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/internetgateways dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &InternetGatewayDAO{ BaseDAO: dao.NewBaseDAO("vpc", "internet-gateways"), diff --git a/custom/vpc/nat-gateways/constants.go b/custom/vpc/nat-gateways/constants.go new file mode 100644 index 00000000..dd7ff63f --- /dev/null +++ b/custom/vpc/nat-gateways/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package natgateways + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/nat-gateways" diff --git a/custom/vpc/nat-gateways/dao.go b/custom/vpc/nat-gateways/dao.go index deb77f3a..7608180d 100644 --- a/custom/vpc/nat-gateways/dao.go +++ b/custom/vpc/nat-gateways/dao.go @@ -22,7 +22,7 @@ type NatGatewayDAO struct { func NewNatGatewayDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/natgateways dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &NatGatewayDAO{ BaseDAO: dao.NewBaseDAO("vpc", "nat-gateways"), diff --git a/custom/vpc/route-tables/constants.go b/custom/vpc/route-tables/constants.go new file mode 100644 index 00000000..7a18778b --- /dev/null +++ b/custom/vpc/route-tables/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package routetables + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/route-tables" diff --git a/custom/vpc/route-tables/dao.go b/custom/vpc/route-tables/dao.go index 489ebcfc..c92569a4 100644 --- a/custom/vpc/route-tables/dao.go +++ b/custom/vpc/route-tables/dao.go @@ -22,7 +22,7 @@ type RouteTableDAO struct { func NewRouteTableDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/routetables dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &RouteTableDAO{ BaseDAO: dao.NewBaseDAO("vpc", "route-tables"), diff --git a/custom/vpc/subnets/constants.go b/custom/vpc/subnets/constants.go new file mode 100644 index 00000000..b33b12e7 --- /dev/null +++ b/custom/vpc/subnets/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package subnets + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/subnets" diff --git a/custom/vpc/subnets/dao.go b/custom/vpc/subnets/dao.go index 21601890..8dde504d 100644 --- a/custom/vpc/subnets/dao.go +++ b/custom/vpc/subnets/dao.go @@ -22,7 +22,7 @@ type SubnetDAO struct { func NewSubnetDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/subnets dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &SubnetDAO{ BaseDAO: dao.NewBaseDAO("vpc", "subnets"), diff --git a/custom/vpc/tgw-attachments/constants.go b/custom/vpc/tgw-attachments/constants.go new file mode 100644 index 00000000..6317acfa --- /dev/null +++ b/custom/vpc/tgw-attachments/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package tgwattachments + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/tgw-attachments" diff --git a/custom/vpc/tgw-attachments/dao.go b/custom/vpc/tgw-attachments/dao.go index 1c34086c..4f0a46e9 100644 --- a/custom/vpc/tgw-attachments/dao.go +++ b/custom/vpc/tgw-attachments/dao.go @@ -23,7 +23,7 @@ type TGWAttachmentDAO struct { func NewTGWAttachmentDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/tgw-attachments dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TGWAttachmentDAO{ BaseDAO: dao.NewBaseDAO("vpc", "tgw-attachments"), diff --git a/custom/vpc/transit-gateways/constants.go b/custom/vpc/transit-gateways/constants.go new file mode 100644 index 00000000..bf537e91 --- /dev/null +++ b/custom/vpc/transit-gateways/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package transitgateways + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/transit-gateways" diff --git a/custom/vpc/transit-gateways/dao.go b/custom/vpc/transit-gateways/dao.go index d24e5502..85c1d3b7 100644 --- a/custom/vpc/transit-gateways/dao.go +++ b/custom/vpc/transit-gateways/dao.go @@ -23,7 +23,7 @@ type TransitGatewayDAO struct { func NewTransitGatewayDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/transitgateways dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TransitGatewayDAO{ BaseDAO: dao.NewBaseDAO("ec2", "transit-gateways"), diff --git a/custom/vpc/vpcs/constants.go b/custom/vpc/vpcs/constants.go new file mode 100644 index 00000000..ce675dd7 --- /dev/null +++ b/custom/vpc/vpcs/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package vpcs + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "vpc/vpcs" diff --git a/custom/vpc/vpcs/dao.go b/custom/vpc/vpcs/dao.go index 12f2f994..66204ff4 100644 --- a/custom/vpc/vpcs/dao.go +++ b/custom/vpc/vpcs/dao.go @@ -22,7 +22,7 @@ type VPCDAO struct { func NewVPCDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new vpc/vpcs dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &VPCDAO{ BaseDAO: dao.NewBaseDAO("vpc", "vpcs"), diff --git a/custom/wafv2/web-acls/constants.go b/custom/wafv2/web-acls/constants.go new file mode 100644 index 00000000..18ba2270 --- /dev/null +++ b/custom/wafv2/web-acls/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package webacls + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "wafv2/web-acls" diff --git a/custom/wafv2/web-acls/dao.go b/custom/wafv2/web-acls/dao.go index b2ca341d..b499fba8 100644 --- a/custom/wafv2/web-acls/dao.go +++ b/custom/wafv2/web-acls/dao.go @@ -22,7 +22,7 @@ type WebACLDAO struct { func NewWebACLDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new wafv2/webacls dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &WebACLDAO{ BaseDAO: dao.NewBaseDAO("wafv2", "web-acls"), diff --git a/custom/xray/groups/constants.go b/custom/xray/groups/constants.go new file mode 100644 index 00000000..75ae661c --- /dev/null +++ b/custom/xray/groups/constants.go @@ -0,0 +1,7 @@ +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package groups + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "xray/groups" diff --git a/custom/xray/groups/dao.go b/custom/xray/groups/dao.go index 7bef9f51..891dc0bd 100644 --- a/custom/xray/groups/dao.go +++ b/custom/xray/groups/dao.go @@ -21,7 +21,7 @@ type GroupDAO struct { func NewGroupDAO(ctx context.Context) (dao.DAO, error) { cfg, err := appaws.NewConfig(ctx) if err != nil { - return nil, apperrors.Wrap(err, "new xray/groups dao") + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &GroupDAO{ BaseDAO: dao.NewBaseDAO("xray", "groups"), diff --git a/internal/genimports/genimports.go b/internal/genimports/genimports.go index 216ce326..e100097f 100644 --- a/internal/genimports/genimports.go +++ b/internal/genimports/genimports.go @@ -1,6 +1,7 @@ package genimports import ( + "bufio" "os" "path/filepath" "sort" @@ -143,3 +144,71 @@ func GroupByService(packages []string) map[string][]string { return grouped } + +// PackageInfo contains information about a resource package. +type PackageInfo struct { + ImportPath string + Service string + Resource string + PackageName string + DirPath string +} + +// GetPackageInfo extracts detailed information from an import path. +func GetPackageInfo(projectRoot, importPath string) PackageInfo { + prefix := ModulePrefix + "/" + CustomDir + "/" + rest := strings.TrimPrefix(importPath, prefix) + parts := strings.SplitN(rest, "/", 2) + + service := parts[0] + resource := "" + if len(parts) > 1 { + resource = parts[1] + } + + dirPath := CustomDir + "/" + service + "/" + resource + pkgName := readPackageName(filepath.Join(projectRoot, dirPath, "register.go")) + if pkgName == "" { + pkgName = strings.ReplaceAll(resource, "-", "") + if idx := strings.LastIndex(pkgName, "/"); idx >= 0 { + pkgName = pkgName[idx+1:] + } + } + + return PackageInfo{ + ImportPath: importPath, + Service: service, + Resource: resource, + PackageName: pkgName, + DirPath: dirPath, + } +} + +func readPackageName(filePath string) string { + f, err := os.Open(filePath) + if err != nil { + return "" + } + defer func() { _ = f.Close() }() + + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if strings.HasPrefix(line, "package ") { + return strings.TrimPrefix(line, "package ") + } + } + return "" +} + +// GenerateConstantsFile generates the content for a constants.go file. +func GenerateConstantsFile(pkgName, service, resource string) []byte { + return []byte(`// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package ` + pkgName + ` + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "` + service + "/" + resource + `" +`) +} diff --git a/scripts/gen-imports/main.go b/scripts/gen-imports/main.go index 1035d42b..3b142c48 100644 --- a/scripts/gen-imports/main.go +++ b/scripts/gen-imports/main.go @@ -44,6 +44,29 @@ func main() { } fmt.Printf("Generated %s with %d imports\n", outputFileName, len(packages)) + + constantsCount, err := generateConstantsFiles(projectRoot, packages) + if err != nil { + fmt.Fprintf(os.Stderr, "Error generating constants files: %v\n", err) + os.Exit(1) + } + + fmt.Printf("Generated %d constants.go files\n", constantsCount) +} + +func generateConstantsFiles(projectRoot string, packages []string) (int, error) { + count := 0 + for _, pkg := range packages { + info := genimports.GetPackageInfo(projectRoot, pkg) + content := genimports.GenerateConstantsFile(info.PackageName, info.Service, info.Resource) + + outputPath := filepath.Join(projectRoot, info.DirPath, "constants.go") + if err := os.WriteFile(outputPath, content, 0o644); err != nil { + return count, fmt.Errorf("write %s: %w", outputPath, err) + } + count++ + } + return count, nil } func generateImportsFile(grouped map[string][]string) []byte { From 66b793f96a6b1bb43ea809049bad1609af843478 Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 02:28:27 +0000 Subject: [PATCH 2/6] test: add genimports tests and build verification - Add unit tests for GenerateConstantsFile, GetServiceDisplayName, GroupByService, GetPackageInfo functions - Add build verification step to gen-imports script to catch compilation errors early --- internal/genimports/genimports_test.go | 168 +++++++++++++++++++++++++ scripts/gen-imports/main.go | 16 +++ 2 files changed, 184 insertions(+) create mode 100644 internal/genimports/genimports_test.go diff --git a/internal/genimports/genimports_test.go b/internal/genimports/genimports_test.go new file mode 100644 index 00000000..c3164878 --- /dev/null +++ b/internal/genimports/genimports_test.go @@ -0,0 +1,168 @@ +package genimports + +import ( + "strings" + "testing" +) + +func TestGenerateConstantsFile(t *testing.T) { + tests := []struct { + name string + pkgName string + service string + resource string + wantPkg string + wantPath string + }{ + { + name: "simple package", + pkgName: "instances", + service: "ec2", + resource: "instances", + wantPkg: "package instances", + wantPath: `const ServiceResourcePath = "ec2/instances"`, + }, + { + name: "hyphenated resource", + pkgName: "trainingjobs", + service: "sagemaker", + resource: "training-jobs", + wantPkg: "package trainingjobs", + wantPath: `const ServiceResourcePath = "sagemaker/training-jobs"`, + }, + { + name: "hyphenated service and resource", + pkgName: "knowledgebases", + service: "bedrock-agent", + resource: "knowledge-bases", + wantPkg: "package knowledgebases", + wantPath: `const ServiceResourcePath = "bedrock-agent/knowledge-bases"`, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := string(GenerateConstantsFile(tt.pkgName, tt.service, tt.resource)) + + if !strings.HasPrefix(got, "// Code generated by go generate; DO NOT EDIT.") { + t.Error("missing generated code header") + } + if !strings.Contains(got, "// To regenerate: task gen-imports") { + t.Error("missing regenerate instruction") + } + if !strings.Contains(got, tt.wantPkg) { + t.Errorf("want package %q in output", tt.wantPkg) + } + if !strings.Contains(got, tt.wantPath) { + t.Errorf("want constant %q in output", tt.wantPath) + } + if !strings.Contains(got, "// ServiceResourcePath is the canonical path") { + t.Error("missing doc comment for constant") + } + }) + } +} + +func TestGetServiceDisplayName(t *testing.T) { + tests := []struct { + service string + want string + }{ + {"ec2", "EC2"}, + {"s3", "S3"}, + {"lambda", "Lambda"}, + {"bedrock-agent", "Bedrock Agent"}, + {"cloudformation", "Cloudformation"}, + {"cfn", "CloudFormation"}, + {"unknown", "Unknown"}, + } + + for _, tt := range tests { + t.Run(tt.service, func(t *testing.T) { + got := GetServiceDisplayName(tt.service) + if got != tt.want { + t.Errorf("GetServiceDisplayName(%q) = %q, want %q", tt.service, got, tt.want) + } + }) + } +} + +func TestGroupByService(t *testing.T) { + packages := []string{ + "github.com/clawscli/claws/custom/ec2/instances", + "github.com/clawscli/claws/custom/ec2/volumes", + "github.com/clawscli/claws/custom/s3/buckets", + "github.com/clawscli/claws/custom/lambda/functions", + } + + grouped := GroupByService(packages) + + if len(grouped["ec2"]) != 2 { + t.Errorf("ec2 should have 2 packages, got %d", len(grouped["ec2"])) + } + if len(grouped["s3"]) != 1 { + t.Errorf("s3 should have 1 package, got %d", len(grouped["s3"])) + } + if len(grouped["lambda"]) != 1 { + t.Errorf("lambda should have 1 package, got %d", len(grouped["lambda"])) + } +} + +func TestGetPackageInfo(t *testing.T) { + tests := []struct { + name string + importPath string + wantSvc string + wantRes string + wantDir string + }{ + { + name: "simple", + importPath: "github.com/clawscli/claws/custom/ec2/instances", + wantSvc: "ec2", + wantRes: "instances", + wantDir: "custom/ec2/instances", + }, + { + name: "hyphenated resource", + importPath: "github.com/clawscli/claws/custom/sagemaker/training-jobs", + wantSvc: "sagemaker", + wantRes: "training-jobs", + wantDir: "custom/sagemaker/training-jobs", + }, + { + name: "hyphenated service", + importPath: "github.com/clawscli/claws/custom/bedrock-agent/agents", + wantSvc: "bedrock-agent", + wantRes: "agents", + wantDir: "custom/bedrock-agent/agents", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + info := GetPackageInfo("", tt.importPath) + + if info.Service != tt.wantSvc { + t.Errorf("Service = %q, want %q", info.Service, tt.wantSvc) + } + if info.Resource != tt.wantRes { + t.Errorf("Resource = %q, want %q", info.Resource, tt.wantRes) + } + if info.DirPath != tt.wantDir { + t.Errorf("DirPath = %q, want %q", info.DirPath, tt.wantDir) + } + if info.ImportPath != tt.importPath { + t.Errorf("ImportPath = %q, want %q", info.ImportPath, tt.importPath) + } + }) + } +} + +func TestGetPackageInfoFallbackPackageName(t *testing.T) { + info := GetPackageInfo("", "github.com/clawscli/claws/custom/sagemaker/training-jobs") + + if info.PackageName != "trainingjobs" { + t.Errorf("PackageName = %q, want %q", info.PackageName, "trainingjobs") + } +} diff --git a/scripts/gen-imports/main.go b/scripts/gen-imports/main.go index 3b142c48..1f02458d 100644 --- a/scripts/gen-imports/main.go +++ b/scripts/gen-imports/main.go @@ -5,6 +5,7 @@ import ( "fmt" "go/format" "os" + "os/exec" "path/filepath" "sort" @@ -52,6 +53,21 @@ func main() { } fmt.Printf("Generated %d constants.go files\n", constantsCount) + + if err := verifyBuild(projectRoot); err != nil { + fmt.Fprintf(os.Stderr, "Build verification failed: %v\n", err) + os.Exit(1) + } + + fmt.Println("Build verification passed") +} + +func verifyBuild(projectRoot string) error { + cmd := exec.Command("go", "build", "./cmd/claws") + cmd.Dir = projectRoot + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + return cmd.Run() } func generateConstantsFiles(projectRoot string, packages []string) (int, error) { From 26296a9938cb84310a4eb6e85ed7d4587f73d9ea Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 02:49:49 +0000 Subject: [PATCH 3/6] refactor: rename cfn to cloudformation and unify display names - Rename custom/cfn/ to custom/cloudformation/ (AWS CLI convention) - Add registry.DefaultDisplayNames() as single source of truth - Remove duplicate ServiceDisplayNames map from genimports (-70 lines) - genimports now imports registry for display name lookup --- cmd/claws/imports_custom.go | 18 ++--- custom/{cfn => cloudformation}/client.go | 0 .../events/constants.go | 2 +- custom/{cfn => cloudformation}/events/dao.go | 0 .../events/register.go | 0 .../{cfn => cloudformation}/events/render.go | 0 .../outputs/constants.go | 2 +- custom/{cfn => cloudformation}/outputs/dao.go | 0 .../outputs/register.go | 0 .../{cfn => cloudformation}/outputs/render.go | 0 .../resources/constants.go | 2 +- .../{cfn => cloudformation}/resources/dao.go | 0 .../resources/register.go | 0 .../resources/render.go | 0 .../{cfn => cloudformation}/stacks/actions.go | 2 +- .../stacks/constants.go | 2 +- custom/{cfn => cloudformation}/stacks/dao.go | 0 .../stacks/register.go | 0 .../{cfn => cloudformation}/stacks/render.go | 0 .../stacks/resource_test.go | 0 internal/genimports/genimports.go | 75 +------------------ internal/genimports/genimports_test.go | 3 +- internal/registry/registry.go | 6 ++ 23 files changed, 24 insertions(+), 88 deletions(-) rename custom/{cfn => cloudformation}/client.go (100%) rename custom/{cfn => cloudformation}/events/constants.go (76%) rename custom/{cfn => cloudformation}/events/dao.go (100%) rename custom/{cfn => cloudformation}/events/register.go (100%) rename custom/{cfn => cloudformation}/events/render.go (100%) rename custom/{cfn => cloudformation}/outputs/constants.go (76%) rename custom/{cfn => cloudformation}/outputs/dao.go (100%) rename custom/{cfn => cloudformation}/outputs/register.go (100%) rename custom/{cfn => cloudformation}/outputs/render.go (100%) rename custom/{cfn => cloudformation}/resources/constants.go (75%) rename custom/{cfn => cloudformation}/resources/dao.go (100%) rename custom/{cfn => cloudformation}/resources/register.go (100%) rename custom/{cfn => cloudformation}/resources/render.go (100%) rename custom/{cfn => cloudformation}/stacks/actions.go (98%) rename custom/{cfn => cloudformation}/stacks/constants.go (76%) rename custom/{cfn => cloudformation}/stacks/dao.go (100%) rename custom/{cfn => cloudformation}/stacks/register.go (100%) rename custom/{cfn => cloudformation}/stacks/render.go (100%) rename custom/{cfn => cloudformation}/stacks/resource_test.go (100%) diff --git a/cmd/claws/imports_custom.go b/cmd/claws/imports_custom.go index cd0c3421..48191f0f 100644 --- a/cmd/claws/imports_custom.go +++ b/cmd/claws/imports_custom.go @@ -8,7 +8,7 @@ package main import ( - // Access Analyzer + // IAM Access Analyzer _ "github.com/clawscli/claws/custom/accessanalyzer/analyzers" _ "github.com/clawscli/claws/custom/accessanalyzer/findings" @@ -80,10 +80,10 @@ import ( _ "github.com/clawscli/claws/custom/ce/monitors" // CloudFormation - _ "github.com/clawscli/claws/custom/cfn/events" - _ "github.com/clawscli/claws/custom/cfn/outputs" - _ "github.com/clawscli/claws/custom/cfn/resources" - _ "github.com/clawscli/claws/custom/cfn/stacks" + _ "github.com/clawscli/claws/custom/cloudformation/events" + _ "github.com/clawscli/claws/custom/cloudformation/outputs" + _ "github.com/clawscli/claws/custom/cloudformation/resources" + _ "github.com/clawscli/claws/custom/cloudformation/stacks" // CloudFront _ "github.com/clawscli/claws/custom/cloudfront/distributions" @@ -155,7 +155,7 @@ import ( // ElastiCache _ "github.com/clawscli/claws/custom/elasticache/clusters" - // ELBv2 (ALB/NLB/GLB) + // Elastic Load Balancing _ "github.com/clawscli/claws/custom/elbv2/load-balancers" _ "github.com/clawscli/claws/custom/elbv2/target-groups" _ "github.com/clawscli/claws/custom/elbv2/targets" @@ -236,11 +236,11 @@ import ( _ "github.com/clawscli/claws/custom/redshift/clusters" _ "github.com/clawscli/claws/custom/redshift/snapshots" - // RI/SP (Reserved Instances, Savings Plans) + // RI/SP _ "github.com/clawscli/claws/custom/risp/reserved-instances" _ "github.com/clawscli/claws/custom/risp/savings-plans" - // Route53 + // Route 53 _ "github.com/clawscli/claws/custom/route53/hosted-zones" _ "github.com/clawscli/claws/custom/route53/record-sets" @@ -274,7 +274,7 @@ import ( // SQS _ "github.com/clawscli/claws/custom/sqs/queues" - // SSM + // Systems Manager _ "github.com/clawscli/claws/custom/ssm/parameters" // Step Functions diff --git a/custom/cfn/client.go b/custom/cloudformation/client.go similarity index 100% rename from custom/cfn/client.go rename to custom/cloudformation/client.go diff --git a/custom/cfn/events/constants.go b/custom/cloudformation/events/constants.go similarity index 76% rename from custom/cfn/events/constants.go rename to custom/cloudformation/events/constants.go index af357d54..e01cb5db 100644 --- a/custom/cfn/events/constants.go +++ b/custom/cloudformation/events/constants.go @@ -4,4 +4,4 @@ package events // ServiceResourcePath is the canonical path for this resource type. -const ServiceResourcePath = "cfn/events" +const ServiceResourcePath = "cloudformation/events" diff --git a/custom/cfn/events/dao.go b/custom/cloudformation/events/dao.go similarity index 100% rename from custom/cfn/events/dao.go rename to custom/cloudformation/events/dao.go diff --git a/custom/cfn/events/register.go b/custom/cloudformation/events/register.go similarity index 100% rename from custom/cfn/events/register.go rename to custom/cloudformation/events/register.go diff --git a/custom/cfn/events/render.go b/custom/cloudformation/events/render.go similarity index 100% rename from custom/cfn/events/render.go rename to custom/cloudformation/events/render.go diff --git a/custom/cfn/outputs/constants.go b/custom/cloudformation/outputs/constants.go similarity index 76% rename from custom/cfn/outputs/constants.go rename to custom/cloudformation/outputs/constants.go index 61bbd24d..c2a307f5 100644 --- a/custom/cfn/outputs/constants.go +++ b/custom/cloudformation/outputs/constants.go @@ -4,4 +4,4 @@ package outputs // ServiceResourcePath is the canonical path for this resource type. -const ServiceResourcePath = "cfn/outputs" +const ServiceResourcePath = "cloudformation/outputs" diff --git a/custom/cfn/outputs/dao.go b/custom/cloudformation/outputs/dao.go similarity index 100% rename from custom/cfn/outputs/dao.go rename to custom/cloudformation/outputs/dao.go diff --git a/custom/cfn/outputs/register.go b/custom/cloudformation/outputs/register.go similarity index 100% rename from custom/cfn/outputs/register.go rename to custom/cloudformation/outputs/register.go diff --git a/custom/cfn/outputs/render.go b/custom/cloudformation/outputs/render.go similarity index 100% rename from custom/cfn/outputs/render.go rename to custom/cloudformation/outputs/render.go diff --git a/custom/cfn/resources/constants.go b/custom/cloudformation/resources/constants.go similarity index 75% rename from custom/cfn/resources/constants.go rename to custom/cloudformation/resources/constants.go index a663800e..fcc78002 100644 --- a/custom/cfn/resources/constants.go +++ b/custom/cloudformation/resources/constants.go @@ -4,4 +4,4 @@ package resources // ServiceResourcePath is the canonical path for this resource type. -const ServiceResourcePath = "cfn/resources" +const ServiceResourcePath = "cloudformation/resources" diff --git a/custom/cfn/resources/dao.go b/custom/cloudformation/resources/dao.go similarity index 100% rename from custom/cfn/resources/dao.go rename to custom/cloudformation/resources/dao.go diff --git a/custom/cfn/resources/register.go b/custom/cloudformation/resources/register.go similarity index 100% rename from custom/cfn/resources/register.go rename to custom/cloudformation/resources/register.go diff --git a/custom/cfn/resources/render.go b/custom/cloudformation/resources/render.go similarity index 100% rename from custom/cfn/resources/render.go rename to custom/cloudformation/resources/render.go diff --git a/custom/cfn/stacks/actions.go b/custom/cloudformation/stacks/actions.go similarity index 98% rename from custom/cfn/stacks/actions.go rename to custom/cloudformation/stacks/actions.go index 2d29691f..36892a94 100644 --- a/custom/cfn/stacks/actions.go +++ b/custom/cloudformation/stacks/actions.go @@ -6,7 +6,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudformation" - cfnClient "github.com/clawscli/claws/custom/cfn" + cfnClient "github.com/clawscli/claws/custom/cloudformation" "github.com/clawscli/claws/internal/action" appaws "github.com/clawscli/claws/internal/aws" "github.com/clawscli/claws/internal/dao" diff --git a/custom/cfn/stacks/constants.go b/custom/cloudformation/stacks/constants.go similarity index 76% rename from custom/cfn/stacks/constants.go rename to custom/cloudformation/stacks/constants.go index 7ccefbc3..f1ebde2f 100644 --- a/custom/cfn/stacks/constants.go +++ b/custom/cloudformation/stacks/constants.go @@ -4,4 +4,4 @@ package stacks // ServiceResourcePath is the canonical path for this resource type. -const ServiceResourcePath = "cfn/stacks" +const ServiceResourcePath = "cloudformation/stacks" diff --git a/custom/cfn/stacks/dao.go b/custom/cloudformation/stacks/dao.go similarity index 100% rename from custom/cfn/stacks/dao.go rename to custom/cloudformation/stacks/dao.go diff --git a/custom/cfn/stacks/register.go b/custom/cloudformation/stacks/register.go similarity index 100% rename from custom/cfn/stacks/register.go rename to custom/cloudformation/stacks/register.go diff --git a/custom/cfn/stacks/render.go b/custom/cloudformation/stacks/render.go similarity index 100% rename from custom/cfn/stacks/render.go rename to custom/cloudformation/stacks/render.go diff --git a/custom/cfn/stacks/resource_test.go b/custom/cloudformation/stacks/resource_test.go similarity index 100% rename from custom/cfn/stacks/resource_test.go rename to custom/cloudformation/stacks/resource_test.go diff --git a/internal/genimports/genimports.go b/internal/genimports/genimports.go index e100097f..48a60743 100644 --- a/internal/genimports/genimports.go +++ b/internal/genimports/genimports.go @@ -6,6 +6,8 @@ import ( "path/filepath" "sort" "strings" + + "github.com/clawscli/claws/internal/registry" ) const ( @@ -53,79 +55,8 @@ func GetProjectRoot() (string, error) { return wd, nil } -var ServiceDisplayNames = map[string]string{ - "accessanalyzer": "Access Analyzer", - "acm": "ACM", - "apigateway": "API Gateway", - "apprunner": "App Runner", - "appsync": "AppSync", - "athena": "Athena", - "autoscaling": "Auto Scaling", - "backup": "AWS Backup", - "batch": "Batch", - "bedrock": "Bedrock", - "bedrock-agent": "Bedrock Agent", - "bedrock-agentcore": "Bedrock AgentCore", - "budgets": "Budgets", - "ce": "Cost Explorer", - "cfn": "CloudFormation", - "cloudfront": "CloudFront", - "cloudtrail": "CloudTrail", - "cloudwatch": "CloudWatch", - "codebuild": "CodeBuild", - "codepipeline": "CodePipeline", - "cognito-idp": "Cognito", - "compute-optimizer": "Compute Optimizer", - "configservice": "Config", - "datasync": "DataSync", - "detective": "Detective", - "directconnect": "Direct Connect", - "dynamodb": "DynamoDB", - "ec2": "EC2", - "ecr": "ECR", - "ecs": "ECS", - "elasticache": "ElastiCache", - "elbv2": "ELBv2 (ALB/NLB/GLB)", - "emr": "EMR", - "events": "EventBridge", - "fms": "Firewall Manager", - "glue": "Glue", - "guardduty": "GuardDuty", - "health": "Health", - "iam": "IAM", - "inspector2": "Inspector", - "kinesis": "Kinesis", - "kms": "KMS", - "lambda": "Lambda", - "license-manager": "License Manager", - "macie2": "Macie", - "network-firewall": "Network Firewall", - "opensearch": "OpenSearch", - "organizations": "Organizations", - "rds": "RDS", - "redshift": "Redshift", - "risp": "RI/SP (Reserved Instances, Savings Plans)", - "route53": "Route53", - "s3": "S3", - "s3vectors": "S3 Vectors", - "sagemaker": "SageMaker", - "secretsmanager": "Secrets Manager", - "securityhub": "Security Hub", - "service-quotas": "Service Quotas", - "sns": "SNS", - "sqs": "SQS", - "ssm": "SSM", - "stepfunctions": "Step Functions", - "transcribe": "Transcribe", - "transfer": "Transfer Family", - "trustedadvisor": "Trusted Advisor", - "vpc": "VPC", - "wafv2": "WAF", - "xray": "X-Ray", -} - func GetServiceDisplayName(service string) string { - if name, ok := ServiceDisplayNames[service]; ok { + if name, ok := registry.DefaultDisplayNames()[service]; ok { return name } return strings.ToUpper(service[:1]) + service[1:] diff --git a/internal/genimports/genimports_test.go b/internal/genimports/genimports_test.go index c3164878..719a57e1 100644 --- a/internal/genimports/genimports_test.go +++ b/internal/genimports/genimports_test.go @@ -72,8 +72,7 @@ func TestGetServiceDisplayName(t *testing.T) { {"s3", "S3"}, {"lambda", "Lambda"}, {"bedrock-agent", "Bedrock Agent"}, - {"cloudformation", "Cloudformation"}, - {"cfn", "CloudFormation"}, + {"cloudformation", "CloudFormation"}, {"unknown", "Unknown"}, } diff --git a/internal/registry/registry.go b/internal/registry/registry.go index 289fe3ad..61c17b3e 100644 --- a/internal/registry/registry.go +++ b/internal/registry/registry.go @@ -208,6 +208,12 @@ func defaultDisplayNames() map[string]string { } } +// DefaultDisplayNames returns the default service display names map. +// Used by code generation tools to maintain consistency with the UI. +func DefaultDisplayNames() map[string]string { + return defaultDisplayNames() +} + // defaultCategories returns the ordered list of service categories func defaultCategories() []ServiceCategory { return []ServiceCategory{ From bb4d4f50a2e88e5b6b92afdc504629755c41c881 Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 02:58:19 +0000 Subject: [PATCH 4/6] refactor: unify cloudformation package name with directory --- custom/cloudformation/client.go | 2 +- custom/cloudformation/stacks/actions.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/custom/cloudformation/client.go b/custom/cloudformation/client.go index 2e26983c..eb1d0746 100644 --- a/custom/cloudformation/client.go +++ b/custom/cloudformation/client.go @@ -1,4 +1,4 @@ -package cfn +package cloudformation import ( "context" diff --git a/custom/cloudformation/stacks/actions.go b/custom/cloudformation/stacks/actions.go index 36892a94..89a82e79 100644 --- a/custom/cloudformation/stacks/actions.go +++ b/custom/cloudformation/stacks/actions.go @@ -6,7 +6,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudformation" - cfnClient "github.com/clawscli/claws/custom/cloudformation" + cfn "github.com/clawscli/claws/custom/cloudformation" "github.com/clawscli/claws/internal/action" appaws "github.com/clawscli/claws/internal/aws" "github.com/clawscli/claws/internal/dao" @@ -56,7 +56,7 @@ func executeStackAction(ctx context.Context, act action.Action, resource dao.Res } func executeDeleteStack(ctx context.Context, resource dao.Resource) action.ActionResult { - client, err := cfnClient.GetClient(ctx) + client, err := cfn.GetClient(ctx) if err != nil { return action.ActionResult{Success: false, Error: err} } @@ -80,7 +80,7 @@ func executeDeleteStack(ctx context.Context, resource dao.Resource) action.Actio } func executeDetectStackDrift(ctx context.Context, resource dao.Resource) action.ActionResult { - client, err := cfnClient.GetClient(ctx) + client, err := cfn.GetClient(ctx) if err != nil { return action.ActionResult{Success: false, Error: err} } @@ -103,7 +103,7 @@ func executeDetectStackDrift(ctx context.Context, resource dao.Resource) action. } func executeCancelUpdateStack(ctx context.Context, resource dao.Resource) action.ActionResult { - client, err := cfnClient.GetClient(ctx) + client, err := cfn.GetClient(ctx) if err != nil { return action.ActionResult{Success: false, Error: err} } From 52550280c03c2fb38f4b292f0f2ac3e01f1f74ca Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 03:07:51 +0000 Subject: [PATCH 5/6] fix: transit-gateways BaseDAO consistency and improve genimports test coverage - Fix vpc/transit-gateways BaseDAO: ec2 -> vpc (match ServiceResourcePath) - Apply strings.CutPrefix modernization in readPackageName - Add comprehensive tests for FindRegisterPackages, GetProjectRoot, readPackageName - Improve genimports test coverage: 48.3% -> 94.8% --- custom/vpc/transit-gateways/dao.go | 2 +- internal/genimports/genimports.go | 4 +- internal/genimports/genimports_test.go | 230 +++++++++++++++++++++++++ 3 files changed, 233 insertions(+), 3 deletions(-) diff --git a/custom/vpc/transit-gateways/dao.go b/custom/vpc/transit-gateways/dao.go index 85c1d3b7..1466a002 100644 --- a/custom/vpc/transit-gateways/dao.go +++ b/custom/vpc/transit-gateways/dao.go @@ -26,7 +26,7 @@ func NewTransitGatewayDAO(ctx context.Context) (dao.DAO, error) { return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") } return &TransitGatewayDAO{ - BaseDAO: dao.NewBaseDAO("ec2", "transit-gateways"), + BaseDAO: dao.NewBaseDAO("vpc", "transit-gateways"), client: ec2.NewFromConfig(cfg), }, nil } diff --git a/internal/genimports/genimports.go b/internal/genimports/genimports.go index 48a60743..8e958e3c 100644 --- a/internal/genimports/genimports.go +++ b/internal/genimports/genimports.go @@ -125,8 +125,8 @@ func readPackageName(filePath string) string { scanner := bufio.NewScanner(f) for scanner.Scan() { line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, "package ") { - return strings.TrimPrefix(line, "package ") + if pkg, ok := strings.CutPrefix(line, "package "); ok { + return pkg } } return "" diff --git a/internal/genimports/genimports_test.go b/internal/genimports/genimports_test.go index 719a57e1..8e914739 100644 --- a/internal/genimports/genimports_test.go +++ b/internal/genimports/genimports_test.go @@ -1,6 +1,8 @@ package genimports import ( + "os" + "path/filepath" "strings" "testing" ) @@ -165,3 +167,231 @@ func TestGetPackageInfoFallbackPackageName(t *testing.T) { t.Errorf("PackageName = %q, want %q", info.PackageName, "trainingjobs") } } + +func TestFindRegisterPackages(t *testing.T) { + t.Run("finds register.go files", func(t *testing.T) { + tmpDir := t.TempDir() + svc1Dir := filepath.Join(tmpDir, "custom", "ec2", "instances") + svc2Dir := filepath.Join(tmpDir, "custom", "s3", "buckets") + + if err := os.MkdirAll(svc1Dir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.MkdirAll(svc2Dir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(svc1Dir, "register.go"), []byte("package instances\n"), 0o644); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(svc2Dir, "register.go"), []byte("package buckets\n"), 0o644); err != nil { + t.Fatal(err) + } + + packages, err := FindRegisterPackages(tmpDir) + if err != nil { + t.Fatalf("FindRegisterPackages() error = %v", err) + } + + if len(packages) != 2 { + t.Errorf("FindRegisterPackages() returned %d packages, want 2", len(packages)) + } + if len(packages) >= 2 && packages[0] > packages[1] { + t.Error("FindRegisterPackages() packages not sorted") + } + }) + + t.Run("returns error for missing custom dir", func(t *testing.T) { + tmpDir := t.TempDir() + + _, err := FindRegisterPackages(tmpDir) + if err == nil { + t.Error("FindRegisterPackages() expected error for missing custom dir") + } + }) + + t.Run("ignores non-register.go files", func(t *testing.T) { + tmpDir := t.TempDir() + svcDir := filepath.Join(tmpDir, "custom", "ec2", "instances") + if err := os.MkdirAll(svcDir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(svcDir, "dao.go"), []byte("package instances\n"), 0o644); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(svcDir, "render.go"), []byte("package instances\n"), 0o644); err != nil { + t.Fatal(err) + } + + packages, err := FindRegisterPackages(tmpDir) + if err != nil { + t.Fatalf("FindRegisterPackages() error = %v", err) + } + + if len(packages) != 0 { + t.Errorf("FindRegisterPackages() returned %d packages, want 0", len(packages)) + } + }) + + t.Run("handles hyphenated directories", func(t *testing.T) { + tmpDir := t.TempDir() + svcDir := filepath.Join(tmpDir, "custom", "bedrock-agent", "knowledge-bases") + if err := os.MkdirAll(svcDir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(svcDir, "register.go"), []byte("package knowledgebases\n"), 0o644); err != nil { + t.Fatal(err) + } + + packages, err := FindRegisterPackages(tmpDir) + if err != nil { + t.Fatalf("FindRegisterPackages() error = %v", err) + } + + if len(packages) != 1 { + t.Fatalf("FindRegisterPackages() returned %d packages, want 1", len(packages)) + } + + want := ModulePrefix + "/custom/bedrock-agent/knowledge-bases" + if packages[0] != want { + t.Errorf("FindRegisterPackages()[0] = %q, want %q", packages[0], want) + } + }) +} + +func TestGetProjectRoot(t *testing.T) { + t.Run("returns current dir when not in cmd/claws", func(t *testing.T) { + origWd, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + defer func() { _ = os.Chdir(origWd) }() + + tmpDir := t.TempDir() + if err := os.Chdir(tmpDir); err != nil { + t.Fatal(err) + } + + root, err := GetProjectRoot() + if err != nil { + t.Fatalf("GetProjectRoot() error = %v", err) + } + + if root != tmpDir { + t.Errorf("GetProjectRoot() = %q, want %q", root, tmpDir) + } + }) + + t.Run("goes up two levels from cmd/claws", func(t *testing.T) { + origWd, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + defer func() { _ = os.Chdir(origWd) }() + + tmpDir := t.TempDir() + cmdClawsDir := filepath.Join(tmpDir, "cmd", "claws") + if err := os.MkdirAll(cmdClawsDir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.Chdir(cmdClawsDir); err != nil { + t.Fatal(err) + } + + root, err := GetProjectRoot() + if err != nil { + t.Fatalf("GetProjectRoot() error = %v", err) + } + + expected := filepath.Join(cmdClawsDir, "..", "..") + if root != expected { + t.Errorf("GetProjectRoot() = %q, want %q", root, expected) + } + }) +} + +func TestReadPackageName(t *testing.T) { + t.Run("reads package name from file", func(t *testing.T) { + tmpDir := t.TempDir() + filePath := filepath.Join(tmpDir, "test.go") + content := "package mypackage\n\nfunc main() {}\n" + if err := os.WriteFile(filePath, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + + got := readPackageName(filePath) + if got != "mypackage" { + t.Errorf("readPackageName() = %q, want %q", got, "mypackage") + } + }) + + t.Run("returns empty string for missing file", func(t *testing.T) { + got := readPackageName("/nonexistent/path/file.go") + if got != "" { + t.Errorf("readPackageName() = %q, want empty string", got) + } + }) + + t.Run("returns empty string for file without package", func(t *testing.T) { + tmpDir := t.TempDir() + filePath := filepath.Join(tmpDir, "test.go") + content := "func main() {}\n" + if err := os.WriteFile(filePath, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + + got := readPackageName(filePath) + if got != "" { + t.Errorf("readPackageName() = %q, want empty string", got) + } + }) + + t.Run("handles package with trailing content", func(t *testing.T) { + tmpDir := t.TempDir() + filePath := filepath.Join(tmpDir, "test.go") + content := "package main // comment\n" + if err := os.WriteFile(filePath, []byte(content), 0o644); err != nil { + t.Fatal(err) + } + + got := readPackageName(filePath) + if got != "main // comment" { + t.Errorf("readPackageName() = %q, want %q", got, "main // comment") + } + }) + + t.Run("reads empty file", func(t *testing.T) { + tmpDir := t.TempDir() + filePath := filepath.Join(tmpDir, "empty.go") + if err := os.WriteFile(filePath, []byte(""), 0o644); err != nil { + t.Fatal(err) + } + + got := readPackageName(filePath) + if got != "" { + t.Errorf("readPackageName() = %q, want empty string", got) + } + }) +} + +func TestGetPackageInfoWithRealFile(t *testing.T) { + tmpDir := t.TempDir() + pkgDir := filepath.Join(tmpDir, "custom", "ec2", "instances") + if err := os.MkdirAll(pkgDir, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(pkgDir, "register.go"), []byte("package instances\n"), 0o644); err != nil { + t.Fatal(err) + } + + info := GetPackageInfo(tmpDir, "github.com/clawscli/claws/custom/ec2/instances") + + if info.PackageName != "instances" { + t.Errorf("PackageName = %q, want %q", info.PackageName, "instances") + } + if info.Service != "ec2" { + t.Errorf("Service = %q, want %q", info.Service, "ec2") + } + if info.Resource != "instances" { + t.Errorf("Resource = %q, want %q", info.Resource, "instances") + } +} From 546563fc44ae3362da4425019469c1b0e6df74a9 Mon Sep 17 00:00:00 2001 From: "m@yim.jp" Date: Sat, 3 Jan 2026 03:23:47 +0000 Subject: [PATCH 6/6] docs: add generated files section to adding-resources.md --- docs/adding-resources.md | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/adding-resources.md b/docs/adding-resources.md index 9a3d4cac..43115979 100644 --- a/docs/adding-resources.md +++ b/docs/adding-resources.md @@ -492,3 +492,48 @@ When implementing navigation between resources: 3. **DAO ignoring filter**: - The DAO's `List` method MUST check for filters using `dao.GetFilterFromContext()` + +## Generated Files + +When you run `task gen-imports`, the following files are auto-generated: + +### 1. `cmd/claws/imports_custom.go` +Blank imports that trigger `init()` registration for all resources. + +### 2. `custom///constants.go` +Contains the `ServiceResourcePath` constant used for consistent error messages: + +```go +// Code generated by go generate; DO NOT EDIT. +// To regenerate: task gen-imports + +package myresource + +// ServiceResourcePath is the canonical path for this resource type. +const ServiceResourcePath = "myservice/myresources" +``` + +**Usage in DAO:** +```go +func NewMyResourceDAO(ctx context.Context) (dao.DAO, error) { + cfg, err := appaws.NewConfig(ctx) + if err != nil { + return nil, apperrors.Wrap(err, "new "+ServiceResourcePath+" dao") + } + // ... +} +``` + +> ⚠️ **Never edit generated files manually.** Always use `task gen-imports` after adding new resources. + +### CI Verification + +The CI pipeline verifies that generated files are up-to-date: +```yaml +- name: Check generated files + run: | + go generate ./... + git diff --exit-code || (echo "Generated files are out of date. Run 'task gen-imports' and commit." && exit 1) +``` + +If CI fails with this check, run `task gen-imports` locally and commit the changes.