From 505cbd2591c3c6a414045fa9dcee76f810cf7686 Mon Sep 17 00:00:00 2001 From: Sylvia Moss Date: Thu, 25 Mar 2021 13:37:48 +0100 Subject: [PATCH] Vendor amazon plugin (#10800) * remove amazon from core * vendor amazon plugin * remove website content * Add amazon to docs-remote-plugins * update amazon reference links in the documentation * update amazon docs version to latest Co-authored-by: Adrien Delorme --- builder/amazon/chroot/builder_test.go | 251 - builder/amazon/chroot/copy_files_test.go | 51 - builder/amazon/chroot/device_test.go | 10 - .../amazon/chroot/step_attach_volume_test.go | 15 - .../amazon/chroot/step_create_volume_test.go | 97 - builder/amazon/chroot/step_flock_test.go | 15 - .../amazon/chroot/step_mount_device_test.go | 15 - .../amazon/chroot/step_register_ami_test.go | 216 - builder/amazon/common/access_config_test.go | 47 - builder/amazon/common/ami_config_test.go | 244 - builder/amazon/common/artifact_test.go | 90 - builder/amazon/common/block_device_test.go | 401 -- builder/amazon/common/build_filter_test.go | 31 - builder/amazon/common/errors_test.go | 70 - .../common/interpolate_build_info_test.go | 91 - builder/amazon/common/run_config_test.go | 251 - builder/amazon/common/ssh_test.go | 141 - builder/amazon/common/state_test.go | 66 - .../common/step_ami_region_copy_test.go | 404 -- .../amazon/common/step_pre_validate_test.go | 70 - .../common/step_run_spot_instance_test.go | 366 -- .../common/step_source_ami_info_test.go | 43 - builder/amazon/common/template_funcs_test.go | 16 - builder/amazon/ebs/acceptance/aws.go | 46 - .../ebs/acceptance/builder_acceptance.go | 59 - .../acceptance/test-fixtures/amazon-ebs.txt | 12 - .../test-fixtures/amazon-ebs_windows.txt | 23 - .../test-fixtures/scripts/bootstrap_win.txt | 40 - builder/amazon/ebs/builder_acc_test.go | 396 -- builder/amazon/ebs/builder_test.go | 166 - builder/amazon/ebs/tags_acc_test.go | 137 - builder/amazon/ebssurrogate/builder_test.go | 110 - .../ebssurrogate/step_register_ami_test.go | 249 - builder/amazon/ebsvolume/artifact_test.go | 29 - builder/amazon/ebsvolume/builder_test.go | 166 - .../step_snapshot_ebs_volumes_test.go | 170 - .../amazon/examples/apache_server/README.Md | 1 - .../amazon/examples/apache_server/apache.json | 31 - .../amazon/examples/apache_server/packages.sh | 6 - .../amazon/examples/nginx_server/README.Md | 1 - .../amazon/examples/nginx_server/nginx.json | 31 - .../amazon/examples/nginx_server/packages.sh | 4 - builder/amazon/instance/builder_test.go | 343 -- builder/amazon/version/version.go | 13 - cmd/packer-plugin-amazon/main.go | 31 - command/exec_test.go | 2 +- command/hcl2_upgrade.go | 6 +- command/plugin.go | 111 +- .../hcl2_upgrade/complete/expected.pkr.hcl | 4 +- command/vendored_plugins.go | 30 +- datasource/amazon/ami/data_acc_test.go | 64 - datasource/amazon/ami/data_test.go | 45 - .../test-fixtures/configure-source-ssh.ps1 | 161 - .../amazon/secretsmanager/data_acc_test.go | 179 - datasource/amazon/secretsmanager/data_test.go | 39 - go.mod | 16 +- go.sum | 37 +- .../amazon-import/version/version.go | 13 - .../go-textseg/v12/textseg/emoji_table.rl | 290 -- .../v12/textseg/grapheme_clusters.go | 4078 ---------------- .../go-textseg/{v12 => v13}/LICENSE | 0 .../{v12 => v13}/textseg/all_tokens.go | 0 .../go-textseg/v13/textseg/emoji_table.rl | 525 +++ .../{v12 => v13}/textseg/generate.go | 4 +- .../v13/textseg/grapheme_clusters.go | 4138 +++++++++++++++++ .../{v12 => v13}/textseg/grapheme_clusters.rl | 0 .../textseg/grapheme_clusters_table.rl | 24 +- .../go-textseg/{v12 => v13}/textseg/tables.go | 0 .../{v12 => v13}/textseg/unicode2ragel.rb | 2 +- .../{v12 => v13}/textseg/utf8_seqs.go | 0 .../aws/aws-sdk-go/aws/endpoints/defaults.go | 175 +- .../aws/aws-sdk-go/aws/signer/v4/v4.go | 5 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws-sdk-go/internal/s3shared/arn/arn.go | 18 +- .../s3shared/arn/s3_object_lambda_arn.go | 15 + .../aws/aws-sdk-go/service/ec2/api.go | 116 +- .../aws/aws-sdk-go/service/iam/api.go | 16 + .../aws/aws-sdk-go/service/s3/api.go | 1890 +++++--- .../aws-sdk-go/service/s3/customizations.go | 2 + .../aws/aws-sdk-go/service/s3/endpoint.go | 102 +- .../aws-sdk-go/service/s3/endpoint_builder.go | 98 +- .../aws/aws-sdk-go/service/s3/errors.go | 6 +- .../service/s3/s3iface/interface.go | 4 + .../aws-sdk-go/service/s3/s3manager/arn.go | 23 + .../service/s3/s3manager/download.go | 4 + .../aws-sdk-go/service/s3/s3manager/upload.go | 4 + .../service/s3/s3manager/upload_input.go | 26 +- .../aws-sdk-go/service/secretsmanager/api.go | 927 +++- .../service/secretsmanager/errors.go | 5 +- .../secretsmanageriface/interface.go | 12 + .../aws/aws-sdk-go/service/ssm/api.go | 259 +- .../google/go-cmp/cmp/cmpopts/equate.go | 10 +- .../google/go-cmp/cmp/cmpopts/errors_go113.go | 15 + .../go-cmp/cmp/cmpopts/errors_xerrors.go | 18 + .../google/go-cmp/cmp/cmpopts/ignore.go | 2 +- .../google/go-cmp/cmp/cmpopts/sort.go | 2 +- .../go-cmp/cmp/cmpopts/struct_filter.go | 2 +- .../google/go-cmp/cmp/cmpopts/xform.go | 2 +- .../github.com/google/go-cmp/cmp/compare.go | 6 +- .../google/go-cmp/cmp/export_panic.go | 2 +- .../google/go-cmp/cmp/export_unsafe.go | 2 +- .../go-cmp/cmp/internal/diff/debug_disable.go | 2 +- .../go-cmp/cmp/internal/diff/debug_enable.go | 2 +- .../google/go-cmp/cmp/internal/diff/diff.go | 50 +- .../google/go-cmp/cmp/internal/flags/flags.go | 2 +- .../cmp/internal/flags/toolchain_legacy.go | 2 +- .../cmp/internal/flags/toolchain_recent.go | 2 +- .../go-cmp/cmp/internal/function/func.go | 2 +- .../google/go-cmp/cmp/internal/value/name.go | 2 +- .../cmp/internal/value/pointer_purego.go | 2 +- .../cmp/internal/value/pointer_unsafe.go | 2 +- .../google/go-cmp/cmp/internal/value/sort.go | 2 +- .../google/go-cmp/cmp/internal/value/zero.go | 2 +- .../github.com/google/go-cmp/cmp/options.go | 2 +- vendor/github.com/google/go-cmp/cmp/path.go | 2 +- vendor/github.com/google/go-cmp/cmp/report.go | 2 +- .../google/go-cmp/cmp/report_compare.go | 6 +- .../google/go-cmp/cmp/report_references.go | 2 +- .../google/go-cmp/cmp/report_reflect.go | 4 +- .../google/go-cmp/cmp/report_slices.go | 27 +- .../google/go-cmp/cmp/report_text.go | 2 +- .../google/go-cmp/cmp/report_value.go | 2 +- .../hashicorp/aws-sdk-go-base/CHANGELOG.md | 9 +- .../hashicorp/aws-sdk-go-base/awsauth.go | 13 +- .../hashicorp/go-cleanhttp/cleanhttp.go | 1 + .../github.com/hashicorp/go-cleanhttp/go.mod | 2 + .../hashicorp/go-multierror/.travis.yml | 12 - .../hashicorp/go-multierror/README.md | 29 +- .../hashicorp/go-multierror/append.go | 2 + .../github.com/hashicorp/go-multierror/go.mod | 2 +- .../hashicorp/go-multierror/multierror.go | 15 +- .../github.com/hashicorp/hcl/v2/CHANGELOG.md | 29 + .../github.com/hashicorp/hcl/v2/appveyor.yml | 13 - vendor/github.com/hashicorp/hcl/v2/go.mod | 6 +- vendor/github.com/hashicorp/hcl/v2/go.sum | 21 +- .../hashicorp/hcl/v2/hclsyntax/expression.go | 42 +- .../hcl/v2/hclsyntax/expression_template.go | 12 +- .../hashicorp/hcl/v2/hclsyntax/parser.go | 2 +- .../hcl/v2/hclsyntax/parser_template.go | 2 +- .../hashicorp/hcl/v2/hclsyntax/token.go | 2 +- .../hashicorp/hcl/v2/hclwrite/tokens.go | 2 +- .../hashicorp/hcl/v2/json/scanner.go | 2 +- vendor/github.com/hashicorp/hcl/v2/ops.go | 2 + .../hashicorp/hcl/v2/pos_scanner.go | 2 +- .../hashicorp/packer-plugin-amazon/LICENSE | 373 ++ .../builder}/chroot/builder.go | 2 +- .../builder}/chroot/builder.hcl2spec.go | 2 +- .../builder}/chroot/copy_files.go | 0 .../builder}/chroot/device.go | 0 .../builder}/chroot/lockfile.go | 0 .../builder}/chroot/lockfile_unix.go | 0 .../builder}/chroot/step_attach_volume.go | 2 +- .../builder}/chroot/step_check_root_device.go | 0 .../builder}/chroot/step_create_volume.go | 2 +- .../builder}/chroot/step_early_unflock.go | 0 .../builder}/chroot/step_flock.go | 0 .../builder}/chroot/step_instance_info.go | 0 .../builder}/chroot/step_mount_device.go | 0 .../builder}/chroot/step_prepare_device.go | 0 .../builder}/chroot/step_register_ami.go | 2 +- .../builder}/chroot/step_snapshot.go | 2 +- .../builder}/common/access_config.go | 2 +- .../builder}/common/access_config.hcl2spec.go | 0 .../builder}/common/ami_config.go | 0 .../builder}/common/ami_filter.go | 0 .../builder}/common/artifact.go | 0 .../builder}/common/awserrors/utils.go | 0 .../builder}/common/block_device.go | 0 .../builder}/common/block_device.hcl2spec.go | 0 .../builder}/common/build_filter.go | 0 .../builder}/common/errors.go | 0 .../builder}/common/helper_funcs.go | 2 +- .../builder}/common/interpolate_build_info.go | 0 .../builder}/common/regions.go | 0 .../builder}/common/run_config.go | 0 .../builder}/common/run_config.hcl2spec.go | 0 .../builder}/common/snapshot_config.go | 0 .../builder}/common/ssh.go | 0 .../builder}/common/ssm/session.go | 2 +- .../builder}/common/state.go | 0 .../builder}/common/state.hcl2spec.go | 0 .../builder}/common/step_ami_region_copy.go | 0 .../builder}/common/step_cleanup_volumes.go | 0 .../builder}/common/step_create_ssm_tunnel.go | 2 +- .../builder}/common/step_create_tags.go | 2 +- .../builder}/common/step_deregister_ami.go | 0 .../builder}/common/step_get_password.go | 0 .../common/step_iam_instance_profile.go | 0 .../builder}/common/step_key_pair.go | 0 .../common/step_modify_ami_attributes.go | 0 .../common/step_modify_ebs_instance.go | 0 .../builder}/common/step_network_info.go | 0 .../builder}/common/step_pre_validate.go | 2 +- .../common/step_run_source_instance.go | 2 +- .../builder}/common/step_run_spot_instance.go | 2 +- .../builder}/common/step_security_group.go | 0 .../common/step_set_generated_data.go | 0 .../builder}/common/step_source_ami_info.go | 0 .../builder}/common/step_stop_ebs_instance.go | 2 +- .../builder}/common/tags.go | 0 .../builder}/common/template_funcs.go | 0 .../builder}/common/test_helper_funcs.go | 0 .../builder}/ebs/builder.go | 2 +- .../builder}/ebs/builder.hcl2spec.go | 2 +- .../builder}/ebs/step_create_ami.go | 4 +- .../builder}/ebssurrogate/block_device.go | 2 +- .../builder}/ebssurrogate/builder.go | 2 +- .../builder}/ebssurrogate/builder.hcl2spec.go | 2 +- .../ebssurrogate/root_block_device.go | 0 .../ebssurrogate/step_register_ami.go | 2 +- .../ebssurrogate/step_snapshot_volumes.go | 2 +- .../builder}/ebsvolume/artifact.go | 0 .../builder}/ebsvolume/block_device.go | 2 +- .../builder}/ebsvolume/builder.go | 2 +- .../builder}/ebsvolume/builder.hcl2spec.go | 2 +- .../ebsvolume/step_snapshot_ebs_volumes.go | 2 +- .../ebsvolume/step_tag_ebs_volumes.go | 2 +- .../builder}/instance/builder.go | 2 +- .../builder}/instance/builder.hcl2spec.go | 2 +- .../builder}/instance/step_bundle_volume.go | 0 .../builder}/instance/step_register_ami.go | 2 +- .../builder}/instance/step_upload_bundle.go | 0 .../instance/step_upload_x509_cert.go | 0 .../datasource}/ami/data.go | 2 +- .../datasource}/ami/data.hcl2spec.go | 2 +- .../datasource}/secretsmanager/data.go | 4 +- .../secretsmanager/data.hcl2spec.go | 2 +- .../post-processor/import}/post-processor.go | 2 +- .../import}/post-processor.hcl2spec.go | 2 +- .../zclconf/go-cty/cty/convert/conversion.go | 27 +- .../cty/convert/conversion_collection.go | 57 +- .../go-cty/cty/convert/mismatch_msg.go | 4 + .../zclconf/go-cty/cty/convert/unify.go | 150 +- .../zclconf/go-cty/cty/function/function.go | 8 +- .../go-cty/cty/function/stdlib/collection.go | 12 +- .../go-cty/cty/function/stdlib/format.go | 2 +- .../go-cty/cty/function/stdlib/string.go | 3 +- .../zclconf/go-cty/cty/object_type.go | 2 +- vendor/github.com/zclconf/go-cty/cty/type.go | 41 + .../zclconf/go-cty/cty/value_init.go | 48 + .../zclconf/go-cty/cty/value_ops.go | 30 +- vendor/golang.org/x/sys/cpu/cpu_aix.go | 1 + vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 1 + vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 1 + .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 1 + .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 1 + vendor/golang.org/x/sys/cpu/cpu_linux.go | 1 + .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 1 + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 1 + .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 1 + vendor/golang.org/x/sys/cpu/cpu_other_arm.go | 1 + .../golang.org/x/sys/cpu/cpu_other_arm64.go | 4 +- .../golang.org/x/sys/cpu/cpu_other_mips64x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 1 + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 1 + vendor/golang.org/x/sys/cpu/cpu_wasm.go | 1 + vendor/golang.org/x/sys/cpu/cpu_x86.go | 1 + .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 4 +- .../x/sys/cpu/syscall_aix_ppc64_gc.go | 4 +- vendor/golang.org/x/sys/unix/aliases.go | 3 +- .../unix/{asm_freebsd_386.s => asm_bsd_386.s} | 10 +- .../{asm_darwin_amd64.s => asm_bsd_amd64.s} | 8 +- .../unix/{asm_freebsd_arm.s => asm_bsd_arm.s} | 8 +- .../{asm_netbsd_amd64.s => asm_bsd_arm64.s} | 8 +- vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 - vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 - .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 - .../x/sys/unix/asm_dragonfly_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_arm64.s | 29 - vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 - vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_netbsd_arm64.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_arm64.s | 29 - vendor/golang.org/x/sys/unix/asm_zos_s390x.s | 426 ++ vendor/golang.org/x/sys/unix/cap_freebsd.go | 1 + vendor/golang.org/x/sys/unix/constants.go | 3 +- vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 4 +- vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 4 +- vendor/golang.org/x/sys/unix/dev_zos.go | 29 + vendor/golang.org/x/sys/unix/dirent.go | 1 + vendor/golang.org/x/sys/unix/endian_big.go | 1 + vendor/golang.org/x/sys/unix/endian_little.go | 1 + vendor/golang.org/x/sys/unix/env_unix.go | 3 +- vendor/golang.org/x/sys/unix/epoll_zos.go | 221 + vendor/golang.org/x/sys/unix/fcntl.go | 1 + .../x/sys/unix/fcntl_linux_32bit.go | 1 + vendor/golang.org/x/sys/unix/fdset.go | 1 + vendor/golang.org/x/sys/unix/fstatfs_zos.go | 164 + vendor/golang.org/x/sys/unix/gccgo.go | 4 +- .../x/sys/unix/gccgo_linux_amd64.go | 1 + vendor/golang.org/x/sys/unix/ioctl.go | 1 + vendor/golang.org/x/sys/unix/ioctl_zos.go | 74 + vendor/golang.org/x/sys/unix/mkall.sh | 2 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 23 +- vendor/golang.org/x/sys/unix/pagesize_unix.go | 1 + vendor/golang.org/x/sys/unix/ptrace_darwin.go | 1 + vendor/golang.org/x/sys/unix/ptrace_ios.go | 1 + vendor/golang.org/x/sys/unix/race.go | 1 + vendor/golang.org/x/sys/unix/race0.go | 3 +- .../x/sys/unix/readdirent_getdents.go | 1 + .../x/sys/unix/readdirent_getdirentries.go | 1 + vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 3 +- .../x/sys/unix/sockcmsg_unix_other.go | 7 +- vendor/golang.org/x/sys/unix/str.go | 1 + vendor/golang.org/x/sys/unix/syscall.go | 3 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 13 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 4 +- .../x/sys/unix/syscall_aix_ppc64.go | 4 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 9 +- .../x/sys/unix/syscall_darwin.1_12.go | 1 + .../x/sys/unix/syscall_darwin.1_13.go | 1 + .../golang.org/x/sys/unix/syscall_darwin.go | 19 +- .../x/sys/unix/syscall_darwin_386.go | 1 + .../x/sys/unix/syscall_darwin_amd64.go | 1 + .../x/sys/unix/syscall_darwin_arm64.go | 1 + .../x/sys/unix/syscall_darwin_libSystem.go | 1 + .../x/sys/unix/syscall_dragonfly.go | 18 +- .../x/sys/unix/syscall_dragonfly_amd64.go | 1 + .../golang.org/x/sys/unix/syscall_freebsd.go | 17 +- .../x/sys/unix/syscall_freebsd_386.go | 1 + .../x/sys/unix/syscall_freebsd_amd64.go | 1 + .../x/sys/unix/syscall_freebsd_arm.go | 1 + .../x/sys/unix/syscall_freebsd_arm64.go | 1 + .../golang.org/x/sys/unix/syscall_illumos.go | 54 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 108 +- .../x/sys/unix/syscall_linux_386.go | 7 +- .../x/sys/unix/syscall_linux_amd64.go | 3 +- .../x/sys/unix/syscall_linux_amd64_gc.go | 4 +- .../x/sys/unix/syscall_linux_arm.go | 11 +- .../x/sys/unix/syscall_linux_arm64.go | 3 +- .../golang.org/x/sys/unix/syscall_linux_gc.go | 1 + .../x/sys/unix/syscall_linux_gc_386.go | 1 + .../x/sys/unix/syscall_linux_gc_arm.go | 1 + .../x/sys/unix/syscall_linux_gccgo_386.go | 1 + .../x/sys/unix/syscall_linux_gccgo_arm.go | 1 + .../x/sys/unix/syscall_linux_mips64x.go | 3 +- .../x/sys/unix/syscall_linux_mipsx.go | 9 +- .../x/sys/unix/syscall_linux_ppc64x.go | 5 +- .../x/sys/unix/syscall_linux_riscv64.go | 3 +- .../x/sys/unix/syscall_linux_s390x.go | 5 +- .../x/sys/unix/syscall_linux_sparc64.go | 5 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 21 +- .../x/sys/unix/syscall_netbsd_386.go | 1 + .../x/sys/unix/syscall_netbsd_amd64.go | 1 + .../x/sys/unix/syscall_netbsd_arm.go | 1 + .../x/sys/unix/syscall_netbsd_arm64.go | 1 + .../golang.org/x/sys/unix/syscall_openbsd.go | 4 +- .../x/sys/unix/syscall_openbsd_386.go | 1 + .../x/sys/unix/syscall_openbsd_amd64.go | 1 + .../x/sys/unix/syscall_openbsd_arm.go | 1 + .../x/sys/unix/syscall_openbsd_arm64.go | 1 + .../golang.org/x/sys/unix/syscall_solaris.go | 10 +- .../x/sys/unix/syscall_solaris_amd64.go | 1 + vendor/golang.org/x/sys/unix/syscall_unix.go | 1 + .../golang.org/x/sys/unix/syscall_unix_gc.go | 5 +- .../x/sys/unix/syscall_unix_gc_ppc64x.go | 1 + .../x/sys/unix/syscall_zos_s390x.go | 1781 +++++++ vendor/golang.org/x/sys/unix/timestruct.go | 3 +- vendor/golang.org/x/sys/unix/xattr_bsd.go | 1 + .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1 + .../x/sys/unix/zerrors_aix_ppc64.go | 1 + .../x/sys/unix/zerrors_darwin_386.go | 1 + .../x/sys/unix/zerrors_darwin_amd64.go | 63 +- .../x/sys/unix/zerrors_darwin_arm.go | 1 + .../x/sys/unix/zerrors_darwin_arm64.go | 63 +- .../x/sys/unix/zerrors_dragonfly_amd64.go | 1 + .../x/sys/unix/zerrors_freebsd_386.go | 7 + .../x/sys/unix/zerrors_freebsd_amd64.go | 7 + .../x/sys/unix/zerrors_freebsd_arm.go | 7 + .../x/sys/unix/zerrors_freebsd_arm64.go | 7 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 23 +- .../x/sys/unix/zerrors_linux_386.go | 11 + .../x/sys/unix/zerrors_linux_amd64.go | 11 + .../x/sys/unix/zerrors_linux_arm.go | 11 + .../x/sys/unix/zerrors_linux_arm64.go | 12 + .../x/sys/unix/zerrors_linux_mips.go | 11 + .../x/sys/unix/zerrors_linux_mips64.go | 11 + .../x/sys/unix/zerrors_linux_mips64le.go | 11 + .../x/sys/unix/zerrors_linux_mipsle.go | 11 + .../x/sys/unix/zerrors_linux_ppc64.go | 11 + .../x/sys/unix/zerrors_linux_ppc64le.go | 11 + .../x/sys/unix/zerrors_linux_riscv64.go | 11 + .../x/sys/unix/zerrors_linux_s390x.go | 11 + .../x/sys/unix/zerrors_linux_sparc64.go | 11 + .../x/sys/unix/zerrors_netbsd_386.go | 1 + .../x/sys/unix/zerrors_netbsd_amd64.go | 1 + .../x/sys/unix/zerrors_netbsd_arm.go | 1 + .../x/sys/unix/zerrors_netbsd_arm64.go | 1 + .../x/sys/unix/zerrors_openbsd_386.go | 1 + .../x/sys/unix/zerrors_openbsd_amd64.go | 1 + .../x/sys/unix/zerrors_openbsd_arm.go | 1 + .../x/sys/unix/zerrors_openbsd_arm64.go | 1 + .../x/sys/unix/zerrors_openbsd_mips64.go | 1 + .../x/sys/unix/zerrors_solaris_amd64.go | 1 + .../x/sys/unix/zerrors_zos_s390x.go | 831 ++++ .../x/sys/unix/zptrace_armnn_linux.go | 1 + .../x/sys/unix/zptrace_mipsnn_linux.go | 1 + .../x/sys/unix/zptrace_mipsnnle_linux.go | 1 + .../x/sys/unix/zptrace_x86_linux.go | 1 + .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1 + .../x/sys/unix/zsyscall_aix_ppc64.go | 1 + .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 4 +- .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 4 +- .../x/sys/unix/zsyscall_darwin_386.1_13.go | 1 + .../x/sys/unix/zsyscall_darwin_386.go | 1 + .../x/sys/unix/zsyscall_darwin_amd64.1_13.go | 1 + .../x/sys/unix/zsyscall_darwin_amd64.go | 1 + .../x/sys/unix/zsyscall_darwin_arm.1_13.go | 1 + .../x/sys/unix/zsyscall_darwin_arm.go | 1 + .../x/sys/unix/zsyscall_darwin_arm64.1_13.go | 1 + .../x/sys/unix/zsyscall_darwin_arm64.go | 1 + .../x/sys/unix/zsyscall_dragonfly_amd64.go | 7 +- .../x/sys/unix/zsyscall_freebsd_386.go | 1 + .../x/sys/unix/zsyscall_freebsd_amd64.go | 1 + .../x/sys/unix/zsyscall_freebsd_arm.go | 1 + .../x/sys/unix/zsyscall_freebsd_arm64.go | 1 + .../x/sys/unix/zsyscall_illumos_amd64.go | 29 +- .../golang.org/x/sys/unix/zsyscall_linux.go | 11 + .../x/sys/unix/zsyscall_linux_386.go | 1 + .../x/sys/unix/zsyscall_linux_amd64.go | 1 + .../x/sys/unix/zsyscall_linux_arm.go | 1 + .../x/sys/unix/zsyscall_linux_arm64.go | 1 + .../x/sys/unix/zsyscall_linux_mips.go | 1 + .../x/sys/unix/zsyscall_linux_mips64.go | 1 + .../x/sys/unix/zsyscall_linux_mips64le.go | 1 + .../x/sys/unix/zsyscall_linux_mipsle.go | 1 + .../x/sys/unix/zsyscall_linux_ppc64.go | 1 + .../x/sys/unix/zsyscall_linux_ppc64le.go | 1 + .../x/sys/unix/zsyscall_linux_riscv64.go | 1 + .../x/sys/unix/zsyscall_linux_s390x.go | 1 + .../x/sys/unix/zsyscall_linux_sparc64.go | 1 + .../x/sys/unix/zsyscall_netbsd_386.go | 11 + .../x/sys/unix/zsyscall_netbsd_amd64.go | 11 + .../x/sys/unix/zsyscall_netbsd_arm.go | 11 + .../x/sys/unix/zsyscall_netbsd_arm64.go | 11 + .../x/sys/unix/zsyscall_openbsd_386.go | 1 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 1 + .../x/sys/unix/zsyscall_openbsd_arm.go | 1 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 1 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 1 + .../x/sys/unix/zsyscall_solaris_amd64.go | 20 +- .../x/sys/unix/zsyscall_zos_s390x.go | 1217 +++++ .../x/sys/unix/zsysctl_openbsd_386.go | 1 + .../x/sys/unix/zsysctl_openbsd_amd64.go | 1 + .../x/sys/unix/zsysctl_openbsd_arm.go | 1 + .../x/sys/unix/zsysctl_openbsd_arm64.go | 1 + .../x/sys/unix/zsysctl_openbsd_mips64.go | 1 + .../x/sys/unix/zsysnum_darwin_386.go | 1 + .../x/sys/unix/zsysnum_darwin_amd64.go | 1 + .../x/sys/unix/zsysnum_darwin_arm.go | 1 + .../x/sys/unix/zsysnum_darwin_arm64.go | 1 + .../x/sys/unix/zsysnum_dragonfly_amd64.go | 1 + .../x/sys/unix/zsysnum_freebsd_386.go | 1 + .../x/sys/unix/zsysnum_freebsd_amd64.go | 1 + .../x/sys/unix/zsysnum_freebsd_arm.go | 1 + .../x/sys/unix/zsysnum_freebsd_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_386.go | 2 + .../x/sys/unix/zsysnum_linux_amd64.go | 2 + .../x/sys/unix/zsysnum_linux_arm.go | 2 + .../x/sys/unix/zsysnum_linux_arm64.go | 2 + .../x/sys/unix/zsysnum_linux_mips.go | 2 + .../x/sys/unix/zsysnum_linux_mips64.go | 2 + .../x/sys/unix/zsysnum_linux_mips64le.go | 2 + .../x/sys/unix/zsysnum_linux_mipsle.go | 2 + .../x/sys/unix/zsysnum_linux_ppc64.go | 2 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 2 + .../x/sys/unix/zsysnum_linux_riscv64.go | 2 + .../x/sys/unix/zsysnum_linux_s390x.go | 2 + .../x/sys/unix/zsysnum_linux_sparc64.go | 2 + .../x/sys/unix/zsysnum_netbsd_386.go | 1 + .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm64.go | 1 + .../x/sys/unix/zsysnum_openbsd_386.go | 1 + .../x/sys/unix/zsysnum_openbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm64.go | 1 + .../x/sys/unix/zsysnum_openbsd_mips64.go | 1 + .../x/sys/unix/zsysnum_zos_s390x.go | 2670 +++++++++++ .../golang.org/x/sys/unix/ztypes_aix_ppc.go | 1 + .../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 1 + .../x/sys/unix/ztypes_darwin_386.go | 1 + .../x/sys/unix/ztypes_darwin_amd64.go | 9 + .../x/sys/unix/ztypes_darwin_arm.go | 1 + .../x/sys/unix/ztypes_darwin_arm64.go | 9 + .../x/sys/unix/ztypes_dragonfly_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_386.go | 10 + .../x/sys/unix/ztypes_freebsd_amd64.go | 10 + .../x/sys/unix/ztypes_freebsd_arm.go | 10 + .../x/sys/unix/ztypes_freebsd_arm64.go | 10 + .../x/sys/unix/ztypes_illumos_amd64.go | 40 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 46 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 1 + .../x/sys/unix/ztypes_linux_amd64.go | 1 + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 1 + .../x/sys/unix/ztypes_linux_arm64.go | 1 + .../x/sys/unix/ztypes_linux_mips.go | 1 + .../x/sys/unix/ztypes_linux_mips64.go | 1 + .../x/sys/unix/ztypes_linux_mips64le.go | 1 + .../x/sys/unix/ztypes_linux_mipsle.go | 1 + .../x/sys/unix/ztypes_linux_ppc64.go | 1 + .../x/sys/unix/ztypes_linux_ppc64le.go | 1 + .../x/sys/unix/ztypes_linux_riscv64.go | 1 + .../x/sys/unix/ztypes_linux_s390x.go | 1 + .../x/sys/unix/ztypes_linux_sparc64.go | 1 + .../x/sys/unix/ztypes_netbsd_386.go | 1 + .../x/sys/unix/ztypes_netbsd_amd64.go | 1 + .../x/sys/unix/ztypes_netbsd_arm.go | 1 + .../x/sys/unix/ztypes_netbsd_arm64.go | 1 + .../x/sys/unix/ztypes_openbsd_386.go | 1 + .../x/sys/unix/ztypes_openbsd_amd64.go | 1 + .../x/sys/unix/ztypes_openbsd_arm.go | 1 + .../x/sys/unix/ztypes_openbsd_arm64.go | 1 + .../x/sys/unix/ztypes_openbsd_mips64.go | 1 + .../x/sys/unix/ztypes_solaris_amd64.go | 1 + .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 402 ++ .../golang.org/x/sys/windows/exec_windows.go | 35 + vendor/golang.org/x/sys/windows/mkerrors.bash | 7 + .../x/sys/windows/security_windows.go | 13 + .../x/sys/windows/syscall_windows.go | 190 +- .../golang.org/x/sys/windows/types_windows.go | 681 +++ .../x/sys/windows/types_windows_arm64.go | 34 + .../x/sys/windows/zerrors_windows.go | 2619 ++++++++++- .../x/sys/windows/zsyscall_windows.go | 337 +- vendor/modules.txt | 34 +- .../content/docs/builders/amazon/chroot.mdx | 589 --- website/content/docs/builders/amazon/ebs.mdx | 685 --- .../docs/builders/amazon/ebssurrogate.mdx | 368 -- .../docs/builders/amazon/ebsvolume.mdx | 393 -- .../content/docs/builders/amazon/index.mdx | 369 -- .../content/docs/builders/amazon/instance.mdx | 385 -- .../content/docs/datasources/amazon/ami.mdx | 41 - .../content/docs/datasources/amazon/index.mdx | 42 - .../datasources/amazon/secretsmanager.mdx | 51 - .../plugins/creation/custom-datasources.mdx | 2 +- .../docs/post-processors/amazon-import.mdx | 257 - .../hcl_templates/contextual-variables.mdx | 10 +- .../legacy_json_templates/engine.mdx | 10 +- .../guides/hcl/component-object-spec.mdx | 2 +- .../amazon/chroot/Config-not-required.mdx | 154 - .../builder/amazon/chroot/Config-required.mdx | 6 - .../partials/builder/amazon/chroot/Config.mdx | 4 - .../amazon/common/AMIConfig-not-required.mdx | 118 - .../amazon/common/AMIConfig-required.mdx | 6 - .../builder/amazon/common/AMIConfig.mdx | 3 - .../common/AWSPollingConfig-not-required.mdx | 11 - .../amazon/common/AWSPollingConfig.mdx | 20 - .../common/AccessConfig-not-required.mdx | 92 - .../amazon/common/AccessConfig-required.mdx | 14 - .../builder/amazon/common/AccessConfig.mdx | 3 - .../common/AmiFilterOptions-not-required.mdx | 14 - .../common/AssumeRoleConfig-not-required.mdx | 20 - .../amazon/common/AssumeRoleConfig.mdx | 31 - .../common/BlockDevice-not-required.mdx | 49 - .../builder/amazon/common/BlockDevice.mdx | 36 - .../common/MetadataOptions-not-required.mdx | 10 - .../builder/amazon/common/MetadataOptions.mdx | 4 - .../common/PolicyDocument-not-required.mdx | 5 - .../amazon/common/RunConfig-not-required.mdx | 414 -- .../amazon/common/RunConfig-required.mdx | 8 - .../builder/amazon/common/RunConfig.mdx | 4 - .../common/SnapshotConfig-not-required.mdx | 21 - .../builder/amazon/common/SnapshotConfig.mdx | 3 - .../builder/amazon/common/StateChangeConf.mdx | 3 - .../amazon/common/Statement-not-required.mdx | 7 - .../SubnetFilterOptions-not-required.mdx | 5 - .../VaultAWSEngineOptions-not-required.mdx | 17 - .../amazon/ebs/Config-not-required.mdx | 41 - .../ebssurrogate/BlockDevice-not-required.mdx | 7 - .../ebssurrogate/Config-not-required.mdx | 31 - .../amazon/ebssurrogate/Config-required.mdx | 9 - .../RootBlockDevice-not-required.mdx | 26 - .../ebsvolume/BlockDevice-not-required.mdx | 12 - .../amazon/ebsvolume/Config-not-required.mdx | 43 - .../amazon/instance/Config-not-required.mdx | 38 - .../amazon/instance/Config-required.mdx | 15 - .../builder/amazon/instance/Config.mdx | 4 - .../builders/aws-common-block-device-a-i.mdx | 19 - .../builders/aws-common-block-device-i-v.mdx | 17 - .../builders/aws-common-opional-fields.mdx | 7 - .../partials/builders/aws-session-manager.mdx | 102 - .../partials/builders/aws-spot-docs.mdx | 32 - .../aws-ssh-differentiation-table.mdx | 11 - website/content/partials/datasource/.gitkeep | 0 .../amazon/ami/DatasourceOutput.mdx | 13 - .../secretsmanager/Config-not-required.mdx | 10 - .../amazon/secretsmanager/Config-required.mdx | 4 - .../secretsmanager/DatasourceOutput.mdx | 12 - website/data/docs-nav-data.json | 50 - website/data/docs-navigation.js | 336 -- website/data/docs-remote-plugins.json | 6 + 599 files changed, 21566 insertions(+), 16720 deletions(-) delete mode 100644 builder/amazon/chroot/builder_test.go delete mode 100644 builder/amazon/chroot/copy_files_test.go delete mode 100644 builder/amazon/chroot/device_test.go delete mode 100644 builder/amazon/chroot/step_attach_volume_test.go delete mode 100644 builder/amazon/chroot/step_create_volume_test.go delete mode 100644 builder/amazon/chroot/step_flock_test.go delete mode 100644 builder/amazon/chroot/step_mount_device_test.go delete mode 100644 builder/amazon/chroot/step_register_ami_test.go delete mode 100644 builder/amazon/common/access_config_test.go delete mode 100644 builder/amazon/common/ami_config_test.go delete mode 100644 builder/amazon/common/artifact_test.go delete mode 100644 builder/amazon/common/block_device_test.go delete mode 100644 builder/amazon/common/build_filter_test.go delete mode 100644 builder/amazon/common/errors_test.go delete mode 100644 builder/amazon/common/interpolate_build_info_test.go delete mode 100644 builder/amazon/common/run_config_test.go delete mode 100644 builder/amazon/common/ssh_test.go delete mode 100644 builder/amazon/common/state_test.go delete mode 100644 builder/amazon/common/step_ami_region_copy_test.go delete mode 100644 builder/amazon/common/step_pre_validate_test.go delete mode 100644 builder/amazon/common/step_run_spot_instance_test.go delete mode 100644 builder/amazon/common/step_source_ami_info_test.go delete mode 100644 builder/amazon/common/template_funcs_test.go delete mode 100644 builder/amazon/ebs/acceptance/aws.go delete mode 100644 builder/amazon/ebs/acceptance/builder_acceptance.go delete mode 100644 builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs.txt delete mode 100644 builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs_windows.txt delete mode 100644 builder/amazon/ebs/acceptance/test-fixtures/scripts/bootstrap_win.txt delete mode 100644 builder/amazon/ebs/builder_acc_test.go delete mode 100644 builder/amazon/ebs/builder_test.go delete mode 100644 builder/amazon/ebs/tags_acc_test.go delete mode 100644 builder/amazon/ebssurrogate/builder_test.go delete mode 100644 builder/amazon/ebssurrogate/step_register_ami_test.go delete mode 100644 builder/amazon/ebsvolume/artifact_test.go delete mode 100644 builder/amazon/ebsvolume/builder_test.go delete mode 100644 builder/amazon/ebsvolume/step_snapshot_ebs_volumes_test.go delete mode 100644 builder/amazon/examples/apache_server/README.Md delete mode 100644 builder/amazon/examples/apache_server/apache.json delete mode 100644 builder/amazon/examples/apache_server/packages.sh delete mode 100644 builder/amazon/examples/nginx_server/README.Md delete mode 100644 builder/amazon/examples/nginx_server/nginx.json delete mode 100644 builder/amazon/examples/nginx_server/packages.sh delete mode 100644 builder/amazon/instance/builder_test.go delete mode 100644 builder/amazon/version/version.go delete mode 100644 cmd/packer-plugin-amazon/main.go delete mode 100644 datasource/amazon/ami/data_acc_test.go delete mode 100644 datasource/amazon/ami/data_test.go delete mode 100644 datasource/amazon/ami/test-fixtures/configure-source-ssh.ps1 delete mode 100644 datasource/amazon/secretsmanager/data_acc_test.go delete mode 100644 datasource/amazon/secretsmanager/data_test.go delete mode 100644 post-processor/amazon-import/version/version.go delete mode 100644 vendor/github.com/apparentlymart/go-textseg/v12/textseg/emoji_table.rl delete mode 100644 vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.go rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/LICENSE (100%) rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/all_tokens.go (100%) create mode 100644 vendor/github.com/apparentlymart/go-textseg/v13/textseg/emoji_table.rl rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/generate.go (74%) create mode 100644 vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters.go rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/grapheme_clusters.rl (100%) rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/grapheme_clusters_table.rl (98%) rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/tables.go (100%) rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/unicode2ragel.rb (99%) rename vendor/github.com/apparentlymart/go-textseg/{v12 => v13}/textseg/utf8_seqs.go (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go create mode 100644 vendor/github.com/google/go-cmp/cmp/cmpopts/errors_go113.go create mode 100644 vendor/github.com/google/go-cmp/cmp/cmpopts/errors_xerrors.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/.travis.yml delete mode 100644 vendor/github.com/hashicorp/hcl/v2/appveyor.yml create mode 100644 vendor/github.com/hashicorp/packer-plugin-amazon/LICENSE rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/builder.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/builder.hcl2spec.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/copy_files.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/lockfile.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/lockfile_unix.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_attach_volume.go (97%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_check_root_device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_create_volume.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_early_unflock.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_flock.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_instance_info.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_mount_device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_prepare_device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_register_ami.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/chroot/step_snapshot.go (96%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/access_config.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/access_config.hcl2spec.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/ami_config.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/ami_filter.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/artifact.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/awserrors/utils.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/block_device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/block_device.hcl2spec.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/build_filter.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/errors.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/helper_funcs.go (96%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/interpolate_build_info.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/regions.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/run_config.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/run_config.hcl2spec.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/snapshot_config.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/ssh.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/ssm/session.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/state.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/state.hcl2spec.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_ami_region_copy.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_cleanup_volumes.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_create_ssm_tunnel.go (97%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_create_tags.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_deregister_ami.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_get_password.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_iam_instance_profile.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_key_pair.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_modify_ami_attributes.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_modify_ebs_instance.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_network_info.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_pre_validate.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_run_source_instance.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_run_spot_instance.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_security_group.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_set_generated_data.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_source_ami_info.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/step_stop_ebs_instance.go (97%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/tags.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/template_funcs.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/common/test_helper_funcs.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebs/builder.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebs/builder.hcl2spec.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebs/step_create_ami.go (97%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/block_device.go (95%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/builder.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/builder.hcl2spec.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/root_block_device.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/step_register_ami.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebssurrogate/step_snapshot_volumes.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/artifact.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/block_device.go (96%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/builder.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/builder.hcl2spec.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/step_snapshot_ebs_volumes.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/ebsvolume/step_tag_ebs_volumes.go (98%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/builder.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/builder.hcl2spec.go (99%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/step_bundle_volume.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/step_register_ami.go (97%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/step_upload_bundle.go (100%) rename {builder/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/builder}/instance/step_upload_x509_cert.go (100%) rename {datasource/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/datasource}/ami/data.go (97%) rename {datasource/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/datasource}/ami/data.hcl2spec.go (99%) rename {datasource/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/datasource}/secretsmanager/data.go (97%) rename {datasource/amazon => vendor/github.com/hashicorp/packer-plugin-amazon/datasource}/secretsmanager/data.hcl2spec.go (99%) rename {post-processor/amazon-import => vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import}/post-processor.go (99%) rename {post-processor/amazon-import => vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import}/post-processor.hcl2spec.go (99%) rename vendor/golang.org/x/sys/unix/{asm_freebsd_386.s => asm_bsd_386.s} (70%) rename vendor/golang.org/x/sys/unix/{asm_darwin_amd64.s => asm_bsd_amd64.s} (72%) rename vendor/golang.org/x/sys/unix/{asm_freebsd_arm.s => asm_bsd_arm.s} (74%) rename vendor/golang.org/x/sys/unix/{asm_netbsd_amd64.s => asm_bsd_arm64.s} (75%) delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_zos_s390x.s create mode 100644 vendor/golang.org/x/sys/unix/dev_zos.go create mode 100644 vendor/golang.org/x/sys/unix/epoll_zos.go create mode 100644 vendor/golang.org/x/sys/unix/fstatfs_zos.go create mode 100644 vendor/golang.org/x/sys/unix/ioctl_zos.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/windows/types_windows_arm64.go delete mode 100644 website/content/docs/builders/amazon/chroot.mdx delete mode 100644 website/content/docs/builders/amazon/ebs.mdx delete mode 100644 website/content/docs/builders/amazon/ebssurrogate.mdx delete mode 100644 website/content/docs/builders/amazon/ebsvolume.mdx delete mode 100644 website/content/docs/builders/amazon/index.mdx delete mode 100644 website/content/docs/builders/amazon/instance.mdx delete mode 100644 website/content/docs/datasources/amazon/ami.mdx delete mode 100644 website/content/docs/datasources/amazon/index.mdx delete mode 100644 website/content/docs/datasources/amazon/secretsmanager.mdx delete mode 100644 website/content/docs/post-processors/amazon-import.mdx delete mode 100644 website/content/partials/builder/amazon/chroot/Config-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/chroot/Config-required.mdx delete mode 100644 website/content/partials/builder/amazon/chroot/Config.mdx delete mode 100644 website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AMIConfig-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AMIConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/AWSPollingConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AWSPollingConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/AccessConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AccessConfig-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AccessConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/AmiFilterOptions-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AssumeRoleConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/AssumeRoleConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/BlockDevice-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/BlockDevice.mdx delete mode 100644 website/content/partials/builder/amazon/common/MetadataOptions-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/MetadataOptions.mdx delete mode 100644 website/content/partials/builder/amazon/common/PolicyDocument-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/RunConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/RunConfig-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/RunConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/SnapshotConfig-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/SnapshotConfig.mdx delete mode 100644 website/content/partials/builder/amazon/common/StateChangeConf.mdx delete mode 100644 website/content/partials/builder/amazon/common/Statement-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/SubnetFilterOptions-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/common/VaultAWSEngineOptions-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebs/Config-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebssurrogate/BlockDevice-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebssurrogate/Config-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebssurrogate/RootBlockDevice-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/instance/Config-not-required.mdx delete mode 100644 website/content/partials/builder/amazon/instance/Config-required.mdx delete mode 100644 website/content/partials/builder/amazon/instance/Config.mdx delete mode 100644 website/content/partials/builders/aws-common-block-device-a-i.mdx delete mode 100644 website/content/partials/builders/aws-common-block-device-i-v.mdx delete mode 100644 website/content/partials/builders/aws-common-opional-fields.mdx delete mode 100644 website/content/partials/builders/aws-session-manager.mdx delete mode 100644 website/content/partials/builders/aws-spot-docs.mdx delete mode 100644 website/content/partials/builders/aws-ssh-differentiation-table.mdx create mode 100644 website/content/partials/datasource/.gitkeep delete mode 100644 website/content/partials/datasource/amazon/ami/DatasourceOutput.mdx delete mode 100644 website/content/partials/datasource/amazon/secretsmanager/Config-not-required.mdx delete mode 100644 website/content/partials/datasource/amazon/secretsmanager/Config-required.mdx delete mode 100644 website/content/partials/datasource/amazon/secretsmanager/DatasourceOutput.mdx delete mode 100644 website/data/docs-navigation.js diff --git a/builder/amazon/chroot/builder_test.go b/builder/amazon/chroot/builder_test.go deleted file mode 100644 index 69502f3d6..000000000 --- a/builder/amazon/chroot/builder_test.go +++ /dev/null @@ -1,251 +0,0 @@ -package chroot - -import ( - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func testConfig() map[string]interface{} { - return map[string]interface{}{ - "ami_name": "foo", - "source_ami": "foo", - "region": "us-east-1", - // region validation logic is checked in ami_config_test - "skip_region_validation": true, - } -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatalf("Builder should be a builder") - } -} - -func TestBuilderPrepare_AMIName(t *testing.T) { - var b Builder - config := testConfig() - - // Test good - config["ami_name"] = "foo" - config["skip_region_validation"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["ami_name"] = "foo {{" - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - // Test bad - delete(config, "ami_name") - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_ChrootMounts(t *testing.T) { - b := &Builder{} - config := testConfig() - - config["chroot_mounts"] = nil - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } -} - -func TestBuilderPrepare_ChrootMountsBadDefaults(t *testing.T) { - b := &Builder{} - config := testConfig() - - config["chroot_mounts"] = [][]string{ - {"bad"}, - } - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} -func TestBuilderPrepare_SourceAmi(t *testing.T) { - b := &Builder{} - config := testConfig() - - config["source_ami"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - config["source_ami"] = "foo" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } -} - -func TestBuilderPrepare_CommandWrapper(t *testing.T) { - b := &Builder{} - config := testConfig() - - config["command_wrapper"] = "echo hi; {{.Command}}" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } -} - -func TestBuilderPrepare_CopyFiles(t *testing.T) { - b := &Builder{} - config := testConfig() - - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } - - if len(b.config.CopyFiles) != 1 && b.config.CopyFiles[0] != "/etc/resolv.conf" { - t.Errorf("Was expecting default value for copy_files.") - } -} - -func TestBuilderPrepare_CopyFilesNoDefault(t *testing.T) { - b := &Builder{} - config := testConfig() - - config["copy_files"] = []string{} - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } - - if len(b.config.CopyFiles) > 0 { - t.Errorf("Was expecting no default value for copy_files. Found %v", - b.config.CopyFiles) - } -} - -func TestBuilderPrepare_RootDeviceNameAndAMIMappings(t *testing.T) { - var b Builder - config := testConfig() - - config["root_device_name"] = "/dev/sda" - config["ami_block_device_mappings"] = []interface{}{map[string]string{}} - config["root_volume_size"] = 15 - _, warnings, err := b.Prepare(config) - if len(warnings) == 0 { - t.Fatal("Missing warning, stating block device mappings will be overwritten") - } else if len(warnings) > 1 { - t.Fatalf("excessive warnings: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } -} - -func TestBuilderPrepare_AMIMappingsNoRootDeviceName(t *testing.T) { - var b Builder - config := testConfig() - - config["ami_block_device_mappings"] = []interface{}{map[string]string{}} - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatalf("should have error") - } -} - -func TestBuilderPrepare_RootDeviceNameNoAMIMappings(t *testing.T) { - var b Builder - config := testConfig() - - config["root_device_name"] = "/dev/sda" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatalf("should have error") - } -} - -func TestBuilderPrepare_ReturnGeneratedData(t *testing.T) { - var b Builder - config := testConfig() - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if generatedData[0] != "SourceAMIName" { - t.Fatalf("Generated data should contain SourceAMIName") - } - if generatedData[1] != "BuildRegion" { - t.Fatalf("Generated data should contain BuildRegion") - } - if generatedData[2] != "SourceAMI" { - t.Fatalf("Generated data should contain SourceAMI") - } - if generatedData[3] != "SourceAMICreationDate" { - t.Fatalf("Generated data should contain SourceAMICreationDate") - } - if generatedData[4] != "SourceAMIOwner" { - t.Fatalf("Generated data should contain SourceAMIOwner") - } - if generatedData[5] != "SourceAMIOwnerName" { - t.Fatalf("Generated data should contain SourceAMIOwnerName") - } - if generatedData[6] != "Device" { - t.Fatalf("Generated data should contain Device") - } - if generatedData[7] != "MountPath" { - t.Fatalf("Generated data should contain MountPath") - } -} diff --git a/builder/amazon/chroot/copy_files_test.go b/builder/amazon/chroot/copy_files_test.go deleted file mode 100644 index fe6b27e88..000000000 --- a/builder/amazon/chroot/copy_files_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package chroot - -import ( - "fmt" - "io/ioutil" - "os" - "runtime" - "testing" - - "github.com/hashicorp/packer-plugin-sdk/common" -) - -func TestCopyFile(t *testing.T) { - if runtime.GOOS == "windows" { - return - } - - first, err := ioutil.TempFile("", "copy_files_test") - if err != nil { - t.Fatalf("couldn't create temp file.") - } - defer os.Remove(first.Name()) - newName := first.Name() + "-new" - - payload := "copy_files_test.go payload" - if _, err = first.WriteString(payload); err != nil { - t.Fatalf("Couldn't write payload to first file.") - } - first.Sync() - - cmd := common.ShellCommand(fmt.Sprintf("cp %s %s", first.Name(), newName)) - if err := cmd.Run(); err != nil { - t.Fatalf("Couldn't copy file") - } - defer os.Remove(newName) - - second, err := os.Open(newName) - if err != nil { - t.Fatalf("Couldn't open copied file.") - } - defer second.Close() - - var copiedPayload = make([]byte, len(payload)) - if _, err := second.Read(copiedPayload); err != nil { - t.Fatalf("Couldn't open copied file for reading.") - } - - if string(copiedPayload) != payload { - t.Fatalf("payload not copied.") - } -} diff --git a/builder/amazon/chroot/device_test.go b/builder/amazon/chroot/device_test.go deleted file mode 100644 index a47fc7dff..000000000 --- a/builder/amazon/chroot/device_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package chroot - -import "testing" - -func TestDevicePrefixMatch(t *testing.T) { - /* - if devicePrefixMatch("nvme0n1") != "" { - } - */ -} diff --git a/builder/amazon/chroot/step_attach_volume_test.go b/builder/amazon/chroot/step_attach_volume_test.go deleted file mode 100644 index 72f8b24f0..000000000 --- a/builder/amazon/chroot/step_attach_volume_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package chroot - -import ( - "testing" - - "github.com/hashicorp/packer-plugin-sdk/chroot" -) - -func TestAttachVolumeCleanupFunc_ImplementsCleanupFunc(t *testing.T) { - var raw interface{} - raw = new(StepAttachVolume) - if _, ok := raw.(chroot.Cleanup); !ok { - t.Fatalf("cleanup func should be a CleanupFunc") - } -} diff --git a/builder/amazon/chroot/step_create_volume_test.go b/builder/amazon/chroot/step_create_volume_test.go deleted file mode 100644 index 22cb82a75..000000000 --- a/builder/amazon/chroot/step_create_volume_test.go +++ /dev/null @@ -1,97 +0,0 @@ -package chroot - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - confighelper "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/stretchr/testify/assert" -) - -func buildTestRootDevice() *ec2.BlockDeviceMapping { - return &ec2.BlockDeviceMapping{ - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(10), - SnapshotId: aws.String("snap-1234"), - VolumeType: aws.String("gp2"), - Encrypted: aws.Bool(false), - }, - } -} - -func TestCreateVolume_Default(t *testing.T) { - stepCreateVolume := new(StepCreateVolume) - _, err := stepCreateVolume.buildCreateVolumeInput("test-az", buildTestRootDevice()) - assert.NoError(t, err) -} - -func TestCreateVolume_Shrink(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeSize: 1} - testRootDevice := buildTestRootDevice() - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - // Ensure that the new value is equal to the size of the old root device - assert.Equal(t, *ret.Size, *testRootDevice.Ebs.VolumeSize) -} - -func TestCreateVolume_Expand(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeSize: 25} - testRootDevice := buildTestRootDevice() - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - // Ensure that the new value is equal to the size of the value passed in - assert.Equal(t, *ret.Size, stepCreateVolume.RootVolumeSize) -} - -func TestCreateVolume_io1_to_io1(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeType: "io1"} - testRootDevice := buildTestRootDevice() - testRootDevice.Ebs.VolumeType = aws.String("io1") - testRootDevice.Ebs.Iops = aws.Int64(1000) - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - assert.Equal(t, *ret.VolumeType, stepCreateVolume.RootVolumeType) - assert.Equal(t, *ret.Iops, *testRootDevice.Ebs.Iops) -} - -func TestCreateVolume_io1_to_gp2(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeType: "gp2"} - testRootDevice := buildTestRootDevice() - testRootDevice.Ebs.VolumeType = aws.String("io1") - testRootDevice.Ebs.Iops = aws.Int64(1000) - - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - assert.Equal(t, *ret.VolumeType, stepCreateVolume.RootVolumeType) - assert.Nil(t, ret.Iops) -} - -func TestCreateVolume_gp2_to_io1(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeType: "io1"} - testRootDevice := buildTestRootDevice() - - _, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.Error(t, err) -} - -func TestCreateVolume_Encrypted(t *testing.T) { - stepCreateVolume := StepCreateVolume{RootVolumeEncryptBoot: confighelper.TrileanFromBool(true)} - testRootDevice := buildTestRootDevice() - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - // Ensure that the new value is equal to the the value passed in - assert.Equal(t, confighelper.TrileanFromBool(*ret.Encrypted), stepCreateVolume.RootVolumeEncryptBoot) -} - -func TestCreateVolume_Custom_KMS_Key_Encrypted(t *testing.T) { - stepCreateVolume := StepCreateVolume{ - RootVolumeEncryptBoot: confighelper.TrileanFromBool(true), - RootVolumeKmsKeyId: "alias/1234", - } - testRootDevice := buildTestRootDevice() - ret, err := stepCreateVolume.buildCreateVolumeInput("test-az", testRootDevice) - assert.NoError(t, err) - // Ensure that the new value is equal to the value passed in - assert.Equal(t, *ret.KmsKeyId, stepCreateVolume.RootVolumeKmsKeyId) -} diff --git a/builder/amazon/chroot/step_flock_test.go b/builder/amazon/chroot/step_flock_test.go deleted file mode 100644 index ea113861f..000000000 --- a/builder/amazon/chroot/step_flock_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package chroot - -import ( - "testing" - - "github.com/hashicorp/packer-plugin-sdk/chroot" -) - -func TestFlockCleanupFunc_ImplementsCleanupFunc(t *testing.T) { - var raw interface{} - raw = new(StepFlock) - if _, ok := raw.(chroot.Cleanup); !ok { - t.Fatalf("cleanup func should be a CleanupFunc") - } -} diff --git a/builder/amazon/chroot/step_mount_device_test.go b/builder/amazon/chroot/step_mount_device_test.go deleted file mode 100644 index 9c0433245..000000000 --- a/builder/amazon/chroot/step_mount_device_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package chroot - -import ( - "testing" - - "github.com/hashicorp/packer-plugin-sdk/chroot" -) - -func TestMountDeviceCleanupFunc_ImplementsCleanupFunc(t *testing.T) { - var raw interface{} - raw = new(StepMountDevice) - if _, ok := raw.(chroot.Cleanup); !ok { - t.Fatalf("cleanup func should be a CleanupFunc") - } -} diff --git a/builder/amazon/chroot/step_register_ami_test.go b/builder/amazon/chroot/step_register_ami_test.go deleted file mode 100644 index bf86249e8..000000000 --- a/builder/amazon/chroot/step_register_ami_test.go +++ /dev/null @@ -1,216 +0,0 @@ -package chroot - -import ( - "testing" - - "github.com/hashicorp/packer-plugin-sdk/common" - amazon "github.com/hashicorp/packer/builder/amazon/common" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" -) - -func testImage() ec2.Image { - return ec2.Image{ - ImageId: aws.String("ami-abcd1234"), - Name: aws.String("ami_test_name"), - Architecture: aws.String("x86_64"), - KernelId: aws.String("aki-abcd1234"), - } -} - -func TestStepRegisterAmi_buildRegisterOpts_pv(t *testing.T) { - config := Config{} - config.AMIName = "test_ami_name" - config.AMIDescription = "test_ami_description" - config.AMIVirtType = "paravirtual" - rootDeviceName := "foo" - - image := testImage() - - blockDevices := []*ec2.BlockDeviceMapping{} - - opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName, config.AMIName) - - expected := config.AMIVirtType - if *opts.VirtualizationType != expected { - t.Fatalf("Unexpected VirtType value: expected %s got %s\n", expected, *opts.VirtualizationType) - } - - expected = config.AMIName - if *opts.Name != expected { - t.Fatalf("Unexpected Name value: expected %s got %s\n", expected, *opts.Name) - } - - expected = *image.KernelId - if *opts.KernelId != expected { - t.Fatalf("Unexpected KernelId value: expected %s got %s\n", expected, *opts.KernelId) - } - - expected = rootDeviceName - if *opts.RootDeviceName != expected { - t.Fatalf("Unexpected RootDeviceName value: expected %s got %s\n", expected, *opts.RootDeviceName) - } -} - -func TestStepRegisterAmi_buildRegisterOpts_hvm(t *testing.T) { - config := Config{} - config.AMIName = "test_ami_name" - config.AMIDescription = "test_ami_description" - config.AMIVirtType = "hvm" - rootDeviceName := "foo" - - image := testImage() - - blockDevices := []*ec2.BlockDeviceMapping{} - - opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName, config.AMIName) - - expected := config.AMIVirtType - if *opts.VirtualizationType != expected { - t.Fatalf("Unexpected VirtType value: expected %s got %s\n", expected, *opts.VirtualizationType) - } - - expected = config.AMIName - if *opts.Name != expected { - t.Fatalf("Unexpected Name value: expected %s got %s\n", expected, *opts.Name) - } - - if opts.KernelId != nil { - t.Fatalf("Unexpected KernelId value: expected nil got %s\n", *opts.KernelId) - } - - expected = rootDeviceName - if *opts.RootDeviceName != expected { - t.Fatalf("Unexpected RootDeviceName value: expected %s got %s\n", expected, *opts.RootDeviceName) - } -} - -func TestStepRegisterAmi_buildRegisterOptsFromScratch(t *testing.T) { - rootDeviceName := "/dev/sda" - snapshotID := "foo" - config := Config{ - FromScratch: true, - PackerConfig: common.PackerConfig{}, - AMIMappings: []amazon.BlockDevice{ - { - DeviceName: rootDeviceName, - }, - }, - RootDeviceName: rootDeviceName, - } - registerOpts := buildBaseRegisterOpts(&config, nil, 10, snapshotID, config.AMIName) - - if len(registerOpts.BlockDeviceMappings) != 1 { - t.Fatal("Expected block device mapping of length 1") - } - - if *registerOpts.BlockDeviceMappings[0].Ebs.SnapshotId != snapshotID { - t.Fatalf("Snapshot ID of root disk not set to snapshot id %s", rootDeviceName) - } -} - -func TestStepRegisterAmi_buildRegisterOptFromExistingImage(t *testing.T) { - rootDeviceName := "/dev/sda" - snapshotID := "foo" - - config := Config{ - FromScratch: false, - PackerConfig: common.PackerConfig{}, - } - sourceImage := ec2.Image{ - RootDeviceName: &rootDeviceName, - BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - { - DeviceName: &rootDeviceName, - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(10), - }, - }, - // Throw in an ephemeral device, it seems like all devices in the return struct in a source AMI have - // a size, even if it's for ephemeral - { - DeviceName: aws.String("/dev/sdb"), - VirtualName: aws.String("ephemeral0"), - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(0), - }, - }, - }, - } - registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotID, config.AMIName) - - if len(registerOpts.BlockDeviceMappings) != 2 { - t.Fatal("Expected block device mapping of length 2") - } - - for _, dev := range registerOpts.BlockDeviceMappings { - if dev.Ebs.SnapshotId != nil && *dev.Ebs.SnapshotId == snapshotID { - // Even though root volume size is in config, it isn't used, instead we use the root volume size - // that's derived when we build the step - if *dev.Ebs.VolumeSize != 15 { - t.Fatalf("Root volume size not 15 GB instead %d", *dev.Ebs.VolumeSize) - } - return - } - } - t.Fatalf("Could not find device with snapshot ID %s", snapshotID) -} - -func TestStepRegisterAmi_buildRegisterOptFromExistingImageWithBlockDeviceMappings(t *testing.T) { - const ( - rootDeviceName = "/dev/xvda" - oldRootDevice = "/dev/sda1" - ) - snapshotId := "foo" - - config := Config{ - FromScratch: false, - PackerConfig: common.PackerConfig{}, - AMIMappings: []amazon.BlockDevice{ - { - DeviceName: rootDeviceName, - }, - }, - RootDeviceName: rootDeviceName, - } - - // Intentionally try to use a different root devicename - sourceImage := ec2.Image{ - RootDeviceName: aws.String(oldRootDevice), - BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - { - DeviceName: aws.String(oldRootDevice), - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(10), - }, - }, - // Throw in an ephemeral device, it seems like all devices in the return struct in a source AMI have - // a size, even if it's for ephemeral - { - DeviceName: aws.String("/dev/sdb"), - VirtualName: aws.String("ephemeral0"), - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(0), - }, - }, - }, - } - registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotId, config.AMIName) - - if len(registerOpts.BlockDeviceMappings) != 1 { - t.Fatal("Expected block device mapping of length 1") - } - - if *registerOpts.BlockDeviceMappings[0].Ebs.SnapshotId != snapshotId { - t.Fatalf("Snapshot ID of root disk set to '%s' expected '%s'", *registerOpts.BlockDeviceMappings[0].Ebs.SnapshotId, rootDeviceName) - } - - if *registerOpts.RootDeviceName != rootDeviceName { - t.Fatalf("Root device set to '%s' expected %s", *registerOpts.RootDeviceName, rootDeviceName) - } - - if *registerOpts.BlockDeviceMappings[0].Ebs.VolumeSize != 15 { - t.Fatalf("Size of root disk not set to 15 GB, instead %d", *registerOpts.BlockDeviceMappings[0].Ebs.VolumeSize) - } -} diff --git a/builder/amazon/common/access_config_test.go b/builder/amazon/common/access_config_test.go deleted file mode 100644 index e1eeaa05f..000000000 --- a/builder/amazon/common/access_config_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package common - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" -) - -func TestAccessConfigPrepare_Region(t *testing.T) { - c := FakeAccessConfig() - - c.RawRegion = "us-east-12" - err := c.ValidateRegion(c.RawRegion) - if err == nil { - t.Fatalf("should have region validation err: %s", c.RawRegion) - } - - c.RawRegion = "us-east-1" - err = c.ValidateRegion(c.RawRegion) - if err != nil { - t.Fatalf("shouldn't have region validation err: %s", c.RawRegion) - } - - c.RawRegion = "custom" - err = c.ValidateRegion(c.RawRegion) - if err == nil { - t.Fatalf("should have region validation err: %s", c.RawRegion) - } -} - -func TestAccessConfigPrepare_RegionRestricted(t *testing.T) { - c := FakeAccessConfig() - - // Create a Session with a custom region - c.session = session.Must(session.NewSession(&aws.Config{ - Region: aws.String("us-gov-west-1"), - })) - - if err := c.Prepare(); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - if !c.IsGovCloud() { - t.Fatal("We should be in gov region.") - } -} diff --git a/builder/amazon/common/ami_config_test.go b/builder/amazon/common/ami_config_test.go deleted file mode 100644 index 1a3435868..000000000 --- a/builder/amazon/common/ami_config_test.go +++ /dev/null @@ -1,244 +0,0 @@ -package common - -import ( - "fmt" - "reflect" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/packer-plugin-sdk/template/config" -) - -func testAMIConfig() *AMIConfig { - return &AMIConfig{ - AMIName: "foo", - } -} - -func getFakeAccessConfig(region string) *AccessConfig { - c := FakeAccessConfig() - c.RawRegion = region - return c -} - -func TestAMIConfigPrepare_name(t *testing.T) { - c := testAMIConfig() - accessConf := FakeAccessConfig() - if err := c.Prepare(accessConf, nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AMIName = "" - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("should have error") - } -} - -func (m *mockEC2Client) DescribeRegions(*ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) { - return &ec2.DescribeRegionsOutput{ - Regions: []*ec2.Region{ - {RegionName: aws.String("us-east-1")}, - {RegionName: aws.String("us-east-2")}, - {RegionName: aws.String("us-west-1")}, - }, - }, nil -} - -func TestAMIConfigPrepare_regions(t *testing.T) { - c := testAMIConfig() - c.AMIRegions = nil - - var errs []error - var err error - accessConf := FakeAccessConfig() - mockConn := &mockEC2Client{} - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatalf("shouldn't have err: %#v", errs) - } - - c.AMIRegions, err = listEC2Regions(mockConn) - if err != nil { - t.Fatalf("shouldn't have err: %s", err.Error()) - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatalf("shouldn't have err: %#v", errs) - } - - c.AMIRegions = []string{"us-east-1", "us-west-1", "us-east-1"} - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatalf("bad: %s", errs[0]) - } - - expected := []string{"us-east-1", "us-west-1"} - if !reflect.DeepEqual(c.AMIRegions, expected) { - t.Fatalf("bad: %#v", c.AMIRegions) - } - - c.AMIRegions = []string{"custom"} - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("shouldn't have error") - } - - c.AMIRegions = []string{"us-east-1", "us-east-2", "us-west-1"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "789-012-3456", - "us-east-2": "456-789-0123", - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal(fmt.Sprintf("shouldn't have error: %s", errs[0])) - } - - c.AMIRegions = []string{"us-east-1", "us-east-2", "us-west-1"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "789-012-3456", - "us-east-2": "", - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("should have passed; we are able to use default KMS key if not sharing") - } - - c.SnapshotUsers = []string{"user-foo", "user-bar"} - c.AMIRegions = []string{"us-east-1", "us-east-2", "us-west-1"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "789-012-3456", - "us-east-2": "", - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("should have an error b/c can't use default KMS key if sharing") - } - - c.AMIRegions = []string{"us-east-1", "us-west-1"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "789-012-3456", - "us-east-2": "456-789-0123", - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("should have error b/c theres a region in the key map that isn't in ami_regions") - } - - c.AMIRegions = []string{"us-east-1", "us-west-1", "us-east-2"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "789-012-3456", - } - - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("should have error b/c theres a region in in ami_regions that isn't in the key map") - } - - c.SnapshotUsers = []string{"foo", "bar"} - c.AMIKmsKeyId = "123-abc-456" - c.AMIEncryptBootVolume = config.TriTrue - c.AMIRegions = []string{"us-east-1", "us-west-1"} - c.AMIRegionKMSKeyIDs = map[string]string{ - "us-east-1": "123-456-7890", - "us-west-1": "", - } - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("should have error b/c theres a region in in ami_regions that isn't in the key map") - } - - // allow rawregion to exist in ami_regions list. - accessConf = getFakeAccessConfig("us-east-1") - c.AMIRegions = []string{"us-east-1", "us-west-1", "us-east-2"} - c.AMIRegionKMSKeyIDs = nil - if errs = c.prepareRegions(accessConf); len(errs) > 0 { - t.Fatal("should allow user to have the raw region in ami_regions") - } - -} - -func TestAMIConfigPrepare_Share_EncryptedBoot(t *testing.T) { - c := testAMIConfig() - c.AMIUsers = []string{"testAccountID"} - c.AMIEncryptBootVolume = config.TriTrue - - accessConf := FakeAccessConfig() - - c.AMIKmsKeyId = "" - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("shouldn't be able to share ami with encrypted boot volume") - } - c.AMIKmsKeyId = "89c3fb9a-de87-4f2a-aedc-fddc5138193c" - if err := c.Prepare(accessConf, nil); err != nil { - t.Fatal("should be able to share ami with encrypted boot volume") - } -} - -func TestAMIConfigPrepare_ValidateKmsKey(t *testing.T) { - c := testAMIConfig() - c.AMIEncryptBootVolume = config.TriTrue - - accessConf := FakeAccessConfig() - - validCases := []string{ - "abcd1234-e567-890f-a12b-a123b4cd56ef", - "alias/foo/bar", - "arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef", - "arn:aws:kms:us-east-1:012345678910:alias/foo/bar", - "arn:aws-us-gov:kms:us-gov-east-1:123456789012:key/12345678-1234-abcd-0000-123456789012", - } - for _, validCase := range validCases { - c.AMIKmsKeyId = validCase - if err := c.Prepare(accessConf, nil); err != nil { - t.Fatalf("%s should not have failed KMS key validation", validCase) - } - } - - invalidCases := []string{ - "ABCD1234-e567-890f-a12b-a123b4cd56ef", - "ghij1234-e567-890f-a12b-a123b4cd56ef", - "ghij1234+e567_890f-a12b-a123b4cd56ef", - "foo/bar", - "arn:aws:kms:us-east-1:012345678910:foo/bar", - "arn:foo:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef", - } - for _, invalidCase := range invalidCases { - c.AMIKmsKeyId = invalidCase - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatalf("%s should have failed KMS key validation", invalidCase) - } - } - -} - -func TestAMINameValidation(t *testing.T) { - c := testAMIConfig() - - accessConf := FakeAccessConfig() - - c.AMIName = "aa" - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("shouldn't be able to have an ami name with less than 3 characters") - } - - var longAmiName string - for i := 0; i < 129; i++ { - longAmiName += "a" - } - c.AMIName = longAmiName - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("shouldn't be able to have an ami name with great than 128 characters") - } - - c.AMIName = "+aaa" - if err := c.Prepare(accessConf, nil); err == nil { - t.Fatal("shouldn't be able to have an ami name with invalid characters") - } - - c.AMIName = "fooBAR1()[] ./-'@_" - if err := c.Prepare(accessConf, nil); err != nil { - t.Fatal("should be able to use all of the allowed AMI characters") - } - - c.AMIName = `xyz-base-2017-04-05-1934` - if err := c.Prepare(accessConf, nil); err != nil { - t.Fatalf("expected `xyz-base-2017-04-05-1934` to pass validation.") - } - -} diff --git a/builder/amazon/common/artifact_test.go b/builder/amazon/common/artifact_test.go deleted file mode 100644 index 7931f218a..000000000 --- a/builder/amazon/common/artifact_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package common - -import ( - "reflect" - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func TestArtifact_Impl(t *testing.T) { - var _ packersdk.Artifact = new(Artifact) -} - -func TestArtifactId(t *testing.T) { - expected := `east:foo,west:bar` - - amis := make(map[string]string) - amis["east"] = "foo" - amis["west"] = "bar" - - a := &Artifact{ - Amis: amis, - } - - result := a.Id() - if result != expected { - t.Fatalf("bad: %s", result) - } -} - -func TestArtifactState_atlasMetadata(t *testing.T) { - a := &Artifact{ - Amis: map[string]string{ - "east": "foo", - "west": "bar", - }, - } - - actual := a.State("atlas.artifact.metadata") - expected := map[string]string{ - "region.east": "foo", - "region.west": "bar", - } - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("bad: %#v", actual) - } -} - -func TestArtifactString(t *testing.T) { - expected := `AMIs were created: -east: foo -west: bar -` - - amis := make(map[string]string) - amis["east"] = "foo" - amis["west"] = "bar" - - a := &Artifact{Amis: amis} - result := a.String() - if result != expected { - t.Fatalf("bad: %s", result) - } -} - -func TestArtifactState(t *testing.T) { - expectedData := "this is the data" - artifact := &Artifact{ - StateData: map[string]interface{}{"state_data": expectedData}, - } - - // Valid state - result := artifact.State("state_data") - if result != expectedData { - t.Fatalf("Bad: State data was %s instead of %s", result, expectedData) - } - - // Invalid state - result = artifact.State("invalid_key") - if result != nil { - t.Fatalf("Bad: State should be nil for invalid state data name") - } - - // Nil StateData should not fail and should return nil - artifact = &Artifact{} - result = artifact.State("key") - if result != nil { - t.Fatalf("Bad: State should be nil for nil StateData") - } -} diff --git a/builder/amazon/common/block_device_test.go b/builder/amazon/common/block_device_test.go deleted file mode 100644 index 8d33b918e..000000000 --- a/builder/amazon/common/block_device_test.go +++ /dev/null @@ -1,401 +0,0 @@ -package common - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/google/go-cmp/cmp" - "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer-plugin-sdk/template/interpolate" -) - -func TestBlockDevice(t *testing.T) { - cases := []struct { - Config *BlockDevice - Result *ec2.BlockDeviceMapping - }{ - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - SnapshotId: "snap-1234", - VolumeType: "standard", - VolumeSize: 8, - DeleteOnTermination: true, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-1234"), - VolumeType: aws.String("standard"), - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(true), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeSize: 8, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(false), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io1", - VolumeSize: 8, - DeleteOnTermination: true, - IOPS: aws.Int64(1000), - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("io1"), - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(true), - Iops: aws.Int64(1000), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - VolumeSize: 8, - DeleteOnTermination: true, - IOPS: aws.Int64(1000), - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("io2"), - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(true), - Iops: aws.Int64(1000), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp2", - VolumeSize: 8, - DeleteOnTermination: true, - Encrypted: config.TriTrue, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("gp2"), - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(true), - Encrypted: aws.Bool(true), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp2", - VolumeSize: 8, - DeleteOnTermination: true, - Encrypted: config.TriTrue, - KmsKeyId: "2Fa48a521f-3aff-4b34-a159-376ac5d37812", - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("gp2"), - VolumeSize: aws.Int64(8), - DeleteOnTermination: aws.Bool(true), - Encrypted: aws.Bool(true), - KmsKeyId: aws.String("2Fa48a521f-3aff-4b34-a159-376ac5d37812"), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "standard", - DeleteOnTermination: true, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("standard"), - DeleteOnTermination: aws.Bool(true), - }, - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VirtualName: "ephemeral0", - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - VirtualName: aws.String("ephemeral0"), - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - NoDevice: true, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - NoDevice: aws.String(""), - }, - }, - { - Config: &BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - VolumeSize: 8, - Throughput: aws.Int64(125), - IOPS: aws.Int64(3000), - DeleteOnTermination: true, - Encrypted: config.TriTrue, - }, - - Result: &ec2.BlockDeviceMapping{ - DeviceName: aws.String("/dev/sdb"), - Ebs: &ec2.EbsBlockDevice{ - VolumeType: aws.String("gp3"), - VolumeSize: aws.Int64(8), - Throughput: aws.Int64(125), - Iops: aws.Int64(3000), - DeleteOnTermination: aws.Bool(true), - Encrypted: aws.Bool(true), - }, - }, - }, - } - - for _, tc := range cases { - var amiBlockDevices BlockDevices = []BlockDevice{*tc.Config} - - var launchBlockDevices BlockDevices = []BlockDevice{*tc.Config} - - expected := []*ec2.BlockDeviceMapping{tc.Result} - - amiResults := amiBlockDevices.BuildEC2BlockDeviceMappings() - if diff := cmp.Diff(expected, amiResults); diff != "" { - t.Fatalf("Bad block device: %s", diff) - } - - launchResults := launchBlockDevices.BuildEC2BlockDeviceMappings() - if diff := cmp.Diff(expected, launchResults); diff != "" { - t.Fatalf("Bad block device: %s", diff) - } - } -} - -func TestIOPSValidation(t *testing.T) { - - cases := []struct { - device BlockDevice - ok bool - msg string - }{ - // volume size unknown - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io1", - IOPS: aws.Int64(1000), - }, - ok: true, - }, - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - IOPS: aws.Int64(1000), - }, - ok: true, - }, - // ratio requirement satisfied - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io1", - VolumeSize: 50, - IOPS: aws.Int64(1000), - }, - ok: true, - }, - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - VolumeSize: 100, - IOPS: aws.Int64(1000), - }, - ok: true, - }, - // ratio requirement not satisfied - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io1", - VolumeSize: 10, - IOPS: aws.Int64(2000), - }, - ok: false, - msg: "/dev/sdb: the maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1 for io1 volumes", - }, - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - VolumeSize: 50, - IOPS: aws.Int64(30000), - }, - ok: false, - msg: "/dev/sdb: the maximum ratio of provisioned IOPS to requested volume size (in GiB) is 500:1 for io2 volumes", - }, - // exceed max iops - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - VolumeSize: 500, - IOPS: aws.Int64(99999), - }, - ok: false, - msg: "IOPS must be between 100 and 64000 for device /dev/sdb", - }, - // lower than min iops - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "io2", - VolumeSize: 50, - IOPS: aws.Int64(10), - }, - ok: false, - msg: "IOPS must be between 100 and 64000 for device /dev/sdb", - }, - // exceed max iops - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - VolumeSize: 50, - Throughput: aws.Int64(125), - IOPS: aws.Int64(99999), - }, - ok: false, - msg: "IOPS must be between 3000 and 16000 for device /dev/sdb", - }, - // lower than min iops - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - VolumeSize: 50, - Throughput: aws.Int64(125), - IOPS: aws.Int64(10), - }, - ok: false, - msg: "IOPS must be between 3000 and 16000 for device /dev/sdb", - }, - } - - ctx := interpolate.Context{} - for _, testCase := range cases { - err := testCase.device.Prepare(&ctx) - if testCase.ok && err != nil { - t.Fatalf("should not error, but: %v", err) - } - if !testCase.ok { - if err == nil { - t.Fatalf("should error") - } else if err.Error() != testCase.msg { - t.Fatalf("wrong error: expected %s, found: %v", testCase.msg, err) - } - } - } -} - -func TestThroughputValidation(t *testing.T) { - - cases := []struct { - device BlockDevice - ok bool - msg string - }{ - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - Throughput: aws.Int64(125), - IOPS: aws.Int64(3000), - }, - ok: true, - }, - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - Throughput: aws.Int64(1000), - IOPS: aws.Int64(3000), - }, - ok: true, - }, - // exceed max Throughput - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - Throughput: aws.Int64(1001), - IOPS: aws.Int64(3000), - }, - ok: false, - msg: "Throughput must be between 125 and 1000 for device /dev/sdb", - }, - // lower than min Throughput - { - device: BlockDevice{ - DeviceName: "/dev/sdb", - VolumeType: "gp3", - Throughput: aws.Int64(124), - IOPS: aws.Int64(3000), - }, - ok: false, - msg: "Throughput must be between 125 and 1000 for device /dev/sdb", - }, - } - - ctx := interpolate.Context{} - for _, testCase := range cases { - err := testCase.device.Prepare(&ctx) - if testCase.ok && err != nil { - t.Fatalf("should not error, but: %v", err) - } - if !testCase.ok { - if err == nil { - t.Fatalf("should error") - } else if err.Error() != testCase.msg { - t.Fatalf("wrong error: expected %s, found: %v", testCase.msg, err) - } - } - } -} diff --git a/builder/amazon/common/build_filter_test.go b/builder/amazon/common/build_filter_test.go deleted file mode 100644 index e84a4b10d..000000000 --- a/builder/amazon/common/build_filter_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package common - -import ( - "testing" -) - -func TestStepSourceAmiInfo_BuildFilter(t *testing.T) { - filter_key := "name" - filter_value := "foo" - filter_key2 := "name2" - filter_value2 := "foo2" - - inputFilter := map[string]string{filter_key: filter_value, filter_key2: filter_value2} - outputFilter := buildEc2Filters(inputFilter) - - // deconstruct filter back into things we can test - foundMap := map[string]bool{filter_key: false, filter_key2: false} - for _, filter := range outputFilter { - for key, value := range inputFilter { - if *filter.Name == key && *filter.Values[0] == value { - foundMap[key] = true - } - } - } - - for k, v := range foundMap { - if !v { - t.Fatalf("Fail: should have found value for key: %s", k) - } - } -} diff --git a/builder/amazon/common/errors_test.go b/builder/amazon/common/errors_test.go deleted file mode 100644 index b2c05390e..000000000 --- a/builder/amazon/common/errors_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package common - -import ( - "fmt" - "strings" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sts" - - "github.com/aws/aws-sdk-go/aws/awserr" -) - -type mockSTS struct { -} - -func (m *mockSTS) DecodeAuthorizationMessage(input *sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error) { - return &sts.DecodeAuthorizationMessageOutput{ - DecodedMessage: aws.String(`{ - "allowed": false, - "explicitDeny": true, - "matchedStatements": {} - }`), - }, nil -} - -func TestErrorsParsing_RequestFailure(t *testing.T) { - - ae := awserr.New("UnauthorizedOperation", - `You are not authorized to perform this operation. Encoded authorization failure message: D9Q7oicjOMr9l2CC-NPP1FiZXK9Ijia1k-3l0siBFCcrK3oSuMFMkBIO5TNj0HdXE-WfwnAcdycFOohfKroNO6toPJEns8RFVfy_M_IjNGmrEFJ6E62pnmBW0OLrMsXxR9FQE4gB4gJzSM0AD6cV6S3FOfqYzWBRX-sQdOT4HryGkFNRoFBr9Xbp-tRwiadwkbdHdfnV9fbRkXmnwCdULml16NBSofC4ZPepLMKmIB5rKjwk-m179UUh2XA-J5no0si6XcRo5GbHQB5QfCIwSHL4vsro2wLZUd16-8OWKyr3tVlTbQe0ERZskqRqRQ5E28QuiBCVV6XstUyo-T4lBSr75Fgnyr3wCO-dS3b_5Ns3WzA2JD4E2AJOAStXIU8IH5YuKkAg7C-dJMuBMPpmKCBEXhNoHDwCyOo5PsV3xMlc0jSb0qYGpfst_TDDtejcZfn7NssUjxVq9qkdH-OXz2gPoQB-hX8ycmZCL5UZwKc3TCLUr7TGnudHjmnMrE9cUo-yTCWfyHPLprhiYhTCKW18EikJ0O1EKI3FJ_b4F19_jFBPARjSwQc7Ut6MNCVzrPdZGYSF6acj5gPaxdy9uSkVQwWXK7Pd5MFP7EBDE1_DgYbzodgwDO2PXeVFUbSLBHKWo_ebZS9ZX2nYPcGss_sYaly0ZVSIJXp7G58B5BoFVhvVH6jYnF9XiAOjMltuP_ycu1pQP1lki500RY3baLvfeYeAsB38XZHKEgWZzq7Fei-uh89q0cjJTmlVyrfRU3q6`, - fmt.Errorf("You can't do it!!")) - rf := awserr.NewRequestFailure(ae, 400, "abc-def-123-456") - - result := decodeAWSError(&mockSTS{}, rf) - if result == nil { - t.Error("Expected resulting error") - } - if !strings.Contains(result.Error(), "Authorization failure message:") { - t.Error("Expected authorization failure message") - } -} - -func TestErrorsParsing_NonAuthorizationFailure(t *testing.T) { - - ae := awserr.New("BadRequest", - `You did something wrong. Try again`, - fmt.Errorf("Request was no good.")) - rf := awserr.NewRequestFailure(ae, 400, "abc-def-123-456") - - result := decodeAWSError(&mockSTS{}, rf) - if result == nil { - t.Error("Expected resulting error") - } - if result != rf { - t.Error("Expected original error to be returned unchanged") - } -} - -func TestErrorsParsing_NonAWSError(t *testing.T) { - - err := fmt.Errorf("Random error occurred") - - result := decodeAWSError(&mockSTS{}, err) - if result == nil { - t.Error("Expected resulting error") - } - if result != err { - t.Error("Expected original error to be returned unchanged") - } -} diff --git a/builder/amazon/common/interpolate_build_info_test.go b/builder/amazon/common/interpolate_build_info_test.go deleted file mode 100644 index f371d3ce7..000000000 --- a/builder/amazon/common/interpolate_build_info_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package common - -import ( - "reflect" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/packer-plugin-sdk/multistep" - "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" -) - -func testImage() *ec2.Image { - return &ec2.Image{ - ImageId: aws.String("ami-abcd1234"), - CreationDate: aws.String("ami_test_creation_date"), - Name: aws.String("ami_test_name"), - OwnerId: aws.String("ami_test_owner_id"), - ImageOwnerAlias: aws.String("ami_test_owner_alias"), - RootDeviceType: aws.String("ebs"), - Tags: []*ec2.Tag{ - { - Key: aws.String("key-1"), - Value: aws.String("value-1"), - }, - { - Key: aws.String("key-2"), - Value: aws.String("value-2"), - }, - }, - } -} - -func testState() multistep.StateBag { - state := new(multistep.BasicStateBag) - return state -} - -func testGeneratedData(state multistep.StateBag) packerbuilderdata.GeneratedData { - generatedData := packerbuilderdata.GeneratedData{State: state} - return generatedData -} - -func TestInterpolateBuildInfo_extractBuildInfo_noSourceImage(t *testing.T) { - state := testState() - generatedData := testGeneratedData(state) - buildInfo := extractBuildInfo("foo", state, &generatedData) - - expected := BuildInfoTemplate{ - BuildRegion: "foo", - } - if !reflect.DeepEqual(*buildInfo, expected) { - t.Fatalf("Unexpected BuildInfoTemplate: expected %#v got %#v\n", expected, *buildInfo) - } -} - -func TestInterpolateBuildInfo_extractBuildInfo_withSourceImage(t *testing.T) { - state := testState() - state.Put("source_image", testImage()) - generatedData := testGeneratedData(state) - buildInfo := extractBuildInfo("foo", state, &generatedData) - - expected := BuildInfoTemplate{ - BuildRegion: "foo", - SourceAMI: "ami-abcd1234", - SourceAMICreationDate: "ami_test_creation_date", - SourceAMIName: "ami_test_name", - SourceAMIOwner: "ami_test_owner_id", - SourceAMIOwnerName: "ami_test_owner_alias", - SourceAMITags: map[string]string{ - "key-1": "value-1", - "key-2": "value-2", - }, - } - if !reflect.DeepEqual(*buildInfo, expected) { - t.Fatalf("Unexpected BuildInfoTemplate: expected %#v got %#v\n", expected, *buildInfo) - } -} - -func TestInterpolateBuildInfo_extractBuildInfo_GeneratedDataWithSourceImageName(t *testing.T) { - state := testState() - state.Put("source_image", testImage()) - generatedData := testGeneratedData(state) - extractBuildInfo("foo", state, &generatedData) - - generatedDataState := state.Get("generated_data").(map[string]interface{}) - - if generatedDataState["SourceAMIName"] != "ami_test_name" { - t.Fatalf("Unexpected state SourceAMIName: expected %#v got %#v\n", "ami_test_name", generatedDataState["SourceAMIName"]) - } -} diff --git a/builder/amazon/common/run_config_test.go b/builder/amazon/common/run_config_test.go deleted file mode 100644 index 0497714e6..000000000 --- a/builder/amazon/common/run_config_test.go +++ /dev/null @@ -1,251 +0,0 @@ -package common - -import ( - "io/ioutil" - "os" - "regexp" - "testing" - - "github.com/hashicorp/packer-plugin-sdk/communicator" -) - -func init() { - // Clear out the AWS access key env vars so they don't - // affect our tests. - os.Setenv("AWS_ACCESS_KEY_ID", "") - os.Setenv("AWS_ACCESS_KEY", "") - os.Setenv("AWS_SECRET_ACCESS_KEY", "") - os.Setenv("AWS_SECRET_KEY", "") -} - -func testConfig() *RunConfig { - return &RunConfig{ - SourceAmi: "abcd", - InstanceType: "m1.small", - - Comm: communicator.Config{ - SSH: communicator.SSH{ - SSHUsername: "foo", - }, - }, - } -} - -func testConfigFilter() *RunConfig { - config := testConfig() - config.SourceAmi = "" - config.SourceAmiFilter = AmiFilterOptions{} - return config -} - -func TestRunConfigPrepare(t *testing.T) { - c := testConfig() - err := c.Prepare(nil) - if len(err) > 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_InstanceType(t *testing.T) { - c := testConfig() - c.InstanceType = "" - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("Should error if an instance_type is not specified") - } -} - -func TestRunConfigPrepare_SourceAmi(t *testing.T) { - c := testConfig() - c.SourceAmi = "" - if err := c.Prepare(nil); len(err) != 2 { - t.Fatalf("Should error if a source_ami (or source_ami_filter) is not specified") - } -} - -func TestRunConfigPrepare_SourceAmiFilterBlank(t *testing.T) { - c := testConfigFilter() - if err := c.Prepare(nil); len(err) != 2 { - t.Fatalf("Should error if source_ami_filter is empty or not specified (and source_ami is not specified)") - } -} - -func TestRunConfigPrepare_SourceAmiFilterOwnersBlank(t *testing.T) { - c := testConfigFilter() - filter_key := "name" - filter_value := "foo" - c.SourceAmiFilter.Filters = map[string]string{filter_key: filter_value} - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("Should error if Owners is not specified)") - } -} - -func TestRunConfigPrepare_SourceAmiFilterGood(t *testing.T) { - c := testConfigFilter() - owner := "123" - filter_key := "name" - filter_value := "foo" - goodFilter := AmiFilterOptions{ - Owners: []string{owner}, - Filters: map[string]string{filter_key: filter_value}, - } - c.SourceAmiFilter = goodFilter - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_EnableT2UnlimitedGood(t *testing.T) { - c := testConfig() - // Must have a T2 instance type if T2 Unlimited is enabled - c.InstanceType = "t2.micro" - c.EnableT2Unlimited = true - err := c.Prepare(nil) - if len(err) > 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_EnableT2UnlimitedBadInstanceType(t *testing.T) { - c := testConfig() - // T2 Unlimited cannot be used with instance types other than T2 - c.InstanceType = "m5.large" - c.EnableT2Unlimited = true - err := c.Prepare(nil) - if len(err) != 1 { - t.Fatalf("Should error if T2 Unlimited is enabled with non-T2 instance_type") - } -} - -func TestRunConfigPrepare_EnableT2UnlimitedBadWithSpotInstanceRequest(t *testing.T) { - c := testConfig() - // T2 Unlimited cannot be used with Spot Instances - c.InstanceType = "t2.micro" - c.EnableT2Unlimited = true - c.SpotPrice = "auto" - err := c.Prepare(nil) - if len(err) != 1 { - t.Fatalf("Should error if T2 Unlimited has been used in conjuntion with a Spot Price request") - } -} - -func TestRunConfigPrepare_SpotAuto(t *testing.T) { - c := testConfig() - c.SpotPrice = "auto" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - // Shouldn't error (YET) even though SpotPriceAutoProduct is deprecated - c.SpotPriceAutoProduct = "Linux/Unix" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_SSHPort(t *testing.T) { - c := testConfig() - c.Comm.SSHPort = 0 - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHPort != 22 { - t.Fatalf("invalid value: %d", c.Comm.SSHPort) - } - - c.Comm.SSHPort = 44 - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHPort != 44 { - t.Fatalf("invalid value: %d", c.Comm.SSHPort) - } -} - -func TestRunConfigPrepare_UserData(t *testing.T) { - c := testConfig() - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("err: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - c.UserData = "foo" - c.UserDataFile = tf.Name() - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("Should error if user_data string and user_data_file have both been specified") - } -} - -func TestRunConfigPrepare_UserDataFile(t *testing.T) { - c := testConfig() - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - c.UserDataFile = "idontexistidontthink" - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("Should error if the file specified by user_data_file does not exist") - } - - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("err: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - c.UserDataFile = tf.Name() - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_TemporaryKeyPairName(t *testing.T) { - c := testConfig() - c.Comm.SSHTemporaryKeyPairName = "" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHTemporaryKeyPairName == "" { - t.Fatal("keypair name is empty") - } - - // Match prefix and UUID, e.g. "packer_5790d491-a0b8-c84c-c9d2-2aea55086550". - r := regexp.MustCompile(`\Apacker_(?:(?i)[a-f\d]{8}(?:-[a-f\d]{4}){3}-[a-f\d]{12}?)\z`) - if !r.MatchString(c.Comm.SSHTemporaryKeyPairName) { - t.Fatal("keypair name is not valid") - } - - c.Comm.SSHTemporaryKeyPairName = "ssh-key-123" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHTemporaryKeyPairName != "ssh-key-123" { - t.Fatal("keypair name does not match") - } -} - -func TestRunConfigPrepare_TenancyBad(t *testing.T) { - c := testConfig() - c.Tenancy = "not_real" - - if err := c.Prepare(nil); len(err) != 1 { - t.Fatal("Should error if tenancy is set to an invalid type") - } -} - -func TestRunConfigPrepare_TenancyGood(t *testing.T) { - validTenancy := []string{"", "default", "dedicated", "host"} - for _, vt := range validTenancy { - c := testConfig() - c.Tenancy = vt - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("Should not error if tenancy is set to %s", vt) - } - } -} diff --git a/builder/amazon/common/ssh_test.go b/builder/amazon/common/ssh_test.go deleted file mode 100644 index 27bedca80..000000000 --- a/builder/amazon/common/ssh_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package common - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/packer-plugin-sdk/multistep" -) - -const ( - privateIP = "10.0.0.1" - publicIP = "192.168.1.1" - privateDNS = "private.dns.test" - publicDNS = "public.dns.test" - localhost = "localhost" - sshHostTemplate = "custom.host.value" -) - -func TestSSHHost(t *testing.T) { - origSshHostSleepDuration := sshHostSleepDuration - defer func() { sshHostSleepDuration = origSshHostSleepDuration }() - sshHostSleepDuration = 0 - - var cases = []struct { - allowTries int - vpcId string - sshInterface string - - ok bool - wantHost string - sshHostOverride string - }{ - {1, "", "", true, publicDNS, ""}, - {1, "", "private_ip", true, privateIP, ""}, - {1, "", "session_manager", true, localhost, ""}, - {1, "vpc-id", "", true, publicIP, ""}, - {1, "vpc-id", "private_ip", true, privateIP, ""}, - {1, "vpc-id", "private_dns", true, privateDNS, ""}, - {1, "vpc-id", "public_dns", true, publicDNS, ""}, - {1, "vpc-id", "public_ip", true, publicIP, ""}, - {1, "vpc-id", "session_manager", true, localhost, ""}, - {2, "", "", true, publicDNS, ""}, - {2, "", "private_ip", true, privateIP, ""}, - {2, "vpc-id", "", true, publicIP, ""}, - {2, "vpc-id", "private_ip", true, privateIP, ""}, - {2, "vpc-id", "private_dns", true, privateDNS, ""}, - {2, "vpc-id", "public_dns", true, publicDNS, ""}, - {2, "vpc-id", "public_ip", true, publicIP, ""}, - {3, "", "", false, "", ""}, - {3, "", "private_ip", false, "", ""}, - {3, "vpc-id", "", false, "", ""}, - {3, "vpc-id", "private_ip", false, "", ""}, - {3, "vpc-id", "private_dns", false, "", ""}, - {3, "vpc-id", "public_dns", false, "", ""}, - {3, "vpc-id", "public_ip", false, "", ""}, - {1, "", "", true, sshHostTemplate, sshHostTemplate}, - {1, "vpc-id", "", true, sshHostTemplate, sshHostTemplate}, - {2, "vpc-id", "private_dns", true, sshHostTemplate, sshHostTemplate}, - } - - for _, c := range cases { - testSSHHost(t, c.allowTries, c.vpcId, c.sshInterface, c.ok, c.wantHost, - c.sshHostOverride) - } -} - -func testSSHHost(t *testing.T, allowTries int, vpcId string, sshInterface string, - ok bool, wantHost string, sshHostOverride string) { - t.Logf("allowTries=%d vpcId=%s sshInterface=%s ok=%t wantHost=%q sshHostOverride=%s", - allowTries, vpcId, sshInterface, ok, wantHost, sshHostOverride) - - e := &fakeEC2Describer{ - allowTries: allowTries, - vpcId: vpcId, - privateIP: privateIP, - publicIP: publicIP, - privateDNS: privateDNS, - publicDNS: publicDNS, - } - - f := SSHHost(e, sshInterface, sshHostOverride) - st := &multistep.BasicStateBag{} - st.Put("instance", &ec2.Instance{ - InstanceId: aws.String("instance-id"), - }) - - host, err := f(st) - - if e.tries > allowTries { - t.Fatalf("got %d ec2 DescribeInstances tries, want %d", e.tries, allowTries) - } - - switch { - case ok && err != nil: - t.Fatalf("expected no error, got %+v", err) - case !ok && err == nil: - t.Fatalf("expected error, got none and host %s", host) - } - - if host != wantHost { - t.Fatalf("got host %s, want %s", host, wantHost) - } -} - -type fakeEC2Describer struct { - allowTries int - tries int - - vpcId string - privateIP, publicIP, privateDNS, publicDNS string -} - -func (d *fakeEC2Describer) DescribeInstances(in *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) { - d.tries++ - - instance := &ec2.Instance{ - InstanceId: aws.String("instance-id"), - } - - if d.vpcId != "" { - instance.VpcId = aws.String(d.vpcId) - } - - if d.tries >= d.allowTries { - instance.PublicIpAddress = aws.String(d.publicIP) - instance.PrivateIpAddress = aws.String(d.privateIP) - instance.PublicDnsName = aws.String(d.publicDNS) - instance.PrivateDnsName = aws.String(d.privateDNS) - } - - out := &ec2.DescribeInstancesOutput{ - Reservations: []*ec2.Reservation{ - { - Instances: []*ec2.Instance{instance}, - }, - }, - } - - return out, nil -} diff --git a/builder/amazon/common/state_test.go b/builder/amazon/common/state_test.go deleted file mode 100644 index 2ef7ae5aa..000000000 --- a/builder/amazon/common/state_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package common - -import ( - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws/request" -) - -func testGetWaiterOptions(t *testing.T) { - // no vars are set - envValues := overridableWaitVars{ - envInfo{"AWS_POLL_DELAY_SECONDS", 2, false}, - envInfo{"AWS_MAX_ATTEMPTS", 0, false}, - envInfo{"AWS_TIMEOUT_SECONDS", 300, false}, - } - options := applyEnvOverrides(envValues) - if len(options) > 0 { - t.Fatalf("Did not expect any waiter options to be generated; actual: %#v", options) - } - - // all vars are set - envValues = overridableWaitVars{ - envInfo{"AWS_POLL_DELAY_SECONDS", 1, true}, - envInfo{"AWS_MAX_ATTEMPTS", 800, true}, - envInfo{"AWS_TIMEOUT_SECONDS", 20, true}, - } - options = applyEnvOverrides(envValues) - expected := []request.WaiterOption{ - request.WithWaiterDelay(request.ConstantWaiterDelay(time.Duration(1) * time.Second)), - request.WithWaiterMaxAttempts(800), - } - if !reflect.DeepEqual(options, expected) { - t.Fatalf("expected != actual!! Expected: %#v; Actual: %#v.", expected, options) - } - - // poll delay is not set - envValues = overridableWaitVars{ - envInfo{"AWS_POLL_DELAY_SECONDS", 2, false}, - envInfo{"AWS_MAX_ATTEMPTS", 800, true}, - envInfo{"AWS_TIMEOUT_SECONDS", 300, false}, - } - options = applyEnvOverrides(envValues) - expected = []request.WaiterOption{ - request.WithWaiterMaxAttempts(800), - } - if !reflect.DeepEqual(options, expected) { - t.Fatalf("expected != actual!! Expected: %#v; Actual: %#v.", expected, options) - } - - // poll delay is not set but timeout seconds is - envValues = overridableWaitVars{ - envInfo{"AWS_POLL_DELAY_SECONDS", 2, false}, - envInfo{"AWS_MAX_ATTEMPTS", 0, false}, - envInfo{"AWS_TIMEOUT_SECONDS", 20, true}, - } - options = applyEnvOverrides(envValues) - expected = []request.WaiterOption{ - request.WithWaiterDelay(request.ConstantWaiterDelay(time.Duration(2) * time.Second)), - request.WithWaiterMaxAttempts(10), - } - if !reflect.DeepEqual(options, expected) { - t.Fatalf("expected != actual!! Expected: %#v; Actual: %#v.", expected, options) - } -} diff --git a/builder/amazon/common/step_ami_region_copy_test.go b/builder/amazon/common/step_ami_region_copy_test.go deleted file mode 100644 index 4c809b665..000000000 --- a/builder/amazon/common/step_ami_region_copy_test.go +++ /dev/null @@ -1,404 +0,0 @@ -package common - -import ( - "bytes" - "context" - "fmt" - "sync" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ec2/ec2iface" - "github.com/hashicorp/packer-plugin-sdk/multistep" - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer-plugin-sdk/template/config" -) - -// Define a mock struct to be used in unit tests for common aws steps. -type mockEC2Conn struct { - ec2iface.EC2API - Config *aws.Config - - // Counters to figure out what code path was taken - copyImageCount int - describeImagesCount int - deregisterImageCount int - deleteSnapshotCount int - waitCount int - - lock sync.Mutex -} - -func (m *mockEC2Conn) CopyImage(copyInput *ec2.CopyImageInput) (*ec2.CopyImageOutput, error) { - m.lock.Lock() - m.copyImageCount++ - m.lock.Unlock() - copiedImage := fmt.Sprintf("%s-copied-%d", *copyInput.SourceImageId, m.copyImageCount) - output := &ec2.CopyImageOutput{ - ImageId: &copiedImage, - } - return output, nil -} - -// functions we have to create mock responses for in order for test to run -func (m *mockEC2Conn) DescribeImages(*ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error) { - m.lock.Lock() - m.describeImagesCount++ - m.lock.Unlock() - output := &ec2.DescribeImagesOutput{ - Images: []*ec2.Image{{}}, - } - return output, nil -} - -func (m *mockEC2Conn) DeregisterImage(*ec2.DeregisterImageInput) (*ec2.DeregisterImageOutput, error) { - m.lock.Lock() - m.deregisterImageCount++ - m.lock.Unlock() - output := &ec2.DeregisterImageOutput{} - return output, nil -} - -func (m *mockEC2Conn) DeleteSnapshot(*ec2.DeleteSnapshotInput) (*ec2.DeleteSnapshotOutput, error) { - m.lock.Lock() - m.deleteSnapshotCount++ - m.lock.Unlock() - output := &ec2.DeleteSnapshotOutput{} - return output, nil -} - -func (m *mockEC2Conn) WaitUntilImageAvailableWithContext(aws.Context, *ec2.DescribeImagesInput, ...request.WaiterOption) error { - m.lock.Lock() - m.waitCount++ - m.lock.Unlock() - return nil -} - -func getMockConn(config *AccessConfig, target string) (ec2iface.EC2API, error) { - mockConn := &mockEC2Conn{ - Config: aws.NewConfig(), - } - - return mockConn, nil -} - -// Create statebag for running test -func tState() multistep.StateBag { - state := new(multistep.BasicStateBag) - state.Put("ui", &packersdk.BasicUi{ - Reader: new(bytes.Buffer), - Writer: new(bytes.Buffer), - }) - state.Put("amis", map[string]string{"us-east-1": "ami-12345"}) - state.Put("snapshots", map[string][]string{"us-east-1": {"snap-0012345"}}) - conn, _ := getMockConn(&AccessConfig{}, "us-east-2") - state.Put("ec2", conn) - return state -} - -func TestStepAMIRegionCopy_duplicates(t *testing.T) { - // ------------------------------------------------------------------------ - // Test that if the original region is added to both Regions and Region, - // the ami is only copied once (with encryption). - // ------------------------------------------------------------------------ - - stepAMIRegionCopy := StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-east-1"}, - AMIKmsKeyId: "12345", - // Original region key in regionkeyids is different than in amikmskeyid - RegionKeyIds: map[string]string{"us-east-1": "12345"}, - EncryptBootVolume: config.TriTrue, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state := tState() - state.Put("intermediary_image", true) - stepAMIRegionCopy.Run(context.Background(), state) - - if len(stepAMIRegionCopy.Regions) != 1 { - t.Fatalf("Should have added original ami to Regions one time only") - } - - // ------------------------------------------------------------------------ - // Both Region and Regions set, but no encryption - shouldn't copy anything - // ------------------------------------------------------------------------ - - // the ami is only copied once. - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-east-1"}, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - state.Put("intermediary_image", false) - stepAMIRegionCopy.getRegionConn = getMockConn - stepAMIRegionCopy.Run(context.Background(), state) - - if len(stepAMIRegionCopy.Regions) != 0 { - t.Fatalf("Should not have added original ami to Regions; not encrypting") - } - - // ------------------------------------------------------------------------ - // Both Region and Regions set, but no encryption - shouldn't copy anything, - // this tests false as opposed to nil value above. - // ------------------------------------------------------------------------ - - // the ami is only copied once. - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-east-1"}, - EncryptBootVolume: config.TriFalse, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - state.Put("intermediary_image", false) - stepAMIRegionCopy.getRegionConn = getMockConn - stepAMIRegionCopy.Run(context.Background(), state) - - if len(stepAMIRegionCopy.Regions) != 0 { - t.Fatalf("Should not have added original ami to Regions once; not" + - "encrypting") - } - - // ------------------------------------------------------------------------ - // Multiple regions, many duplicates, and encryption (this shouldn't ever - // happen because of our template validation, but good to test it.) - // ------------------------------------------------------------------------ - - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - // Many duplicates for only 3 actual values - Regions: []string{"us-east-1", "us-west-2", "us-west-2", "ap-east-1", "ap-east-1", "ap-east-1"}, - AMIKmsKeyId: "IlikePancakes", - // Original region key in regionkeyids is different than in amikmskeyid - RegionKeyIds: map[string]string{"us-east-1": "12345", "us-west-2": "abcde", "ap-east-1": "xyz"}, - EncryptBootVolume: config.TriTrue, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - state.Put("intermediary_image", true) - stepAMIRegionCopy.Run(context.Background(), state) - - if len(stepAMIRegionCopy.Regions) != 3 { - t.Fatalf("Each AMI should have been added to Regions one time only.") - } - - // Also verify that we respect RegionKeyIds over AMIKmsKeyIds: - if stepAMIRegionCopy.RegionKeyIds["us-east-1"] != "12345" { - t.Fatalf("RegionKeyIds should take precedence over AmiKmsKeyIds") - } - - // ------------------------------------------------------------------------ - // Multiple regions, many duplicates, NO encryption - // ------------------------------------------------------------------------ - - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - // Many duplicates for only 3 actual values - Regions: []string{"us-east-1", "us-west-2", "us-west-2", "ap-east-1", "ap-east-1", "ap-east-1"}, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - state.Put("intermediary_image", false) - stepAMIRegionCopy.Run(context.Background(), state) - - if len(stepAMIRegionCopy.Regions) != 2 { - t.Fatalf("Each AMI should have been added to Regions one time only, " + - "and original region shouldn't be added at all") - } -} - -func TestStepAmiRegionCopy_nil_encryption(t *testing.T) { - // create step - stepAMIRegionCopy := StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: make([]string, 0), - AMIKmsKeyId: "", - RegionKeyIds: make(map[string]string), - EncryptBootVolume: config.TriUnset, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state := tState() - state.Put("intermediary_image", false) - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete != "" { - t.Fatalf("Shouldn't have an intermediary ami if encrypt is nil") - } - if len(stepAMIRegionCopy.Regions) != 0 { - t.Fatalf("Should not have added original ami to original region") - } -} - -func TestStepAmiRegionCopy_true_encryption(t *testing.T) { - // create step - stepAMIRegionCopy := StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: make([]string, 0), - AMIKmsKeyId: "", - RegionKeyIds: make(map[string]string), - EncryptBootVolume: config.TriTrue, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state := tState() - state.Put("intermediary_image", true) - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete == "" { - t.Fatalf("Should delete original AMI if encrypted=true") - } - if len(stepAMIRegionCopy.Regions) == 0 { - t.Fatalf("Should have added original ami to Regions") - } -} - -func TestStepAmiRegionCopy_nil_intermediary(t *testing.T) { - // create step - stepAMIRegionCopy := StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: make([]string, 0), - AMIKmsKeyId: "", - RegionKeyIds: make(map[string]string), - EncryptBootVolume: config.TriFalse, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state := tState() - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete != "" { - t.Fatalf("Should not delete original AMI if no intermediary") - } - if len(stepAMIRegionCopy.Regions) != 0 { - t.Fatalf("Should not have added original ami to Regions") - } -} - -func TestStepAmiRegionCopy_AMISkipBuildRegion(t *testing.T) { - // ------------------------------------------------------------------------ - // skip build region is true - // ------------------------------------------------------------------------ - - stepAMIRegionCopy := StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-west-1"}, - AMIKmsKeyId: "", - RegionKeyIds: map[string]string{"us-west-1": "abcde"}, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - AMISkipBuildRegion: true, - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state := tState() - state.Put("intermediary_image", true) - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete == "" { - t.Fatalf("Should delete original AMI if skip_save_build_region=true") - } - if len(stepAMIRegionCopy.Regions) != 1 { - t.Fatalf("Should not have added original ami to Regions; Regions: %#v", stepAMIRegionCopy.Regions) - } - - // ------------------------------------------------------------------------ - // skip build region is false. - // ------------------------------------------------------------------------ - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-west-1"}, - AMIKmsKeyId: "", - RegionKeyIds: make(map[string]string), - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - AMISkipBuildRegion: false, - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state.Put("intermediary_image", false) // not encrypted - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete != "" { - t.Fatalf("Shouldn't have an intermediary AMI, so dont delete original ami") - } - if len(stepAMIRegionCopy.Regions) != 1 { - t.Fatalf("Should not have added original ami to Regions; Regions: %#v", stepAMIRegionCopy.Regions) - } - - // ------------------------------------------------------------------------ - // skip build region is false, but encrypt is true - // ------------------------------------------------------------------------ - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-west-1"}, - AMIKmsKeyId: "", - RegionKeyIds: map[string]string{"us-west-1": "abcde"}, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - AMISkipBuildRegion: false, - EncryptBootVolume: config.TriTrue, - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state.Put("intermediary_image", true) //encrypted - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete == "" { - t.Fatalf("Have to delete intermediary AMI") - } - if len(stepAMIRegionCopy.Regions) != 2 { - t.Fatalf("Should have added original ami to Regions; Regions: %#v", stepAMIRegionCopy.Regions) - } - - // ------------------------------------------------------------------------ - // skip build region is true, and encrypt is true - // ------------------------------------------------------------------------ - stepAMIRegionCopy = StepAMIRegionCopy{ - AccessConfig: FakeAccessConfig(), - Regions: []string{"us-west-1"}, - AMIKmsKeyId: "", - RegionKeyIds: map[string]string{"us-west-1": "abcde"}, - Name: "fake-ami-name", - OriginalRegion: "us-east-1", - AMISkipBuildRegion: true, - EncryptBootVolume: config.TriTrue, - } - // mock out the region connection code - stepAMIRegionCopy.getRegionConn = getMockConn - - state.Put("intermediary_image", true) //encrypted - stepAMIRegionCopy.Run(context.Background(), state) - - if stepAMIRegionCopy.toDelete == "" { - t.Fatalf("Have to delete intermediary AMI") - } - if len(stepAMIRegionCopy.Regions) != 1 { - t.Fatalf("Should not have added original ami to Regions; Regions: %#v", stepAMIRegionCopy.Regions) - } -} diff --git a/builder/amazon/common/step_pre_validate_test.go b/builder/amazon/common/step_pre_validate_test.go deleted file mode 100644 index ffaf946f9..000000000 --- a/builder/amazon/common/step_pre_validate_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package common - -import ( - "fmt" - "strings" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" -) - -//DescribeVpcs mocks an ec2.DescribeVpcsOutput for a given input -func (m *mockEC2Conn) DescribeVpcs(input *ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error) { - - if input == nil || aws.StringValue(input.VpcIds[0]) == "" { - return nil, fmt.Errorf("oops looks like we need more input") - } - - var isDefault bool - vpcID := aws.StringValue(input.VpcIds[0]) - - //only one default VPC per region - if strings.Contains("vpc-default-id", vpcID) { - isDefault = true - } - - output := &ec2.DescribeVpcsOutput{ - Vpcs: []*ec2.Vpc{ - {IsDefault: aws.Bool(isDefault), - VpcId: aws.String(vpcID), - }, - }, - } - return output, nil -} - -func TestStepPreValidate_checkVpc(t *testing.T) { - tt := []struct { - name string - step StepPreValidate - errorExpected bool - }{ - {"DefaultVpc", StepPreValidate{VpcId: "vpc-default-id"}, false}, - {"NonDefaultVpcNoSubnet", StepPreValidate{VpcId: "vpc-1234567890"}, true}, - {"NonDefaultVpcWithSubnet", StepPreValidate{VpcId: "vpc-1234567890", SubnetId: "subnet-1234567890"}, false}, - {"SubnetWithNoVpc", StepPreValidate{SubnetId: "subnet-1234567890"}, false}, - {"NoVpcInformation", StepPreValidate{}, false}, - {"NonDefaultVpcWithSubnetFilter", StepPreValidate{VpcId: "vpc-1234567890", HasSubnetFilter: true}, false}, - } - - mockConn, err := getMockConn(nil, "") - if err != nil { - t.Fatal("unable to get a mock connection") - } - - for _, tc := range tt { - t.Run(tc.name, func(t *testing.T) { - err := tc.step.checkVpc(mockConn) - - if tc.errorExpected && err == nil { - t.Errorf("expected a validation error for %q but got %q", tc.name, err) - } - - if !tc.errorExpected && err != nil { - t.Errorf("expected a validation to pass for %q but got %q", tc.name, err) - } - }) - } - -} diff --git a/builder/amazon/common/step_run_spot_instance_test.go b/builder/amazon/common/step_run_spot_instance_test.go deleted file mode 100644 index 71caa4bd3..000000000 --- a/builder/amazon/common/step_run_spot_instance_test.go +++ /dev/null @@ -1,366 +0,0 @@ -package common - -import ( - "bytes" - "context" - "fmt" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ec2/ec2iface" - "github.com/hashicorp/packer-plugin-sdk/communicator" - "github.com/hashicorp/packer-plugin-sdk/multistep" - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -// Create statebag for running test -func tStateSpot() multistep.StateBag { - state := new(multistep.BasicStateBag) - state.Put("ui", &packersdk.BasicUi{ - Reader: new(bytes.Buffer), - Writer: new(bytes.Buffer), - }) - state.Put("availability_zone", "us-east-1c") - state.Put("securityGroupIds", []string{"sg-0b8984db72f213dc3"}) - state.Put("iamInstanceProfile", "packer-123") - state.Put("subnet_id", "subnet-077fde4e") - state.Put("source_image", "") - return state -} - -func getBasicStep() *StepRunSpotInstance { - stepRunSpotInstance := StepRunSpotInstance{ - PollingConfig: new(AWSPollingConfig), - AssociatePublicIpAddress: false, - LaunchMappings: BlockDevices{}, - BlockDurationMinutes: 0, - Debug: false, - Comm: &communicator.Config{ - SSH: communicator.SSH{ - SSHKeyPairName: "foo", - }, - }, - EbsOptimized: false, - ExpectedRootDevice: "ebs", - InstanceInitiatedShutdownBehavior: "stop", - InstanceType: "t2.micro", - Region: "us-east-1", - SourceAMI: "", - SpotPrice: "auto", - SpotTags: nil, - Tags: map[string]string{}, - VolumeTags: nil, - UserData: "", - UserDataFile: "", - } - - return &stepRunSpotInstance -} - -func TestCreateTemplateData(t *testing.T) { - state := tStateSpot() - stepRunSpotInstance := getBasicStep() - template := stepRunSpotInstance.CreateTemplateData(aws.String("userdata"), "az", state, - &ec2.LaunchTemplateInstanceMarketOptionsRequest{}) - - // expected := []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ - // &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ - // DeleteOnTermination: aws.Bool(true), - // DeviceIndex: aws.Int64(0), - // Groups: aws.StringSlice([]string{"sg-0b8984db72f213dc3"}), - // SubnetId: aws.String("subnet-077fde4e"), - // }, - // } - // if expected != template.NetworkInterfaces { - if template.NetworkInterfaces == nil { - t.Fatalf("Template should have contained a networkInterface object: recieved %#v", template.NetworkInterfaces) - } - - if *template.IamInstanceProfile.Name != state.Get("iamInstanceProfile") { - t.Fatalf("Template should have contained a InstanceProfile name: recieved %#v", template.IamInstanceProfile.Name) - } - - // Rerun, this time testing that we set security group IDs - state.Put("subnet_id", "") - template = stepRunSpotInstance.CreateTemplateData(aws.String("userdata"), "az", state, - &ec2.LaunchTemplateInstanceMarketOptionsRequest{}) - if template.NetworkInterfaces != nil { - t.Fatalf("Template shouldn't contain network interfaces object if subnet_id is unset.") - } - - // Rerun, this time testing that instance doesn't have instance profile is iamInstanceProfile is unset - state.Put("iamInstanceProfile", "") - template = stepRunSpotInstance.CreateTemplateData(aws.String("userdata"), "az", state, - &ec2.LaunchTemplateInstanceMarketOptionsRequest{}) - fmt.Println(template.IamInstanceProfile) - if *template.IamInstanceProfile.Name != "" { - t.Fatalf("Template shouldn't contain instance profile if iamInstanceProfile is unset.") - } -} - -func TestCreateTemplateData_NoEphemeral(t *testing.T) { - state := tStateSpot() - stepRunSpotInstance := getBasicStep() - stepRunSpotInstance.NoEphemeral = true - template := stepRunSpotInstance.CreateTemplateData(aws.String("userdata"), "az", state, - &ec2.LaunchTemplateInstanceMarketOptionsRequest{}) - if len(template.BlockDeviceMappings) != 26 { - t.Fatalf("Should have created 26 mappings to keep ephemeral drives from appearing.") - } - - // Now check that noEphemeral doesn't mess with the mappings in real life. - // state = tStateSpot() - // stepRunSpotInstance = getBasicStep() - // stepRunSpotInstance.NoEphemeral = true - // mappings := []*ec2.InstanceBlockDeviceMapping{ - // &ec2.InstanceBlockDeviceMapping{ - // DeviceName: "xvda", - // Ebs: { - // DeleteOnTermination: true, - // Status: "attaching", - // VolumeId: "vol-044cd49c330f21c05", - // }, - // }, - // &ec2.InstanceBlockDeviceMapping{ - // DeviceName: "/dev/xvdf", - // Ebs: { - // DeleteOnTermination: false, - // Status: "attaching", - // VolumeId: "vol-0eefaf2d6ae35827e", - // }, - // }, - // } - // template = stepRunSpotInstance.CreateTemplateData(aws.String("userdata"), "az", state, - // &ec2.LaunchTemplateInstanceMarketOptionsRequest{}) - // if len(*template.BlockDeviceMappings) != 26 { - // t.Fatalf("Should have created 26 mappings to keep ephemeral drives from appearing.") - // } -} - -type runSpotEC2ConnMock struct { - ec2iface.EC2API - - CreateLaunchTemplateParams []*ec2.CreateLaunchTemplateInput - CreateLaunchTemplateFn func(*ec2.CreateLaunchTemplateInput) (*ec2.CreateLaunchTemplateOutput, error) - - CreateFleetParams []*ec2.CreateFleetInput - CreateFleetFn func(*ec2.CreateFleetInput) (*ec2.CreateFleetOutput, error) - - CreateTagsParams []*ec2.CreateTagsInput - CreateTagsFn func(*ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error) - - DescribeInstancesParams []*ec2.DescribeInstancesInput - DescribeInstancesFn func(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) -} - -func (m *runSpotEC2ConnMock) CreateLaunchTemplate(req *ec2.CreateLaunchTemplateInput) (*ec2.CreateLaunchTemplateOutput, error) { - m.CreateLaunchTemplateParams = append(m.CreateLaunchTemplateParams, req) - resp, err := m.CreateLaunchTemplateFn(req) - return resp, err -} - -func (m *runSpotEC2ConnMock) CreateFleet(req *ec2.CreateFleetInput) (*ec2.CreateFleetOutput, error) { - m.CreateFleetParams = append(m.CreateFleetParams, req) - if m.CreateFleetFn != nil { - resp, err := m.CreateFleetFn(req) - return resp, err - } else { - return nil, nil - } -} - -func (m *runSpotEC2ConnMock) DescribeInstances(req *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) { - m.DescribeInstancesParams = append(m.DescribeInstancesParams, req) - if m.DescribeInstancesFn != nil { - resp, err := m.DescribeInstancesFn(req) - return resp, err - } else { - return nil, nil - } -} - -func (m *runSpotEC2ConnMock) CreateTags(req *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error) { - m.CreateTagsParams = append(m.CreateTagsParams, req) - if m.CreateTagsFn != nil { - resp, err := m.CreateTagsFn(req) - return resp, err - } else { - return nil, nil - } -} - -func defaultEc2Mock(instanceId, spotRequestId, volumeId, launchTemplateId *string) *runSpotEC2ConnMock { - instance := &ec2.Instance{ - InstanceId: instanceId, - SpotInstanceRequestId: spotRequestId, - BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{ - { - Ebs: &ec2.EbsInstanceBlockDevice{ - VolumeId: volumeId, - }, - }, - }, - } - return &runSpotEC2ConnMock{ - CreateLaunchTemplateFn: func(in *ec2.CreateLaunchTemplateInput) (*ec2.CreateLaunchTemplateOutput, error) { - return &ec2.CreateLaunchTemplateOutput{ - LaunchTemplate: &ec2.LaunchTemplate{ - LaunchTemplateId: launchTemplateId, - }, - Warning: nil, - }, nil - }, - CreateFleetFn: func(*ec2.CreateFleetInput) (*ec2.CreateFleetOutput, error) { - return &ec2.CreateFleetOutput{ - Errors: nil, - FleetId: nil, - Instances: []*ec2.CreateFleetInstance{ - { - InstanceIds: []*string{instanceId}, - }, - }, - }, nil - }, - DescribeInstancesFn: func(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) { - return &ec2.DescribeInstancesOutput{ - NextToken: nil, - Reservations: []*ec2.Reservation{ - { - Instances: []*ec2.Instance{instance}, - }, - }, - }, nil - }, - } -} - -func TestRun(t *testing.T) { - instanceId := aws.String("test-instance-id") - spotRequestId := aws.String("spot-id") - volumeId := aws.String("volume-id") - launchTemplateId := aws.String("launchTemplateId") - ec2Mock := defaultEc2Mock(instanceId, spotRequestId, volumeId, launchTemplateId) - - uiMock := packersdk.TestUi(t) - - state := tStateSpot() - state.Put("ec2", ec2Mock) - state.Put("ui", uiMock) - state.Put("source_image", testImage()) - - stepRunSpotInstance := getBasicStep() - stepRunSpotInstance.Tags["Name"] = "Packer Builder" - stepRunSpotInstance.Tags["test-tag"] = "test-value" - stepRunSpotInstance.SpotTags = map[string]string{ - "spot-tag": "spot-tag-value", - } - stepRunSpotInstance.VolumeTags = map[string]string{ - "volume-tag": "volume-tag-value", - } - - ctx := context.TODO() - action := stepRunSpotInstance.Run(ctx, state) - - if err := state.Get("error"); err != nil { - t.Fatalf("should not error, but: %v", err) - } - - if action != multistep.ActionContinue { - t.Fatalf("shoul continue, but: %v", action) - } - - if len(ec2Mock.CreateLaunchTemplateParams) != 1 { - t.Fatalf("createLaunchTemplate should be invoked once, but invoked %v", len(ec2Mock.CreateLaunchTemplateParams)) - } - launchTemplateName := ec2Mock.CreateLaunchTemplateParams[0].LaunchTemplateName - - if len(ec2Mock.CreateLaunchTemplateParams[0].TagSpecifications) != 1 { - t.Fatalf("exactly one launch template tag specification expected") - } - if *ec2Mock.CreateLaunchTemplateParams[0].TagSpecifications[0].ResourceType != "launch-template" { - t.Fatalf("resource type 'launch-template' expected") - } - if len(ec2Mock.CreateLaunchTemplateParams[0].TagSpecifications[0].Tags) != 1 { - t.Fatalf("1 launch template tag expected") - } - - nameTag := ec2Mock.CreateLaunchTemplateParams[0].TagSpecifications[0].Tags[0] - if *nameTag.Key != "spot-tag" || *nameTag.Value != "spot-tag-value" { - t.Fatalf("expected spot-tag: spot-tag-value") - } - - if len(ec2Mock.CreateFleetParams) != 1 { - t.Fatalf("createFleet should be invoked once, but invoked %v", len(ec2Mock.CreateLaunchTemplateParams)) - } - if *ec2Mock.CreateFleetParams[0].TargetCapacitySpecification.DefaultTargetCapacityType != "spot" { - t.Fatalf("capacity type should be spot") - } - if *ec2Mock.CreateFleetParams[0].TargetCapacitySpecification.TotalTargetCapacity != 1 { - t.Fatalf("target capacity should be 1") - } - if len(ec2Mock.CreateFleetParams[0].LaunchTemplateConfigs) != 1 { - t.Fatalf("exactly one launch config template expected") - } - if *ec2Mock.CreateFleetParams[0].LaunchTemplateConfigs[0].LaunchTemplateSpecification.LaunchTemplateName != *launchTemplateName { - t.Fatalf("launchTemplateName should match in createLaunchTemplate and createFleet requests") - } - - if len(ec2Mock.DescribeInstancesParams) != 1 { - t.Fatalf("describeInstancesParams should be invoked once, but invoked %v", len(ec2Mock.DescribeInstancesParams)) - } - if *ec2Mock.DescribeInstancesParams[0].InstanceIds[0] != *instanceId { - t.Fatalf("instanceId should match from createFleet response") - } - - uiMock.Say(fmt.Sprintf("%v", ec2Mock.CreateTagsParams)) - if len(ec2Mock.CreateTagsParams) != 3 { - t.Fatalf("createTags should be invoked 3 times") - } - if len(ec2Mock.CreateTagsParams[0].Resources) != 1 || *ec2Mock.CreateTagsParams[0].Resources[0] != *spotRequestId { - t.Fatalf("should create tags for spot request") - } - if len(ec2Mock.CreateTagsParams[1].Resources) != 1 || *ec2Mock.CreateTagsParams[1].Resources[0] != *instanceId { - t.Fatalf("should create tags for instance") - } - if len(ec2Mock.CreateTagsParams[2].Resources) != 1 || ec2Mock.CreateTagsParams[2].Resources[0] != volumeId { - t.Fatalf("should create tags for volume") - } -} - -func TestRun_NoSpotTags(t *testing.T) { - instanceId := aws.String("test-instance-id") - spotRequestId := aws.String("spot-id") - volumeId := aws.String("volume-id") - launchTemplateId := aws.String("lt-id") - ec2Mock := defaultEc2Mock(instanceId, spotRequestId, volumeId, launchTemplateId) - - uiMock := packersdk.TestUi(t) - - state := tStateSpot() - state.Put("ec2", ec2Mock) - state.Put("ui", uiMock) - state.Put("source_image", testImage()) - - stepRunSpotInstance := getBasicStep() - stepRunSpotInstance.Tags["Name"] = "Packer Builder" - stepRunSpotInstance.Tags["test-tag"] = "test-value" - stepRunSpotInstance.VolumeTags = map[string]string{ - "volume-tag": "volume-tag-value", - } - - ctx := context.TODO() - action := stepRunSpotInstance.Run(ctx, state) - - if err := state.Get("error"); err != nil { - t.Fatalf("should not error, but: %v", err) - } - - if action != multistep.ActionContinue { - t.Fatalf("shoul continue, but: %v", action) - } - - if len(ec2Mock.CreateLaunchTemplateParams[0].TagSpecifications) != 0 { - t.Fatalf("0 launch template tags expected") - } -} diff --git a/builder/amazon/common/step_source_ami_info_test.go b/builder/amazon/common/step_source_ami_info_test.go deleted file mode 100644 index 4941180cd..000000000 --- a/builder/amazon/common/step_source_ami_info_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package common - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/stretchr/testify/assert" -) - -func TestStepSourceAmiInfo_PVImage(t *testing.T) { - err := new(StepSourceAMIInfo).canEnableEnhancedNetworking(&ec2.Image{ - VirtualizationType: aws.String("paravirtual"), - }) - assert.Error(t, err) -} - -func TestStepSourceAmiInfo_HVMImage(t *testing.T) { - err := new(StepSourceAMIInfo).canEnableEnhancedNetworking(&ec2.Image{ - VirtualizationType: aws.String("hvm"), - }) - assert.NoError(t, err) -} - -func TestStepSourceAmiInfo_PVImageWithAMIVirtPV(t *testing.T) { - stepSourceAMIInfo := StepSourceAMIInfo{ - AMIVirtType: "paravirtual", - } - err := stepSourceAMIInfo.canEnableEnhancedNetworking(&ec2.Image{ - VirtualizationType: aws.String("paravirtual"), - }) - assert.Error(t, err) -} - -func TestStepSourceAmiInfo_PVImageWithAMIVirtHVM(t *testing.T) { - stepSourceAMIInfo := StepSourceAMIInfo{ - AMIVirtType: "hvm", - } - err := stepSourceAMIInfo.canEnableEnhancedNetworking(&ec2.Image{ - VirtualizationType: aws.String("paravirtual"), - }) - assert.NoError(t, err) -} diff --git a/builder/amazon/common/template_funcs_test.go b/builder/amazon/common/template_funcs_test.go deleted file mode 100644 index 11ad70aac..000000000 --- a/builder/amazon/common/template_funcs_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package common - -import ( - "testing" -) - -func TestAMITemplatePrepare_clean(t *testing.T) { - origName := "AMZamz09()./-_:&^ $%[]#'@" - expected := "AMZamz09()./-_--- --[]-'@" - - name := templateCleanAMIName(origName) - - if name != expected { - t.Fatalf("template names do not match: expected %s got %s\n", expected, name) - } -} diff --git a/builder/amazon/ebs/acceptance/aws.go b/builder/amazon/ebs/acceptance/aws.go deleted file mode 100644 index bbccf3857..000000000 --- a/builder/amazon/ebs/acceptance/aws.go +++ /dev/null @@ -1,46 +0,0 @@ -package amazon_acc - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - awscommon "github.com/hashicorp/packer/builder/amazon/common" -) - -type AWSHelper struct { - Region string - AMIName string -} - -func (a *AWSHelper) CleanUpAmi() error { - accessConfig := &awscommon.AccessConfig{} - session, err := accessConfig.Session() - if err != nil { - return fmt.Errorf("AWSAMICleanUp: Unable to create aws session %s", err.Error()) - } - - regionconn := ec2.New(session.Copy(&aws.Config{ - Region: aws.String(a.Region), - })) - - resp, err := regionconn.DescribeImages(&ec2.DescribeImagesInput{ - Owners: aws.StringSlice([]string{"self"}), - Filters: []*ec2.Filter{{ - Name: aws.String("name"), - Values: aws.StringSlice([]string{a.AMIName}), - }}}) - if err != nil { - return fmt.Errorf("AWSAMICleanUp: Unable to find Image %s: %s", a.AMIName, err.Error()) - } - - if resp != nil && len(resp.Images) > 0 { - _, err = regionconn.DeregisterImage(&ec2.DeregisterImageInput{ - ImageId: resp.Images[0].ImageId, - }) - if err != nil { - return fmt.Errorf("AWSAMICleanUp: Unable to Deregister Image %s", err.Error()) - } - } - return nil -} diff --git a/builder/amazon/ebs/acceptance/builder_acceptance.go b/builder/amazon/ebs/acceptance/builder_acceptance.go deleted file mode 100644 index 9363a1647..000000000 --- a/builder/amazon/ebs/acceptance/builder_acceptance.go +++ /dev/null @@ -1,59 +0,0 @@ -package amazon_acc - -// This is the code necessary for running the provisioner acceptance tests. -// It provides the builder config and cleans up created resource. - -import ( - "fmt" - "io/ioutil" - "os" - "path/filepath" - - amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -type AmazonEBSAccTest struct{} - -func (s *AmazonEBSAccTest) GetConfigs() (map[string]string, error) { - fixtures := map[string]string{ - "linux": "amazon-ebs.txt", - "windows": "amazon-ebs_windows.txt", - } - - configs := make(map[string]string) - - for distro, fixture := range fixtures { - fileName := fixture - filePath := filepath.Join("../../builder/amazon/ebs/acceptance/test-fixtures/", fileName) - config, err := os.Open(filePath) - if err != nil { - return nil, fmt.Errorf("Expected to find %s", filePath) - } - defer config.Close() - - file, err := ioutil.ReadAll(config) - if err != nil { - return nil, fmt.Errorf("Unable to read %s", filePath) - } - - configs[distro] = string(file) - - } - return configs, nil -} - -func (s *AmazonEBSAccTest) CleanUp() error { - helper := AWSHelper{ - Region: "us-east-1", - AMIName: "packer-acc-test", - } - return helper.CleanUpAmi() -} - -func (s *AmazonEBSAccTest) GetBuilderStore() packersdk.MapOfBuilder { - return packersdk.MapOfBuilder{ - "amazon-ebs": func() (packersdk.Builder, error) { return &amazonebsbuilder.Builder{}, nil }, - } -} diff --git a/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs.txt b/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs.txt deleted file mode 100644 index 1245cf9e5..000000000 --- a/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "amazon-ebs", - "ami_name": "packer-acc-test", - "instance_type": "m1.small", - "region": "us-east-1", - "ssh_username": "ubuntu", - "source_ami": "ami-0568456c", - "force_deregister" : true, - "tags": { - "packer-test": "true" - } -} \ No newline at end of file diff --git a/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs_windows.txt b/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs_windows.txt deleted file mode 100644 index b23dc04ba..000000000 --- a/builder/amazon/ebs/acceptance/test-fixtures/amazon-ebs_windows.txt +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "amazon-ebs", - "region": "us-east-1", - "instance_type": "t2.micro", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "*Windows_Server-2012-R2*English-64Bit-Base*", - "root-device-type": "ebs" - }, - "most_recent": true, - "owners": "amazon" - }, - "ami_name": "packer-acc-test", - "user_data_file": "../../builder/amazon/ebs/acceptance/test-fixtures/scripts/bootstrap_win.txt", - "communicator": "winrm", - "winrm_username": "Administrator", - "winrm_password": "SuperS3cr3t!!!!", - "force_deregister" : true, - "tags": { - "packer-test": "true" - } -} diff --git a/builder/amazon/ebs/acceptance/test-fixtures/scripts/bootstrap_win.txt b/builder/amazon/ebs/acceptance/test-fixtures/scripts/bootstrap_win.txt deleted file mode 100644 index 8229c8842..000000000 --- a/builder/amazon/ebs/acceptance/test-fixtures/scripts/bootstrap_win.txt +++ /dev/null @@ -1,40 +0,0 @@ - -# Set administrator password -net user Administrator SuperS3cr3t!!!! -wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE - -# First, make sure WinRM can't be connected to -netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block - -# Delete any existing WinRM listeners -winrm delete winrm/config/listener?Address=*+Transport=HTTP 2>$Null -winrm delete winrm/config/listener?Address=*+Transport=HTTPS 2>$Null - -# Disable group policies which block basic authentication and unencrypted login - -Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WinRM\Client -Name AllowBasic -Value 1 -Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WinRM\Client -Name AllowUnencryptedTraffic -Value 1 -Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WinRM\Service -Name AllowBasic -Value 1 -Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WinRM\Service -Name AllowUnencryptedTraffic -Value 1 - - -# Create a new WinRM listener and configure -winrm create winrm/config/listener?Address=*+Transport=HTTP -winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}' -winrm set winrm/config '@{MaxTimeoutms="7200000"}' -winrm set winrm/config/service '@{AllowUnencrypted="true"}' -winrm set winrm/config/service '@{MaxConcurrentOperationsPerUser="12000"}' -winrm set winrm/config/service/auth '@{Basic="true"}' -winrm set winrm/config/client/auth '@{Basic="true"}' - -# Configure UAC to allow privilege elevation in remote shells -$Key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -$Setting = 'LocalAccountTokenFilterPolicy' -Set-ItemProperty -Path $Key -Name $Setting -Value 1 -Force - -# Configure and restart the WinRM Service; Enable the required firewall exception -Stop-Service -Name WinRM -Set-Service -Name WinRM -StartupType Automatic -netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new action=allow localip=any remoteip=any -Start-Service -Name WinRM - diff --git a/builder/amazon/ebs/builder_acc_test.go b/builder/amazon/ebs/builder_acc_test.go deleted file mode 100644 index 13623f435..000000000 --- a/builder/amazon/ebs/builder_acc_test.go +++ /dev/null @@ -1,396 +0,0 @@ -/* -Deregister the test image with -aws ec2 deregister-image --image-id $(aws ec2 describe-images --output text --filters "Name=name,Values=packer-test-packer-test-dereg" --query 'Images[*].{ID:ImageId}') -*/ -package ebs - -import ( - "fmt" - "os" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - builderT "github.com/hashicorp/packer-plugin-sdk/acctest" - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer/builder/amazon/common" -) - -func TestBuilderAcc_basic(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: testBuilderAccBasic, - }) -} - -func TestBuilderAcc_regionCopy(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: testBuilderAccRegionCopy, - Check: checkRegionCopy([]string{"us-east-1", "us-west-2"}), - }) -} - -func TestBuilderAcc_forceDeregister(t *testing.T) { - // Build the same AMI name twice, with force_deregister on the second run - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: buildForceDeregisterConfig("false", "dereg"), - SkipArtifactTeardown: true, - }) - - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: buildForceDeregisterConfig("true", "dereg"), - }) -} - -func TestBuilderAcc_forceDeleteSnapshot(t *testing.T) { - amiName := "packer-test-dereg" - - // Build the same AMI name twice, with force_delete_snapshot on the second run - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: buildForceDeleteSnapshotConfig("false", amiName), - SkipArtifactTeardown: true, - }) - - // Get image data by AMI name - ec2conn, _ := testEC2Conn() - describeInput := &ec2.DescribeImagesInput{Filters: []*ec2.Filter{ - { - Name: aws.String("name"), - Values: []*string{aws.String(amiName)}, - }, - }} - ec2conn.WaitUntilImageExists(describeInput) - imageResp, _ := ec2conn.DescribeImages(describeInput) - image := imageResp.Images[0] - - // Get snapshot ids for image - snapshotIds := []*string{} - for _, device := range image.BlockDeviceMappings { - if device.Ebs != nil && device.Ebs.SnapshotId != nil { - snapshotIds = append(snapshotIds, device.Ebs.SnapshotId) - } - } - - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: buildForceDeleteSnapshotConfig("true", amiName), - Check: checkSnapshotsDeleted(snapshotIds), - }) -} - -func checkSnapshotsDeleted(snapshotIds []*string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - // Verify the snapshots are gone - ec2conn, _ := testEC2Conn() - snapshotResp, _ := ec2conn.DescribeSnapshots( - &ec2.DescribeSnapshotsInput{SnapshotIds: snapshotIds}, - ) - - if len(snapshotResp.Snapshots) > 0 { - return fmt.Errorf("Snapshots weren't successfully deleted by `force_delete_snapshot`") - } - return nil - } -} - -func TestBuilderAcc_amiSharing(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccSharingPreCheck(t) }, - Builder: &Builder{}, - Template: buildSharingConfig(os.Getenv("TESTACC_AWS_ACCOUNT_ID")), - Check: checkAMISharing(2, os.Getenv("TESTACC_AWS_ACCOUNT_ID"), "all"), - }) -} - -func TestBuilderAcc_encryptedBoot(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: testBuilderAccEncrypted, - Check: checkBootEncrypted(), - }) -} - -func checkAMISharing(count int, uid, group string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*common.Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // describe the image, get block devices with a snapshot - ec2conn, _ := testEC2Conn() - imageResp, err := ec2conn.DescribeImageAttribute(&ec2.DescribeImageAttributeInput{ - Attribute: aws.String("launchPermission"), - ImageId: aws.String(artifact.Amis["us-east-1"]), - }) - - if err != nil { - return fmt.Errorf("Error retrieving Image Attributes for AMI Artifact (%#v) in AMI Sharing Test: %s", artifact, err) - } - - // Launch Permissions are in addition to the userid that created it, so if - // you add 3 additional ami_users, you expect 2 Launch Permissions here - if len(imageResp.LaunchPermissions) != count { - return fmt.Errorf("Error in Image Attributes, expected (%d) Launch Permissions, got (%d)", count, len(imageResp.LaunchPermissions)) - } - - userFound := false - for _, lp := range imageResp.LaunchPermissions { - if lp.UserId != nil && uid == *lp.UserId { - userFound = true - } - } - - if !userFound { - return fmt.Errorf("Error in Image Attributes, expected User ID (%s) to have Launch Permissions, but was not found", uid) - } - - groupFound := false - for _, lp := range imageResp.LaunchPermissions { - if lp.Group != nil && group == *lp.Group { - groupFound = true - } - } - - if !groupFound { - return fmt.Errorf("Error in Image Attributes, expected Group ID (%s) to have Launch Permissions, but was not found", group) - } - - return nil - } -} - -func checkRegionCopy(regions []string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*common.Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // Verify that we copied to only the regions given - regionSet := make(map[string]struct{}) - for _, r := range regions { - regionSet[r] = struct{}{} - } - for r := range artifact.Amis { - if _, ok := regionSet[r]; !ok { - return fmt.Errorf("unknown region: %s", r) - } - - delete(regionSet, r) - } - if len(regionSet) > 0 { - return fmt.Errorf("didn't copy to: %#v", regionSet) - } - - return nil - } -} - -func checkBootEncrypted() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*common.Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // describe the image, get block devices with a snapshot - ec2conn, _ := testEC2Conn() - imageResp, err := ec2conn.DescribeImages(&ec2.DescribeImagesInput{ - ImageIds: []*string{aws.String(artifact.Amis["us-east-1"])}, - }) - - if err != nil { - return fmt.Errorf("Error retrieving Image Attributes for AMI (%s) in AMI Encrypted Boot Test: %s", artifact, err) - } - - image := imageResp.Images[0] // Only requested a single AMI ID - - rootDeviceName := image.RootDeviceName - - for _, bd := range image.BlockDeviceMappings { - if *bd.DeviceName == *rootDeviceName { - if *bd.Ebs.Encrypted != true { - return fmt.Errorf("volume not encrypted: %s", *bd.Ebs.SnapshotId) - } - } - } - - return nil - } -} - -func TestBuilderAcc_SessionManagerInterface(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: testBuilderAccSessionManagerInterface, - }) -} - -func testAccPreCheck(t *testing.T) { -} - -func testAccSharingPreCheck(t *testing.T) { - if v := os.Getenv("TESTACC_AWS_ACCOUNT_ID"); v == "" { - t.Fatal(fmt.Sprintf("TESTACC_AWS_ACCOUNT_ID must be set for acceptance tests")) - } -} - -func testEC2Conn() (*ec2.EC2, error) { - access := &common.AccessConfig{RawRegion: "us-east-1"} - session, err := access.Session() - if err != nil { - return nil, err - } - - return ec2.New(session), nil -} - -const testBuilderAccBasic = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "ami_name": "packer-test {{timestamp}}" - }] -} -` - -const testBuilderAccRegionCopy = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "ami_name": "packer-test {{timestamp}}", - "ami_regions": ["us-east-1", "us-west-2"] - }] -} -` - -const testBuilderAccForceDeregister = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "force_deregister": "%s", - "ami_name": "%s" - }] -} -` - -const testBuilderAccForceDeleteSnapshot = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "force_deregister": "%s", - "force_delete_snapshot": "%s", - "ami_name": "%s" - }] -} -` - -const testBuilderAccSharing = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami": "ami-76b2a71e", - "ssh_username": "ubuntu", - "ami_name": "packer-test {{timestamp}}", - "ami_users":["%s"], - "ami_groups":["all"] - }] -} -` - -const testBuilderAccEncrypted = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami":"ami-c15bebaa", - "ssh_username": "ubuntu", - "ami_name": "packer-enc-test {{timestamp}}", - "encrypt_boot": true - }] -} -` - -const testBuilderAccSessionManagerInterface = ` -{ - "builders": [{ - "type": "test", - "region": "us-east-1", - "instance_type": "m3.medium", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", - "root-device-type": "ebs" - }, - "owners": [ - "099720109477" - ], - "most_recent": true - }, - "ssh_username": "ubuntu", - "ssh_interface": "session_manager", - "iam_instance_profile": "SSMInstanceProfile", - "ami_name": "packer-ssm-test-{{timestamp}}" - }] -} -` - -func buildForceDeregisterConfig(val, name string) string { - return fmt.Sprintf(testBuilderAccForceDeregister, val, name) -} - -func buildForceDeleteSnapshotConfig(val, name string) string { - return fmt.Sprintf(testBuilderAccForceDeleteSnapshot, val, val, name) -} - -func buildSharingConfig(val string) string { - return fmt.Sprintf(testBuilderAccSharing, val) -} diff --git a/builder/amazon/ebs/builder_test.go b/builder/amazon/ebs/builder_test.go deleted file mode 100644 index 33a0d0d28..000000000 --- a/builder/amazon/ebs/builder_test.go +++ /dev/null @@ -1,166 +0,0 @@ -package ebs - -import ( - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func testConfig() map[string]interface{} { - return map[string]interface{}{ - "access_key": "foo", - "secret_key": "bar", - "source_ami": "foo", - "instance_type": "foo", - "region": "us-east-1", - "ssh_username": "root", - "ami_name": "foo", - } -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatalf("Builder should be a builder") - } -} - -func TestBuilder_Prepare_BadType(t *testing.T) { - b := &Builder{} - c := map[string]interface{}{ - "access_key": []string{}, - } - - _, warnings, err := b.Prepare(c) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatalf("prepare should fail") - } -} - -func TestBuilderPrepare_AMIName(t *testing.T) { - var b Builder - config := testConfig() - - // Test good - config["ami_name"] = "foo" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["ami_name"] = "foo {{" - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - // Test bad - delete(config, "ami_name") - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_InvalidKey(t *testing.T) { - var b Builder - config := testConfig() - - // Add a random key - config["i_should_not_be_valid"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_InvalidShutdownBehavior(t *testing.T) { - var b Builder - config := testConfig() - - // Test good - config["shutdown_behavior"] = "terminate" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test good - config["shutdown_behavior"] = "stop" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["shutdown_behavior"] = "foobar" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_ReturnGeneratedData(t *testing.T) { - var b Builder - config := testConfig() - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if generatedData[0] != "SourceAMIName" { - t.Fatalf("Generated data should contain SourceAMIName") - } - if generatedData[1] != "BuildRegion" { - t.Fatalf("Generated data should contain BuildRegion") - } - if generatedData[2] != "SourceAMI" { - t.Fatalf("Generated data should contain SourceAMI") - } - if generatedData[3] != "SourceAMICreationDate" { - t.Fatalf("Generated data should contain SourceAMICreationDate") - } - if generatedData[4] != "SourceAMIOwner" { - t.Fatalf("Generated data should contain SourceAMIOwner") - } - if generatedData[5] != "SourceAMIOwnerName" { - t.Fatalf("Generated data should contain SourceAMIOwnerName") - } -} diff --git a/builder/amazon/ebs/tags_acc_test.go b/builder/amazon/ebs/tags_acc_test.go deleted file mode 100644 index c6337b902..000000000 --- a/builder/amazon/ebs/tags_acc_test.go +++ /dev/null @@ -1,137 +0,0 @@ -package ebs - -import ( - "encoding/json" - "fmt" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - builderT "github.com/hashicorp/packer-plugin-sdk/acctest" - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer/builder/amazon/common" -) - -type TFBuilder struct { - Type string `json:"type"` - Region string `json:"region"` - SourceAmi string `json:"source_ami"` - InstanceType string `json:"instance_type"` - SshUsername string `json:"ssh_username"` - AmiName string `json:"ami_name"` - Tags map[string]string `json:"tags"` - SnapshotTags map[string]string `json:"snapshot_tags"` -} - -type TFConfig struct { - Builders []TFBuilder `json:"builders"` -} - -func TestBuilderTagsAcc_basic(t *testing.T) { - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Builder: &Builder{}, - Template: testBuilderTagsAccBasic, - Check: checkTags(), - }) -} - -func checkTags() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - config := TFConfig{} - json.Unmarshal([]byte(testBuilderTagsAccBasic), &config) - tags := config.Builders[0].Tags - snapshotTags := config.Builders[0].SnapshotTags - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*common.Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // Describe the image, get block devices with a snapshot - ec2conn, _ := testEC2Conn() - imageResp, err := ec2conn.DescribeImages(&ec2.DescribeImagesInput{ - ImageIds: []*string{aws.String(artifact.Amis["us-east-1"])}, - }) - - if err != nil { - return fmt.Errorf("Error retrieving details for AMI Artifact (%#v) in Tags Test: %s", artifact, err) - } - - if len(imageResp.Images) == 0 { - return fmt.Errorf("No images found for AMI Artifact (%#v) in Tags Test: %s", artifact, err) - } - - image := imageResp.Images[0] - - // Check only those with a Snapshot ID, i.e. not Ephemeral - var snapshots []*string - for _, device := range image.BlockDeviceMappings { - if device.Ebs != nil && device.Ebs.SnapshotId != nil { - snapshots = append(snapshots, device.Ebs.SnapshotId) - } - } - - // Grab matching snapshot info - resp, err := ec2conn.DescribeSnapshots(&ec2.DescribeSnapshotsInput{ - SnapshotIds: snapshots, - }) - - if err != nil { - return fmt.Errorf("Error retrieving Snapshots for AMI Artifact (%#v) in Tags Test: %s", artifact, err) - } - - if len(resp.Snapshots) == 0 { - return fmt.Errorf("No Snapshots found for AMI Artifact (%#v) in Tags Test", artifact) - } - - // Grab the snapshots, check the tags - for _, s := range resp.Snapshots { - expected := len(tags) - for _, t := range s.Tags { - for key, value := range tags { - if val, ok := snapshotTags[key]; ok && val == *t.Value { - expected-- - } else if key == *t.Key && value == *t.Value { - expected-- - } - } - } - - if expected > 0 { - return fmt.Errorf("Not all tags found") - } - } - - return nil - } -} - -const testBuilderTagsAccBasic = ` -{ - "builders": [ - { - "type": "test", - "region": "us-east-1", - "source_ami": "ami-9eaa1cf6", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer-tags-testing-{{timestamp}}", - "tags": { - "OS_Version": "Ubuntu", - "Release": "Latest", - "Name": "Bleep" - }, - "snapshot_tags": { - "Name": "Foobar" - } - } - ] -} -` diff --git a/builder/amazon/ebssurrogate/builder_test.go b/builder/amazon/ebssurrogate/builder_test.go deleted file mode 100644 index 5e724466e..000000000 --- a/builder/amazon/ebssurrogate/builder_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package ebssurrogate - -import ( - "testing" - - "github.com/hashicorp/packer/builder/amazon/common" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func testConfig() map[string]interface{} { - return map[string]interface{}{ - "access_key": "foo", - "secret_key": "bar", - "source_ami": "foo", - "instance_type": "foo", - "region": "us-east-1", - "ssh_username": "root", - } -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatal("Builder should be a builder") - } -} - -func TestBuilder_Prepare_BadType(t *testing.T) { - b := &Builder{} - c := map[string]interface{}{ - "access_key": []string{}, - } - - _, warnings, err := b.Prepare(c) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("prepare should fail") - } -} - -func TestBuilderPrepare_InvalidKey(t *testing.T) { - var b Builder - config := testConfig() - - // Add a random key - config["i_should_not_be_valid"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_ReturnGeneratedData(t *testing.T) { - var b Builder - // Basic configuration - b.config.RootDevice = RootBlockDevice{ - SourceDeviceName: "device name", - DeviceName: "device name", - } - b.config.LaunchMappings = BlockDevices{ - BlockDevice{ - BlockDevice: common.BlockDevice{ - DeviceName: "device name", - }, - OmitFromArtifact: false, - }, - } - b.config.AMIVirtType = "type" - config := testConfig() - config["ami_name"] = "name" - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if generatedData[0] != "SourceAMIName" { - t.Fatalf("Generated data should contain SourceAMIName") - } - if generatedData[1] != "BuildRegion" { - t.Fatalf("Generated data should contain BuildRegion") - } - if generatedData[2] != "SourceAMI" { - t.Fatalf("Generated data should contain SourceAMI") - } - if generatedData[3] != "SourceAMICreationDate" { - t.Fatalf("Generated data should contain SourceAMICreationDate") - } - if generatedData[4] != "SourceAMIOwner" { - t.Fatalf("Generated data should contain SourceAMIOwner") - } - if generatedData[5] != "SourceAMIOwnerName" { - t.Fatalf("Generated data should contain SourceAMIOwnerName") - } -} diff --git a/builder/amazon/ebssurrogate/step_register_ami_test.go b/builder/amazon/ebssurrogate/step_register_ami_test.go deleted file mode 100644 index 1f4ac0752..000000000 --- a/builder/amazon/ebssurrogate/step_register_ami_test.go +++ /dev/null @@ -1,249 +0,0 @@ -package ebssurrogate - -import ( - "reflect" - "sort" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/packer/builder/amazon/common" -) - -const sourceDeviceName = "/dev/xvdf" -const rootDeviceName = "/dev/xvda" - -func newStepRegisterAMI(amiDevices, launchDevices []*ec2.BlockDeviceMapping) *StepRegisterAMI { - return &StepRegisterAMI{ - RootDevice: RootBlockDevice{ - SourceDeviceName: sourceDeviceName, - DeviceName: rootDeviceName, - DeleteOnTermination: true, - VolumeType: "ebs", - VolumeSize: 10, - }, - AMIDevices: amiDevices, - LaunchDevices: launchDevices, - PollingConfig: new(common.AWSPollingConfig), - } -} - -func sorted(devices []*ec2.BlockDeviceMapping) []*ec2.BlockDeviceMapping { - sort.SliceStable(devices, func(i, j int) bool { - return *devices[i].DeviceName < *devices[j].DeviceName - }) - return devices -} - -func TestStepRegisterAmi_combineDevices(t *testing.T) { - cases := []struct { - snapshotIds map[string]string - amiDevices []*ec2.BlockDeviceMapping - launchDevices []*ec2.BlockDeviceMapping - allDevices []*ec2.BlockDeviceMapping - }{ - { - snapshotIds: map[string]string{}, - amiDevices: []*ec2.BlockDeviceMapping{}, - launchDevices: []*ec2.BlockDeviceMapping{}, - allDevices: []*ec2.BlockDeviceMapping{}, - }, - { - snapshotIds: map[string]string{}, - amiDevices: []*ec2.BlockDeviceMapping{}, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String(sourceDeviceName), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String(rootDeviceName), - }, - }, - }, - { - // Minimal single device - snapshotIds: map[string]string{ - sourceDeviceName: "snap-0123456789abcdef1", - }, - amiDevices: []*ec2.BlockDeviceMapping{}, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String(sourceDeviceName), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef1"), - }, - DeviceName: aws.String(rootDeviceName), - }, - }, - }, - { - // Single launch device with AMI device - snapshotIds: map[string]string{ - sourceDeviceName: "snap-0123456789abcdef1", - }, - amiDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String(sourceDeviceName), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef1"), - }, - DeviceName: aws.String(rootDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - }, - { - // Multiple launch devices - snapshotIds: map[string]string{ - sourceDeviceName: "snap-0123456789abcdef1", - "/dev/xvdg": "snap-0123456789abcdef2", - }, - amiDevices: []*ec2.BlockDeviceMapping{}, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String(sourceDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{}, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef1"), - }, - DeviceName: aws.String(rootDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef2"), - }, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - }, - { - // Multiple launch devices with encryption - snapshotIds: map[string]string{ - sourceDeviceName: "snap-0123456789abcdef1", - "/dev/xvdg": "snap-0123456789abcdef2", - }, - amiDevices: []*ec2.BlockDeviceMapping{}, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - }, - DeviceName: aws.String(sourceDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - }, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef1"), - // Encrypted: true stripped from snapshotted devices - }, - DeviceName: aws.String(rootDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef2"), - }, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - }, - { - // Multiple launch devices and AMI devices with encryption - snapshotIds: map[string]string{ - sourceDeviceName: "snap-0123456789abcdef1", - "/dev/xvdg": "snap-0123456789abcdef2", - }, - amiDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - KmsKeyId: aws.String("keyId"), - }, - // Source device name can be used in AMI devices - // since launch device of same name gets renamed - // to root device name - DeviceName: aws.String(sourceDeviceName), - }, - }, - launchDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - }, - DeviceName: aws.String(sourceDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - }, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - allDevices: []*ec2.BlockDeviceMapping{ - { - Ebs: &ec2.EbsBlockDevice{ - Encrypted: aws.Bool(true), - KmsKeyId: aws.String("keyId"), - }, - DeviceName: aws.String(sourceDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef1"), - }, - DeviceName: aws.String(rootDeviceName), - }, - { - Ebs: &ec2.EbsBlockDevice{ - SnapshotId: aws.String("snap-0123456789abcdef2"), - }, - DeviceName: aws.String("/dev/xvdg"), - }, - }, - }, - } - for _, tc := range cases { - stepRegisterAmi := newStepRegisterAMI(tc.amiDevices, tc.launchDevices) - allDevices := stepRegisterAmi.combineDevices(tc.snapshotIds) - if !reflect.DeepEqual(sorted(allDevices), sorted(tc.allDevices)) { - t.Fatalf("Unexpected output from combineDevices") - } - } -} diff --git a/builder/amazon/ebsvolume/artifact_test.go b/builder/amazon/ebsvolume/artifact_test.go deleted file mode 100644 index 1b220994d..000000000 --- a/builder/amazon/ebsvolume/artifact_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package ebsvolume - -import "testing" - -func TestArtifactState(t *testing.T) { - expectedData := "this is the data" - artifact := &Artifact{ - StateData: map[string]interface{}{"state_data": expectedData}, - } - - // Valid state - result := artifact.State("state_data") - if result != expectedData { - t.Fatalf("Bad: State data was %s instead of %s", result, expectedData) - } - - // Invalid state - result = artifact.State("invalid_key") - if result != nil { - t.Fatalf("Bad: State should be nil for invalid state data name") - } - - // Nil StateData should not fail and should return nil - artifact = &Artifact{} - result = artifact.State("key") - if result != nil { - t.Fatalf("Bad: State should be nil for nil StateData") - } -} diff --git a/builder/amazon/ebsvolume/builder_test.go b/builder/amazon/ebsvolume/builder_test.go deleted file mode 100644 index 9db0a189b..000000000 --- a/builder/amazon/ebsvolume/builder_test.go +++ /dev/null @@ -1,166 +0,0 @@ -package ebsvolume - -import ( - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func testConfig() map[string]interface{} { - return map[string]interface{}{ - "access_key": "foo", - "secret_key": "bar", - "source_ami": "foo", - "instance_type": "foo", - "region": "us-east-1", - "ssh_username": "root", - } -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatalf("Builder should be a builder") - } -} - -func TestBuilder_Prepare_BadType(t *testing.T) { - b := &Builder{} - c := map[string]interface{}{ - "access_key": []string{}, - } - - _, warnings, err := b.Prepare(c) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatalf("prepare should fail") - } -} - -func TestBuilderPrepare_InvalidKey(t *testing.T) { - var b Builder - config := testConfig() - - // Add a random key - config["i_should_not_be_valid"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_InvalidShutdownBehavior(t *testing.T) { - var b Builder - config := testConfig() - - // Test good - config["shutdown_behavior"] = "terminate" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test good - config["shutdown_behavior"] = "stop" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["shutdown_behavior"] = "foobar" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_ReturnGeneratedData(t *testing.T) { - var b Builder - config := testConfig() - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if generatedData[0] != "SourceAMIName" { - t.Fatalf("Generated data should contain SourceAMIName") - } - if generatedData[1] != "BuildRegion" { - t.Fatalf("Generated data should contain BuildRegion") - } - if generatedData[2] != "SourceAMI" { - t.Fatalf("Generated data should contain SourceAMI") - } - if generatedData[3] != "SourceAMICreationDate" { - t.Fatalf("Generated data should contain SourceAMICreationDate") - } - if generatedData[4] != "SourceAMIOwner" { - t.Fatalf("Generated data should contain SourceAMIOwner") - } - if generatedData[5] != "SourceAMIOwnerName" { - t.Fatalf("Generated data should contain SourceAMIOwnerName") - } -} - -func TestBuidler_ConfigBlockdevicemapping(t *testing.T) { - var b Builder - config := testConfig() - - //Set some snapshot settings - config["ebs_volumes"] = []map[string]interface{}{ - { - "device_name": "/dev/xvdb", - "volume_size": "32", - "delete_on_termination": true, - }, - { - "device_name": "/dev/xvdc", - "volume_size": "32", - "delete_on_termination": true, - "snapshot_tags": map[string]string{ - "Test_Tag": "tag_value", - "another tag": "another value", - }, - "snapshot_users": []string{ - "123", "456", - }, - }, - } - - generatedData, warnings, err := b.Prepare(config) - - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - - t.Logf("Test gen %+v", b.config.VolumeMappings) - -} diff --git a/builder/amazon/ebsvolume/step_snapshot_ebs_volumes_test.go b/builder/amazon/ebsvolume/step_snapshot_ebs_volumes_test.go deleted file mode 100644 index fa946efc7..000000000 --- a/builder/amazon/ebsvolume/step_snapshot_ebs_volumes_test.go +++ /dev/null @@ -1,170 +0,0 @@ -package ebsvolume - -import ( - "bytes" - "context" - "fmt" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - - //"github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ec2/ec2iface" - "github.com/hashicorp/packer-plugin-sdk/multistep" - "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer/builder/amazon/common" -) - -// Define a mock struct to be used in unit tests for common aws steps. -type mockEC2Conn struct { - ec2iface.EC2API - Config *aws.Config -} - -func (m *mockEC2Conn) CreateSnapshot(input *ec2.CreateSnapshotInput) (*ec2.Snapshot, error) { - snap := &ec2.Snapshot{ - // This isn't typical amazon format, but injecting the volume id into - // this field lets us verify that the right volume was snapshotted with - // a simple string comparison - SnapshotId: aws.String(fmt.Sprintf("snap-of-%s", *input.VolumeId)), - } - - return snap, nil -} - -func (m *mockEC2Conn) WaitUntilSnapshotCompletedWithContext(aws.Context, *ec2.DescribeSnapshotsInput, ...request.WaiterOption) error { - return nil -} - -func getMockConn(config *common.AccessConfig, target string) (ec2iface.EC2API, error) { - mockConn := &mockEC2Conn{ - Config: aws.NewConfig(), - } - return mockConn, nil -} - -// Create statebag for running test -func tState(t *testing.T) multistep.StateBag { - state := new(multistep.BasicStateBag) - state.Put("ui", &packer.BasicUi{ - Reader: new(bytes.Buffer), - Writer: new(bytes.Buffer), - }) - // state.Put("amis", map[string]string{"us-east-1": "ami-12345"}) - // state.Put("snapshots", map[string][]string{"us-east-1": {"snap-0012345"}}) - conn, _ := getMockConn(&common.AccessConfig{}, "us-east-2") - - state.Put("ec2", conn) - // Store a fake instance that contains a block device that matches the - // volumes defined in the config above - state.Put("instance", &ec2.Instance{ - InstanceId: aws.String("instance-id"), - BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{ - { - DeviceName: aws.String("/dev/xvda"), - Ebs: &ec2.EbsInstanceBlockDevice{ - VolumeId: aws.String("vol-1234"), - }, - }, - { - DeviceName: aws.String("/dev/xvdb"), - Ebs: &ec2.EbsInstanceBlockDevice{ - VolumeId: aws.String("vol-5678"), - }, - }, - }, - }) - return state -} - -func TestStepSnapshot_run_simple(t *testing.T) { - var b Builder - config := testConfig() //from builder_test - - //Set some snapshot settings - config["ebs_volumes"] = []map[string]interface{}{ - { - "device_name": "/dev/xvdb", - "volume_size": "32", - "delete_on_termination": true, - "snapshot_volume": true, - }, - } - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - - state := tState(t) - - accessConfig := common.FakeAccessConfig() - - step := stepSnapshotEBSVolumes{ - PollingConfig: new(common.AWSPollingConfig), - AccessConfig: accessConfig, - VolumeMapping: b.config.VolumeMappings, - Ctx: b.config.ctx, - } - - step.Run(context.Background(), state) - - if len(step.snapshotMap) != 1 { - t.Fatalf("Missing Snapshot from step") - } - - if volmapping := step.snapshotMap["snap-of-vol-5678"]; volmapping == nil { - t.Fatalf("Didn't snapshot correct volume: Map is %#v", step.snapshotMap) - } -} - -func TestStepSnapshot_run_no_snaps(t *testing.T) { - var b Builder - config := testConfig() //from builder_test - - //Set some snapshot settings - config["ebs_volumes"] = []map[string]interface{}{ - { - "device_name": "/dev/xvdb", - "volume_size": "32", - "delete_on_termination": true, - "snapshot_volume": false, - }, - } - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - - state := tState(t) - - accessConfig := common.FakeAccessConfig() - - step := stepSnapshotEBSVolumes{ - PollingConfig: new(common.AWSPollingConfig), - AccessConfig: accessConfig, - VolumeMapping: b.config.VolumeMappings, - Ctx: b.config.ctx, - } - - step.Run(context.Background(), state) - - if len(step.snapshotMap) != 0 { - t.Fatalf("Shouldn't have snapshotted any volumes") - } -} diff --git a/builder/amazon/examples/apache_server/README.Md b/builder/amazon/examples/apache_server/README.Md deleted file mode 100644 index e46c898fd..000000000 --- a/builder/amazon/examples/apache_server/README.Md +++ /dev/null @@ -1 +0,0 @@ -command: packer build -var "accesskey=*" -var "secretkey=" -var "shellpath=packages.sh" .\apache.json diff --git a/builder/amazon/examples/apache_server/apache.json b/builder/amazon/examples/apache_server/apache.json deleted file mode 100644 index ddba2e18e..000000000 --- a/builder/amazon/examples/apache_server/apache.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "variables": - { - "accesskey": "", - "secretkey": "", - "shellpath": "packages.sh" - }, - "builders":[ - { - "type": "amazon-ebs", - "access_key": "{{user `accesskey`}}", - "secret_key": "{{user `secretkey`}}", - "region": "ap-south-1", - "source_ami": "ami-sa7608343426b", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "apache", - "tags": { - "OS_Version": "Ubuntu", - "Release": "Latest" - } - } - ], - "provisioners":[ - { - "type": "shell", - "script": "{{user `shellpath`}}" - } - ] - -} diff --git a/builder/amazon/examples/apache_server/packages.sh b/builder/amazon/examples/apache_server/packages.sh deleted file mode 100644 index 0a6af1d1c..000000000 --- a/builder/amazon/examples/apache_server/packages.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "installing apache " -sudo apt-get update -sudo apt-get install apache2 -y -sudo apt-get update -sudo service apache2 restart -sudo apache2 --version diff --git a/builder/amazon/examples/nginx_server/README.Md b/builder/amazon/examples/nginx_server/README.Md deleted file mode 100644 index 27756eff7..000000000 --- a/builder/amazon/examples/nginx_server/README.Md +++ /dev/null @@ -1 +0,0 @@ -command: packer build -var "accesskey=*" -var "secretkey=" -var "shellpath=packages.sh" .\nginx.json diff --git a/builder/amazon/examples/nginx_server/nginx.json b/builder/amazon/examples/nginx_server/nginx.json deleted file mode 100644 index 185f370b7..000000000 --- a/builder/amazon/examples/nginx_server/nginx.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "variables": - { - "accesskey": "", - "secretkey": "", - "shellpath": "packages.sh" - }, - "builders":[ - { - "type": "amazon-ebs", - "access_key": "{{user `accesskey`}}", - "secret_key": "{{user `secretkey`}}", - "region": "ap-south-1", - "source_ami": "ami-sa7608343426b", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "nginx", - "tags": { - "OS_Version": "Ubuntu", - "Release": "Latest" - } - } - ], - "provisioners":[ - { - "type": "shell", - "script": "{{user `shellpath`}}" - } - ] - -} diff --git a/builder/amazon/examples/nginx_server/packages.sh b/builder/amazon/examples/nginx_server/packages.sh deleted file mode 100644 index 3f5973ef0..000000000 --- a/builder/amazon/examples/nginx_server/packages.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "installing nginx " -sudo apt-get update -sudo apt-get install nginx -y -sudo service nginx restart diff --git a/builder/amazon/instance/builder_test.go b/builder/amazon/instance/builder_test.go deleted file mode 100644 index 41300e4c4..000000000 --- a/builder/amazon/instance/builder_test.go +++ /dev/null @@ -1,343 +0,0 @@ -package instance - -import ( - "io/ioutil" - "os" - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func testConfig() (config map[string]interface{}, tf *os.File) { - tf, err := ioutil.TempFile("", "packer") - if err != nil { - panic(err) - } - - config = map[string]interface{}{ - "account_id": "foo", - "ami_name": "foo", - "instance_type": "m1.small", - "region": "us-east-1", - "s3_bucket": "foo", - "source_ami": "foo", - "ssh_username": "bob", - "x509_cert_path": tf.Name(), - "x509_key_path": tf.Name(), - "x509_upload_path": "/foo", - } - - return config, tf -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatalf("Builder should be a builder") - } -} - -func TestBuilderPrepare_AccountId(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["account_id"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - config["account_id"] = "foo" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } - - config["account_id"] = "0123-0456-7890" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("err: %s", err) - } - - if b.config.AccountId != "012304567890" { - t.Errorf("should strip hyphens: %s", b.config.AccountId) - } -} - -func TestBuilderPrepare_AMIName(t *testing.T) { - var b Builder - config, tempfile := testConfig() - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - // Test good - config["ami_name"] = "foo" - config["skip_region_validation"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["ami_name"] = "foo {{" - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - // Test bad - delete(config, "ami_name") - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_BundleDestination(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["bundle_destination"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("err: %s", err) - } - - if b.config.BundleDestination != "/tmp" { - t.Fatalf("bad: %s", b.config.BundleDestination) - } -} - -func TestBuilderPrepare_BundlePrefix(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("err: %s", err) - } - - if b.config.BundlePrefix == "" { - t.Fatalf("bad: %s", b.config.BundlePrefix) - } -} - -func TestBuilderPrepare_InvalidKey(t *testing.T) { - var b Builder - config, tempfile := testConfig() - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - // Add a random key - config["i_should_not_be_valid"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_S3Bucket(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["s3_bucket"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - config["s3_bucket"] = "foo" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Errorf("err: %s", err) - } -} - -func TestBuilderPrepare_X509CertPath(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["x509_cert_path"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - config["x509_cert_path"] = "i/am/a/file/that/doesnt/exist" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Error("should have error") - } - - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("error tempfile: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - config["x509_cert_path"] = tf.Name() - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } -} - -func TestBuilderPrepare_X509KeyPath(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["x509_key_path"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - config["x509_key_path"] = "i/am/a/file/that/doesnt/exist" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Error("should have error") - } - - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("error tempfile: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - config["x509_key_path"] = tf.Name() - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } -} - -func TestBuilderPrepare_X509UploadPath(t *testing.T) { - b := &Builder{} - config, tempfile := testConfig() - config["skip_region_validation"] = true - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - config["x509_upload_path"] = "" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } -} - -func TestBuilderPrepare_ReturnGeneratedData(t *testing.T) { - var b Builder - config, tempfile := testConfig() - defer os.Remove(tempfile.Name()) - defer tempfile.Close() - - generatedData, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if len(generatedData) == 0 { - t.Fatalf("Generated data should not be empty") - } - if generatedData[0] != "SourceAMIName" { - t.Fatalf("Generated data should contain SourceAMIName") - } - if generatedData[1] != "BuildRegion" { - t.Fatalf("Generated data should contain BuildRegion") - } - if generatedData[2] != "SourceAMI" { - t.Fatalf("Generated data should contain SourceAMI") - } - if generatedData[3] != "SourceAMICreationDate" { - t.Fatalf("Generated data should contain SourceAMICreationDate") - } - if generatedData[4] != "SourceAMIOwner" { - t.Fatalf("Generated data should contain SourceAMIOwner") - } - if generatedData[5] != "SourceAMIOwnerName" { - t.Fatalf("Generated data should contain SourceAMIOwnerName") - } -} diff --git a/builder/amazon/version/version.go b/builder/amazon/version/version.go deleted file mode 100644 index 2dd13f9f5..000000000 --- a/builder/amazon/version/version.go +++ /dev/null @@ -1,13 +0,0 @@ -package version - -import ( - "github.com/hashicorp/packer-plugin-sdk/version" - packerVersion "github.com/hashicorp/packer/version" -) - -var AWSPluginVersion *version.PluginVersion - -func init() { - AWSPluginVersion = version.InitializePluginVersion( - packerVersion.Version, packerVersion.VersionPrerelease) -} diff --git a/cmd/packer-plugin-amazon/main.go b/cmd/packer-plugin-amazon/main.go deleted file mode 100644 index e05a799de..000000000 --- a/cmd/packer-plugin-amazon/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/hashicorp/packer-plugin-sdk/plugin" - "github.com/hashicorp/packer/builder/amazon/ebs" - "github.com/hashicorp/packer/builder/amazon/ebssurrogate" - "github.com/hashicorp/packer/builder/amazon/ebsvolume" - "github.com/hashicorp/packer/builder/osc/chroot" - amazonami "github.com/hashicorp/packer/datasource/amazon/ami" - "github.com/hashicorp/packer/datasource/amazon/secretsmanager" - amazonimport "github.com/hashicorp/packer/post-processor/amazon-import" -) - -func main() { - pps := plugin.NewSet() - pps.RegisterBuilder("ebs", new(ebs.Builder)) - pps.RegisterBuilder("chroot", new(chroot.Builder)) - pps.RegisterBuilder("ebssurrogate", new(ebssurrogate.Builder)) - pps.RegisterBuilder("ebsvolume", new(ebsvolume.Builder)) - pps.RegisterPostProcessor("import", new(amazonimport.PostProcessor)) - pps.RegisterDatasource("ami", new(amazonami.Datasource)) - pps.RegisterDatasource("secretsmanager", new(secretsmanager.Datasource)) - err := pps.Run() - if err != nil { - fmt.Fprintln(os.Stderr, err.Error()) - os.Exit(1) - } -} diff --git a/command/exec_test.go b/command/exec_test.go index 4986a4bf3..bdee7c80b 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -8,8 +8,8 @@ import ( "runtime" "testing" + "github.com/hashicorp/packer-plugin-amazon/builder/ebs" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - "github.com/hashicorp/packer/builder/amazon/ebs" "github.com/hashicorp/packer/builder/file" "github.com/hashicorp/packer/builder/null" "github.com/hashicorp/packer/packer" diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index cd70b62ba..f96a037e5 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -16,9 +16,9 @@ import ( "github.com/hashicorp/go-multierror" "github.com/hashicorp/hcl/v2/hclwrite" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" hcl2shim "github.com/hashicorp/packer-plugin-sdk/hcl2helper" "github.com/hashicorp/packer-plugin-sdk/template" - awscommon "github.com/hashicorp/packer/builder/amazon/common" "github.com/hashicorp/packer/packer" "github.com/mitchellh/mapstructure" "github.com/posener/complete" @@ -107,7 +107,7 @@ const ( # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon AMI Data Source here: -# https://www.packer.io/docs/datasources/amazon/ami` +# https://www.packer.io/docs/datasources/amazon/ami.mdx` amazonSecretsManagerDataHeader = ` # The amazon-secretsmanager data block is generated from your aws_secretsmanager template function; a data @@ -115,7 +115,7 @@ const ( # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon Secrets Manager Data Source here: -# https://www.packer.io/docs/datasources/amazon/secretsmanager` +# https://www.packer.io/docs/datasources/amazon/secretsmanager.mdx` ) var ( diff --git a/command/plugin.go b/command/plugin.go index b5c08b185..57ccbf1d2 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -14,11 +14,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/plugin" alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs" - amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot" - amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" - amazonebssurrogatebuilder "github.com/hashicorp/packer/builder/amazon/ebssurrogate" - amazonebsvolumebuilder "github.com/hashicorp/packer/builder/amazon/ebsvolume" - amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance" azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" azurechrootbuilder "github.com/hashicorp/packer/builder/azure/chroot" azuredtlbuilder "github.com/hashicorp/packer/builder/azure/dtl" @@ -64,10 +59,7 @@ import ( vsphereclonebuilder "github.com/hashicorp/packer/builder/vsphere/clone" vsphereisobuilder "github.com/hashicorp/packer/builder/vsphere/iso" yandexbuilder "github.com/hashicorp/packer/builder/yandex" - amazonamidatasource "github.com/hashicorp/packer/datasource/amazon/ami" - amazonsecretsmanagerdatasource "github.com/hashicorp/packer/datasource/amazon/secretsmanager" alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" - amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import" artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" @@ -108,57 +100,52 @@ type PluginCommand struct { } var Builders = map[string]packersdk.Builder{ - "alicloud-ecs": new(alicloudecsbuilder.Builder), - "amazon-chroot": new(amazonchrootbuilder.Builder), - "amazon-ebs": new(amazonebsbuilder.Builder), - "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), - "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), - "amazon-instance": new(amazoninstancebuilder.Builder), - "azure-arm": new(azurearmbuilder.Builder), - "azure-chroot": new(azurechrootbuilder.Builder), - "azure-dtl": new(azuredtlbuilder.Builder), - "cloudstack": new(cloudstackbuilder.Builder), - "digitalocean": new(digitaloceanbuilder.Builder), - "file": new(filebuilder.Builder), - "googlecompute": new(googlecomputebuilder.Builder), - "hcloud": new(hcloudbuilder.Builder), - "hyperone": new(hyperonebuilder.Builder), - "hyperv-iso": new(hypervisobuilder.Builder), - "hyperv-vmcx": new(hypervvmcxbuilder.Builder), - "jdcloud": new(jdcloudbuilder.Builder), - "linode": new(linodebuilder.Builder), - "lxc": new(lxcbuilder.Builder), - "lxd": new(lxdbuilder.Builder), - "ncloud": new(ncloudbuilder.Builder), - "null": new(nullbuilder.Builder), - "oneandone": new(oneandonebuilder.Builder), - "openstack": new(openstackbuilder.Builder), - "oracle-classic": new(oracleclassicbuilder.Builder), - "oracle-oci": new(oracleocibuilder.Builder), - "osc-bsu": new(oscbsubuilder.Builder), - "osc-bsusurrogate": new(oscbsusurrogatebuilder.Builder), - "osc-bsuvolume": new(oscbsuvolumebuilder.Builder), - "osc-chroot": new(oscchrootbuilder.Builder), - "parallels-iso": new(parallelsisobuilder.Builder), - "parallels-pvm": new(parallelspvmbuilder.Builder), - "profitbricks": new(profitbricksbuilder.Builder), - "proxmox": new(proxmoxbuilder.Builder), - "proxmox-clone": new(proxmoxclonebuilder.Builder), - "proxmox-iso": new(proxmoxisobuilder.Builder), - "qemu": new(qemubuilder.Builder), - "scaleway": new(scalewaybuilder.Builder), - "tencentcloud-cvm": new(tencentcloudcvmbuilder.Builder), - "triton": new(tritonbuilder.Builder), - "ucloud-uhost": new(uclouduhostbuilder.Builder), - "vagrant": new(vagrantbuilder.Builder), - "virtualbox-iso": new(virtualboxisobuilder.Builder), - "virtualbox-ovf": new(virtualboxovfbuilder.Builder), - "virtualbox-vm": new(virtualboxvmbuilder.Builder), - "vmware-iso": new(vmwareisobuilder.Builder), - "vmware-vmx": new(vmwarevmxbuilder.Builder), - "vsphere-clone": new(vsphereclonebuilder.Builder), - "vsphere-iso": new(vsphereisobuilder.Builder), - "yandex": new(yandexbuilder.Builder), + "alicloud-ecs": new(alicloudecsbuilder.Builder), + "azure-arm": new(azurearmbuilder.Builder), + "azure-chroot": new(azurechrootbuilder.Builder), + "azure-dtl": new(azuredtlbuilder.Builder), + "cloudstack": new(cloudstackbuilder.Builder), + "digitalocean": new(digitaloceanbuilder.Builder), + "file": new(filebuilder.Builder), + "googlecompute": new(googlecomputebuilder.Builder), + "hcloud": new(hcloudbuilder.Builder), + "hyperone": new(hyperonebuilder.Builder), + "hyperv-iso": new(hypervisobuilder.Builder), + "hyperv-vmcx": new(hypervvmcxbuilder.Builder), + "jdcloud": new(jdcloudbuilder.Builder), + "linode": new(linodebuilder.Builder), + "lxc": new(lxcbuilder.Builder), + "lxd": new(lxdbuilder.Builder), + "ncloud": new(ncloudbuilder.Builder), + "null": new(nullbuilder.Builder), + "oneandone": new(oneandonebuilder.Builder), + "openstack": new(openstackbuilder.Builder), + "oracle-classic": new(oracleclassicbuilder.Builder), + "oracle-oci": new(oracleocibuilder.Builder), + "osc-bsu": new(oscbsubuilder.Builder), + "osc-bsusurrogate": new(oscbsusurrogatebuilder.Builder), + "osc-bsuvolume": new(oscbsuvolumebuilder.Builder), + "osc-chroot": new(oscchrootbuilder.Builder), + "parallels-iso": new(parallelsisobuilder.Builder), + "parallels-pvm": new(parallelspvmbuilder.Builder), + "profitbricks": new(profitbricksbuilder.Builder), + "proxmox": new(proxmoxbuilder.Builder), + "proxmox-clone": new(proxmoxclonebuilder.Builder), + "proxmox-iso": new(proxmoxisobuilder.Builder), + "qemu": new(qemubuilder.Builder), + "scaleway": new(scalewaybuilder.Builder), + "tencentcloud-cvm": new(tencentcloudcvmbuilder.Builder), + "triton": new(tritonbuilder.Builder), + "ucloud-uhost": new(uclouduhostbuilder.Builder), + "vagrant": new(vagrantbuilder.Builder), + "virtualbox-iso": new(virtualboxisobuilder.Builder), + "virtualbox-ovf": new(virtualboxovfbuilder.Builder), + "virtualbox-vm": new(virtualboxvmbuilder.Builder), + "vmware-iso": new(vmwareisobuilder.Builder), + "vmware-vmx": new(vmwarevmxbuilder.Builder), + "vsphere-clone": new(vsphereclonebuilder.Builder), + "vsphere-iso": new(vsphereisobuilder.Builder), + "yandex": new(yandexbuilder.Builder), } var Provisioners = map[string]packersdk.Provisioner{ @@ -184,7 +171,6 @@ var Provisioners = map[string]packersdk.Provisioner{ var PostProcessors = map[string]packersdk.PostProcessor{ "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), - "amazon-import": new(amazonimportpostprocessor.PostProcessor), "artifice": new(artificepostprocessor.PostProcessor), "checksum": new(checksumpostprocessor.PostProcessor), "compress": new(compresspostprocessor.PostProcessor), @@ -202,10 +188,7 @@ var PostProcessors = map[string]packersdk.PostProcessor{ "yandex-import": new(yandeximportpostprocessor.PostProcessor), } -var Datasources = map[string]packersdk.Datasource{ - "amazon-ami": new(amazonamidatasource.Datasource), - "amazon-secretsmanager": new(amazonsecretsmanagerdatasource.Datasource), -} +var Datasources = map[string]packersdk.Datasource{} var pluginRegexp = regexp.MustCompile("packer-(builder|post-processor|provisioner|datasource)-(.+)") diff --git a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl index 3f1a46150..cf9019a98 100644 --- a/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade/complete/expected.pkr.hcl @@ -52,7 +52,7 @@ variable "secret_account" { # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon Secrets Manager Data Source here: -# https://www.packer.io/docs/datasources/amazon/secretsmanager +# https://www.packer.io/docs/datasources/amazon/secretsmanager.mdx data "amazon-secretsmanager" "autogenerated_1" { name = "sample/app/password" } @@ -76,7 +76,7 @@ data "amazon-secretsmanager" "autogenerated_4" { # Read the documentation for data blocks here: # https://www.packer.io/docs/templates/hcl_templates/blocks/data # Read the documentation for the Amazon AMI Data Source here: -# https://www.packer.io/docs/datasources/amazon/ami +# https://www.packer.io/docs/datasources/amazon/ami.mdx data "amazon-ami" "autogenerated_1" { access_key = "${var.aws_access_key}" filters = { diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index 4c4d6498a..eea52e9d5 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -7,6 +7,14 @@ import ( // still vendored with Packer for now. Importing as library instead of // forcing use of packer init, until packer v1.8.0 exoscaleimportpostprocessor "github.com/exoscale/packer-plugin-exoscale/post-processor/exoscale-import" + amazonchrootbuilder "github.com/hashicorp/packer-plugin-amazon/builder/chroot" + amazonebsbuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebs" + amazonebssurrogatebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate" + amazonebsvolumebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume" + amazoninstancebuilder "github.com/hashicorp/packer-plugin-amazon/builder/instance" + amazonamidatasource "github.com/hashicorp/packer-plugin-amazon/datasource/ami" + amazonsecretsmanagerdatasource "github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager" + anazibimportpostprocessor "github.com/hashicorp/packer-plugin-amazon/post-processor/import" dockerbuilder "github.com/hashicorp/packer-plugin-docker/builder/docker" dockerimportpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-import" dockerpushpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-push" @@ -14,10 +22,22 @@ import ( dockertagpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-tag" ) +// VendoredDatasources are datasource components that were once bundled with the +// Packer core, but are now being imported from their counterpart plugin repos +var VendoredDatasources = map[string]packersdk.Datasource{ + "amazon-ami": new(amazonamidatasource.Datasource), + "amazon-secretsmanager": new(amazonsecretsmanagerdatasource.Datasource), +} + // VendoredBuilders are builder components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos var VendoredBuilders = map[string]packersdk.Builder{ - "docker": new(dockerbuilder.Builder), + "docker": new(dockerbuilder.Builder), + "amazon-ebs": new(amazonebsbuilder.Builder), + "amazon-chroot": new(amazonchrootbuilder.Builder), + "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), + "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), + "amazon-instance": new(amazoninstancebuilder.Builder), } // VendoredProvisioners are provisioner components that were once bundled with the @@ -32,11 +52,19 @@ var VendoredPostProcessors = map[string]packersdk.PostProcessor{ "docker-save": new(dockersavepostprocessor.PostProcessor), "docker-tag": new(dockertagpostprocessor.PostProcessor), "exoscale-import": new(exoscaleimportpostprocessor.PostProcessor), + "amazon-import": new(anazibimportpostprocessor.PostProcessor), } // Upon init lets load up any plugins that were vendored manually into the default // set of plugins. func init() { + for k, v := range VendoredDatasources { + if _, ok := Datasources[k]; ok { + continue + } + Datasources[k] = v + } + for k, v := range VendoredBuilders { if _, ok := Builders[k]; ok { continue diff --git a/datasource/amazon/ami/data_acc_test.go b/datasource/amazon/ami/data_acc_test.go deleted file mode 100644 index ced44bd3d..000000000 --- a/datasource/amazon/ami/data_acc_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package ami - -import ( - "fmt" - "os/exec" - "testing" - - "github.com/hashicorp/packer-plugin-sdk/acctest" - amazonacc "github.com/hashicorp/packer/builder/amazon/ebs/acceptance" -) - -func TestAmazonAmi(t *testing.T) { - testCase := &acctest.DatasourceTestCase{ - Name: "amazon_ami_datasource_basic_test", - Teardown: func() error { - helper := amazonacc.AWSHelper{ - Region: "us-west-2", - AMIName: "packer-amazon-ami-test", - } - return helper.CleanUpAmi() - }, - Template: testDatasourceBasic, - Type: "amazon-ami", - Check: func(buildCommand *exec.Cmd, logfile string) error { - if buildCommand.ProcessState != nil { - if buildCommand.ProcessState.ExitCode() != 0 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - return nil - }, - } - acctest.TestDatasource(t, testCase) -} - -const testDatasourceBasic = ` -data "amazon-ami" "test" { - filters = { - virtualization-type = "hvm" - name = "Windows_Server-2016-English-Full-Base-*" - root-device-type = "ebs" - } - most_recent = true - owners = ["801119661308"] -} - -source "amazon-ebs" "basic-example" { - user_data_file = "./test-fixtures/configure-source-ssh.ps1" - region = "us-west-2" - source_ami = data.amazon-ami.test.id - instance_type = "t2.small" - ssh_agent_auth = false - ami_name = "packer-amazon-ami-test" - communicator = "ssh" - ssh_timeout = "10m" - ssh_username = "Administrator" -} - -build { - sources = [ - "source.amazon-ebs.basic-example" - ] -} -` diff --git a/datasource/amazon/ami/data_test.go b/datasource/amazon/ami/data_test.go deleted file mode 100644 index ff11431b2..000000000 --- a/datasource/amazon/ami/data_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package ami - -import ( - "testing" - - awscommon "github.com/hashicorp/packer/builder/amazon/common" -) - -func TestDatasourceConfigure_FilterBlank(t *testing.T) { - datasource := Datasource{ - config: Config{ - AmiFilterOptions: awscommon.AmiFilterOptions{}, - }, - } - if err := datasource.Configure(nil); err == nil { - t.Fatalf("Should error if filters map is empty or not specified") - } -} - -func TestRunConfigPrepare_SourceAmiFilterOwnersBlank(t *testing.T) { - datasource := Datasource{ - config: Config{ - AmiFilterOptions: awscommon.AmiFilterOptions{ - Filters: map[string]string{"foo": "bar"}, - }, - }, - } - if err := datasource.Configure(nil); err == nil { - t.Fatalf("Should error if Owners is not specified)") - } -} - -func TestRunConfigPrepare_SourceAmiFilterGood(t *testing.T) { - datasource := Datasource{ - config: Config{ - AmiFilterOptions: awscommon.AmiFilterOptions{ - Owners: []string{"1234567"}, - Filters: map[string]string{"foo": "bar"}, - }, - }, - } - if err := datasource.Configure(nil); err != nil { - t.Fatalf("err: %s", err) - } -} diff --git a/datasource/amazon/ami/test-fixtures/configure-source-ssh.ps1 b/datasource/amazon/ami/test-fixtures/configure-source-ssh.ps1 deleted file mode 100644 index 7c12dd742..000000000 --- a/datasource/amazon/ami/test-fixtures/configure-source-ssh.ps1 +++ /dev/null @@ -1,161 +0,0 @@ - -# Version and download URL -$openSSHVersion = "8.1.0.0p1-Beta" -$openSSHURL = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v$openSSHVersion/OpenSSH-Win64.zip" - -Set-ExecutionPolicy Unrestricted - -# GitHub became TLS 1.2 only on Feb 22, 2018 -[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; - -# Function to unzip an archive to a given destination -Add-Type -AssemblyName System.IO.Compression.FileSystem -Function Unzip -{ - [CmdletBinding()] - param( - [Parameter(Mandatory=$true, Position=0)] - [string] $ZipFile, - [Parameter(Mandatory=$true, Position=1)] - [string] $OutPath - ) - - [System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $outPath) -} - -# Set various known paths -$openSSHZip = Join-Path $env:TEMP 'OpenSSH.zip' -$openSSHInstallDir = Join-Path $env:ProgramFiles 'OpenSSH' -$openSSHInstallScript = Join-Path $openSSHInstallDir 'install-sshd.ps1' -$openSSHDownloadKeyScript = Join-Path $openSSHInstallDir 'download-key-pair.ps1' -$openSSHDaemon = Join-Path $openSSHInstallDir 'sshd.exe' -$openSSHDaemonConfig = [io.path]::combine($env:ProgramData, 'ssh', 'sshd_config') - -# Download and unpack the binary distribution of OpenSSH -Invoke-WebRequest -Uri $openSSHURL ` - -OutFile $openSSHZip ` - -ErrorAction Stop - -Unzip -ZipFile $openSSHZip ` - -OutPath "$env:TEMP" ` - -ErrorAction Stop - -Remove-Item $openSSHZip ` - -ErrorAction SilentlyContinue - -# Move into Program Files -Move-Item -Path (Join-Path $env:TEMP 'OpenSSH-Win64') ` - -Destination $openSSHInstallDir ` - -ErrorAction Stop - -# Run the install script, terminate if it fails -& Powershell.exe -ExecutionPolicy Bypass -File $openSSHInstallScript -if ($LASTEXITCODE -ne 0) { - throw("Failed to install OpenSSH Server") -} - -# Add a firewall rule to allow inbound SSH connections to sshd.exe -New-NetFirewallRule -Name sshd ` - -DisplayName "OpenSSH Server (sshd)" ` - -Group "Remote Access" ` - -Description "Allow access via TCP port 22 to the OpenSSH Daemon" ` - -Enabled True ` - -Direction Inbound ` - -Protocol TCP ` - -LocalPort 22 ` - -Program "$openSSHDaemon" ` - -Action Allow ` - -ErrorAction Stop - -# Ensure sshd automatically starts on boot -Set-Service sshd -StartupType Automatic ` - -ErrorAction Stop - -# Set the default login shell for SSH connections to Powershell -New-Item -Path HKLM:\SOFTWARE\OpenSSH -Force -New-ItemProperty -Path HKLM:\SOFTWARE\OpenSSH ` - -Name DefaultShell ` - -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" ` - -ErrorAction Stop - -$keyDownloadScript = @' -# Download the instance key pair and authorize Administrator logins using it -$openSSHAdminUser = 'c:\ProgramData\ssh' -$openSSHAuthorizedKeys = Join-Path $openSSHAdminUser 'authorized_keys' - -If (-Not (Test-Path $openSSHAdminUser)) { - New-Item -Path $openSSHAdminUser -Type Directory -} - -$keyUrl = "http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key" -$keyReq = [System.Net.WebRequest]::Create($keyUrl) -$keyResp = $keyReq.GetResponse() -$keyRespStream = $keyResp.GetResponseStream() - $streamReader = New-Object System.IO.StreamReader $keyRespStream -$keyMaterial = $streamReader.ReadToEnd() - -$keyMaterial | Out-File -Append -FilePath $openSSHAuthorizedKeys -Encoding ASCII - -# Ensure access control on authorized_keys meets the requirements -$acl = Get-ACL -Path $openSSHAuthorizedKeys -$acl.SetAccessRuleProtection($True, $True) -Set-Acl -Path $openSSHAuthorizedKeys -AclObject $acl - -$acl = Get-ACL -Path $openSSHAuthorizedKeys -$ar = New-Object System.Security.AccessControl.FileSystemAccessRule( ` - "NT Authority\Authenticated Users", "ReadAndExecute", "Allow") -$acl.RemoveAccessRule($ar) -$ar = New-Object System.Security.AccessControl.FileSystemAccessRule( ` - "BUILTIN\Administrators", "FullControl", "Allow") -$acl.RemoveAccessRule($ar) -$ar = New-Object System.Security.AccessControl.FileSystemAccessRule( ` - "BUILTIN\Users", "FullControl", "Allow") -$acl.RemoveAccessRule($ar) -Set-Acl -Path $openSSHAuthorizedKeys -AclObject $acl - -Disable-ScheduledTask -TaskName "Download Key Pair" - -$sshdConfigContent = @" -# Modified sshd_config, created by Packer provisioner - -PasswordAuthentication yes -PubKeyAuthentication yes -PidFile __PROGRAMDATA__/ssh/logs/sshd.pid -AuthorizedKeysFile __PROGRAMDATA__/ssh/authorized_keys -AllowUsers Administrator - -Subsystem sftp sftp-server.exe -"@ - -Set-Content -Path C:\ProgramData\ssh\sshd_config ` - -Value $sshdConfigContent - -'@ -$keyDownloadScript | Out-File $openSSHDownloadKeyScript - -# Create Task - Ensure the name matches the verbatim version above -$taskName = "Download Key Pair" -$principal = New-ScheduledTaskPrincipal ` - -UserID "NT AUTHORITY\SYSTEM" ` - -LogonType ServiceAccount ` - -RunLevel Highest -$action = New-ScheduledTaskAction -Execute 'Powershell.exe' ` - -Argument "-NoProfile -File ""$openSSHDownloadKeyScript""" -$trigger = New-ScheduledTaskTrigger -AtStartup -Register-ScheduledTask -Action $action ` - -Trigger $trigger ` - -Principal $principal ` - -TaskName $taskName ` - -Description $taskName -Disable-ScheduledTask -TaskName $taskName - -# Run the install script, terminate if it fails -& Powershell.exe -ExecutionPolicy Bypass -File $openSSHDownloadKeyScript -if ($LASTEXITCODE -ne 0) { - throw("Failed to download key pair") -} - -# Restart to ensure public key authentication works and SSH comes up -Restart-Computer - -true \ No newline at end of file diff --git a/datasource/amazon/secretsmanager/data_acc_test.go b/datasource/amazon/secretsmanager/data_acc_test.go deleted file mode 100644 index 2aeec663b..000000000 --- a/datasource/amazon/secretsmanager/data_acc_test.go +++ /dev/null @@ -1,179 +0,0 @@ -package secretsmanager - -import ( - "context" - "fmt" - "io/ioutil" - "os" - "os/exec" - "regexp" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/packer-plugin-sdk/acctest" - "github.com/hashicorp/packer-plugin-sdk/retry" - awscommon "github.com/hashicorp/packer/builder/amazon/common" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" -) - -func TestAmazonSecretsManager(t *testing.T) { - secret := &AmazonSecret{ - Name: "packer_datasource_secretsmanager_test_secret", - Key: "packer_test_key", - Value: "this_is_the_packer_test_secret_value", - Description: "this is a secret used in a packer acc test", - } - - testCase := &acctest.DatasourceTestCase{ - Name: "amazon_secretsmanager_datasource_basic_test", - Setup: func() error { - return secret.Create() - }, - Teardown: func() error { - return secret.Delete() - }, - Template: testDatasourceBasic, - Type: "amazon-secrestmanager", - Check: func(buildCommand *exec.Cmd, logfile string) error { - if buildCommand.ProcessState != nil { - if buildCommand.ProcessState.ExitCode() != 0 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - - logs, err := os.Open(logfile) - if err != nil { - return fmt.Errorf("Unable find %s", logfile) - } - defer logs.Close() - - logsBytes, err := ioutil.ReadAll(logs) - if err != nil { - return fmt.Errorf("Unable to read %s", logfile) - } - logsString := string(logsBytes) - - valueLog := fmt.Sprintf("null.basic-example: secret value: %s", secret.Value) - secretStringLog := fmt.Sprintf("null.basic-example: secret secret_string: %s", fmt.Sprintf("{%s:%s}", secret.Key, secret.Value)) - versionIdLog := fmt.Sprintf("null.basic-example: secret version_id: %s", aws.StringValue(secret.Info.VersionId)) - secretValueLog := fmt.Sprintf("null.basic-example: secret value: %s", secret.Value) - - if matched, _ := regexp.MatchString(valueLog+".*", logsString); !matched { - t.Fatalf("logs doesn't contain expected arn %q", logsString) - } - if matched, _ := regexp.MatchString(secretStringLog+".*", logsString); !matched { - t.Fatalf("logs doesn't contain expected secret_string %q", logsString) - } - if matched, _ := regexp.MatchString(versionIdLog+".*", logsString); !matched { - t.Fatalf("logs doesn't contain expected version_id %q", logsString) - } - if matched, _ := regexp.MatchString(secretValueLog+".*", logsString); !matched { - t.Fatalf("logs doesn't contain expected value %q", logsString) - } - return nil - }, - } - acctest.TestDatasource(t, testCase) -} - -const testDatasourceBasic = ` -data "amazon-secretsmanager" "test" { - name = "packer_datasource_secretsmanager_test_secret" - key = "packer_test_key" -} - -locals { - value = data.amazon-secretsmanager.test.value - secret_string = data.amazon-secretsmanager.test.secret_string - version_id = data.amazon-secretsmanager.test.version_id - secret_value = jsondecode(data.amazon-secretsmanager.test.secret_string)["packer_test_key"] -} - -source "null" "basic-example" { - communicator = "none" -} - -build { - sources = [ - "source.null.basic-example" - ] - - provisioner "shell-local" { - inline = [ - "echo secret value: ${local.value}", - "echo secret secret_string: ${local.secret_string}", - "echo secret version_id: ${local.version_id}", - "echo secret value: ${local.secret_value}" - ] - } -} -` - -type AmazonSecret struct { - Name string - Key string - Value string - Description string - - Info *secretsmanager.CreateSecretOutput - manager *secretsmanager.SecretsManager -} - -func (as *AmazonSecret) Create() error { - if as.manager == nil { - accessConfig := &awscommon.AccessConfig{} - session, err := accessConfig.Session() - if err != nil { - return fmt.Errorf("Unable to create aws session %s", err.Error()) - } - as.manager = secretsmanager.New(session) - } - - newSecret := &secretsmanager.CreateSecretInput{ - Description: aws.String(as.Description), - Name: aws.String(as.Name), - SecretString: aws.String(fmt.Sprintf(`{%q:%q}`, as.Key, as.Value)), - } - - secret := new(secretsmanager.CreateSecretOutput) - var err error - err = retry.Config{ - Tries: 11, - ShouldRetry: func(err error) bool { - if awserrors.Matches(err, "ResourceExistsException", "") { - _ = as.Delete() - return true - } - if awserrors.Matches(err, "InvalidRequestException", "already scheduled for deletion") { - return true - } - return false - }, - RetryDelay: (&retry.Backoff{InitialBackoff: 200 * time.Millisecond, MaxBackoff: 30 * time.Second, Multiplier: 2}).Linear, - }.Run(context.TODO(), func(_ context.Context) error { - secret, err = as.manager.CreateSecret(newSecret) - return err - }) - as.Info = secret - return err -} - -func (as *AmazonSecret) Delete() error { - if as.manager == nil { - accessConfig := &awscommon.AccessConfig{} - session, err := accessConfig.Session() - if err != nil { - return fmt.Errorf("Unable to create aws session %s", err.Error()) - } - as.manager = secretsmanager.New(session) - } - - secret := &secretsmanager.DeleteSecretInput{ - ForceDeleteWithoutRecovery: aws.Bool(true), - SecretId: aws.String(as.Name), - } - _, err := as.manager.DeleteSecret(secret) - return err -} diff --git a/datasource/amazon/secretsmanager/data_test.go b/datasource/amazon/secretsmanager/data_test.go deleted file mode 100644 index 5802b3b29..000000000 --- a/datasource/amazon/secretsmanager/data_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package secretsmanager - -import ( - "testing" -) - -func TestDatasourceConfigure_EmptySecretId(t *testing.T) { - datasource := Datasource{ - config: Config{}, - } - if err := datasource.Configure(nil); err == nil { - t.Fatalf("Should error if secret id is not specified") - } -} - -func TestDatasourceConfigure_Dafaults(t *testing.T) { - datasource := Datasource{ - config: Config{ - Name: "arn:1223", - }, - } - if err := datasource.Configure(nil); err != nil { - t.Fatalf("err: %s", err) - } - if datasource.config.VersionStage != "AWSCURRENT" { - t.Fatalf("VersionStage not set correctly") - } -} - -func TestDatasourceConfigure(t *testing.T) { - datasource := Datasource{ - config: Config{ - Name: "arn:1223", - }, - } - if err := datasource.Configure(nil); err != nil { - t.Fatalf("err: %s", err) - } -} diff --git a/go.mod b/go.mod index a9155c4ee..6a0a4c25d 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f github.com/antihax/optional v1.0.0 github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 - github.com/aws/aws-sdk-go v1.37.15 + github.com/aws/aws-sdk-go v1.38.0 github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3 github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee github.com/cheggaaa/pb v1.0.27 @@ -32,24 +32,24 @@ require ( github.com/go-resty/resty/v2 v2.3.0 github.com/gobwas/glob v0.2.3 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 - github.com/google/go-cmp v0.5.2 + github.com/google/go-cmp v0.5.5 github.com/google/go-github/v33 v33.0.1-0.20210113204525-9318e629ec69 github.com/google/uuid v1.1.2 github.com/gophercloud/gophercloud v0.12.0 github.com/gophercloud/utils v0.0.0-20200508015959-b0167b94122c github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 - github.com/hashicorp/aws-sdk-go-base v0.6.0 github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de - github.com/hashicorp/go-cleanhttp v0.5.1 + github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 github.com/hashicorp/go-getter/v2 v2.0.0-20200604122502-a6995fa1edad - github.com/hashicorp/go-multierror v1.1.0 + github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79 github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.2.0 - github.com/hashicorp/hcl/v2 v2.8.0 + github.com/hashicorp/hcl/v2 v2.9.1 + github.com/hashicorp/packer-plugin-amazon v0.0.1 github.com/hashicorp/packer-plugin-docker v0.0.2 github.com/hashicorp/packer-plugin-sdk v0.1.1-0.20210323111710-5a7ab7f7a1c0 github.com/hashicorp/vault/api v1.0.4 @@ -87,7 +87,7 @@ require ( github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0 github.com/yandex-cloud/go-genproto v0.0.0-20200915125933-33de72a328bd github.com/yandex-cloud/go-sdk v0.0.0-20200921111412-ef15ded2014c - github.com/zclconf/go-cty v1.7.0 + github.com/zclconf/go-cty v1.8.1 github.com/zclconf/go-cty-yaml v1.0.1 golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/mobile v0.0.0-20201208152944-da85bec010a2 @@ -95,7 +95,7 @@ require ( golang.org/x/net v0.0.0-20210119194325-5f4716e94777 golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c + golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d golang.org/x/tools v0.0.0-20201111133315-69daaf961d65 google.golang.org/api v0.32.0 google.golang.org/grpc v1.32.0 diff --git a/go.sum b/go.sum index 288453a78..0bcce3dfa 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,9 @@ github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhi github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= +github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 h1:ePCAQPf5tUc5IMcUvu6euhSGna7jzs7eiXtJXHig6Zc= github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43/go.mod h1:S6puKjZ9ZeqUPBv2hEBnMZGcM2J6mOsDRQcmxkMAND0= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -123,8 +124,8 @@ github.com/aws/aws-sdk-go v1.30.8/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.36.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.36.5/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.37.15 h1:W7l7gLLMcYRlg6a+uvf3Zz4jYwdqYzhe5ymqwWoOhp4= -github.com/aws/aws-sdk-go v1.37.15/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.38.0 h1:mqnmtdW8rGIQmp2d0WRFLua0zW0Pel0P6/vd3gJuViY= +github.com/aws/aws-sdk-go v1.38.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= @@ -268,8 +269,9 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg= github.com/google/go-github/v33 v33.0.1-0.20210113204525-9318e629ec69 h1:zL0/Ug5CMhV0XRb3A6vnK1SQ9kJM3VIyRxPQ5t9w8Bg= github.com/google/go-github/v33 v33.0.1-0.20210113204525-9318e629ec69/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg= @@ -310,8 +312,9 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdR github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 h1:BpJ2o0OR5FV7vrkDYfXYVJQeMNWa8RhklZOpW2ITAIQ= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= -github.com/hashicorp/aws-sdk-go-base v0.6.0 h1:qmUbzM36msbBF59YctwuO5w0M2oNXjlilgKpnEhx1uw= github.com/hashicorp/aws-sdk-go-base v0.6.0/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY= +github.com/hashicorp/aws-sdk-go-base v0.7.0 h1:Umcq11kcoARameDgxPiYBbyltTZqO7GgBVSdq4pzX/w= +github.com/hashicorp/aws-sdk-go-base v0.7.0/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY= github.com/hashicorp/consul/api v1.4.0 h1:jfESivXnO5uLdH650JU/6AnjRoHrLhULq0FnC3Kp9EY= github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= github.com/hashicorp/consul/sdk v0.4.0 h1:zBtCfKJZcJDBvSCkQJch4ulp59m1rATFLKwNo/LYY30= @@ -321,8 +324,9 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de h1:XDCSythtg8aWSRSO29uwhgh7b127fWr+m5SemqjSUL8= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de/go.mod h1:xIwEieBHERyEvaeKF/TcHh1Hu+lxPM+n2vT1+g9I4m4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 h1:kgvybwEeu0SXktbB2y3uLHX9lklLo+nzUwh59A3jzQc= github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= github.com/hashicorp/go-getter v1.4.1 h1:3A2Mh8smGFcf5M+gmcv898mZdrxpseik45IpcyISLsA= @@ -345,8 +349,9 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79 h1:RKu7yAXZTaQsxj1K9GDsh+QVw0+Wu1SWHxtbFN0n+hE= github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79/go.mod h1:09jT3Y/OIsjTjQ2+3bkVNPDKqWcGIYYvjB2BEKVUdvc= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= @@ -378,8 +383,9 @@ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.6.0/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= -github.com/hashicorp/hcl/v2 v2.8.0 h1:iHLEAsNDp3N2MtqroP1wf0nF/zB2+McHN5YCzwqIm80= github.com/hashicorp/hcl/v2 v2.8.0/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= +github.com/hashicorp/hcl/v2 v2.9.1 h1:eOy4gREY0/ZQHNItlfuEZqtcQbXIxzojlP301hDpnac= +github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= @@ -395,6 +401,12 @@ github.com/hashicorp/packer v1.6.7-0.20210126105722-aef4ced967ec/go.mod h1:2+Vo/ github.com/hashicorp/packer v1.6.7-0.20210208125835-f616955ebcb6/go.mod h1:7f5ZpTTRG53rQ58BcTADuTnpiBcB3wapuxl4sF2sGMM= github.com/hashicorp/packer v1.6.7-0.20210217093213-201869d627bf/go.mod h1:+EWPPcqee4h8S/y913Dnta1eJkgiqsGXBQgB75A2qV0= github.com/hashicorp/packer v1.7.0/go.mod h1:3KRJcwOctl2JaAGpQMI1bWQRArfWNWqcYjO6AOsVVGQ= +github.com/hashicorp/packer-plugin-amazon v0.0.0-20210322103904-ebc9f7a3cb33 h1:c8fxJJE9Ko8FXaTQexP22cHpvOmEZHk30WTWvo/BKFg= +github.com/hashicorp/packer-plugin-amazon v0.0.0-20210322103904-ebc9f7a3cb33/go.mod h1:12c9msibyHdId+Mk/pCbdRb1KaLIhaNyxeJ6n8bZt30= +github.com/hashicorp/packer-plugin-amazon v0.0.0-20210323151306-ff072d167737 h1:ZA8sQHjGIomiUz4SsccdxHwDk/ZI9CAmimUo7QKhMMs= +github.com/hashicorp/packer-plugin-amazon v0.0.0-20210323151306-ff072d167737/go.mod h1:12c9msibyHdId+Mk/pCbdRb1KaLIhaNyxeJ6n8bZt30= +github.com/hashicorp/packer-plugin-amazon v0.0.1 h1:EuyjNK9bL7WhQeIJzhBJxOx8nyc61ai5UbOsb1PIVwI= +github.com/hashicorp/packer-plugin-amazon v0.0.1/go.mod h1:12c9msibyHdId+Mk/pCbdRb1KaLIhaNyxeJ6n8bZt30= github.com/hashicorp/packer-plugin-docker v0.0.2 h1:j/hQTogaN2pZfZohlZTRu5YvNZg2/qtYYHkxPBxv2Oo= github.com/hashicorp/packer-plugin-docker v0.0.2/go.mod h1:A2p9qztS4n88KsNF+qBM7BWw2HndW636GpFIjNSvbKM= github.com/hashicorp/packer-plugin-sdk v0.0.6/go.mod h1:Nvh28f+Jmpp2rcaN79bULTouNkGNDRfHckhHKTAXtyU= @@ -405,6 +417,7 @@ github.com/hashicorp/packer-plugin-sdk v0.0.10-0.20210126105622-8e1648006d93/go. github.com/hashicorp/packer-plugin-sdk v0.0.11/go.mod h1:GNb0WNs7zibb8vzUZce1As64z2AW0FEMwhe2J7/NW5I= github.com/hashicorp/packer-plugin-sdk v0.0.12/go.mod h1:hs82OYeufirGG6KRENMpjBWomnIlte99X6wXAPThJ5I= github.com/hashicorp/packer-plugin-sdk v0.0.14/go.mod h1:tNb3XzJPnjMl3QuUdKmF47B5ImerdTakalHzUAvW0aw= +github.com/hashicorp/packer-plugin-sdk v0.1.0/go.mod h1:CFsC20uZjtER/EnTn/CSMKD0kEdkqOVev8mtOmfnZiI= github.com/hashicorp/packer-plugin-sdk v0.1.1-0.20210323111710-5a7ab7f7a1c0 h1:nw4RqF7C4jUWGo5PGDG4dSclU+G/vXyVBHIu5j7akd4= github.com/hashicorp/packer-plugin-sdk v0.1.1-0.20210323111710-5a7ab7f7a1c0/go.mod h1:1d3nqB9LUsXMQaNUiL67Q+WYEtjsVcLNTX8ikVlpBrc= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= @@ -665,8 +678,11 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= -github.com/zclconf/go-cty v1.7.0 h1:yMqLinUwNCYkmiHjEH+luio1yGl35cjqVzjvdRg2WlY= github.com/zclconf/go-cty v1.7.0/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= +github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty v1.8.1 h1:SI0LqNeNxAgv2WWqWJMlG2/Ad/6aYJ7IVYYMigmfkuI= +github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -839,8 +855,9 @@ golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d h1:jbzgAvDZn8aEnytae+4ou0J0GwFZoHR0hOrTg4qH8GA= +golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/post-processor/amazon-import/version/version.go b/post-processor/amazon-import/version/version.go deleted file mode 100644 index 695b1d778..000000000 --- a/post-processor/amazon-import/version/version.go +++ /dev/null @@ -1,13 +0,0 @@ -package version - -import ( - "github.com/hashicorp/packer-plugin-sdk/version" - packerVersion "github.com/hashicorp/packer/version" -) - -var AmazonImportPluginVersion *version.PluginVersion - -func init() { - AmazonImportPluginVersion = version.InitializePluginVersion( - packerVersion.Version, packerVersion.VersionPrerelease) -} diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/emoji_table.rl b/vendor/github.com/apparentlymart/go-textseg/v12/textseg/emoji_table.rl deleted file mode 100644 index 1c0749c9c..000000000 --- a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/emoji_table.rl +++ /dev/null @@ -1,290 +0,0 @@ -# The following Ragel file was autogenerated with unicode2ragel.rb -# from: https://www.unicode.org/Public/emoji/12.0/emoji-data.txt -# -# It defines ["Extended_Pictographic"]. -# -# To use this, make sure that your alphtype is set to byte, -# and that your input is in utf8. - -%%{ - machine Emoji; - - Extended_Pictographic = - 0xC2 0xA9 #1.1 [1] (©️) copyright - | 0xC2 0xAE #1.1 [1] (®️) registered - | 0xE2 0x80 0xBC #1.1 [1] (‼️) double exclamation mark - | 0xE2 0x81 0x89 #3.0 [1] (⁉️) exclamation question mark - | 0xE2 0x84 0xA2 #1.1 [1] (™️) trade mark - | 0xE2 0x84 0xB9 #3.0 [1] (ℹ️) information - | 0xE2 0x86 0x94..0x99 #1.1 [6] (↔️..↙️) left-right arrow..down... - | 0xE2 0x86 0xA9..0xAA #1.1 [2] (↩️..↪️) right arrow curving le... - | 0xE2 0x8C 0x9A..0x9B #1.1 [2] (⌚..⌛) watch..hourglass done - | 0xE2 0x8C 0xA8 #1.1 [1] (⌨️) keyboard - | 0xE2 0x8E 0x88 #3.0 [1] (⎈) HELM SYMBOL - | 0xE2 0x8F 0x8F #4.0 [1] (⏏️) eject button - | 0xE2 0x8F 0xA9..0xB3 #6.0 [11] (⏩..⏳) fast-forward button..hou... - | 0xE2 0x8F 0xB8..0xBA #7.0 [3] (⏸️..⏺️) pause button..record b... - | 0xE2 0x93 0x82 #1.1 [1] (Ⓜ️) circled M - | 0xE2 0x96 0xAA..0xAB #1.1 [2] (▪️..▫️) black small square..wh... - | 0xE2 0x96 0xB6 #1.1 [1] (▶️) play button - | 0xE2 0x97 0x80 #1.1 [1] (◀️) reverse button - | 0xE2 0x97 0xBB..0xBE #3.2 [4] (◻️..◾) white medium square..bl... - | 0xE2 0x98 0x80..0x85 #1.1 [6] (☀️..★) sun..BLACK STAR - | 0xE2 0x98 0x87..0x92 #1.1 [12] (☇..☒) LIGHTNING..BALLOT BOX WI... - | 0xE2 0x98 0x94..0x95 #4.0 [2] (☔..☕) umbrella with rain drops... - | 0xE2 0x98 0x96..0x97 #3.2 [2] (☖..☗) WHITE SHOGI PIECE..BLACK... - | 0xE2 0x98 0x98 #4.1 [1] (☘️) shamrock - | 0xE2 0x98 0x99 #3.0 [1] (☙) REVERSED ROTATED FLORAL ... - | 0xE2 0x98 0x9A..0xFF #1.1 [86] (☚..♯) BLACK LEFT POINTING INDE... - | 0xE2 0x99 0x00..0xAF # - | 0xE2 0x99 0xB0..0xB1 #3.0 [2] (♰..♱) WEST SYRIAC CROSS..EAST ... - | 0xE2 0x99 0xB2..0xBD #3.2 [12] (♲..♽) UNIVERSAL RECYCLING SYMB... - | 0xE2 0x99 0xBE..0xBF #4.1 [2] (♾️..♿) infinity..wheelchair sy... - | 0xE2 0x9A 0x80..0x85 #3.2 [6] (⚀..⚅) DIE FACE-1..DIE FACE-6 - | 0xE2 0x9A 0x90..0x91 #4.0 [2] (⚐..⚑) WHITE FLAG..BLACK FLAG - | 0xE2 0x9A 0x92..0x9C #4.1 [11] (⚒️..⚜️) hammer and pick..fleur... - | 0xE2 0x9A 0x9D #5.1 [1] (⚝) OUTLINED WHITE STAR - | 0xE2 0x9A 0x9E..0x9F #5.2 [2] (⚞..⚟) THREE LINES CONVERGING R... - | 0xE2 0x9A 0xA0..0xA1 #4.0 [2] (⚠️..⚡) warning..high voltage - | 0xE2 0x9A 0xA2..0xB1 #4.1 [16] (⚢..⚱️) DOUBLED FEMALE SIGN..fu... - | 0xE2 0x9A 0xB2 #5.0 [1] (⚲) NEUTER - | 0xE2 0x9A 0xB3..0xBC #5.1 [10] (⚳..⚼) CERES..SESQUIQUADRATE - | 0xE2 0x9A 0xBD..0xBF #5.2 [3] (⚽..⚿) soccer ball..SQUARED KEY - | 0xE2 0x9B 0x80..0x83 #5.1 [4] (⛀..⛃) WHITE DRAUGHTS MAN..BLAC... - | 0xE2 0x9B 0x84..0x8D #5.2 [10] (⛄..⛍) snowman without snow..DI... - | 0xE2 0x9B 0x8E #6.0 [1] (⛎) Ophiuchus - | 0xE2 0x9B 0x8F..0xA1 #5.2 [19] (⛏️..⛡) pick..RESTRICTED LEFT E... - | 0xE2 0x9B 0xA2 #6.0 [1] (⛢) ASTRONOMICAL SYMBOL FOR ... - | 0xE2 0x9B 0xA3 #5.2 [1] (⛣) HEAVY CIRCLE WITH STROKE... - | 0xE2 0x9B 0xA4..0xA7 #6.0 [4] (⛤..⛧) PENTAGRAM..INVERTED PENT... - | 0xE2 0x9B 0xA8..0xBF #5.2 [24] (⛨..⛿) BLACK CROSS ON SHIELD..W... - | 0xE2 0x9C 0x80 #7.0 [1] (✀) BLACK SAFETY SCISSORS - | 0xE2 0x9C 0x81..0x84 #1.1 [4] (✁..✄) UPPER BLADE SCISSORS..WH... - | 0xE2 0x9C 0x85 #6.0 [1] (✅) check mark button - | 0xE2 0x9C 0x88..0x89 #1.1 [2] (✈️..✉️) airplane..envelope - | 0xE2 0x9C 0x8A..0x8B #6.0 [2] (✊..✋) raised fist..raised hand - | 0xE2 0x9C 0x8C..0x92 #1.1 [7] (✌️..✒️) victory hand..black nib - | 0xE2 0x9C 0x94 #1.1 [1] (✔️) check mark - | 0xE2 0x9C 0x96 #1.1 [1] (✖️) multiplication sign - | 0xE2 0x9C 0x9D #1.1 [1] (✝️) latin cross - | 0xE2 0x9C 0xA1 #1.1 [1] (✡️) star of David - | 0xE2 0x9C 0xA8 #6.0 [1] (✨) sparkles - | 0xE2 0x9C 0xB3..0xB4 #1.1 [2] (✳️..✴️) eight-spoked asterisk.... - | 0xE2 0x9D 0x84 #1.1 [1] (❄️) snowflake - | 0xE2 0x9D 0x87 #1.1 [1] (❇️) sparkle - | 0xE2 0x9D 0x8C #6.0 [1] (❌) cross mark - | 0xE2 0x9D 0x8E #6.0 [1] (❎) cross mark button - | 0xE2 0x9D 0x93..0x95 #6.0 [3] (❓..❕) question mark..white exc... - | 0xE2 0x9D 0x97 #5.2 [1] (❗) exclamation mark - | 0xE2 0x9D 0xA3..0xA7 #1.1 [5] (❣️..❧) heart exclamation..ROTA... - | 0xE2 0x9E 0x95..0x97 #6.0 [3] (➕..➗) plus sign..division sign - | 0xE2 0x9E 0xA1 #1.1 [1] (➡️) right arrow - | 0xE2 0x9E 0xB0 #6.0 [1] (➰) curly loop - | 0xE2 0x9E 0xBF #6.0 [1] (➿) double curly loop - | 0xE2 0xA4 0xB4..0xB5 #3.2 [2] (⤴️..⤵️) right arrow curving up... - | 0xE2 0xAC 0x85..0x87 #4.0 [3] (⬅️..⬇️) left arrow..down arrow - | 0xE2 0xAC 0x9B..0x9C #5.1 [2] (⬛..⬜) black large square..whit... - | 0xE2 0xAD 0x90 #5.1 [1] (⭐) star - | 0xE2 0xAD 0x95 #5.2 [1] (⭕) hollow red circle - | 0xE3 0x80 0xB0 #1.1 [1] (〰️) wavy dash - | 0xE3 0x80 0xBD #3.2 [1] (〽️) part alternation mark - | 0xE3 0x8A 0x97 #1.1 [1] (㊗️) Japanese “congratulatio... - | 0xE3 0x8A 0x99 #1.1 [1] (㊙️) Japanese “secret” button - | 0xF0 0x9F 0x80 0x80..0xAB #5.1 [44] (🀀..🀫) MAHJONG TILE EAST WIN... - | 0xF0 0x9F 0x80 0xAC..0xAF #NA [4] (🀬..🀯) ...... - | 0xF0 0x9F 0x83 0x81..0x8F #6.0 [15] (🃁..🃏) PLAYING CARD ACE OF D... - | 0xF0 0x9F 0x83 0x90 #NA [1] (🃐) - | 0xF0 0x9F 0x83 0x91..0x9F #6.0 [15] (🃑..🃟) PLAYING CARD ACE OF C... - | 0xF0 0x9F 0x83 0xA0..0xB5 #7.0 [22] (🃠..🃵) PLAYING CARD FOOL..PL... - | 0xF0 0x9F 0x83 0xB6..0xBF #NA [10] (🃶..🃿) ................... - | 0xF0 0x9F 0x8A..0x8A 0x00..0xFF # - | 0xF0 0x9F 0x8B 0x00..0xBF # - | 0xF0 0x9F 0x8C 0x80..0xA0 #6.0 [33] (🌀..🌠) cyclone..shooting star - | 0xF0 0x9F 0x8C 0xA1..0xAC #7.0 [12] (🌡️..🌬️) thermometer..wind face - | 0xF0 0x9F 0x8C 0xAD..0xAF #8.0 [3] (🌭..🌯) hot dog..burrito - | 0xF0 0x9F 0x8C 0xB0..0xB5 #6.0 [6] (🌰..🌵) chestnut..cactus - | 0xF0 0x9F 0x8C 0xB6 #7.0 [1] (🌶️) hot pepper - | 0xF0 0x9F 0x8C 0xB7..0xFF #6.0 [70] (🌷..🍼) tulip..baby bottle - | 0xF0 0x9F 0x8D 0x00..0xBC # - | 0xF0 0x9F 0x8D 0xBD #7.0 [1] (🍽️) fork and knife with plate - | 0xF0 0x9F 0x8D 0xBE..0xBF #8.0 [2] (🍾..🍿) bottle with popping c... - | 0xF0 0x9F 0x8E 0x80..0x93 #6.0 [20] (🎀..🎓) ribbon..graduation cap - | 0xF0 0x9F 0x8E 0x94..0x9F #7.0 [12] (🎔..🎟️) HEART WITH TIP ON TH... - | 0xF0 0x9F 0x8E 0xA0..0xFF #6.0 [37] (🎠..🏄) carousel horse..perso... - | 0xF0 0x9F 0x8F 0x00..0x84 # - | 0xF0 0x9F 0x8F 0x85 #7.0 [1] (🏅) sports medal - | 0xF0 0x9F 0x8F 0x86..0x8A #6.0 [5] (🏆..🏊) trophy..person swimming - | 0xF0 0x9F 0x8F 0x8B..0x8E #7.0 [4] (🏋️..🏎️) person lifting weig... - | 0xF0 0x9F 0x8F 0x8F..0x93 #8.0 [5] (🏏..🏓) cricket game..ping pong - | 0xF0 0x9F 0x8F 0x94..0x9F #7.0 [12] (🏔️..🏟️) snow-capped mountai... - | 0xF0 0x9F 0x8F 0xA0..0xB0 #6.0 [17] (🏠..🏰) house..castle - | 0xF0 0x9F 0x8F 0xB1..0xB7 #7.0 [7] (🏱..🏷️) WHITE PENNANT..label - | 0xF0 0x9F 0x8F 0xB8..0xBA #8.0 [3] (🏸..🏺) badminton..amphora - | 0xF0 0x9F 0x90 0x80..0xBE #6.0 [63] (🐀..🐾) rat..paw prints - | 0xF0 0x9F 0x90 0xBF #7.0 [1] (🐿️) chipmunk - | 0xF0 0x9F 0x91 0x80 #6.0 [1] (👀) eyes - | 0xF0 0x9F 0x91 0x81 #7.0 [1] (👁️) eye - | 0xF0 0x9F 0x91 0x82..0xFF #6.0[182] (👂..📷) ear..camera - | 0xF0 0x9F 0x92..0x92 0x00..0xFF # - | 0xF0 0x9F 0x93 0x00..0xB7 # - | 0xF0 0x9F 0x93 0xB8 #7.0 [1] (📸) camera with flash - | 0xF0 0x9F 0x93 0xB9..0xBC #6.0 [4] (📹..📼) video camera..videoca... - | 0xF0 0x9F 0x93 0xBD..0xBE #7.0 [2] (📽️..📾) film projector..PORT... - | 0xF0 0x9F 0x93 0xBF #8.0 [1] (📿) prayer beads - | 0xF0 0x9F 0x94 0x80..0xBD #6.0 [62] (🔀..🔽) shuffle tracks button... - | 0xF0 0x9F 0x95 0x86..0x8A #7.0 [5] (🕆..🕊️) WHITE LATIN CROSS..dove - | 0xF0 0x9F 0x95 0x8B..0x8F #8.0 [5] (🕋..🕏) kaaba..BOWL OF HYGIEIA - | 0xF0 0x9F 0x95 0x90..0xA7 #6.0 [24] (🕐..🕧) one o’clock..twelve-t... - | 0xF0 0x9F 0x95 0xA8..0xB9 #7.0 [18] (🕨..🕹️) RIGHT SPEAKER..joystick - | 0xF0 0x9F 0x95 0xBA #9.0 [1] (🕺) man dancing - | 0xF0 0x9F 0x95 0xBB..0xFF #7.0 [41] (🕻..🖣) LEFT HAND TELEPHONE R... - | 0xF0 0x9F 0x96 0x00..0xA3 # - | 0xF0 0x9F 0x96 0xA4 #9.0 [1] (🖤) black heart - | 0xF0 0x9F 0x96 0xA5..0xFF #7.0 [86] (🖥️..🗺️) desktop computer..w... - | 0xF0 0x9F 0x97 0x00..0xBA # - | 0xF0 0x9F 0x97 0xBB..0xBF #6.0 [5] (🗻..🗿) mount fuji..moai - | 0xF0 0x9F 0x98 0x80 #6.1 [1] (😀) grinning face - | 0xF0 0x9F 0x98 0x81..0x90 #6.0 [16] (😁..😐) beaming face with smi... - | 0xF0 0x9F 0x98 0x91 #6.1 [1] (😑) expressionless face - | 0xF0 0x9F 0x98 0x92..0x94 #6.0 [3] (😒..😔) unamused face..pensiv... - | 0xF0 0x9F 0x98 0x95 #6.1 [1] (😕) confused face - | 0xF0 0x9F 0x98 0x96 #6.0 [1] (😖) confounded face - | 0xF0 0x9F 0x98 0x97 #6.1 [1] (😗) kissing face - | 0xF0 0x9F 0x98 0x98 #6.0 [1] (😘) face blowing a kiss - | 0xF0 0x9F 0x98 0x99 #6.1 [1] (😙) kissing face with smilin... - | 0xF0 0x9F 0x98 0x9A #6.0 [1] (😚) kissing face with closed... - | 0xF0 0x9F 0x98 0x9B #6.1 [1] (😛) face with tongue - | 0xF0 0x9F 0x98 0x9C..0x9E #6.0 [3] (😜..😞) winking face with ton... - | 0xF0 0x9F 0x98 0x9F #6.1 [1] (😟) worried face - | 0xF0 0x9F 0x98 0xA0..0xA5 #6.0 [6] (😠..😥) angry face..sad but r... - | 0xF0 0x9F 0x98 0xA6..0xA7 #6.1 [2] (😦..😧) frowning face with op... - | 0xF0 0x9F 0x98 0xA8..0xAB #6.0 [4] (😨..😫) fearful face..tired face - | 0xF0 0x9F 0x98 0xAC #6.1 [1] (😬) grimacing face - | 0xF0 0x9F 0x98 0xAD #6.0 [1] (😭) loudly crying face - | 0xF0 0x9F 0x98 0xAE..0xAF #6.1 [2] (😮..😯) face with open mouth.... - | 0xF0 0x9F 0x98 0xB0..0xB3 #6.0 [4] (😰..😳) anxious face with swe... - | 0xF0 0x9F 0x98 0xB4 #6.1 [1] (😴) sleeping face - | 0xF0 0x9F 0x98 0xB5..0xFF #6.0 [12] (😵..🙀) dizzy face..weary cat - | 0xF0 0x9F 0x99 0x00..0x80 # - | 0xF0 0x9F 0x99 0x81..0x82 #7.0 [2] (🙁..🙂) slightly frowning fac... - | 0xF0 0x9F 0x99 0x83..0x84 #8.0 [2] (🙃..🙄) upside-down face..fac... - | 0xF0 0x9F 0x99 0x85..0x8F #6.0 [11] (🙅..🙏) person gesturing NO..... - | 0xF0 0x9F 0x9A 0x80..0xFF #6.0 [70] (🚀..🛅) rocket..left luggage - | 0xF0 0x9F 0x9B 0x00..0x85 # - | 0xF0 0x9F 0x9B 0x86..0x8F #7.0 [10] (🛆..🛏️) TRIANGLE WITH ROUNDE... - | 0xF0 0x9F 0x9B 0x90 #8.0 [1] (🛐) place of worship - | 0xF0 0x9F 0x9B 0x91..0x92 #9.0 [2] (🛑..🛒) stop sign..shopping cart - | 0xF0 0x9F 0x9B 0x93..0x94 #10.0 [2] (🛓..🛔) STUPA..PAGODA - | 0xF0 0x9F 0x9B 0x95 #12.0 [1] (🛕) hindu temple - | 0xF0 0x9F 0x9B 0x96..0x9F #NA [10] (🛖..🛟) ...................... - | 0xF0 0x9F 0xA4 0x8D..0x8F #12.0 [3] (🤍..🤏) white heart..pinchin... - | 0xF0 0x9F 0xA4 0x90..0x98 #8.0 [9] (🤐..🤘) zipper-mouth face..si... - | 0xF0 0x9F 0xA4 0x99..0x9E #9.0 [6] (🤙..🤞) call me hand..crossed... - | 0xF0 0x9F 0xA4 0x9F #10.0 [1] (🤟) love-you gesture - | 0xF0 0x9F 0xA4 0xA0..0xA7 #9.0 [8] (🤠..🤧) cowboy hat face..snee... - | 0xF0 0x9F 0xA4 0xA8..0xAF #10.0 [8] (🤨..🤯) face with raised eye... - | 0xF0 0x9F 0xA4 0xB0 #9.0 [1] (🤰) pregnant woman - | 0xF0 0x9F 0xA4 0xB1..0xB2 #10.0 [2] (🤱..🤲) breast-feeding..palm... - | 0xF0 0x9F 0xA4 0xB3..0xBA #9.0 [8] (🤳..🤺) selfie..person fencing - | 0xF0 0x9F 0xA4 0xBC..0xBE #9.0 [3] (🤼..🤾) people wrestling..per... - | 0xF0 0x9F 0xA4 0xBF #12.0 [1] (🤿) diving mask - | 0xF0 0x9F 0xA5 0x80..0x85 #9.0 [6] (🥀..🥅) wilted flower..goal net - | 0xF0 0x9F 0xA5 0x87..0x8B #9.0 [5] (🥇..🥋) 1st place medal..mart... - | 0xF0 0x9F 0xA5 0x8C #10.0 [1] (🥌) curling stone - | 0xF0 0x9F 0xA5 0x8D..0x8F #11.0 [3] (🥍..🥏) lacrosse..flying disc - | 0xF0 0x9F 0xA5 0x90..0x9E #9.0 [15] (🥐..🥞) croissant..pancakes - | 0xF0 0x9F 0xA5 0x9F..0xAB #10.0 [13] (🥟..🥫) dumpling..canned food - | 0xF0 0x9F 0xA5 0xAC..0xB0 #11.0 [5] (🥬..🥰) leafy green..smiling... - | 0xF0 0x9F 0xA5 0xB1 #12.0 [1] (🥱) yawning face - | 0xF0 0x9F 0xA5 0xB2 #NA [1] (🥲) - | 0xF0 0x9F 0xA5 0xB3..0xB6 #11.0 [4] (🥳..🥶) partying face..cold ... - | 0xF0 0x9F 0xA5 0xB7..0xB9 #NA [3] (🥷..🥹) ..................... - | 0xF0 0x9F 0xAB..0xBE 0x00..0xFF # - | 0xF0 0x9F 0xBF 0x00..0xBD # - ; - -}%% diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.go b/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.go deleted file mode 100644 index c389827fe..000000000 --- a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.go +++ /dev/null @@ -1,4078 +0,0 @@ -//line grapheme_clusters.rl:1 -package textseg - -import ( - "errors" - "unicode/utf8" -) - -// Generated from grapheme_clusters.rl. DO NOT EDIT - -//line grapheme_clusters.go:13 -var _graphclust_actions []byte = []byte{ - 0, 1, 0, 1, 4, 1, 10, 1, 11, - 1, 12, 1, 13, 1, 14, 1, 15, - 1, 16, 1, 17, 1, 18, 1, 19, - 1, 20, 1, 21, 1, 22, 2, 1, - 8, 2, 1, 9, 2, 2, 3, 2, - 5, 1, 3, 0, 1, 9, 3, 5, - 0, 1, 3, 5, 1, 6, 3, 5, - 1, 7, -} - -var _graphclust_key_offsets []int16 = []int16{ - 0, 0, 1, 3, 5, 7, 10, 15, - 17, 20, 28, 31, 33, 35, 38, 68, - 76, 78, 82, 85, 90, 95, 107, 119, - 127, 132, 142, 145, 152, 156, 164, 174, - 180, 188, 190, 198, 201, 203, 206, 208, - 215, 217, 225, 226, 247, 251, 257, 262, - 264, 268, 272, 274, 278, 280, 283, 287, - 289, 296, 298, 302, 306, 310, 312, 314, - 322, 326, 331, 333, 335, 337, 338, 340, - 342, 344, 346, 361, 365, 367, 369, 374, - 378, 384, 386, 388, 392, 396, 398, 402, - 409, 414, 418, 421, 422, 426, 433, 440, - 441, 442, 444, 453, 455, 457, 459, 491, - 495, 497, 501, 505, 508, 512, 516, 519, - 521, 527, 540, 542, 545, 547, 549, 553, - 557, 559, 561, 563, 565, 570, 576, 579, - 581, 585, 589, 596, 599, 605, 607, 611, - 613, 615, 618, 622, 623, 625, 631, 637, - 643, 645, 649, 653, 658, 663, 673, 675, - 677, 679, 680, 682, 683, 689, 691, 693, - 693, 695, 702, 704, 706, 708, 711, 716, - 718, 721, 729, 732, 734, 736, 739, 769, - 777, 779, 783, 786, 791, 796, 808, 820, - 828, 833, 843, 846, 853, 857, 865, 875, - 881, 889, 891, 899, 902, 904, 907, 909, - 916, 918, 926, 927, 948, 952, 958, 963, - 965, 969, 973, 975, 979, 981, 984, 988, - 990, 997, 999, 1003, 1007, 1011, 1013, 1015, - 1023, 1027, 1032, 1034, 1036, 1060, 1063, 1064, - 1066, 1068, 1072, 1075, 1076, 1081, 1082, 1085, - 1088, 1094, 1096, 1100, 1102, 1113, 1122, 1127, - 1129, 1133, 1135, 1137, 1138, 1140, 1143, 1146, - 1148, 1150, 1165, 1169, 1171, 1173, 1178, 1182, - 1188, 1190, 1192, 1196, 1200, 1202, 1206, 1213, - 1218, 1222, 1225, 1226, 1230, 1237, 1244, 1245, - 1246, 1248, 1257, 1259, 1261, 1263, 1295, 1299, - 1301, 1305, 1309, 1312, 1316, 1320, 1323, 1325, - 1331, 1344, 1346, 1349, 1351, 1353, 1357, 1361, - 1363, 1365, 1367, 1369, 1374, 1380, 1383, 1385, - 1389, 1393, 1400, 1403, 1409, 1411, 1415, 1417, - 1419, 1422, 1426, 1427, 1429, 1435, 1441, 1447, - 1449, 1453, 1457, 1462, 1467, 1477, 1479, 1481, - 1483, 1523, 1523, 1526, 1530, 1535, 1537, 1545, - 1547, 1549, 1551, 1553, 1555, 1557, 1559, 1563, - 1567, 1571, 1575, 1577, 1578, 1584, 1586, 1588, - 1590, 1597, 1598, 1600, 1605, 1607, 1609, 1611, - 1614, 1619, 1621, 1624, 1632, 1635, 1637, 1639, - 1642, 1672, 1680, 1682, 1686, 1689, 1694, 1699, - 1711, 1723, 1731, 1736, 1746, 1749, 1756, 1760, - 1768, 1778, 1784, 1792, 1794, 1802, 1805, 1807, - 1810, 1812, 1819, 1821, 1829, 1830, 1851, 1855, - 1861, 1866, 1868, 1872, 1876, 1878, 1882, 1884, - 1887, 1891, 1893, 1900, 1902, 1906, 1910, 1914, - 1916, 1918, 1926, 1930, 1935, 1937, 1939, 1941, - 1942, 1944, 1946, 1948, 1950, 1965, 1969, 1971, - 1973, 1978, 1982, 1988, 1990, 1992, 1996, 2000, - 2002, 2006, 2013, 2018, 2022, 2025, 2026, 2030, - 2037, 2044, 2045, 2046, 2048, 2057, 2059, 2061, - 2063, 2095, 2099, 2101, 2105, 2109, 2112, 2116, - 2120, 2123, 2125, 2131, 2144, 2146, 2149, 2151, - 2153, 2157, 2161, 2163, 2165, 2167, 2169, 2174, - 2180, 2183, 2185, 2189, 2193, 2200, 2203, 2209, - 2211, 2215, 2217, 2219, 2222, 2226, 2227, 2229, - 2235, 2241, 2247, 2249, 2253, 2257, 2262, 2267, - 2277, 2279, 2281, 2283, 2284, 2286, 2287, 2293, - 2295, 2297, 2297, 2299, 2305, 2307, 2309, 2311, - 2314, 2319, 2321, 2324, 2332, 2335, 2337, 2339, - 2342, 2372, 2380, 2382, 2386, 2389, 2394, 2399, - 2411, 2423, 2431, 2436, 2446, 2449, 2456, 2460, - 2468, 2478, 2484, 2492, 2494, 2502, 2505, 2507, - 2510, 2512, 2519, 2521, 2529, 2530, 2551, 2555, - 2561, 2566, 2568, 2572, 2576, 2578, 2582, 2584, - 2587, 2591, 2593, 2600, 2602, 2606, 2610, 2614, - 2616, 2618, 2626, 2630, 2635, 2637, 2639, 2663, - 2666, 2667, 2669, 2671, 2675, 2678, 2679, 2684, - 2685, 2688, 2691, 2697, 2699, 2703, 2705, 2716, - 2725, 2730, 2732, 2736, 2738, 2740, 2741, 2743, - 2746, 2749, 2751, 2753, 2768, 2772, 2774, 2776, - 2781, 2785, 2791, 2793, 2795, 2799, 2803, 2805, - 2809, 2816, 2821, 2825, 2828, 2829, 2833, 2840, - 2847, 2848, 2849, 2851, 2860, 2862, 2864, 2866, - 2898, 2902, 2904, 2908, 2912, 2915, 2919, 2923, - 2926, 2928, 2934, 2947, 2949, 2952, 2954, 2956, - 2960, 2964, 2966, 2968, 2970, 2972, 2977, 2983, - 2986, 2988, 2992, 2996, 3003, 3006, 3012, 3014, - 3018, 3020, 3022, 3025, 3029, 3030, 3032, 3038, - 3044, 3050, 3052, 3056, 3060, 3065, 3070, 3080, - 3082, 3084, 3086, 3126, 3126, 3129, 3133, 3138, - 3140, 3148, 3150, 3152, 3154, 3156, 3158, 3160, - 3162, 3166, 3170, 3174, 3178, 3180, 3181, 3187, - 3189, 3191, 3193, 3200, 3201, 3203, 3209, 3212, - 3215, 3219, 3222, 3225, 3232, 3234, 3258, 3260, - 3284, 3286, 3288, 3311, 3313, 3315, 3316, 3318, - 3320, 3322, 3328, 3330, 3362, 3366, 3371, 3394, - 3396, 3398, 3400, 3402, 3405, 3407, 3409, 3413, - 3413, 3469, 3525, 3556, 3561, 3565, 3587, 3596, - 3601, 3605, 3615, 3622, 3625, 3636, 3639, 3646, - 3652, 3656, 3662, 3679, 3694, 3703, 3709, 3719, - 3723, 3727, 3731, 3735, 3737, 3757, 3763, 3768, - 3770, 3772, 3775, 3777, 3779, 3783, 3839, 3895, - 3928, 3933, 3941, 3945, 3947, 3952, 3959, 3967, - 3970, 3973, 3979, 3982, 3988, 3991, 3994, 3998, - 4001, 4005, 4008, 4012, 4054, 4061, 4069, 4078, - 4082, 4089, 4091, 4093, 4103, 4107, 4111, 4115, - 4119, 4123, 4127, 4131, 4137, 4147, 4155, 4160, - 4163, 4167, 4169, 4172, 4177, 4179, 4182, 4185, - 4189, 4192, 4195, 4202, 4204, 4206, 4208, 4210, - 4213, 4218, 4220, 4223, 4231, 4234, 4236, 4238, - 4241, 4271, 4279, 4281, 4285, 4288, 4293, 4298, - 4310, 4322, 4330, 4335, 4345, 4348, 4355, 4359, - 4367, 4377, 4383, 4391, 4393, 4401, 4404, 4406, - 4409, 4411, 4418, 4420, 4428, 4429, 4450, 4454, - 4460, 4465, 4467, 4471, 4475, 4477, 4481, 4483, - 4486, 4490, 4492, 4499, 4501, 4505, 4509, 4513, - 4515, 4517, 4525, 4529, 4534, 4536, 4538, 4562, - 4565, 4566, 4568, 4570, 4574, 4577, 4578, 4583, - 4584, 4587, 4590, 4596, 4598, 4602, 4604, 4615, - 4624, 4629, 4631, 4635, 4637, 4639, 4640, 4642, - 4645, 4648, 4650, 4652, 4667, 4671, 4673, 4675, - 4680, 4684, 4690, 4692, 4694, 4698, 4702, 4704, - 4708, 4715, 4720, 4724, 4727, 4728, 4732, 4739, - 4746, 4747, 4748, 4750, 4759, 4761, 4763, 4765, - 4797, 4801, 4803, 4807, 4811, 4814, 4818, 4822, - 4825, 4827, 4833, 4846, 4848, 4851, 4853, 4855, - 4859, 4863, 4865, 4867, 4869, 4871, 4876, 4882, - 4885, 4887, 4891, 4895, 4902, 4905, 4911, 4913, - 4917, 4919, 4921, 4924, 4928, 4929, 4931, 4937, - 4943, 4949, 4951, 4955, 4959, 4964, 4969, 4979, - 4981, 4983, 4985, 5025, 5025, 5028, 5032, 5037, - 5039, 5047, 5049, 5051, 5053, 5055, 5057, 5059, - 5061, 5065, 5069, 5073, 5077, 5079, 5080, 5086, - 5088, 5090, 5092, 5099, 5100, 5102, 5126, 5128, - 5152, 5154, 5156, 5179, 5181, 5183, 5184, 5186, - 5188, 5190, 5196, 5198, 5230, 5234, 5239, 5262, - 5264, 5266, 5268, 5270, 5273, 5275, 5277, 5281, - 5281, 5337, 5393, 5424, 5429, 5432, 5454, 5467, - 5469, 5471, 5473, 5476, 5481, 5483, 5486, 5494, - 5497, 5499, 5501, 5504, 5534, 5542, 5544, 5548, - 5551, 5556, 5561, 5573, 5585, 5593, 5598, 5608, - 5611, 5618, 5622, 5630, 5640, 5646, 5654, 5656, - 5664, 5667, 5669, 5672, 5674, 5681, 5683, 5691, - 5692, 5713, 5717, 5723, 5728, 5730, 5734, 5738, - 5740, 5744, 5746, 5749, 5753, 5755, 5762, 5764, - 5768, 5772, 5776, 5778, 5780, 5788, 5792, 5797, - 5799, 5801, 5803, 5804, 5806, 5808, 5810, 5812, - 5827, 5831, 5833, 5835, 5840, 5844, 5850, 5852, - 5854, 5858, 5862, 5864, 5868, 5875, 5880, 5884, - 5887, 5888, 5892, 5899, 5906, 5907, 5908, 5910, - 5919, 5921, 5923, 5925, 5957, 5961, 5963, 5967, - 5971, 5974, 5978, 5982, 5985, 5987, 5993, 6006, - 6008, 6011, 6013, 6015, 6019, 6023, 6025, 6027, - 6029, 6031, 6036, 6042, 6045, 6047, 6051, 6055, - 6062, 6065, 6071, 6073, 6077, 6079, 6081, 6084, - 6088, 6089, 6091, 6097, 6103, 6109, 6111, 6115, - 6119, 6124, 6129, 6139, 6141, 6143, 6145, 6146, - 6148, 6149, 6155, 6157, 6159, 6159, 6166, 6170, - 6180, 6187, 6190, 6201, 6204, 6211, 6217, 6221, - 6227, 6244, 6259, 6268, 6274, 6284, 6288, 6292, - 6296, 6300, 6302, 6322, 6328, 6333, 6335, 6337, - 6340, 6342, 6344, 6348, 6404, 6460, 6493, 6498, - 6506, 6510, 6513, 6520, 6527, 6535, 6538, 6541, - 6547, 6550, 6556, 6559, 6562, 6568, 6571, 6577, - 6580, 6586, 6628, 6635, 6643, 6652, 6656, 6658, - 6660, 6662, 6665, 6670, 6672, 6675, 6683, 6686, - 6688, 6690, 6693, 6723, 6731, 6733, 6737, 6740, - 6745, 6750, 6762, 6774, 6782, 6787, 6797, 6800, - 6807, 6811, 6819, 6829, 6835, 6843, 6845, 6853, - 6856, 6858, 6861, 6863, 6870, 6872, 6880, 6881, - 6902, 6906, 6912, 6917, 6919, 6923, 6927, 6929, - 6933, 6935, 6938, 6942, 6944, 6951, 6953, 6957, - 6961, 6965, 6967, 6969, 6977, 6981, 6986, 6988, - 6990, 7014, 7017, 7018, 7020, 7022, 7026, 7029, - 7030, 7035, 7036, 7039, 7042, 7048, 7050, 7054, - 7056, 7067, 7076, 7081, 7083, 7087, 7089, 7091, - 7092, 7094, 7097, 7100, 7102, 7104, 7119, 7123, - 7125, 7127, 7132, 7136, 7142, 7144, 7146, 7150, - 7154, 7156, 7160, 7167, 7172, 7176, 7179, 7180, - 7184, 7191, 7198, 7199, 7200, 7202, 7211, 7213, - 7215, 7217, 7249, 7253, 7255, 7259, 7263, 7266, - 7270, 7274, 7277, 7279, 7285, 7298, 7300, 7303, - 7305, 7307, 7311, 7315, 7317, 7319, 7321, 7323, - 7328, 7334, 7337, 7339, 7343, 7347, 7354, 7357, - 7363, 7365, 7369, 7371, 7373, 7376, 7380, 7381, - 7383, 7389, 7395, 7401, 7403, 7407, 7411, 7416, - 7421, 7431, 7433, 7435, 7437, 7477, 7477, 7480, - 7484, 7489, 7491, 7499, 7501, 7503, 7505, 7507, - 7509, 7511, 7513, 7517, 7521, 7525, 7529, 7531, - 7532, 7538, 7540, 7542, 7544, 7551, 7552, 7554, - 7561, 7563, 7565, 7575, 7579, 7583, 7587, 7591, - 7595, 7599, 7603, 7609, 7619, 7627, 7632, 7635, - 7639, 7641, 7644, 7653, 7657, 7659, 7661, 7665, - 7665, 7695, 7715, 7735, 7756, 7779, 7799, 7819, - 7840, 7863, 7884, 7905, 7926, 7946, 7969, 7989, - 8010, 8031, 8052, 8073, 8093, 8113, 8133, -} - -var _graphclust_trans_keys []byte = []byte{ - 10, 0, 127, 176, 255, 131, 137, 191, - 145, 189, 135, 129, 130, 132, 133, 144, - 154, 176, 139, 159, 150, 156, 159, 164, - 167, 168, 170, 173, 145, 176, 255, 139, - 255, 166, 176, 189, 171, 179, 160, 161, - 163, 164, 165, 167, 169, 171, 173, 174, - 175, 176, 177, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, - 166, 170, 172, 178, 150, 153, 155, 163, - 165, 167, 169, 173, 153, 155, 147, 161, - 163, 255, 189, 132, 185, 144, 152, 161, - 164, 255, 188, 129, 131, 190, 255, 133, - 134, 137, 138, 142, 150, 152, 161, 164, - 189, 191, 255, 131, 134, 137, 138, 142, - 144, 146, 175, 178, 180, 182, 255, 134, - 138, 142, 161, 164, 185, 192, 255, 188, - 129, 131, 190, 191, 128, 132, 135, 136, - 139, 141, 150, 151, 162, 163, 130, 190, - 191, 151, 128, 130, 134, 136, 138, 141, - 128, 132, 190, 255, 133, 137, 142, 148, - 151, 161, 164, 255, 128, 132, 134, 136, - 138, 141, 149, 150, 162, 163, 128, 131, - 187, 188, 190, 255, 133, 137, 142, 150, - 152, 161, 164, 255, 130, 131, 138, 150, - 143, 148, 152, 159, 178, 179, 177, 179, - 186, 135, 142, 177, 179, 188, 136, 141, - 181, 183, 185, 152, 153, 190, 191, 177, - 191, 128, 132, 134, 135, 141, 151, 153, - 188, 134, 128, 129, 130, 141, 156, 157, - 158, 159, 160, 162, 164, 168, 169, 170, - 172, 173, 174, 175, 176, 179, 183, 173, - 183, 185, 190, 150, 153, 158, 160, 177, - 180, 130, 141, 157, 132, 134, 157, 159, - 146, 148, 178, 180, 146, 147, 178, 179, - 180, 255, 148, 156, 158, 255, 139, 141, - 169, 133, 134, 160, 171, 176, 187, 151, - 155, 160, 162, 191, 149, 158, 165, 188, - 176, 190, 128, 132, 180, 255, 133, 170, - 180, 255, 128, 130, 161, 173, 166, 179, - 164, 183, 173, 180, 144, 146, 148, 168, - 183, 185, 128, 185, 187, 191, 128, 131, - 179, 181, 183, 140, 141, 144, 176, 175, - 177, 191, 160, 191, 128, 130, 170, 175, - 153, 154, 153, 154, 155, 160, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, - 175, 175, 178, 180, 189, 158, 159, 176, - 177, 130, 134, 139, 163, 167, 128, 129, - 180, 255, 134, 159, 178, 190, 192, 255, - 166, 173, 135, 147, 128, 131, 179, 255, - 129, 164, 166, 255, 169, 182, 131, 188, - 140, 141, 176, 178, 180, 183, 184, 190, - 191, 129, 171, 175, 181, 182, 163, 170, - 172, 173, 172, 184, 190, 158, 128, 143, - 160, 175, 144, 145, 150, 155, 157, 158, - 159, 135, 139, 141, 168, 171, 180, 189, - 189, 160, 182, 186, 191, 129, 131, 133, - 134, 140, 143, 184, 186, 165, 166, 164, - 167, 134, 144, 128, 129, 130, 132, 133, - 134, 135, 136, 139, 140, 141, 144, 145, - 146, 147, 150, 151, 152, 153, 154, 156, - 160, 167, 168, 169, 170, 176, 178, 180, - 181, 182, 187, 128, 130, 184, 255, 135, - 190, 131, 175, 187, 255, 128, 130, 167, - 180, 179, 133, 134, 128, 130, 179, 255, - 129, 136, 141, 255, 190, 172, 183, 159, - 170, 128, 131, 187, 188, 190, 191, 151, - 128, 132, 135, 136, 139, 141, 162, 163, - 166, 172, 176, 180, 181, 191, 158, 128, - 134, 176, 255, 132, 255, 175, 181, 184, - 255, 129, 155, 158, 255, 129, 255, 171, - 183, 157, 171, 172, 186, 164, 145, 151, - 154, 160, 129, 138, 179, 185, 187, 190, - 135, 145, 155, 138, 153, 175, 182, 184, - 191, 146, 167, 169, 182, 186, 177, 182, - 188, 189, 191, 255, 134, 136, 255, 138, - 142, 144, 145, 147, 151, 179, 182, 171, - 172, 189, 190, 176, 180, 176, 182, 143, - 145, 255, 136, 142, 147, 255, 178, 157, - 158, 133, 134, 137, 168, 169, 170, 165, - 169, 173, 178, 187, 255, 131, 132, 140, - 169, 174, 255, 130, 132, 128, 182, 187, - 255, 173, 180, 182, 255, 132, 155, 159, - 161, 175, 128, 132, 139, 163, 165, 128, - 134, 136, 152, 155, 161, 163, 164, 166, - 170, 172, 175, 144, 150, 132, 138, 143, - 187, 191, 160, 128, 129, 132, 135, 133, - 134, 160, 255, 192, 255, 128, 191, 169, - 173, 174, 128, 159, 160, 191, 128, 255, - 176, 255, 131, 137, 191, 145, 189, 135, - 129, 130, 132, 133, 144, 154, 176, 139, - 159, 150, 156, 159, 164, 167, 168, 170, - 173, 145, 176, 255, 139, 255, 166, 176, - 189, 171, 179, 160, 161, 163, 164, 165, - 167, 169, 171, 173, 174, 175, 176, 177, - 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 166, 170, 172, - 178, 150, 153, 155, 163, 165, 167, 169, - 173, 153, 155, 147, 161, 163, 255, 189, - 132, 185, 144, 152, 161, 164, 255, 188, - 129, 131, 190, 255, 133, 134, 137, 138, - 142, 150, 152, 161, 164, 189, 191, 255, - 131, 134, 137, 138, 142, 144, 146, 175, - 178, 180, 182, 255, 134, 138, 142, 161, - 164, 185, 192, 255, 188, 129, 131, 190, - 191, 128, 132, 135, 136, 139, 141, 150, - 151, 162, 163, 130, 190, 191, 151, 128, - 130, 134, 136, 138, 141, 128, 132, 190, - 255, 133, 137, 142, 148, 151, 161, 164, - 255, 128, 132, 134, 136, 138, 141, 149, - 150, 162, 163, 128, 131, 187, 188, 190, - 255, 133, 137, 142, 150, 152, 161, 164, - 255, 130, 131, 138, 150, 143, 148, 152, - 159, 178, 179, 177, 179, 186, 135, 142, - 177, 179, 188, 136, 141, 181, 183, 185, - 152, 153, 190, 191, 177, 191, 128, 132, - 134, 135, 141, 151, 153, 188, 134, 128, - 129, 130, 141, 156, 157, 158, 159, 160, - 162, 164, 168, 169, 170, 172, 173, 174, - 175, 176, 179, 183, 173, 183, 185, 190, - 150, 153, 158, 160, 177, 180, 130, 141, - 157, 132, 134, 157, 159, 146, 148, 178, - 180, 146, 147, 178, 179, 180, 255, 148, - 156, 158, 255, 139, 141, 169, 133, 134, - 160, 171, 176, 187, 151, 155, 160, 162, - 191, 149, 158, 165, 188, 176, 190, 128, - 132, 180, 255, 133, 170, 180, 255, 128, - 130, 161, 173, 166, 179, 164, 183, 173, - 180, 144, 146, 148, 168, 183, 185, 128, - 185, 187, 191, 128, 131, 179, 181, 183, - 140, 141, 169, 174, 128, 129, 131, 132, - 134, 140, 142, 143, 147, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 164, 172, - 173, 179, 181, 183, 140, 141, 188, 137, - 144, 176, 162, 185, 148, 153, 169, 170, - 168, 154, 155, 136, 143, 169, 179, 184, - 186, 130, 182, 170, 171, 128, 187, 190, - 128, 133, 135, 146, 148, 255, 192, 255, - 128, 133, 144, 191, 128, 191, 148, 150, - 157, 161, 168, 128, 133, 136, 146, 179, - 180, 132, 135, 140, 142, 151, 147, 149, - 163, 167, 161, 176, 191, 149, 151, 180, - 181, 133, 135, 155, 156, 144, 149, 175, - 177, 191, 160, 191, 128, 130, 138, 189, - 170, 176, 153, 154, 151, 153, 153, 154, - 155, 160, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 175, 175, 178, 180, - 189, 158, 159, 176, 177, 130, 134, 139, - 163, 167, 128, 129, 180, 255, 134, 159, - 178, 190, 192, 255, 166, 173, 135, 147, - 128, 131, 179, 255, 129, 164, 166, 255, - 169, 182, 131, 188, 140, 141, 176, 178, - 180, 183, 184, 190, 191, 129, 171, 175, - 181, 182, 163, 170, 172, 173, 172, 184, - 190, 158, 128, 143, 160, 175, 144, 145, - 150, 155, 157, 158, 159, 135, 139, 141, - 168, 171, 180, 189, 189, 160, 182, 186, - 191, 129, 131, 133, 134, 140, 143, 184, - 186, 165, 166, 164, 167, 134, 144, 128, - 129, 130, 132, 133, 134, 135, 136, 139, - 140, 141, 144, 145, 146, 147, 150, 151, - 152, 153, 154, 156, 160, 167, 168, 169, - 170, 176, 178, 180, 181, 182, 187, 128, - 130, 184, 255, 135, 190, 131, 175, 187, - 255, 128, 130, 167, 180, 179, 133, 134, - 128, 130, 179, 255, 129, 136, 141, 255, - 190, 172, 183, 159, 170, 128, 131, 187, - 188, 190, 191, 151, 128, 132, 135, 136, - 139, 141, 162, 163, 166, 172, 176, 180, - 181, 191, 158, 128, 134, 176, 255, 132, - 255, 175, 181, 184, 255, 129, 155, 158, - 255, 129, 255, 171, 183, 157, 171, 172, - 186, 164, 145, 151, 154, 160, 129, 138, - 179, 185, 187, 190, 135, 145, 155, 138, - 153, 175, 182, 184, 191, 146, 167, 169, - 182, 186, 177, 182, 188, 189, 191, 255, - 134, 136, 255, 138, 142, 144, 145, 147, - 151, 179, 182, 171, 172, 189, 190, 176, - 180, 176, 182, 143, 145, 255, 136, 142, - 147, 255, 178, 157, 158, 133, 134, 137, - 168, 169, 170, 165, 169, 173, 178, 187, - 255, 131, 132, 140, 169, 174, 255, 130, - 132, 128, 182, 187, 255, 173, 180, 182, - 255, 132, 155, 159, 161, 175, 128, 132, - 139, 163, 165, 128, 134, 136, 152, 155, - 161, 163, 164, 166, 170, 172, 175, 144, - 150, 132, 138, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 141, 143, - 144, 146, 147, 148, 149, 150, 151, 153, - 155, 157, 159, 160, 161, 162, 163, 164, - 165, 169, 191, 128, 154, 166, 167, 168, - 170, 171, 190, 175, 141, 143, 172, 177, - 190, 191, 142, 145, 154, 173, 255, 166, - 255, 154, 175, 129, 143, 178, 186, 188, - 191, 137, 255, 128, 189, 134, 255, 144, - 255, 180, 191, 149, 191, 140, 143, 136, - 143, 154, 159, 136, 143, 174, 255, 140, - 186, 188, 191, 128, 133, 135, 191, 190, - 255, 160, 128, 129, 132, 135, 133, 134, - 160, 255, 128, 130, 170, 175, 144, 145, - 150, 155, 157, 158, 159, 143, 187, 191, - 156, 128, 133, 134, 191, 128, 255, 176, - 255, 131, 137, 191, 145, 189, 135, 129, - 130, 132, 133, 144, 154, 176, 139, 159, - 150, 156, 159, 164, 167, 168, 170, 173, - 145, 176, 255, 139, 255, 166, 176, 189, - 171, 179, 160, 161, 163, 164, 165, 167, - 169, 171, 173, 174, 175, 176, 177, 179, - 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 166, 170, 172, 178, - 150, 153, 155, 163, 165, 167, 169, 173, - 153, 155, 147, 161, 163, 255, 189, 132, - 185, 144, 152, 161, 164, 255, 188, 129, - 131, 190, 255, 133, 134, 137, 138, 142, - 150, 152, 161, 164, 189, 191, 255, 131, - 134, 137, 138, 142, 144, 146, 175, 178, - 180, 182, 255, 134, 138, 142, 161, 164, - 185, 192, 255, 188, 129, 131, 190, 191, - 128, 132, 135, 136, 139, 141, 150, 151, - 162, 163, 130, 190, 191, 151, 128, 130, - 134, 136, 138, 141, 128, 132, 190, 255, - 133, 137, 142, 148, 151, 161, 164, 255, - 128, 132, 134, 136, 138, 141, 149, 150, - 162, 163, 128, 131, 187, 188, 190, 255, - 133, 137, 142, 150, 152, 161, 164, 255, - 130, 131, 138, 150, 143, 148, 152, 159, - 178, 179, 177, 179, 186, 135, 142, 177, - 179, 188, 136, 141, 181, 183, 185, 152, - 153, 190, 191, 177, 191, 128, 132, 134, - 135, 141, 151, 153, 188, 134, 128, 129, - 130, 141, 156, 157, 158, 159, 160, 162, - 164, 168, 169, 170, 172, 173, 174, 175, - 176, 179, 183, 173, 183, 185, 190, 150, - 153, 158, 160, 177, 180, 130, 141, 157, - 132, 134, 157, 159, 146, 148, 178, 180, - 146, 147, 178, 179, 180, 255, 148, 156, - 158, 255, 139, 141, 169, 133, 134, 160, - 171, 176, 187, 151, 155, 160, 162, 191, - 149, 158, 165, 188, 176, 190, 128, 132, - 180, 255, 133, 170, 180, 255, 128, 130, - 161, 173, 166, 179, 164, 183, 173, 180, - 144, 146, 148, 168, 183, 185, 128, 185, - 187, 191, 128, 131, 179, 181, 183, 140, - 141, 144, 176, 175, 177, 191, 160, 191, - 128, 130, 170, 175, 153, 154, 153, 154, - 155, 160, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 175, 175, 178, 180, - 189, 158, 159, 176, 177, 130, 134, 139, - 163, 167, 128, 129, 180, 255, 134, 159, - 178, 190, 192, 255, 166, 173, 135, 147, - 128, 131, 179, 255, 129, 164, 166, 255, - 169, 182, 131, 188, 140, 141, 176, 178, - 180, 183, 184, 190, 191, 129, 171, 175, - 181, 182, 163, 170, 172, 173, 172, 184, - 190, 158, 128, 143, 160, 175, 144, 145, - 150, 155, 157, 158, 159, 135, 139, 141, - 168, 171, 180, 189, 189, 160, 182, 186, - 191, 129, 131, 133, 134, 140, 143, 184, - 186, 165, 166, 164, 167, 134, 144, 128, - 129, 130, 132, 133, 134, 135, 136, 139, - 140, 141, 144, 145, 146, 147, 150, 151, - 152, 153, 154, 156, 160, 167, 168, 169, - 170, 176, 178, 180, 181, 182, 187, 128, - 130, 184, 255, 135, 190, 131, 175, 187, - 255, 128, 130, 167, 180, 179, 133, 134, - 128, 130, 179, 255, 129, 136, 141, 255, - 190, 172, 183, 159, 170, 128, 131, 187, - 188, 190, 191, 151, 128, 132, 135, 136, - 139, 141, 162, 163, 166, 172, 176, 180, - 181, 191, 158, 128, 134, 176, 255, 132, - 255, 175, 181, 184, 255, 129, 155, 158, - 255, 129, 255, 171, 183, 157, 171, 172, - 186, 164, 145, 151, 154, 160, 129, 138, - 179, 185, 187, 190, 135, 145, 155, 138, - 153, 175, 182, 184, 191, 146, 167, 169, - 182, 186, 177, 182, 188, 189, 191, 255, - 134, 136, 255, 138, 142, 144, 145, 147, - 151, 179, 182, 171, 172, 189, 190, 176, - 180, 176, 182, 143, 145, 255, 136, 142, - 147, 255, 178, 157, 158, 133, 134, 137, - 168, 169, 170, 165, 169, 173, 178, 187, - 255, 131, 132, 140, 169, 174, 255, 130, - 132, 128, 182, 187, 255, 173, 180, 182, - 255, 132, 155, 159, 161, 175, 128, 132, - 139, 163, 165, 128, 134, 136, 152, 155, - 161, 163, 164, 166, 170, 172, 175, 144, - 150, 132, 138, 143, 187, 191, 160, 128, - 129, 132, 135, 133, 134, 160, 255, 192, - 255, 128, 191, 169, 174, 160, 172, 175, - 191, 128, 255, 176, 255, 131, 137, 191, - 145, 189, 135, 129, 130, 132, 133, 144, - 154, 176, 139, 159, 150, 156, 159, 164, - 167, 168, 170, 173, 145, 176, 255, 139, - 255, 166, 176, 189, 171, 179, 160, 161, - 163, 164, 165, 167, 169, 171, 173, 174, - 175, 176, 177, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, - 166, 170, 172, 178, 150, 153, 155, 163, - 165, 167, 169, 173, 153, 155, 147, 161, - 163, 255, 189, 132, 185, 144, 152, 161, - 164, 255, 188, 129, 131, 190, 255, 133, - 134, 137, 138, 142, 150, 152, 161, 164, - 189, 191, 255, 131, 134, 137, 138, 142, - 144, 146, 175, 178, 180, 182, 255, 134, - 138, 142, 161, 164, 185, 192, 255, 188, - 129, 131, 190, 191, 128, 132, 135, 136, - 139, 141, 150, 151, 162, 163, 130, 190, - 191, 151, 128, 130, 134, 136, 138, 141, - 128, 132, 190, 255, 133, 137, 142, 148, - 151, 161, 164, 255, 128, 132, 134, 136, - 138, 141, 149, 150, 162, 163, 128, 131, - 187, 188, 190, 255, 133, 137, 142, 150, - 152, 161, 164, 255, 130, 131, 138, 150, - 143, 148, 152, 159, 178, 179, 177, 179, - 186, 135, 142, 177, 179, 188, 136, 141, - 181, 183, 185, 152, 153, 190, 191, 177, - 191, 128, 132, 134, 135, 141, 151, 153, - 188, 134, 128, 129, 130, 141, 156, 157, - 158, 159, 160, 162, 164, 168, 169, 170, - 172, 173, 174, 175, 176, 179, 183, 173, - 183, 185, 190, 150, 153, 158, 160, 177, - 180, 130, 141, 157, 132, 134, 157, 159, - 146, 148, 178, 180, 146, 147, 178, 179, - 180, 255, 148, 156, 158, 255, 139, 141, - 169, 133, 134, 160, 171, 176, 187, 151, - 155, 160, 162, 191, 149, 158, 165, 188, - 176, 190, 128, 132, 180, 255, 133, 170, - 180, 255, 128, 130, 161, 173, 166, 179, - 164, 183, 173, 180, 144, 146, 148, 168, - 183, 185, 128, 185, 187, 191, 128, 131, - 179, 181, 183, 140, 141, 169, 174, 128, - 129, 131, 132, 134, 140, 142, 143, 147, - 150, 151, 152, 153, 154, 155, 156, 157, - 158, 164, 172, 173, 179, 181, 183, 140, - 141, 188, 137, 144, 176, 162, 185, 148, - 153, 169, 170, 168, 154, 155, 136, 143, - 169, 179, 184, 186, 130, 182, 170, 171, - 128, 187, 190, 128, 133, 135, 146, 148, - 255, 192, 255, 128, 133, 144, 191, 128, - 191, 148, 150, 157, 161, 168, 128, 133, - 136, 146, 179, 180, 132, 135, 140, 142, - 151, 147, 149, 163, 167, 161, 176, 191, - 149, 151, 180, 181, 133, 135, 155, 156, - 144, 149, 175, 177, 191, 160, 191, 128, - 130, 138, 189, 170, 176, 153, 154, 151, - 153, 153, 154, 155, 160, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 175, - 175, 178, 180, 189, 158, 159, 176, 177, - 130, 134, 139, 163, 167, 128, 129, 180, - 255, 134, 159, 178, 190, 192, 255, 166, - 173, 135, 147, 128, 131, 179, 255, 129, - 164, 166, 255, 169, 182, 131, 188, 140, - 141, 176, 178, 180, 183, 184, 190, 191, - 129, 171, 175, 181, 182, 163, 170, 172, - 173, 172, 184, 190, 158, 128, 143, 160, - 175, 144, 145, 150, 155, 157, 158, 159, - 135, 139, 141, 168, 171, 180, 189, 189, - 160, 182, 186, 191, 129, 131, 133, 134, - 140, 143, 184, 186, 165, 166, 164, 167, - 134, 144, 128, 129, 130, 132, 133, 134, - 135, 136, 139, 140, 141, 144, 145, 146, - 147, 150, 151, 152, 153, 154, 156, 160, - 167, 168, 169, 170, 176, 178, 180, 181, - 182, 187, 128, 130, 184, 255, 135, 190, - 131, 175, 187, 255, 128, 130, 167, 180, - 179, 133, 134, 128, 130, 179, 255, 129, - 136, 141, 255, 190, 172, 183, 159, 170, - 128, 131, 187, 188, 190, 191, 151, 128, - 132, 135, 136, 139, 141, 162, 163, 166, - 172, 176, 180, 181, 191, 158, 128, 134, - 176, 255, 132, 255, 175, 181, 184, 255, - 129, 155, 158, 255, 129, 255, 171, 183, - 157, 171, 172, 186, 164, 145, 151, 154, - 160, 129, 138, 179, 185, 187, 190, 135, - 145, 155, 138, 153, 175, 182, 184, 191, - 146, 167, 169, 182, 186, 177, 182, 188, - 189, 191, 255, 134, 136, 255, 138, 142, - 144, 145, 147, 151, 179, 182, 171, 172, - 189, 190, 176, 180, 176, 182, 143, 145, - 255, 136, 142, 147, 255, 178, 157, 158, - 133, 134, 137, 168, 169, 170, 165, 169, - 173, 178, 187, 255, 131, 132, 140, 169, - 174, 255, 130, 132, 128, 182, 187, 255, - 173, 180, 182, 255, 132, 155, 159, 161, - 175, 128, 132, 139, 163, 165, 128, 134, - 136, 152, 155, 161, 163, 164, 166, 170, - 172, 175, 144, 150, 132, 138, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, - 139, 141, 143, 144, 146, 147, 148, 149, - 150, 151, 153, 155, 157, 159, 160, 161, - 162, 163, 164, 165, 169, 191, 128, 154, - 166, 167, 168, 170, 171, 190, 175, 141, - 143, 172, 177, 190, 191, 142, 145, 154, - 173, 255, 166, 255, 154, 175, 129, 143, - 178, 186, 188, 191, 137, 255, 128, 189, - 134, 255, 144, 255, 180, 191, 149, 191, - 140, 143, 136, 143, 154, 159, 136, 143, - 174, 255, 140, 186, 188, 191, 128, 133, - 135, 191, 190, 255, 160, 128, 129, 132, - 135, 133, 134, 160, 255, 128, 130, 170, - 175, 144, 145, 150, 155, 157, 158, 159, - 143, 187, 191, 128, 133, 134, 155, 157, - 191, 157, 128, 191, 143, 128, 191, 163, - 181, 128, 191, 162, 128, 191, 142, 128, - 191, 132, 133, 134, 135, 160, 128, 191, - 128, 255, 128, 129, 130, 132, 133, 134, - 141, 156, 157, 158, 159, 160, 162, 164, - 168, 169, 170, 172, 173, 174, 175, 176, - 179, 183, 160, 255, 128, 129, 130, 133, - 134, 135, 141, 156, 157, 158, 159, 160, - 162, 164, 168, 169, 170, 172, 173, 174, - 175, 176, 179, 183, 160, 255, 168, 255, - 128, 129, 130, 134, 135, 141, 156, 157, - 158, 159, 160, 162, 164, 168, 169, 170, - 172, 173, 174, 175, 176, 179, 183, 168, - 255, 192, 255, 159, 139, 187, 158, 159, - 176, 255, 135, 138, 139, 187, 188, 255, - 168, 255, 153, 154, 155, 160, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, - 175, 177, 178, 179, 180, 181, 182, 184, - 185, 186, 187, 188, 189, 191, 176, 190, - 192, 255, 135, 147, 160, 188, 128, 156, - 184, 129, 255, 128, 129, 130, 133, 134, - 141, 156, 157, 158, 159, 160, 162, 164, - 168, 169, 170, 172, 173, 174, 175, 176, - 179, 183, 158, 159, 135, 255, 148, 176, - 140, 168, 132, 160, 188, 152, 180, 144, - 172, 136, 164, 192, 255, 129, 130, 131, - 132, 133, 134, 136, 137, 138, 139, 140, - 141, 143, 144, 145, 146, 147, 148, 150, - 151, 152, 153, 154, 155, 157, 158, 159, - 160, 161, 162, 164, 165, 166, 167, 168, - 169, 171, 172, 173, 174, 175, 176, 178, - 179, 180, 181, 182, 183, 185, 186, 187, - 188, 189, 190, 128, 191, 129, 130, 131, - 132, 133, 134, 136, 137, 138, 139, 140, - 141, 143, 144, 145, 146, 147, 148, 150, - 151, 152, 153, 154, 155, 157, 158, 159, - 160, 161, 162, 164, 165, 166, 167, 168, - 169, 171, 172, 173, 174, 175, 176, 178, - 179, 180, 181, 182, 183, 185, 186, 187, - 188, 189, 190, 128, 191, 129, 130, 131, - 132, 133, 134, 136, 137, 138, 139, 140, - 141, 143, 144, 145, 146, 147, 148, 150, - 151, 152, 153, 154, 155, 157, 158, 159, - 128, 156, 160, 255, 136, 164, 175, 176, - 255, 128, 141, 143, 191, 128, 129, 132, - 134, 140, 142, 143, 147, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 164, 172, - 173, 130, 191, 188, 128, 138, 140, 141, - 144, 167, 175, 191, 137, 128, 159, 176, - 191, 162, 185, 128, 191, 128, 147, 148, - 153, 154, 168, 169, 170, 171, 191, 168, - 128, 153, 154, 155, 156, 191, 136, 128, - 191, 143, 128, 168, 169, 179, 180, 183, - 184, 186, 187, 191, 130, 128, 191, 182, - 128, 169, 170, 171, 172, 191, 128, 191, - 129, 186, 187, 190, 134, 147, 128, 255, - 128, 133, 134, 143, 144, 191, 147, 149, - 157, 161, 168, 128, 133, 134, 135, 136, - 150, 151, 178, 179, 180, 181, 191, 132, - 135, 140, 142, 150, 128, 146, 147, 151, - 152, 162, 163, 167, 168, 191, 161, 176, - 191, 128, 148, 149, 151, 152, 190, 128, - 179, 180, 181, 182, 191, 128, 132, 133, - 135, 136, 154, 155, 156, 157, 191, 144, - 149, 128, 191, 128, 138, 129, 191, 176, - 189, 128, 191, 151, 153, 128, 191, 128, - 191, 165, 177, 178, 179, 180, 181, 182, - 184, 185, 186, 187, 188, 189, 191, 128, - 175, 176, 190, 192, 255, 128, 159, 160, - 188, 189, 191, 128, 156, 184, 129, 255, - 148, 176, 140, 168, 132, 160, 188, 152, - 180, 144, 172, 136, 164, 192, 255, 129, - 130, 131, 132, 133, 134, 136, 137, 138, - 139, 140, 141, 143, 144, 145, 146, 147, - 148, 150, 151, 152, 153, 154, 155, 157, - 158, 159, 160, 161, 162, 164, 165, 166, - 167, 168, 169, 171, 172, 173, 174, 175, - 176, 178, 179, 180, 181, 182, 183, 185, - 186, 187, 188, 189, 190, 128, 191, 129, - 130, 131, 132, 133, 134, 136, 137, 138, - 139, 140, 141, 143, 144, 145, 146, 147, - 148, 150, 151, 152, 153, 154, 155, 157, - 158, 159, 160, 161, 162, 164, 165, 166, - 167, 168, 169, 171, 172, 173, 174, 175, - 176, 178, 179, 180, 181, 182, 183, 185, - 186, 187, 188, 189, 190, 128, 191, 129, - 130, 131, 132, 133, 134, 136, 137, 138, - 139, 140, 141, 143, 144, 145, 146, 147, - 148, 150, 151, 152, 153, 154, 155, 157, - 158, 159, 128, 156, 160, 191, 192, 255, - 136, 164, 175, 176, 255, 135, 138, 139, - 187, 188, 191, 192, 255, 187, 191, 128, - 190, 128, 190, 188, 128, 175, 190, 191, - 145, 147, 155, 157, 159, 128, 191, 130, - 131, 135, 168, 170, 181, 128, 191, 189, - 128, 191, 141, 128, 191, 128, 129, 130, - 131, 132, 191, 186, 128, 191, 128, 131, - 132, 137, 138, 191, 134, 128, 191, 144, - 128, 191, 128, 175, 185, 191, 178, 128, - 191, 128, 159, 164, 191, 133, 128, 191, - 128, 178, 187, 191, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 141, - 143, 144, 146, 147, 148, 149, 150, 151, - 153, 156, 157, 158, 159, 160, 161, 162, - 164, 165, 169, 191, 128, 154, 155, 163, - 166, 167, 168, 170, 171, 190, 175, 128, - 140, 141, 143, 144, 191, 128, 171, 172, - 177, 178, 189, 190, 191, 142, 128, 144, - 145, 154, 155, 172, 173, 255, 166, 191, - 192, 255, 144, 145, 150, 155, 157, 158, - 159, 135, 143, 166, 191, 128, 154, 175, - 187, 129, 143, 144, 177, 178, 191, 128, - 136, 137, 255, 187, 191, 192, 255, 128, - 189, 190, 191, 128, 133, 134, 255, 144, - 191, 192, 255, 128, 179, 180, 191, 128, - 148, 149, 191, 128, 139, 140, 143, 144, - 191, 128, 135, 136, 143, 144, 153, 154, - 159, 160, 191, 128, 135, 136, 143, 144, - 173, 174, 255, 187, 128, 139, 140, 191, - 134, 128, 191, 190, 191, 192, 255, 128, - 191, 160, 128, 191, 128, 129, 135, 132, - 134, 128, 175, 157, 128, 191, 143, 128, - 191, 163, 181, 128, 191, 162, 128, 191, - 142, 128, 191, 132, 133, 134, 135, 160, - 128, 191, 128, 255, 0, 127, 176, 255, - 131, 137, 191, 145, 189, 135, 129, 130, - 132, 133, 144, 154, 176, 139, 159, 150, - 156, 159, 164, 167, 168, 170, 173, 145, - 176, 255, 139, 255, 166, 176, 189, 171, - 179, 160, 161, 163, 164, 165, 167, 169, - 171, 173, 174, 175, 176, 177, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 166, 170, 172, 178, 150, - 153, 155, 163, 165, 167, 169, 173, 153, - 155, 147, 161, 163, 255, 189, 132, 185, - 144, 152, 161, 164, 255, 188, 129, 131, - 190, 255, 133, 134, 137, 138, 142, 150, - 152, 161, 164, 189, 191, 255, 131, 134, - 137, 138, 142, 144, 146, 175, 178, 180, - 182, 255, 134, 138, 142, 161, 164, 185, - 192, 255, 188, 129, 131, 190, 191, 128, - 132, 135, 136, 139, 141, 150, 151, 162, - 163, 130, 190, 191, 151, 128, 130, 134, - 136, 138, 141, 128, 132, 190, 255, 133, - 137, 142, 148, 151, 161, 164, 255, 128, - 132, 134, 136, 138, 141, 149, 150, 162, - 163, 128, 131, 187, 188, 190, 255, 133, - 137, 142, 150, 152, 161, 164, 255, 130, - 131, 138, 150, 143, 148, 152, 159, 178, - 179, 177, 179, 186, 135, 142, 177, 179, - 188, 136, 141, 181, 183, 185, 152, 153, - 190, 191, 177, 191, 128, 132, 134, 135, - 141, 151, 153, 188, 134, 128, 129, 130, - 141, 156, 157, 158, 159, 160, 162, 164, - 168, 169, 170, 172, 173, 174, 175, 176, - 179, 183, 173, 183, 185, 190, 150, 153, - 158, 160, 177, 180, 130, 141, 157, 132, - 134, 157, 159, 146, 148, 178, 180, 146, - 147, 178, 179, 180, 255, 148, 156, 158, - 255, 139, 141, 169, 133, 134, 160, 171, - 176, 187, 151, 155, 160, 162, 191, 149, - 158, 165, 188, 176, 190, 128, 132, 180, - 255, 133, 170, 180, 255, 128, 130, 161, - 173, 166, 179, 164, 183, 173, 180, 144, - 146, 148, 168, 183, 185, 128, 185, 187, - 191, 128, 131, 179, 181, 183, 140, 141, - 169, 174, 128, 129, 131, 132, 134, 140, - 142, 143, 147, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 164, 172, 173, 179, - 181, 183, 140, 141, 188, 137, 144, 176, - 162, 185, 148, 153, 169, 170, 168, 154, - 155, 136, 143, 169, 179, 184, 186, 130, - 182, 170, 171, 128, 187, 190, 128, 133, - 135, 146, 148, 255, 192, 255, 128, 133, - 144, 191, 128, 191, 148, 150, 157, 161, - 168, 128, 133, 136, 146, 179, 180, 132, - 135, 140, 142, 151, 147, 149, 163, 167, - 161, 176, 191, 149, 151, 180, 181, 133, - 135, 155, 156, 144, 149, 175, 177, 191, - 160, 191, 128, 130, 138, 189, 170, 176, - 153, 154, 151, 153, 153, 154, 155, 160, - 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 175, 175, 178, 180, 189, 158, - 159, 176, 177, 130, 134, 139, 163, 167, - 128, 129, 180, 255, 134, 159, 178, 190, - 192, 255, 166, 173, 135, 147, 128, 131, - 179, 255, 129, 164, 166, 255, 169, 182, - 131, 188, 140, 141, 176, 178, 180, 183, - 184, 190, 191, 129, 171, 175, 181, 182, - 163, 170, 172, 173, 172, 184, 190, 158, - 128, 143, 160, 175, 144, 145, 150, 155, - 157, 158, 159, 135, 139, 141, 168, 171, - 180, 189, 189, 160, 182, 186, 191, 129, - 131, 133, 134, 140, 143, 184, 186, 165, - 166, 164, 167, 134, 144, 128, 129, 130, - 132, 133, 134, 135, 136, 139, 140, 141, - 144, 145, 146, 147, 150, 151, 152, 153, - 154, 156, 160, 167, 168, 169, 170, 176, - 178, 180, 181, 182, 187, 128, 130, 184, - 255, 135, 190, 131, 175, 187, 255, 128, - 130, 167, 180, 179, 133, 134, 128, 130, - 179, 255, 129, 136, 141, 255, 190, 172, - 183, 159, 170, 128, 131, 187, 188, 190, - 191, 151, 128, 132, 135, 136, 139, 141, - 162, 163, 166, 172, 176, 180, 181, 191, - 158, 128, 134, 176, 255, 132, 255, 175, - 181, 184, 255, 129, 155, 158, 255, 129, - 255, 171, 183, 157, 171, 172, 186, 164, - 145, 151, 154, 160, 129, 138, 179, 185, - 187, 190, 135, 145, 155, 138, 153, 175, - 182, 184, 191, 146, 167, 169, 182, 186, - 177, 182, 188, 189, 191, 255, 134, 136, - 255, 138, 142, 144, 145, 147, 151, 179, - 182, 171, 172, 189, 190, 176, 180, 176, - 182, 143, 145, 255, 136, 142, 147, 255, - 178, 157, 158, 133, 134, 137, 168, 169, - 170, 165, 169, 173, 178, 187, 255, 131, - 132, 140, 169, 174, 255, 130, 132, 128, - 182, 187, 255, 173, 180, 182, 255, 132, - 155, 159, 161, 175, 128, 132, 139, 163, - 165, 128, 134, 136, 152, 155, 161, 163, - 164, 166, 170, 172, 175, 144, 150, 132, - 138, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 141, 143, 144, 146, - 147, 148, 149, 150, 151, 153, 155, 157, - 159, 160, 161, 162, 163, 164, 165, 169, - 191, 128, 154, 166, 167, 168, 170, 171, - 190, 175, 141, 143, 172, 177, 190, 191, - 142, 145, 154, 173, 255, 166, 255, 154, - 175, 129, 143, 178, 186, 188, 191, 137, - 255, 128, 189, 134, 255, 144, 255, 180, - 191, 149, 191, 140, 143, 136, 143, 154, - 159, 136, 143, 174, 255, 140, 186, 188, - 191, 128, 133, 135, 191, 190, 255, 160, - 128, 129, 132, 135, 133, 134, 160, 255, - 128, 130, 170, 175, 144, 145, 150, 155, - 157, 158, 159, 143, 187, 191, 128, 129, - 130, 132, 133, 134, 141, 156, 157, 158, - 159, 160, 162, 164, 168, 169, 170, 172, - 173, 174, 175, 176, 179, 183, 160, 255, - 128, 129, 130, 133, 134, 135, 141, 156, - 157, 158, 159, 160, 162, 164, 168, 169, - 170, 172, 173, 174, 175, 176, 179, 183, - 160, 255, 168, 255, 128, 129, 130, 134, - 135, 141, 156, 157, 158, 159, 160, 162, - 164, 168, 169, 170, 172, 173, 174, 175, - 176, 179, 183, 168, 255, 192, 255, 159, - 139, 187, 158, 159, 176, 255, 135, 138, - 139, 187, 188, 255, 168, 255, 153, 154, - 155, 160, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 175, 177, 178, 179, - 180, 181, 182, 184, 185, 186, 187, 188, - 189, 191, 176, 190, 192, 255, 135, 147, - 160, 188, 128, 156, 184, 129, 255, 128, - 129, 130, 133, 134, 141, 156, 157, 158, - 159, 160, 162, 164, 168, 169, 170, 172, - 173, 174, 175, 176, 179, 183, 158, 159, - 135, 255, 148, 176, 140, 168, 132, 160, - 188, 152, 180, 144, 172, 136, 164, 192, - 255, 129, 130, 131, 132, 133, 134, 136, - 137, 138, 139, 140, 141, 143, 144, 145, - 146, 147, 148, 150, 151, 152, 153, 154, - 155, 157, 158, 159, 160, 161, 162, 164, - 165, 166, 167, 168, 169, 171, 172, 173, - 174, 175, 176, 178, 179, 180, 181, 182, - 183, 185, 186, 187, 188, 189, 190, 128, - 191, 129, 130, 131, 132, 133, 134, 136, - 137, 138, 139, 140, 141, 143, 144, 145, - 146, 147, 148, 150, 151, 152, 153, 154, - 155, 157, 158, 159, 160, 161, 162, 164, - 165, 166, 167, 168, 169, 171, 172, 173, - 174, 175, 176, 178, 179, 180, 181, 182, - 183, 185, 186, 187, 188, 189, 190, 128, - 191, 129, 130, 131, 132, 133, 134, 136, - 137, 138, 139, 140, 141, 143, 144, 145, - 146, 147, 148, 150, 151, 152, 153, 154, - 155, 157, 158, 159, 128, 156, 160, 255, - 136, 164, 175, 176, 255, 142, 128, 191, - 128, 129, 132, 134, 140, 142, 143, 147, - 150, 151, 152, 153, 154, 155, 156, 157, - 158, 164, 172, 173, 130, 191, 139, 141, - 188, 128, 140, 142, 143, 144, 167, 168, - 174, 175, 191, 128, 255, 176, 255, 131, - 137, 191, 145, 189, 135, 129, 130, 132, - 133, 144, 154, 176, 139, 159, 150, 156, - 159, 164, 167, 168, 170, 173, 145, 176, - 255, 139, 255, 166, 176, 189, 171, 179, - 160, 161, 163, 164, 165, 167, 169, 171, - 173, 174, 175, 176, 177, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 166, 170, 172, 178, 150, 153, - 155, 163, 165, 167, 169, 173, 153, 155, - 147, 161, 163, 255, 189, 132, 185, 144, - 152, 161, 164, 255, 188, 129, 131, 190, - 255, 133, 134, 137, 138, 142, 150, 152, - 161, 164, 189, 191, 255, 131, 134, 137, - 138, 142, 144, 146, 175, 178, 180, 182, - 255, 134, 138, 142, 161, 164, 185, 192, - 255, 188, 129, 131, 190, 191, 128, 132, - 135, 136, 139, 141, 150, 151, 162, 163, - 130, 190, 191, 151, 128, 130, 134, 136, - 138, 141, 128, 132, 190, 255, 133, 137, - 142, 148, 151, 161, 164, 255, 128, 132, - 134, 136, 138, 141, 149, 150, 162, 163, - 128, 131, 187, 188, 190, 255, 133, 137, - 142, 150, 152, 161, 164, 255, 130, 131, - 138, 150, 143, 148, 152, 159, 178, 179, - 177, 179, 186, 135, 142, 177, 179, 188, - 136, 141, 181, 183, 185, 152, 153, 190, - 191, 177, 191, 128, 132, 134, 135, 141, - 151, 153, 188, 134, 128, 129, 130, 141, - 156, 157, 158, 159, 160, 162, 164, 168, - 169, 170, 172, 173, 174, 175, 176, 179, - 183, 173, 183, 185, 190, 150, 153, 158, - 160, 177, 180, 130, 141, 157, 132, 134, - 157, 159, 146, 148, 178, 180, 146, 147, - 178, 179, 180, 255, 148, 156, 158, 255, - 139, 141, 169, 133, 134, 160, 171, 176, - 187, 151, 155, 160, 162, 191, 149, 158, - 165, 188, 176, 190, 128, 132, 180, 255, - 133, 170, 180, 255, 128, 130, 161, 173, - 166, 179, 164, 183, 173, 180, 144, 146, - 148, 168, 183, 185, 128, 185, 187, 191, - 128, 131, 179, 181, 183, 140, 141, 144, - 176, 175, 177, 191, 160, 191, 128, 130, - 170, 175, 153, 154, 153, 154, 155, 160, - 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 175, 175, 178, 180, 189, 158, - 159, 176, 177, 130, 134, 139, 163, 167, - 128, 129, 180, 255, 134, 159, 178, 190, - 192, 255, 166, 173, 135, 147, 128, 131, - 179, 255, 129, 164, 166, 255, 169, 182, - 131, 188, 140, 141, 176, 178, 180, 183, - 184, 190, 191, 129, 171, 175, 181, 182, - 163, 170, 172, 173, 172, 184, 190, 158, - 128, 143, 160, 175, 144, 145, 150, 155, - 157, 158, 159, 135, 139, 141, 168, 171, - 180, 189, 189, 160, 182, 186, 191, 129, - 131, 133, 134, 140, 143, 184, 186, 165, - 166, 164, 167, 134, 144, 128, 129, 130, - 132, 133, 134, 135, 136, 139, 140, 141, - 144, 145, 146, 147, 150, 151, 152, 153, - 154, 156, 160, 167, 168, 169, 170, 176, - 178, 180, 181, 182, 187, 128, 130, 184, - 255, 135, 190, 131, 175, 187, 255, 128, - 130, 167, 180, 179, 133, 134, 128, 130, - 179, 255, 129, 136, 141, 255, 190, 172, - 183, 159, 170, 128, 131, 187, 188, 190, - 191, 151, 128, 132, 135, 136, 139, 141, - 162, 163, 166, 172, 176, 180, 181, 191, - 158, 128, 134, 176, 255, 132, 255, 175, - 181, 184, 255, 129, 155, 158, 255, 129, - 255, 171, 183, 157, 171, 172, 186, 164, - 145, 151, 154, 160, 129, 138, 179, 185, - 187, 190, 135, 145, 155, 138, 153, 175, - 182, 184, 191, 146, 167, 169, 182, 186, - 177, 182, 188, 189, 191, 255, 134, 136, - 255, 138, 142, 144, 145, 147, 151, 179, - 182, 171, 172, 189, 190, 176, 180, 176, - 182, 143, 145, 255, 136, 142, 147, 255, - 178, 157, 158, 133, 134, 137, 168, 169, - 170, 165, 169, 173, 178, 187, 255, 131, - 132, 140, 169, 174, 255, 130, 132, 128, - 182, 187, 255, 173, 180, 182, 255, 132, - 155, 159, 161, 175, 128, 132, 139, 163, - 165, 128, 134, 136, 152, 155, 161, 163, - 164, 166, 170, 172, 175, 144, 150, 132, - 138, 143, 187, 191, 160, 128, 129, 132, - 135, 133, 134, 160, 255, 192, 255, 137, - 128, 159, 160, 175, 176, 191, 162, 185, - 128, 191, 128, 147, 148, 153, 154, 168, - 169, 170, 171, 191, 168, 128, 153, 154, - 155, 156, 191, 136, 128, 191, 143, 128, - 168, 169, 179, 180, 183, 184, 186, 187, - 191, 130, 128, 191, 182, 128, 169, 170, - 171, 172, 191, 128, 191, 129, 186, 187, - 190, 134, 147, 128, 255, 128, 133, 134, - 143, 144, 191, 147, 149, 157, 161, 168, - 128, 133, 134, 135, 136, 150, 151, 178, - 179, 180, 181, 191, 132, 135, 140, 142, - 150, 128, 146, 147, 151, 152, 162, 163, - 167, 168, 191, 161, 176, 191, 128, 148, - 149, 151, 152, 190, 128, 179, 180, 181, - 182, 191, 128, 132, 133, 135, 136, 154, - 155, 156, 157, 191, 144, 149, 128, 191, - 128, 138, 129, 191, 176, 189, 128, 191, - 151, 153, 128, 191, 128, 191, 165, 177, - 178, 179, 180, 181, 182, 184, 185, 186, - 187, 188, 189, 191, 128, 175, 176, 190, - 192, 255, 128, 159, 160, 188, 189, 191, - 128, 156, 184, 129, 255, 148, 176, 140, - 168, 132, 160, 188, 152, 180, 144, 172, - 136, 164, 192, 255, 129, 130, 131, 132, - 133, 134, 136, 137, 138, 139, 140, 141, - 143, 144, 145, 146, 147, 148, 150, 151, - 152, 153, 154, 155, 157, 158, 159, 160, - 161, 162, 164, 165, 166, 167, 168, 169, - 171, 172, 173, 174, 175, 176, 178, 179, - 180, 181, 182, 183, 185, 186, 187, 188, - 189, 190, 128, 191, 129, 130, 131, 132, - 133, 134, 136, 137, 138, 139, 140, 141, - 143, 144, 145, 146, 147, 148, 150, 151, - 152, 153, 154, 155, 157, 158, 159, 160, - 161, 162, 164, 165, 166, 167, 168, 169, - 171, 172, 173, 174, 175, 176, 178, 179, - 180, 181, 182, 183, 185, 186, 187, 188, - 189, 190, 128, 191, 129, 130, 131, 132, - 133, 134, 136, 137, 138, 139, 140, 141, - 143, 144, 145, 146, 147, 148, 150, 151, - 152, 153, 154, 155, 157, 158, 159, 128, - 156, 160, 191, 192, 255, 136, 164, 175, - 176, 255, 135, 138, 139, 187, 188, 191, - 192, 255, 187, 191, 128, 190, 191, 128, - 190, 188, 128, 175, 176, 189, 190, 191, - 145, 147, 155, 157, 159, 128, 191, 130, - 131, 135, 168, 170, 181, 128, 191, 189, - 128, 191, 141, 128, 191, 128, 129, 130, - 131, 132, 191, 186, 128, 191, 128, 131, - 132, 137, 138, 191, 134, 128, 191, 144, - 128, 191, 128, 175, 176, 184, 185, 191, - 178, 128, 191, 128, 159, 160, 163, 164, - 191, 133, 128, 191, 128, 178, 179, 186, - 187, 191, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 141, 143, 144, - 146, 147, 148, 149, 150, 151, 153, 156, - 157, 158, 159, 160, 161, 162, 164, 165, - 169, 191, 128, 154, 155, 163, 166, 167, - 168, 170, 171, 190, 175, 128, 140, 141, - 143, 144, 191, 128, 171, 172, 177, 178, - 189, 190, 191, 142, 128, 144, 145, 154, - 155, 172, 173, 255, 166, 191, 192, 255, - 0, 127, 176, 255, 131, 137, 191, 145, - 189, 135, 129, 130, 132, 133, 144, 154, - 176, 139, 159, 150, 156, 159, 164, 167, - 168, 170, 173, 145, 176, 255, 139, 255, - 166, 176, 189, 171, 179, 160, 161, 163, - 164, 165, 167, 169, 171, 173, 174, 175, - 176, 177, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 166, - 170, 172, 178, 150, 153, 155, 163, 165, - 167, 169, 173, 153, 155, 147, 161, 163, - 255, 189, 132, 185, 144, 152, 161, 164, - 255, 188, 129, 131, 190, 255, 133, 134, - 137, 138, 142, 150, 152, 161, 164, 189, - 191, 255, 131, 134, 137, 138, 142, 144, - 146, 175, 178, 180, 182, 255, 134, 138, - 142, 161, 164, 185, 192, 255, 188, 129, - 131, 190, 191, 128, 132, 135, 136, 139, - 141, 150, 151, 162, 163, 130, 190, 191, - 151, 128, 130, 134, 136, 138, 141, 128, - 132, 190, 255, 133, 137, 142, 148, 151, - 161, 164, 255, 128, 132, 134, 136, 138, - 141, 149, 150, 162, 163, 128, 131, 187, - 188, 190, 255, 133, 137, 142, 150, 152, - 161, 164, 255, 130, 131, 138, 150, 143, - 148, 152, 159, 178, 179, 177, 179, 186, - 135, 142, 177, 179, 188, 136, 141, 181, - 183, 185, 152, 153, 190, 191, 177, 191, - 128, 132, 134, 135, 141, 151, 153, 188, - 134, 128, 129, 130, 141, 156, 157, 158, - 159, 160, 162, 164, 168, 169, 170, 172, - 173, 174, 175, 176, 179, 183, 173, 183, - 185, 190, 150, 153, 158, 160, 177, 180, - 130, 141, 157, 132, 134, 157, 159, 146, - 148, 178, 180, 146, 147, 178, 179, 180, - 255, 148, 156, 158, 255, 139, 141, 169, - 133, 134, 160, 171, 176, 187, 151, 155, - 160, 162, 191, 149, 158, 165, 188, 176, - 190, 128, 132, 180, 255, 133, 170, 180, - 255, 128, 130, 161, 173, 166, 179, 164, - 183, 173, 180, 144, 146, 148, 168, 183, - 185, 128, 185, 187, 191, 128, 131, 179, - 181, 183, 140, 141, 169, 174, 128, 129, - 131, 132, 134, 140, 142, 143, 147, 150, - 151, 152, 153, 154, 155, 156, 157, 158, - 164, 172, 173, 179, 181, 183, 140, 141, - 188, 137, 144, 176, 162, 185, 148, 153, - 169, 170, 168, 154, 155, 136, 143, 169, - 179, 184, 186, 130, 182, 170, 171, 128, - 187, 190, 128, 133, 135, 146, 148, 255, - 192, 255, 128, 133, 144, 191, 128, 191, - 148, 150, 157, 161, 168, 128, 133, 136, - 146, 179, 180, 132, 135, 140, 142, 151, - 147, 149, 163, 167, 161, 176, 191, 149, - 151, 180, 181, 133, 135, 155, 156, 144, - 149, 175, 177, 191, 160, 191, 128, 130, - 138, 189, 170, 176, 153, 154, 151, 153, - 153, 154, 155, 160, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 175, 175, - 178, 180, 189, 158, 159, 176, 177, 130, - 134, 139, 163, 167, 128, 129, 180, 255, - 134, 159, 178, 190, 192, 255, 166, 173, - 135, 147, 128, 131, 179, 255, 129, 164, - 166, 255, 169, 182, 131, 188, 140, 141, - 176, 178, 180, 183, 184, 190, 191, 129, - 171, 175, 181, 182, 163, 170, 172, 173, - 172, 184, 190, 158, 128, 143, 160, 175, - 144, 145, 150, 155, 157, 158, 159, 135, - 139, 141, 168, 171, 180, 189, 189, 160, - 182, 186, 191, 129, 131, 133, 134, 140, - 143, 184, 186, 165, 166, 164, 167, 134, - 144, 128, 129, 130, 132, 133, 134, 135, - 136, 139, 140, 141, 144, 145, 146, 147, - 150, 151, 152, 153, 154, 156, 160, 167, - 168, 169, 170, 176, 178, 180, 181, 182, - 187, 128, 130, 184, 255, 135, 190, 131, - 175, 187, 255, 128, 130, 167, 180, 179, - 133, 134, 128, 130, 179, 255, 129, 136, - 141, 255, 190, 172, 183, 159, 170, 128, - 131, 187, 188, 190, 191, 151, 128, 132, - 135, 136, 139, 141, 162, 163, 166, 172, - 176, 180, 181, 191, 158, 128, 134, 176, - 255, 132, 255, 175, 181, 184, 255, 129, - 155, 158, 255, 129, 255, 171, 183, 157, - 171, 172, 186, 164, 145, 151, 154, 160, - 129, 138, 179, 185, 187, 190, 135, 145, - 155, 138, 153, 175, 182, 184, 191, 146, - 167, 169, 182, 186, 177, 182, 188, 189, - 191, 255, 134, 136, 255, 138, 142, 144, - 145, 147, 151, 179, 182, 171, 172, 189, - 190, 176, 180, 176, 182, 143, 145, 255, - 136, 142, 147, 255, 178, 157, 158, 133, - 134, 137, 168, 169, 170, 165, 169, 173, - 178, 187, 255, 131, 132, 140, 169, 174, - 255, 130, 132, 128, 182, 187, 255, 173, - 180, 182, 255, 132, 155, 159, 161, 175, - 128, 132, 139, 163, 165, 128, 134, 136, - 152, 155, 161, 163, 164, 166, 170, 172, - 175, 144, 150, 132, 138, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, - 141, 143, 144, 146, 147, 148, 149, 150, - 151, 153, 155, 157, 159, 160, 161, 162, - 163, 164, 165, 169, 191, 128, 154, 166, - 167, 168, 170, 171, 190, 175, 141, 143, - 172, 177, 190, 191, 142, 145, 154, 173, - 255, 166, 255, 154, 175, 129, 143, 178, - 186, 188, 191, 137, 255, 128, 189, 134, - 255, 144, 255, 180, 191, 149, 191, 140, - 143, 136, 143, 154, 159, 136, 143, 174, - 255, 140, 186, 188, 191, 128, 133, 135, - 191, 190, 255, 160, 128, 129, 132, 135, - 133, 134, 160, 255, 128, 130, 170, 175, - 144, 145, 150, 155, 157, 158, 159, 143, - 187, 191, 144, 145, 150, 155, 157, 158, - 159, 135, 143, 166, 191, 128, 154, 175, - 187, 129, 143, 144, 177, 178, 191, 128, - 136, 137, 255, 187, 191, 192, 255, 128, - 189, 190, 191, 128, 133, 134, 255, 144, - 191, 192, 255, 128, 179, 180, 191, 128, - 148, 149, 191, 128, 139, 140, 143, 144, - 191, 128, 135, 136, 143, 144, 153, 154, - 159, 160, 191, 128, 135, 136, 143, 144, - 173, 174, 255, 187, 128, 139, 140, 191, - 134, 128, 191, 190, 191, 192, 255, 128, - 191, 160, 128, 191, 128, 130, 131, 135, - 191, 129, 134, 136, 190, 128, 159, 160, - 191, 0, 127, 192, 255, 128, 175, 176, - 255, 10, 13, 127, 194, 216, 219, 220, - 224, 225, 226, 227, 234, 235, 236, 237, - 239, 240, 243, 0, 31, 128, 191, 192, - 223, 228, 238, 241, 247, 248, 255, 204, - 205, 210, 214, 215, 216, 217, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 234, - 239, 240, 243, 204, 205, 210, 214, 215, - 216, 217, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 234, 239, 240, 243, 194, - 204, 205, 210, 214, 215, 216, 217, 219, - 220, 221, 222, 223, 224, 225, 226, 227, - 234, 239, 240, 243, 194, 216, 219, 220, - 224, 225, 226, 227, 234, 235, 236, 237, - 239, 240, 243, 32, 126, 192, 223, 228, - 238, 241, 247, 204, 205, 210, 214, 215, - 216, 217, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 234, 239, 240, 243, 204, - 205, 210, 214, 215, 216, 217, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 234, - 239, 240, 243, 194, 204, 205, 210, 214, - 215, 216, 217, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 234, 239, 240, 243, - 204, 205, 210, 214, 215, 216, 217, 219, - 220, 221, 222, 223, 224, 225, 226, 227, - 234, 235, 236, 237, 239, 240, 243, 204, - 205, 210, 214, 215, 216, 217, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 234, - 237, 239, 240, 243, 204, 205, 210, 214, - 215, 216, 217, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 234, 237, 239, 240, - 243, 204, 205, 210, 214, 215, 216, 217, - 219, 220, 221, 222, 223, 224, 225, 226, - 227, 234, 237, 239, 240, 243, 204, 205, - 210, 214, 215, 216, 217, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 234, 239, - 240, 243, 204, 205, 210, 214, 215, 216, - 217, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 234, 235, 236, 237, 239, 240, - 243, 204, 205, 210, 214, 215, 216, 217, - 219, 220, 221, 222, 223, 224, 225, 226, - 227, 234, 239, 240, 243, 194, 204, 205, - 210, 214, 215, 216, 217, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 234, 239, - 240, 243, 204, 205, 210, 214, 215, 216, - 217, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 234, 237, 239, 240, 243, 204, - 205, 210, 214, 215, 216, 217, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 234, - 237, 239, 240, 243, 204, 205, 210, 214, - 215, 216, 217, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 234, 237, 239, 240, - 243, 204, 205, 210, 214, 215, 216, 217, - 219, 220, 221, 222, 223, 224, 225, 226, - 227, 234, 239, 240, 243, 204, 205, 210, - 214, 215, 216, 217, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 234, 239, 240, - 243, 204, 205, 210, 214, 215, 216, 217, - 219, 220, 221, 222, 223, 224, 225, 226, - 227, 234, 239, 240, 243, 194, 204, 205, - 210, 214, 215, 216, 217, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 234, 239, - 240, 243, -} - -var _graphclust_single_lengths []byte = []byte{ - 0, 1, 0, 0, 0, 1, 1, 0, - 1, 0, 1, 0, 0, 1, 26, 0, - 0, 0, 1, 1, 1, 0, 0, 2, - 1, 0, 1, 1, 0, 2, 0, 0, - 2, 0, 2, 1, 0, 1, 0, 3, - 0, 0, 1, 21, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 2, - 0, 5, 0, 0, 0, 1, 0, 2, - 0, 0, 15, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 2, 1, - 1, 0, 3, 1, 0, 7, 7, 1, - 1, 0, 1, 0, 0, 0, 32, 0, - 0, 0, 0, 1, 0, 0, 1, 0, - 0, 1, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, - 0, 0, 1, 1, 0, 0, 4, 0, - 0, 1, 0, 1, 0, 6, 0, 0, - 0, 0, 0, 1, 5, 0, 0, 0, - 0, 1, 0, 1, 4, 0, 0, 0, - 0, 3, 0, 0, 0, 1, 1, 0, - 1, 0, 1, 0, 0, 1, 26, 0, - 0, 0, 1, 1, 1, 0, 0, 2, - 1, 0, 1, 1, 0, 2, 0, 0, - 2, 0, 2, 1, 0, 1, 0, 3, - 0, 0, 1, 21, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 1, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 2, - 0, 5, 2, 2, 24, 3, 1, 0, - 2, 0, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 5, 5, 3, 0, - 0, 2, 0, 1, 0, 3, 1, 0, - 2, 15, 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 2, 1, 1, - 0, 3, 1, 0, 7, 7, 1, 1, - 0, 1, 0, 0, 0, 32, 0, 0, - 0, 0, 1, 0, 0, 1, 0, 0, - 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 1, 0, 0, - 0, 1, 1, 0, 0, 4, 0, 0, - 1, 0, 1, 0, 6, 0, 0, 0, - 0, 0, 1, 5, 0, 0, 0, 0, - 32, 0, 1, 0, 1, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 4, 0, 2, 0, - 7, 1, 0, 1, 0, 0, 0, 1, - 1, 0, 1, 0, 1, 0, 0, 1, - 26, 0, 0, 0, 1, 1, 1, 0, - 0, 2, 1, 0, 1, 1, 0, 2, - 0, 0, 2, 0, 2, 1, 0, 1, - 0, 3, 0, 0, 1, 21, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 2, 0, 5, 0, 0, 0, 1, - 0, 2, 0, 0, 15, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 2, 1, 1, 0, 3, 1, 0, 7, - 7, 1, 1, 0, 1, 0, 0, 0, - 32, 0, 0, 0, 0, 1, 0, 0, - 1, 0, 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, - 1, 0, 0, 0, 1, 1, 0, 0, - 4, 0, 0, 1, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 1, 5, 0, - 0, 0, 0, 1, 0, 1, 4, 0, - 0, 0, 0, 2, 0, 0, 0, 1, - 1, 0, 1, 0, 1, 0, 0, 1, - 26, 0, 0, 0, 1, 1, 1, 0, - 0, 2, 1, 0, 1, 1, 0, 2, - 0, 0, 2, 0, 2, 1, 0, 1, - 0, 3, 0, 0, 1, 21, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 2, 0, 5, 2, 2, 24, 3, - 1, 0, 2, 0, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 5, 5, - 3, 0, 0, 2, 0, 1, 0, 3, - 1, 0, 2, 15, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 2, - 1, 1, 0, 3, 1, 0, 7, 7, - 1, 1, 0, 1, 0, 0, 0, 32, - 0, 0, 0, 0, 1, 0, 0, 1, - 0, 0, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 1, - 0, 0, 0, 1, 1, 0, 0, 4, - 0, 0, 1, 0, 1, 0, 6, 0, - 0, 0, 0, 0, 1, 5, 0, 0, - 0, 0, 32, 0, 1, 0, 1, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 4, 0, - 2, 0, 7, 1, 0, 0, 1, 1, - 2, 1, 1, 5, 0, 24, 0, 24, - 0, 0, 23, 0, 0, 1, 0, 2, - 0, 0, 0, 28, 0, 3, 23, 2, - 0, 2, 2, 3, 2, 2, 2, 0, - 54, 54, 27, 1, 0, 20, 1, 1, - 2, 0, 1, 1, 1, 1, 1, 2, - 2, 0, 5, 5, 3, 0, 0, 2, - 2, 2, 2, 0, 14, 0, 3, 2, - 2, 3, 2, 2, 2, 54, 54, 27, - 1, 0, 2, 0, 1, 5, 6, 1, - 1, 0, 1, 0, 1, 1, 0, 1, - 0, 1, 0, 32, 1, 0, 1, 0, - 7, 2, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, - 0, 0, 1, 3, 0, 1, 1, 2, - 1, 1, 5, 0, 0, 0, 0, 1, - 1, 0, 1, 0, 1, 0, 0, 1, - 26, 0, 0, 0, 1, 1, 1, 0, - 0, 2, 1, 0, 1, 1, 0, 2, - 0, 0, 2, 0, 2, 1, 0, 1, - 0, 3, 0, 0, 1, 21, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 2, 0, 5, 2, 2, 24, 3, - 1, 0, 2, 0, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 5, 5, - 3, 0, 0, 2, 0, 1, 0, 3, - 1, 0, 2, 15, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 2, - 1, 1, 0, 3, 1, 0, 7, 7, - 1, 1, 0, 1, 0, 0, 0, 32, - 0, 0, 0, 0, 1, 0, 0, 1, - 0, 0, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 1, - 0, 0, 0, 1, 1, 0, 0, 4, - 0, 0, 1, 0, 1, 0, 6, 0, - 0, 0, 0, 0, 1, 5, 0, 0, - 0, 0, 32, 0, 1, 0, 1, 0, - 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 4, 0, - 2, 0, 7, 1, 0, 24, 0, 24, - 0, 0, 23, 0, 0, 1, 0, 2, - 0, 0, 0, 28, 0, 3, 23, 2, - 0, 2, 2, 3, 2, 2, 2, 0, - 54, 54, 27, 1, 1, 20, 3, 0, - 0, 0, 1, 1, 0, 1, 0, 1, - 0, 0, 1, 26, 0, 0, 0, 1, - 1, 1, 0, 0, 2, 1, 0, 1, - 1, 0, 2, 0, 0, 2, 0, 2, - 1, 0, 1, 0, 3, 0, 0, 1, - 21, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 2, 0, 5, 0, - 0, 0, 1, 0, 2, 0, 0, 15, - 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 2, 1, 1, 0, 3, - 1, 0, 7, 7, 1, 1, 0, 1, - 0, 0, 0, 32, 0, 0, 0, 0, - 1, 0, 0, 1, 0, 0, 1, 0, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 0, 0, 0, 1, - 1, 0, 0, 4, 0, 0, 1, 0, - 1, 0, 6, 0, 0, 0, 0, 0, - 1, 5, 0, 0, 0, 0, 1, 0, - 1, 4, 0, 0, 0, 1, 2, 0, - 1, 1, 1, 1, 1, 2, 2, 0, - 5, 5, 3, 0, 0, 2, 2, 2, - 2, 0, 14, 0, 3, 2, 2, 3, - 2, 2, 2, 54, 54, 27, 1, 0, - 2, 1, 1, 5, 6, 1, 1, 0, - 1, 0, 1, 1, 0, 1, 0, 1, - 0, 32, 1, 0, 1, 0, 0, 0, - 0, 1, 1, 0, 1, 0, 1, 0, - 0, 1, 26, 0, 0, 0, 1, 1, - 1, 0, 0, 2, 1, 0, 1, 1, - 0, 2, 0, 0, 2, 0, 2, 1, - 0, 1, 0, 3, 0, 0, 1, 21, - 0, 0, 3, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 2, 0, 5, 2, 2, - 24, 3, 1, 0, 2, 0, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, - 5, 5, 3, 0, 0, 2, 0, 1, - 0, 3, 1, 0, 2, 15, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 2, 1, 1, 0, 3, 1, 0, - 7, 7, 1, 1, 0, 1, 0, 0, - 0, 32, 0, 0, 0, 0, 1, 0, - 0, 1, 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 0, 1, 0, 0, 0, 1, 1, 0, - 0, 4, 0, 0, 1, 0, 1, 0, - 6, 0, 0, 0, 0, 0, 1, 5, - 0, 0, 0, 0, 32, 0, 1, 0, - 1, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, - 4, 0, 2, 0, 7, 1, 0, 7, - 2, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 1, 0, - 0, 1, 5, 0, 0, 0, 0, 0, - 18, 20, 20, 21, 15, 20, 20, 21, - 23, 21, 21, 21, 20, 23, 20, 21, - 21, 21, 21, 20, 20, 20, 21, -} - -var _graphclust_range_lengths []byte = []byte{ - 0, 0, 1, 1, 1, 1, 2, 1, - 1, 4, 1, 1, 1, 1, 2, 4, - 1, 2, 1, 2, 2, 6, 6, 3, - 2, 5, 1, 3, 2, 3, 5, 3, - 3, 1, 3, 1, 1, 1, 1, 2, - 1, 4, 0, 0, 2, 3, 1, 1, - 2, 2, 1, 2, 1, 1, 2, 1, - 2, 1, 2, 2, 2, 1, 1, 3, - 2, 0, 1, 1, 1, 0, 1, 0, - 1, 1, 0, 2, 1, 1, 1, 2, - 3, 1, 1, 2, 2, 1, 1, 3, - 2, 2, 0, 0, 2, 0, 0, 0, - 0, 1, 4, 1, 1, 1, 0, 2, - 1, 2, 2, 1, 2, 2, 1, 1, - 3, 6, 1, 1, 1, 1, 2, 2, - 1, 1, 1, 1, 2, 3, 1, 1, - 2, 2, 3, 1, 3, 1, 0, 1, - 1, 1, 2, 0, 1, 0, 3, 3, - 1, 2, 2, 2, 0, 5, 1, 1, - 1, 0, 1, 0, 1, 1, 1, 0, - 1, 2, 1, 1, 1, 1, 2, 1, - 1, 4, 1, 1, 1, 1, 2, 4, - 1, 2, 1, 2, 2, 6, 6, 3, - 2, 5, 1, 3, 2, 3, 5, 3, - 3, 1, 3, 1, 1, 1, 1, 2, - 1, 4, 0, 0, 2, 3, 1, 1, - 2, 2, 1, 2, 1, 1, 2, 1, - 2, 1, 2, 2, 2, 1, 1, 3, - 2, 0, 0, 0, 0, 0, 0, 1, - 0, 2, 1, 0, 2, 0, 1, 1, - 3, 1, 2, 1, 3, 2, 1, 1, - 2, 0, 1, 0, 1, 0, 1, 1, - 0, 0, 2, 1, 1, 1, 2, 3, - 1, 1, 2, 2, 1, 1, 3, 2, - 2, 0, 0, 2, 0, 0, 0, 0, - 1, 4, 1, 1, 1, 0, 2, 1, - 2, 2, 1, 2, 2, 1, 1, 3, - 6, 1, 1, 1, 1, 2, 2, 1, - 1, 1, 1, 2, 3, 1, 1, 2, - 2, 3, 1, 3, 1, 0, 1, 1, - 1, 2, 0, 1, 0, 3, 3, 1, - 2, 2, 2, 0, 5, 1, 1, 1, - 4, 0, 1, 2, 2, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 1, 0, 1, 1, 0, 1, - 0, 0, 1, 2, 1, 1, 1, 1, - 2, 1, 1, 4, 1, 1, 1, 1, - 2, 4, 1, 2, 1, 2, 2, 6, - 6, 3, 2, 5, 1, 3, 2, 3, - 5, 3, 3, 1, 3, 1, 1, 1, - 1, 2, 1, 4, 0, 0, 2, 3, - 1, 1, 2, 2, 1, 2, 1, 1, - 2, 1, 2, 1, 2, 2, 2, 1, - 1, 3, 2, 0, 1, 1, 1, 0, - 1, 0, 1, 1, 0, 2, 1, 1, - 1, 2, 3, 1, 1, 2, 2, 1, - 1, 3, 2, 2, 0, 0, 2, 0, - 0, 0, 0, 1, 4, 1, 1, 1, - 0, 2, 1, 2, 2, 1, 2, 2, - 1, 1, 3, 6, 1, 1, 1, 1, - 2, 2, 1, 1, 1, 1, 2, 3, - 1, 1, 2, 2, 3, 1, 3, 1, - 0, 1, 1, 1, 2, 0, 1, 0, - 3, 3, 1, 2, 2, 2, 0, 5, - 1, 1, 1, 0, 1, 0, 1, 1, - 1, 0, 1, 2, 1, 1, 1, 1, - 2, 1, 1, 4, 1, 1, 1, 1, - 2, 4, 1, 2, 1, 2, 2, 6, - 6, 3, 2, 5, 1, 3, 2, 3, - 5, 3, 3, 1, 3, 1, 1, 1, - 1, 2, 1, 4, 0, 0, 2, 3, - 1, 1, 2, 2, 1, 2, 1, 1, - 2, 1, 2, 1, 2, 2, 2, 1, - 1, 3, 2, 0, 0, 0, 0, 0, - 0, 1, 0, 2, 1, 0, 2, 0, - 1, 1, 3, 1, 2, 1, 3, 2, - 1, 1, 2, 0, 1, 0, 1, 0, - 1, 1, 0, 0, 2, 1, 1, 1, - 2, 3, 1, 1, 2, 2, 1, 1, - 3, 2, 2, 0, 0, 2, 0, 0, - 0, 0, 1, 4, 1, 1, 1, 0, - 2, 1, 2, 2, 1, 2, 2, 1, - 1, 3, 6, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 2, 3, 1, - 1, 2, 2, 3, 1, 3, 1, 0, - 1, 1, 1, 2, 0, 1, 0, 3, - 3, 1, 2, 2, 2, 0, 5, 1, - 1, 1, 4, 0, 1, 2, 2, 1, - 3, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 1, 0, 1, 1, - 0, 1, 0, 0, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 0, 1, 0, - 1, 1, 0, 1, 1, 0, 1, 0, - 1, 3, 1, 2, 2, 1, 0, 0, - 1, 0, 0, 0, 0, 0, 1, 0, - 1, 1, 2, 2, 2, 1, 4, 2, - 1, 5, 3, 1, 5, 1, 3, 2, - 1, 3, 6, 5, 3, 3, 5, 1, - 1, 1, 1, 1, 3, 3, 1, 0, - 0, 0, 0, 0, 1, 1, 1, 3, - 2, 4, 1, 1, 2, 1, 1, 1, - 1, 3, 1, 3, 1, 1, 2, 1, - 2, 1, 2, 5, 3, 4, 4, 2, - 0, 0, 1, 3, 2, 2, 2, 2, - 2, 2, 2, 3, 5, 4, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 4, 1, 1, 1, 1, - 2, 4, 1, 2, 1, 2, 2, 6, - 6, 3, 2, 5, 1, 3, 2, 3, - 5, 3, 3, 1, 3, 1, 1, 1, - 1, 2, 1, 4, 0, 0, 2, 3, - 1, 1, 2, 2, 1, 2, 1, 1, - 2, 1, 2, 1, 2, 2, 2, 1, - 1, 3, 2, 0, 0, 0, 0, 0, - 0, 1, 0, 2, 1, 0, 2, 0, - 1, 1, 3, 1, 2, 1, 3, 2, - 1, 1, 2, 0, 1, 0, 1, 0, - 1, 1, 0, 0, 2, 1, 1, 1, - 2, 3, 1, 1, 2, 2, 1, 1, - 3, 2, 2, 0, 0, 2, 0, 0, - 0, 0, 1, 4, 1, 1, 1, 0, - 2, 1, 2, 2, 1, 2, 2, 1, - 1, 3, 6, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 2, 3, 1, - 1, 2, 2, 3, 1, 3, 1, 0, - 1, 1, 1, 2, 0, 1, 0, 3, - 3, 1, 2, 2, 2, 0, 5, 1, - 1, 1, 4, 0, 1, 2, 2, 1, - 3, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 1, 0, 1, 1, - 0, 1, 0, 0, 1, 0, 1, 0, - 1, 1, 0, 1, 1, 0, 1, 0, - 1, 3, 1, 2, 2, 1, 0, 0, - 1, 0, 0, 0, 0, 0, 1, 0, - 1, 1, 2, 2, 1, 1, 5, 1, - 1, 1, 1, 2, 1, 1, 4, 1, - 1, 1, 1, 2, 4, 1, 2, 1, - 2, 2, 6, 6, 3, 2, 5, 1, - 3, 2, 3, 5, 3, 3, 1, 3, - 1, 1, 1, 1, 2, 1, 4, 0, - 0, 2, 3, 1, 1, 2, 2, 1, - 2, 1, 1, 2, 1, 2, 1, 2, - 2, 2, 1, 1, 3, 2, 0, 1, - 1, 1, 0, 1, 0, 1, 1, 0, - 2, 1, 1, 1, 2, 3, 1, 1, - 2, 2, 1, 1, 3, 2, 2, 0, - 0, 2, 0, 0, 0, 0, 1, 4, - 1, 1, 1, 0, 2, 1, 2, 2, - 1, 2, 2, 1, 1, 3, 6, 1, - 1, 1, 1, 2, 2, 1, 1, 1, - 1, 2, 3, 1, 1, 2, 2, 3, - 1, 3, 1, 0, 1, 1, 1, 2, - 0, 1, 0, 3, 3, 1, 2, 2, - 2, 0, 5, 1, 1, 1, 0, 1, - 0, 1, 1, 1, 0, 3, 1, 5, - 3, 1, 5, 1, 3, 2, 1, 3, - 6, 5, 3, 3, 5, 1, 1, 1, - 1, 1, 3, 3, 1, 0, 0, 0, - 0, 0, 1, 1, 1, 3, 2, 4, - 1, 1, 3, 1, 1, 1, 1, 3, - 1, 3, 1, 1, 3, 1, 3, 1, - 3, 5, 3, 4, 4, 2, 1, 1, - 1, 1, 2, 1, 1, 4, 1, 1, - 1, 1, 2, 4, 1, 2, 1, 2, - 2, 6, 6, 3, 2, 5, 1, 3, - 2, 3, 5, 3, 3, 1, 3, 1, - 1, 1, 1, 2, 1, 4, 0, 0, - 2, 3, 1, 1, 2, 2, 1, 2, - 1, 1, 2, 1, 2, 1, 2, 2, - 2, 1, 1, 3, 2, 0, 0, 0, - 0, 0, 0, 1, 0, 2, 1, 0, - 2, 0, 1, 1, 3, 1, 2, 1, - 3, 2, 1, 1, 2, 0, 1, 0, - 1, 0, 1, 1, 0, 0, 2, 1, - 1, 1, 2, 3, 1, 1, 2, 2, - 1, 1, 3, 2, 2, 0, 0, 2, - 0, 0, 0, 0, 1, 4, 1, 1, - 1, 0, 2, 1, 2, 2, 1, 2, - 2, 1, 1, 3, 6, 1, 1, 1, - 1, 2, 2, 1, 1, 1, 1, 2, - 3, 1, 1, 2, 2, 3, 1, 3, - 1, 0, 1, 1, 1, 2, 0, 1, - 0, 3, 3, 1, 2, 2, 2, 0, - 5, 1, 1, 1, 4, 0, 1, 2, - 2, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 1, 0, - 1, 1, 0, 1, 0, 0, 1, 0, - 0, 1, 3, 2, 2, 2, 2, 2, - 2, 2, 3, 5, 4, 2, 1, 2, - 1, 1, 2, 2, 1, 1, 2, 0, - 6, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -} - -var _graphclust_index_offsets []int16 = []int16{ - 0, 0, 2, 4, 6, 8, 11, 15, - 17, 20, 25, 28, 30, 32, 35, 64, - 69, 71, 74, 77, 81, 85, 92, 99, - 105, 109, 115, 118, 123, 126, 132, 138, - 142, 148, 150, 156, 159, 161, 164, 166, - 172, 174, 179, 181, 203, 206, 210, 215, - 217, 220, 223, 225, 228, 230, 233, 236, - 238, 244, 246, 249, 252, 255, 257, 259, - 265, 268, 274, 276, 278, 280, 282, 284, - 287, 289, 291, 307, 310, 312, 314, 319, - 322, 326, 328, 330, 333, 336, 338, 342, - 347, 351, 354, 358, 360, 363, 371, 379, - 381, 383, 385, 391, 393, 395, 397, 430, - 433, 435, 438, 441, 444, 447, 450, 453, - 455, 459, 467, 469, 472, 474, 476, 479, - 482, 484, 486, 488, 490, 494, 498, 501, - 503, 506, 509, 514, 517, 521, 523, 528, - 530, 532, 535, 538, 540, 542, 549, 553, - 557, 559, 562, 565, 569, 575, 581, 583, - 585, 587, 589, 591, 593, 599, 601, 603, - 604, 606, 612, 614, 616, 618, 621, 625, - 627, 630, 635, 638, 640, 642, 645, 674, - 679, 681, 684, 687, 691, 695, 702, 709, - 715, 719, 725, 728, 733, 736, 742, 748, - 752, 758, 760, 766, 769, 771, 774, 776, - 782, 784, 789, 791, 813, 816, 820, 825, - 827, 830, 833, 835, 838, 840, 843, 846, - 848, 854, 856, 859, 862, 865, 867, 869, - 875, 878, 884, 887, 890, 915, 919, 921, - 923, 926, 929, 932, 934, 938, 940, 943, - 946, 950, 952, 955, 957, 966, 974, 979, - 981, 984, 987, 989, 991, 993, 997, 1000, - 1002, 1005, 1021, 1024, 1026, 1028, 1033, 1036, - 1040, 1042, 1044, 1047, 1050, 1052, 1056, 1061, - 1065, 1068, 1072, 1074, 1077, 1085, 1093, 1095, - 1097, 1099, 1105, 1107, 1109, 1111, 1144, 1147, - 1149, 1152, 1155, 1158, 1161, 1164, 1167, 1169, - 1173, 1181, 1183, 1186, 1188, 1190, 1193, 1196, - 1198, 1200, 1202, 1204, 1208, 1212, 1215, 1217, - 1220, 1223, 1228, 1231, 1235, 1237, 1242, 1244, - 1246, 1249, 1252, 1254, 1256, 1263, 1267, 1271, - 1273, 1276, 1279, 1283, 1289, 1295, 1297, 1299, - 1301, 1338, 1339, 1342, 1345, 1349, 1351, 1357, - 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1374, - 1377, 1380, 1383, 1385, 1387, 1393, 1395, 1398, - 1400, 1408, 1410, 1412, 1416, 1418, 1420, 1422, - 1425, 1429, 1431, 1434, 1439, 1442, 1444, 1446, - 1449, 1478, 1483, 1485, 1488, 1491, 1495, 1499, - 1506, 1513, 1519, 1523, 1529, 1532, 1537, 1540, - 1546, 1552, 1556, 1562, 1564, 1570, 1573, 1575, - 1578, 1580, 1586, 1588, 1593, 1595, 1617, 1620, - 1624, 1629, 1631, 1634, 1637, 1639, 1642, 1644, - 1647, 1650, 1652, 1658, 1660, 1663, 1666, 1669, - 1671, 1673, 1679, 1682, 1688, 1690, 1692, 1694, - 1696, 1698, 1701, 1703, 1705, 1721, 1724, 1726, - 1728, 1733, 1736, 1740, 1742, 1744, 1747, 1750, - 1752, 1756, 1761, 1765, 1768, 1772, 1774, 1777, - 1785, 1793, 1795, 1797, 1799, 1805, 1807, 1809, - 1811, 1844, 1847, 1849, 1852, 1855, 1858, 1861, - 1864, 1867, 1869, 1873, 1881, 1883, 1886, 1888, - 1890, 1893, 1896, 1898, 1900, 1902, 1904, 1908, - 1912, 1915, 1917, 1920, 1923, 1928, 1931, 1935, - 1937, 1942, 1944, 1946, 1949, 1952, 1954, 1956, - 1963, 1967, 1971, 1973, 1976, 1979, 1983, 1989, - 1995, 1997, 1999, 2001, 2003, 2005, 2007, 2013, - 2015, 2017, 2018, 2020, 2025, 2027, 2029, 2031, - 2034, 2038, 2040, 2043, 2048, 2051, 2053, 2055, - 2058, 2087, 2092, 2094, 2097, 2100, 2104, 2108, - 2115, 2122, 2128, 2132, 2138, 2141, 2146, 2149, - 2155, 2161, 2165, 2171, 2173, 2179, 2182, 2184, - 2187, 2189, 2195, 2197, 2202, 2204, 2226, 2229, - 2233, 2238, 2240, 2243, 2246, 2248, 2251, 2253, - 2256, 2259, 2261, 2267, 2269, 2272, 2275, 2278, - 2280, 2282, 2288, 2291, 2297, 2300, 2303, 2328, - 2332, 2334, 2336, 2339, 2342, 2345, 2347, 2351, - 2353, 2356, 2359, 2363, 2365, 2368, 2370, 2379, - 2387, 2392, 2394, 2397, 2400, 2402, 2404, 2406, - 2410, 2413, 2415, 2418, 2434, 2437, 2439, 2441, - 2446, 2449, 2453, 2455, 2457, 2460, 2463, 2465, - 2469, 2474, 2478, 2481, 2485, 2487, 2490, 2498, - 2506, 2508, 2510, 2512, 2518, 2520, 2522, 2524, - 2557, 2560, 2562, 2565, 2568, 2571, 2574, 2577, - 2580, 2582, 2586, 2594, 2596, 2599, 2601, 2603, - 2606, 2609, 2611, 2613, 2615, 2617, 2621, 2625, - 2628, 2630, 2633, 2636, 2641, 2644, 2648, 2650, - 2655, 2657, 2659, 2662, 2665, 2667, 2669, 2676, - 2680, 2684, 2686, 2689, 2692, 2696, 2702, 2708, - 2710, 2712, 2714, 2751, 2752, 2755, 2758, 2762, - 2764, 2770, 2772, 2774, 2776, 2778, 2780, 2782, - 2784, 2787, 2790, 2793, 2796, 2798, 2800, 2806, - 2808, 2811, 2813, 2821, 2823, 2825, 2829, 2832, - 2835, 2839, 2842, 2845, 2852, 2854, 2879, 2881, - 2906, 2908, 2910, 2934, 2936, 2938, 2940, 2942, - 2945, 2947, 2951, 2953, 2984, 2987, 2992, 3016, - 3019, 3021, 3024, 3027, 3031, 3034, 3037, 3041, - 3042, 3098, 3154, 3184, 3188, 3191, 3213, 3219, - 3223, 3227, 3233, 3238, 3241, 3248, 3251, 3256, - 3261, 3265, 3269, 3281, 3292, 3299, 3303, 3309, - 3313, 3317, 3321, 3325, 3327, 3345, 3349, 3354, - 3357, 3360, 3364, 3367, 3370, 3374, 3430, 3486, - 3517, 3521, 3526, 3530, 3532, 3536, 3543, 3551, - 3554, 3557, 3561, 3564, 3568, 3571, 3574, 3577, - 3580, 3583, 3586, 3589, 3627, 3632, 3637, 3643, - 3646, 3654, 3657, 3659, 3667, 3670, 3673, 3676, - 3679, 3682, 3685, 3688, 3692, 3698, 3703, 3707, - 3710, 3713, 3715, 3718, 3723, 3725, 3728, 3731, - 3735, 3738, 3741, 3748, 3750, 3752, 3754, 3756, - 3759, 3763, 3765, 3768, 3773, 3776, 3778, 3780, - 3783, 3812, 3817, 3819, 3822, 3825, 3829, 3833, - 3840, 3847, 3853, 3857, 3863, 3866, 3871, 3874, - 3880, 3886, 3890, 3896, 3898, 3904, 3907, 3909, - 3912, 3914, 3920, 3922, 3927, 3929, 3951, 3954, - 3958, 3963, 3965, 3968, 3971, 3973, 3976, 3978, - 3981, 3984, 3986, 3992, 3994, 3997, 4000, 4003, - 4005, 4007, 4013, 4016, 4022, 4025, 4028, 4053, - 4057, 4059, 4061, 4064, 4067, 4070, 4072, 4076, - 4078, 4081, 4084, 4088, 4090, 4093, 4095, 4104, - 4112, 4117, 4119, 4122, 4125, 4127, 4129, 4131, - 4135, 4138, 4140, 4143, 4159, 4162, 4164, 4166, - 4171, 4174, 4178, 4180, 4182, 4185, 4188, 4190, - 4194, 4199, 4203, 4206, 4210, 4212, 4215, 4223, - 4231, 4233, 4235, 4237, 4243, 4245, 4247, 4249, - 4282, 4285, 4287, 4290, 4293, 4296, 4299, 4302, - 4305, 4307, 4311, 4319, 4321, 4324, 4326, 4328, - 4331, 4334, 4336, 4338, 4340, 4342, 4346, 4350, - 4353, 4355, 4358, 4361, 4366, 4369, 4373, 4375, - 4380, 4382, 4384, 4387, 4390, 4392, 4394, 4401, - 4405, 4409, 4411, 4414, 4417, 4421, 4427, 4433, - 4435, 4437, 4439, 4476, 4477, 4480, 4483, 4487, - 4489, 4495, 4497, 4499, 4501, 4503, 4505, 4507, - 4509, 4512, 4515, 4518, 4521, 4523, 4525, 4531, - 4533, 4536, 4538, 4546, 4548, 4550, 4575, 4577, - 4602, 4604, 4606, 4630, 4632, 4634, 4636, 4638, - 4641, 4643, 4647, 4649, 4680, 4683, 4688, 4712, - 4715, 4717, 4720, 4723, 4727, 4730, 4733, 4737, - 4738, 4794, 4850, 4880, 4884, 4887, 4909, 4918, - 4920, 4922, 4924, 4927, 4931, 4933, 4936, 4941, - 4944, 4946, 4948, 4951, 4980, 4985, 4987, 4990, - 4993, 4997, 5001, 5008, 5015, 5021, 5025, 5031, - 5034, 5039, 5042, 5048, 5054, 5058, 5064, 5066, - 5072, 5075, 5077, 5080, 5082, 5088, 5090, 5095, - 5097, 5119, 5122, 5126, 5131, 5133, 5136, 5139, - 5141, 5144, 5146, 5149, 5152, 5154, 5160, 5162, - 5165, 5168, 5171, 5173, 5175, 5181, 5184, 5190, - 5192, 5194, 5196, 5198, 5200, 5203, 5205, 5207, - 5223, 5226, 5228, 5230, 5235, 5238, 5242, 5244, - 5246, 5249, 5252, 5254, 5258, 5263, 5267, 5270, - 5274, 5276, 5279, 5287, 5295, 5297, 5299, 5301, - 5307, 5309, 5311, 5313, 5346, 5349, 5351, 5354, - 5357, 5360, 5363, 5366, 5369, 5371, 5375, 5383, - 5385, 5388, 5390, 5392, 5395, 5398, 5400, 5402, - 5404, 5406, 5410, 5414, 5417, 5419, 5422, 5425, - 5430, 5433, 5437, 5439, 5444, 5446, 5448, 5451, - 5454, 5456, 5458, 5465, 5469, 5473, 5475, 5478, - 5481, 5485, 5491, 5497, 5499, 5501, 5503, 5505, - 5507, 5509, 5515, 5517, 5519, 5520, 5525, 5529, - 5535, 5540, 5543, 5550, 5553, 5558, 5563, 5567, - 5571, 5583, 5594, 5601, 5605, 5611, 5615, 5619, - 5623, 5627, 5629, 5647, 5651, 5656, 5659, 5662, - 5666, 5669, 5672, 5676, 5732, 5788, 5819, 5823, - 5828, 5832, 5835, 5840, 5847, 5855, 5858, 5861, - 5865, 5868, 5872, 5875, 5878, 5882, 5885, 5889, - 5892, 5896, 5934, 5939, 5944, 5950, 5953, 5955, - 5957, 5959, 5962, 5966, 5968, 5971, 5976, 5979, - 5981, 5983, 5986, 6015, 6020, 6022, 6025, 6028, - 6032, 6036, 6043, 6050, 6056, 6060, 6066, 6069, - 6074, 6077, 6083, 6089, 6093, 6099, 6101, 6107, - 6110, 6112, 6115, 6117, 6123, 6125, 6130, 6132, - 6154, 6157, 6161, 6166, 6168, 6171, 6174, 6176, - 6179, 6181, 6184, 6187, 6189, 6195, 6197, 6200, - 6203, 6206, 6208, 6210, 6216, 6219, 6225, 6228, - 6231, 6256, 6260, 6262, 6264, 6267, 6270, 6273, - 6275, 6279, 6281, 6284, 6287, 6291, 6293, 6296, - 6298, 6307, 6315, 6320, 6322, 6325, 6328, 6330, - 6332, 6334, 6338, 6341, 6343, 6346, 6362, 6365, - 6367, 6369, 6374, 6377, 6381, 6383, 6385, 6388, - 6391, 6393, 6397, 6402, 6406, 6409, 6413, 6415, - 6418, 6426, 6434, 6436, 6438, 6440, 6446, 6448, - 6450, 6452, 6485, 6488, 6490, 6493, 6496, 6499, - 6502, 6505, 6508, 6510, 6514, 6522, 6524, 6527, - 6529, 6531, 6534, 6537, 6539, 6541, 6543, 6545, - 6549, 6553, 6556, 6558, 6561, 6564, 6569, 6572, - 6576, 6578, 6583, 6585, 6587, 6590, 6593, 6595, - 6597, 6604, 6608, 6612, 6614, 6617, 6620, 6624, - 6630, 6636, 6638, 6640, 6642, 6679, 6680, 6683, - 6686, 6690, 6692, 6698, 6700, 6702, 6704, 6706, - 6708, 6710, 6712, 6715, 6718, 6721, 6724, 6726, - 6728, 6734, 6736, 6739, 6741, 6749, 6751, 6753, - 6761, 6764, 6766, 6774, 6777, 6780, 6783, 6786, - 6789, 6792, 6795, 6799, 6805, 6810, 6814, 6817, - 6820, 6822, 6825, 6833, 6836, 6838, 6840, 6843, - 6844, 6869, 6890, 6911, 6933, 6953, 6974, 6995, - 7017, 7041, 7063, 7085, 7107, 7128, 7152, 7173, - 7195, 7217, 7239, 7261, 7282, 7303, 7324, -} - -var _graphclust_indicies []int16 = []int16{ - 0, 1, 2, 3, 2, 3, 3, 2, - 3, 3, 2, 3, 3, 3, 2, 3, - 2, 3, 3, 2, 3, 3, 3, 3, - 2, 3, 3, 2, 2, 3, 3, 2, - 3, 3, 2, 4, 5, 6, 7, 8, - 10, 11, 12, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 9, 13, 2, - 3, 3, 3, 3, 2, 3, 2, 3, - 3, 2, 2, 2, 3, 2, 2, 2, - 3, 3, 3, 3, 2, 2, 2, 2, - 2, 2, 2, 3, 2, 2, 2, 2, - 2, 2, 3, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 2, 3, 3, 3, - 3, 3, 2, 3, 3, 2, 3, 3, - 3, 3, 2, 3, 3, 2, 2, 2, - 2, 2, 2, 3, 3, 3, 3, 3, - 3, 2, 3, 3, 3, 2, 2, 2, - 2, 2, 2, 3, 3, 2, 3, 3, - 3, 3, 3, 2, 3, 3, 2, 3, - 2, 3, 3, 2, 3, 2, 3, 3, - 3, 3, 3, 2, 3, 2, 3, 3, - 3, 3, 2, 3, 2, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 2, 3, 3, 2, 3, 3, - 3, 2, 3, 3, 3, 3, 2, 3, - 2, 3, 3, 2, 3, 3, 2, 3, - 2, 2, 2, 3, 3, 2, 3, 3, - 2, 3, 3, 2, 3, 2, 3, 3, - 3, 3, 3, 2, 3, 2, 3, 3, - 2, 2, 2, 3, 3, 3, 2, 3, - 2, 3, 2, 3, 3, 3, 3, 3, - 2, 3, 3, 2, 53, 54, 55, 56, - 57, 2, 3, 2, 3, 2, 3, 2, - 3, 2, 3, 2, 58, 59, 2, 3, - 2, 3, 2, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 2, 3, 3, 2, 3, 2, - 3, 2, 3, 3, 3, 3, 2, 3, - 3, 2, 2, 2, 2, 3, 3, 2, - 3, 2, 3, 3, 2, 2, 2, 3, - 3, 2, 3, 3, 3, 2, 3, 3, - 3, 3, 2, 3, 3, 3, 2, 3, - 3, 2, 75, 76, 61, 2, 3, 2, - 3, 3, 2, 77, 78, 79, 80, 81, - 82, 83, 2, 84, 85, 86, 87, 88, - 89, 90, 2, 3, 2, 3, 2, 3, - 2, 3, 3, 3, 3, 3, 2, 3, - 2, 3, 2, 3, 2, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 104, 108, - 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 2, 3, 3, - 2, 2, 3, 2, 2, 3, 3, 3, - 2, 3, 3, 2, 3, 3, 2, 2, - 2, 3, 3, 3, 2, 3, 2, 3, - 3, 3, 2, 3, 3, 3, 3, 3, - 3, 3, 2, 3, 2, 3, 3, 2, - 3, 2, 2, 3, 3, 3, 2, 2, - 2, 3, 2, 3, 3, 2, 3, 2, - 3, 2, 3, 3, 3, 2, 3, 3, - 3, 2, 3, 3, 2, 3, 2, 3, - 3, 2, 3, 3, 2, 3, 3, 3, - 3, 2, 2, 2, 3, 3, 3, 3, - 2, 3, 2, 122, 123, 124, 125, 2, - 3, 2, 3, 2, 3, 3, 2, 2, - 2, 3, 126, 2, 3, 2, 127, 128, - 129, 130, 131, 132, 2, 3, 3, 3, - 2, 2, 2, 2, 3, 3, 2, 3, - 3, 2, 2, 2, 3, 3, 3, 3, - 2, 133, 123, 134, 135, 136, 2, 3, - 3, 3, 3, 3, 2, 3, 2, 3, - 2, 3, 2, 137, 2, 3, 2, 138, - 2, 139, 140, 141, 143, 142, 2, 3, - 2, 2, 3, 3, 3, 1, 145, 144, - 145, 144, 3, 1, 145, 146, 147, 145, - 145, 147, 145, 145, 147, 145, 145, 145, - 147, 145, 147, 145, 145, 147, 145, 145, - 145, 145, 147, 145, 145, 147, 147, 145, - 145, 147, 145, 145, 147, 148, 149, 150, - 151, 152, 154, 155, 156, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 153, - 157, 147, 145, 145, 145, 145, 147, 145, - 147, 145, 145, 147, 147, 147, 145, 147, - 147, 147, 145, 145, 145, 145, 147, 147, - 147, 147, 147, 147, 147, 145, 147, 147, - 147, 147, 147, 147, 145, 147, 147, 147, - 147, 147, 145, 145, 145, 145, 147, 145, - 145, 145, 145, 145, 147, 145, 145, 147, - 145, 145, 145, 145, 147, 145, 145, 147, - 147, 147, 147, 147, 147, 145, 145, 145, - 145, 145, 145, 147, 145, 145, 145, 147, - 147, 147, 147, 147, 147, 145, 145, 147, - 145, 145, 145, 145, 145, 147, 145, 145, - 147, 145, 147, 145, 145, 147, 145, 147, - 145, 145, 145, 145, 145, 147, 145, 147, - 145, 145, 145, 145, 147, 145, 147, 176, - 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 147, 145, 145, 147, - 145, 145, 145, 147, 145, 145, 145, 145, - 147, 145, 147, 145, 145, 147, 145, 145, - 147, 145, 147, 147, 147, 145, 145, 147, - 145, 145, 147, 145, 145, 147, 145, 147, - 145, 145, 145, 145, 145, 147, 145, 147, - 145, 145, 147, 147, 147, 145, 145, 145, - 147, 145, 147, 145, 147, 145, 145, 145, - 145, 145, 147, 145, 145, 147, 197, 198, - 199, 200, 201, 147, 145, 202, 147, 145, - 145, 147, 203, 204, 198, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 199, - 200, 201, 147, 145, 202, 145, 147, 145, - 147, 145, 147, 145, 145, 147, 145, 145, - 147, 145, 145, 147, 145, 147, 145, 145, - 145, 147, 145, 147, 145, 145, 147, 145, - 145, 147, 145, 145, 145, 147, 146, 145, - 145, 145, 147, 145, 146, 145, 145, 145, - 145, 145, 145, 145, 145, 147, 145, 145, - 145, 145, 145, 145, 145, 147, 145, 145, - 145, 145, 147, 145, 147, 145, 145, 147, - 145, 145, 147, 145, 147, 145, 147, 145, - 147, 223, 224, 225, 147, 145, 145, 147, - 145, 147, 145, 145, 147, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 147, 145, 145, 147, - 145, 147, 145, 147, 145, 145, 145, 145, - 147, 145, 145, 147, 147, 147, 147, 145, - 145, 147, 145, 147, 145, 145, 147, 147, - 147, 145, 145, 147, 145, 145, 145, 147, - 145, 145, 145, 145, 147, 145, 145, 145, - 147, 145, 145, 147, 241, 242, 227, 147, - 145, 147, 145, 145, 147, 243, 244, 245, - 246, 247, 248, 249, 147, 250, 251, 252, - 253, 254, 255, 256, 147, 145, 147, 145, - 147, 145, 147, 145, 145, 145, 145, 145, - 147, 145, 147, 145, 147, 145, 147, 257, - 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, - 270, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 147, - 145, 145, 147, 147, 145, 147, 147, 145, - 145, 145, 147, 145, 145, 147, 145, 145, - 147, 147, 147, 145, 145, 145, 147, 145, - 147, 145, 145, 145, 147, 145, 145, 145, - 145, 145, 145, 145, 147, 145, 147, 145, - 145, 147, 145, 147, 147, 145, 145, 145, - 147, 147, 147, 145, 147, 145, 145, 147, - 145, 147, 145, 147, 145, 145, 145, 147, - 145, 145, 145, 147, 145, 145, 147, 145, - 147, 145, 145, 147, 145, 145, 147, 145, - 145, 145, 145, 147, 147, 147, 145, 145, - 145, 145, 147, 145, 147, 288, 289, 290, - 291, 147, 145, 147, 145, 147, 145, 145, - 147, 147, 147, 145, 292, 147, 145, 147, - 293, 294, 295, 296, 297, 298, 147, 145, - 145, 145, 147, 147, 147, 147, 145, 145, - 147, 145, 145, 147, 147, 147, 145, 145, - 145, 145, 147, 299, 289, 300, 301, 302, - 147, 145, 145, 145, 145, 145, 147, 145, - 147, 145, 147, 145, 147, 304, 214, 216, - 305, 306, 307, 308, 309, 310, 304, 214, - 214, 214, 216, 304, 214, 311, 312, 304, - 214, 313, 214, 314, 315, 316, 317, 318, - 214, 319, 320, 214, 321, 303, 216, 303, - 304, 147, 145, 145, 145, 147, 145, 145, - 147, 145, 145, 145, 147, 147, 145, 145, - 145, 145, 145, 145, 147, 145, 147, 145, - 147, 145, 147, 147, 145, 145, 147, 145, - 147, 145, 147, 145, 145, 147, 145, 145, - 147, 145, 145, 147, 145, 145, 147, 147, - 145, 322, 147, 323, 214, 303, 324, 304, - 147, 145, 147, 325, 224, 147, 145, 147, - 243, 244, 245, 246, 247, 248, 326, 147, - 327, 147, 145, 147, 144, 328, 3, 1, - 330, 329, 329, 330, 330, 329, 330, 330, - 329, 330, 330, 330, 329, 330, 329, 330, - 330, 329, 330, 330, 330, 330, 329, 330, - 330, 329, 329, 330, 330, 329, 330, 330, - 329, 331, 332, 333, 334, 335, 337, 338, - 339, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 336, 340, 329, 330, 330, - 330, 330, 329, 330, 329, 330, 330, 329, - 329, 329, 330, 329, 329, 329, 330, 330, - 330, 330, 329, 329, 329, 329, 329, 329, - 329, 330, 329, 329, 329, 329, 329, 329, - 330, 329, 329, 329, 329, 329, 330, 330, - 330, 330, 329, 330, 330, 330, 330, 330, - 329, 330, 330, 329, 330, 330, 330, 330, - 329, 330, 330, 329, 329, 329, 329, 329, - 329, 330, 330, 330, 330, 330, 330, 329, - 330, 330, 330, 329, 329, 329, 329, 329, - 329, 330, 330, 329, 330, 330, 330, 330, - 330, 329, 330, 330, 329, 330, 329, 330, - 330, 329, 330, 329, 330, 330, 330, 330, - 330, 329, 330, 329, 330, 330, 330, 330, - 329, 330, 329, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, - 329, 330, 330, 329, 330, 330, 330, 329, - 330, 330, 330, 330, 329, 330, 329, 330, - 330, 329, 330, 330, 329, 330, 329, 329, - 329, 330, 330, 329, 330, 330, 329, 330, - 330, 329, 330, 329, 330, 330, 330, 330, - 330, 329, 330, 329, 330, 330, 329, 329, - 329, 330, 330, 330, 329, 330, 329, 330, - 329, 330, 330, 330, 330, 330, 329, 330, - 330, 329, 380, 381, 382, 383, 384, 329, - 330, 329, 330, 329, 330, 329, 330, 329, - 330, 329, 385, 386, 329, 330, 329, 330, - 329, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, - 329, 330, 330, 329, 330, 329, 330, 329, - 330, 330, 330, 330, 329, 330, 330, 329, - 329, 329, 329, 330, 330, 329, 330, 329, - 330, 330, 329, 329, 329, 330, 330, 329, - 330, 330, 330, 329, 330, 330, 330, 330, - 329, 330, 330, 330, 329, 330, 330, 329, - 402, 403, 388, 329, 330, 329, 330, 330, - 329, 404, 405, 406, 407, 408, 409, 410, - 329, 411, 412, 413, 414, 415, 416, 417, - 329, 330, 329, 330, 329, 330, 329, 330, - 330, 330, 330, 330, 329, 330, 329, 330, - 329, 330, 329, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, 428, 429, 430, - 431, 432, 433, 434, 431, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 329, 330, 330, 329, 329, - 330, 329, 329, 330, 330, 330, 329, 330, - 330, 329, 330, 330, 329, 329, 329, 330, - 330, 330, 329, 330, 329, 330, 330, 330, - 329, 330, 330, 330, 330, 330, 330, 330, - 329, 330, 329, 330, 330, 329, 330, 329, - 329, 330, 330, 330, 329, 329, 329, 330, - 329, 330, 330, 329, 330, 329, 330, 329, - 330, 330, 330, 329, 330, 330, 330, 329, - 330, 330, 329, 330, 329, 330, 330, 329, - 330, 330, 329, 330, 330, 330, 330, 329, - 329, 329, 330, 330, 330, 330, 329, 330, - 329, 449, 450, 451, 452, 329, 330, 329, - 330, 329, 330, 330, 329, 329, 329, 330, - 453, 329, 330, 329, 454, 455, 456, 457, - 458, 459, 329, 330, 330, 330, 329, 329, - 329, 329, 330, 330, 329, 330, 330, 329, - 329, 329, 330, 330, 330, 330, 329, 460, - 450, 461, 462, 463, 329, 330, 330, 330, - 330, 330, 329, 330, 329, 330, 329, 330, - 329, 464, 329, 330, 329, 465, 329, 466, - 467, 468, 470, 469, 329, 330, 329, 329, - 330, 330, 330, 329, 471, 471, 330, 330, - 329, 471, 329, 329, 471, 471, 329, 471, - 471, 329, 471, 471, 471, 329, 471, 329, - 471, 471, 329, 471, 471, 471, 471, 329, - 471, 471, 329, 329, 471, 471, 329, 471, - 471, 329, 472, 473, 474, 475, 476, 478, - 479, 480, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 477, 481, 329, 471, - 471, 471, 471, 329, 471, 329, 471, 471, - 329, 329, 329, 471, 329, 329, 329, 471, - 471, 471, 471, 329, 329, 329, 329, 329, - 329, 329, 471, 329, 329, 329, 329, 329, - 329, 471, 329, 329, 329, 329, 329, 471, - 471, 471, 471, 329, 471, 471, 471, 471, - 471, 329, 471, 471, 329, 471, 471, 471, - 471, 329, 471, 471, 329, 329, 329, 329, - 329, 329, 471, 471, 471, 471, 471, 471, - 329, 471, 471, 471, 329, 329, 329, 329, - 329, 329, 471, 471, 329, 471, 471, 471, - 471, 471, 329, 471, 471, 329, 471, 329, - 471, 471, 329, 471, 329, 471, 471, 471, - 471, 471, 329, 471, 329, 471, 471, 471, - 471, 329, 471, 329, 500, 501, 502, 503, - 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 517, 518, 519, - 520, 329, 471, 471, 329, 471, 471, 471, - 329, 471, 471, 471, 471, 329, 471, 329, - 471, 471, 329, 471, 471, 329, 471, 329, - 329, 329, 471, 471, 329, 471, 471, 329, - 471, 471, 329, 471, 329, 471, 471, 471, - 471, 471, 329, 471, 329, 471, 471, 329, - 329, 329, 471, 471, 471, 329, 471, 329, - 471, 329, 471, 471, 471, 471, 471, 329, - 471, 471, 329, 521, 522, 523, 524, 525, - 329, 471, 526, 329, 471, 471, 329, 527, - 528, 522, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542, - 543, 544, 545, 546, 523, 524, 525, 329, - 471, 526, 471, 329, 471, 329, 471, 329, - 471, 471, 329, 471, 471, 329, 471, 471, - 329, 471, 329, 471, 471, 471, 329, 471, - 329, 471, 471, 329, 471, 471, 329, 471, - 471, 471, 329, 329, 471, 471, 471, 329, - 471, 329, 471, 471, 471, 471, 471, 471, - 471, 471, 329, 471, 471, 471, 471, 471, - 471, 471, 329, 471, 471, 471, 471, 329, - 471, 329, 471, 471, 329, 471, 471, 329, - 471, 329, 471, 329, 471, 329, 547, 548, - 549, 329, 471, 471, 329, 471, 329, 471, - 471, 329, 550, 551, 552, 553, 554, 555, - 556, 557, 558, 559, 560, 561, 562, 563, - 564, 329, 471, 471, 329, 471, 329, 471, - 329, 471, 471, 471, 471, 329, 471, 471, - 329, 329, 329, 329, 471, 471, 329, 471, - 329, 471, 471, 329, 329, 329, 471, 471, - 329, 471, 471, 471, 329, 471, 471, 471, - 471, 329, 471, 471, 471, 329, 471, 471, - 329, 565, 566, 551, 329, 471, 329, 471, - 471, 329, 567, 568, 569, 570, 571, 572, - 573, 329, 574, 575, 576, 577, 578, 579, - 580, 329, 471, 329, 471, 329, 471, 329, - 471, 471, 471, 471, 471, 329, 471, 329, - 471, 329, 471, 329, 581, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 591, 592, - 593, 594, 595, 596, 597, 594, 598, 599, - 600, 601, 602, 603, 604, 605, 606, 607, - 608, 609, 610, 611, 329, 471, 471, 329, - 329, 471, 329, 329, 471, 471, 471, 329, - 471, 471, 329, 471, 471, 329, 329, 329, - 471, 471, 471, 329, 471, 329, 471, 471, - 471, 329, 471, 471, 471, 471, 471, 471, - 471, 329, 471, 329, 471, 471, 329, 471, - 329, 329, 471, 471, 471, 329, 329, 329, - 471, 329, 471, 471, 329, 471, 329, 471, - 329, 471, 471, 471, 329, 471, 471, 471, - 329, 471, 471, 329, 471, 329, 471, 471, - 329, 471, 471, 329, 471, 471, 471, 471, - 329, 329, 329, 471, 471, 471, 471, 329, - 471, 329, 612, 613, 614, 615, 329, 471, - 329, 471, 329, 471, 471, 329, 329, 329, - 471, 616, 329, 471, 329, 617, 618, 619, - 620, 621, 622, 329, 471, 471, 471, 329, - 329, 329, 329, 471, 471, 329, 471, 471, - 329, 329, 329, 471, 471, 471, 471, 329, - 623, 613, 624, 625, 626, 329, 471, 471, - 471, 471, 471, 329, 471, 329, 471, 329, - 471, 329, 628, 538, 540, 629, 630, 631, - 632, 633, 634, 628, 538, 538, 538, 540, - 628, 538, 635, 636, 628, 538, 637, 538, - 638, 639, 640, 641, 642, 538, 643, 644, - 538, 645, 627, 540, 627, 628, 329, 471, - 471, 471, 329, 471, 471, 329, 471, 471, - 471, 329, 329, 471, 471, 471, 471, 471, - 471, 329, 471, 329, 471, 329, 471, 329, - 329, 471, 471, 329, 471, 329, 471, 329, - 471, 471, 329, 471, 471, 329, 471, 471, - 329, 471, 471, 329, 329, 471, 646, 329, - 647, 538, 627, 648, 628, 329, 471, 329, - 649, 548, 329, 471, 329, 567, 568, 569, - 570, 571, 572, 650, 329, 651, 329, 471, - 329, 328, 330, 330, 329, 328, 330, 329, - 328, 330, 329, 653, 654, 652, 329, 328, - 330, 329, 328, 330, 329, 655, 656, 657, - 658, 659, 652, 329, 660, 329, 500, 501, - 502, 655, 656, 661, 503, 504, 505, 506, - 507, 508, 509, 510, 511, 512, 513, 514, - 515, 516, 517, 518, 519, 520, 329, 662, - 660, 500, 501, 502, 663, 657, 658, 503, - 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 517, 518, 519, - 520, 329, 662, 329, 664, 662, 500, 501, - 502, 665, 658, 503, 504, 505, 506, 507, - 508, 509, 510, 511, 512, 513, 514, 515, - 516, 517, 518, 519, 520, 329, 664, 329, - 329, 664, 666, 329, 664, 329, 667, 668, - 329, 662, 329, 329, 664, 329, 662, 329, - 662, 550, 551, 552, 553, 554, 555, 556, - 669, 558, 559, 560, 561, 562, 563, 564, - 671, 672, 673, 674, 675, 676, 671, 672, - 673, 674, 675, 676, 671, 670, 677, 329, - 471, 660, 329, 678, 678, 678, 664, 329, - 500, 501, 502, 663, 661, 503, 504, 505, - 506, 507, 508, 509, 510, 511, 512, 513, - 514, 515, 516, 517, 518, 519, 520, 329, - 667, 679, 329, 329, 662, 678, 678, 664, - 678, 678, 664, 678, 678, 678, 664, 678, - 678, 664, 678, 678, 664, 678, 678, 329, - 664, 664, 673, 674, 675, 676, 670, 671, - 673, 674, 675, 676, 670, 671, 673, 674, - 675, 676, 670, 671, 673, 674, 675, 676, - 670, 671, 673, 674, 675, 676, 670, 671, - 673, 674, 675, 676, 670, 671, 673, 674, - 675, 676, 670, 671, 673, 674, 675, 676, - 670, 671, 673, 674, 675, 676, 670, 671, - 672, 677, 674, 675, 676, 670, 671, 672, - 674, 675, 676, 670, 671, 672, 674, 675, - 676, 670, 671, 672, 674, 675, 676, 670, - 671, 672, 674, 675, 676, 670, 671, 672, - 674, 675, 676, 670, 671, 672, 674, 675, - 676, 670, 671, 672, 674, 675, 676, 670, - 671, 672, 674, 675, 676, 670, 671, 672, - 673, 677, 675, 676, 670, 671, 672, 673, - 675, 676, 670, 671, 672, 673, 675, 676, - 670, 671, 672, 673, 675, 676, 670, 671, - 672, 673, 675, 680, 679, 674, 329, 677, - 678, 329, 662, 664, 330, 330, 329, 681, - 682, 683, 684, 685, 686, 687, 688, 689, - 690, 691, 538, 692, 540, 693, 694, 695, - 696, 697, 698, 652, 329, 471, 330, 330, - 330, 330, 329, 471, 330, 330, 329, 471, - 471, 330, 329, 330, 471, 330, 471, 330, - 329, 471, 330, 471, 330, 329, 471, 330, - 329, 471, 330, 471, 330, 471, 330, 329, - 471, 330, 329, 471, 330, 471, 330, 329, - 471, 330, 330, 471, 329, 330, 330, 471, - 329, 471, 330, 471, 329, 330, 330, 471, - 471, 471, 471, 330, 471, 330, 471, 330, - 329, 471, 471, 471, 471, 330, 330, 471, - 330, 471, 330, 329, 471, 471, 471, 330, - 471, 330, 329, 330, 471, 330, 329, 330, - 471, 330, 471, 330, 329, 471, 471, 330, - 329, 699, 700, 652, 329, 471, 471, 330, - 329, 471, 471, 330, 329, 652, 329, 701, - 703, 704, 705, 706, 707, 708, 703, 704, - 705, 706, 707, 708, 703, 652, 702, 677, - 329, 330, 660, 330, 329, 662, 662, 662, - 664, 329, 662, 662, 664, 662, 662, 664, - 662, 662, 662, 664, 662, 662, 664, 662, - 662, 664, 662, 662, 329, 664, 705, 706, - 707, 708, 702, 703, 705, 706, 707, 708, - 702, 703, 705, 706, 707, 708, 702, 703, - 705, 706, 707, 708, 702, 703, 705, 706, - 707, 708, 702, 703, 705, 706, 707, 708, - 702, 703, 705, 706, 707, 708, 702, 703, - 705, 706, 707, 708, 702, 703, 705, 706, - 707, 708, 702, 703, 704, 677, 706, 707, - 708, 702, 703, 704, 706, 707, 708, 702, - 703, 704, 706, 707, 708, 702, 703, 704, - 706, 707, 708, 702, 703, 704, 706, 707, - 708, 702, 703, 704, 706, 707, 708, 702, - 703, 704, 706, 707, 708, 702, 703, 704, - 706, 707, 708, 702, 703, 704, 706, 707, - 708, 702, 703, 704, 705, 677, 707, 708, - 702, 703, 704, 705, 707, 708, 702, 703, - 704, 705, 707, 708, 702, 703, 704, 705, - 707, 708, 702, 703, 704, 705, 707, 709, - 710, 706, 652, 329, 677, 662, 330, 662, - 664, 330, 664, 330, 329, 662, 711, 712, - 652, 329, 330, 329, 330, 330, 330, 329, - 714, 715, 716, 717, 718, 713, 329, 719, - 720, 721, 722, 723, 724, 652, 329, 328, - 330, 329, 328, 330, 329, 330, 328, 330, - 329, 328, 330, 329, 330, 328, 330, 329, - 328, 330, 329, 725, 652, 329, 330, 330, - 329, 726, 652, 329, 330, 330, 329, 727, - 652, 329, 330, 330, 329, 628, 538, 540, - 728, 729, 730, 731, 732, 733, 628, 538, - 538, 734, 540, 628, 538, 735, 736, 628, - 538, 737, 652, 738, 652, 739, 740, 741, - 742, 743, 744, 538, 745, 627, 538, 540, - 627, 628, 329, 471, 330, 471, 330, 329, - 330, 471, 330, 471, 329, 471, 330, 471, - 330, 471, 329, 746, 329, 471, 567, 568, - 569, 570, 571, 572, 747, 329, 748, 651, - 329, 471, 329, 330, 471, 471, 330, 471, - 330, 471, 329, 330, 471, 329, 330, 329, - 471, 471, 330, 329, 330, 471, 329, 330, - 329, 471, 330, 471, 329, 330, 471, 329, - 330, 471, 330, 329, 330, 471, 330, 471, - 330, 329, 330, 471, 330, 471, 329, 330, - 330, 471, 329, 330, 471, 329, 330, 329, - 471, 713, 329, 749, 713, 329, 384, 652, - 750, 652, 329, 330, 329, 328, 3, 1, - 328, 3, 1, 752, 753, 751, 1, 328, - 3, 1, 328, 3, 1, 754, 755, 756, - 757, 758, 751, 1, 759, 146, 760, 761, - 760, 761, 761, 760, 761, 761, 760, 761, - 761, 761, 760, 761, 760, 761, 761, 760, - 761, 761, 761, 761, 760, 761, 761, 760, - 760, 761, 761, 760, 761, 761, 760, 762, - 763, 764, 765, 766, 768, 769, 770, 772, - 773, 774, 775, 776, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 786, 787, 788, - 789, 767, 771, 760, 761, 761, 761, 761, - 760, 761, 760, 761, 761, 760, 760, 760, - 761, 760, 760, 760, 761, 761, 761, 761, - 760, 760, 760, 760, 760, 760, 760, 761, - 760, 760, 760, 760, 760, 760, 761, 760, - 760, 760, 760, 760, 761, 761, 761, 761, - 760, 761, 761, 761, 761, 761, 760, 761, - 761, 760, 761, 761, 761, 761, 760, 761, - 761, 760, 760, 760, 760, 760, 760, 761, - 761, 761, 761, 761, 761, 760, 761, 761, - 761, 760, 760, 760, 760, 760, 760, 761, - 761, 760, 761, 761, 761, 761, 761, 760, - 761, 761, 760, 761, 760, 761, 761, 760, - 761, 760, 761, 761, 761, 761, 761, 760, - 761, 760, 761, 761, 761, 761, 760, 761, - 760, 790, 791, 792, 793, 794, 795, 796, - 797, 798, 799, 800, 801, 802, 803, 804, - 805, 806, 807, 808, 809, 810, 760, 761, - 761, 760, 761, 761, 761, 760, 761, 761, - 761, 761, 760, 761, 760, 761, 761, 760, - 761, 761, 760, 761, 760, 760, 760, 761, - 761, 760, 761, 761, 760, 761, 761, 760, - 761, 760, 761, 761, 761, 761, 761, 760, - 761, 760, 761, 761, 760, 760, 760, 761, - 761, 761, 760, 761, 760, 761, 760, 761, - 761, 761, 761, 761, 760, 761, 761, 760, - 811, 812, 813, 814, 815, 760, 761, 816, - 760, 761, 761, 760, 817, 818, 812, 819, - 820, 821, 822, 823, 824, 825, 826, 827, - 828, 829, 830, 831, 832, 833, 834, 835, - 836, 813, 814, 815, 760, 761, 816, 761, - 760, 761, 760, 761, 760, 761, 761, 760, - 761, 761, 760, 761, 761, 760, 761, 760, - 761, 761, 761, 760, 761, 760, 761, 761, - 760, 761, 761, 760, 761, 761, 761, 760, - 760, 761, 761, 761, 760, 761, 760, 761, - 761, 761, 761, 761, 761, 761, 761, 760, - 761, 761, 761, 761, 761, 761, 761, 760, - 761, 761, 761, 761, 760, 761, 760, 761, - 761, 760, 761, 761, 760, 761, 760, 761, - 760, 761, 760, 837, 838, 839, 760, 761, - 761, 760, 761, 760, 761, 761, 760, 840, - 841, 842, 843, 844, 845, 846, 847, 848, - 849, 850, 851, 852, 853, 854, 760, 761, - 761, 760, 761, 760, 761, 760, 761, 761, - 761, 761, 760, 761, 761, 760, 760, 760, - 760, 761, 761, 760, 761, 760, 761, 761, - 760, 760, 760, 761, 761, 760, 761, 761, - 761, 760, 761, 761, 761, 761, 760, 761, - 761, 761, 760, 761, 761, 760, 855, 856, - 841, 760, 761, 760, 761, 761, 760, 857, - 858, 859, 860, 861, 862, 863, 760, 864, - 865, 866, 867, 868, 869, 870, 760, 761, - 760, 761, 760, 761, 760, 761, 761, 761, - 761, 761, 760, 761, 760, 761, 760, 761, - 760, 871, 872, 873, 874, 875, 876, 877, - 878, 879, 880, 881, 882, 883, 884, 885, - 886, 887, 884, 888, 889, 890, 891, 892, - 893, 894, 895, 896, 897, 898, 899, 900, - 901, 760, 761, 761, 760, 760, 761, 760, - 760, 761, 761, 761, 760, 761, 761, 760, - 761, 761, 760, 760, 760, 761, 761, 761, - 760, 761, 760, 761, 761, 761, 760, 761, - 761, 761, 761, 761, 761, 761, 760, 761, - 760, 761, 761, 760, 761, 760, 760, 761, - 761, 761, 760, 760, 760, 761, 760, 761, - 761, 760, 761, 760, 761, 760, 761, 761, - 761, 760, 761, 761, 761, 760, 761, 761, - 760, 761, 760, 761, 761, 760, 761, 761, - 760, 761, 761, 761, 761, 760, 760, 760, - 761, 761, 761, 761, 760, 761, 760, 902, - 903, 904, 905, 760, 761, 760, 761, 760, - 761, 761, 760, 760, 760, 761, 906, 760, - 761, 760, 907, 908, 909, 910, 911, 912, - 760, 761, 761, 761, 760, 760, 760, 760, - 761, 761, 760, 761, 761, 760, 760, 760, - 761, 761, 761, 761, 760, 913, 903, 914, - 915, 916, 760, 761, 761, 761, 761, 761, - 760, 761, 760, 761, 760, 761, 760, 918, - 828, 830, 919, 920, 921, 922, 923, 924, - 918, 828, 828, 828, 830, 918, 828, 925, - 926, 918, 828, 927, 828, 928, 929, 930, - 931, 932, 828, 933, 934, 828, 935, 917, - 830, 917, 918, 760, 761, 761, 761, 760, - 761, 761, 760, 761, 761, 761, 760, 760, - 761, 761, 761, 761, 761, 761, 760, 761, - 760, 761, 760, 761, 760, 760, 761, 761, - 760, 761, 760, 761, 760, 761, 761, 760, - 761, 761, 760, 761, 761, 760, 761, 761, - 760, 760, 761, 936, 760, 937, 828, 917, - 938, 918, 760, 761, 760, 939, 838, 760, - 761, 760, 857, 858, 859, 860, 861, 862, - 940, 760, 941, 760, 761, 760, 790, 791, - 792, 754, 755, 942, 793, 794, 795, 796, - 797, 798, 799, 800, 801, 802, 803, 804, - 805, 806, 807, 808, 809, 810, 760, 943, - 759, 790, 791, 792, 944, 756, 757, 793, - 794, 795, 796, 797, 798, 799, 800, 801, - 802, 803, 804, 805, 806, 807, 808, 809, - 810, 760, 943, 760, 945, 943, 790, 791, - 792, 946, 757, 793, 794, 795, 796, 797, - 798, 799, 800, 801, 802, 803, 804, 805, - 806, 807, 808, 809, 810, 760, 945, 760, - 146, 945, 947, 760, 945, 760, 948, 949, - 760, 943, 760, 760, 945, 760, 943, 760, - 943, 840, 841, 842, 843, 844, 845, 846, - 950, 848, 849, 850, 851, 852, 853, 854, - 952, 953, 954, 955, 956, 957, 952, 953, - 954, 955, 956, 957, 952, 951, 958, 760, - 761, 759, 760, 959, 959, 959, 945, 760, - 790, 791, 792, 944, 942, 793, 794, 795, - 796, 797, 798, 799, 800, 801, 802, 803, - 804, 805, 806, 807, 808, 809, 810, 760, - 948, 960, 760, 760, 943, 959, 959, 945, - 959, 959, 945, 959, 959, 959, 945, 959, - 959, 945, 959, 959, 945, 959, 959, 760, - 945, 945, 954, 955, 956, 957, 951, 952, - 954, 955, 956, 957, 951, 952, 954, 955, - 956, 957, 951, 952, 954, 955, 956, 957, - 951, 952, 954, 955, 956, 957, 951, 952, - 954, 955, 956, 957, 951, 952, 954, 955, - 956, 957, 951, 952, 954, 955, 956, 957, - 951, 952, 954, 955, 956, 957, 951, 952, - 953, 958, 955, 956, 957, 951, 952, 953, - 955, 956, 957, 951, 952, 953, 955, 956, - 957, 951, 952, 953, 955, 956, 957, 951, - 952, 953, 955, 956, 957, 951, 952, 953, - 955, 956, 957, 951, 952, 953, 955, 956, - 957, 951, 952, 953, 955, 956, 957, 951, - 952, 953, 955, 956, 957, 951, 952, 953, - 954, 958, 956, 957, 951, 952, 953, 954, - 956, 957, 951, 952, 953, 954, 956, 957, - 951, 952, 953, 954, 956, 957, 951, 952, - 953, 954, 956, 961, 960, 955, 760, 958, - 959, 760, 943, 945, 144, 3, 1, 962, - 963, 964, 965, 966, 967, 968, 969, 970, - 971, 972, 214, 973, 216, 974, 975, 976, - 977, 978, 979, 751, 1, 144, 980, 145, - 3, 144, 3, 144, 3, 1, 980, 981, - 981, 980, 980, 981, 980, 980, 981, 980, - 980, 980, 981, 980, 981, 980, 980, 981, - 980, 980, 980, 980, 981, 980, 980, 981, - 981, 980, 980, 981, 980, 980, 981, 982, - 983, 984, 985, 986, 988, 989, 990, 992, - 993, 994, 995, 996, 997, 998, 999, 1000, - 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, - 1009, 987, 991, 981, 980, 980, 980, 980, - 981, 980, 981, 980, 980, 981, 981, 981, - 980, 981, 981, 981, 980, 980, 980, 980, - 981, 981, 981, 981, 981, 981, 981, 980, - 981, 981, 981, 981, 981, 981, 980, 981, - 981, 981, 981, 981, 980, 980, 980, 980, - 981, 980, 980, 980, 980, 980, 981, 980, - 980, 981, 980, 980, 980, 980, 981, 980, - 980, 981, 981, 981, 981, 981, 981, 980, - 980, 980, 980, 980, 980, 981, 980, 980, - 980, 981, 981, 981, 981, 981, 981, 980, - 980, 981, 980, 980, 980, 980, 980, 981, - 980, 980, 981, 980, 981, 980, 980, 981, - 980, 981, 980, 980, 980, 980, 980, 981, - 980, 981, 980, 980, 980, 980, 981, 980, - 981, 1010, 1011, 1012, 1013, 1014, 1015, 1016, - 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, - 1025, 1026, 1027, 1028, 1029, 1030, 981, 980, - 980, 981, 980, 980, 980, 981, 980, 980, - 980, 980, 981, 980, 981, 980, 980, 981, - 980, 980, 981, 980, 981, 981, 981, 980, - 980, 981, 980, 980, 981, 980, 980, 981, - 980, 981, 980, 980, 980, 980, 980, 981, - 980, 981, 980, 980, 981, 981, 981, 980, - 980, 980, 981, 980, 981, 980, 981, 980, - 980, 980, 980, 980, 981, 980, 980, 981, - 1031, 1032, 1033, 1034, 1035, 981, 980, 981, - 980, 981, 980, 981, 980, 981, 980, 981, - 1036, 1037, 981, 980, 981, 980, 981, 1038, - 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, - 1047, 1048, 1049, 1050, 1051, 1052, 981, 980, - 980, 981, 980, 981, 980, 981, 980, 980, - 980, 980, 981, 980, 980, 981, 981, 981, - 981, 980, 980, 981, 980, 981, 980, 980, - 981, 981, 981, 980, 980, 981, 980, 980, - 980, 981, 980, 980, 980, 980, 981, 980, - 980, 980, 981, 980, 980, 981, 1053, 1054, - 1039, 981, 980, 981, 980, 980, 981, 1055, - 1056, 1057, 1058, 1059, 1060, 1061, 981, 1062, - 1063, 1064, 1065, 1066, 1067, 1068, 981, 980, - 981, 980, 981, 980, 981, 980, 980, 980, - 980, 980, 981, 980, 981, 980, 981, 980, - 981, 1069, 1070, 1071, 1072, 1073, 1074, 1075, - 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, - 1084, 1085, 1082, 1086, 1087, 1088, 1089, 1090, - 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, - 1099, 981, 980, 980, 981, 981, 980, 981, - 981, 980, 980, 980, 981, 980, 980, 981, - 980, 980, 981, 981, 981, 980, 980, 980, - 981, 980, 981, 980, 980, 980, 981, 980, - 980, 980, 980, 980, 980, 980, 981, 980, - 981, 980, 980, 981, 980, 981, 981, 980, - 980, 980, 981, 981, 981, 980, 981, 980, - 980, 981, 980, 981, 980, 981, 980, 980, - 980, 981, 980, 980, 980, 981, 980, 980, - 981, 980, 981, 980, 980, 981, 980, 980, - 981, 980, 980, 980, 980, 981, 981, 981, - 980, 980, 980, 980, 981, 980, 981, 1100, - 1101, 1102, 1103, 981, 980, 981, 980, 981, - 980, 980, 981, 981, 981, 980, 1104, 981, - 980, 981, 1105, 1106, 1107, 1108, 1109, 1110, - 981, 980, 980, 980, 981, 981, 981, 981, - 980, 980, 981, 980, 980, 981, 981, 981, - 980, 980, 980, 980, 981, 1111, 1101, 1112, - 1113, 1114, 981, 980, 980, 980, 980, 980, - 981, 980, 981, 980, 981, 980, 981, 1115, - 981, 980, 981, 1116, 981, 1117, 1118, 1119, - 1121, 1120, 981, 980, 981, 981, 980, 980, - 145, 3, 144, 3, 1, 145, 145, 3, - 1, 3, 145, 3, 145, 3, 1, 145, - 3, 145, 3, 1, 145, 3, 1, 145, - 3, 145, 3, 145, 3, 1, 145, 3, - 1, 145, 3, 145, 3, 1, 145, 3, - 3, 145, 1, 3, 3, 145, 1, 145, - 3, 145, 1, 3, 3, 145, 145, 145, - 145, 3, 145, 3, 145, 3, 1, 145, - 145, 145, 145, 3, 3, 145, 3, 145, - 3, 1, 145, 145, 145, 3, 145, 3, - 1, 3, 145, 3, 1, 3, 145, 3, - 145, 3, 1, 145, 145, 3, 1, 1122, - 1123, 751, 1, 145, 145, 3, 1, 145, - 145, 3, 1, 751, 1, 1124, 1126, 1127, - 1128, 1129, 1130, 1131, 1126, 1127, 1128, 1129, - 1130, 1131, 1126, 751, 1125, 958, 1, 3, - 759, 3, 1, 943, 943, 943, 945, 1, - 943, 943, 945, 943, 943, 945, 943, 943, - 943, 945, 943, 943, 945, 943, 943, 945, - 943, 943, 1, 945, 1128, 1129, 1130, 1131, - 1125, 1126, 1128, 1129, 1130, 1131, 1125, 1126, - 1128, 1129, 1130, 1131, 1125, 1126, 1128, 1129, - 1130, 1131, 1125, 1126, 1128, 1129, 1130, 1131, - 1125, 1126, 1128, 1129, 1130, 1131, 1125, 1126, - 1128, 1129, 1130, 1131, 1125, 1126, 1128, 1129, - 1130, 1131, 1125, 1126, 1128, 1129, 1130, 1131, - 1125, 1126, 1127, 958, 1129, 1130, 1131, 1125, - 1126, 1127, 1129, 1130, 1131, 1125, 1126, 1127, - 1129, 1130, 1131, 1125, 1126, 1127, 1129, 1130, - 1131, 1125, 1126, 1127, 1129, 1130, 1131, 1125, - 1126, 1127, 1129, 1130, 1131, 1125, 1126, 1127, - 1129, 1130, 1131, 1125, 1126, 1127, 1129, 1130, - 1131, 1125, 1126, 1127, 1129, 1130, 1131, 1125, - 1126, 1127, 1128, 958, 1130, 1131, 1125, 1126, - 1127, 1128, 1130, 1131, 1125, 1126, 1127, 1128, - 1130, 1131, 1125, 1126, 1127, 1128, 1130, 1131, - 1125, 1126, 1127, 1128, 1130, 1132, 1133, 1129, - 751, 1, 958, 943, 3, 943, 945, 3, - 945, 3, 1, 943, 1134, 1135, 751, 1, - 144, 3, 1, 3, 3, 144, 3, 1, - 1137, 1138, 1139, 1140, 1141, 1136, 1, 1142, - 1143, 1144, 1145, 1146, 1147, 751, 1, 328, - 3, 1, 328, 3, 1, 3, 328, 3, - 1, 328, 3, 1, 3, 328, 3, 1, - 328, 3, 1, 1148, 751, 1, 3, 144, - 3, 1, 1149, 751, 1, 3, 144, 3, - 1, 1150, 751, 1, 3, 144, 3, 1, - 304, 214, 216, 1151, 1152, 1153, 1154, 1155, - 1156, 304, 214, 214, 1157, 216, 304, 214, - 1158, 1159, 304, 214, 1160, 751, 1161, 751, - 1162, 1163, 1164, 1165, 1166, 1167, 214, 1168, - 303, 214, 216, 303, 304, 1, 145, 3, - 145, 3, 1, 3, 145, 3, 145, 1, - 145, 3, 145, 3, 145, 1, 1169, 1, - 145, 1170, 1171, 1170, 1171, 1171, 1170, 1171, - 1171, 1170, 1171, 1171, 1171, 1170, 1171, 1170, - 1171, 1171, 1170, 1171, 1171, 1171, 1171, 1170, - 1171, 1171, 1170, 1170, 1171, 1171, 1170, 1171, - 1171, 1170, 1172, 1173, 1174, 1175, 1176, 1178, - 1179, 1180, 1182, 1183, 1184, 1185, 1186, 1187, - 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, - 1196, 1197, 1198, 1199, 1177, 1181, 1170, 1171, - 1171, 1171, 1171, 1170, 1171, 1170, 1171, 1171, - 1170, 1170, 1170, 1171, 1170, 1170, 1170, 1171, - 1171, 1171, 1171, 1170, 1170, 1170, 1170, 1170, - 1170, 1170, 1171, 1170, 1170, 1170, 1170, 1170, - 1170, 1171, 1170, 1170, 1170, 1170, 1170, 1171, - 1171, 1171, 1171, 1170, 1171, 1171, 1171, 1171, - 1171, 1170, 1171, 1171, 1170, 1171, 1171, 1171, - 1171, 1170, 1171, 1171, 1170, 1170, 1170, 1170, - 1170, 1170, 1171, 1171, 1171, 1171, 1171, 1171, - 1170, 1171, 1171, 1171, 1170, 1170, 1170, 1170, - 1170, 1170, 1171, 1171, 1170, 1171, 1171, 1171, - 1171, 1171, 1170, 1171, 1171, 1170, 1171, 1170, - 1171, 1171, 1170, 1171, 1170, 1171, 1171, 1171, - 1171, 1171, 1170, 1171, 1170, 1171, 1171, 1171, - 1171, 1170, 1171, 1170, 1200, 1201, 1202, 1203, - 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, - 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, - 1220, 1170, 1171, 1171, 1170, 1171, 1171, 1171, - 1170, 1171, 1171, 1171, 1171, 1170, 1171, 1170, - 1171, 1171, 1170, 1171, 1171, 1170, 1171, 1170, - 1170, 1170, 1171, 1171, 1170, 1171, 1171, 1170, - 1171, 1171, 1170, 1171, 1170, 1171, 1171, 1171, - 1171, 1171, 1170, 1171, 1170, 1171, 1171, 1170, - 1170, 1170, 1171, 1171, 1171, 1170, 1171, 1170, - 1171, 1170, 1171, 1171, 1171, 1171, 1171, 1170, - 1171, 1171, 1170, 1221, 1222, 1223, 1224, 1225, - 1170, 1171, 1226, 1170, 1171, 1171, 1170, 1227, - 1228, 1222, 1229, 1230, 1231, 1232, 1233, 1234, - 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, - 1243, 1244, 1245, 1246, 1223, 1224, 1225, 1170, - 1171, 1226, 1171, 1170, 1171, 1170, 1171, 1170, - 1171, 1171, 1170, 1171, 1171, 1170, 1171, 1171, - 1170, 1171, 1170, 1171, 1171, 1171, 1170, 1171, - 1170, 1171, 1171, 1170, 1171, 1171, 1170, 1171, - 1171, 1171, 1170, 1170, 1171, 1171, 1171, 1170, - 1171, 1170, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1170, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1170, 1171, 1171, 1171, 1171, 1170, - 1171, 1170, 1171, 1171, 1170, 1171, 1171, 1170, - 1171, 1170, 1171, 1170, 1171, 1170, 1247, 1248, - 1249, 1170, 1171, 1171, 1170, 1171, 1170, 1171, - 1171, 1170, 1250, 1251, 1252, 1253, 1254, 1255, - 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, - 1264, 1170, 1171, 1171, 1170, 1171, 1170, 1171, - 1170, 1171, 1171, 1171, 1171, 1170, 1171, 1171, - 1170, 1170, 1170, 1170, 1171, 1171, 1170, 1171, - 1170, 1171, 1171, 1170, 1170, 1170, 1171, 1171, - 1170, 1171, 1171, 1171, 1170, 1171, 1171, 1171, - 1171, 1170, 1171, 1171, 1171, 1170, 1171, 1171, - 1170, 1265, 1266, 1251, 1170, 1171, 1170, 1171, - 1171, 1170, 1267, 1268, 1269, 1270, 1271, 1272, - 1273, 1170, 1274, 1275, 1276, 1277, 1278, 1279, - 1280, 1170, 1171, 1170, 1171, 1170, 1171, 1170, - 1171, 1171, 1171, 1171, 1171, 1170, 1171, 1170, - 1171, 1170, 1171, 1170, 1281, 1282, 1283, 1284, - 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, - 1293, 1294, 1295, 1296, 1297, 1294, 1298, 1299, - 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, - 1308, 1309, 1310, 1311, 1170, 1171, 1171, 1170, - 1170, 1171, 1170, 1170, 1171, 1171, 1171, 1170, - 1171, 1171, 1170, 1171, 1171, 1170, 1170, 1170, - 1171, 1171, 1171, 1170, 1171, 1170, 1171, 1171, - 1171, 1170, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1170, 1171, 1170, 1171, 1171, 1170, 1171, - 1170, 1170, 1171, 1171, 1171, 1170, 1170, 1170, - 1171, 1170, 1171, 1171, 1170, 1171, 1170, 1171, - 1170, 1171, 1171, 1171, 1170, 1171, 1171, 1171, - 1170, 1171, 1171, 1170, 1171, 1170, 1171, 1171, - 1170, 1171, 1171, 1170, 1171, 1171, 1171, 1171, - 1170, 1170, 1170, 1171, 1171, 1171, 1171, 1170, - 1171, 1170, 1312, 1313, 1314, 1315, 1170, 1171, - 1170, 1171, 1170, 1171, 1171, 1170, 1170, 1170, - 1171, 1316, 1170, 1171, 1170, 1317, 1318, 1319, - 1320, 1321, 1322, 1170, 1171, 1171, 1171, 1170, - 1170, 1170, 1170, 1171, 1171, 1170, 1171, 1171, - 1170, 1170, 1170, 1171, 1171, 1171, 1171, 1170, - 1323, 1313, 1324, 1325, 1326, 1170, 1171, 1171, - 1171, 1171, 1171, 1170, 1171, 1170, 1171, 1170, - 1171, 1170, 1328, 1238, 1240, 1329, 1330, 1331, - 1332, 1333, 1334, 1328, 1238, 1238, 1238, 1240, - 1328, 1238, 1335, 1336, 1328, 1238, 1337, 1238, - 1338, 1339, 1340, 1341, 1342, 1238, 1343, 1344, - 1238, 1345, 1327, 1240, 1327, 1328, 1170, 1171, - 1171, 1171, 1170, 1171, 1171, 1170, 1171, 1171, - 1171, 1170, 1170, 1171, 1171, 1171, 1171, 1171, - 1171, 1170, 1171, 1170, 1171, 1170, 1171, 1170, - 1170, 1171, 1171, 1170, 1171, 1170, 1171, 1170, - 1171, 1171, 1170, 1171, 1171, 1170, 1171, 1171, - 1170, 1171, 1171, 1170, 1170, 1171, 1346, 1170, - 1347, 1238, 1327, 1348, 1328, 1170, 1171, 1170, - 1349, 1248, 1170, 1171, 1170, 1267, 1268, 1269, - 1270, 1271, 1272, 1350, 1170, 1351, 1170, 1171, - 1170, 1267, 1268, 1269, 1270, 1271, 1272, 1352, - 1170, 1353, 1351, 1170, 1171, 1170, 3, 145, - 145, 3, 145, 3, 145, 1, 3, 145, - 1, 3, 1, 145, 145, 3, 1, 3, - 145, 1, 3, 1, 145, 3, 145, 1, - 3, 145, 1, 3, 145, 3, 1, 3, - 145, 3, 145, 3, 1, 3, 145, 3, - 145, 1, 3, 3, 145, 1, 3, 145, - 1, 3, 1, 145, 1136, 1, 1354, 1136, - 1, 1355, 1356, 1357, 1358, 1357, 751, 1359, - 1, 144, 3, 1, 1, 144, 1, 144, - 3, 144, 1, 144, 1, 1361, 1360, 1364, - 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1373, - 1374, 1375, 1376, 1377, 1378, 1380, 1360, 1, - 1363, 1372, 1379, 1, 1362, 141, 143, 1382, - 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, - 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, - 1399, 1381, 303, 324, 1401, 1402, 1403, 1404, - 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, - 1413, 1414, 1415, 1416, 1417, 1418, 1400, 1419, - 303, 324, 1401, 1402, 1403, 1404, 1405, 1406, - 1407, 1408, 1409, 1410, 1411, 1412, 1420, 1421, - 1415, 1416, 1422, 1418, 1400, 1424, 1425, 1426, - 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, - 1435, 1436, 1437, 1439, 330, 652, 713, 1438, - 1423, 468, 470, 1440, 1441, 1442, 1443, 1444, - 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, - 1453, 1454, 1455, 1456, 1457, 1423, 627, 648, - 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, - 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, - 1474, 1475, 1423, 1476, 627, 648, 1458, 1459, - 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, - 1468, 1469, 1477, 1478, 1472, 1473, 1479, 1475, - 1423, 627, 648, 1458, 1459, 1460, 1461, 1462, - 1463, 1464, 1465, 1466, 1467, 1468, 1480, 1470, - 1471, 1481, 1482, 1483, 1484, 1473, 1474, 1475, - 1423, 627, 648, 1458, 1459, 1460, 1461, 1462, - 1463, 1464, 1465, 1466, 1467, 1468, 1485, 1470, - 1471, 1472, 1486, 1473, 1474, 1475, 1423, 627, - 648, 1458, 1459, 1460, 1461, 1462, 1463, 1464, - 1465, 1466, 1467, 1468, 1487, 1470, 1471, 1472, - 1488, 1473, 1474, 1475, 1423, 627, 648, 1458, - 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, - 1467, 1468, 1489, 1470, 1471, 1472, 1490, 1473, - 1474, 1475, 1423, 627, 648, 1458, 1459, 1460, - 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, - 1469, 1470, 1471, 1472, 1473, 1491, 1475, 1423, - 917, 938, 1493, 1494, 1495, 1496, 1497, 1498, - 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, - 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1492, - 917, 938, 1493, 1494, 1495, 1496, 1497, 1498, - 1499, 1500, 1501, 1502, 1503, 1514, 1505, 1506, - 1515, 1511, 1512, 1513, 1492, 1516, 917, 938, - 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, - 1501, 1502, 1503, 1514, 1517, 1518, 1515, 1511, - 1519, 1513, 1492, 917, 938, 1493, 1494, 1495, - 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, - 1520, 1505, 1506, 1515, 1521, 1511, 1512, 1513, - 1492, 917, 938, 1493, 1494, 1495, 1496, 1497, - 1498, 1499, 1500, 1501, 1502, 1503, 1522, 1505, - 1506, 1515, 1523, 1511, 1512, 1513, 1492, 917, - 938, 1493, 1494, 1495, 1496, 1497, 1498, 1499, - 1500, 1501, 1502, 1503, 1524, 1505, 1506, 1515, - 1525, 1511, 1512, 1513, 1492, 1119, 1121, 1527, - 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, - 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, - 1544, 1526, 1327, 1348, 1546, 1547, 1548, 1549, - 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, - 1558, 1559, 1560, 1561, 1562, 1563, 1545, 1327, - 1348, 1546, 1547, 1548, 1549, 1550, 1551, 1552, - 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, - 1561, 1564, 1563, 1545, 1565, 1327, 1348, 1546, - 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, - 1555, 1556, 1557, 1566, 1567, 1560, 1561, 1568, - 1563, 1545, -} - -var _graphclust_trans_targs []int16 = []int16{ - 1528, 0, 1528, 1529, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 66, 67, 68, - 69, 70, 72, 73, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 91, 92, 94, 102, 134, - 139, 141, 148, 153, 95, 96, 97, 98, - 99, 100, 101, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 135, 136, 137, 138, 140, 142, - 143, 144, 145, 146, 147, 149, 150, 151, - 152, 154, 156, 157, 158, 2, 159, 3, - 1528, 1530, 1528, 1528, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, - 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 226, 231, 250, - 251, 252, 1531, 229, 230, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 254, - 255, 256, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, - 272, 274, 275, 277, 285, 317, 322, 324, - 331, 336, 278, 279, 280, 281, 282, 283, - 284, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, - 318, 319, 320, 321, 323, 325, 326, 327, - 328, 329, 330, 332, 333, 334, 335, 162, - 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 356, 357, 163, 359, 361, 362, - 1532, 1528, 1533, 377, 378, 379, 380, 381, - 382, 383, 384, 385, 386, 387, 388, 389, - 390, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 406, - 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 428, 429, 430, 431, - 432, 434, 435, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, - 450, 451, 453, 454, 456, 464, 496, 501, - 503, 510, 515, 457, 458, 459, 460, 461, - 462, 463, 465, 466, 467, 468, 469, 470, - 471, 472, 473, 474, 475, 476, 477, 478, - 479, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 491, 492, 493, 494, - 495, 497, 498, 499, 500, 502, 504, 505, - 506, 507, 508, 509, 511, 512, 513, 514, - 516, 518, 519, 520, 364, 521, 365, 1534, - 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, - 553, 554, 555, 556, 557, 558, 559, 560, - 561, 562, 563, 564, 566, 567, 568, 569, - 570, 571, 572, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, - 586, 588, 593, 612, 613, 614, 1535, 591, - 592, 594, 595, 596, 597, 598, 599, 600, - 601, 602, 603, 604, 605, 606, 607, 608, - 609, 610, 611, 616, 617, 618, 620, 621, - 622, 623, 624, 625, 626, 627, 628, 629, - 630, 631, 632, 633, 634, 636, 637, 639, - 647, 679, 684, 686, 693, 698, 640, 641, - 642, 643, 644, 645, 646, 648, 649, 650, - 651, 652, 653, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 669, 670, 671, 672, 673, 674, - 675, 676, 677, 678, 680, 681, 682, 683, - 685, 687, 688, 689, 690, 691, 692, 694, - 695, 696, 697, 524, 699, 700, 701, 702, - 703, 704, 705, 706, 707, 708, 709, 710, - 711, 712, 713, 714, 715, 716, 718, 719, - 525, 721, 723, 724, 522, 729, 730, 732, - 734, 737, 740, 764, 1536, 746, 1537, 736, - 1538, 739, 742, 744, 745, 748, 749, 753, - 754, 755, 756, 757, 758, 759, 1539, 752, - 763, 766, 767, 768, 769, 770, 771, 772, - 773, 774, 775, 776, 777, 778, 779, 780, - 781, 782, 783, 785, 786, 789, 790, 791, - 792, 793, 794, 795, 796, 800, 801, 803, - 804, 787, 806, 813, 815, 817, 819, 807, - 808, 809, 810, 811, 812, 814, 816, 818, - 820, 821, 822, 823, 827, 828, 829, 830, - 831, 832, 833, 834, 835, 836, 837, 838, - 839, 840, 1540, 825, 826, 843, 844, 160, - 848, 849, 851, 1054, 1057, 1060, 1084, 1541, - 1528, 1542, 865, 866, 867, 868, 869, 870, - 871, 872, 873, 874, 875, 876, 877, 878, - 879, 880, 881, 882, 883, 884, 885, 886, - 887, 888, 889, 890, 891, 892, 894, 895, - 896, 897, 898, 899, 900, 901, 902, 903, - 904, 905, 906, 907, 908, 909, 910, 911, - 912, 913, 914, 916, 921, 940, 941, 942, - 1543, 919, 920, 922, 923, 924, 925, 926, - 927, 928, 929, 930, 931, 932, 933, 934, - 935, 936, 937, 938, 939, 944, 945, 946, - 948, 949, 950, 951, 952, 953, 954, 955, - 956, 957, 958, 959, 960, 961, 962, 964, - 965, 967, 975, 1007, 1012, 1014, 1021, 1026, - 968, 969, 970, 971, 972, 973, 974, 976, - 977, 978, 979, 980, 981, 982, 983, 984, - 985, 986, 987, 988, 989, 990, 991, 992, - 993, 994, 995, 996, 997, 998, 999, 1000, - 1001, 1002, 1003, 1004, 1005, 1006, 1008, 1009, - 1010, 1011, 1013, 1015, 1016, 1017, 1018, 1019, - 1020, 1022, 1023, 1024, 1025, 852, 1027, 1028, - 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, - 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, - 1046, 1047, 853, 1049, 1051, 1052, 1066, 1544, - 1056, 1545, 1059, 1062, 1064, 1065, 1068, 1069, - 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1546, - 1072, 1083, 1086, 1245, 1246, 1247, 1248, 1249, - 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1547, 1528, 1100, 1101, - 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, - 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, - 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, - 1126, 1127, 1129, 1130, 1131, 1132, 1133, 1134, - 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, - 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1151, - 1152, 1153, 1154, 1155, 1157, 1158, 1160, 1161, - 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, - 1170, 1171, 1172, 1173, 1174, 1176, 1177, 1179, - 1187, 1219, 1224, 1226, 1233, 1238, 1180, 1181, - 1182, 1183, 1184, 1185, 1186, 1188, 1189, 1190, - 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, - 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, - 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, - 1215, 1216, 1217, 1218, 1220, 1221, 1222, 1223, - 1225, 1227, 1228, 1229, 1230, 1231, 1232, 1234, - 1235, 1236, 1237, 1239, 1241, 1242, 1243, 1087, - 1244, 1088, 1263, 1264, 1267, 1268, 1269, 1270, - 1271, 1272, 1273, 1274, 1278, 1279, 1281, 1282, - 1265, 1284, 1291, 1293, 1295, 1297, 1285, 1286, - 1287, 1288, 1289, 1290, 1292, 1294, 1296, 1298, - 1299, 1300, 1301, 1506, 1507, 1508, 1509, 1510, - 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, - 1519, 1548, 1528, 1549, 1315, 1316, 1317, 1318, - 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, - 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, - 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, - 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, - 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, - 1360, 1361, 1362, 1363, 1364, 1366, 1371, 1390, - 1391, 1392, 1550, 1369, 1370, 1372, 1373, 1374, - 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, - 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1394, - 1395, 1396, 1398, 1399, 1400, 1401, 1402, 1403, - 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, - 1412, 1414, 1415, 1417, 1425, 1457, 1462, 1464, - 1471, 1476, 1418, 1419, 1420, 1421, 1422, 1423, - 1424, 1426, 1427, 1428, 1429, 1430, 1431, 1432, - 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, - 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, - 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, - 1458, 1459, 1460, 1461, 1463, 1465, 1466, 1467, - 1468, 1469, 1470, 1472, 1473, 1474, 1475, 1302, - 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, - 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, - 1493, 1494, 1496, 1497, 1303, 1499, 1501, 1502, - 1504, 1505, 1522, 1523, 1524, 1525, 1526, 1527, - 1528, 1, 1529, 160, 161, 363, 845, 846, - 847, 850, 1085, 1262, 1265, 1266, 1275, 1276, - 1277, 1280, 1283, 1520, 1521, 1528, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, - 14, 43, 65, 71, 74, 90, 93, 155, - 1528, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 203, 225, 358, 257, - 273, 360, 355, 227, 228, 253, 276, 1528, - 523, 725, 726, 727, 728, 731, 765, 784, - 788, 797, 798, 799, 802, 805, 841, 842, - 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 405, 427, 433, 436, 452, - 455, 517, 526, 527, 528, 529, 530, 531, - 532, 533, 534, 535, 536, 565, 587, 720, - 619, 635, 722, 717, 589, 590, 615, 638, - 733, 747, 760, 761, 762, 735, 743, 738, - 741, 750, 751, 824, 1528, 854, 855, 856, - 857, 858, 859, 860, 861, 862, 863, 864, - 1053, 915, 1048, 1067, 1080, 1081, 1082, 963, - 1050, 1045, 893, 947, 917, 918, 943, 966, - 1055, 1063, 1058, 1061, 1070, 1071, 1528, 1089, - 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, - 1098, 1099, 1128, 1150, 1156, 1159, 1175, 1178, - 1240, 1528, 1304, 1305, 1306, 1307, 1308, 1309, - 1310, 1311, 1312, 1313, 1314, 1343, 1365, 1498, - 1397, 1413, 1503, 1495, 1500, 1367, 1368, 1393, - 1416, -} - -var _graphclust_trans_actions []byte = []byte{ - 31, 0, 27, 40, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 34, 55, 29, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 40, 25, 40, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 0, 40, 0, - 40, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 40, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 51, - 17, 40, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 40, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 51, - 0, 51, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 21, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 40, 23, 40, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 40, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 43, 1, 47, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 13, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -} - -var _graphclust_to_state_actions []byte = []byte{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -} - -var _graphclust_from_state_actions []byte = []byte{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -} - -var _graphclust_eof_trans []int16 = []int16{ - 0, 0, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 0, 0, 147, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 147, 148, 147, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 147, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 0, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 0, 0, 0, - 0, 0, 0, 147, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 147, 761, - 761, 147, 761, 761, 147, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 761, - 761, 761, 761, 761, 761, 761, 761, 147, - 761, 761, 761, 761, 0, 0, 0, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 982, 982, 982, - 982, 982, 982, 982, 982, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1382, 1401, 1401, 1424, 1424, 1424, 1424, - 1424, 1424, 1424, 1424, 1424, 1493, 1493, 1493, - 1493, 1493, 1493, 1527, 1546, 1546, 1546, -} - -const graphclust_start int = 1528 -const graphclust_first_final int = 1528 -const graphclust_error int = 0 - -const graphclust_en_main int = 1528 - -//line grapheme_clusters.rl:14 - -var Error = errors.New("invalid UTF8 text") - -// ScanGraphemeClusters is a split function for bufio.Scanner that splits -// on grapheme cluster boundaries. -func ScanGraphemeClusters(data []byte, atEOF bool) (int, []byte, error) { - if len(data) == 0 { - return 0, nil, nil - } - - // Ragel state - cs := 0 // Current State - p := 0 // "Pointer" into data - pe := len(data) // End-of-data "pointer" - ts := 0 - te := 0 - act := 0 - eof := pe - - // Make Go compiler happy - _ = ts - _ = te - _ = act - _ = eof - - startPos := 0 - endPos := 0 - -//line grapheme_clusters.go:3787 - { - cs = graphclust_start - ts = 0 - te = 0 - act = 0 - } - -//line grapheme_clusters.go:3795 - { - var _klen int - var _trans int - var _acts int - var _nacts uint - var _keys int - if p == pe { - goto _test_eof - } - if cs == 0 { - goto _out - } - _resume: - _acts = int(_graphclust_from_state_actions[cs]) - _nacts = uint(_graphclust_actions[_acts]) - _acts++ - for ; _nacts > 0; _nacts-- { - _acts++ - switch _graphclust_actions[_acts-1] { - case 4: -//line NONE:1 - ts = p - -//line grapheme_clusters.go:3818 - } - } - - _keys = int(_graphclust_key_offsets[cs]) - _trans = int(_graphclust_index_offsets[cs]) - - _klen = int(_graphclust_single_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + _klen - 1) - for { - if _upper < _lower { - break - } - - _mid = _lower + ((_upper - _lower) >> 1) - switch { - case data[p] < _graphclust_trans_keys[_mid]: - _upper = _mid - 1 - case data[p] > _graphclust_trans_keys[_mid]: - _lower = _mid + 1 - default: - _trans += int(_mid - int(_keys)) - goto _match - } - } - _keys += _klen - _trans += _klen - } - - _klen = int(_graphclust_range_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + (_klen << 1) - 2) - for { - if _upper < _lower { - break - } - - _mid = _lower + (((_upper - _lower) >> 1) & ^1) - switch { - case data[p] < _graphclust_trans_keys[_mid]: - _upper = _mid - 2 - case data[p] > _graphclust_trans_keys[_mid+1]: - _lower = _mid + 2 - default: - _trans += int((_mid - int(_keys)) >> 1) - goto _match - } - } - _trans += _klen - } - - _match: - _trans = int(_graphclust_indicies[_trans]) - _eof_trans: - cs = int(_graphclust_trans_targs[_trans]) - - if _graphclust_trans_actions[_trans] == 0 { - goto _again - } - - _acts = int(_graphclust_trans_actions[_trans]) - _nacts = uint(_graphclust_actions[_acts]) - _acts++ - for ; _nacts > 0; _nacts-- { - _acts++ - switch _graphclust_actions[_acts-1] { - case 0: -//line grapheme_clusters.rl:47 - - startPos = p - - case 1: -//line grapheme_clusters.rl:51 - - endPos = p - - case 5: -//line NONE:1 - te = p + 1 - - case 6: -//line grapheme_clusters.rl:55 - act = 3 - case 7: -//line grapheme_clusters.rl:55 - act = 4 - case 8: -//line grapheme_clusters.rl:55 - te = p + 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 9: -//line grapheme_clusters.rl:55 - te = p + 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 10: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 11: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 12: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 13: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 14: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 15: -//line grapheme_clusters.rl:55 - te = p - p-- - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 16: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 17: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 18: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 19: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 20: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 21: -//line grapheme_clusters.rl:55 - p = (te) - 1 - { - return endPos + 1, data[startPos : endPos+1], nil - } - case 22: -//line NONE:1 - switch act { - case 0: - { - cs = 0 - goto _again - } - case 3: - { - p = (te) - 1 - - return endPos + 1, data[startPos : endPos+1], nil - } - case 4: - { - p = (te) - 1 - - return endPos + 1, data[startPos : endPos+1], nil - } - } - -//line grapheme_clusters.go:4017 - } - } - - _again: - _acts = int(_graphclust_to_state_actions[cs]) - _nacts = uint(_graphclust_actions[_acts]) - _acts++ - for ; _nacts > 0; _nacts-- { - _acts++ - switch _graphclust_actions[_acts-1] { - case 2: -//line NONE:1 - ts = 0 - - case 3: -//line NONE:1 - act = 0 - -//line grapheme_clusters.go:4035 - } - } - - if cs == 0 { - goto _out - } - p++ - if p != pe { - goto _resume - } - _test_eof: - { - } - if p == eof { - if _graphclust_eof_trans[cs] > 0 { - _trans = int(_graphclust_eof_trans[cs] - 1) - goto _eof_trans - } - } - - _out: - { - } - } - -//line grapheme_clusters.rl:117 - - // If we fall out here then we were unable to complete a sequence. - // If we weren't able to complete a sequence then either we've - // reached the end of a partial buffer (so there's more data to come) - // or we have an isolated symbol that would normally be part of a - // grapheme cluster but has appeared in isolation here. - - if !atEOF { - // Request more - return 0, nil, nil - } - - // Just take the first UTF-8 sequence and return that. - _, seqLen := utf8.DecodeRune(data) - return seqLen, data[:seqLen], nil -} diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/LICENSE b/vendor/github.com/apparentlymart/go-textseg/v13/LICENSE similarity index 100% rename from vendor/github.com/apparentlymart/go-textseg/v12/LICENSE rename to vendor/github.com/apparentlymart/go-textseg/v13/LICENSE diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/all_tokens.go b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/all_tokens.go similarity index 100% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/all_tokens.go rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/all_tokens.go diff --git a/vendor/github.com/apparentlymart/go-textseg/v13/textseg/emoji_table.rl b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/emoji_table.rl new file mode 100644 index 000000000..f2cb484a3 --- /dev/null +++ b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/emoji_table.rl @@ -0,0 +1,525 @@ +# The following Ragel file was autogenerated with unicode2ragel.rb +# from: https://www.unicode.org/Public/13.0.0/ucd/emoji/emoji-data.txt +# +# It defines ["Extended_Pictographic"]. +# +# To use this, make sure that your alphtype is set to byte, +# and that your input is in utf8. + +%%{ + machine Emoji; + + Extended_Pictographic = + 0xC2 0xA9 #E0.6 [1] (©️) copyright + | 0xC2 0xAE #E0.6 [1] (®️) registered + | 0xE2 0x80 0xBC #E0.6 [1] (‼️) double exclamation mark + | 0xE2 0x81 0x89 #E0.6 [1] (⁉️) exclamation question ... + | 0xE2 0x84 0xA2 #E0.6 [1] (™️) trade mark + | 0xE2 0x84 0xB9 #E0.6 [1] (ℹ️) information + | 0xE2 0x86 0x94..0x99 #E0.6 [6] (↔️..↙️) left-right arrow..do... + | 0xE2 0x86 0xA9..0xAA #E0.6 [2] (↩️..↪️) right arrow curving ... + | 0xE2 0x8C 0x9A..0x9B #E0.6 [2] (⌚..⌛) watch..hourglass done + | 0xE2 0x8C 0xA8 #E1.0 [1] (⌨️) keyboard + | 0xE2 0x8E 0x88 #E0.0 [1] (⎈) HELM SYMBOL + | 0xE2 0x8F 0x8F #E1.0 [1] (⏏️) eject button + | 0xE2 0x8F 0xA9..0xAC #E0.6 [4] (⏩..⏬) fast-forward button..f... + | 0xE2 0x8F 0xAD..0xAE #E0.7 [2] (⏭️..⏮️) next track button..l... + | 0xE2 0x8F 0xAF #E1.0 [1] (⏯️) play or pause button + | 0xE2 0x8F 0xB0 #E0.6 [1] (⏰) alarm clock + | 0xE2 0x8F 0xB1..0xB2 #E1.0 [2] (⏱️..⏲️) stopwatch..timer clock + | 0xE2 0x8F 0xB3 #E0.6 [1] (⏳) hourglass not done + | 0xE2 0x8F 0xB8..0xBA #E0.7 [3] (⏸️..⏺️) pause button..record... + | 0xE2 0x93 0x82 #E0.6 [1] (Ⓜ️) circled M + | 0xE2 0x96 0xAA..0xAB #E0.6 [2] (▪️..▫️) black small square..... + | 0xE2 0x96 0xB6 #E0.6 [1] (▶️) play button + | 0xE2 0x97 0x80 #E0.6 [1] (◀️) reverse button + | 0xE2 0x97 0xBB..0xBE #E0.6 [4] (◻️..◾) white medium square..... + | 0xE2 0x98 0x80..0x81 #E0.6 [2] (☀️..☁️) sun..cloud + | 0xE2 0x98 0x82..0x83 #E0.7 [2] (☂️..☃️) umbrella..snowman + | 0xE2 0x98 0x84 #E1.0 [1] (☄️) comet + | 0xE2 0x98 0x85 #E0.0 [1] (★) BLACK STAR + | 0xE2 0x98 0x87..0x8D #E0.0 [7] (☇..☍) LIGHTNING..OPPOSITION + | 0xE2 0x98 0x8E #E0.6 [1] (☎️) telephone + | 0xE2 0x98 0x8F..0x90 #E0.0 [2] (☏..☐) WHITE TELEPHONE..BALLO... + | 0xE2 0x98 0x91 #E0.6 [1] (☑️) check box with check + | 0xE2 0x98 0x92 #E0.0 [1] (☒) BALLOT BOX WITH X + | 0xE2 0x98 0x94..0x95 #E0.6 [2] (☔..☕) umbrella with rain dro... + | 0xE2 0x98 0x96..0x97 #E0.0 [2] (☖..☗) WHITE SHOGI PIECE..BLA... + | 0xE2 0x98 0x98 #E1.0 [1] (☘️) shamrock + | 0xE2 0x98 0x99..0x9C #E0.0 [4] (☙..☜) REVERSED ROTATED FLORA... + | 0xE2 0x98 0x9D #E0.6 [1] (☝️) index pointing up + | 0xE2 0x98 0x9E..0x9F #E0.0 [2] (☞..☟) WHITE RIGHT POINTING I... + | 0xE2 0x98 0xA0 #E1.0 [1] (☠️) skull and crossbones + | 0xE2 0x98 0xA1 #E0.0 [1] (☡) CAUTION SIGN + | 0xE2 0x98 0xA2..0xA3 #E1.0 [2] (☢️..☣️) radioactive..biohazard + | 0xE2 0x98 0xA4..0xA5 #E0.0 [2] (☤..☥) CADUCEUS..ANKH + | 0xE2 0x98 0xA6 #E1.0 [1] (☦️) orthodox cross + | 0xE2 0x98 0xA7..0xA9 #E0.0 [3] (☧..☩) CHI RHO..CROSS OF JERU... + | 0xE2 0x98 0xAA #E0.7 [1] (☪️) star and crescent + | 0xE2 0x98 0xAB..0xAD #E0.0 [3] (☫..☭) FARSI SYMBOL..HAMMER A... + | 0xE2 0x98 0xAE #E1.0 [1] (☮️) peace symbol + | 0xE2 0x98 0xAF #E0.7 [1] (☯️) yin yang + | 0xE2 0x98 0xB0..0xB7 #E0.0 [8] (☰..☷) TRIGRAM FOR HEAVEN..TR... + | 0xE2 0x98 0xB8..0xB9 #E0.7 [2] (☸️..☹️) wheel of dharma..fro... + | 0xE2 0x98 0xBA #E0.6 [1] (☺️) smiling face + | 0xE2 0x98 0xBB..0xBF #E0.0 [5] (☻..☿) BLACK SMILING FACE..ME... + | 0xE2 0x99 0x80 #E4.0 [1] (♀️) female sign + | 0xE2 0x99 0x81 #E0.0 [1] (♁) EARTH + | 0xE2 0x99 0x82 #E4.0 [1] (♂️) male sign + | 0xE2 0x99 0x83..0x87 #E0.0 [5] (♃..♇) JUPITER..PLUTO + | 0xE2 0x99 0x88..0x93 #E0.6 [12] (♈..♓) Aries..Pisces + | 0xE2 0x99 0x94..0x9E #E0.0 [11] (♔..♞) WHITE CHESS KING..BLAC... + | 0xE2 0x99 0x9F #E11.0 [1] (♟️) chess pawn + | 0xE2 0x99 0xA0 #E0.6 [1] (♠️) spade suit + | 0xE2 0x99 0xA1..0xA2 #E0.0 [2] (♡..♢) WHITE HEART SUIT..WHIT... + | 0xE2 0x99 0xA3 #E0.6 [1] (♣️) club suit + | 0xE2 0x99 0xA4 #E0.0 [1] (♤) WHITE SPADE SUIT + | 0xE2 0x99 0xA5..0xA6 #E0.6 [2] (♥️..♦️) heart suit..diamond ... + | 0xE2 0x99 0xA7 #E0.0 [1] (♧) WHITE CLUB SUIT + | 0xE2 0x99 0xA8 #E0.6 [1] (♨️) hot springs + | 0xE2 0x99 0xA9..0xBA #E0.0 [18] (♩..♺) QUARTER NOTE..RECYCLIN... + | 0xE2 0x99 0xBB #E0.6 [1] (♻️) recycling symbol + | 0xE2 0x99 0xBC..0xBD #E0.0 [2] (♼..♽) RECYCLED PAPER SYMBOL.... + | 0xE2 0x99 0xBE #E11.0 [1] (♾️) infinity + | 0xE2 0x99 0xBF #E0.6 [1] (♿) wheelchair symbol + | 0xE2 0x9A 0x80..0x85 #E0.0 [6] (⚀..⚅) DIE FACE-1..DIE FACE-6 + | 0xE2 0x9A 0x90..0x91 #E0.0 [2] (⚐..⚑) WHITE FLAG..BLACK FLAG + | 0xE2 0x9A 0x92 #E1.0 [1] (⚒️) hammer and pick + | 0xE2 0x9A 0x93 #E0.6 [1] (⚓) anchor + | 0xE2 0x9A 0x94 #E1.0 [1] (⚔️) crossed swords + | 0xE2 0x9A 0x95 #E4.0 [1] (⚕️) medical symbol + | 0xE2 0x9A 0x96..0x97 #E1.0 [2] (⚖️..⚗️) balance scale..alembic + | 0xE2 0x9A 0x98 #E0.0 [1] (⚘) FLOWER + | 0xE2 0x9A 0x99 #E1.0 [1] (⚙️) gear + | 0xE2 0x9A 0x9A #E0.0 [1] (⚚) STAFF OF HERMES + | 0xE2 0x9A 0x9B..0x9C #E1.0 [2] (⚛️..⚜️) atom symbol..fleur-d... + | 0xE2 0x9A 0x9D..0x9F #E0.0 [3] (⚝..⚟) OUTLINED WHITE STAR..T... + | 0xE2 0x9A 0xA0..0xA1 #E0.6 [2] (⚠️..⚡) warning..high voltage + | 0xE2 0x9A 0xA2..0xA6 #E0.0 [5] (⚢..⚦) DOUBLED FEMALE SIGN..M... + | 0xE2 0x9A 0xA7 #E13.0 [1] (⚧️) transgender symbol + | 0xE2 0x9A 0xA8..0xA9 #E0.0 [2] (⚨..⚩) VERTICAL MALE WITH STR... + | 0xE2 0x9A 0xAA..0xAB #E0.6 [2] (⚪..⚫) white circle..black ci... + | 0xE2 0x9A 0xAC..0xAF #E0.0 [4] (⚬..⚯) MEDIUM SMALL WHITE CIR... + | 0xE2 0x9A 0xB0..0xB1 #E1.0 [2] (⚰️..⚱️) coffin..funeral urn + | 0xE2 0x9A 0xB2..0xBC #E0.0 [11] (⚲..⚼) NEUTER..SESQUIQUADRATE + | 0xE2 0x9A 0xBD..0xBE #E0.6 [2] (⚽..⚾) soccer ball..baseball + | 0xE2 0x9A 0xBF..0xFF #E0.0 [5] (⚿..⛃) SQUARED KEY..BLACK DRA... + | 0xE2 0x9B 0x00..0x83 # + | 0xE2 0x9B 0x84..0x85 #E0.6 [2] (⛄..⛅) snowman without snow..... + | 0xE2 0x9B 0x86..0x87 #E0.0 [2] (⛆..⛇) RAIN..BLACK SNOWMAN + | 0xE2 0x9B 0x88 #E0.7 [1] (⛈️) cloud with lightning ... + | 0xE2 0x9B 0x89..0x8D #E0.0 [5] (⛉..⛍) TURNED WHITE SHOGI PIE... + | 0xE2 0x9B 0x8E #E0.6 [1] (⛎) Ophiuchus + | 0xE2 0x9B 0x8F #E0.7 [1] (⛏️) pick + | 0xE2 0x9B 0x90 #E0.0 [1] (⛐) CAR SLIDING + | 0xE2 0x9B 0x91 #E0.7 [1] (⛑️) rescue worker’s helmet + | 0xE2 0x9B 0x92 #E0.0 [1] (⛒) CIRCLED CROSSING LANES + | 0xE2 0x9B 0x93 #E0.7 [1] (⛓️) chains + | 0xE2 0x9B 0x94 #E0.6 [1] (⛔) no entry + | 0xE2 0x9B 0x95..0xA8 #E0.0 [20] (⛕..⛨) ALTERNATE ONE-WAY LEFT... + | 0xE2 0x9B 0xA9 #E0.7 [1] (⛩️) shinto shrine + | 0xE2 0x9B 0xAA #E0.6 [1] (⛪) church + | 0xE2 0x9B 0xAB..0xAF #E0.0 [5] (⛫..⛯) CASTLE..MAP SYMBOL FOR... + | 0xE2 0x9B 0xB0..0xB1 #E0.7 [2] (⛰️..⛱️) mountain..umbrella o... + | 0xE2 0x9B 0xB2..0xB3 #E0.6 [2] (⛲..⛳) fountain..flag in hole + | 0xE2 0x9B 0xB4 #E0.7 [1] (⛴️) ferry + | 0xE2 0x9B 0xB5 #E0.6 [1] (⛵) sailboat + | 0xE2 0x9B 0xB6 #E0.0 [1] (⛶) SQUARE FOUR CORNERS + | 0xE2 0x9B 0xB7..0xB9 #E0.7 [3] (⛷️..⛹️) skier..person bounci... + | 0xE2 0x9B 0xBA #E0.6 [1] (⛺) tent + | 0xE2 0x9B 0xBB..0xBC #E0.0 [2] (⛻..⛼) JAPANESE BANK SYMBOL..... + | 0xE2 0x9B 0xBD #E0.6 [1] (⛽) fuel pump + | 0xE2 0x9B 0xBE..0xFF #E0.0 [4] (⛾..✁) CUP ON BLACK SQUARE..U... + | 0xE2 0x9C 0x00..0x81 # + | 0xE2 0x9C 0x82 #E0.6 [1] (✂️) scissors + | 0xE2 0x9C 0x83..0x84 #E0.0 [2] (✃..✄) LOWER BLADE SCISSORS..... + | 0xE2 0x9C 0x85 #E0.6 [1] (✅) check mark button + | 0xE2 0x9C 0x88..0x8C #E0.6 [5] (✈️..✌️) airplane..victory hand + | 0xE2 0x9C 0x8D #E0.7 [1] (✍️) writing hand + | 0xE2 0x9C 0x8E #E0.0 [1] (✎) LOWER RIGHT PENCIL + | 0xE2 0x9C 0x8F #E0.6 [1] (✏️) pencil + | 0xE2 0x9C 0x90..0x91 #E0.0 [2] (✐..✑) UPPER RIGHT PENCIL..WH... + | 0xE2 0x9C 0x92 #E0.6 [1] (✒️) black nib + | 0xE2 0x9C 0x94 #E0.6 [1] (✔️) check mark + | 0xE2 0x9C 0x96 #E0.6 [1] (✖️) multiply + | 0xE2 0x9C 0x9D #E0.7 [1] (✝️) latin cross + | 0xE2 0x9C 0xA1 #E0.7 [1] (✡️) star of David + | 0xE2 0x9C 0xA8 #E0.6 [1] (✨) sparkles + | 0xE2 0x9C 0xB3..0xB4 #E0.6 [2] (✳️..✴️) eight-spoked asteris... + | 0xE2 0x9D 0x84 #E0.6 [1] (❄️) snowflake + | 0xE2 0x9D 0x87 #E0.6 [1] (❇️) sparkle + | 0xE2 0x9D 0x8C #E0.6 [1] (❌) cross mark + | 0xE2 0x9D 0x8E #E0.6 [1] (❎) cross mark button + | 0xE2 0x9D 0x93..0x95 #E0.6 [3] (❓..❕) question mark..white e... + | 0xE2 0x9D 0x97 #E0.6 [1] (❗) exclamation mark + | 0xE2 0x9D 0xA3 #E1.0 [1] (❣️) heart exclamation + | 0xE2 0x9D 0xA4 #E0.6 [1] (❤️) red heart + | 0xE2 0x9D 0xA5..0xA7 #E0.0 [3] (❥..❧) ROTATED HEAVY BLACK HE... + | 0xE2 0x9E 0x95..0x97 #E0.6 [3] (➕..➗) plus..divide + | 0xE2 0x9E 0xA1 #E0.6 [1] (➡️) right arrow + | 0xE2 0x9E 0xB0 #E0.6 [1] (➰) curly loop + | 0xE2 0x9E 0xBF #E1.0 [1] (➿) double curly loop + | 0xE2 0xA4 0xB4..0xB5 #E0.6 [2] (⤴️..⤵️) right arrow curving ... + | 0xE2 0xAC 0x85..0x87 #E0.6 [3] (⬅️..⬇️) left arrow..down arrow + | 0xE2 0xAC 0x9B..0x9C #E0.6 [2] (⬛..⬜) black large square..wh... + | 0xE2 0xAD 0x90 #E0.6 [1] (⭐) star + | 0xE2 0xAD 0x95 #E0.6 [1] (⭕) hollow red circle + | 0xE3 0x80 0xB0 #E0.6 [1] (〰️) wavy dash + | 0xE3 0x80 0xBD #E0.6 [1] (〽️) part alternation mark + | 0xE3 0x8A 0x97 #E0.6 [1] (㊗️) Japanese “congratulat... + | 0xE3 0x8A 0x99 #E0.6 [1] (㊙️) Japanese “secret” button + | 0xF0 0x9F 0x80 0x80..0x83 #E0.0 [4] (🀀..🀃) MAHJONG TILE EAST W... + | 0xF0 0x9F 0x80 0x84 #E0.6 [1] (🀄) mahjong red dragon + | 0xF0 0x9F 0x80 0x85..0xFF #E0.0 [202] (🀅..🃎) MAHJONG TILE ... + | 0xF0 0x9F 0x81..0x82 0x00..0xFF # + | 0xF0 0x9F 0x83 0x00..0x8E # + | 0xF0 0x9F 0x83 0x8F #E0.6 [1] (🃏) joker + | 0xF0 0x9F 0x83 0x90..0xBF #E0.0 [48] (🃐..🃿) ..<... + | 0xF0 0x9F 0x84 0x8D..0x8F #E0.0 [3] (🄍..🄏) CIRCLED ZERO WITH S... + | 0xF0 0x9F 0x84 0xAF #E0.0 [1] (🄯) COPYLEFT SYMBOL + | 0xF0 0x9F 0x85 0xAC..0xAF #E0.0 [4] (🅬..🅯) RAISED MR SIGN..CIR... + | 0xF0 0x9F 0x85 0xB0..0xB1 #E0.6 [2] (🅰️..🅱️) A button (blood t... + | 0xF0 0x9F 0x85 0xBE..0xBF #E0.6 [2] (🅾️..🅿️) O button (blood t... + | 0xF0 0x9F 0x86 0x8E #E0.6 [1] (🆎) AB button (blood type) + | 0xF0 0x9F 0x86 0x91..0x9A #E0.6 [10] (🆑..🆚) CL button..VS button + | 0xF0 0x9F 0x86 0xAD..0xFF #E0.0 [57] (🆭..🇥) MASK WORK SYMBOL..<... + | 0xF0 0x9F 0x87 0x00..0xA5 # + | 0xF0 0x9F 0x88 0x81..0x82 #E0.6 [2] (🈁..🈂️) Japanese “here” bu... + | 0xF0 0x9F 0x88 0x83..0x8F #E0.0 [13] (🈃..🈏) ..<... + | 0xF0 0x9F 0x88 0x9A #E0.6 [1] (🈚) Japanese “free of char... + | 0xF0 0x9F 0x88 0xAF #E0.6 [1] (🈯) Japanese “reserved” bu... + | 0xF0 0x9F 0x88 0xB2..0xBA #E0.6 [9] (🈲..🈺) Japanese “prohibite... + | 0xF0 0x9F 0x88 0xBC..0xBF #E0.0 [4] (🈼..🈿) ..<... + | 0xF0 0x9F 0x89 0x89..0x8F #E0.0 [7] (🉉..🉏) ..<... + | 0xF0 0x9F 0x89 0x90..0x91 #E0.6 [2] (🉐..🉑) Japanese “bargain” ... + | 0xF0 0x9F 0x89 0x92..0xFF #E0.0 [174] (🉒..🋿) ..<... + | 0xF0 0x9F 0x9B 0xA0..0xA5 #E0.7 [6] (🛠️..🛥️) hammer and wrench... + | 0xF0 0x9F 0x9B 0xA6..0xA8 #E0.0 [3] (🛦..🛨) UP-POINTING MILITAR... + | 0xF0 0x9F 0x9B 0xA9 #E0.7 [1] (🛩️) small airplane + | 0xF0 0x9F 0x9B 0xAA #E0.0 [1] (🛪) NORTHEAST-POINTING AIR... + | 0xF0 0x9F 0x9B 0xAB..0xAC #E1.0 [2] (🛫..🛬) airplane departure.... + | 0xF0 0x9F 0x9B 0xAD..0xAF #E0.0 [3] (🛭..🛯) ..<... + | 0xF0 0x9F 0x9B 0xB0 #E0.7 [1] (🛰️) satellite + | 0xF0 0x9F 0x9B 0xB1..0xB2 #E0.0 [2] (🛱..🛲) ONCOMING FIRE ENGIN... + | 0xF0 0x9F 0x9B 0xB3 #E0.7 [1] (🛳️) passenger ship + | 0xF0 0x9F 0x9B 0xB4..0xB6 #E3.0 [3] (🛴..🛶) kick scooter..canoe + | 0xF0 0x9F 0x9B 0xB7..0xB8 #E5.0 [2] (🛷..🛸) sled..flying saucer + | 0xF0 0x9F 0x9B 0xB9 #E11.0 [1] (🛹) skateboard + | 0xF0 0x9F 0x9B 0xBA #E12.0 [1] (🛺) auto rickshaw + | 0xF0 0x9F 0x9B 0xBB..0xBC #E13.0 [2] (🛻..🛼) pickup truck..rolle... + | 0xF0 0x9F 0x9B 0xBD..0xBF #E0.0 [3] (🛽..🛿) ..<... + | 0xF0 0x9F 0x9D 0xB4..0xBF #E0.0 [12] (🝴..🝿) ..<... + | 0xF0 0x9F 0x9F 0x95..0x9F #E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE..<... + | 0xF0 0x9F 0x9F 0xA0..0xAB #E12.0 [12] (🟠..🟫) orange circle..brow... + | 0xF0 0x9F 0x9F 0xAC..0xBF #E0.0 [20] (🟬..🟿) ..<... + | 0xF0 0x9F 0xA0 0x8C..0x8F #E0.0 [4] (🠌..🠏) ..<... + | 0xF0 0x9F 0xA1 0x88..0x8F #E0.0 [8] (🡈..🡏) ..<... + | 0xF0 0x9F 0xA1 0x9A..0x9F #E0.0 [6] (🡚..🡟) ..<... + | 0xF0 0x9F 0xA2 0x88..0x8F #E0.0 [8] (🢈..🢏) ..<... + | 0xF0 0x9F 0xA2 0xAE..0xFF #E0.0 [82] (🢮..🣿) ..<... + | 0xF0 0x9F 0xA3 0x00..0xBF # + | 0xF0 0x9F 0xA4 0x8C #E13.0 [1] (🤌) pinched fingers + | 0xF0 0x9F 0xA4 0x8D..0x8F #E12.0 [3] (🤍..🤏) white heart..pinchi... + | 0xF0 0x9F 0xA4 0x90..0x98 #E1.0 [9] (🤐..🤘) zipper-mouth face..... + | 0xF0 0x9F 0xA4 0x99..0x9E #E3.0 [6] (🤙..🤞) call me hand..cross... + | 0xF0 0x9F 0xA4 0x9F #E5.0 [1] (🤟) love-you gesture + | 0xF0 0x9F 0xA4 0xA0..0xA7 #E3.0 [8] (🤠..🤧) cowboy hat face..sn... + | 0xF0 0x9F 0xA4 0xA8..0xAF #E5.0 [8] (🤨..🤯) face with raised ey... + | 0xF0 0x9F 0xA4 0xB0 #E3.0 [1] (🤰) pregnant woman + | 0xF0 0x9F 0xA4 0xB1..0xB2 #E5.0 [2] (🤱..🤲) breast-feeding..pal... + | 0xF0 0x9F 0xA4 0xB3..0xBA #E3.0 [8] (🤳..🤺) selfie..person fencing + | 0xF0 0x9F 0xA4 0xBC..0xBE #E3.0 [3] (🤼..🤾) people wrestling..p... + | 0xF0 0x9F 0xA4 0xBF #E12.0 [1] (🤿) diving mask + | 0xF0 0x9F 0xA5 0x80..0x85 #E3.0 [6] (🥀..🥅) wilted flower..goal... + | 0xF0 0x9F 0xA5 0x87..0x8B #E3.0 [5] (🥇..🥋) 1st place medal..ma... + | 0xF0 0x9F 0xA5 0x8C #E5.0 [1] (🥌) curling stone + | 0xF0 0x9F 0xA5 0x8D..0x8F #E11.0 [3] (🥍..🥏) lacrosse..flying disc + | 0xF0 0x9F 0xA5 0x90..0x9E #E3.0 [15] (🥐..🥞) croissant..pancakes + | 0xF0 0x9F 0xA5 0x9F..0xAB #E5.0 [13] (🥟..🥫) dumpling..canned food + | 0xF0 0x9F 0xA5 0xAC..0xB0 #E11.0 [5] (🥬..🥰) leafy green..smilin... + | 0xF0 0x9F 0xA5 0xB1 #E12.0 [1] (🥱) yawning face + | 0xF0 0x9F 0xA5 0xB2 #E13.0 [1] (🥲) smiling face with tear + | 0xF0 0x9F 0xA5 0xB3..0xB6 #E11.0 [4] (🥳..🥶) partying face..cold... + | 0xF0 0x9F 0xA5 0xB7..0xB8 #E13.0 [2] (🥷..🥸) ninja..disguised face + | 0xF0 0x9F 0xA5 0xB9 #E0.0 [1] (🥹) + | 0xF0 0x9F 0xA5 0xBA #E11.0 [1] (🥺) pleading face + | 0xF0 0x9F 0xA5 0xBB #E12.0 [1] (🥻) sari + | 0xF0 0x9F 0xA5 0xBC..0xBF #E11.0 [4] (🥼..🥿) lab coat..flat shoe + | 0xF0 0x9F 0xA6 0x80..0x84 #E1.0 [5] (🦀..🦄) crab..unicorn + | 0xF0 0x9F 0xA6 0x85..0x91 #E3.0 [13] (🦅..🦑) eagle..squid + | 0xF0 0x9F 0xA6 0x92..0x97 #E5.0 [6] (🦒..🦗) giraffe..cricket + | 0xF0 0x9F 0xA6 0x98..0xA2 #E11.0 [11] (🦘..🦢) kangaroo..swan + | 0xF0 0x9F 0xA6 0xA3..0xA4 #E13.0 [2] (🦣..🦤) mammoth..dodo + | 0xF0 0x9F 0xA6 0xA5..0xAA #E12.0 [6] (🦥..🦪) sloth..oyster + | 0xF0 0x9F 0xA6 0xAB..0xAD #E13.0 [3] (🦫..🦭) beaver..seal + | 0xF0 0x9F 0xA6 0xAE..0xAF #E12.0 [2] (🦮..🦯) guide dog..white cane + | 0xF0 0x9F 0xA6 0xB0..0xB9 #E11.0 [10] (🦰..🦹) red hair..supervillain + | 0xF0 0x9F 0xA6 0xBA..0xBF #E12.0 [6] (🦺..🦿) safety vest..mechan... + | 0xF0 0x9F 0xA7 0x80 #E1.0 [1] (🧀) cheese wedge + | 0xF0 0x9F 0xA7 0x81..0x82 #E11.0 [2] (🧁..🧂) cupcake..salt + | 0xF0 0x9F 0xA7 0x83..0x8A #E12.0 [8] (🧃..🧊) beverage box..ice + | 0xF0 0x9F 0xA7 0x8B #E13.0 [1] (🧋) bubble tea + | 0xF0 0x9F 0xA7 0x8C #E0.0 [1] (🧌) + | 0xF0 0x9F 0xA7 0x8D..0x8F #E12.0 [3] (🧍..🧏) person standing..de... + | 0xF0 0x9F 0xA7 0x90..0xA6 #E5.0 [23] (🧐..🧦) face with monocle..... + | 0xF0 0x9F 0xA7 0xA7..0xBF #E11.0 [25] (🧧..🧿) red envelope..nazar... + | 0xF0 0x9F 0xA8 0x80..0xFF #E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.... + | 0xF0 0x9F 0xA9 0x00..0xAF # + | 0xF0 0x9F 0xA9 0xB0..0xB3 #E12.0 [4] (🩰..🩳) ballet shoes..shorts + | 0xF0 0x9F 0xA9 0xB4 #E13.0 [1] (🩴) thong sandal + | 0xF0 0x9F 0xA9 0xB5..0xB7 #E0.0 [3] (🩵..🩷) ..<... + | 0xF0 0x9F 0xA9 0xB8..0xBA #E12.0 [3] (🩸..🩺) drop of blood..stet... + | 0xF0 0x9F 0xA9 0xBB..0xBF #E0.0 [5] (🩻..🩿) ..<... + | 0xF0 0x9F 0xAA 0x80..0x82 #E12.0 [3] (🪀..🪂) yo-yo..parachute + | 0xF0 0x9F 0xAA 0x83..0x86 #E13.0 [4] (🪃..🪆) boomerang..nesting ... + | 0xF0 0x9F 0xAA 0x87..0x8F #E0.0 [9] (🪇..🪏) ..<... + | 0xF0 0x9F 0xAA 0x90..0x95 #E12.0 [6] (🪐..🪕) ringed planet..banjo + | 0xF0 0x9F 0xAA 0x96..0xA8 #E13.0 [19] (🪖..🪨) military helmet..rock + | 0xF0 0x9F 0xAA 0xA9..0xAF #E0.0 [7] (🪩..🪯) ..<... + | 0xF0 0x9F 0xAA 0xB0..0xB6 #E13.0 [7] (🪰..🪶) fly..feather + | 0xF0 0x9F 0xAA 0xB7..0xBF #E0.0 [9] (🪷..🪿) ..<... + | 0xF0 0x9F 0xAB 0x80..0x82 #E13.0 [3] (🫀..🫂) anatomical heart..p... + | 0xF0 0x9F 0xAB 0x83..0x8F #E0.0 [13] (🫃..🫏) ..<... + | 0xF0 0x9F 0xAB 0x90..0x96 #E13.0 [7] (🫐..🫖) blueberries..teapot + | 0xF0 0x9F 0xAB 0x97..0xBF #E0.0 [41] (🫗..🫿) ..<... + | 0xF0 0x9F 0xB0 0x80..0xFF #E0.0[1022] (🰀..🿽) 0; _nacts-- { + _acts++ + switch _graphclust_actions[_acts-1] { + case 4: +//line NONE:1 + ts = p + +//line grapheme_clusters.go:3878 + } + } + + _keys = int(_graphclust_key_offsets[cs]) + _trans = int(_graphclust_index_offsets[cs]) + + _klen = int(_graphclust_single_lengths[cs]) + if _klen > 0 { + _lower := int(_keys) + var _mid int + _upper := int(_keys + _klen - 1) + for { + if _upper < _lower { + break + } + + _mid = _lower + ((_upper - _lower) >> 1) + switch { + case data[p] < _graphclust_trans_keys[_mid]: + _upper = _mid - 1 + case data[p] > _graphclust_trans_keys[_mid]: + _lower = _mid + 1 + default: + _trans += int(_mid - int(_keys)) + goto _match + } + } + _keys += _klen + _trans += _klen + } + + _klen = int(_graphclust_range_lengths[cs]) + if _klen > 0 { + _lower := int(_keys) + var _mid int + _upper := int(_keys + (_klen << 1) - 2) + for { + if _upper < _lower { + break + } + + _mid = _lower + (((_upper - _lower) >> 1) & ^1) + switch { + case data[p] < _graphclust_trans_keys[_mid]: + _upper = _mid - 2 + case data[p] > _graphclust_trans_keys[_mid+1]: + _lower = _mid + 2 + default: + _trans += int((_mid - int(_keys)) >> 1) + goto _match + } + } + _trans += _klen + } + + _match: + _trans = int(_graphclust_indicies[_trans]) + _eof_trans: + cs = int(_graphclust_trans_targs[_trans]) + + if _graphclust_trans_actions[_trans] == 0 { + goto _again + } + + _acts = int(_graphclust_trans_actions[_trans]) + _nacts = uint(_graphclust_actions[_acts]) + _acts++ + for ; _nacts > 0; _nacts-- { + _acts++ + switch _graphclust_actions[_acts-1] { + case 0: +//line grapheme_clusters.rl:47 + + startPos = p + + case 1: +//line grapheme_clusters.rl:51 + + endPos = p + + case 5: +//line NONE:1 + te = p + 1 + + case 6: +//line grapheme_clusters.rl:55 + act = 3 + case 7: +//line grapheme_clusters.rl:55 + act = 4 + case 8: +//line grapheme_clusters.rl:55 + te = p + 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 9: +//line grapheme_clusters.rl:55 + te = p + 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 10: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 11: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 12: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 13: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 14: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 15: +//line grapheme_clusters.rl:55 + te = p + p-- + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 16: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 17: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 18: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 19: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 20: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 21: +//line grapheme_clusters.rl:55 + p = (te) - 1 + { + return endPos + 1, data[startPos : endPos+1], nil + } + case 22: +//line NONE:1 + switch act { + case 0: + { + cs = 0 + goto _again + } + case 3: + { + p = (te) - 1 + + return endPos + 1, data[startPos : endPos+1], nil + } + case 4: + { + p = (te) - 1 + + return endPos + 1, data[startPos : endPos+1], nil + } + } + +//line grapheme_clusters.go:4077 + } + } + + _again: + _acts = int(_graphclust_to_state_actions[cs]) + _nacts = uint(_graphclust_actions[_acts]) + _acts++ + for ; _nacts > 0; _nacts-- { + _acts++ + switch _graphclust_actions[_acts-1] { + case 2: +//line NONE:1 + ts = 0 + + case 3: +//line NONE:1 + act = 0 + +//line grapheme_clusters.go:4095 + } + } + + if cs == 0 { + goto _out + } + p++ + if p != pe { + goto _resume + } + _test_eof: + { + } + if p == eof { + if _graphclust_eof_trans[cs] > 0 { + _trans = int(_graphclust_eof_trans[cs] - 1) + goto _eof_trans + } + } + + _out: + { + } + } + +//line grapheme_clusters.rl:117 + + // If we fall out here then we were unable to complete a sequence. + // If we weren't able to complete a sequence then either we've + // reached the end of a partial buffer (so there's more data to come) + // or we have an isolated symbol that would normally be part of a + // grapheme cluster but has appeared in isolation here. + + if !atEOF { + // Request more + return 0, nil, nil + } + + // Just take the first UTF-8 sequence and return that. + _, seqLen := utf8.DecodeRune(data) + return seqLen, data[:seqLen], nil +} diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.rl b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters.rl similarity index 100% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters.rl rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters.rl diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters_table.rl b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters_table.rl similarity index 98% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters_table.rl rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters_table.rl index 5e4b5881d..803dca19c 100644 --- a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/grapheme_clusters_table.rl +++ b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/grapheme_clusters_table.rl @@ -1,5 +1,5 @@ # The following Ragel file was autogenerated with unicode2ragel.rb -# from: https://www.unicode.org/Public/12.0.0/ucd/auxiliary/GraphemeBreakProperty.txt +# from: https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt # # It defines ["Prepend", "CR", "LF", "Control", "Extend", "Regional_Indicator", "SpacingMark", "L", "V", "T", "LV", "LVT", "ZWJ"]. # @@ -18,6 +18,8 @@ | 0xF0 0x91 0x82 0xBD #Cf KAITHI NUMBER SIGN | 0xF0 0x91 0x83 0x8D #Cf KAITHI NUMBER SIGN ABOVE | 0xF0 0x91 0x87 0x82..0x83 #Lo [2] SHARADA SIGN JIHVAMULIYA..SHARA... + | 0xF0 0x91 0xA4 0xBF #Lo DIVES AKURU PREFIXED NASAL SIGN + | 0xF0 0x91 0xA5 0x81 #Lo DIVES AKURU INITIAL RA | 0xF0 0x91 0xA8 0xBA #Lo ZANABAZAR SQUARE CLUSTER-INITIAL L... | 0xF0 0x91 0xAA 0x84..0x89 #Lo [6] SOYOMBO SIGN JIHVAMULIYA..SOYOM... | 0xF0 0x91 0xB5 0x86 #Lo MASARAM GONDI REPHA @@ -130,7 +132,7 @@ | 0xE0 0xAC 0xBF #Mn ORIYA VOWEL SIGN I | 0xE0 0xAD 0x81..0x84 #Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SI... | 0xE0 0xAD 0x8D #Mn ORIYA SIGN VIRAMA - | 0xE0 0xAD 0x96 #Mn ORIYA AI LENGTH MARK + | 0xE0 0xAD 0x95..0x96 #Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENG... | 0xE0 0xAD 0x97 #Mc ORIYA AU LENGTH MARK | 0xE0 0xAD 0xA2..0xA3 #Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA ... | 0xE0 0xAE 0x82 #Mn TAMIL SIGN ANUSVARA @@ -161,6 +163,7 @@ | 0xE0 0xB5 0x8D #Mn MALAYALAM SIGN VIRAMA | 0xE0 0xB5 0x97 #Mc MALAYALAM AU LENGTH MARK | 0xE0 0xB5 0xA2..0xA3 #Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MA... + | 0xE0 0xB6 0x81 #Mn SINHALA SIGN CANDRABINDU | 0xE0 0xB7 0x8A #Mn SINHALA SIGN AL-LAKUNA | 0xE0 0xB7 0x8F #Mc SINHALA VOWEL SIGN AELA-PILLA | 0xE0 0xB7 0x92..0x94 #Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA.... @@ -221,6 +224,8 @@ | 0xE1 0xA9 0xBF #Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT | 0xE1 0xAA 0xB0..0xBD #Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCEN... | 0xE1 0xAA 0xBE #Me COMBINING PARENTHESES OVERLAY + | 0xE1 0xAA 0xBF..0xFF #Mn [2] COMBINING LATIN SMALL LETTER W BEL... + | 0xE1 0xAB 0x00..0x80 # | 0xE1 0xAC 0x80..0x83 #Mn [4] BALINESE SIGN ULU RICEM..BALINESE ... | 0xE1 0xAC 0xB4 #Mn BALINESE SIGN REREKAN | 0xE1 0xAC 0xB5 #Mc BALINESE VOWEL SIGN TEDUNG @@ -267,6 +272,7 @@ | 0xEA 0xA0 0x86 #Mn SYLOTI NAGRI SIGN HASANTA | 0xEA 0xA0 0x8B #Mn SYLOTI NAGRI SIGN ANUSVARA | 0xEA 0xA0 0xA5..0xA6 #Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI ... + | 0xEA 0xA0 0xAC #Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA | 0xEA 0xA3 0x84..0x85 #Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA... | 0xEA 0xA3 0xA0..0xB1 #Mn [18] COMBINING DEVANAGARI DIGIT ZERO..C... | 0xEA 0xA3 0xBF #Mn DEVANAGARI VOWEL SIGN AY @@ -307,6 +313,7 @@ | 0xF0 0x90 0xA8 0xBF #Mn KHAROSHTHI VIRAMA | 0xF0 0x90 0xAB 0xA5..0xA6 #Mn [2] MANICHAEAN ABBREVIATION MARK AB... | 0xF0 0x90 0xB4 0xA4..0xA7 #Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..... + | 0xF0 0x90 0xBA 0xAB..0xAC #Mn [2] YEZIDI COMBINING HAMZA MARK..YE... | 0xF0 0x90 0xBD 0x86..0x90 #Mn [11] SOGDIAN COMBINING DOT BELOW..SO... | 0xF0 0x91 0x80 0x81 #Mn BRAHMI SIGN ANUSVARA | 0xF0 0x91 0x80 0xB8..0xFF #Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VI... @@ -322,6 +329,7 @@ | 0xF0 0x91 0x86 0x80..0x81 #Mn [2] SHARADA SIGN CANDRABINDU..SHARA... | 0xF0 0x91 0x86 0xB6..0xBE #Mn [9] SHARADA VOWEL SIGN U..SHARADA V... | 0xF0 0x91 0x87 0x89..0x8C #Mn [4] SHARADA SANDHI MARK..SHARADA EX... + | 0xF0 0x91 0x87 0x8F #Mn SHARADA SIGN INVERTED CANDRABINDU | 0xF0 0x91 0x88 0xAF..0xB1 #Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOW... | 0xF0 0x91 0x88 0xB4 #Mn KHOJKI SIGN ANUSVARA | 0xF0 0x91 0x88 0xB6..0xB7 #Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN ... @@ -365,6 +373,10 @@ | 0xF0 0x91 0x9C 0xA7..0xAB #Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN K... | 0xF0 0x91 0xA0 0xAF..0xB7 #Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ... | 0xF0 0x91 0xA0 0xB9..0xBA #Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN N... + | 0xF0 0x91 0xA4 0xB0 #Mc DIVES AKURU VOWEL SIGN AA + | 0xF0 0x91 0xA4 0xBB..0xBC #Mn [2] DIVES AKURU SIGN ANUSVARA..DIVE... + | 0xF0 0x91 0xA4 0xBE #Mn DIVES AKURU VIRAMA + | 0xF0 0x91 0xA5 0x83 #Mn DIVES AKURU SIGN NUKTA | 0xF0 0x91 0xA7 0x94..0x97 #Mn [4] NANDINAGARI VOWEL SIGN U..NANDI... | 0xF0 0x91 0xA7 0x9A..0x9B #Mn [2] NANDINAGARI VOWEL SIGN E..NANDI... | 0xF0 0x91 0xA7 0xA0 #Mn NANDINAGARI SIGN VIRAMA @@ -397,6 +409,7 @@ | 0xF0 0x96 0xAC 0xB0..0xB6 #Mn [7] PAHAWH HMONG MARK CIM TUB..PAHA... | 0xF0 0x96 0xBD 0x8F #Mn MIAO SIGN CONSONANT MODIFIER BAR | 0xF0 0x96 0xBE 0x8F..0x92 #Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW + | 0xF0 0x96 0xBF 0xA4 #Mn KHITAN SMALL SCRIPT FILLER | 0xF0 0x9B 0xB2 0x9D..0x9E #Mn [2] DUPLOYAN THICK LETTER SELECTOR.... | 0xF0 0x9D 0x85 0xA5 #Mc MUSICAL SYMBOL COMBINING STEM | 0xF0 0x9D 0x85 0xA7..0xA9 #Mn [3] MUSICAL SYMBOL COMBINING TREMOL... @@ -548,6 +561,7 @@ | 0xF0 0x91 0x86 0xB3..0xB5 #Mc [3] SHARADA VOWEL SIGN AA..SHARADA ... | 0xF0 0x91 0x86 0xBF..0xFF #Mc [2] SHARADA VOWEL SIGN AU..SHARADA ... | 0xF0 0x91 0x87 0x00..0x80 # + | 0xF0 0x91 0x87 0x8E #Mc SHARADA VOWEL SIGN PRISHTHAMATRA E | 0xF0 0x91 0x88 0xAC..0xAE #Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VO... | 0xF0 0x91 0x88 0xB2..0xB3 #Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOW... | 0xF0 0x91 0x88 0xB5 #Mc KHOJKI SIGN VIRAMA @@ -579,6 +593,11 @@ | 0xF0 0x91 0x9C 0xA6 #Mc AHOM VOWEL SIGN E | 0xF0 0x91 0xA0 0xAC..0xAE #Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWE... | 0xF0 0x91 0xA0 0xB8 #Mc DOGRA SIGN VISARGA + | 0xF0 0x91 0xA4 0xB1..0xB5 #Mc [5] DIVES AKURU VOWEL SIGN I..DIVES... + | 0xF0 0x91 0xA4 0xB7..0xB8 #Mc [2] DIVES AKURU VOWEL SIGN AI..DIVE... + | 0xF0 0x91 0xA4 0xBD #Mc DIVES AKURU SIGN HALANTA + | 0xF0 0x91 0xA5 0x80 #Mc DIVES AKURU MEDIAL YA + | 0xF0 0x91 0xA5 0x82 #Mc DIVES AKURU MEDIAL RA | 0xF0 0x91 0xA7 0x91..0x93 #Mc [3] NANDINAGARI VOWEL SIGN AA..NAND... | 0xF0 0x91 0xA7 0x9C..0x9F #Mc [4] NANDINAGARI VOWEL SIGN O..NANDI... | 0xF0 0x91 0xA7 0xA4 #Mc NANDINAGARI VOWEL SIGN PRISHTHAMAT... @@ -596,6 +615,7 @@ | 0xF0 0x91 0xBB 0xB5..0xB6 #Mc [2] MAKASAR VOWEL SIGN E..MAKASAR V... | 0xF0 0x96 0xBD 0x91..0xFF #Mc [55] MIAO SIGN ASPIRATION..MIAO VOWE... | 0xF0 0x96 0xBE 0x00..0x87 # + | 0xF0 0x96 0xBF 0xB0..0xB1 #Mc [2] VIETNAMESE ALTERNATE READING MA... | 0xF0 0x9D 0x85 0xA6 #Mc MUSICAL SYMBOL COMBINING SPRECHGES... | 0xF0 0x9D 0x85 0xAD #Mc MUSICAL SYMBOL COMBINING AUGMENTAT... ; diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/tables.go b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/tables.go similarity index 100% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/tables.go rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/tables.go diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/unicode2ragel.rb b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/unicode2ragel.rb similarity index 99% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/unicode2ragel.rb rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/unicode2ragel.rb index bfb7b7268..e164a96b0 100644 --- a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/unicode2ragel.rb +++ b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/unicode2ragel.rb @@ -79,7 +79,7 @@ end # range and description. def each_alpha( url, property ) - open( url ) do |file| + URI.open( url ) do |file| file.each_line do |line| next if line =~ /^#/; next if line !~ /; #{property} *#/; diff --git a/vendor/github.com/apparentlymart/go-textseg/v12/textseg/utf8_seqs.go b/vendor/github.com/apparentlymart/go-textseg/v13/textseg/utf8_seqs.go similarity index 100% rename from vendor/github.com/apparentlymart/go-textseg/v12/textseg/utf8_seqs.go rename to vendor/github.com/apparentlymart/go-textseg/v13/textseg/utf8_seqs.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 50a3c1c92..05cbff629 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -21,6 +21,7 @@ const ( ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong). ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo). ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul). + ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka). ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai). ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore). ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney). @@ -121,6 +122,9 @@ var awsPartition = partition{ "ap-northeast-2": region{ Description: "Asia Pacific (Seoul)", }, + "ap-northeast-3": region{ + Description: "Asia Pacific (Osaka)", + }, "ap-south-1": region{ Description: "Asia Pacific (Mumbai)", }, @@ -184,6 +188,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -239,6 +244,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -361,12 +367,13 @@ var awsPartition = partition{ "amplifybackend": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, - "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, @@ -452,6 +459,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-northeast-3": endpoint{ + Hostname: "api.ecr.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "ap-south-1": endpoint{ Hostname: "api.ecr.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -706,6 +719,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -765,6 +779,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -915,6 +930,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -988,9 +1004,11 @@ var awsPartition = partition{ "batch": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1120,6 +1138,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1385,6 +1404,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1708,6 +1728,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1765,7 +1786,10 @@ var awsPartition = partition{ "contact-lens": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1902,6 +1926,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1963,6 +1988,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2140,6 +2166,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2202,6 +2229,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2259,6 +2287,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2325,6 +2354,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2376,6 +2406,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2425,6 +2456,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2456,6 +2488,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2505,6 +2538,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2539,6 +2573,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "fips-ap-northeast-3": endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "fips-ap-south-1": endpoint{ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2652,6 +2692,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2704,6 +2745,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2783,9 +2825,19 @@ var awsPartition = partition{ "emr-containers": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "entitlement.marketplace": service{ @@ -2805,6 +2857,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2836,6 +2889,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2885,6 +2939,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3181,6 +3236,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3236,6 +3292,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3696,6 +3753,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3789,6 +3847,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3847,11 +3906,12 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "lambda": service{ @@ -3861,6 +3921,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3977,6 +4038,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4276,6 +4338,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4350,6 +4413,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4957,12 +5021,42 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "ram-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "ram-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ram-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ram-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ram-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "rds": service{ @@ -4972,6 +5066,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5029,6 +5124,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5132,6 +5228,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5334,6 +5431,7 @@ var awsPartition = partition{ SignatureVersions: []string{"s3", "s3v4"}, }, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{ Hostname: "s3.ap-southeast-1.amazonaws.com", @@ -5410,6 +5508,13 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-northeast-3": endpoint{ + Hostname: "s3-control.ap-northeast-3.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "ap-south-1": endpoint{ Hostname: "s3-control.ap-south-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, @@ -5605,6 +5710,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5846,6 +5952,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5956,6 +6063,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6078,6 +6186,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6130,6 +6239,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6181,6 +6291,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6236,6 +6347,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6381,6 +6493,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6448,6 +6561,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6497,6 +6611,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6582,6 +6697,7 @@ var awsPartition = partition{ "transfer": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -6975,6 +7091,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -7005,6 +7122,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -9128,8 +9246,18 @@ var awsusgovPartition = partition{ "ram": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "ram.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "ram.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "rds": service{ @@ -10383,6 +10511,19 @@ var awsisobPartition = partition{ "us-isob-east-1": endpoint{}, }, }, + "route53": service{ + PartitionEndpoint: "aws-iso-b-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-iso-b-global": endpoint{ + Hostname: "route53.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, "s3": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index d71f7b3f4..1737c2686 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -689,9 +689,12 @@ func (ctx *signingCtx) buildBodyDigest() error { if hash == "" { includeSHA256Header := ctx.unsignedPayload || ctx.ServiceName == "s3" || + ctx.ServiceName == "s3-object-lambda" || ctx.ServiceName == "glacier" - s3Presign := ctx.isPresign && ctx.ServiceName == "s3" + s3Presign := ctx.isPresign && + (ctx.ServiceName == "s3" || + ctx.ServiceName == "s3-object-lambda") if ctx.unsignedPayload || s3Presign { hash = "UNSIGNED-PAYLOAD" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index fe73428eb..937f765df 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.37.15" +const SDKVersion = "1.38.0" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go index 7a8e46fbd..3079e4ab0 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go @@ -7,6 +7,21 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" ) +var supportedServiceARN = []string{ + "s3", + "s3-outposts", + "s3-object-lambda", +} + +func isSupportedServiceARN(service string) bool { + for _, name := range supportedServiceARN { + if name == service { + return true + } + } + return false +} + // Resource provides the interfaces abstracting ARNs of specific resource // types. type Resource interface { @@ -29,9 +44,10 @@ func ParseResource(s string, resParser ResourceParser) (resARN Resource, err err return nil, InvalidARNError{ARN: a, Reason: "partition not set"} } - if a.Service != "s3" && a.Service != "s3-outposts" { + if !isSupportedServiceARN(a.Service) { return nil, InvalidARNError{ARN: a, Reason: "service is not supported"} } + if len(a.Resource) == 0 { return nil, InvalidARNError{ARN: a, Reason: "resource not set"} } diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go new file mode 100644 index 000000000..513154cc0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go @@ -0,0 +1,15 @@ +package arn + +// S3ObjectLambdaARN represents an ARN for the s3-object-lambda service +type S3ObjectLambdaARN interface { + Resource + + isS3ObjectLambdasARN() +} + +// S3ObjectLambdaAccessPointARN is an S3ObjectLambdaARN for the Access Point resource type +type S3ObjectLambdaAccessPointARN struct { + AccessPointARN +} + +func (s S3ObjectLambdaAccessPointARN) isS3ObjectLambdasARN() {} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index e380fb0e9..c9525219c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -65874,9 +65874,9 @@ type DescribeImageAttributeInput struct { // The AMI attribute. // - // Note: Depending on your account privileges, the blockDeviceMapping attribute - // may return a Client.AuthFailure error. If this happens, use DescribeImages - // to get information about the block device mapping for the AMI. + // Note: The blockDeviceMapping attribute is deprecated. Using this attribute + // returns the Client.AuthFailure error. To get information about the block + // device mappings for an AMI, use the DescribeImages action. // // Attribute is a required field Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` @@ -82374,12 +82374,21 @@ type FleetLaunchTemplateOverrides struct { // The location where the instance launched, if applicable. Placement *PlacementResponse `locationName:"placement" type:"structure"` - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the override has - // the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses + // priority to determine which launch template override to use first in fulfilling + // On-Demand capacity. + // + // If the Spot AllocationStrategy is set to capacity-optimized-prioritized, + // EC2 Fleet uses priority on a best-effort basis to determine which launch + // template override to use first in fulfilling Spot capacity, but optimizes + // for capacity first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the override has the lowest priority. + // You can set the same priority for different launch template overrides. Priority *float64 `locationName:"priority" type:"double"` // The ID of the subnet in which to launch the instances. @@ -82457,12 +82466,21 @@ type FleetLaunchTemplateOverridesRequest struct { // The location where the instance launched, if applicable. Placement *Placement `type:"structure"` - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the launch template - // override has the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses + // priority to determine which launch template override to use first in fulfilling + // On-Demand capacity. + // + // If the Spot AllocationStrategy is set to capacity-optimized-prioritized, + // EC2 Fleet uses priority on a best-effort basis to determine which launch + // template override to use first in fulfilling Spot capacity, but optimizes + // for capacity first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the launch template override has the lowest + // priority. You can set the same priority for different launch template overrides. Priority *float64 `type:"double"` // The IDs of the subnets in which to launch the instances. Separate multiple @@ -92954,12 +92972,21 @@ type LaunchTemplateOverrides struct { // The instance type. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The priority for the launch template override. If OnDemandAllocationStrategy - // is set to prioritized, Spot Fleet uses priority to determine which launch - // template override to use first in fulfilling On-Demand capacity. The highest - // priority is launched first. Valid values are whole numbers starting at 0. - // The lower the number, the higher the priority. If no number is set, the launch - // template override has the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses priority + // to determine which launch template override to use first in fulfilling On-Demand + // capacity. + // + // If the Spot AllocationStrategy is set to capacityOptimizedPrioritized, Spot + // Fleet uses priority on a best-effort basis to determine which launch template + // override to use first in fulfilling Spot capacity, but optimizes for capacity + // first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the launch template override has the lowest + // priority. You can set the same priority for different launch template overrides. Priority *float64 `locationName:"priority" type:"double"` // The maximum price per unit hour that you are willing to pay for a Spot Instance. @@ -113148,9 +113175,16 @@ type SpotFleetRequestConfigData struct { // If the allocation strategy is diversified, Spot Fleet launches instances // from all the Spot Instance pools that you specify. // - // If the allocation strategy is capacityOptimized, Spot Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacityOptimized (recommended), Spot Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacityOptimizedPrioritized. Set a + // priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacityOptimizedPrioritized is supported only if your Spot Fleet + // uses a launch template. Note that if the OnDemandAllocationStrategy is set + // to prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -113926,9 +113960,16 @@ type SpotOptions struct { // If the allocation strategy is diversified, EC2 Fleet launches instances from // all of the Spot Instance pools that you specify. // - // If the allocation strategy is capacity-optimized, EC2 Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacity-optimized (recommended), EC2 Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacity-optimized-prioritized. Set + // a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses + // a launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -114032,9 +114073,16 @@ type SpotOptionsRequest struct { // If the allocation strategy is diversified, EC2 Fleet launches instances from // all of the Spot Instance pools that you specify. // - // If the allocation strategy is capacity-optimized, EC2 Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacity-optimized (recommended), EC2 Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacity-optimized-prioritized. Set + // a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses + // a launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -121992,6 +122040,9 @@ const ( // AllocationStrategyCapacityOptimized is a AllocationStrategy enum value AllocationStrategyCapacityOptimized = "capacityOptimized" + + // AllocationStrategyCapacityOptimizedPrioritized is a AllocationStrategy enum value + AllocationStrategyCapacityOptimizedPrioritized = "capacityOptimizedPrioritized" ) // AllocationStrategy_Values returns all elements of the AllocationStrategy enum @@ -122000,6 +122051,7 @@ func AllocationStrategy_Values() []string { AllocationStrategyLowestPrice, AllocationStrategyDiversified, AllocationStrategyCapacityOptimized, + AllocationStrategyCapacityOptimizedPrioritized, } } @@ -126940,6 +126992,9 @@ const ( // SpotAllocationStrategyCapacityOptimized is a SpotAllocationStrategy enum value SpotAllocationStrategyCapacityOptimized = "capacity-optimized" + + // SpotAllocationStrategyCapacityOptimizedPrioritized is a SpotAllocationStrategy enum value + SpotAllocationStrategyCapacityOptimizedPrioritized = "capacity-optimized-prioritized" ) // SpotAllocationStrategy_Values returns all elements of the SpotAllocationStrategy enum @@ -126948,6 +127003,7 @@ func SpotAllocationStrategy_Values() []string { SpotAllocationStrategyLowestPrice, SpotAllocationStrategyDiversified, SpotAllocationStrategyCapacityOptimized, + SpotAllocationStrategyCapacityOptimizedPrioritized, } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 72e374e2b..c00f7dc67 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -362,6 +362,10 @@ func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *requ // You use this operation to attach a managed policy to a group. To embed an // inline policy in a group, use PutGroupPolicy. // +// As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. +// // For more information about policies, see Managed policies and inline policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. @@ -474,6 +478,10 @@ func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *reques // see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. // +// As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -580,6 +588,10 @@ func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *reques // You use this operation to attach a managed policy to a user. To embed an // inline policy in a user, use PutUserPolicy. // +// As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. +// // For more information about policies, see Managed policies and inline policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. @@ -1414,6 +1426,10 @@ func (c *IAM) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Reques // versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) // in the IAM User Guide. // +// As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. +// // For more information about managed policies in general, see Managed policies // and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 89a0a29af..6cc91dd2c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/internal/s3shared/arn" "github.com/aws/aws-sdk-go/private/checksum" "github.com/aws/aws-sdk-go/private/protocol" @@ -67,7 +68,7 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req // AbortMultipartUpload API operation for Amazon Simple Storage Service. // -// This operation aborts a multipart upload. After a multipart upload is aborted, +// This action aborts a multipart upload. After a multipart upload is aborted, // no additional parts can be uploaded using that upload ID. The storage consumed // by any previously uploaded parts will be freed. However, if any part uploads // are currently in progress, those part uploads might or might not succeed. @@ -76,10 +77,10 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req // // To verify that all parts have been removed, so you don't get charged for // the part storage, you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// operation and ensure that the parts list is empty. +// action and ensure that the parts list is empty. // -// For information about permissions required to use the multipart upload API, -// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). +// For information about permissions required to use the multipart upload, see +// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // // The following operations are related to AbortMultipartUpload: // @@ -175,10 +176,10 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) // You first initiate the multipart upload and then upload all parts using the // UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) // operation. After successfully uploading all relevant parts of an upload, -// you call this operation to complete the upload. Upon receiving this request, +// you call this action to complete the upload. Upon receiving this request, // Amazon S3 concatenates all the parts in ascending order by part number to // create a new object. In the Complete Multipart Upload request, you must provide -// the parts list. You must ensure that the parts list is complete. This operation +// the parts list. You must ensure that the parts list is complete. This action // concatenates the parts that you provide in the list. For each part in the // list, you must provide the part number and the ETag value, returned after // that part was uploaded. @@ -199,7 +200,7 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) // Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). // // For information about permissions required to use the multipart upload API, -// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). +// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // // CompleteMultipartUpload has the following special errors: // @@ -306,10 +307,10 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // Creates a copy of an object that is already stored in Amazon S3. // // You can store individual objects of up to 5 TB in Amazon S3. You create a -// copy of your object up to 5 GB in size in a single atomic operation using -// this API. However, to copy an object greater than 5 GB, you must use the -// multipart upload Upload Part - Copy API. For more information, see Copy Object -// Using the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html). +// copy of your object up to 5 GB in size in a single atomic action using this +// API. However, to copy an object greater than 5 GB, you must use the multipart +// upload Upload Part - Copy API. For more information, see Copy Object Using +// the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html). // // All copy requests must be authenticated. Additionally, you must have read // access to the source object and write access to the destination bucket. For @@ -319,7 +320,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // // A copy request might return an error when Amazon S3 receives the copy request // or while Amazon S3 is copying the files. If the error occurs before the copy -// operation starts, you receive a standard Amazon S3 error. If the error occurs +// action starts, you receive a standard Amazon S3 error. If the error occurs // during the copy operation, the error response is embedded in the 200 OK response. // This means that a 200 OK response can contain either a success or an error. // Design your application to parse the contents of the response and handle @@ -334,7 +335,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // // The copy request charge is based on the storage class and Region that you // specify for the destination object. For pricing information, see Amazon S3 -// pricing (https://aws.amazon.com/s3/pricing/). +// pricing (http://aws.amazon.com/s3/pricing/). // // Amazon S3 transfer acceleration does not support cross-Region copies. If // you request a cross-Region copy using a transfer acceleration endpoint, you @@ -404,7 +405,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // // If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the // object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Access Control List (ACL)-Specific Request Headers // @@ -418,7 +419,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // // Storage Class Options // -// You can use the CopyObject operation to change the storage class of an object +// You can use the CopyObject action to change the storage class of an object // that is already stored in Amazon S3 using the StorageClass parameter. For // more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) // in the Amazon S3 Service Developer Guide. @@ -459,8 +460,8 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // // Returned Error Codes: // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError" -// The source object of the COPY operation is not in the active tier and is -// only stored in Amazon S3 Glacier. +// The source object of the COPY action is not in the active tier and is only +// stored in Amazon S3 Glacier. // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) { @@ -678,10 +679,10 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re // CreateMultipartUpload API operation for Amazon Simple Storage Service. // -// This operation initiates a multipart upload and returns an upload ID. This -// upload ID is used to associate all of the parts in the specific multipart -// upload. You specify this upload ID in each of your subsequent upload part -// requests (see UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). +// This action initiates a multipart upload and returns an upload ID. This upload +// ID is used to associate all of the parts in the specific multipart upload. +// You specify this upload ID in each of your subsequent upload part requests +// (see UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). // You also include this upload ID in the final request to either complete or // abort the multipart upload request. // @@ -691,12 +692,12 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re // If you have configured a lifecycle rule to abort incomplete multipart uploads, // the upload must complete within the number of days specified in the bucket // lifecycle configuration. Otherwise, the incomplete multipart upload becomes -// eligible for an abort operation and Amazon S3 aborts the multipart upload. -// For more information, see Aborting Incomplete Multipart Uploads Using a Bucket +// eligible for an abort action and Amazon S3 aborts the multipart upload. For +// more information, see Aborting Incomplete Multipart Uploads Using a Bucket // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config). // // For information about the permissions required to use the multipart upload -// API, see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). +// API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // // For request signing, multipart upload is just a series of regular requests. // You initiate a multipart upload, send one or more requests to upload parts, @@ -716,7 +717,7 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re // and decrypts it when you access it. You can provide your own encryption key, // or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or // Amazon S3-managed encryption keys. If you choose to provide your own encryption -// key, the request headers you provide in UploadPart (AmazonS3/latest/API/API_UploadPart.html) +// key, the request headers you provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) // and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) // requests must match the headers you used in the request to initiate the upload // by using CreateMultipartUpload. @@ -989,8 +990,8 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt // To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about the Amazon S3 analytics feature, see Amazon S3 Analytics // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html). @@ -1083,7 +1084,7 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request // permission to others. // // For information about cors, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Related Resources: // @@ -1164,17 +1165,17 @@ func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) ( // DeleteBucketEncryption API operation for Amazon Simple Storage Service. // -// This implementation of the DELETE operation removes default encryption from +// This implementation of the DELETE action removes default encryption from // the bucket. For information about the Amazon S3 default encryption feature, // see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // Related Resources // @@ -1361,8 +1362,8 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent // To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html). @@ -1550,8 +1551,8 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC // To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about CloudWatch request metrics for Amazon S3, see Monitoring // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). @@ -1725,9 +1726,9 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req // DeleteBucketPolicy API operation for Amazon Simple Storage Service. // -// This implementation of the DELETE operation uses the policy subresource to -// delete the policy of a specified bucket. If you are using an identity other -// than the root user of the AWS account that owns the bucket, the calling identity +// This implementation of the DELETE action uses the policy subresource to delete +// the policy of a specified bucket. If you are using an identity other than +// the root user of the AWS account that owns the bucket, the calling identity // must have the DeleteBucketPolicy permissions on the specified bucket and // belong to the bucket owner's account to use this operation. // @@ -1827,8 +1828,8 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) // To use this operation, you must have permissions to perform the s3:PutReplicationConfiguration // action. The bucket owner has these permissions by default and can grant it // to others. For more information about permissions, see Permissions Related -// to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // It can take a while for the deletion of a replication configuration to fully // propagate. @@ -2000,15 +2001,15 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r // DeleteBucketWebsite API operation for Amazon Simple Storage Service. // -// This operation removes the website configuration for a bucket. Amazon S3 -// returns a 200 OK response upon successfully deleting a website configuration -// on the specified bucket. You will get a 200 OK response if the website configuration +// This action removes the website configuration for a bucket. Amazon S3 returns +// a 200 OK response upon successfully deleting a website configuration on the +// specified bucket. You will get a 200 OK response if the website configuration // you are trying to delete does not exist on the bucket. Amazon S3 returns // a 404 response if the bucket specified in the request does not exist. // -// This DELETE operation requires the S3:DeleteBucketWebsite permission. By -// default, only the bucket owner can delete the website configuration attached -// to a bucket. However, bucket owners can grant other users permission to delete +// This DELETE action requires the S3:DeleteBucketWebsite permission. By default, +// only the bucket owner can delete the website configuration attached to a +// bucket. However, bucket owners can grant other users permission to delete // the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite // permission. // @@ -2110,14 +2111,14 @@ func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request // For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html). // To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete). // -// You can delete objects by explicitly calling the DELETE Object API or configure -// its lifecycle (PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)) +// You can delete objects by explicitly calling DELETE Object or configure its +// lifecycle (PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)) // to enable Amazon S3 to remove them for you. If you want to block users or // accounts from removing or deleting objects from your bucket, you must deny // them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration // actions. // -// The following operation is related to DeleteObject: +// The following action is related to DeleteObject: // // * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) // @@ -2285,27 +2286,27 @@ func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Reque // DeleteObjects API operation for Amazon Simple Storage Service. // -// This operation enables you to delete multiple objects from a bucket using -// a single HTTP request. If you know the object keys that you want to delete, -// then this operation provides a suitable alternative to sending individual -// delete requests, reducing per-request overhead. +// This action enables you to delete multiple objects from a bucket using a +// single HTTP request. If you know the object keys that you want to delete, +// then this action provides a suitable alternative to sending individual delete +// requests, reducing per-request overhead. // // The request contains a list of up to 1000 keys that you want to delete. In // the XML, you provide the object key names, and optionally, version IDs if // you want to delete a specific version of the object from a versioning-enabled -// bucket. For each key, Amazon S3 performs a delete operation and returns the +// bucket. For each key, Amazon S3 performs a delete action and returns the // result of that delete, success, or failure, in the response. Note that if // the object specified in the request is not found, Amazon S3 returns the result // as deleted. // -// The operation supports two modes for the response: verbose and quiet. By -// default, the operation uses verbose mode in which the response includes the -// result of deletion of each key in your request. In quiet mode the response -// includes only keys where the delete operation encountered an error. For a -// successful deletion, the operation does not return any information about -// the delete in the response body. +// The action supports two modes for the response: verbose and quiet. By default, +// the action uses verbose mode in which the response includes the result of +// deletion of each key in your request. In quiet mode the response includes +// only keys where the delete action encountered an error. For a successful +// deletion, the action does not return any information about the delete in +// the response body. // -// When performing this operation on an MFA Delete enabled bucket, that attempts +// When performing this action on an MFA Delete enabled bucket, that attempts // to delete any versioned objects, you must include an MFA token. If you do // not provide one, the entire request will fail, even if there are non-versioned // objects you are trying to delete. If you provide an invalid token, whether @@ -2404,8 +2405,8 @@ func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) // Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use // this operation, you must have the s3:PutBucketPublicAccessBlock permission. // For more information about permissions, see Permissions Related to Bucket -// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // The following operations are related to DeletePublicAccessBlock: // @@ -2489,17 +2490,17 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service. // -// This implementation of the GET operation uses the accelerate subresource -// to return the Transfer Acceleration state of a bucket, which is either Enabled +// This implementation of the GET action uses the accelerate subresource to +// return the Transfer Acceleration state of a bucket, which is either Enabled // or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that // enables you to perform faster data transfers to and from Amazon S3. // // To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // You set the Transfer Acceleration state of an existing bucket to Enabled // or Suspended by using the PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html) @@ -2511,7 +2512,7 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC // // For more information about transfer acceleration, see Transfer Acceleration // (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Related Resources // @@ -2589,7 +2590,7 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request // GetBucketAcl API operation for Amazon Simple Storage Service. // -// This implementation of the GET operation uses the acl subresource to return +// This implementation of the GET action uses the acl subresource to return // the access control list (ACL) of a bucket. To use GET to return the ACL of // the bucket, you must have READ_ACP access to the bucket. If READ_ACP permission // is granted to the anonymous user, you can return the ACL of the bucket without @@ -2671,19 +2672,19 @@ func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsCon // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. // -// This implementation of the GET operation returns an analytics configuration +// This implementation of the GET action returns an analytics configuration // (identified by the analytics configuration ID) from the bucket. // // To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // For information about Amazon S3 analytics feature, see Amazon S3 Analytics // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Related Resources // @@ -2852,15 +2853,18 @@ func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *r // GetBucketEncryption API operation for Amazon Simple Storage Service. // -// Returns the default encryption configuration for an Amazon S3 bucket. For -// information about the Amazon S3 default encryption feature, see Amazon S3 -// Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html). +// Returns the default encryption configuration for an Amazon S3 bucket. If +// the bucket does not have a default encryption configuration, GetBucketEncryption +// returns ServerSideEncryptionConfigurationNotFoundError. +// +// For information about the Amazon S3 default encryption feature, see Amazon +// S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html). // // To use this operation, you must have permission to perform the s3:GetEncryptionConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // The following operations are related to GetBucketEncryption: // @@ -3045,8 +3049,8 @@ func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryCon // To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration // action. The bucket owner has this permission by default and can grant this // permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html). @@ -3148,8 +3152,8 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req // To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // GetBucketLifecycle has the following special error: // @@ -3247,8 +3251,8 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon // Accordingly, this section describes the latest API. The response describes // the new filter element that you can use to specify a filter to select a subset // of objects to which the rule applies. If you are using a previous version -// of the lifecycle configuration, it still works. For the earlier API description, -// see GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html). +// of the lifecycle configuration, it still works. For the earlier action, see +// GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html). // // Returns the lifecycle configuration information set on the bucket. For information // about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html). @@ -3256,8 +3260,8 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon // To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration // action. The bucket owner has this permission, by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // GetBucketLifecycleConfiguration has the following special error: // @@ -3516,8 +3520,8 @@ func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigu // To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about CloudWatch request metrics for Amazon S3, see Monitoring // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). @@ -3689,8 +3693,8 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat // // Returns the notification configuration of a bucket. // -// If notifications are not enabled on the bucket, the operation returns an -// empty NotificationConfiguration element. +// If notifications are not enabled on the bucket, the action returns an empty +// NotificationConfiguration element. // // By default, you must be the bucket owner to read the notification configuration // of a bucket. However, the bucket owner can use a bucket policy to grant permission @@ -3701,7 +3705,7 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat // on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). // For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). // -// The following operation is related to GetBucketNotification: +// The following action is related to GetBucketNotification: // // * PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html) // @@ -3879,7 +3883,7 @@ func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.R // For more information about bucket policies, see Using Bucket Policies and // User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). // -// The following operation is related to GetBucketPolicy: +// The following action is related to GetBucketPolicy: // // * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) // @@ -4052,11 +4056,11 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req // can return a wrong result. // // For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // -// This operation requires permissions for the s3:GetReplicationConfiguration -// action. For more information about permissions, see Using Bucket Policies -// and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). +// This action requires permissions for the s3:GetReplicationConfiguration action. +// For more information about permissions, see Using Bucket Policies and User +// Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). // // If you include the Filter element in a replication configuration, you must // also include the DeleteMarkerReplication and Priority elements. The response @@ -4405,7 +4409,7 @@ func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request // For more information about hosting websites, see Hosting Websites on Amazon // S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). // -// This GET operation requires the S3:GetBucketWebsite permission. By default, +// This GET action requires the S3:GetBucketWebsite permission. By default, // only the bucket owner can read the bucket website configuration. However, // bucket owners can allow other users to read the website configuration by // writing a bucket policy granting them the S3:GetBucketWebsite permission. @@ -4515,7 +4519,7 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp // Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering // Deep Archive tiers, before you can retrieve the object you must first restore // a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). -// Otherwise, this operation returns an InvalidObjectStateError error. For information +// Otherwise, this action returns an InvalidObjectStateError error. For information // about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html). // // Encryption request headers, like x-amz-server-side-encryption, should not @@ -4558,8 +4562,8 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp // // Versioning // -// By default, the GET operation returns the current version of an object. To -// return a different version, use the versionId subresource. +// By default, the GET action returns the current version of an object. To return +// a different version, use the versionId subresource. // // If the current version of the object is a delete marker, Amazon S3 behaves // as if the object was deleted and includes x-amz-delete-marker: true in the @@ -5026,7 +5030,7 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request // subresource associated with the object. // // To use this operation, you must have permission to perform the s3:GetObjectTagging -// action. By default, the GET operation returns information about current version +// action. By default, the GET action returns information about current version // of an object. For a versioned bucket, you can have multiple versions of an // object in your bucket. To retrieve tags of any other version, use the versionId // query parameter. You also need permission for the s3:GetObjectVersionTagging @@ -5038,10 +5042,12 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request // For information about the Amazon S3 object tagging feature, see Object Tagging // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). // -// The following operation is related to GetObjectTagging: +// The following action is related to GetObjectTagging: // // * PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html) // +// * DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html) +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -5126,7 +5132,7 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request // // This action is not supported by Amazon S3 on Outposts. // -// The following operation is related to GetObjectTorrent: +// The following action is related to GetObjectTorrent: // // * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) // @@ -5300,16 +5306,20 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou // HeadBucket API operation for Amazon Simple Storage Service. // -// This operation is useful to determine if a bucket exists and you have permission -// to access it. The operation returns a 200 OK if the bucket exists and you -// have permission to access it. Otherwise, the operation might return responses -// such as 404 Not Found and 403 Forbidden. +// This action is useful to determine if a bucket exists and you have permission +// to access it. The action returns a 200 OK if the bucket exists and you have +// permission to access it. +// +// If the bucket does not exist or you do not have permission to access it, +// the HEAD request returns a generic 404 Not Found or 403 Forbidden code. A +// message body is not included, so you cannot determine the exception beyond +// these error codes. // // To use this operation, you must have permissions to perform the s3:ListBucket // action. The bucket owner has this permission by default and can grant this // permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5388,13 +5398,15 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // HeadObject API operation for Amazon Simple Storage Service. // -// The HEAD operation retrieves metadata from an object without returning the -// object itself. This operation is useful if you're only interested in an object's -// metadata. To use HEAD, you must have READ access to the object. +// The HEAD action retrieves metadata from an object without returning the object +// itself. This action is useful if you're only interested in an object's metadata. +// To use HEAD, you must have READ access to the object. // -// A HEAD request has the same options as a GET operation on an object. The -// response is identical to the GET response except that there is no response -// body. +// A HEAD request has the same options as a GET action on an object. The response +// is identical to the GET response except that there is no response body. Because +// of this, if the HEAD request generates an error, it returns a generic 404 +// Not Found or 403 Forbidden code. It is not possible to retrieve the exact +// exception beyond these error codes. // // If you encrypt an object by using server-side encryption with customer-provided // encryption keys (SSE-C) when you store the object in Amazon S3, then when @@ -5409,11 +5421,14 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). // -// Encryption request headers, like x-amz-server-side-encryption, should not -// be sent for GET requests if your object uses server-side encryption with -// CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed -// encryption keys (SSE-S3). If your object does use these types of keys, you’ll -// get an HTTP 400 BadRequest error. +// * Encryption request headers, like x-amz-server-side-encryption, should +// not be sent for GET requests if your object uses server-side encryption +// with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon +// S3–managed encryption keys (SSE-S3). If your object does use these types +// of keys, you’ll get an HTTP 400 BadRequest error. +// +// * The last modified property in this case is the creation date of the +// object. // // Request headers are limited to 8 KB in size. For more information, see Common // Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html). @@ -5445,7 +5460,7 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // * If you don’t have the s3:ListBucket permission, Amazon S3 returns // an HTTP status code 403 ("access denied") error. // -// The following operation is related to HeadObject: +// The following action is related to HeadObject: // // * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) // @@ -5527,19 +5542,19 @@ func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalytics // Lists the analytics configurations for the bucket. You can have up to 1,000 // analytics configurations per bucket. // -// This operation supports list pagination and does not return more than 100 -// configurations at a time. You should always check the IsTruncated element -// in the response. If there are no more configurations to list, IsTruncated -// is set to false. If there are more configurations to list, IsTruncated is -// set to true, and there will be a value in NextContinuationToken. You use -// the NextContinuationToken value to continue the pagination of the list by -// passing the value in continuation-token in the request to GET the next page. +// This action supports list pagination and does not return more than 100 configurations +// at a time. You should always check the IsTruncated element in the response. +// If there are no more configurations to list, IsTruncated is set to false. +// If there are more configurations to list, IsTruncated is set to true, and +// there will be a value in NextContinuationToken. You use the NextContinuationToken +// value to continue the pagination of the list by passing the value in continuation-token +// in the request to GET the next page. // // To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about Amazon S3 analytics feature, see Amazon S3 Analytics // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html). @@ -5726,19 +5741,19 @@ func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventory // Returns a list of inventory configurations for the bucket. You can have up // to 1,000 analytics configurations per bucket. // -// This operation supports list pagination and does not return more than 100 -// configurations at a time. Always check the IsTruncated element in the response. -// If there are no more configurations to list, IsTruncated is set to false. -// If there are more configurations to list, IsTruncated is set to true, and -// there is a value in NextContinuationToken. You use the NextContinuationToken -// value to continue the pagination of the list by passing the value in continuation-token +// This action supports list pagination and does not return more than 100 configurations +// at a time. Always check the IsTruncated element in the response. If there +// are no more configurations to list, IsTruncated is set to false. If there +// are more configurations to list, IsTruncated is set to true, and there is +// a value in NextContinuationToken. You use the NextContinuationToken value +// to continue the pagination of the list by passing the value in continuation-token // in the request to GET the next page. // // To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) @@ -5827,19 +5842,19 @@ func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConf // are only for the request metrics of the bucket and do not provide information // on daily storage metrics. You can have up to 1,000 configurations per bucket. // -// This operation supports list pagination and does not return more than 100 -// configurations at a time. Always check the IsTruncated element in the response. -// If there are no more configurations to list, IsTruncated is set to false. -// If there are more configurations to list, IsTruncated is set to true, and -// there is a value in NextContinuationToken. You use the NextContinuationToken -// value to continue the pagination of the list by passing the value in continuation-token +// This action supports list pagination and does not return more than 100 configurations +// at a time. Always check the IsTruncated element in the response. If there +// are no more configurations to list, IsTruncated is set to false. If there +// are more configurations to list, IsTruncated is set to true, and there is +// a value in NextContinuationToken. You use the NextContinuationToken value +// to continue the pagination of the list by passing the value in continuation-token // in the request to GET the next page. // // To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For more information about metrics configurations and CloudWatch request // metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). @@ -6004,11 +6019,11 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req // ListMultipartUploads API operation for Amazon Simple Storage Service. // -// This operation lists in-progress multipart uploads. An in-progress multipart +// This action lists in-progress multipart uploads. An in-progress multipart // upload is a multipart upload that has been initiated using the Initiate Multipart // Upload request, but has not yet been completed or aborted. // -// This operation returns at most 1,000 multipart uploads in the response. 1,000 +// This action returns at most 1,000 multipart uploads in the response. 1,000 // multipart uploads is the maximum number of uploads a response can include, // which is also the default value. You can further limit the number of uploads // in a response by specifying the max-uploads parameter in the response. If @@ -6025,7 +6040,7 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req // Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). // // For information on permissions required to use the multipart upload API, -// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). +// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // // The following operations are related to ListMultipartUploads: // @@ -6326,8 +6341,8 @@ func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, // to design your application to parse the contents of the response and handle // it appropriately. // -// This API has been revised. We recommend that you use the newer version, ListObjectsV2 -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), +// This action has been revised. We recommend that you use the newer version, +// ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), // when developing applications. For backward compatibility, Amazon S3 continues // to support ListObjects. // @@ -6482,18 +6497,19 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque // the request parameters as selection criteria to return a subset of the objects // in a bucket. A 200 OK response can contain valid or invalid XML. Make sure // to design your application to parse the contents of the response and handle -// it appropriately. +// it appropriately. Objects are returned sorted in an ascending order of the +// respective key names in the list. // // To use this operation, you must have READ access to the bucket. // -// To use this operation in an AWS Identity and Access Management (IAM) policy, +// To use this action in an AWS Identity and Access Management (IAM) policy, // you must have permissions to perform the s3:ListBucket action. The bucket // owner has this permission by default and can grant this permission to others. // For more information about permissions, see Permissions Related to Bucket -// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // -// This section describes the latest revision of the API. We recommend that +// This section describes the latest revision of this action. We recommend that // you use this revised API for application development. For backward compatibility, // Amazon S3 continues to support the prior version of this API, ListObjects // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). @@ -6658,7 +6674,7 @@ func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, outp // Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). // // For information on permissions required to use the multipart upload API, -// see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). +// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // // The following operations are related to ListParts: // @@ -6804,8 +6820,8 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC // To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // The Transfer Acceleration state of a bucket can be set to one of the following // two values: @@ -6815,7 +6831,7 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC // * Suspended – Disables accelerated data transfers to the bucket. // // The GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html) -// operation returns the transfer acceleration state of a bucket. +// action returns the transfer acceleration state of a bucket. // // After setting the Transfer Acceleration state of a bucket to Enabled, it // might take up to thirty minutes before the data transfer rates to the bucket @@ -7092,8 +7108,8 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon // To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // Special Errors // @@ -7227,7 +7243,7 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque // // For more information about CORS, go to Enabling Cross-Origin Resource Sharing // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon -// Simple Storage Service Developer Guide. +// S3 User Guide. // // Related Resources // @@ -7314,7 +7330,7 @@ func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *r // PutBucketEncryption API operation for Amazon Simple Storage Service. // -// This operation uses the encryption subresource to configure default encryption +// This action uses the encryption subresource to configure default encryption // and Amazon S3 Bucket Key for an existing bucket. // // Default encryption for a bucket can use server-side encryption with Amazon @@ -7322,19 +7338,19 @@ func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *r // specify default encryption using SSE-KMS, you can also configure Amazon S3 // Bucket Key. For information about default encryption, see Amazon S3 default // bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// in the Amazon Simple Storage Service Developer Guide. For more information -// about S3 Bucket Keys, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see +// Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) +// in the Amazon S3 User Guide. // -// This operation requires AWS Signature Version 4. For more information, see -// Authenticating Requests (AWS Signature Version 4) (sig-v4-authenticating-requests.html). +// This action requires AWS Signature Version 4. For more information, see Authenticating +// Requests (AWS Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html). // // To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // Related Resources // @@ -7415,7 +7431,8 @@ func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketInt // PutBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service. // -// Puts a S3 Intelligent-Tiering configuration to the specified bucket. +// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You +// can have up to 1,000 S3 Intelligent-Tiering configurations per bucket. // // The S3 Intelligent-Tiering storage class is designed to optimize storage // costs by automatically moving data to the most cost-effective storage access @@ -7442,6 +7459,22 @@ func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketInt // // * ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html) // +// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically +// move objects stored in the S3 Intelligent-Tiering storage class to the Archive +// Access or Deep Archive Access tier. +// +// Special Errors +// +// * HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument +// +// * HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are +// attempting to create a new configuration but have already reached the +// 1,000-configuration limit. +// +// * HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner +// of the specified bucket, or you do not have the s3:PutIntelligentTieringConfiguration +// bucket permission to set the configuration on the bucket. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -7515,9 +7548,9 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service. // -// This implementation of the PUT operation adds an inventory configuration -// (identified by the inventory ID) to the bucket. You can have up to 1,000 -// inventory configurations per bucket. +// This implementation of the PUT action adds an inventory configuration (identified +// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations +// per bucket. // // Amazon S3 inventory generates inventories of the objects in the bucket on // a daily or weekly basis, and the results are published to a flat file. The @@ -7530,7 +7563,7 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon // the inventory daily or weekly. You can also configure what object metadata // to include and whether to inventory all object versions or only current versions. // For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // You must create a bucket policy on the destination bucket to grant permissions // to Amazon S3 to write objects to the bucket in the defined location. For @@ -7540,9 +7573,9 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon // To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration // action. The bucket owner has this permission by default and can grant this // permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // Special Errors // @@ -7654,7 +7687,7 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req // Creates a new lifecycle configuration for the bucket or replaces an existing // lifecycle configuration. For information about lifecycle configuration, see // Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // By default, all Amazon S3 resources, including buckets, objects, and related // subresources (for example, lifecycle configuration and website configuration) @@ -7675,8 +7708,8 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req // * s3:PutLifecycleConfiguration // // For more information about permissions, see Managing Access Permissions to -// your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // For more examples of transitioning objects to storage classes such as STANDARD_IA // or ONEZONE_IA, see Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#lifecycle-configuration-examples). @@ -7692,9 +7725,9 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req // * By default, a resource owner—in this case, a bucket owner, which is // the AWS account that created the bucket—can perform any of the operations. // A resource owner can also grant others permission to perform the operation. -// For more information, see the following topics in the Amazon Simple Storage -// Service Developer Guide: Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) +// For more information, see the following topics in the Amazon S3 User Guide: +// Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) +// Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7779,7 +7812,7 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon // // Creates a new lifecycle configuration for the bucket or replaces an existing // lifecycle configuration. For information about lifecycle configuration, see -// Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // Bucket lifecycle configuration now supports specifying a lifecycle rule using // an object key name prefix, one or more object tags, or a combination of both. @@ -7831,7 +7864,7 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon // * s3:PutLifecycleConfiguration // // For more information about permissions, see Managing Access Permissions to -// Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // The following are related to PutBucketLifecycleConfiguration: // @@ -8048,8 +8081,8 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu // To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration // action. The bucket owner has this permission by default. The bucket owner // can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // For information about CloudWatch request metrics for Amazon S3, see Monitoring // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). @@ -8245,8 +8278,8 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat // // // -// This operation replaces the existing notification configuration with the -// configuration you include in the request body. +// This action replaces the existing notification configuration with the configuration +// you include in the request body. // // After Amazon S3 receives this request, it first verifies that any Amazon // Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon @@ -8266,8 +8299,8 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat // The PUT notification is an atomic operation. For example, suppose your notification // configuration includes SNS topic, SQS queue, and Lambda function configurations. // When you send a PUT request with this configuration, Amazon S3 sends test -// messages to your SNS topic. If the message fails, the entire PUT operation -// will fail, and Amazon S3 will not add the configuration to your bucket. +// messages to your SNS topic. If the message fails, the entire PUT action will +// fail, and Amazon S3 will not add the configuration to your bucket. // // Responses // @@ -8276,7 +8309,7 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat // will also include the x-amz-sns-test-message-id header containing the message // ID of the test notification sent to the topic. // -// The following operation is related to PutBucketNotificationConfiguration: +// The following action is related to PutBucketNotificationConfiguration: // // * GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html) // @@ -8552,8 +8585,8 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req // information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) // in the Amazon S3 Developer Guide. // -// To perform this operation, the user or role performing the operation must -// have the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html) +// To perform this operation, the user or role performing the action must have +// the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html) // permission. // // Specify the replication configuration in the request body. In the replication @@ -8583,7 +8616,7 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req // bucket, can perform this operation. The resource owner can also grant others // permissions to perform the operation. For more information about permissions, // see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // Handling Replication of Encrypted Objects // @@ -8786,8 +8819,8 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request // To use this operation, you must have permissions to perform the s3:PutBucketTagging // action. The bucket owner has this permission by default and can grant this // permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html). +// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). // // PutBucketTagging has the following special errors: // @@ -8801,7 +8834,7 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request // match the schema. // // * Error code: OperationAbortedError Description: A conflicting conditional -// operation is currently in progress against this resource. Please try again. +// action is currently in progress against this resource. Please try again. // // * Error code: InternalError Description: The service was unable to apply // the provided tag to the bucket. @@ -9008,7 +9041,7 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request // document and any redirect rules. For more information, see Hosting Websites // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). // -// This PUT operation requires the S3:PutBucketWebsite permission. By default, +// This PUT action requires the S3:PutBucketWebsite permission. By default, // only the bucket owner can configure the website attached to a bucket; however, // bucket owners can allow other users to set the website configuration by writing // a bucket policy that grants them the S3:PutBucketWebsite permission. @@ -9067,7 +9100,7 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request // Amazon S3 has a limitation of 50 routing rules per website configuration. // If you require more than 50 routing rules, you can use object redirect. For // more information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9174,7 +9207,7 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp // If you request server-side encryption using AWS Key Management Service (SSE-KMS), // you can enable an S3 Bucket Key at the object-level. For more information, // see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Access Control List (ACL)-Specific Request Headers // @@ -9293,7 +9326,7 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request // for a new or existing object in an S3 bucket. You must have WRITE_ACP permission // to set the ACL of an object. For more information, see What permissions can // I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // This action is not supported by Amazon S3 on Outposts. // @@ -9741,7 +9774,7 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request // // * Code: MalformedXMLError Cause: The XML provided does not match the schema. // -// * Code: OperationAbortedError Cause: A conflicting conditional operation +// * Code: OperationAbortedError Cause: A conflicting conditional action // is currently in progress against this resource. Please try again. // // * Code: InternalError Cause: The service was unable to apply the provided @@ -9751,6 +9784,8 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request // // * GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) // +// * DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html) +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -9938,9 +9973,9 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // To use this operation, you must have permissions to perform the s3:RestoreObject // action. The bucket owner has this permission by default and can grant this // permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) -// in the Amazon Simple Storage Service Developer Guide. +// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // Querying Archives with Select Requests // @@ -9950,7 +9985,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // queries and custom analytics on your archived data without having to restore // your data to a hotter Amazon S3 tier. For an overview about select requests, // see Querying Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // When making a select request, do the following: // @@ -9961,13 +9996,12 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // the storage class and encryption for the output objects stored in the // bucket. For more information about output, see Querying Archived Objects // (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html) -// in the Amazon Simple Storage Service Developer Guide. For more information -// about the S3 structure in the request body, see the following: PutObject -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) Managing -// Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) -// in the Amazon Simple Storage Service Developer Guide Protecting Data Using -// Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) -// in the Amazon Simple Storage Service Developer Guide +// in the Amazon S3 User Guide. For more information about the S3 structure +// in the request body, see the following: PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) +// Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) +// in the Amazon S3 User Guide Protecting Data Using Server-Side Encryption +// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) +// in the Amazon S3 User Guide // // * Define the SQL expression for the SELECT type of restoration for your // query in the request body's SelectParameters structure. You can use expressions @@ -9983,7 +10017,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // // For more information about using SQL with S3 Glacier Select restore, see // SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // When making a select request, you can also do the following: // @@ -10054,19 +10088,19 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // // For more information about archive retrieval options and provisioned capacity // for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // You can use Amazon S3 restore speed upgrade to change the restore speed to // a faster speed while it is in progress. For more information, see Upgrading // the speed of an in-progress restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // To get the status of object restoration, you can send a HEAD request. Operations // return the x-amz-restore header, which provides information about the restoration // status, in the response. You can use Amazon S3 event notifications to notify // you when a restore is initiated or completed. For more information, see Configuring // Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // After restoring an archived object, you can update the restoration period // by reissuing the request with a new period. Amazon S3 updates the restoration @@ -10081,11 +10115,11 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // the object in 3 days. For more information about lifecycle configuration, // see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) // and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// in Amazon Simple Storage Service Developer Guide. +// in Amazon S3 User Guide. // // Responses // -// A successful operation returns either the 200 OK or 202 Accepted status code. +// A successful action returns either the 200 OK or 202 Accepted status code. // // * If the object is not previously restored, then Amazon S3 returns 202 // Accepted in the response. @@ -10112,7 +10146,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // * GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html) // // * SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) -// in the Amazon Simple Storage Service Developer Guide +// in the Amazon S3 User Guide // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -10123,7 +10157,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError" -// This operation is not allowed against this storage tier. +// This action is not allowed against this storage tier. // // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) { @@ -10200,7 +10234,7 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // SelectObjectContent API operation for Amazon Simple Storage Service. // -// This operation filters the contents of an Amazon S3 object based on a simple +// This action filters the contents of an Amazon S3 object based on a simple // structured query language (SQL) statement. In the request, along with the // SQL expression, you must also specify a data serialization format (JSON, // CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse @@ -10212,18 +10246,18 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // // For more information about Amazon S3 Select, see Selecting Content from Objects // (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // For more information about using SQL with Amazon S3 Select, see SQL Reference // for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Permissions // // You must have s3:GetObject permission for this operation. Amazon S3 Select // does not support anonymous access. For more information about permissions, // see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Object Data Formats // @@ -10246,13 +10280,13 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // you must use the headers that are documented in the GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) -// in the Amazon Simple Storage Service Developer Guide. For objects that -// are encrypted with Amazon S3 managed encryption keys (SSE-S3) and customer -// master keys (CMKs) stored in AWS Key Management Service (SSE-KMS), server-side -// encryption is handled transparently, so you don't need to specify anything. -// For more information about server-side encryption, including SSE-S3 and -// SSE-KMS, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. For objects that are encrypted with Amazon +// S3 managed encryption keys (SSE-S3) and customer master keys (CMKs) stored +// in AWS Key Management Service (SSE-KMS), server-side encryption is handled +// transparently, so you don't need to specify anything. For more information +// about server-side encryption, including SSE-S3 and SSE-KMS, see Protecting +// Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) +// in the Amazon S3 User Guide. // // Working with the Response Body // @@ -10263,8 +10297,8 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // // GetObject Support // -// The SelectObjectContent operation does not support the following GetObject -// functionality. For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). +// The SelectObjectContent action does not support the following GetObject functionality. +// For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). // // * Range: Although you can specify a scan range for an Amazon S3 Select // request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange) @@ -10274,7 +10308,7 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // * GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You cannot // specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes. // For more information, about storage classes see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Special Errors // @@ -10567,11 +10601,11 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou // // For more information on multipart uploads, go to Multipart Upload Overview // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the -// Amazon Simple Storage Service Developer Guide . +// Amazon S3 User Guide . // // For information on the permissions required to use the multipart upload API, -// go to Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon Simple Storage Service Developer Guide. +// go to Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) +// in the Amazon S3 User Guide. // // You can optionally request server-side encryption where Amazon S3 encrypts // your data as it writes it to disks in its data centers and decrypts it for @@ -10581,7 +10615,7 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou // match the headers you used in the request to initiate the upload by using // CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html). // For more information, go to Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Server-side encryption is supported by the S3 Multipart Upload actions. Unless // you are using a customer-provided encryption key, you don't need to specify @@ -10697,10 +10731,10 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req // // The minimum allowable part size for a multipart upload is 5 MB. For more // information about multipart upload limits, go to Quick Facts (https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // Instead of using an existing object as part data, you might use the UploadPart -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation +// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) action // and provide data in your request. // // You must initiate a multipart upload before you can upload any part. In response @@ -10711,15 +10745,15 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req // // * For conceptual information about multipart uploads, see Uploading Objects // Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. // // * For information about permissions required to use the multipart upload -// API, see Multipart Upload API and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon Simple Storage Service Developer Guide. +// API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) +// in the Amazon S3 User Guide. // -// * For information about copying objects using a single atomic operation -// vs. the multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) -// in the Amazon Simple Storage Service Developer Guide. +// * For information about copying objects using a single atomic action vs. +// the multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) +// in the Amazon S3 User Guide. // // * For information about using server-side encryption with customer-provided // encryption keys with the UploadPartCopy operation, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) @@ -10808,6 +10842,97 @@ func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInp return out, req.Send() } +const opWriteGetObjectResponse = "WriteGetObjectResponse" + +// WriteGetObjectResponseRequest generates a "aws/request.Request" representing the +// client's request for the WriteGetObjectResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See WriteGetObjectResponse for more information on using the WriteGetObjectResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the WriteGetObjectResponseRequest method. +// req, resp := client.WriteGetObjectResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse +func (c *S3) WriteGetObjectResponseRequest(input *WriteGetObjectResponseInput) (req *request.Request, output *WriteGetObjectResponseOutput) { + op := &request.Operation{ + Name: opWriteGetObjectResponse, + HTTPMethod: "POST", + HTTPPath: "/WriteGetObjectResponse", + } + + if input == nil { + input = &WriteGetObjectResponseInput{} + } + + output = &WriteGetObjectResponseOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Sign.Remove(v4.SignRequestHandler) + handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) + req.Handlers.Sign.PushFrontNamed(handler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{RequestRoute}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// WriteGetObjectResponse API operation for Amazon Simple Storage Service. +// +// Passes transformed objects to a GetObject operation when using Object Lambda +// Access Points. For information about Object Lambda Access Points, see Transforming +// objects with Object Lambda Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html) +// in the Amazon S3 User Guide. +// +// This operation supports metadata that can be returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html), +// in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage. +// The GetObject response metadata is supported so that the WriteGetObjectResponse +// caller, typically an AWS Lambda function, can provide the same metadata when +// it internally invokes GetObject. When WriteGetObjectResponse is called by +// a customer-owned Lambda function, the metadata returned to the end user GetObject +// call might differ from what Amazon S3 would normally return. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation WriteGetObjectResponse for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse +func (c *S3) WriteGetObjectResponse(input *WriteGetObjectResponseInput) (*WriteGetObjectResponseOutput, error) { + req, out := c.WriteGetObjectResponseRequest(input) + return out, req.Send() +} + +// WriteGetObjectResponseWithContext is the same as WriteGetObjectResponse with the addition of +// the ability to pass a context and additional request options. +// +// See WriteGetObjectResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3) WriteGetObjectResponseWithContext(ctx aws.Context, input *WriteGetObjectResponseInput, opts ...request.Option) (*WriteGetObjectResponseOutput, error) { + req, out := c.WriteGetObjectResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Specifies the days since the initiation of an incomplete multipart upload // that Amazon S3 will wait before permanently removing all parts of the upload. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket @@ -10842,25 +10967,25 @@ type AbortMultipartUploadInput struct { // The bucket name to which the upload was taking place. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -11656,6 +11781,9 @@ type CORSRule struct { // object). ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"` + // Unique identifier for the rule. The value cannot be longer than 255 characters. + ID *string `type:"string"` + // The time in seconds that your browser is to cache the preflight response // for the specified resource. MaxAgeSeconds *int64 `type:"integer"` @@ -11711,6 +11839,12 @@ func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule { return s } +// SetID sets the ID field's value. +func (s *CORSRule) SetID(v string) *CORSRule { + s.ID = &v + return s +} + // SetMaxAgeSeconds sets the MaxAgeSeconds field's value. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { s.MaxAgeSeconds = &v @@ -11991,7 +12125,7 @@ type CompleteMultipartUploadInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -12127,19 +12261,19 @@ type CompleteMultipartUploadOutput struct { // The name of the bucket that contains the newly created object. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. Bucket *string `type:"string"` @@ -12341,6 +12475,10 @@ type Condition struct { // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals // is not specified. If both conditions are specified, both must be true for // the redirect to be applied. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). KeyPrefixEquals *string `type:"string"` } @@ -12409,19 +12547,19 @@ type CopyObjectInput struct { // The name of the destination bucket. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -12432,8 +12570,8 @@ type CopyObjectInput struct { // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with // SSE-KMS. // - // Specifying this header with a COPY operation doesn’t affect bucket-level - // settings for S3 Bucket Key. + // Specifying this header with a COPY action doesn’t affect bucket-level settings + // for S3 Bucket Key. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` // Specifies caching behavior along the request/reply chain. @@ -12455,7 +12593,7 @@ type CopyObjectInput struct { // Specifies the source object for the copy operation. You specify the value // in one of two formats, depending on whether you want to access the source - // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html): + // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html): // // * For objects not accessed through an access point, specify the name of // the source bucket and the key of the source object, separated by a slash @@ -12513,12 +12651,12 @@ type CopyObjectInput struct { // encryption key was transmitted without error. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` - // The account id of the expected destination bucket owner. If the destination + // The account ID of the expected destination bucket owner. If the destination // bucket is owned by a different account, the request will fail with an HTTP // 403 (Access Denied) error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - // The account id of the expected source bucket owner. If the source bucket + // The account ID of the expected source bucket owner. If the source bucket // is owned by a different account, the request will fail with an HTTP 403 (Access // Denied) error. ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"` @@ -13083,10 +13221,10 @@ type CopyObjectResult struct { // Returns the ETag of the new object. The ETag reflects only changes to the // contents of an object, not its metadata. The source and destination ETag - // is identical for a successfully copied object. + // is identical for a successfully copied non-multipart object. ETag *string `type:"string"` - // Returns the date that the object was last modified. + // Creation date of the object. LastModified *time.Time `type:"timestamp"` } @@ -13326,19 +13464,19 @@ type CreateMultipartUploadInput struct { // The name of the bucket to which to initiate the upload // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -13349,7 +13487,7 @@ type CreateMultipartUploadInput struct { // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with // SSE-KMS. // - // Specifying this header with an object operation doesn’t affect bucket-level + // Specifying this header with an object action doesn’t affect bucket-level // settings for S3 Bucket Key. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` @@ -13370,7 +13508,7 @@ type CreateMultipartUploadInput struct { // A standard MIME type describing the format of the object data. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -13447,7 +13585,7 @@ type CreateMultipartUploadInput struct { // object encryption. All GET and PUT requests for an object protected by AWS // KMS will fail if not made via SSL or using SigV4. For information about configuring // using any of the officially supported AWS SDKs and AWS CLI, see Specifying - // the Signature Version in Request Authentication (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) + // the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) // in the Amazon S3 Developer Guide. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` @@ -13740,19 +13878,19 @@ type CreateMultipartUploadOutput struct { // The name of the bucket to which the multipart upload was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. Bucket *string `locationName:"Bucket" type:"string"` @@ -13995,7 +14133,7 @@ type DeleteBucketAnalyticsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14109,7 +14247,7 @@ type DeleteBucketCorsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14210,7 +14348,7 @@ type DeleteBucketEncryptionInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14310,7 +14448,7 @@ type DeleteBucketInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14500,7 +14638,7 @@ type DeleteBucketInventoryConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14614,7 +14752,7 @@ type DeleteBucketLifecycleInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14714,7 +14852,7 @@ type DeleteBucketMetricsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14842,7 +14980,7 @@ type DeleteBucketOwnershipControlsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -14942,7 +15080,7 @@ type DeleteBucketPolicyInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15042,7 +15180,7 @@ type DeleteBucketReplicationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15142,7 +15280,7 @@ type DeleteBucketTaggingInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15242,7 +15380,7 @@ type DeleteBucketWebsiteInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15438,19 +15576,19 @@ type DeleteObjectInput struct { // The bucket name of the bucket containing the object. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -15460,7 +15598,7 @@ type DeleteObjectInput struct { // to process this operation. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15644,30 +15782,31 @@ type DeleteObjectTaggingInput struct { // The bucket name containing the objects from which to remove the tags. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - // Name of the object key. + // The key that identifies the object in the bucket from which to remove all + // tags. // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -15794,19 +15933,19 @@ type DeleteObjectsInput struct { // The bucket name containing the objects to delete. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -15822,7 +15961,7 @@ type DeleteObjectsInput struct { // Delete is a required field Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -15952,7 +16091,7 @@ type DeleteObjectsOutput struct { // was successfully deleted. Deleted []*DeletedObject `type:"list" flattened:"true"` - // Container for a failed delete operation that describes the object that Amazon + // Container for a failed delete action that describes the object that Amazon // S3 attempted to delete and the error it encountered. Errors []*Error `locationName:"Error" type:"list" flattened:"true"` @@ -15997,7 +16136,7 @@ type DeletePublicAccessBlockInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -16423,9 +16562,9 @@ type Error struct { // Forbidden SOAP Fault Code Prefix: Client // // * Code: AccountProblem Description: There is a problem with your AWS account - // that prevents the operation from completing successfully. Contact AWS - // Support for further assistance. HTTP Status Code: 403 Forbidden SOAP Fault - // Code Prefix: Client + // that prevents the action from completing successfully. Contact AWS Support + // for further assistance. HTTP Status Code: 403 Forbidden SOAP Fault Code + // Prefix: Client // // * Code: AllAccessDisabled Description: All access to this Amazon S3 resource // has been disabled. Contact AWS Support for further assistance. HTTP Status @@ -16528,9 +16667,9 @@ type Error struct { // Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro). // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client // - // * Code: InvalidObjectState Description: The operation is not valid for - // the current state of the object. HTTP Status Code: 403 Forbidden SOAP - // Fault Code Prefix: Client + // * Code: InvalidObjectState Description: The action is not valid for the + // current state of the object. HTTP Status Code: 403 Forbidden SOAP Fault + // Code Prefix: Client // // * Code: InvalidPart Description: One or more of the specified parts could // not be found. The part might not have been uploaded, or the specified @@ -16695,7 +16834,7 @@ type Error struct { // can sign up at the following URL: https://aws.amazon.com/s3 HTTP Status // Code: 403 Forbidden SOAP Fault Code Prefix: Client // - // * Code: OperationAborted Description: A conflicting conditional operation + // * Code: OperationAborted Description: A conflicting conditional action // is currently in progress against this resource. Try again. HTTP Status // Code: 409 Conflict SOAP Fault Code Prefix: Client // @@ -16821,6 +16960,10 @@ type ErrorDocument struct { // The object key name to use when a 4XX class error occurs. // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). + // // Key is a required field Key *string `min:"1" type:"string" required:"true"` } @@ -16942,7 +17085,7 @@ type GetBucketAccelerateConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17051,7 +17194,7 @@ type GetBucketAclInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17169,7 +17312,7 @@ type GetBucketAnalyticsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17292,7 +17435,7 @@ type GetBucketCorsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17403,7 +17546,7 @@ type GetBucketEncryptionInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17625,7 +17768,7 @@ type GetBucketInventoryConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17748,7 +17891,7 @@ type GetBucketLifecycleConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17857,7 +18000,7 @@ type GetBucketLifecycleInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -17966,7 +18109,7 @@ type GetBucketLocationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18077,7 +18220,7 @@ type GetBucketLoggingInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18189,7 +18332,7 @@ type GetBucketMetricsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18312,7 +18455,7 @@ type GetBucketNotificationConfigurationRequest struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18398,7 +18541,7 @@ type GetBucketOwnershipControlsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18508,7 +18651,7 @@ type GetBucketPolicyInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18617,7 +18760,7 @@ type GetBucketPolicyStatusInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18726,7 +18869,7 @@ type GetBucketReplicationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18836,7 +18979,7 @@ type GetBucketRequestPaymentInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -18945,7 +19088,7 @@ type GetBucketTaggingInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19056,7 +19199,7 @@ type GetBucketVersioningInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19176,7 +19319,7 @@ type GetBucketWebsiteInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19310,17 +19453,17 @@ type GetObjectAclInput struct { // The bucket name that contains the object for which to get the ACL information. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19484,25 +19627,25 @@ type GetObjectInput struct { // The bucket name containing the object. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19565,14 +19708,14 @@ type GetObjectInput struct { // Sets the Expires header of the response. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"` - // Specifies the algorithm to use to when encrypting the object (for example, + // Specifies the algorithm to use to when decrypting the object (for example, // AES256). SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm + // Specifies the customer-provided encryption key for Amazon S3 used to encrypt + // the data. This value is used to decrypt the object when recovering it and + // must match the one used when storing the data. The key must be appropriate + // for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm // header. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` @@ -19784,17 +19927,17 @@ type GetObjectLegalHoldInput struct { // The bucket name containing the object whose Legal Hold status you want to // retrieve. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -19939,17 +20082,17 @@ type GetObjectLockConfigurationInput struct { // The bucket whose Object Lock configuration you want to retrieve. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -20103,7 +20246,7 @@ type GetObjectOutput struct { // The date and time at which the object is no longer cacheable. Expires *string `location:"header" locationName:"Expires" type:"string"` - // Last modified date of the object + // Creation date of the object. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. @@ -20140,7 +20283,7 @@ type GetObjectOutput struct { // request. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - // Provides information about object restoration operation and expiration time + // Provides information about object restoration action and expiration time // of the restored object copy. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"` @@ -20387,17 +20530,17 @@ type GetObjectRetentionInput struct { // The bucket name containing the object whose retention settings you want to // retrieve. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -20542,25 +20685,25 @@ type GetObjectTaggingInput struct { // The bucket name containing the object for which to get the tagging information. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -20570,6 +20713,13 @@ type GetObjectTaggingInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // in the Amazon S3 Developer Guide. + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + // The versionId of the object for which to get the tagging information. VersionId *string `location:"querystring" locationName:"versionId" type:"string"` } @@ -20631,6 +20781,12 @@ func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput { return s } +// SetRequestPayer sets the RequestPayer field's value. +func (s *GetObjectTaggingInput) SetRequestPayer(v string) *GetObjectTaggingInput { + s.RequestPayer = &v + return s +} + // SetVersionId sets the VersionId field's value. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput { s.VersionId = &v @@ -20707,7 +20863,7 @@ type GetObjectTorrentInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -20857,7 +21013,7 @@ type GetPublicAccessBlockInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -21149,25 +21305,25 @@ type HeadBucketInput struct { // The bucket name. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -21264,25 +21420,25 @@ type HeadObjectInput struct { // The name of the bucket containing the object. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -21555,7 +21711,7 @@ type HeadObjectOutput struct { // The date and time at which the object is no longer cacheable. Expires *string `location:"header" locationName:"Expires" type:"string"` - // Last modified date of the object + // Creation date of the object. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. @@ -21881,6 +22037,10 @@ type IndexDocument struct { // with the key name images/index.html) The suffix must not be empty and must // not include a slash character. // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). + // // Suffix is a required field Suffix *string `type:"string" required:"true"` } @@ -22164,6 +22324,10 @@ type IntelligentTieringFilter struct { // An object key name prefix that identifies the subset of objects to which // the rule applies. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). Prefix *string `type:"string"` // A container of a key value name pair. @@ -22911,6 +23075,10 @@ type LifecycleRule struct { // Prefix identifying one or more objects to which the rule applies. This is // No longer used; use Filter instead. // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). + // // Deprecated: Prefix has been deprecated Prefix *string `deprecated:"true" type:"string"` @@ -23073,6 +23241,10 @@ type LifecycleRuleFilter struct { And *LifecycleRuleAndOperator `type:"structure"` // Prefix identifying one or more objects to which the rule applies. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). Prefix *string `type:"string"` // This tag must exist in the object's tag set in order for the rule to apply. @@ -23139,7 +23311,7 @@ type ListBucketAnalyticsConfigurationsInput struct { // should begin. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -23433,7 +23605,7 @@ type ListBucketInventoryConfigurationsInput struct { // that Amazon S3 understands. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -23586,7 +23758,7 @@ type ListBucketMetricsConfigurationsInput struct { // value that Amazon S3 understands. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -23777,19 +23949,19 @@ type ListMultipartUploadsInput struct { // The name of the bucket to which the multipart upload was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -23813,7 +23985,7 @@ type ListMultipartUploadsInput struct { // keys in the response. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -24125,7 +24297,7 @@ type ListObjectVersionsInput struct { // keys in the response. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -24134,7 +24306,7 @@ type ListObjectVersionsInput struct { KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` // Sets the maximum number of keys returned in the response. By default the - // API returns up to 1,000 key names. The response might contain fewer keys + // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. If additional keys satisfy the search criteria, // but were not returned because max-keys was exceeded, the response contains // true. To return the additional keys, see key-marker @@ -24417,19 +24589,19 @@ type ListObjectsInput struct { // The name of the bucket containing the objects. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -24446,7 +24618,7 @@ type ListObjectsInput struct { // keys in the response. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -24455,7 +24627,7 @@ type ListObjectsInput struct { Marker *string `location:"querystring" locationName:"marker" type:"string"` // Sets the maximum number of keys returned in the response. By default the - // API returns up to 1,000 key names. The response might contain fewer keys + // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` @@ -24579,8 +24751,8 @@ func (s ListObjectsInput) updateArnableField(v string) (interface{}, error) { type ListObjectsOutput struct { _ struct{} `type:"structure"` - // All of the keys rolled up in a common prefix count as a single return when - // calculating the number of returns. + // All of the keys (up to 1,000) rolled up in a common prefix count as a single + // return when calculating the number of returns. // // A response can contain CommonPrefixes only if you specify a delimiter. // @@ -24711,19 +24883,19 @@ type ListObjectsV2Input struct { // Bucket name to list. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -24740,7 +24912,7 @@ type ListObjectsV2Input struct { // Encoding type used by Amazon S3 to encode object keys in the response. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -24751,7 +24923,7 @@ type ListObjectsV2Input struct { FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"` // Sets the maximum number of keys returned in the response. By default the - // API returns up to 1,000 key names. The response might contain fewer keys + // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` @@ -24891,8 +25063,8 @@ func (s ListObjectsV2Input) updateArnableField(v string) (interface{}, error) { type ListObjectsV2Output struct { _ struct{} `type:"structure"` - // All of the keys rolled up into a common prefix count as a single return when - // calculating the number of returns. + // All of the keys (up to 1,000) rolled up into a common prefix count as a single + // return when calculating the number of returns. // // A response can contain CommonPrefixes only if you specify a delimiter. // @@ -24936,30 +25108,30 @@ type ListObjectsV2Output struct { IsTruncated *bool `type:"boolean"` // KeyCount is the number of keys returned with this request. KeyCount will - // always be less than equals to MaxKeys field. Say you ask for 50 keys, your - // result will include less than equals 50 keys + // always be less than or equals to MaxKeys field. Say you ask for 50 keys, + // your result will include less than equals 50 keys KeyCount *int64 `type:"integer"` // Sets the maximum number of keys returned in the response. By default the - // API returns up to 1,000 key names. The response might contain fewer keys + // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `type:"integer"` // The bucket name. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. Name *string `type:"string"` @@ -25063,25 +25235,25 @@ type ListPartsInput struct { // The name of the bucket to which the parts are being uploaded. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -26195,7 +26367,7 @@ type Object struct { // the object. Key *string `min:"1" type:"string"` - // The date the Object was Last Modified + // Creation date of the object. LastModified *time.Time `type:"timestamp"` // The owner of the object @@ -26258,7 +26430,11 @@ func (s *Object) SetStorageClass(v string) *Object { type ObjectIdentifier struct { _ struct{} `type:"structure"` - // Key name of the object to delete. + // Key name of the object. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). // // Key is a required field Key *string `min:"1" type:"string" required:"true"` @@ -26899,7 +27075,7 @@ func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstr // S3 bucket. You can enable the configuration options in any combination. For // more information about when Amazon S3 considers a bucket or object public, // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. type PublicAccessBlockConfiguration struct { _ struct{} `type:"structure"` @@ -26990,7 +27166,7 @@ type PutBucketAccelerateConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27105,7 +27281,7 @@ type PutBucketAclInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27273,7 +27449,7 @@ type PutBucketAnalyticsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27404,12 +27580,12 @@ type PutBucketCorsInput struct { // Describes the cross-origin access configuration for objects in an Amazon // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon - // Simple Storage Service Developer Guide. + // S3 User Guide. // // CORSConfiguration is a required field CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27527,7 +27703,7 @@ type PutBucketEncryptionInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27769,7 +27945,7 @@ type PutBucketInventoryConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -27902,7 +28078,7 @@ type PutBucketLifecycleConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28014,7 +28190,7 @@ type PutBucketLifecycleInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28133,7 +28309,7 @@ type PutBucketLoggingInput struct { // BucketLoggingStatus is a required field BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28247,7 +28423,7 @@ type PutBucketMetricsConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28380,7 +28556,7 @@ type PutBucketNotificationConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28500,7 +28676,7 @@ type PutBucketNotificationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28614,7 +28790,7 @@ type PutBucketOwnershipControlsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28738,7 +28914,7 @@ type PutBucketPolicyInput struct { // to change this bucket policy in the future. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28858,7 +29034,7 @@ type PutBucketReplicationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -28987,7 +29163,7 @@ type PutBucketRequestPaymentInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29106,7 +29282,7 @@ type PutBucketTaggingInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29225,7 +29401,7 @@ type PutBucketVersioningInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29349,7 +29525,7 @@ type PutBucketWebsiteInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29473,17 +29649,17 @@ type PutObjectAclInput struct { // The bucket name that contains the object to which you want to attach the // ACL. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29512,21 +29688,21 @@ type PutObjectAclInput struct { // This action is not supported by Amazon S3 on Outposts. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - // Key for which the PUT operation was initiated. + // Key for which the PUT action was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Key is a required field @@ -29722,21 +29898,21 @@ type PutObjectInput struct { // Object data. Body io.ReadSeeker `type:"blob"` - // The bucket name to which the PUT operation was initiated. + // The bucket name to which the PUT action was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -29747,8 +29923,8 @@ type PutObjectInput struct { // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with // SSE-KMS. // - // Specifying this header with a PUT operation doesn’t affect bucket-level - // settings for S3 Bucket Key. + // Specifying this header with a PUT action doesn’t affect bucket-level settings + // for S3 Bucket Key. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` // Can be used to specify caching behavior along the request/reply chain. For @@ -29786,7 +29962,7 @@ type PutObjectInput struct { // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17). ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -29815,7 +29991,7 @@ type PutObjectInput struct { // This action is not supported by Amazon S3 on Outposts. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - // Object key for which the PUT operation was initiated. + // Object key for which the PUT action was initiated. // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -30181,17 +30357,17 @@ type PutObjectLegalHoldInput struct { // The bucket name containing the object that you want to place a Legal Hold // on. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -30350,7 +30526,7 @@ type PutObjectLockConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -30611,20 +30787,20 @@ type PutObjectRetentionInput struct { // The bucket name that contains the object you want to apply this Object Retention // configuration to. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // Indicates whether this operation should bypass Governance-mode restrictions. + // Indicates whether this action should bypass Governance-mode restrictions. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -30787,25 +30963,25 @@ type PutObjectTaggingInput struct { // The bucket name containing the object. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -30815,6 +30991,13 @@ type PutObjectTaggingInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // in the Amazon S3 Developer Guide. + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + // Container for the TagSet and Tag elements // // Tagging is a required field @@ -30889,6 +31072,12 @@ func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput { return s } +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectTaggingInput) SetRequestPayer(v string) *PutObjectTaggingInput { + s.RequestPayer = &v + return s +} + // SetTagging sets the Tagging field's value. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput { s.Tagging = v @@ -30960,7 +31149,7 @@ type PutPublicAccessBlockInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -31158,7 +31347,7 @@ type QueueConfigurationDeprecated struct { // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` - // A collection of bucket events for which to send notifications + // A collection of bucket events for which to send notifications. Events []*string `locationName:"Event" type:"list" flattened:"true"` // An optional unique identifier for configurations in a notification configuration. @@ -31275,11 +31464,19 @@ type Redirect struct { // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required // if one of the siblings is present. Can be present only if ReplaceKeyWith // is not provided. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). ReplaceKeyPrefixWith *string `type:"string"` // The specific object key to use in the redirect request. For example, redirect // request to error.html. Not required if one of the siblings is present. Can // be present only if ReplaceKeyPrefixWith is not provided. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). ReplaceKeyWith *string `type:"string"` } @@ -31529,6 +31726,10 @@ type ReplicationRule struct { // the rule applies. The maximum prefix length is 1,024 characters. To include // all objects in a bucket, specify an empty string. // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). + // // Deprecated: Prefix has been deprecated Prefix *string `deprecated:"true" type:"string"` @@ -31665,7 +31866,7 @@ func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { // an And tag. // // * If you specify a filter based on multiple tags, wrap the Tag elements -// in an And tag +// in an And tag. type ReplicationRuleAndOperator struct { _ struct{} `type:"structure"` @@ -31737,6 +31938,10 @@ type ReplicationRuleFilter struct { // An object key name prefix that identifies the subset of objects to which // the rule applies. + // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). Prefix *string `type:"string"` // A container for specifying a tag key and value. @@ -31946,30 +32151,30 @@ type RestoreObjectInput struct { // The bucket name containing the object to restore. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - // Object key for which the operation was initiated. + // Object key for which the action was initiated. // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -32240,7 +32445,7 @@ func (s *RestoreRequest) SetType(v string) *RestoreRequest { // Specifies the redirect behavior and when a redirect is applied. For more // information about routing rules, see Configuring advanced conditional redirects // (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. type RoutingRule struct { _ struct{} `type:"structure"` @@ -32296,7 +32501,7 @@ func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule { // Specifies lifecycle rules for an Amazon S3 bucket. For more information, // see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html) // in the Amazon Simple Storage Service API Reference. For examples, see Put -// Bucket Lifecycle Configuration Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples) +// Bucket Lifecycle Configuration Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples). type Rule struct { _ struct{} `type:"structure"` @@ -32332,6 +32537,10 @@ type Rule struct { // Object key prefix that identifies one or more objects to which this rule // applies. // + // Replacement must be made for object keys containing special characters (such + // as carriage returns) when using XML requests. For more information, see XML + // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). + // // Prefix is a required field Prefix *string `type:"string" required:"true"` @@ -32344,7 +32553,7 @@ type Rule struct { // Specifies when an object transitions to a specified storage class. For more // information about Amazon S3 lifecycle configuration rules, see Transitioning // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. Transition *Transition `type:"structure"` } @@ -32703,7 +32912,7 @@ type SelectObjectContentInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -33168,7 +33377,7 @@ type ServerSideEncryptionRule struct { // S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. // // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. BucketKeyEnabled *bool `type:"boolean"` } @@ -33735,7 +33944,7 @@ type TopicConfiguration struct { // The Amazon S3 bucket event about which to send notifications. For more information, // see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. // // Events is a required field Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` @@ -33868,7 +34077,7 @@ func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDep // Specifies when an object transitions to a specified storage class. For more // information about Amazon S3 lifecycle configuration rules, see Transitioning // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) -// in the Amazon Simple Storage Service Developer Guide. +// in the Amazon S3 User Guide. type Transition struct { _ struct{} `type:"structure"` @@ -33917,19 +34126,19 @@ type UploadPartCopyInput struct { // The bucket name. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -33937,7 +34146,7 @@ type UploadPartCopyInput struct { // Specifies the source object for the copy operation. You specify the value // in one of two formats, depending on whether you want to access the source - // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html): + // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html): // // * For objects not accessed through an access point, specify the name of // the source bucket and key of the source object, separated by a slash (/). @@ -34001,12 +34210,12 @@ type UploadPartCopyInput struct { // encryption key was transmitted without error. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` - // The account id of the expected destination bucket owner. If the destination + // The account ID of the expected destination bucket owner. If the destination // bucket is owned by a different account, the request will fail with an HTTP // 403 (Access Denied) error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - // The account id of the expected source bucket owner. If the source bucket + // The account ID of the expected source bucket owner. If the source bucket // is owned by a different account, the request will fail with an HTTP 403 (Access // Denied) error. ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"` @@ -34359,19 +34568,19 @@ type UploadPartInput struct { // The name of the bucket to which the multipart upload was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -34386,7 +34595,7 @@ type UploadPartInput struct { // if object lock parameters are specified. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -34793,6 +35002,451 @@ func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfigu return s } +type WriteGetObjectResponseInput struct { + _ struct{} `locationName:"WriteGetObjectResponseRequest" type:"structure" payload:"Body"` + + // Indicates that a range of bytes was specified. + AcceptRanges *string `location:"header" locationName:"x-amz-fwd-header-accept-ranges" type:"string"` + + // The object data. + // + // To use an non-seekable io.Reader for this request wrap the io.Reader with + // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable + // readers. This will allow the SDK to send the reader's payload as chunked + // transfer encoding. + Body io.ReadSeeker `type:"blob"` + + // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for + // server-side encryption with AWS KMS (SSE-KMS). + BucketKeyEnabled *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` + + // Specifies caching behavior along the request/reply chain. + CacheControl *string `location:"header" locationName:"x-amz-fwd-header-Cache-Control" type:"string"` + + // Specifies presentational information for the object. + ContentDisposition *string `location:"header" locationName:"x-amz-fwd-header-Content-Disposition" type:"string"` + + // Specifies what content encodings have been applied to the object and thus + // what decoding mechanisms must be applied to obtain the media-type referenced + // by the Content-Type header field. + ContentEncoding *string `location:"header" locationName:"x-amz-fwd-header-Content-Encoding" type:"string"` + + // The language the content is in. + ContentLanguage *string `location:"header" locationName:"x-amz-fwd-header-Content-Language" type:"string"` + + // The size of the content body in bytes. + ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` + + // The portion of the object returned in the response. + ContentRange *string `location:"header" locationName:"x-amz-fwd-header-Content-Range" type:"string"` + + // A standard MIME type describing the format of the object data. + ContentType *string `location:"header" locationName:"x-amz-fwd-header-Content-Type" type:"string"` + + // Specifies whether an object stored in Amazon S3 is (true) or is not (false) + // a delete marker. + DeleteMarker *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-delete-marker" type:"boolean"` + + // An opaque identifier assigned by a web server to a specific version of a + // resource found at a URL. + ETag *string `location:"header" locationName:"x-amz-fwd-header-ETag" type:"string"` + + // A string that uniquely identifies an error condition. Returned in the + // tag of the error XML response for a corresponding GetObject call. Cannot + // be used with a successful StatusCode header or when the transformed object + // is provided in the body. + ErrorCode *string `location:"header" locationName:"x-amz-fwd-error-code" type:"string"` + + // Contains a generic description of the error condition. Returned in the + // tag of the error XML response for a corresponding GetObject call. Cannot + // be used with a successful StatusCode header or when the transformed object + // is provided in body. + ErrorMessage *string `location:"header" locationName:"x-amz-fwd-error-message" type:"string"` + + // If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle) + // it includes expiry-date and rule-id key-value pairs providing object expiration + // information. The value of the rule-id is URL encoded. + Expiration *string `location:"header" locationName:"x-amz-fwd-header-x-amz-expiration" type:"string"` + + // The date and time at which the object is no longer cacheable. + Expires *time.Time `location:"header" locationName:"x-amz-fwd-header-Expires" type:"timestamp"` + + // The date and time that the object was last modified. + LastModified *time.Time `location:"header" locationName:"x-amz-fwd-header-Last-Modified" type:"timestamp"` + + // A map of metadata to store with the object in S3. + Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` + + // Set to the number of metadata entries not returned in x-amz-meta headers. + // This can happen if you create metadata using an API like SOAP that supports + // more flexible metadata than the REST API. For example, using SOAP, you can + // create metadata whose values are not legal HTTP headers. + MissingMeta *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-missing-meta" type:"integer"` + + // Indicates whether an object stored in Amazon S3 has an active legal hold. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // Indicates whether an object stored in Amazon S3 has Object Lock enabled. + // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html). + ObjectLockMode *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // The date and time when Object Lock is configured to expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + + // The count of parts this object has. + PartsCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-mp-parts-count" type:"integer"` + + // Indicates if request involves bucket that is either a source or destination + // in a Replication rule. For more information about S3 Replication, see Replication + // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html). + ReplicationStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-replication-status" type:"string" enum:"ReplicationStatus"` + + // If present, indicates that the requester was successfully charged for the + // request. + RequestCharged *string `location:"header" locationName:"x-amz-fwd-header-x-amz-request-charged" type:"string" enum:"RequestCharged"` + + // Route prefix to the HTTP URL generated. + // + // RequestRoute is a required field + RequestRoute *string `location:"header" locationName:"x-amz-request-route" type:"string" required:"true"` + + // A single use encrypted token that maps WriteGetObjectResponse to the end + // user GetObject request. + // + // RequestToken is a required field + RequestToken *string `location:"header" locationName:"x-amz-request-token" type:"string" required:"true"` + + // Provides information about object restoration operation and expiration time + // of the restored object copy. + Restore *string `location:"header" locationName:"x-amz-fwd-header-x-amz-restore" type:"string"` + + // Encryption algorithm used if server-side encryption with a customer-provided + // encryption key was specified for object stored in Amazon S3. + SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" type:"string"` + + // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 + // to encrypt data stored in S3. For more information, see Protecting data using + // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html). + SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" type:"string"` + + // If present, specifies the ID of the AWS Key Management Service (AWS KMS) + // symmetric customer managed customer master key (CMK) that was used for stored + // in Amazon S3 object. + SSEKMSKeyId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` + + // The server-side encryption algorithm used when storing requested object in + // Amazon S3 (for example, AES256, aws:kms). + ServerSideEncryption *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` + + // The integer status code for an HTTP response of a corresponding GetObject + // request. + // + // Status Codes + // + // * 200 - OK + // + // * 206 - Partial Content + // + // * 304 - Not Modified + // + // * 400 - Bad Request + // + // * 401 - Unauthorized + // + // * 403 - Forbidden + // + // * 404 - Not Found + // + // * 405 - Method Not Allowed + // + // * 409 - Conflict + // + // * 411 - Length Required + // + // * 412 - Precondition Failed + // + // * 416 - Range Not Satisfiable + // + // * 500 - Internal Server Error + // + // * 503 - Service Unavailable + StatusCode *int64 `location:"header" locationName:"x-amz-fwd-status" type:"integer"` + + // The class of storage used to store object in Amazon S3. + StorageClass *string `location:"header" locationName:"x-amz-fwd-header-x-amz-storage-class" type:"string" enum:"StorageClass"` + + // The number of tags, if any, on the object. + TagCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-tagging-count" type:"integer"` + + // An ID used to reference a specific version of the object. + VersionId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-version-id" type:"string"` +} + +// String returns the string representation +func (s WriteGetObjectResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteGetObjectResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WriteGetObjectResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WriteGetObjectResponseInput"} + if s.RequestRoute == nil { + invalidParams.Add(request.NewErrParamRequired("RequestRoute")) + } + if s.RequestRoute != nil && len(*s.RequestRoute) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestRoute", 1)) + } + if s.RequestToken == nil { + invalidParams.Add(request.NewErrParamRequired("RequestToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptRanges sets the AcceptRanges field's value. +func (s *WriteGetObjectResponseInput) SetAcceptRanges(v string) *WriteGetObjectResponseInput { + s.AcceptRanges = &v + return s +} + +// SetBody sets the Body field's value. +func (s *WriteGetObjectResponseInput) SetBody(v io.ReadSeeker) *WriteGetObjectResponseInput { + s.Body = v + return s +} + +// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. +func (s *WriteGetObjectResponseInput) SetBucketKeyEnabled(v bool) *WriteGetObjectResponseInput { + s.BucketKeyEnabled = &v + return s +} + +// SetCacheControl sets the CacheControl field's value. +func (s *WriteGetObjectResponseInput) SetCacheControl(v string) *WriteGetObjectResponseInput { + s.CacheControl = &v + return s +} + +// SetContentDisposition sets the ContentDisposition field's value. +func (s *WriteGetObjectResponseInput) SetContentDisposition(v string) *WriteGetObjectResponseInput { + s.ContentDisposition = &v + return s +} + +// SetContentEncoding sets the ContentEncoding field's value. +func (s *WriteGetObjectResponseInput) SetContentEncoding(v string) *WriteGetObjectResponseInput { + s.ContentEncoding = &v + return s +} + +// SetContentLanguage sets the ContentLanguage field's value. +func (s *WriteGetObjectResponseInput) SetContentLanguage(v string) *WriteGetObjectResponseInput { + s.ContentLanguage = &v + return s +} + +// SetContentLength sets the ContentLength field's value. +func (s *WriteGetObjectResponseInput) SetContentLength(v int64) *WriteGetObjectResponseInput { + s.ContentLength = &v + return s +} + +// SetContentRange sets the ContentRange field's value. +func (s *WriteGetObjectResponseInput) SetContentRange(v string) *WriteGetObjectResponseInput { + s.ContentRange = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *WriteGetObjectResponseInput) SetContentType(v string) *WriteGetObjectResponseInput { + s.ContentType = &v + return s +} + +// SetDeleteMarker sets the DeleteMarker field's value. +func (s *WriteGetObjectResponseInput) SetDeleteMarker(v bool) *WriteGetObjectResponseInput { + s.DeleteMarker = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *WriteGetObjectResponseInput) SetETag(v string) *WriteGetObjectResponseInput { + s.ETag = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *WriteGetObjectResponseInput) SetErrorCode(v string) *WriteGetObjectResponseInput { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *WriteGetObjectResponseInput) SetErrorMessage(v string) *WriteGetObjectResponseInput { + s.ErrorMessage = &v + return s +} + +// SetExpiration sets the Expiration field's value. +func (s *WriteGetObjectResponseInput) SetExpiration(v string) *WriteGetObjectResponseInput { + s.Expiration = &v + return s +} + +// SetExpires sets the Expires field's value. +func (s *WriteGetObjectResponseInput) SetExpires(v time.Time) *WriteGetObjectResponseInput { + s.Expires = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *WriteGetObjectResponseInput) SetLastModified(v time.Time) *WriteGetObjectResponseInput { + s.LastModified = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *WriteGetObjectResponseInput) SetMetadata(v map[string]*string) *WriteGetObjectResponseInput { + s.Metadata = v + return s +} + +// SetMissingMeta sets the MissingMeta field's value. +func (s *WriteGetObjectResponseInput) SetMissingMeta(v int64) *WriteGetObjectResponseInput { + s.MissingMeta = &v + return s +} + +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *WriteGetObjectResponseInput) SetObjectLockLegalHoldStatus(v string) *WriteGetObjectResponseInput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *WriteGetObjectResponseInput) SetObjectLockMode(v string) *WriteGetObjectResponseInput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *WriteGetObjectResponseInput) SetObjectLockRetainUntilDate(v time.Time) *WriteGetObjectResponseInput { + s.ObjectLockRetainUntilDate = &v + return s +} + +// SetPartsCount sets the PartsCount field's value. +func (s *WriteGetObjectResponseInput) SetPartsCount(v int64) *WriteGetObjectResponseInput { + s.PartsCount = &v + return s +} + +// SetReplicationStatus sets the ReplicationStatus field's value. +func (s *WriteGetObjectResponseInput) SetReplicationStatus(v string) *WriteGetObjectResponseInput { + s.ReplicationStatus = &v + return s +} + +// SetRequestCharged sets the RequestCharged field's value. +func (s *WriteGetObjectResponseInput) SetRequestCharged(v string) *WriteGetObjectResponseInput { + s.RequestCharged = &v + return s +} + +// SetRequestRoute sets the RequestRoute field's value. +func (s *WriteGetObjectResponseInput) SetRequestRoute(v string) *WriteGetObjectResponseInput { + s.RequestRoute = &v + return s +} + +// SetRequestToken sets the RequestToken field's value. +func (s *WriteGetObjectResponseInput) SetRequestToken(v string) *WriteGetObjectResponseInput { + s.RequestToken = &v + return s +} + +// SetRestore sets the Restore field's value. +func (s *WriteGetObjectResponseInput) SetRestore(v string) *WriteGetObjectResponseInput { + s.Restore = &v + return s +} + +// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. +func (s *WriteGetObjectResponseInput) SetSSECustomerAlgorithm(v string) *WriteGetObjectResponseInput { + s.SSECustomerAlgorithm = &v + return s +} + +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *WriteGetObjectResponseInput) SetSSECustomerKeyMD5(v string) *WriteGetObjectResponseInput { + s.SSECustomerKeyMD5 = &v + return s +} + +// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. +func (s *WriteGetObjectResponseInput) SetSSEKMSKeyId(v string) *WriteGetObjectResponseInput { + s.SSEKMSKeyId = &v + return s +} + +// SetServerSideEncryption sets the ServerSideEncryption field's value. +func (s *WriteGetObjectResponseInput) SetServerSideEncryption(v string) *WriteGetObjectResponseInput { + s.ServerSideEncryption = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *WriteGetObjectResponseInput) SetStatusCode(v int64) *WriteGetObjectResponseInput { + s.StatusCode = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *WriteGetObjectResponseInput) SetStorageClass(v string) *WriteGetObjectResponseInput { + s.StorageClass = &v + return s +} + +// SetTagCount sets the TagCount field's value. +func (s *WriteGetObjectResponseInput) SetTagCount(v int64) *WriteGetObjectResponseInput { + s.TagCount = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *WriteGetObjectResponseInput) SetVersionId(v string) *WriteGetObjectResponseInput { + s.VersionId = &v + return s +} + +func (s *WriteGetObjectResponseInput) hostLabels() map[string]string { + return map[string]string{ + "RequestRoute": aws.StringValue(s.RequestRoute), + } +} + +type WriteGetObjectResponseOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s WriteGetObjectResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteGetObjectResponseOutput) GoString() string { + return s.String() +} + const ( // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value AnalyticsS3ExportFileFormatCsv = "CSV" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index f1959b03a..ce87ab320 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -48,6 +48,8 @@ func defaultInitRequestFn(r *request.Request) { // case opGetObject: // r.Handlers.Build.PushBack(askForTxEncodingAppendMD5) // r.Handlers.Unmarshal.PushBack(useMD5ValidationReader) + case opWriteGetObjectResponse: + r.Handlers.Build.PushFront(buildWriteGetObjectResponseEndpoint) } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go index 6346b9279..9fc2105fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go @@ -1,6 +1,8 @@ package s3 import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awserr" "net/url" "strings" @@ -11,6 +13,13 @@ import ( "github.com/aws/aws-sdk-go/internal/s3shared/arn" ) +const ( + s3Namespace = "s3" + s3AccessPointNamespace = "s3-accesspoint" + s3ObjectsLambdaNamespace = "s3-object-lambda" + s3OutpostsNamespace = "s3-outposts" +) + // Used by shapes with members decorated as endpoint ARN. func parseEndpointARN(v string) (arn.Resource, error) { return arn.ParseResource(v, accessPointResourceParser) @@ -20,10 +29,14 @@ func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) { resParts := arn.SplitResource(a.Resource) switch resParts[0] { case "accesspoint": - if a.Service != "s3" { - return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3"} + switch a.Service { + case s3Namespace: + return arn.ParseAccessPointResource(a, resParts[1:]) + case s3ObjectsLambdaNamespace: + return parseS3ObjectLambdaAccessPointResource(a, resParts) + default: + return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s or %s", s3Namespace, s3ObjectsLambdaNamespace)} } - return arn.ParseAccessPointResource(a, resParts[1:]) case "outpost": if a.Service != "s3-outposts" { return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"} @@ -80,6 +93,25 @@ func parseOutpostAccessPointResource(a awsarn.ARN, resParts []string) (arn.Outpo return outpostAccessPointARN, nil } +func parseS3ObjectLambdaAccessPointResource(a awsarn.ARN, resParts []string) (arn.S3ObjectLambdaAccessPointARN, error) { + if a.Service != s3ObjectsLambdaNamespace { + return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s", s3ObjectsLambdaNamespace)} + } + + accessPointARN, err := arn.ParseAccessPointResource(a, resParts[1:]) + if err != nil { + return arn.S3ObjectLambdaAccessPointARN{}, err + } + + if len(accessPointARN.Region) == 0 { + return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("%s region not set", s3ObjectsLambdaNamespace)} + } + + return arn.S3ObjectLambdaAccessPointARN{ + AccessPointARN: accessPointARN, + }, nil +} + func endpointHandler(req *request.Request) { endpoint, ok := req.Params.(endpointARNGetter) if !ok || !endpoint.hasEndpointARN() { @@ -116,6 +148,11 @@ func endpointHandler(req *request.Request) { if err != nil { req.Error = err } + case arn.S3ObjectLambdaAccessPointARN: + err = updateRequestS3ObjectLambdaAccessPointEndpoint(req, tv) + if err != nil { + req.Error = err + } case arn.OutpostAccessPointARN: // outposts does not support FIPS regions if resReq.ResourceConfiguredForFIPS() { @@ -162,6 +199,31 @@ func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.Acce return nil } +func updateRequestS3ObjectLambdaAccessPointEndpoint(req *request.Request, accessPoint arn.S3ObjectLambdaAccessPointARN) error { + // DualStack not supported + if aws.BoolValue(req.Config.UseDualStack) { + return s3shared.NewClientConfiguredForDualStackError(accessPoint, + req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) + } + + // Accelerate not supported + if aws.BoolValue(req.Config.S3UseAccelerate) { + return s3shared.NewClientConfiguredForAccelerateError(accessPoint, + req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) + } + + // Ignore the disable host prefix for access points + req.Config.DisableEndpointHostPrefix = aws.Bool(false) + + if err := s3ObjectLambdaAccessPointEndpointBuilder(accessPoint).build(req); err != nil { + return err + } + + removeBucketFromPath(req.HTTPRequest.URL) + + return nil +} + func updateRequestOutpostAccessPointEndpoint(req *request.Request, accessPoint arn.OutpostAccessPointARN) error { // Accelerate not supported if aws.BoolValue(req.Config.S3UseAccelerate) { @@ -192,3 +254,37 @@ func removeBucketFromPath(u *url.URL) { u.Path = "/" } } + +func buildWriteGetObjectResponseEndpoint(req *request.Request) { + // DualStack not supported + if aws.BoolValue(req.Config.UseDualStack) { + req.Error = awserr.New("ConfigurationError", "client configured for dualstack but not supported for operation", nil) + return + } + + // Accelerate not supported + if aws.BoolValue(req.Config.S3UseAccelerate) { + req.Error = awserr.New("ConfigurationError", "client configured for accelerate but not supported for operation", nil) + return + } + + signingName := s3ObjectsLambdaNamespace + signingRegion := req.ClientInfo.SigningRegion + + if !hasCustomEndpoint(req) { + endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), EndpointsID) + if err != nil { + req.Error = awserr.New(request.ErrCodeSerialization, "failed to resolve endpoint", err) + return + } + signingRegion = endpoint.SigningRegion + + if err = updateRequestEndpoint(req, endpoint.URL); err != nil { + req.Error = err + return + } + updateS3HostPrefixForS3ObjectLambda(req) + } + + redirectSigner(req, signingName, signingRegion) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go index eb77d981e..71e9c9eff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go @@ -66,13 +66,9 @@ func (a accessPointEndpointBuilder) build(req *request.Request) error { if err = updateRequestEndpoint(req, endpoint.URL); err != nil { return err } - const serviceEndpointLabel = "s3-accesspoint" // dual stack provided by endpoint resolver - cfgHost := req.HTTPRequest.URL.Host - if strings.HasPrefix(cfgHost, "s3") { - req.HTTPRequest.URL.Host = serviceEndpointLabel + cfgHost[2:] - } + updateS3HostForS3AccessPoint(req) } protocol.HostPrefixBuilder{ @@ -98,6 +94,73 @@ func (a accessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { } } +// s3ObjectLambdaAccessPointEndpointBuilder represents the endpoint builder for an s3 object lambda access point arn +type s3ObjectLambdaAccessPointEndpointBuilder arn.S3ObjectLambdaAccessPointARN + +// build builds the endpoint for corresponding access point arn +// +// For building an endpoint from access point arn, format used is: +// - Access point endpoint format : {accesspointName}-{accountId}.s3-object-lambda.{region}.{dnsSuffix} +// - example : myaccesspoint-012345678901.s3-object-lambda.us-west-2.amazonaws.com +// +// Access Point Endpoint requests are signed using "s3-object-lambda" as signing name. +// +func (a s3ObjectLambdaAccessPointEndpointBuilder) build(req *request.Request) error { + resolveRegion := arn.S3ObjectLambdaAccessPointARN(a).Region + cfgRegion := aws.StringValue(req.Config.Region) + + if s3shared.IsFIPS(cfgRegion) { + if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) { + // FIPS with cross region is not supported, the SDK must fail + // because there is no well defined method for SDK to construct a + // correct FIPS endpoint. + return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.S3ObjectLambdaAccessPointARN(a), + req.ClientInfo.PartitionID, cfgRegion, nil) + } + resolveRegion = cfgRegion + } + + endpoint, err := resolveRegionalEndpoint(req, resolveRegion, EndpointsID) + if err != nil { + return s3shared.NewFailedToResolveEndpointError(arn.S3ObjectLambdaAccessPointARN(a), + req.ClientInfo.PartitionID, cfgRegion, err) + } + + endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL)) + + endpoint.SigningName = s3ObjectsLambdaNamespace + + if !hasCustomEndpoint(req) { + if err = updateRequestEndpoint(req, endpoint.URL); err != nil { + return err + } + + updateS3HostPrefixForS3ObjectLambda(req) + } + + protocol.HostPrefixBuilder{ + Prefix: accessPointPrefixTemplate, + LabelsFn: a.hostPrefixLabelValues, + }.Build(req) + + // signer redirection + redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion) + + err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host) + if err != nil { + return s3shared.NewInvalidARNError(arn.S3ObjectLambdaAccessPointARN(a), err) + } + + return nil +} + +func (a s3ObjectLambdaAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { + return map[string]string{ + accessPointPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccessPointName, + accountIDPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccountID, + } +} + // outpostAccessPointEndpointBuilder represents the Endpoint builder for outpost access point arn. type outpostAccessPointEndpointBuilder arn.OutpostAccessPointARN @@ -114,7 +177,7 @@ func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error { resolveService := o.Service endpointsID := resolveService - if resolveService == "s3-outposts" { + if resolveService == s3OutpostsNamespace { endpointsID = "s3" } @@ -130,11 +193,7 @@ func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error { if err = updateRequestEndpoint(req, endpoint.URL); err != nil { return err } - // add url host as s3-outposts - cfgHost := req.HTTPRequest.URL.Host - if strings.HasPrefix(cfgHost, endpointsID) { - req.HTTPRequest.URL.Host = resolveService + cfgHost[len(endpointsID):] - } + updateHostPrefix(req, endpointsID, resolveService) } protocol.HostPrefixBuilder{ @@ -170,7 +229,6 @@ func resolveRegionalEndpoint(r *request.Request, region string, endpointsID stri } func updateRequestEndpoint(r *request.Request, endpoint string) (err error) { - r.HTTPRequest.URL, err = url.Parse(endpoint + r.Operation.HTTPPath) if err != nil { return awserr.New(request.ErrCodeSerialization, @@ -185,3 +243,19 @@ func redirectSigner(req *request.Request, signingName string, signingRegion stri req.ClientInfo.SigningName = signingName req.ClientInfo.SigningRegion = signingRegion } + +func updateS3HostForS3AccessPoint(req *request.Request) { + updateHostPrefix(req, "s3", s3AccessPointNamespace) +} + +func updateS3HostPrefixForS3ObjectLambda(req *request.Request) { + updateHostPrefix(req, "s3", s3ObjectsLambdaNamespace) +} + +func updateHostPrefix(req *request.Request, oldEndpointPrefix, newEndpointPrefix string) { + host := req.HTTPRequest.URL.Host + if strings.HasPrefix(host, oldEndpointPrefix) { + // replace service hostlabel oldEndpointPrefix to newEndpointPrefix + req.HTTPRequest.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):] + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go index f64b55135..6d3e726cf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go @@ -48,13 +48,13 @@ const ( // ErrCodeObjectAlreadyInActiveTierError for service response error code // "ObjectAlreadyInActiveTierError". // - // This operation is not allowed against this storage tier. + // This action is not allowed against this storage tier. ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError" // ErrCodeObjectNotInActiveTierError for service response error code // "ObjectNotInActiveTierError". // - // The source object of the COPY operation is not in the active tier and is - // only stored in Amazon S3 Glacier. + // The source object of the COPY action is not in the active tier and is only + // stored in Amazon S3 Glacier. ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go index 7c6221878..1e32fb94d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go @@ -455,6 +455,10 @@ type S3API interface { UploadPartCopyWithContext(aws.Context, *s3.UploadPartCopyInput, ...request.Option) (*s3.UploadPartCopyOutput, error) UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput) + WriteGetObjectResponse(*s3.WriteGetObjectResponseInput) (*s3.WriteGetObjectResponseOutput, error) + WriteGetObjectResponseWithContext(aws.Context, *s3.WriteGetObjectResponseInput, ...request.Option) (*s3.WriteGetObjectResponseOutput, error) + WriteGetObjectResponseRequest(*s3.WriteGetObjectResponseInput) (*request.Request, *s3.WriteGetObjectResponseOutput) + WaitUntilBucketExists(*s3.HeadBucketInput) error WaitUntilBucketExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go new file mode 100644 index 000000000..f0a7f9bfc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go @@ -0,0 +1,23 @@ +package s3manager + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/arn" +) + +func validateSupportedARNType(bucket string) error { + if !arn.IsARN(bucket) { + return nil + } + + parsedARN, err := arn.Parse(bucket) + if err != nil { + return err + } + + if parsedARN.Service == "s3-object-lambda" { + return fmt.Errorf("manager does not support s3-object-lambda service ARNs") + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go index 4b54b7c03..bbf3595a4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go @@ -192,6 +192,10 @@ func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options .. // to perform a single GetObjectInput request for that object's range. This will // caused the part size, and concurrency configurations to be ignored. func (d Downloader) DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) { + if err := validateSupportedARNType(aws.StringValue(input.Bucket)); err != nil { + return 0, err + } + impl := downloader{w: w, in: input, cfg: d, ctx: ctx} for _, option := range options { diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go index 7dba8347b..9fa98fa2f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go @@ -391,6 +391,10 @@ func (u *uploader) upload() (*UploadOutput, error) { // init will initialize all default options. func (u *uploader) init() error { + if err := validateSupportedARNType(aws.StringValue(u.in.Bucket)); err != nil { + return err + } + if u.cfg.Concurrency == 0 { u.cfg.Concurrency = DefaultUploadConcurrency } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go index 6cac26fa8..31c0ee317 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go @@ -23,21 +23,21 @@ type UploadInput struct { // The readable body payload to send to S3. Body io.Reader - // The bucket name to which the PUT operation was initiated. + // The bucket name to which the PUT action was initiated. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation with an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // When using this action with an access point, you must direct requests to + // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this action with an access point through the AWS SDKs, you provide + // the access point ARN in place of the bucket name. For more information about + // access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // - // When using this API with Amazon S3 on Outposts, you must direct requests + // When using this action with Amazon S3 on Outposts, you must direct requests // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - // using this operation using S3 on Outposts through the AWS SDKs, you provide + // using this action using S3 on Outposts through the AWS SDKs, you provide // the Outposts bucket ARN in place of the bucket name. For more information - // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) + // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field @@ -48,8 +48,8 @@ type UploadInput struct { // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with // SSE-KMS. // - // Specifying this header with a PUT operation doesn’t affect bucket-level - // settings for S3 Bucket Key. + // Specifying this header with a PUT action doesn’t affect bucket-level settings + // for S3 Bucket Key. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` // Can be used to specify caching behavior along the request/reply chain. For @@ -82,7 +82,7 @@ type UploadInput struct { // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17). ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - // The account id of the expected bucket owner. If the bucket is owned by a + // The account ID of the expected bucket owner. If the bucket is owned by a // different account, the request will fail with an HTTP 403 (Access Denied) // error. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` @@ -111,7 +111,7 @@ type UploadInput struct { // This action is not supported by Amazon S3 on Outposts. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - // Object key for which the PUT operation was initiated. + // Object key for which the PUT action was initiated. // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index b89f513d5..2f19442a2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -309,7 +309,7 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // We can't find the resource that you asked for. // // * MalformedPolicyDocumentException -// The policy document that you provided isn't valid. +// You provided a resource-based policy with syntax errors. // // * InternalServiceError // An error occurred on the server side. @@ -395,7 +395,7 @@ func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicy // // * To attach a resource policy to a secret, use PutResourcePolicy. // -// * To retrieve the current resource-based policy that's attached to a secret, +// * To retrieve the current resource-based policy attached to a secret, // use GetResourcePolicy. // // * To list all of the currently available secrets, use ListSecrets. @@ -427,6 +427,9 @@ func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicy // Lambda function ARN configured and you didn't include such an ARN as a // parameter in this call. // +// * InvalidParameterException +// You provided an invalid value for a parameter. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy func (c *SecretsManager) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { req, out := c.DeleteResourcePolicyRequest(input) @@ -493,7 +496,7 @@ func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *req // DeleteSecret API operation for AWS Secrets Manager. // -// Deletes an entire secret and all of its versions. You can optionally include +// Deletes an entire secret and all of the versions. You can optionally include // a recovery window during which you can restore the secret. If you don't specify // a recovery window value, the operation defaults to 30 days. Secrets Manager // attaches a DeletionDate stamp to the secret that specifies the end of the @@ -503,15 +506,15 @@ func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *req // At any time before recovery window ends, you can use RestoreSecret to remove // the DeletionDate and cancel the deletion of the secret. // -// You cannot access the encrypted secret information in any secret that is -// scheduled for deletion. If you need to access that information, you must -// cancel the deletion with RestoreSecret and then retrieve the information. +// You cannot access the encrypted secret information in any secret scheduled +// for deletion. If you need to access that information, you must cancel the +// deletion with RestoreSecret and then retrieve the information. // // * There is no explicit operation to delete a version of a secret. Instead, // remove all staging labels from the VersionStage field of a version. That // marks the version as deprecated and allows Secrets Manager to delete it -// as needed. Versions that do not have any staging labels do not show up -// in ListSecretVersionIds unless you specify IncludeDeprecated. +// as needed. Versions without any staging labels do not show up in ListSecretVersionIds +// unless you specify IncludeDeprecated. // // * The permanent secret deletion at the end of the waiting period is performed // as a background task with low priority. There is no guarantee of a specific @@ -1408,8 +1411,7 @@ func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) // // * To retrieve the resource policy attached to a secret, use GetResourcePolicy. // -// * To delete the resource-based policy that's attached to a secret, use -// DeleteResourcePolicy. +// * To delete the resource-based policy attached to a secret, use DeleteResourcePolicy. // // * To list all of the currently available secrets, use ListSecrets. // @@ -1422,7 +1424,7 @@ func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) // // Returned Error Types: // * MalformedPolicyDocumentException -// The policy document that you provided isn't valid. +// You provided a resource-based policy with syntax errors. // // * ResourceNotFoundException // We can't find the resource that you asked for. @@ -1447,7 +1449,8 @@ func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) // parameter in this call. // // * PublicPolicyException -// The resource policy did not prevent broad access to the secret. +// The BlockPublicPolicy parameter is set to true and the resource policy did +// not prevent broad access to the secret. // // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy func (c *SecretsManager) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { @@ -1528,14 +1531,12 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // Manager automatically attaches the staging label AWSCURRENT to the new // version. // -// * If another version of this secret already exists, then this operation -// does not automatically move any staging labels other than those that you -// explicitly specify in the VersionStages parameter. +// * If you do not specify a value for VersionStages then Secrets Manager +// automatically moves the staging label AWSCURRENT to this new version. // // * If this operation moves the staging label AWSCURRENT from another version -// to this version (because you included it in the StagingLabels parameter) -// then Secrets Manager also automatically moves the staging label AWSPREVIOUS -// to the version that AWSCURRENT was removed from. +// to this version, then Secrets Manager also automatically moves the staging +// label AWSPREVIOUS to the version that AWSCURRENT was removed from. // // * This operation is idempotent. If a version with a VersionId with the // same value as the ClientRequestToken parameter already exists and you @@ -1650,6 +1651,203 @@ func (c *SecretsManager) PutSecretValueWithContext(ctx aws.Context, input *PutSe return out, req.Send() } +const opRemoveRegionsFromReplication = "RemoveRegionsFromReplication" + +// RemoveRegionsFromReplicationRequest generates a "aws/request.Request" representing the +// client's request for the RemoveRegionsFromReplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveRegionsFromReplication for more information on using the RemoveRegionsFromReplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveRegionsFromReplicationRequest method. +// req, resp := client.RemoveRegionsFromReplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplication +func (c *SecretsManager) RemoveRegionsFromReplicationRequest(input *RemoveRegionsFromReplicationInput) (req *request.Request, output *RemoveRegionsFromReplicationOutput) { + op := &request.Operation{ + Name: opRemoveRegionsFromReplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveRegionsFromReplicationInput{} + } + + output = &RemoveRegionsFromReplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveRegionsFromReplication API operation for AWS Secrets Manager. +// +// Remove regions from replication. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation RemoveRegionsFromReplication for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// We can't find the resource that you asked for. +// +// * InvalidRequestException +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * InvalidParameterException +// You provided an invalid value for a parameter. +// +// * InternalServiceError +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplication +func (c *SecretsManager) RemoveRegionsFromReplication(input *RemoveRegionsFromReplicationInput) (*RemoveRegionsFromReplicationOutput, error) { + req, out := c.RemoveRegionsFromReplicationRequest(input) + return out, req.Send() +} + +// RemoveRegionsFromReplicationWithContext is the same as RemoveRegionsFromReplication with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveRegionsFromReplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) RemoveRegionsFromReplicationWithContext(ctx aws.Context, input *RemoveRegionsFromReplicationInput, opts ...request.Option) (*RemoveRegionsFromReplicationOutput, error) { + req, out := c.RemoveRegionsFromReplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReplicateSecretToRegions = "ReplicateSecretToRegions" + +// ReplicateSecretToRegionsRequest generates a "aws/request.Request" representing the +// client's request for the ReplicateSecretToRegions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ReplicateSecretToRegions for more information on using the ReplicateSecretToRegions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ReplicateSecretToRegionsRequest method. +// req, resp := client.ReplicateSecretToRegionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegions +func (c *SecretsManager) ReplicateSecretToRegionsRequest(input *ReplicateSecretToRegionsInput) (req *request.Request, output *ReplicateSecretToRegionsOutput) { + op := &request.Operation{ + Name: opReplicateSecretToRegions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReplicateSecretToRegionsInput{} + } + + output = &ReplicateSecretToRegionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReplicateSecretToRegions API operation for AWS Secrets Manager. +// +// Converts an existing secret to a multi-Region secret and begins replication +// the secret to a list of new regions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation ReplicateSecretToRegions for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// We can't find the resource that you asked for. +// +// * InvalidRequestException +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * InvalidParameterException +// You provided an invalid value for a parameter. +// +// * InternalServiceError +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegions +func (c *SecretsManager) ReplicateSecretToRegions(input *ReplicateSecretToRegionsInput) (*ReplicateSecretToRegionsOutput, error) { + req, out := c.ReplicateSecretToRegionsRequest(input) + return out, req.Send() +} + +// ReplicateSecretToRegionsWithContext is the same as ReplicateSecretToRegions with the addition of +// the ability to pass a context and additional request options. +// +// See ReplicateSecretToRegions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) ReplicateSecretToRegionsWithContext(ctx aws.Context, input *ReplicateSecretToRegionsInput, opts ...request.Option) (*ReplicateSecretToRegionsOutput, error) { + req, out := c.ReplicateSecretToRegionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRestoreSecret = "RestoreSecret" // RestoreSecretRequest generates a "aws/request.Request" representing the @@ -1911,6 +2109,105 @@ func (c *SecretsManager) RotateSecretWithContext(ctx aws.Context, input *RotateS return out, req.Send() } +const opStopReplicationToReplica = "StopReplicationToReplica" + +// StopReplicationToReplicaRequest generates a "aws/request.Request" representing the +// client's request for the StopReplicationToReplica operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopReplicationToReplica for more information on using the StopReplicationToReplica +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopReplicationToReplicaRequest method. +// req, resp := client.StopReplicationToReplicaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplica +func (c *SecretsManager) StopReplicationToReplicaRequest(input *StopReplicationToReplicaInput) (req *request.Request, output *StopReplicationToReplicaOutput) { + op := &request.Operation{ + Name: opStopReplicationToReplica, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopReplicationToReplicaInput{} + } + + output = &StopReplicationToReplicaOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopReplicationToReplica API operation for AWS Secrets Manager. +// +// Removes the secret from replication and promotes the secret to a regional +// secret in the replica Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation StopReplicationToReplica for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// We can't find the resource that you asked for. +// +// * InvalidRequestException +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * InvalidParameterException +// You provided an invalid value for a parameter. +// +// * InternalServiceError +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplica +func (c *SecretsManager) StopReplicationToReplica(input *StopReplicationToReplicaInput) (*StopReplicationToReplicaOutput, error) { + req, out := c.StopReplicationToReplicaRequest(input) + return out, req.Send() +} + +// StopReplicationToReplicaWithContext is the same as StopReplicationToReplica with the addition of +// the ability to pass a context and additional request options. +// +// See StopReplicationToReplica for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) StopReplicationToReplicaWithContext(ctx aws.Context, input *StopReplicationToReplicaInput, opts ...request.Option) (*StopReplicationToReplicaOutput, error) { + req, out := c.StopReplicationToReplicaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the @@ -2321,7 +2618,7 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // We can't find the resource that you asked for. // // * MalformedPolicyDocumentException -// The policy document that you provided isn't valid. +// You provided a resource-based policy with syntax errors. // // * InternalServiceError // An error occurred on the server side. @@ -2529,10 +2826,29 @@ func (c *SecretsManager) ValidateResourcePolicyRequest(input *ValidateResourcePo // ValidateResourcePolicy API operation for AWS Secrets Manager. // -// Validates the JSON text of the resource-based policy document attached to -// the specified secret. The JSON request string input and response output displays -// formatted code with white space and line breaks for better readability. Submit -// your input as a single line JSON string. A resource-based policy is optional. +// Validates that the resource policy does not grant a wide range of IAM principals +// access to your secret. The JSON request string input and response output +// displays formatted code with white space and line breaks for better readability. +// Submit your input as a single line JSON string. A resource-based policy is +// optional for secrets. +// +// The API performs three checks when validating the secret: +// +// * Sends a call to Zelkova (https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/), +// an automated reasoning engine, to ensure your Resource Policy does not +// allow broad access to your secret. +// +// * Checks for correct syntax in a policy. +// +// * Verifies the policy does not lock out a caller. +// +// Minimum Permissions +// +// You must have the permissions required to access the following APIs: +// +// * secretsmanager:PutResourcePolicy +// +// * secretsmanager:ValidateResourcePolicy // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2543,7 +2859,7 @@ func (c *SecretsManager) ValidateResourcePolicyRequest(input *ValidateResourcePo // // Returned Error Types: // * MalformedPolicyDocumentException -// The policy document that you provided isn't valid. +// You provided a resource-based policy with syntax errors. // // * ResourceNotFoundException // We can't find the resource that you asked for. @@ -2696,6 +3012,10 @@ func (s *CancelRotateSecretOutput) SetVersionId(v string) *CancelRotateSecretOut type CreateSecretInput struct { _ struct{} `type:"structure"` + // (Optional) Add a list of regions to replicate secrets. Secrets Manager replicates + // the KMSKeyID objects to the list of regions specified in the parameter. + AddReplicaRegions []*ReplicaRegionType `min:"1" type:"list"` + // (Optional) If you include SecretString or SecretBinary, then an initial version // is created as part of the secret, and this parameter specifies a unique identifier // for the new version. @@ -2720,8 +3040,8 @@ type CreateSecretInput struct { // request is ignored. // // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from those in the request then the - // request fails because you cannot modify an existing version. Instead, + // and SecretBinary values are different from those in the request, then + // the request fails because you cannot modify an existing version. Instead, // use PutSecretValue to create a new version. // // This value becomes the VersionId of the new version. @@ -2730,6 +3050,10 @@ type CreateSecretInput struct { // (Optional) Specifies a user-provided description of the secret. Description *string `type:"string"` + // (Optional) If set, the replication overwrites a secret with the same name + // in the destination region. + ForceOverwriteReplicaSecret *bool `type:"boolean"` + // (Optional) Specifies the ARN, Key ID, or alias of the AWS KMS customer master // key (CMK) to be used to encrypt the SecretString or SecretBinary values in // the versions stored in this secret. @@ -2860,6 +3184,9 @@ func (s CreateSecretInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateSecretInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateSecretInput"} + if s.AddReplicaRegions != nil && len(s.AddReplicaRegions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AddReplicaRegions", 1)) + } if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) } @@ -2869,6 +3196,16 @@ func (s *CreateSecretInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.AddReplicaRegions != nil { + for i, v := range s.AddReplicaRegions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddReplicaRegions", i), err.(request.ErrInvalidParams)) + } + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -2886,6 +3223,12 @@ func (s *CreateSecretInput) Validate() error { return nil } +// SetAddReplicaRegions sets the AddReplicaRegions field's value. +func (s *CreateSecretInput) SetAddReplicaRegions(v []*ReplicaRegionType) *CreateSecretInput { + s.AddReplicaRegions = v + return s +} + // SetClientRequestToken sets the ClientRequestToken field's value. func (s *CreateSecretInput) SetClientRequestToken(v string) *CreateSecretInput { s.ClientRequestToken = &v @@ -2898,6 +3241,12 @@ func (s *CreateSecretInput) SetDescription(v string) *CreateSecretInput { return s } +// SetForceOverwriteReplicaSecret sets the ForceOverwriteReplicaSecret field's value. +func (s *CreateSecretInput) SetForceOverwriteReplicaSecret(v bool) *CreateSecretInput { + s.ForceOverwriteReplicaSecret = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *CreateSecretInput) SetKmsKeyId(v string) *CreateSecretInput { s.KmsKeyId = &v @@ -2944,6 +3293,9 @@ type CreateSecretOutput struct { // The friendly name of the secret that you just created. Name *string `min:"1" type:"string"` + // Describes a list of replication status objects as InProgress, Failed or InSync. + ReplicationStatus []*ReplicationStatusType `type:"list"` + // The unique identifier associated with the version of the secret you just // created. VersionId *string `min:"32" type:"string"` @@ -2971,6 +3323,12 @@ func (s *CreateSecretOutput) SetName(v string) *CreateSecretOutput { return s } +// SetReplicationStatus sets the ReplicationStatus field's value. +func (s *CreateSecretOutput) SetReplicationStatus(v []*ReplicationStatusType) *CreateSecretOutput { + s.ReplicationStatus = v + return s +} + // SetVersionId sets the VersionId field's value. func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { s.VersionId = &v @@ -3143,18 +3501,22 @@ type DeleteSecretInput struct { // the normal waiting period before the permanent deletion that AWS would normally // impose with the RecoveryWindowInDays parameter. If you delete a secret with // the ForceDeleteWithouRecovery parameter, then you have no opportunity to - // recover the secret. It is permanently lost. + // recover the secret. You lose the secret permanently. + // + // If you use this parameter and include a previously deleted or nonexistent + // secret, the operation does not return the error ResourceNotFoundException + // in order to correctly handle retries. ForceDeleteWithoutRecovery *bool `type:"boolean"` // (Optional) Specifies the number of days that Secrets Manager waits before - // it can delete the secret. You can't use both this parameter and the ForceDeleteWithoutRecovery - // parameter in the same API call. + // Secrets Manager can delete the secret. You can't use both this parameter + // and the ForceDeleteWithoutRecovery parameter in the same API call. // - // This value can range from 7 to 30 days. The default value is 30. + // This value can range from 7 to 30 days with a default value of 30. RecoveryWindowInDays *int64 `type:"long"` - // Specifies the secret that you want to delete. You can specify either the - // Amazon Resource Name (ARN) or the friendly name of the secret. + // Specifies the secret to delete. You can specify either the Amazon Resource + // Name (ARN) or the friendly name of the secret. // // If you specify an ARN, we generally recommend that you specify a complete // ARN. You can specify a partial ARN too—for example, if you don’t include @@ -3232,7 +3594,7 @@ type DeleteSecretOutput struct { // request plus the number of days specified in RecoveryWindowInDays. DeletionDate *time.Time `type:"timestamp"` - // The friendly name of the secret that is now scheduled for deletion. + // The friendly name of the secret currently scheduled for deletion. Name *string `min:"1" type:"string"` } @@ -3330,7 +3692,7 @@ type DescribeSecretOutput struct { // The ARN of the secret. ARN *string `min:"20" type:"string"` - // The date that the secret was created. + // The date you created the secret. CreatedDate *time.Time `type:"timestamp"` // This value exists if the secret is scheduled for deletion. Some time after @@ -3359,8 +3721,10 @@ type DescribeSecretOutput struct { // The last date and time that this secret was modified in any way. LastChangedDate *time.Time `type:"timestamp"` - // The most recent date and time that the Secrets Manager rotation process was - // successfully completed. This value is null if the secret has never rotated. + // The last date and time that the rotation process for this secret was invoked. + // + // The most recent date and time that the Secrets Manager rotation process successfully + // completed. If the secret doesn't rotate, Secrets Manager returns a null value. LastRotatedDate *time.Time `type:"timestamp"` // The user-provided friendly name of the secret. @@ -3369,6 +3733,12 @@ type DescribeSecretOutput struct { // Returns the name of the service that created this secret. OwningService *string `min:"1" type:"string"` + // Specifies the primary region for secret replication. + PrimaryRegion *string `min:"1" type:"string"` + + // Describes a list of replication status objects as InProgress, Failed or InSync.P + ReplicationStatus []*ReplicationStatusType `type:"list"` + // Specifies whether automatic rotation is enabled for this secret. // // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set @@ -3380,7 +3750,7 @@ type DescribeSecretOutput struct { // RotateSecret. RotationLambdaARN *string `type:"string"` - // A structure that contains the rotation configuration for this secret. + // A structure with the rotation configuration for this secret. RotationRules *RotationRulesType `type:"structure"` // The list of user-defined tags that are associated with the secret. To add @@ -3466,6 +3836,18 @@ func (s *DescribeSecretOutput) SetOwningService(v string) *DescribeSecretOutput return s } +// SetPrimaryRegion sets the PrimaryRegion field's value. +func (s *DescribeSecretOutput) SetPrimaryRegion(v string) *DescribeSecretOutput { + s.PrimaryRegion = &v + return s +} + +// SetReplicationStatus sets the ReplicationStatus field's value. +func (s *DescribeSecretOutput) SetReplicationStatus(v []*ReplicationStatusType) *DescribeSecretOutput { + s.ReplicationStatus = v + return s +} + // SetRotationEnabled sets the RotationEnabled field's value. func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { s.RotationEnabled = &v @@ -3555,7 +3937,7 @@ func (s *EncryptionFailure) RequestID() string { return s.RespMetadata.RequestID } -// Allows you to filter your list of secrets. +// Allows you to add filters when you use the search function in Secrets Manager. type Filter struct { _ struct{} `type:"structure"` @@ -3563,6 +3945,9 @@ type Filter struct { Key *string `type:"string" enum:"FilterNameStringType"` // Filters your list of secrets by a specific value. + // + // You can prefix your search value with an exclamation mark (!) in order to + // perform negation filters. Values []*string `min:"1" type:"list"` } @@ -3879,10 +4264,10 @@ type GetSecretValueInput struct { SecretId *string `min:"1" type:"string" required:"true"` // Specifies the unique identifier of the version of the secret that you want - // to retrieve. If you specify this parameter then don't specify VersionStage. - // If you don't specify either a VersionStage or VersionId then the default - // is to perform the operation on the version with the VersionStage value of - // AWSCURRENT. + // to retrieve. If you specify both this parameter and VersionStage, the two + // parameters must refer to the same secret version. If you don't specify either + // a VersionStage or VersionId then the default is to perform the operation + // on the version with the VersionStage value of AWSCURRENT. // // This value is typically a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) // value with 32 hexadecimal digits. @@ -3892,9 +4277,10 @@ type GetSecretValueInput struct { // attached to the version. // // Staging labels are used to keep track of different versions during the rotation - // process. If you use this parameter then don't specify VersionId. If you don't - // specify either a VersionStage or VersionId, then the default is to perform - // the operation on the version with the VersionStage value of AWSCURRENT. + // process. If you specify both this parameter and VersionId, the two parameters + // must refer to the same secret version . If you don't specify either a VersionStage + // or VersionId, then the default is to perform the operation on the version + // with the VersionStage value of AWSCURRENT. VersionStage *string `min:"1" type:"string"` } @@ -4634,7 +5020,7 @@ func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutp return s } -// The policy document that you provided isn't valid. +// You provided a resource-based policy with syntax errors. type MalformedPolicyDocumentException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` @@ -4746,7 +5132,8 @@ func (s *PreconditionNotMetException) RequestID() string { return s.RespMetadata.RequestID } -// The resource policy did not prevent broad access to the secret. +// The BlockPublicPolicy parameter is set to true and the resource policy did +// not prevent broad access to the secret. type PublicPolicyException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` @@ -4805,22 +5192,22 @@ func (s *PublicPolicyException) RequestID() string { type PutResourcePolicyInput struct { _ struct{} `type:"structure"` - // Makes an optional API call to Zelkova to validate the Resource Policy to - // prevent broad access to your secret. + // (Optional) If you set the parameter, BlockPublicPolicy to true, then you + // block resource-based policies that allow broad access to the secret. BlockPublicPolicy *bool `type:"boolean"` - // A JSON-formatted string that's constructed according to the grammar and syntax - // for an AWS resource-based policy. The policy in the string identifies who - // can access or manage this secret and its versions. For information on how - // to format a JSON parameter for the various command line tool environments, - // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // A JSON-formatted string constructed according to the grammar and syntax for + // an AWS resource-based policy. The policy in the string identifies who can + // access or manage this secret and its versions. For information on how to + // format a JSON parameter for the various command line tool environments, see + // Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) // in the AWS CLI User Guide. // // ResourcePolicy is a required field ResourcePolicy *string `min:"1" type:"string" required:"true"` - // Specifies the secret that you want to attach the resource-based policy to. - // You can specify either the ARN or the friendly name of the secret. + // Specifies the secret that you want to attach the resource-based policy. You + // can specify either the ARN or the friendly name of the secret. // // If you specify an ARN, we generally recommend that you specify a complete // ARN. You can specify a partial ARN too—for example, if you don’t include @@ -4899,8 +5286,7 @@ type PutResourcePolicyOutput struct { // The ARN of the secret retrieved by the resource-based policy. ARN *string `min:"20" type:"string"` - // The friendly name of the secret that the retrieved by the resource-based - // policy. + // The friendly name of the secret retrieved by the resource-based policy. Name *string `min:"1" type:"string"` } @@ -5149,6 +5535,316 @@ func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutp return s } +type RemoveRegionsFromReplicationInput struct { + _ struct{} `type:"structure"` + + // Remove replication from specific Regions. + // + // RemoveReplicaRegions is a required field + RemoveReplicaRegions []*string `min:"1" type:"list" required:"true"` + + // Remove a secret by SecretId from replica Regions. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveRegionsFromReplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRegionsFromReplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveRegionsFromReplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveRegionsFromReplicationInput"} + if s.RemoveReplicaRegions == nil { + invalidParams.Add(request.NewErrParamRequired("RemoveReplicaRegions")) + } + if s.RemoveReplicaRegions != nil && len(s.RemoveReplicaRegions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RemoveReplicaRegions", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRemoveReplicaRegions sets the RemoveReplicaRegions field's value. +func (s *RemoveRegionsFromReplicationInput) SetRemoveReplicaRegions(v []*string) *RemoveRegionsFromReplicationInput { + s.RemoveReplicaRegions = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *RemoveRegionsFromReplicationInput) SetSecretId(v string) *RemoveRegionsFromReplicationInput { + s.SecretId = &v + return s +} + +type RemoveRegionsFromReplicationOutput struct { + _ struct{} `type:"structure"` + + // The secret ARN removed from replication regions. + ARN *string `min:"20" type:"string"` + + // Describes the remaining replication status after you remove regions from + // the replication list. + ReplicationStatus []*ReplicationStatusType `type:"list"` +} + +// String returns the string representation +func (s RemoveRegionsFromReplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRegionsFromReplicationOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *RemoveRegionsFromReplicationOutput) SetARN(v string) *RemoveRegionsFromReplicationOutput { + s.ARN = &v + return s +} + +// SetReplicationStatus sets the ReplicationStatus field's value. +func (s *RemoveRegionsFromReplicationOutput) SetReplicationStatus(v []*ReplicationStatusType) *RemoveRegionsFromReplicationOutput { + s.ReplicationStatus = v + return s +} + +// (Optional) Custom type consisting of a Region (required) and the KmsKeyId +// which can be an ARN, Key ID, or Alias. +type ReplicaRegionType struct { + _ struct{} `type:"structure"` + + // Can be an ARN, Key ID, or Alias. + KmsKeyId *string `type:"string"` + + // Describes a single instance of Region objects. + Region *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ReplicaRegionType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaRegionType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicaRegionType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicaRegionType"} + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ReplicaRegionType) SetKmsKeyId(v string) *ReplicaRegionType { + s.KmsKeyId = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *ReplicaRegionType) SetRegion(v string) *ReplicaRegionType { + s.Region = &v + return s +} + +type ReplicateSecretToRegionsInput struct { + _ struct{} `type:"structure"` + + // Add Regions to replicate the secret. + // + // AddReplicaRegions is a required field + AddReplicaRegions []*ReplicaRegionType `min:"1" type:"list" required:"true"` + + // (Optional) If set, Secrets Manager replication overwrites a secret with the + // same name in the destination region. + ForceOverwriteReplicaSecret *bool `type:"boolean"` + + // Use the Secret Id to replicate a secret to regions. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ReplicateSecretToRegionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicateSecretToRegionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicateSecretToRegionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicateSecretToRegionsInput"} + if s.AddReplicaRegions == nil { + invalidParams.Add(request.NewErrParamRequired("AddReplicaRegions")) + } + if s.AddReplicaRegions != nil && len(s.AddReplicaRegions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AddReplicaRegions", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.AddReplicaRegions != nil { + for i, v := range s.AddReplicaRegions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddReplicaRegions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddReplicaRegions sets the AddReplicaRegions field's value. +func (s *ReplicateSecretToRegionsInput) SetAddReplicaRegions(v []*ReplicaRegionType) *ReplicateSecretToRegionsInput { + s.AddReplicaRegions = v + return s +} + +// SetForceOverwriteReplicaSecret sets the ForceOverwriteReplicaSecret field's value. +func (s *ReplicateSecretToRegionsInput) SetForceOverwriteReplicaSecret(v bool) *ReplicateSecretToRegionsInput { + s.ForceOverwriteReplicaSecret = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *ReplicateSecretToRegionsInput) SetSecretId(v string) *ReplicateSecretToRegionsInput { + s.SecretId = &v + return s +} + +type ReplicateSecretToRegionsOutput struct { + _ struct{} `type:"structure"` + + // Replicate a secret based on the ReplicaRegionType> consisting of a Region(required) + // and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. + ARN *string `min:"20" type:"string"` + + // Describes the secret replication status as PENDING, SUCCESS or FAIL. + ReplicationStatus []*ReplicationStatusType `type:"list"` +} + +// String returns the string representation +func (s ReplicateSecretToRegionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicateSecretToRegionsOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *ReplicateSecretToRegionsOutput) SetARN(v string) *ReplicateSecretToRegionsOutput { + s.ARN = &v + return s +} + +// SetReplicationStatus sets the ReplicationStatus field's value. +func (s *ReplicateSecretToRegionsOutput) SetReplicationStatus(v []*ReplicationStatusType) *ReplicateSecretToRegionsOutput { + s.ReplicationStatus = v + return s +} + +// A replication object consisting of a RegionReplicationStatus object and includes +// a Region, KMSKeyId, status, and status message. +type ReplicationStatusType struct { + _ struct{} `type:"structure"` + + // Can be an ARN, Key ID, or Alias. + KmsKeyId *string `type:"string"` + + // The date that you last accessed the secret in the Region. + LastAccessedDate *time.Time `type:"timestamp"` + + // The Region where replication occurs. + Region *string `min:"1" type:"string"` + + // The status can be InProgress, Failed, or InSync. + Status *string `type:"string" enum:"StatusType"` + + // Status message such as "Secret with this name already exists in this region". + StatusMessage *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ReplicationStatusType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicationStatusType) GoString() string { + return s.String() +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ReplicationStatusType) SetKmsKeyId(v string) *ReplicationStatusType { + s.KmsKeyId = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *ReplicationStatusType) SetLastAccessedDate(v time.Time) *ReplicationStatusType { + s.LastAccessedDate = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *ReplicationStatusType) SetRegion(v string) *ReplicationStatusType { + s.Region = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ReplicationStatusType) SetStatus(v string) *ReplicationStatusType { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ReplicationStatusType) SetStatusMessage(v string) *ReplicationStatusType { + s.StatusMessage = &v + return s +} + // A resource with the ID you requested already exists. type ResourceExistsException struct { _ struct{} `type:"structure"` @@ -5590,7 +6286,8 @@ type SecretListEntry struct { // The last date and time that this secret was modified in any way. LastChangedDate *time.Time `type:"timestamp"` - // The last date and time that the rotation process for this secret was invoked. + // The most recent date and time that the Secrets Manager rotation process was + // successfully completed. This value is null if the secret hasn't ever rotated. LastRotatedDate *time.Time `type:"timestamp"` // The friendly name of the secret. You can use forward slashes in the name @@ -5602,6 +6299,9 @@ type SecretListEntry struct { // Returns the name of the service that created the secret. OwningService *string `min:"1" type:"string"` + // The Region where Secrets Manager originated the secret. + PrimaryRegion *string `min:"1" type:"string"` + // Indicates whether automatic, scheduled rotation is enabled for this secret. RotationEnabled *bool `type:"boolean"` @@ -5696,6 +6396,12 @@ func (s *SecretListEntry) SetOwningService(v string) *SecretListEntry { return s } +// SetPrimaryRegion sets the PrimaryRegion field's value. +func (s *SecretListEntry) SetPrimaryRegion(v string) *SecretListEntry { + s.PrimaryRegion = &v + return s +} + // SetRotationEnabled sets the RotationEnabled field's value. func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { s.RotationEnabled = &v @@ -5779,6 +6485,70 @@ func (s *SecretVersionsListEntry) SetVersionStages(v []*string) *SecretVersionsL return s } +type StopReplicationToReplicaInput struct { + _ struct{} `type:"structure"` + + // Response to StopReplicationToReplica of a secret, based on the SecretId. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopReplicationToReplicaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopReplicationToReplicaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopReplicationToReplicaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopReplicationToReplicaInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *StopReplicationToReplicaInput) SetSecretId(v string) *StopReplicationToReplicaInput { + s.SecretId = &v + return s +} + +type StopReplicationToReplicaOutput struct { + _ struct{} `type:"structure"` + + // Response StopReplicationToReplica of a secret, based on the ARN,. + ARN *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s StopReplicationToReplicaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopReplicationToReplicaOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *StopReplicationToReplicaOutput) SetARN(v string) *StopReplicationToReplicaOutput { + s.ARN = &v + return s +} + // A structure that contains information about a tag. type Tag struct { _ struct{} `type:"structure"` @@ -5858,7 +6628,7 @@ type TagResourceInput struct { // on how to format a JSON parameter for the various command line tool environments, // see Using JSON for Parameters (https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) // in the AWS CLI User Guide. For the AWS CLI, you can also use the syntax: - // --Tags Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…] + // --Tags Key="Key1",Value="Value1" Key="Key2",Value="Value2"[,…] // // Tags is a required field Tags []*Tag `type:"list" required:"true"` @@ -6397,14 +7167,19 @@ func (s *UpdateSecretVersionStageOutput) SetName(v string) *UpdateSecretVersionS type ValidateResourcePolicyInput struct { _ struct{} `type:"structure"` - // Identifies the Resource Policy attached to the secret. + // A JSON-formatted string constructed according to the grammar and syntax for + // an AWS resource-based policy. The policy in the string identifies who can + // access or manage this secret and its versions. For information on how to + // format a JSON parameter for the various command line tool environments, see + // Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide.publi // // ResourcePolicy is a required field ResourcePolicy *string `min:"1" type:"string" required:"true"` - // The identifier for the secret that you want to validate a resource policy. - // You can specify either the Amazon Resource Name (ARN) or the friendly name - // of the secret. + // (Optional) The identifier of the secret with the resource-based policy you + // want to validate. You can specify either the Amazon Resource Name (ARN) or + // the friendly name of the secret. // // If you specify an ARN, we generally recommend that you specify a complete // ARN. You can specify a partial ARN too—for example, if you don’t include @@ -6545,6 +7320,9 @@ const ( // FilterNameStringTypeTagValue is a FilterNameStringType enum value FilterNameStringTypeTagValue = "tag-value" + // FilterNameStringTypePrimaryRegion is a FilterNameStringType enum value + FilterNameStringTypePrimaryRegion = "primary-region" + // FilterNameStringTypeAll is a FilterNameStringType enum value FilterNameStringTypeAll = "all" ) @@ -6556,6 +7334,7 @@ func FilterNameStringType_Values() []string { FilterNameStringTypeName, FilterNameStringTypeTagKey, FilterNameStringTypeTagValue, + FilterNameStringTypePrimaryRegion, FilterNameStringTypeAll, } } @@ -6575,3 +7354,23 @@ func SortOrderType_Values() []string { SortOrderTypeDesc, } } + +const ( + // StatusTypeInSync is a StatusType enum value + StatusTypeInSync = "InSync" + + // StatusTypeFailed is a StatusType enum value + StatusTypeFailed = "Failed" + + // StatusTypeInProgress is a StatusType enum value + StatusTypeInProgress = "InProgress" +) + +// StatusType_Values returns all elements of the StatusType enum +func StatusType_Values() []string { + return []string{ + StatusTypeInSync, + StatusTypeFailed, + StatusTypeInProgress, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go index ab90196bb..7c7b1fc87 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go @@ -68,7 +68,7 @@ const ( // ErrCodeMalformedPolicyDocumentException for service response error code // "MalformedPolicyDocumentException". // - // The policy document that you provided isn't valid. + // You provided a resource-based policy with syntax errors. ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" // ErrCodePreconditionNotMetException for service response error code @@ -80,7 +80,8 @@ const ( // ErrCodePublicPolicyException for service response error code // "PublicPolicyException". // - // The resource policy did not prevent broad access to the secret. + // The BlockPublicPolicy parameter is set to true and the resource policy did + // not prevent broad access to the secret. ErrCodePublicPolicyException = "PublicPolicyException" // ErrCodeResourceExistsException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface/interface.go index fe386bd58..9b54dd636 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface/interface.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface/interface.go @@ -114,6 +114,14 @@ type SecretsManagerAPI interface { PutSecretValueWithContext(aws.Context, *secretsmanager.PutSecretValueInput, ...request.Option) (*secretsmanager.PutSecretValueOutput, error) PutSecretValueRequest(*secretsmanager.PutSecretValueInput) (*request.Request, *secretsmanager.PutSecretValueOutput) + RemoveRegionsFromReplication(*secretsmanager.RemoveRegionsFromReplicationInput) (*secretsmanager.RemoveRegionsFromReplicationOutput, error) + RemoveRegionsFromReplicationWithContext(aws.Context, *secretsmanager.RemoveRegionsFromReplicationInput, ...request.Option) (*secretsmanager.RemoveRegionsFromReplicationOutput, error) + RemoveRegionsFromReplicationRequest(*secretsmanager.RemoveRegionsFromReplicationInput) (*request.Request, *secretsmanager.RemoveRegionsFromReplicationOutput) + + ReplicateSecretToRegions(*secretsmanager.ReplicateSecretToRegionsInput) (*secretsmanager.ReplicateSecretToRegionsOutput, error) + ReplicateSecretToRegionsWithContext(aws.Context, *secretsmanager.ReplicateSecretToRegionsInput, ...request.Option) (*secretsmanager.ReplicateSecretToRegionsOutput, error) + ReplicateSecretToRegionsRequest(*secretsmanager.ReplicateSecretToRegionsInput) (*request.Request, *secretsmanager.ReplicateSecretToRegionsOutput) + RestoreSecret(*secretsmanager.RestoreSecretInput) (*secretsmanager.RestoreSecretOutput, error) RestoreSecretWithContext(aws.Context, *secretsmanager.RestoreSecretInput, ...request.Option) (*secretsmanager.RestoreSecretOutput, error) RestoreSecretRequest(*secretsmanager.RestoreSecretInput) (*request.Request, *secretsmanager.RestoreSecretOutput) @@ -122,6 +130,10 @@ type SecretsManagerAPI interface { RotateSecretWithContext(aws.Context, *secretsmanager.RotateSecretInput, ...request.Option) (*secretsmanager.RotateSecretOutput, error) RotateSecretRequest(*secretsmanager.RotateSecretInput) (*request.Request, *secretsmanager.RotateSecretOutput) + StopReplicationToReplica(*secretsmanager.StopReplicationToReplicaInput) (*secretsmanager.StopReplicationToReplicaOutput, error) + StopReplicationToReplicaWithContext(aws.Context, *secretsmanager.StopReplicationToReplicaInput, ...request.Option) (*secretsmanager.StopReplicationToReplicaOutput, error) + StopReplicationToReplicaRequest(*secretsmanager.StopReplicationToReplicaInput) (*request.Request, *secretsmanager.StopReplicationToReplicaOutput) + TagResource(*secretsmanager.TagResourceInput) (*secretsmanager.TagResourceOutput, error) TagResourceWithContext(aws.Context, *secretsmanager.TagResourceInput, ...request.Option) (*secretsmanager.TagResourceOutput, error) TagResourceRequest(*secretsmanager.TagResourceInput) (*request.Request, *secretsmanager.TagResourceOutput) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 537ba3dc4..34f5a49e6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -15209,6 +15209,12 @@ type AddTagsToResourceInput struct { // // PatchBaseline: pb-012345abcde // + // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource + // Name (ARN) for the object. Specifically, ResourceID is created from the strings + // that come after the word opsmetadata in the ARN. For example, an OpsMetadata + // object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager + // has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. + // // For the Document and Parameter values, use the name of the resource. // // The ManagedInstance type for this API action is only for on-premises managed @@ -17898,6 +17904,149 @@ func (s *AutomationStepNotFoundException) RequestID() string { return s.RespMetadata.RequestID } +// Defines the basic information about a patch baseline override. +type BaselineOverride struct { + _ struct{} `type:"structure"` + + // A set of rules defining the approval rules for a patch baseline. + ApprovalRules *PatchRuleGroup `type:"structure"` + + // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. + ApprovedPatches []*string `type:"list"` + + // Defines the compliance level for approved patches. When an approved patch + // is reported as missing, this value describes the severity of the compliance + // violation. + ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the instances. The default value is 'false'. Applies + // to Linux instances only. + ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` + + // A set of patch filters, typically used for approval rules. + GlobalFilters *PatchFilterGroup `type:"structure"` + + // The operating system rule used by the patch baseline override. + OperatingSystem *string `type:"string" enum:"OperatingSystem"` + + // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. + RejectedPatches []*string `type:"list"` + + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. A patch can be allowed only if it is a dependency of another package, + // or blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + + // Information about the patches to use to update the instances, including target + // operating systems and source repositories. Applies to Linux instances only. + Sources []*PatchSource `type:"list"` +} + +// String returns the string representation +func (s BaselineOverride) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaselineOverride) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BaselineOverride) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BaselineOverride"} + if s.ApprovalRules != nil { + if err := s.ApprovalRules.Validate(); err != nil { + invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) + } + } + if s.GlobalFilters != nil { + if err := s.GlobalFilters.Validate(); err != nil { + invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) + } + } + if s.Sources != nil { + for i, v := range s.Sources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApprovalRules sets the ApprovalRules field's value. +func (s *BaselineOverride) SetApprovalRules(v *PatchRuleGroup) *BaselineOverride { + s.ApprovalRules = v + return s +} + +// SetApprovedPatches sets the ApprovedPatches field's value. +func (s *BaselineOverride) SetApprovedPatches(v []*string) *BaselineOverride { + s.ApprovedPatches = v + return s +} + +// SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. +func (s *BaselineOverride) SetApprovedPatchesComplianceLevel(v string) *BaselineOverride { + s.ApprovedPatchesComplianceLevel = &v + return s +} + +// SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. +func (s *BaselineOverride) SetApprovedPatchesEnableNonSecurity(v bool) *BaselineOverride { + s.ApprovedPatchesEnableNonSecurity = &v + return s +} + +// SetGlobalFilters sets the GlobalFilters field's value. +func (s *BaselineOverride) SetGlobalFilters(v *PatchFilterGroup) *BaselineOverride { + s.GlobalFilters = v + return s +} + +// SetOperatingSystem sets the OperatingSystem field's value. +func (s *BaselineOverride) SetOperatingSystem(v string) *BaselineOverride { + s.OperatingSystem = &v + return s +} + +// SetRejectedPatches sets the RejectedPatches field's value. +func (s *BaselineOverride) SetRejectedPatches(v []*string) *BaselineOverride { + s.RejectedPatches = v + return s +} + +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *BaselineOverride) SetRejectedPatchesAction(v string) *BaselineOverride { + s.RejectedPatchesAction = &v + return s +} + +// SetSources sets the Sources field's value. +func (s *BaselineOverride) SetSources(v []*PatchSource) *BaselineOverride { + s.Sources = v + return s +} + type CancelCommandInput struct { _ struct{} `type:"structure"` @@ -20847,6 +20996,18 @@ type CreateOpsMetadataInput struct { // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` + + // Optional metadata that you assign to a resource. You can specify a maximum + // of five tags for an OpsMetadata object. Tags enable you to categorize a resource + // in different ways, such as by purpose, owner, or environment. For example, + // you might want to tag an OpsMetadata object to identify an environment or + // target AWS Region. In this case, you could specify the following key-value + // pairs: + // + // * Key=Environment,Value=Production + // + // * Key=Region,Value=us-east-2 + Tags []*Tag `type:"list"` } // String returns the string representation @@ -20881,6 +21042,16 @@ func (s *CreateOpsMetadataInput) Validate() error { } } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -20900,6 +21071,12 @@ func (s *CreateOpsMetadataInput) SetResourceId(v string) *CreateOpsMetadataInput return s } +// SetTags sets the Tags field's value. +func (s *CreateOpsMetadataInput) SetTags(v []*Tag) *CreateOpsMetadataInput { + s.Tags = v + return s +} + type CreateOpsMetadataOutput struct { _ struct{} `type:"structure"` @@ -20938,8 +21115,8 @@ type CreatePatchBaselineInput struct { // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` - // Defines the compliance level for approved patches. This means that if an - // approved patch is reported as missing, this is the severity of the compliance + // Defines the compliance level for approved patches. When an approved patch + // is reported as missing, this value describes the severity of the compliance // violation. The default value is UNSPECIFIED. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` @@ -27871,11 +28048,13 @@ type GetCommandInvocationInput struct { // InstanceId is a required field InstanceId *string `type:"string" required:"true"` - // (Optional) The name of the plugin for which you want detailed results. If - // the document contains only one plugin, the name can be omitted and the details - // will be returned. + // The name of the plugin for which you want detailed results. If the document + // contains only one plugin, you can omit the name and details for that plugin + // are returned. If the document contains more than one plugin, you must specify + // the name of the plugin for which you want to view details. // // Plugin names are also referred to as step names in Systems Manager documents. + // For example, aws:RunShellScript is a plugin. PluginName *string `min:"4" type:"string"` } @@ -27973,8 +28152,8 @@ type GetCommandInvocationOutput struct { // configured for Systems Manager. InstanceId *string `type:"string"` - // The name of the plugin for which you want detailed results. For example, - // aws:RunShellScript is a plugin. + // The name of the plugin, or step name, for which details are reported. For + // example, aws:RunShellScript is a plugin. PluginName *string `min:"4" type:"string"` // The error level response code for the plugin script. If the response code @@ -28297,6 +28476,9 @@ func (s *GetDefaultPatchBaselineOutput) SetOperatingSystem(v string) *GetDefault type GetDeployablePatchSnapshotForInstanceInput struct { _ struct{} `type:"structure"` + // Defines the basic information about a patch baseline override. + BaselineOverride *BaselineOverride `type:"structure"` + // The ID of the instance for which the appropriate patch snapshot should be // retrieved. // @@ -28331,6 +28513,11 @@ func (s *GetDeployablePatchSnapshotForInstanceInput) Validate() error { if s.SnapshotId != nil && len(*s.SnapshotId) < 36 { invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 36)) } + if s.BaselineOverride != nil { + if err := s.BaselineOverride.Validate(); err != nil { + invalidParams.AddNested("BaselineOverride", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -28338,6 +28525,12 @@ func (s *GetDeployablePatchSnapshotForInstanceInput) Validate() error { return nil } +// SetBaselineOverride sets the BaselineOverride field's value. +func (s *GetDeployablePatchSnapshotForInstanceInput) SetBaselineOverride(v *BaselineOverride) *GetDeployablePatchSnapshotForInstanceInput { + s.BaselineOverride = v + return s +} + // SetInstanceId sets the InstanceId field's value. func (s *GetDeployablePatchSnapshotForInstanceInput) SetInstanceId(v string) *GetDeployablePatchSnapshotForInstanceInput { s.InstanceId = &v @@ -30830,7 +31023,8 @@ func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineO type GetServiceSettingInput struct { _ struct{} `type:"structure"` - // The ID of the service setting to get. The setting ID can be /ssm/parameter-store/default-parameter-tier, + // The ID of the service setting to get. The setting ID can be /ssm/automation/customer-script-log-destination, + // /ssm/automation/customer-script-log-group-name, /ssm/parameter-store/default-parameter-tier, // /ssm/parameter-store/high-throughput-enabled, or /ssm/managed-instance/activation-tier. // // SettingId is a required field @@ -31215,6 +31409,10 @@ func (s *InstanceAssociation) SetInstanceId(v string) *InstanceAssociation { } // An S3 bucket where you want to store the results of this request. +// +// For the minimal permissions required to enable Amazon S3 output for an association, +// see Creating associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-state-assoc.html) +// in the Systems Manager User Guide. type InstanceAssociationOutputLocation struct { _ struct{} `type:"structure"` @@ -31677,6 +31875,10 @@ type InstanceInformationStringFilter struct { // "InstanceIds"|"AgentVersion"|"PingStatus"|"PlatformTypes"|"ActivationIds"|"IamRole"|"ResourceType"|"AssociationStatus"|"Tag // Key" // + // Tag key is not a valid filter. You must specify either tag-key or tag:keyname + // and a string. Here are some valid examples: tag-key, tag:123, tag:al!, tag:Windows. + // Here are some invalid examples: tag-keys, Tag Key, tag:, tagKey, abc:keyname. + // // Key is a required field Key *string `min:"1" type:"string" required:"true"` @@ -42335,12 +42537,12 @@ type PatchRule struct { // The number of days after the release date of each patch matched by the rule // that the patch is marked as approved in the patch baseline. For example, // a value of 7 means that patches are approved seven days after they are released. - // Not supported on Ubuntu Server. + // Not supported on Debian Server or Ubuntu Server. ApproveAfterDays *int64 `type:"integer"` // The cutoff date for auto approval of released patches. Any patches released - // on or before this date are installed automatically. Not supported on Ubuntu - // Server. + // on or before this date are installed automatically. Not supported on Debian + // Server or Ubuntu Server. // // Enter dates in the format YYYY-MM-DD. For example, 2020-12-31. ApproveUntilDate *string `min:"1" type:"string"` @@ -43039,14 +43241,15 @@ type PutParameterInput struct { // * A parameter name can't be prefixed with "aws" or "ssm" (case-insensitive). // // * Parameter names can include only the following symbols and letters: - // a-zA-Z0-9_.-/ + // a-zA-Z0-9_.- In addition, the slash character ( / ) is used to delineate + // hierarchies in parameter names. For example: /Dev/Production/East/Project-ABC/MyParameter // // * A parameter name can't include spaces. // // * Parameter hierarchies are limited to a maximum depth of fifteen levels. // - // For additional information about valid values for parameter names, see About - // requirements and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) + // For additional information about valid values for parameter names, see Creating + // Systems Manager parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html) // in the AWS Systems Manager User Guide. // // The maximum length constraint listed below includes capacity for additional @@ -43515,6 +43718,11 @@ type RegisterTargetWithMaintenanceWindowInput struct { // The targets to register with the maintenance window. In other words, the // instances to run commands on when the maintenance window runs. // + // If a single maintenance window task is registered with multiple targets, + // its task invocations occur sequentially and not in parallel. If your task + // must run on multiple targets at the same time, register a task for each target + // individually and assign each task the same priority level. + // // You can specify targets using instance IDs, resource group names, or tags // that have been applied to instances. // @@ -44005,6 +44213,12 @@ type RemoveTagsFromResourceInput struct { // // PatchBaseline: pb-012345abcde // + // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource + // Name (ARN) for the object. Specifically, ResourceID is created from the strings + // that come after the word opsmetadata in the ARN. For example, an OpsMetadata + // object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager + // has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. + // // For the Document and Parameter values, use the name of the resource. // // The ManagedInstance type for this API action is only for on-premises managed @@ -44095,7 +44309,8 @@ type ResetServiceSettingInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the service setting to reset. The setting - // ID can be /ssm/parameter-store/default-parameter-tier, /ssm/parameter-store/high-throughput-enabled, + // ID can be /ssm/automation/customer-script-log-destination, /ssm/automation/customer-script-log-group-name, + // /ssm/parameter-store/default-parameter-tier, /ssm/parameter-store/high-throughput-enabled, // or /ssm/managed-instance/activation-tier. For example, arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. // // SettingId is a required field @@ -51007,6 +51222,10 @@ type UpdateServiceSettingInput struct { // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. // The setting ID can be one of the following. // + // * /ssm/automation/customer-script-log-destination + // + // * /ssm/automation/customer-script-log-group-name + // // * /ssm/parameter-store/default-parameter-tier // // * /ssm/parameter-store/high-throughput-enabled @@ -51028,6 +51247,12 @@ type UpdateServiceSettingInput struct { // For the /ssm/parameter-store/high-throughput-enabled, and /ssm/managed-instance/activation-tier // setting IDs, the setting value can be true or false. // + // For the /ssm/automation/customer-script-log-destination setting ID, the setting + // value can be CloudWatch. + // + // For the /ssm/automation/customer-script-log-group-name setting ID, the setting + // value can be the name of a CloudWatch Logs log group. + // // SettingValue is a required field SettingValue *string `min:"1" type:"string" required:"true"` } @@ -53026,6 +53251,9 @@ const ( // ResourceTypeForTaggingOpsItem is a ResourceTypeForTagging enum value ResourceTypeForTaggingOpsItem = "OpsItem" + + // ResourceTypeForTaggingOpsMetadata is a ResourceTypeForTagging enum value + ResourceTypeForTaggingOpsMetadata = "OpsMetadata" ) // ResourceTypeForTagging_Values returns all elements of the ResourceTypeForTagging enum @@ -53037,6 +53265,7 @@ func ResourceTypeForTagging_Values() []string { ResourceTypeForTaggingParameter, ResourceTypeForTaggingPatchBaseline, ResourceTypeForTaggingOpsItem, + ResourceTypeForTaggingOpsMetadata, } } diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go index 8667908cf..e4ffca838 100644 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go +++ b/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // Package cmpopts provides common options for the cmp package. package cmpopts @@ -11,7 +11,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "golang.org/x/xerrors" ) func equateAlways(_, _ interface{}) bool { return true } @@ -147,10 +146,3 @@ func areConcreteErrors(x, y interface{}) bool { _, ok2 := y.(error) return ok1 && ok2 } - -func compareErrors(x, y interface{}) bool { - xe := x.(error) - ye := y.(error) - // TODO(≥go1.13): Use standard definition of errors.Is. - return xerrors.Is(xe, ye) || xerrors.Is(ye, xe) -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_go113.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_go113.go new file mode 100644 index 000000000..26fe25d6a --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_go113.go @@ -0,0 +1,15 @@ +// Copyright 2021, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.13 + +package cmpopts + +import "errors" + +func compareErrors(x, y interface{}) bool { + xe := x.(error) + ye := y.(error) + return errors.Is(xe, ye) || errors.Is(ye, xe) +} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_xerrors.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_xerrors.go new file mode 100644 index 000000000..6eeb8d6e6 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/cmpopts/errors_xerrors.go @@ -0,0 +1,18 @@ +// Copyright 2021, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.13 + +// TODO(≥go1.13): For support on = r.NumDiff } -var randInt = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) +var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 // Difference reports whether two lists of lengths nx and ny are equal // given the definition of equality provided as f. @@ -168,17 +168,6 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { // A vertical edge is equivalent to inserting a symbol from list Y. // A diagonal edge is equivalent to a matching symbol between both X and Y. - // To ensure flexibility in changing the algorithm in the future, - // introduce some degree of deliberate instability. - // This is achieved by fiddling the zigzag iterator to start searching - // the graph starting from the bottom-right versus than the top-left. - // The result may differ depending on the starting search location, - // but still produces a valid edit script. - zigzagInit := randInt // either 0 or 1 - if flags.Deterministic { - zigzagInit = 0 - } - // Invariants: // • 0 ≤ fwdPath.X ≤ (fwdFrontier.X, revFrontier.X) ≤ revPath.X ≤ nx // • 0 ≤ fwdPath.Y ≤ (fwdFrontier.Y, revFrontier.Y) ≤ revPath.Y ≤ ny @@ -197,6 +186,11 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { // approximately the square-root of the search budget. searchBudget := 4 * (nx + ny) // O(n) + // Running the tests with the "cmp_debug" build tag prints a visualization + // of the algorithm running in real-time. This is educational for + // understanding how the algorithm works. See debug_enable.go. + f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es) + // The algorithm below is a greedy, meet-in-the-middle algorithm for // computing sub-optimal edit-scripts between two lists. // @@ -214,22 +208,28 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { // frontier towards the opposite corner. // • This algorithm terminates when either the X coordinates or the // Y coordinates of the forward and reverse frontier points ever intersect. - // + // This algorithm is correct even if searching only in the forward direction // or in the reverse direction. We do both because it is commonly observed // that two lists commonly differ because elements were added to the front // or end of the other list. // - // Running the tests with the "cmp_debug" build tag prints a visualization - // of the algorithm running in real-time. This is educational for - // understanding how the algorithm works. See debug_enable.go. - f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es) - for { + // Non-deterministically start with either the forward or reverse direction + // to introduce some deliberate instability so that we have the flexibility + // to change this algorithm in the future. + if flags.Deterministic || randBool { + goto forwardSearch + } else { + goto reverseSearch + } + +forwardSearch: + { // Forward search from the beginning. if fwdFrontier.X >= revFrontier.X || fwdFrontier.Y >= revFrontier.Y || searchBudget == 0 { - break + goto finishSearch } - for stop1, stop2, i := false, false, zigzagInit; !(stop1 && stop2) && searchBudget > 0; i++ { + for stop1, stop2, i := false, false, 0; !(stop1 && stop2) && searchBudget > 0; i++ { // Search in a diagonal pattern for a match. z := zigzag(i) p := point{fwdFrontier.X + z, fwdFrontier.Y - z} @@ -262,10 +262,14 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { } else { fwdFrontier.Y++ } + goto reverseSearch + } +reverseSearch: + { // Reverse search from the end. if fwdFrontier.X >= revFrontier.X || fwdFrontier.Y >= revFrontier.Y || searchBudget == 0 { - break + goto finishSearch } for stop1, stop2, i := false, false, 0; !(stop1 && stop2) && searchBudget > 0; i++ { // Search in a diagonal pattern for a match. @@ -300,8 +304,10 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { } else { revFrontier.Y-- } + goto forwardSearch } +finishSearch: // Join the forward and reverse paths and then append the reverse path. fwdPath.connect(revPath.point, f) for i := len(revPath.es) - 1; i >= 0; i-- { diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go index a9e7fc0b5..d8e459c9b 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package flags diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go index 01aed0a15..82d1d7fbf 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // +build !go1.10 diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go index c0b667f58..8646f0529 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // +build go1.10 diff --git a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go index ace1dbe86..d127d4362 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // Package function provides functionality for identifying function types. package function diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go index 8228e7d51..b6c12cefb 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go @@ -1,6 +1,6 @@ // Copyright 2020, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package value diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go index e9e384a1c..44f4a5afd 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go @@ -1,6 +1,6 @@ // Copyright 2018, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // +build purego diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go index b50c17ec7..a605953d4 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go @@ -1,6 +1,6 @@ // Copyright 2018, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // +build !purego diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go index 24fbae6e3..98533b036 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package value diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go b/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go index 06a8ffd03..9147a2997 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package value diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index 4b0407a7f..e57b9eb53 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go index 603dbb002..3d45c1a47 100644 --- a/vendor/github.com/google/go-cmp/cmp/path.go +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/report.go b/vendor/github.com/google/go-cmp/cmp/report.go index aafcb3635..f43cd12eb 100644 --- a/vendor/github.com/google/go-cmp/cmp/report.go +++ b/vendor/github.com/google/go-cmp/cmp/report.go @@ -1,6 +1,6 @@ // Copyright 2017, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go index 9e2180964..104bb3053 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_compare.go +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp @@ -79,7 +79,7 @@ func (opts formatOptions) verbosity() uint { } } -const maxVerbosityPreset = 3 +const maxVerbosityPreset = 6 // verbosityPreset modifies the verbosity settings given an index // between 0 and maxVerbosityPreset, inclusive. @@ -100,7 +100,7 @@ func verbosityPreset(opts formatOptions, i int) formatOptions { func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out textNode) { if opts.DiffMode == diffIdentical { opts = opts.WithVerbosity(1) - } else { + } else if opts.verbosity() < 3 { opts = opts.WithVerbosity(3) } diff --git a/vendor/github.com/google/go-cmp/cmp/report_references.go b/vendor/github.com/google/go-cmp/cmp/report_references.go index d620c2c20..be31b33a9 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_references.go +++ b/vendor/github.com/google/go-cmp/cmp/report_references.go @@ -1,6 +1,6 @@ // Copyright 2020, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go index 786f67126..33f03577f 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_reflect.go +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp @@ -351,6 +351,8 @@ func formatMapKey(v reflect.Value, disambiguate bool, ptrs *pointerReferences) s opts.PrintAddresses = disambiguate opts.AvoidStringer = disambiguate opts.QualifiedNames = disambiguate + opts.VerbosityLevel = maxVerbosityPreset + opts.LimitVerbosity = true s := opts.FormatValue(v, reflect.Map, ptrs).String() return strings.TrimSpace(s) } diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go index 35315dad3..168f92f3c 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_slices.go +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp @@ -26,8 +26,6 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false // No differences detected case !v.ValueX.IsValid() || !v.ValueY.IsValid(): return false // Both values must be valid - case v.Type.Kind() == reflect.Slice && (v.ValueX.Len() == 0 || v.ValueY.Len() == 0): - return false // Both slice values have to be non-empty case v.NumIgnored > 0: return false // Some ignore option was used case v.NumTransformed > 0: @@ -45,7 +43,16 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false } - switch t := v.Type; t.Kind() { + // Check whether this is an interface with the same concrete types. + t := v.Type + vx, vy := v.ValueX, v.ValueY + if t.Kind() == reflect.Interface && !vx.IsNil() && !vy.IsNil() && vx.Elem().Type() == vy.Elem().Type() { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + } + + // Check whether we provide specialized diffing for this type. + switch t.Kind() { case reflect.String: case reflect.Array, reflect.Slice: // Only slices of primitive types have specialized handling. @@ -57,6 +64,11 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false } + // Both slice values have to be non-empty. + if t.Kind() == reflect.Slice && (vx.Len() == 0 || vy.Len() == 0) { + return false + } + // If a sufficient number of elements already differ, // use specialized formatting even if length requirement is not met. if v.NumDiff > v.NumSame { @@ -68,7 +80,7 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { // Use specialized string diffing for longer slices or strings. const minLength = 64 - return v.ValueX.Len() >= minLength && v.ValueY.Len() >= minLength + return vx.Len() >= minLength && vy.Len() >= minLength } // FormatDiffSlice prints a diff for the slices (or strings) represented by v. @@ -77,6 +89,11 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { assert(opts.DiffMode == diffUnknown) t, vx, vy := v.Type, v.ValueX, v.ValueY + if t.Kind() == reflect.Interface { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + opts = opts.WithTypeMode(emitType) + } // Auto-detect the type of the data. var isLinedText, isText, isBinary bool diff --git a/vendor/github.com/google/go-cmp/cmp/report_text.go b/vendor/github.com/google/go-cmp/cmp/report_text.go index 8b12c05cd..0fd46d7ff 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_text.go +++ b/vendor/github.com/google/go-cmp/cmp/report_text.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/report_value.go b/vendor/github.com/google/go-cmp/cmp/report_value.go index 83031a7f5..668d470fd 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_value.go +++ b/vendor/github.com/google/go-cmp/cmp/report_value.go @@ -1,6 +1,6 @@ // Copyright 2019, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. package cmp diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md b/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md index f6ff4cc32..4fbd63cc6 100644 --- a/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md @@ -1,4 +1,10 @@ -# v0.6.0 (unreleased) +# v0.7.0 (Unreleased) + +ENHANCEMENTS + +* Optionally log the STS API calls when assuming a role #51 + +# v0.6.0 (August 18, 2020) BREAKING CHANGES @@ -7,6 +13,7 @@ BREAKING CHANGES ENHANCEMENTS * Additional AWS error checking function have been added to the `tfawserr` package - `ErrCodeEquals`, `ErrCodeContains` and `ErrStatusCodeEquals`. +* Support for appending data to User-Agent request header with the `TF_APPEND_USER_AGENT` environment variable. #47 # v0.5.0 (June 4, 2020) diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go b/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go index 3b1763ecd..54aba3107 100644 --- a/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go @@ -201,10 +201,10 @@ func GetCredentialsFromSession(c *Config) (*awsCredentials.Credentials, error) { return creds, nil } -// GetCredentials gets credentials from the environment, shared credentials, -// the session (which may include a credential process), or ECS/EC2 metadata endpoints. -// GetCredentials also validates the credentials and the ability to assume a role -// or will return an error if unsuccessful. +// GetCredentials gets credentials from environment, shared credentials file, +// environment AWS_SHARED_CREDENTIALS_FILE, the session (which may include a credential process), +// or ECS/EC2 metadata endpoints. GetCredentials also validates the credentials +// and the ability to assume a role or will return an error if unsuccessful. func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { sharedCredentialsFilename, err := homedir.Expand(c.CredsFilename) @@ -260,6 +260,11 @@ func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { HTTPClient: cleanhttp.DefaultClient(), } + if c.DebugLogging { + awsConfig.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors) + awsConfig.Logger = DebugLogger{} + } + assumeRoleSession, err := session.NewSession(awsConfig) if err != nil { diff --git a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go index 8d306bf51..fe28d15b6 100644 --- a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +++ b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go @@ -32,6 +32,7 @@ func DefaultPooledTransport() *http.Transport { IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, + ForceAttemptHTTP2: true, MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, } return transport diff --git a/vendor/github.com/hashicorp/go-cleanhttp/go.mod b/vendor/github.com/hashicorp/go-cleanhttp/go.mod index 310f07569..005ccdef9 100644 --- a/vendor/github.com/hashicorp/go-cleanhttp/go.mod +++ b/vendor/github.com/hashicorp/go-cleanhttp/go.mod @@ -1 +1,3 @@ module github.com/hashicorp/go-cleanhttp + +go 1.13 diff --git a/vendor/github.com/hashicorp/go-multierror/.travis.yml b/vendor/github.com/hashicorp/go-multierror/.travis.yml deleted file mode 100644 index 24b80388f..000000000 --- a/vendor/github.com/hashicorp/go-multierror/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false - -language: go - -go: - - 1.x - -branches: - only: - - master - -script: env GO111MODULE=on make test testrace diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md index e92fa614c..71dd308ed 100644 --- a/vendor/github.com/hashicorp/go-multierror/README.md +++ b/vendor/github.com/hashicorp/go-multierror/README.md @@ -1,10 +1,11 @@ # go-multierror -[![Build Status](http://img.shields.io/travis/hashicorp/go-multierror.svg?style=flat-square)][travis] -[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] +[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror) +[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror) +![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror) -[travis]: https://travis-ci.org/hashicorp/go-multierror -[godocs]: https://godoc.org/github.com/hashicorp/go-multierror +[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror +[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror `go-multierror` is a package for Go that provides a mechanism for representing a list of `error` values as a single `error`. @@ -24,7 +25,25 @@ for introspecting on error values. Install using `go get github.com/hashicorp/go-multierror`. Full documentation is available at -http://godoc.org/github.com/hashicorp/go-multierror +https://pkg.go.dev/github.com/hashicorp/go-multierror + +### Requires go version 1.13 or newer + +`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced +[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which +this library takes advantage of. + +If you need to use an earlier version of go, you can use the +[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) +tag, which doesn't rely on features in go 1.13. + +If you see compile errors that look like the below, it's likely that +you're on an older version of go: + +``` +/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As +/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is +``` ## Usage diff --git a/vendor/github.com/hashicorp/go-multierror/append.go b/vendor/github.com/hashicorp/go-multierror/append.go index 775b6e753..3e2589bfd 100644 --- a/vendor/github.com/hashicorp/go-multierror/append.go +++ b/vendor/github.com/hashicorp/go-multierror/append.go @@ -6,6 +6,8 @@ package multierror // If err is not a multierror.Error, then it will be turned into // one. If any of the errs are multierr.Error, they will be flattened // one level into err. +// Any nil errors within errs will be ignored. If err is nil, a new +// *Error will be returned. func Append(err error, errs ...error) *Error { switch err := err.(type) { case *Error: diff --git a/vendor/github.com/hashicorp/go-multierror/go.mod b/vendor/github.com/hashicorp/go-multierror/go.mod index 0afe8e6f9..141cc4ccb 100644 --- a/vendor/github.com/hashicorp/go-multierror/go.mod +++ b/vendor/github.com/hashicorp/go-multierror/go.mod @@ -1,5 +1,5 @@ module github.com/hashicorp/go-multierror -go 1.14 +go 1.13 require github.com/hashicorp/errwrap v1.0.0 diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go index d05dd9269..f54574326 100644 --- a/vendor/github.com/hashicorp/go-multierror/multierror.go +++ b/vendor/github.com/hashicorp/go-multierror/multierror.go @@ -40,14 +40,17 @@ func (e *Error) GoString() string { return fmt.Sprintf("*%#v", *e) } -// WrappedErrors returns the list of errors that this Error is wrapping. -// It is an implementation of the errwrap.Wrapper interface so that -// multierror.Error can be used with that library. +// WrappedErrors returns the list of errors that this Error is wrapping. It is +// an implementation of the errwrap.Wrapper interface so that multierror.Error +// can be used with that library. // -// This method is not safe to be called concurrently and is no different -// than accessing the Errors field directly. It is implemented only to -// satisfy the errwrap.Wrapper interface. +// This method is not safe to be called concurrently. Unlike accessing the +// Errors field directly, this function also checks if the multierror is nil to +// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface. func (e *Error) WrappedErrors() []error { + if e == nil { + return nil + } return e.Errors } diff --git a/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md b/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md index 3bc725e96..5e6655a2c 100644 --- a/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md +++ b/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md @@ -1,5 +1,34 @@ # HCL Changelog +## v2.9.1 (March 10, 2021) + +### Bugs Fixed + +* hclsyntax: Fix panic for marked index value. ([#451](https://github.com/hashicorp/hcl/pull/451)) + +## v2.9.0 (February 23, 2021) + +### Enhancements + +* HCL's native syntax and JSON scanners -- and thus all of the other parsing components that build on top of them -- are now using Unicode 13 rules for text segmentation when counting text characters for the purpose of reporting source location columns. Previously HCL was using Unicode 12. Unicode 13 still uses the same algorithm but includes some additions to the character tables the algorithm is defined in terms of, to properly categorize new characters defined in Unicode 13. + +## v2.8.2 (January 6, 2021) + +### Bugs Fixed + +* hclsyntax: Fix panic for marked collection splat. ([#436](https://github.com/hashicorp/hcl/pull/436)) +* hclsyntax: Fix panic for marked template loops. ([#437](https://github.com/hashicorp/hcl/pull/437)) +* hclsyntax: Fix `for` expression marked conditional. ([#438](https://github.com/hashicorp/hcl/pull/438)) +* hclsyntax: Mark objects with keys that are sensitive. ([#440](https://github.com/hashicorp/hcl/pull/440)) + +## v2.8.1 (December 17, 2020) + +### Bugs Fixed + +* hclsyntax: Fix panic when expanding marked function arguments. ([#429](https://github.com/hashicorp/hcl/pull/429)) +* hclsyntax: Error when attempting to use a marked value as an object key. ([#434](https://github.com/hashicorp/hcl/pull/434)) +* hclsyntax: Error when attempting to use a marked value as an object key in expressions. ([#433](https://github.com/hashicorp/hcl/pull/433)) + ## v2.8.0 (December 7, 2020) ### Enhancements diff --git a/vendor/github.com/hashicorp/hcl/v2/appveyor.yml b/vendor/github.com/hashicorp/hcl/v2/appveyor.yml deleted file mode 100644 index e382f8f57..000000000 --- a/vendor/github.com/hashicorp/hcl/v2/appveyor.yml +++ /dev/null @@ -1,13 +0,0 @@ -build: off - -clone_folder: c:\gopath\src\github.com\hashicorp\hcl - -environment: - GOPATH: c:\gopath - GO111MODULE: on - GOPROXY: https://goproxy.io - -stack: go 1.12 - -test_script: - - go test ./... diff --git a/vendor/github.com/hashicorp/hcl/v2/go.mod b/vendor/github.com/hashicorp/hcl/v2/go.mod index c8c289d9f..0529faa97 100644 --- a/vendor/github.com/hashicorp/hcl/v2/go.mod +++ b/vendor/github.com/hashicorp/hcl/v2/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/agext/levenshtein v1.2.1 github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 - github.com/apparentlymart/go-textseg/v12 v12.0.0 + github.com/apparentlymart/go-textseg/v13 v13.0.0 github.com/davecgh/go-spew v1.1.1 github.com/go-test/deep v1.0.3 github.com/google/go-cmp v0.3.1 @@ -16,8 +16,8 @@ require ( github.com/sergi/go-diff v1.0.0 github.com/spf13/pflag v1.0.2 github.com/stretchr/testify v1.2.2 // indirect - github.com/zclconf/go-cty v1.2.0 + github.com/zclconf/go-cty v1.8.0 + github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect - golang.org/x/text v0.3.2 // indirect ) diff --git a/vendor/github.com/hashicorp/hcl/v2/go.sum b/vendor/github.com/hashicorp/hcl/v2/go.sum index 2a1073d11..6c1475673 100644 --- a/vendor/github.com/hashicorp/hcl/v2/go.sum +++ b/vendor/github.com/hashicorp/hcl/v2/go.sum @@ -4,13 +4,15 @@ github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhi github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= +github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -31,23 +33,30 @@ github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/zclconf/go-cty v1.2.0 h1:sPHsy7ADcIZQP3vILvTjrh74ZA175TFP5vqiNK1UmlI= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= +github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= +github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 h1:p/H982KKEjUnLJkM3tt/LemDnOc1GiZL5FCVlORJ5zo= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dzugGxJ/SQHoNufZJq1w= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go index 3b167be0e..63f2e88ec 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go @@ -317,13 +317,17 @@ func (e *FunctionCallExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnosti return cty.DynamicVal, diags } + // When expanding arguments from a collection, we must first unmark + // the collection itself, and apply any marks directly to the + // elements. This ensures that marks propagate correctly. + expandVal, marks := expandVal.Unmark() newArgs := make([]Expression, 0, (len(args)-1)+expandVal.LengthInt()) newArgs = append(newArgs, args[:len(args)-1]...) it := expandVal.ElementIterator() for it.Next() { _, val := it.Element() newArgs = append(newArgs, &LiteralValueExpr{ - Val: val, + Val: val.WithMarks(marks), SrcRange: expandExpr.Range(), }) } @@ -784,6 +788,7 @@ func (e *ObjectConsExpr) walkChildNodes(w internalWalkFunc) { func (e *ObjectConsExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { var vals map[string]cty.Value var diags hcl.Diagnostics + var marks []cty.ValueMarks // This will get set to true if we fail to produce any of our keys, // either because they are actually unknown or if the evaluation produces @@ -821,6 +826,9 @@ func (e *ObjectConsExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics continue } + key, keyMarks := key.Unmark() + marks = append(marks, keyMarks) + var err error key, err = convert.Convert(key, cty.String) if err != nil { @@ -850,7 +858,7 @@ func (e *ObjectConsExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics return cty.DynamicVal, diags } - return cty.ObjectVal(vals), diags + return cty.ObjectVal(vals).WithMarks(marks...), diags } func (e *ObjectConsExpr) Range() hcl.Range { @@ -980,6 +988,7 @@ type ForExpr struct { func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { var diags hcl.Diagnostics + var marks []cty.ValueMarks collVal, collDiags := e.CollExpr.Value(ctx) diags = append(diags, collDiags...) @@ -1001,7 +1010,8 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { } // Unmark collection before checking for iterability, because marked // values cannot be iterated - collVal, marks := collVal.Unmark() + collVal, collMarks := collVal.Unmark() + marks = append(marks, collMarks) if !collVal.CanIterateElements() { diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, @@ -1126,7 +1136,11 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { continue } - if include.False() { + // Extract and merge marks from the include expression into the + // main set of marks + includeUnmarked, includeMarks := include.Unmark() + marks = append(marks, includeMarks) + if includeUnmarked.False() { // Skip this element continue } @@ -1171,6 +1185,9 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { continue } + key, keyMarks := key.Unmark() + marks = append(marks, keyMarks) + val, valDiags := e.ValExpr.Value(childCtx) diags = append(diags, valDiags...) @@ -1209,7 +1226,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { } } - return cty.ObjectVal(vals).WithMarks(marks), diags + return cty.ObjectVal(vals).WithMarks(marks...), diags } else { // Producing a tuple @@ -1270,7 +1287,11 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { continue } - if include.False() { + // Extract and merge marks from the include expression into the + // main set of marks + includeUnmarked, includeMarks := include.Unmark() + marks = append(marks, includeMarks) + if includeUnmarked.False() { // Skip this element continue } @@ -1285,7 +1306,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { return cty.DynamicVal, diags } - return cty.TupleVal(vals).WithMarks(marks), diags + return cty.TupleVal(vals).WithMarks(marks...), diags } } @@ -1422,6 +1443,9 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { return cty.UnknownVal(ty), diags } + // Unmark the collection, and save the marks to apply to the returned + // collection result + sourceVal, marks := sourceVal.Unmark() vals := make([]cty.Value, 0, sourceVal.LengthInt()) it := sourceVal.ElementIterator() if ctx == nil { @@ -1456,9 +1480,9 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { diags = append(diags, tyDiags...) return cty.ListValEmpty(ty.ElementType()), diags } - return cty.ListVal(vals), diags + return cty.ListVal(vals).WithMarks(marks), diags default: - return cty.TupleVal(vals), diags + return cty.TupleVal(vals).WithMarks(marks), diags } } diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go index ff9a6e5c6..0b7e07a5b 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go @@ -152,6 +152,8 @@ func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnosti return cty.UnknownVal(cty.String), diags } + tuple, marks := tuple.Unmark() + allMarks := []cty.ValueMarks{marks} buf := &bytes.Buffer{} it := tuple.ElementIterator() for it.Next() { @@ -171,7 +173,7 @@ func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnosti continue } if val.Type() == cty.DynamicPseudoType { - return cty.UnknownVal(cty.String), diags + return cty.UnknownVal(cty.String).WithMarks(marks), diags } strVal, err := convert.Convert(val, cty.String) if err != nil { @@ -189,13 +191,17 @@ func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnosti continue } if !val.IsKnown() { - return cty.UnknownVal(cty.String), diags + return cty.UnknownVal(cty.String).WithMarks(marks), diags } + strVal, strValMarks := strVal.Unmark() + if len(strValMarks) > 0 { + allMarks = append(allMarks, strValMarks) + } buf.WriteString(strVal.AsString()) } - return cty.StringVal(buf.String()), diags + return cty.StringVal(buf.String()).WithMarks(allMarks...), diags } func (e *TemplateJoinExpr) Range() hcl.Range { diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go index 0998cc412..eef13aaf4 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go @@ -6,7 +6,7 @@ import ( "strconv" "unicode/utf8" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" ) diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_template.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_template.go index bb8564610..6b7e6ca4b 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_template.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_template.go @@ -5,7 +5,7 @@ import ( "strings" "unicode" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" ) diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/token.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/token.go index 59f4c4347..f4c6c9342 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/token.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/token.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/hashicorp/hcl/v2" ) diff --git a/vendor/github.com/hashicorp/hcl/v2/hclwrite/tokens.go b/vendor/github.com/hashicorp/hcl/v2/hclwrite/tokens.go index 7d21d09dd..edb6483de 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclwrite/tokens.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclwrite/tokens.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" ) diff --git a/vendor/github.com/hashicorp/hcl/v2/json/scanner.go b/vendor/github.com/hashicorp/hcl/v2/json/scanner.go index ff78a9b58..b7111631b 100644 --- a/vendor/github.com/hashicorp/hcl/v2/json/scanner.go +++ b/vendor/github.com/hashicorp/hcl/v2/json/scanner.go @@ -3,7 +3,7 @@ package json import ( "fmt" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/hashicorp/hcl/v2" ) diff --git a/vendor/github.com/hashicorp/hcl/v2/ops.go b/vendor/github.com/hashicorp/hcl/v2/ops.go index f69de5b93..597571d52 100644 --- a/vendor/github.com/hashicorp/hcl/v2/ops.go +++ b/vendor/github.com/hashicorp/hcl/v2/ops.go @@ -95,6 +95,7 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics) // division rather than integer division. if (ty.IsListType() || ty.IsTupleType()) && key.Type().Equals(cty.Number) { if key.IsKnown() && !key.IsNull() { + key, _ := key.Unmark() bf := key.AsBigFloat() if _, acc := bf.Int(nil); acc != big.Exact { return cty.DynamicVal, Diagnostics{ @@ -143,6 +144,7 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics) return cty.DynamicVal, nil } + key, _ = key.Unmark() attrName := key.AsString() if !ty.HasAttribute(attrName) { diff --git a/vendor/github.com/hashicorp/hcl/v2/pos_scanner.go b/vendor/github.com/hashicorp/hcl/v2/pos_scanner.go index ef0aa1015..49077fc52 100644 --- a/vendor/github.com/hashicorp/hcl/v2/pos_scanner.go +++ b/vendor/github.com/hashicorp/hcl/v2/pos_scanner.go @@ -4,7 +4,7 @@ import ( "bufio" "bytes" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" ) // RangeScanner is a helper that will scan over a buffer using a bufio.SplitFunc diff --git a/vendor/github.com/hashicorp/packer-plugin-amazon/LICENSE b/vendor/github.com/hashicorp/packer-plugin-amazon/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/builder/amazon/chroot/builder.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.go similarity index 99% rename from builder/amazon/chroot/builder.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.go index afae29446..a679dbaa8 100644 --- a/builder/amazon/chroot/builder.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/chroot" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/multistep" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // The unique ID for this builder diff --git a/builder/amazon/chroot/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.hcl2spec.go similarity index 99% rename from builder/amazon/chroot/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.hcl2spec.go index f00c35e65..aaeaffb05 100644 --- a/builder/amazon/chroot/builder.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/builder.hcl2spec.go @@ -4,8 +4,8 @@ package chroot import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/builder/amazon/chroot/copy_files.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/copy_files.go similarity index 100% rename from builder/amazon/chroot/copy_files.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/copy_files.go diff --git a/builder/amazon/chroot/device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/device.go similarity index 100% rename from builder/amazon/chroot/device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/device.go diff --git a/builder/amazon/chroot/lockfile.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/lockfile.go similarity index 100% rename from builder/amazon/chroot/lockfile.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/lockfile.go diff --git a/builder/amazon/chroot/lockfile_unix.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/lockfile_unix.go similarity index 100% rename from builder/amazon/chroot/lockfile_unix.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/lockfile_unix.go diff --git a/builder/amazon/chroot/step_attach_volume.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_attach_volume.go similarity index 97% rename from builder/amazon/chroot/step_attach_volume.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_attach_volume.go index 5c45251a9..cb0223efd 100644 --- a/builder/amazon/chroot/step_attach_volume.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_attach_volume.go @@ -7,9 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepAttachVolume attaches the previously created volume to an diff --git a/builder/amazon/chroot/step_check_root_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_check_root_device.go similarity index 100% rename from builder/amazon/chroot/step_check_root_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_check_root_device.go diff --git a/builder/amazon/chroot/step_create_volume.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_create_volume.go similarity index 98% rename from builder/amazon/chroot/step_create_volume.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_create_volume.go index c7bb056a3..b99636c19 100644 --- a/builder/amazon/chroot/step_create_volume.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_create_volume.go @@ -8,11 +8,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepCreateVolume creates a new volume from the snapshot of the root diff --git a/builder/amazon/chroot/step_early_unflock.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_early_unflock.go similarity index 100% rename from builder/amazon/chroot/step_early_unflock.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_early_unflock.go diff --git a/builder/amazon/chroot/step_flock.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_flock.go similarity index 100% rename from builder/amazon/chroot/step_flock.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_flock.go diff --git a/builder/amazon/chroot/step_instance_info.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_instance_info.go similarity index 100% rename from builder/amazon/chroot/step_instance_info.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_instance_info.go diff --git a/builder/amazon/chroot/step_mount_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_mount_device.go similarity index 100% rename from builder/amazon/chroot/step_mount_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_mount_device.go diff --git a/builder/amazon/chroot/step_prepare_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_prepare_device.go similarity index 100% rename from builder/amazon/chroot/step_prepare_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_prepare_device.go diff --git a/builder/amazon/chroot/step_register_ami.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_register_ami.go similarity index 98% rename from builder/amazon/chroot/step_register_ami.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_register_ami.go index 5c1e9b019..686971d43 100644 --- a/builder/amazon/chroot/step_register_ami.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_register_ami.go @@ -6,11 +6,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/random" confighelper "github.com/hashicorp/packer-plugin-sdk/template/config" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepRegisterAMI creates the AMI. diff --git a/builder/amazon/chroot/step_snapshot.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_snapshot.go similarity index 96% rename from builder/amazon/chroot/step_snapshot.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_snapshot.go index 3492f5f02..4f39f2ffd 100644 --- a/builder/amazon/chroot/step_snapshot.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/chroot/step_snapshot.go @@ -6,9 +6,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepSnapshot creates a snapshot of the created volume. diff --git a/builder/amazon/common/access_config.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/access_config.go similarity index 99% rename from builder/amazon/common/access_config.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/access_config.go index 9d6dfb459..1c5df701d 100644 --- a/builder/amazon/common/access_config.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/access_config.go @@ -17,7 +17,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2/ec2iface" awsbase "github.com/hashicorp/aws-sdk-go-base" cleanhttp "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" vaultapi "github.com/hashicorp/vault/api" ) diff --git a/builder/amazon/common/access_config.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/access_config.hcl2spec.go similarity index 100% rename from builder/amazon/common/access_config.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/access_config.hcl2spec.go diff --git a/builder/amazon/common/ami_config.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ami_config.go similarity index 100% rename from builder/amazon/common/ami_config.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ami_config.go diff --git a/builder/amazon/common/ami_filter.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ami_filter.go similarity index 100% rename from builder/amazon/common/ami_filter.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ami_filter.go diff --git a/builder/amazon/common/artifact.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/artifact.go similarity index 100% rename from builder/amazon/common/artifact.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/artifact.go diff --git a/builder/amazon/common/awserrors/utils.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors/utils.go similarity index 100% rename from builder/amazon/common/awserrors/utils.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors/utils.go diff --git a/builder/amazon/common/block_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/block_device.go similarity index 100% rename from builder/amazon/common/block_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/block_device.go diff --git a/builder/amazon/common/block_device.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/block_device.hcl2spec.go similarity index 100% rename from builder/amazon/common/block_device.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/block_device.hcl2spec.go diff --git a/builder/amazon/common/build_filter.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/build_filter.go similarity index 100% rename from builder/amazon/common/build_filter.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/build_filter.go diff --git a/builder/amazon/common/errors.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/errors.go similarity index 100% rename from builder/amazon/common/errors.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/errors.go diff --git a/builder/amazon/common/helper_funcs.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/helper_funcs.go similarity index 96% rename from builder/amazon/common/helper_funcs.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/helper_funcs.go index 6bdaa2313..b80d67c5a 100644 --- a/builder/amazon/common/helper_funcs.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/helper_funcs.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/retry" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) // DestroyAMIs deregisters the AWS machine images in imageids from an active AWS account diff --git a/builder/amazon/common/interpolate_build_info.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/interpolate_build_info.go similarity index 100% rename from builder/amazon/common/interpolate_build_info.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/interpolate_build_info.go diff --git a/builder/amazon/common/regions.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/regions.go similarity index 100% rename from builder/amazon/common/regions.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/regions.go diff --git a/builder/amazon/common/run_config.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/run_config.go similarity index 100% rename from builder/amazon/common/run_config.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/run_config.go diff --git a/builder/amazon/common/run_config.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/run_config.hcl2spec.go similarity index 100% rename from builder/amazon/common/run_config.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/run_config.hcl2spec.go diff --git a/builder/amazon/common/snapshot_config.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/snapshot_config.go similarity index 100% rename from builder/amazon/common/snapshot_config.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/snapshot_config.go diff --git a/builder/amazon/common/ssh.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ssh.go similarity index 100% rename from builder/amazon/common/ssh.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ssh.go diff --git a/builder/amazon/common/ssm/session.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ssm/session.go similarity index 98% rename from builder/amazon/common/ssm/session.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ssm/session.go index 7eee759fb..146d54647 100644 --- a/builder/amazon/common/ssm/session.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/ssm/session.go @@ -12,10 +12,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/ssm/ssmiface" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" "github.com/hashicorp/packer-plugin-sdk/shell-local/localexec" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type Session struct { diff --git a/builder/amazon/common/state.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/state.go similarity index 100% rename from builder/amazon/common/state.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/state.go diff --git a/builder/amazon/common/state.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/state.hcl2spec.go similarity index 100% rename from builder/amazon/common/state.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/state.hcl2spec.go diff --git a/builder/amazon/common/step_ami_region_copy.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_ami_region_copy.go similarity index 100% rename from builder/amazon/common/step_ami_region_copy.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_ami_region_copy.go diff --git a/builder/amazon/common/step_cleanup_volumes.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_cleanup_volumes.go similarity index 100% rename from builder/amazon/common/step_cleanup_volumes.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_cleanup_volumes.go diff --git a/builder/amazon/common/step_create_ssm_tunnel.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_ssm_tunnel.go similarity index 97% rename from builder/amazon/common/step_create_ssm_tunnel.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_ssm_tunnel.go index eda61cb02..5022e1583 100644 --- a/builder/amazon/common/step_create_ssm_tunnel.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_ssm_tunnel.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ssm" + pssm "github.com/hashicorp/packer-plugin-amazon/builder/common/ssm" "github.com/hashicorp/packer-plugin-sdk/multistep" "github.com/hashicorp/packer-plugin-sdk/net" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - pssm "github.com/hashicorp/packer/builder/amazon/common/ssm" ) type StepCreateSSMTunnel struct { diff --git a/builder/amazon/common/step_create_tags.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_tags.go similarity index 98% rename from builder/amazon/common/step_create_tags.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_tags.go index f04cc829a..ccb3a9352 100644 --- a/builder/amazon/common/step_create_tags.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_create_tags.go @@ -8,11 +8,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type StepCreateTags struct { diff --git a/builder/amazon/common/step_deregister_ami.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_deregister_ami.go similarity index 100% rename from builder/amazon/common/step_deregister_ami.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_deregister_ami.go diff --git a/builder/amazon/common/step_get_password.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_get_password.go similarity index 100% rename from builder/amazon/common/step_get_password.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_get_password.go diff --git a/builder/amazon/common/step_iam_instance_profile.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_iam_instance_profile.go similarity index 100% rename from builder/amazon/common/step_iam_instance_profile.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_iam_instance_profile.go diff --git a/builder/amazon/common/step_key_pair.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_key_pair.go similarity index 100% rename from builder/amazon/common/step_key_pair.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_key_pair.go diff --git a/builder/amazon/common/step_modify_ami_attributes.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_modify_ami_attributes.go similarity index 100% rename from builder/amazon/common/step_modify_ami_attributes.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_modify_ami_attributes.go diff --git a/builder/amazon/common/step_modify_ebs_instance.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_modify_ebs_instance.go similarity index 100% rename from builder/amazon/common/step_modify_ebs_instance.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_modify_ebs_instance.go diff --git a/builder/amazon/common/step_network_info.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_network_info.go similarity index 100% rename from builder/amazon/common/step_network_info.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_network_info.go diff --git a/builder/amazon/common/step_pre_validate.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_pre_validate.go similarity index 98% rename from builder/amazon/common/step_pre_validate.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_pre_validate.go index 97871bea8..a8a18089c 100644 --- a/builder/amazon/common/step_pre_validate.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_pre_validate.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) // StepPreValidate provides an opportunity to pre-validate any configuration for diff --git a/builder/amazon/common/step_run_source_instance.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_source_instance.go similarity index 99% rename from builder/amazon/common/step_run_source_instance.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_source_instance.go index 3874217e5..98c014c79 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_source_instance.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type StepRunSourceInstance struct { diff --git a/builder/amazon/common/step_run_spot_instance.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_spot_instance.go similarity index 99% rename from builder/amazon/common/step_run_spot_instance.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_spot_instance.go index 3d93f854a..bba59ad84 100644 --- a/builder/amazon/common/step_run_spot_instance.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_run_spot_instance.go @@ -12,13 +12,13 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/random" "github.com/hashicorp/packer-plugin-sdk/retry" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type EC2BlockDeviceMappingsBuilder interface { diff --git a/builder/amazon/common/step_security_group.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_security_group.go similarity index 100% rename from builder/amazon/common/step_security_group.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_security_group.go diff --git a/builder/amazon/common/step_set_generated_data.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_set_generated_data.go similarity index 100% rename from builder/amazon/common/step_set_generated_data.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_set_generated_data.go diff --git a/builder/amazon/common/step_source_ami_info.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_source_ami_info.go similarity index 100% rename from builder/amazon/common/step_source_ami_info.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_source_ami_info.go diff --git a/builder/amazon/common/step_stop_ebs_instance.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_stop_ebs_instance.go similarity index 97% rename from builder/amazon/common/step_stop_ebs_instance.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_stop_ebs_instance.go index f907916b1..317ffce5b 100644 --- a/builder/amazon/common/step_stop_ebs_instance.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/step_stop_ebs_instance.go @@ -6,10 +6,10 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type StepStopEBSBackedInstance struct { diff --git a/builder/amazon/common/tags.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/tags.go similarity index 100% rename from builder/amazon/common/tags.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/tags.go diff --git a/builder/amazon/common/template_funcs.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/template_funcs.go similarity index 100% rename from builder/amazon/common/template_funcs.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/template_funcs.go diff --git a/builder/amazon/common/test_helper_funcs.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/test_helper_funcs.go similarity index 100% rename from builder/amazon/common/test_helper_funcs.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/common/test_helper_funcs.go diff --git a/builder/amazon/ebs/builder.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.go similarity index 99% rename from builder/amazon/ebs/builder.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.go index 1d895ffde..d7dcc0011 100644 --- a/builder/amazon/ebs/builder.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // The unique ID for this builder diff --git a/builder/amazon/ebs/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.hcl2spec.go similarity index 99% rename from builder/amazon/ebs/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.hcl2spec.go index 18a8a1ba2..669efcfaf 100644 --- a/builder/amazon/ebs/builder.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/builder.hcl2spec.go @@ -4,8 +4,8 @@ package ebs import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/builder/amazon/ebs/step_create_ami.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/step_create_ami.go similarity index 97% rename from builder/amazon/ebs/step_create_ami.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/step_create_ami.go index 5a6f87f91..770016a79 100644 --- a/builder/amazon/ebs/step_create_ami.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebs/step_create_ami.go @@ -8,12 +8,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/random" "github.com/hashicorp/packer-plugin-sdk/retry" - awscommon "github.com/hashicorp/packer/builder/amazon/common" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" ) type stepCreateAMI struct { diff --git a/builder/amazon/ebssurrogate/block_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/block_device.go similarity index 95% rename from builder/amazon/ebssurrogate/block_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/block_device.go index b39510940..5f8e428e6 100644 --- a/builder/amazon/ebssurrogate/block_device.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/block_device.go @@ -4,8 +4,8 @@ package ebssurrogate import ( "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) type BlockDevice struct { diff --git a/builder/amazon/ebssurrogate/builder.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.go similarity index 99% rename from builder/amazon/ebssurrogate/builder.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.go index 356f14c50..0afa84e70 100644 --- a/builder/amazon/ebssurrogate/builder.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.go @@ -13,6 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" @@ -21,7 +22,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) const BuilderId = "mitchellh.amazon.ebssurrogate" diff --git a/builder/amazon/ebssurrogate/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.hcl2spec.go similarity index 99% rename from builder/amazon/ebssurrogate/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.hcl2spec.go index e837458c5..8ac906f22 100644 --- a/builder/amazon/ebssurrogate/builder.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/builder.hcl2spec.go @@ -4,8 +4,8 @@ package ebssurrogate import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/builder/amazon/ebssurrogate/root_block_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/root_block_device.go similarity index 100% rename from builder/amazon/ebssurrogate/root_block_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/root_block_device.go diff --git a/builder/amazon/ebssurrogate/step_register_ami.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_register_ami.go similarity index 98% rename from builder/amazon/ebssurrogate/step_register_ami.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_register_ami.go index b3e0c2c83..72ad973dd 100644 --- a/builder/amazon/ebssurrogate/step_register_ami.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_register_ami.go @@ -6,11 +6,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/random" confighelper "github.com/hashicorp/packer-plugin-sdk/template/config" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepRegisterAMI creates the AMI. diff --git a/builder/amazon/ebssurrogate/step_snapshot_volumes.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_snapshot_volumes.go similarity index 98% rename from builder/amazon/ebssurrogate/step_snapshot_volumes.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_snapshot_volumes.go index 825e0bb8d..fba4ac444 100644 --- a/builder/amazon/ebssurrogate/step_snapshot_volumes.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate/step_snapshot_volumes.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" multierror "github.com/hashicorp/go-multierror" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // StepSnapshotVolumes creates snapshots of the created volumes. diff --git a/builder/amazon/ebsvolume/artifact.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/artifact.go similarity index 100% rename from builder/amazon/ebsvolume/artifact.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/artifact.go diff --git a/builder/amazon/ebsvolume/block_device.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/block_device.go similarity index 96% rename from builder/amazon/ebsvolume/block_device.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/block_device.go index 042af8cf7..19ebb4b4c 100644 --- a/builder/amazon/ebsvolume/block_device.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/block_device.go @@ -4,9 +4,9 @@ package ebsvolume import ( "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) type BlockDevice struct { diff --git a/builder/amazon/ebsvolume/builder.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.go similarity index 99% rename from builder/amazon/ebsvolume/builder.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.go index 25a24fb39..88c874a06 100644 --- a/builder/amazon/ebsvolume/builder.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" @@ -20,7 +21,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) const BuilderId = "mitchellh.amazon.ebsvolume" diff --git a/builder/amazon/ebsvolume/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.hcl2spec.go similarity index 99% rename from builder/amazon/ebsvolume/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.hcl2spec.go index 7ff6a2a82..e11af8940 100644 --- a/builder/amazon/ebsvolume/builder.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/builder.hcl2spec.go @@ -4,8 +4,8 @@ package ebsvolume import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/builder/amazon/ebsvolume/step_snapshot_ebs_volumes.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_snapshot_ebs_volumes.go similarity index 98% rename from builder/amazon/ebsvolume/step_snapshot_ebs_volumes.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_snapshot_ebs_volumes.go index 4b3408241..80810e573 100644 --- a/builder/amazon/ebsvolume/step_snapshot_ebs_volumes.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_snapshot_ebs_volumes.go @@ -7,10 +7,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) type stepSnapshotEBSVolumes struct { diff --git a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_tag_ebs_volumes.go similarity index 98% rename from builder/amazon/ebsvolume/step_tag_ebs_volumes.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_tag_ebs_volumes.go index 56770a303..a73f89286 100644 --- a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/ebsvolume/step_tag_ebs_volumes.go @@ -7,10 +7,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) type stepTagEBSVolumes struct { diff --git a/builder/amazon/instance/builder.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.go similarity index 99% rename from builder/amazon/instance/builder.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.go index 373051585..282681276 100644 --- a/builder/amazon/instance/builder.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/communicator" "github.com/hashicorp/packer-plugin-sdk/multistep" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) // The unique ID for this builder diff --git a/builder/amazon/instance/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.hcl2spec.go similarity index 99% rename from builder/amazon/instance/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.hcl2spec.go index cc23f639d..f0cac96c2 100644 --- a/builder/amazon/instance/builder.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/builder.hcl2spec.go @@ -4,8 +4,8 @@ package instance import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/builder/amazon/instance/step_bundle_volume.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_bundle_volume.go similarity index 100% rename from builder/amazon/instance/step_bundle_volume.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_bundle_volume.go diff --git a/builder/amazon/instance/step_register_ami.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_register_ami.go similarity index 97% rename from builder/amazon/instance/step_register_ami.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_register_ami.go index 1d90ca0ea..dfce60607 100644 --- a/builder/amazon/instance/step_register_ami.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_register_ami.go @@ -6,11 +6,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/random" confighelper "github.com/hashicorp/packer-plugin-sdk/template/config" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) type StepRegisterAMI struct { diff --git a/builder/amazon/instance/step_upload_bundle.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_upload_bundle.go similarity index 100% rename from builder/amazon/instance/step_upload_bundle.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_upload_bundle.go diff --git a/builder/amazon/instance/step_upload_x509_cert.go b/vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_upload_x509_cert.go similarity index 100% rename from builder/amazon/instance/step_upload_x509_cert.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/builder/instance/step_upload_x509_cert.go diff --git a/datasource/amazon/ami/data.go b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.go similarity index 97% rename from datasource/amazon/ami/data.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.go index 11f7563b4..c4b2c280c 100644 --- a/datasource/amazon/ami/data.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.go @@ -8,10 +8,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/hcl2helper" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/config" - awscommon "github.com/hashicorp/packer/builder/amazon/common" "github.com/zclconf/go-cty/cty" ) diff --git a/datasource/amazon/ami/data.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.hcl2spec.go similarity index 99% rename from datasource/amazon/ami/data.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.hcl2spec.go index 5560d2a66..525860bb6 100644 --- a/datasource/amazon/ami/data.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/ami/data.hcl2spec.go @@ -4,7 +4,7 @@ package ami import ( "github.com/hashicorp/hcl/v2/hcldec" - "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/zclconf/go-cty/cty" ) diff --git a/datasource/amazon/secretsmanager/data.go b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.go similarity index 97% rename from datasource/amazon/secretsmanager/data.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.go index e28ff4b8f..fd31e2a7b 100644 --- a/datasource/amazon/secretsmanager/data.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.go @@ -10,11 +10,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" + "github.com/hashicorp/packer-plugin-amazon/builder/common/awserrors" "github.com/hashicorp/packer-plugin-sdk/hcl2helper" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/config" - awscommon "github.com/hashicorp/packer/builder/amazon/common" - "github.com/hashicorp/packer/builder/amazon/common/awserrors" "github.com/zclconf/go-cty/cty" ) diff --git a/datasource/amazon/secretsmanager/data.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.hcl2spec.go similarity index 99% rename from datasource/amazon/secretsmanager/data.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.hcl2spec.go index 6100a97bb..9aafdc283 100644 --- a/datasource/amazon/secretsmanager/data.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/datasource/secretsmanager/data.hcl2spec.go @@ -4,7 +4,7 @@ package secretsmanager import ( "github.com/hashicorp/hcl/v2/hcldec" - "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/zclconf/go-cty/cty" ) diff --git a/post-processor/amazon-import/post-processor.go b/vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.go similarity index 99% rename from post-processor/amazon-import/post-processor.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.go index 30a8e1c90..139bd1547 100644 --- a/post-processor/amazon-import/post-processor.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.go @@ -15,12 +15,12 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/hashicorp/hcl/v2/hcldec" + awscommon "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/hashicorp/packer-plugin-sdk/common" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/retry" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - awscommon "github.com/hashicorp/packer/builder/amazon/common" ) const BuilderId = "packer.post-processor.amazon-import" diff --git a/post-processor/amazon-import/post-processor.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.hcl2spec.go similarity index 99% rename from post-processor/amazon-import/post-processor.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.hcl2spec.go index f8ae6ad76..084da4ac4 100644 --- a/post-processor/amazon-import/post-processor.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-amazon/post-processor/import/post-processor.hcl2spec.go @@ -4,7 +4,7 @@ package amazonimport import ( "github.com/hashicorp/hcl/v2/hcldec" - "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer-plugin-amazon/builder/common" "github.com/zclconf/go-cty/cty" ) diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go index 8d177f151..ededc5f37 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go @@ -33,14 +33,25 @@ func getConversion(in cty.Type, out cty.Type, unsafe bool) conversion { // Conversion to DynamicPseudoType always just passes through verbatim. return in, nil } - if !in.IsKnown() { - return cty.UnknownVal(out), nil - } - if in.IsNull() { - // We'll pass through nulls, albeit type converted, and let - // the caller deal with whatever handling they want to do in - // case null values are considered valid in some applications. - return cty.NullVal(out), nil + if isKnown, isNull := in.IsKnown(), in.IsNull(); !isKnown || isNull { + // Avoid constructing unknown or null values with types which + // include optional attributes. Known or non-null object values + // will be passed to a conversion function which drops the optional + // attributes from the type. Unknown and null pass through values + // must do the same to ensure that homogeneous collections have a + // single element type. + out = out.WithoutOptionalAttributesDeep() + + if !isKnown { + return cty.UnknownVal(out), nil + } + + if isNull { + // We'll pass through nulls, albeit type converted, and let + // the caller deal with whatever handling they want to do in + // case null values are considered valid in some applications. + return cty.NullVal(out), nil + } } return conv(in, path) diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go index 2207df9e4..e70b0184c 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go @@ -45,12 +45,18 @@ func conversionCollectionToList(ety cty.Type, conv conversion) conversion { } if len(elems) == 0 { + // Prefer a concrete type over a dynamic type when returning an + // empty list if ety == cty.DynamicPseudoType { - ety = val.Type().ElementType() + return cty.ListValEmpty(val.Type().ElementType()), nil } return cty.ListValEmpty(ety), nil } + if !cty.CanListVal(elems) { + return cty.NilVal, path.NewErrorf("element types must all match for conversion to list") + } + return cty.ListVal(elems), nil } } @@ -91,11 +97,15 @@ func conversionCollectionToSet(ety cty.Type, conv conversion) conversion { // Prefer a concrete type over a dynamic type when returning an // empty set if ety == cty.DynamicPseudoType { - ety = val.Type().ElementType() + return cty.SetValEmpty(val.Type().ElementType()), nil } return cty.SetValEmpty(ety), nil } + if !cty.CanSetVal(elems) { + return cty.NilVal, path.NewErrorf("element types must all match for conversion to set") + } + return cty.SetVal(elems), nil } } @@ -140,7 +150,7 @@ func conversionCollectionToMap(ety cty.Type, conv conversion) conversion { // Prefer a concrete type over a dynamic type when returning an // empty map if ety == cty.DynamicPseudoType { - ety = val.Type().ElementType() + return cty.MapValEmpty(val.Type().ElementType()), nil } return cty.MapValEmpty(ety), nil } @@ -152,8 +162,8 @@ func conversionCollectionToMap(ety cty.Type, conv conversion) conversion { } } - if err := conversionCheckMapElementTypes(elems, path); err != nil { - return cty.NilVal, err + if !cty.CanMapVal(elems) { + return cty.NilVal, path.NewErrorf("element types must all match for conversion to map") } return cty.MapVal(elems), nil @@ -237,6 +247,10 @@ func conversionTupleToSet(tupleType cty.Type, setEty cty.Type, unsafe bool) conv i++ } + if !cty.CanSetVal(elems) { + return cty.NilVal, path.NewErrorf("element types must all match for conversion to set") + } + return cty.SetVal(elems), nil } } @@ -324,6 +338,11 @@ func conversionTupleToList(tupleType cty.Type, listEty cty.Type, unsafe bool) co if err != nil { return cty.NilVal, err } + + if !cty.CanListVal(elems) { + return cty.NilVal, path.NewErrorf("element types must all match for conversion to list") + } + return cty.ListVal(elems), nil } } @@ -402,8 +421,8 @@ func conversionObjectToMap(objectType cty.Type, mapEty cty.Type, unsafe bool) co } } - if err := conversionCheckMapElementTypes(elems, path); err != nil { - return cty.NilVal, err + if !cty.CanMapVal(elems) { + return cty.NilVal, path.NewErrorf("attribute types must all match for conversion to map") } return cty.MapVal(elems), nil @@ -487,7 +506,7 @@ func conversionUnifyCollectionElements(elems map[string]cty.Value, path cty.Path } unifiedType, _ := unify(elemTypes, unsafe) if unifiedType == cty.NilType { - return nil, path.NewErrorf("collection elements cannot be unified") + return nil, path.NewErrorf("cannot find a common base type for all elements") } unifiedElems := make(map[string]cty.Value) @@ -514,26 +533,6 @@ func conversionUnifyCollectionElements(elems map[string]cty.Value, path cty.Path return unifiedElems, nil } -func conversionCheckMapElementTypes(elems map[string]cty.Value, path cty.Path) error { - elementType := cty.NilType - elemPath := append(path.Copy(), nil) - - for name, elem := range elems { - if elementType == cty.NilType { - elementType = elem.Type() - continue - } - if !elementType.Equals(elem.Type()) { - elemPath[len(elemPath)-1] = cty.IndexStep{ - Key: cty.StringVal(name), - } - return elemPath.NewErrorf("%s is required", elementType.FriendlyName()) - } - } - - return nil -} - func conversionUnifyListElements(elems []cty.Value, path cty.Path, unsafe bool) ([]cty.Value, error) { elemTypes := make([]cty.Type, len(elems)) for i, elem := range elems { @@ -541,7 +540,7 @@ func conversionUnifyListElements(elems []cty.Value, path cty.Path, unsafe bool) } unifiedType, _ := unify(elemTypes, unsafe) if unifiedType == cty.NilType { - return nil, path.NewErrorf("collection elements cannot be unified") + return nil, path.NewErrorf("cannot find a common base type for all elements") } ret := make([]cty.Value, len(elems)) diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go b/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go index 0bd0cffa1..5c1e114d9 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go @@ -84,6 +84,10 @@ func mismatchMessageObjects(got, want cty.Type) string { continue } + if gotAty.Equals(wantAty) { + continue // exact match, so no problem + } + // We'll now try to convert these attributes in isolation and // see if we have a nested conversion error to report. // We'll try an unsafe conversion first, and then fall back on diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/unify.go b/vendor/github.com/zclconf/go-cty/cty/convert/unify.go index ee171d1ed..144acd851 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/unify.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/unify.go @@ -29,6 +29,8 @@ func unify(types []cty.Type, unsafe bool) (cty.Type, []Conversion) { // unification purposes. { mapCt := 0 + listCt := 0 + setCt := 0 objectCt := 0 tupleCt := 0 dynamicCt := 0 @@ -36,6 +38,10 @@ func unify(types []cty.Type, unsafe bool) (cty.Type, []Conversion) { switch { case ty.IsMapType(): mapCt++ + case ty.IsListType(): + listCt++ + case ty.IsSetType(): + setCt++ case ty.IsObjectType(): objectCt++ case ty.IsTupleType(): @@ -48,7 +54,31 @@ func unify(types []cty.Type, unsafe bool) (cty.Type, []Conversion) { } switch { case mapCt > 0 && (mapCt+dynamicCt) == len(types): - return unifyMapTypes(types, unsafe, dynamicCt > 0) + return unifyCollectionTypes(cty.Map, types, unsafe, dynamicCt > 0) + + case mapCt > 0 && (mapCt+objectCt+dynamicCt) == len(types): + // Objects often contain map data, but are not directly typed as + // such due to language constructs or function types. Try to unify + // them as maps first before falling back to heterogeneous type + // conversion. + ty, convs := unifyObjectsAsMaps(types, unsafe) + // If we got a map back, we know the unification was successful. + if ty.IsMapType() { + return ty, convs + } + case listCt > 0 && (listCt+dynamicCt) == len(types): + return unifyCollectionTypes(cty.List, types, unsafe, dynamicCt > 0) + case listCt > 0 && (listCt+tupleCt+dynamicCt) == len(types): + // Tuples are often lists in disguise, and we may be able to + // unify them as such. + ty, convs := unifyTuplesAsList(types, unsafe) + // if we got a list back, we know the unification was successful. + // Otherwise we will fall back to the heterogeneous type codepath. + if ty.IsListType() { + return ty, convs + } + case setCt > 0 && (setCt+dynamicCt) == len(types): + return unifyCollectionTypes(cty.Set, types, unsafe, dynamicCt > 0) case objectCt > 0 && (objectCt+dynamicCt) == len(types): return unifyObjectTypes(types, unsafe, dynamicCt > 0) case tupleCt > 0 && (tupleCt+dynamicCt) == len(types): @@ -100,7 +130,121 @@ Preferences: return cty.NilType, nil } -func unifyMapTypes(types []cty.Type, unsafe bool, hasDynamic bool) (cty.Type, []Conversion) { +// unifyTuplesAsList attempts to first see if the tuples unify as lists, then +// re-unifies the given types with the list in place of the tuples. +func unifyTuplesAsList(types []cty.Type, unsafe bool) (cty.Type, []Conversion) { + var tuples []cty.Type + var tupleIdxs []int + for i, t := range types { + if t.IsTupleType() { + tuples = append(tuples, t) + tupleIdxs = append(tupleIdxs, i) + } + } + + ty, tupleConvs := unifyTupleTypesToList(tuples, unsafe) + if !ty.IsListType() { + return cty.NilType, nil + } + + // the tuples themselves unified as a list, get the overall + // unification with this list type instead of the tuple. + // make a copy of the types, so we can fallback to the standard + // codepath if something went wrong + listed := make([]cty.Type, len(types)) + copy(listed, types) + for _, idx := range tupleIdxs { + listed[idx] = ty + } + + newTy, convs := unify(listed, unsafe) + if !newTy.IsListType() { + return cty.NilType, nil + } + + // we have a good conversion, wrap the nested tuple conversions. + // We know the tuple conversion is not nil, because we went from tuple to + // list + for i, idx := range tupleIdxs { + listConv := convs[idx] + tupleConv := tupleConvs[i] + + if listConv == nil { + convs[idx] = tupleConv + continue + } + + convs[idx] = func(in cty.Value) (out cty.Value, err error) { + out, err = tupleConv(in) + if err != nil { + return out, err + } + + return listConv(in) + } + } + + return newTy, convs +} + +// unifyObjectsAsMaps attempts to first see if the objects unify as maps, then +// re-unifies the given types with the map in place of the objects. +func unifyObjectsAsMaps(types []cty.Type, unsafe bool) (cty.Type, []Conversion) { + var objs []cty.Type + var objIdxs []int + for i, t := range types { + if t.IsObjectType() { + objs = append(objs, t) + objIdxs = append(objIdxs, i) + } + } + + ty, objConvs := unifyObjectTypesToMap(objs, unsafe) + if !ty.IsMapType() { + return cty.NilType, nil + } + + // the objects themselves unified as a map, get the overall + // unification with this map type instead of the object. + // Make a copy of the types, so we can fallback to the standard codepath if + // something went wrong without changing the original types. + mapped := make([]cty.Type, len(types)) + copy(mapped, types) + for _, idx := range objIdxs { + mapped[idx] = ty + } + + newTy, convs := unify(mapped, unsafe) + if !newTy.IsMapType() { + return cty.NilType, nil + } + + // we have a good conversion, so wrap the nested object conversions. + // We know the object conversion is not nil, because we went from object to + // map. + for i, idx := range objIdxs { + mapConv := convs[idx] + objConv := objConvs[i] + + if mapConv == nil { + convs[idx] = objConv + continue + } + + convs[idx] = func(in cty.Value) (out cty.Value, err error) { + out, err = objConv(in) + if err != nil { + return out, err + } + + return mapConv(in) + } + } + + return newTy, convs +} + +func unifyCollectionTypes(collectionType func(cty.Type) cty.Type, types []cty.Type, unsafe bool, hasDynamic bool) (cty.Type, []Conversion) { // If we had any dynamic types in the input here then we can't predict // what path we'll take through here once these become known types, so // we'll conservatively produce DynamicVal for these. @@ -117,7 +261,7 @@ func unifyMapTypes(types []cty.Type, unsafe bool, hasDynamic bool) (cty.Type, [] return cty.NilType, nil } - retTy := cty.Map(retElemType) + retTy := collectionType(retElemType) conversions := make([]Conversion, len(types)) for i, ty := range types { diff --git a/vendor/github.com/zclconf/go-cty/cty/function/function.go b/vendor/github.com/zclconf/go-cty/cty/function/function.go index efc83ad76..c00a0e7f8 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/function.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/function.go @@ -142,7 +142,7 @@ func (f Function) ReturnTypeForValues(args []cty.Value) (ty cty.Type, err error) for i, spec := range f.spec.Params { val := posArgs[i] - if val.IsMarked() && !spec.AllowMarked { + if val.ContainsMarked() && !spec.AllowMarked { // During type checking we just unmark values and discard their // marks, under the assumption that during actual execution of // the function we'll do similarly and then re-apply the marks @@ -150,7 +150,7 @@ func (f Function) ReturnTypeForValues(args []cty.Value) (ty cty.Type, err error) // inspects values (rather than just types) in its Type // implementation can potentially fail to take into account marks, // unless it specifically opts in to seeing them. - unmarked, _ := val.Unmark() + unmarked, _ := val.UnmarkDeep() newArgs := make([]cty.Value, len(args)) copy(newArgs, args) newArgs[i] = unmarked @@ -183,9 +183,9 @@ func (f Function) ReturnTypeForValues(args []cty.Value) (ty cty.Type, err error) for i, val := range varArgs { realI := i + len(posArgs) - if val.IsMarked() && !spec.AllowMarked { + if val.ContainsMarked() && !spec.AllowMarked { // See the similar block in the loop above for what's going on here. - unmarked, _ := val.Unmark() + unmarked, _ := val.UnmarkDeep() newArgs := make([]cty.Value, len(args)) copy(newArgs, args) newArgs[realI] = unmarked diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go index bef53407d..230b03af5 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go @@ -251,6 +251,10 @@ var CoalesceListFunc = function.New(&function.Spec{ return cty.UnknownVal(retType), nil } + if arg.IsNull() { + continue + } + if arg.LengthInt() > 0 { return arg, nil } @@ -758,16 +762,10 @@ var MergeFunc = function.New(&function.Spec{ Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) { outputMap := make(map[string]cty.Value) - // if all inputs are null, return a null value rather than an object - // with null attributes - allNull := true for _, arg := range args { if arg.IsNull() { continue - } else { - allNull = false } - for it := arg.ElementIterator(); it.Next(); { k, v := it.Element() outputMap[k.AsString()] = v @@ -775,8 +773,6 @@ var MergeFunc = function.New(&function.Spec{ } switch { - case allNull: - return cty.NullVal(retType), nil case retType.IsMapType(): if len(outputMap) == 0 { return cty.MapValEmpty(retType.ElementType()), nil diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go index b95c347f5..63881f585 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go @@ -6,7 +6,7 @@ import ( "math/big" "strings" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/string.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/string.go index 01ebc47fd..43182dd5a 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/string.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/string.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/apparentlymart/go-textseg/v12/textseg" + "github.com/apparentlymart/go-textseg/v13/textseg" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" @@ -151,7 +151,6 @@ var SubstrFunc = function.New(&function.Spec{ return cty.StringVal(""), nil } - sub := in pos := 0 var i int diff --git a/vendor/github.com/zclconf/go-cty/cty/object_type.go b/vendor/github.com/zclconf/go-cty/cty/object_type.go index 0c67d4ecd..e6bbab4a8 100644 --- a/vendor/github.com/zclconf/go-cty/cty/object_type.go +++ b/vendor/github.com/zclconf/go-cty/cty/object_type.go @@ -112,7 +112,7 @@ func (t typeObject) GoString() string { return "cty.EmptyObject" } if len(t.AttrOptional) > 0 { - opt := make([]string, len(t.AttrOptional)) + var opt []string for k := range t.AttrOptional { opt = append(opt, k) } diff --git a/vendor/github.com/zclconf/go-cty/cty/type.go b/vendor/github.com/zclconf/go-cty/cty/type.go index 5f7813e83..440690853 100644 --- a/vendor/github.com/zclconf/go-cty/cty/type.go +++ b/vendor/github.com/zclconf/go-cty/cty/type.go @@ -36,6 +36,9 @@ func (t typeImplSigil) isTypeImpl() typeImplSigil { // Equals returns true if the other given Type exactly equals the receiver // type. func (t Type) Equals(other Type) bool { + if t == NilType || other == NilType { + return t == other + } return t.typeImpl.Equals(other) } @@ -112,6 +115,44 @@ func (t Type) HasDynamicTypes() bool { } } +// WithoutOptionalAttributesDeep returns a type equivalent to the receiver but +// with any objects with optional attributes converted into fully concrete +// object types. This operation is applied recursively. +func (t Type) WithoutOptionalAttributesDeep() Type { + switch { + case t == DynamicPseudoType, t.IsPrimitiveType(), t.IsCapsuleType(): + return t + case t.IsMapType(): + return Map(t.ElementType().WithoutOptionalAttributesDeep()) + case t.IsListType(): + return List(t.ElementType().WithoutOptionalAttributesDeep()) + case t.IsSetType(): + return Set(t.ElementType().WithoutOptionalAttributesDeep()) + case t.IsTupleType(): + originalElemTypes := t.TupleElementTypes() + elemTypes := make([]Type, len(originalElemTypes)) + for i, et := range originalElemTypes { + elemTypes[i] = et.WithoutOptionalAttributesDeep() + } + return Tuple(elemTypes) + case t.IsObjectType(): + originalAttrTypes := t.AttributeTypes() + attrTypes := make(map[string]Type, len(originalAttrTypes)) + for k, t := range originalAttrTypes { + attrTypes[k] = t.WithoutOptionalAttributesDeep() + } + + // This is the subtle line which does all the work of this function: by + // constructing a new Object type with these attribute types, we drop + // the list of optional attributes (if present). This results in a + // concrete Object type which requires all of the original attributes. + return Object(attrTypes) + default: + // Should never happen, since above should be exhaustive + panic("WithoutOptionalAttributesDeep does not support the given type") + } +} + type friendlyTypeNameMode rune const ( diff --git a/vendor/github.com/zclconf/go-cty/cty/value_init.go b/vendor/github.com/zclconf/go-cty/cty/value_init.go index fc2d7b6fb..25ee0b678 100644 --- a/vendor/github.com/zclconf/go-cty/cty/value_init.go +++ b/vendor/github.com/zclconf/go-cty/cty/value_init.go @@ -186,6 +186,20 @@ func ListValEmpty(element Type) Value { } } +// CanListVal returns false if the given Values can not be coalesced +// into a single List due to inconsistent element types. +func CanListVal(vals []Value) bool { + elementType := DynamicPseudoType + for _, val := range vals { + if elementType == DynamicPseudoType { + elementType = val.ty + } else if val.ty != DynamicPseudoType && !elementType.Equals(val.ty) { + return false + } + } + return true +} + // MapVal returns a Value of a map type whose element type is defined by // the types of the given values, which must be homogenous. // @@ -227,6 +241,20 @@ func MapValEmpty(element Type) Value { } } +// CanMapVal returns false if the given Values can not be coalesced into a +// single Map due to inconsistent element types. +func CanMapVal(vals map[string]Value) bool { + elementType := DynamicPseudoType + for _, val := range vals { + if elementType == DynamicPseudoType { + elementType = val.ty + } else if val.ty != DynamicPseudoType && !elementType.Equals(val.ty) { + return false + } + } + return true +} + // SetVal returns a Value of set type whose element type is defined by // the types of the given values, which must be homogenous. // @@ -267,6 +295,26 @@ func SetVal(vals []Value) Value { }.WithMarks(markSets...) } +// CanSetVal returns false if the given Values can not be coalesced +// into a single Set due to inconsistent element types. +func CanSetVal(vals []Value) bool { + elementType := DynamicPseudoType + var markSets []ValueMarks + + for _, val := range vals { + if unmarkedVal, marks := val.UnmarkDeep(); len(marks) > 0 { + val = unmarkedVal + markSets = append(markSets, marks) + } + if elementType == DynamicPseudoType { + elementType = val.ty + } else if val.ty != DynamicPseudoType && !elementType.Equals(val.ty) { + return false + } + } + return true +} + // SetValFromValueSet returns a Value of set type based on an already-constructed // ValueSet. // diff --git a/vendor/github.com/zclconf/go-cty/cty/value_ops.go b/vendor/github.com/zclconf/go-cty/cty/value_ops.go index 348fd227c..b33cc4f47 100644 --- a/vendor/github.com/zclconf/go-cty/cty/value_ops.go +++ b/vendor/github.com/zclconf/go-cty/cty/value_ops.go @@ -596,8 +596,25 @@ func (val Value) Multiply(other Value) Value { return *shortCircuit } - ret := new(big.Float) + // find the larger precision of the arguments + resPrec := val.v.(*big.Float).Prec() + otherPrec := other.v.(*big.Float).Prec() + if otherPrec > resPrec { + resPrec = otherPrec + } + + // make sure we have enough precision for the product + ret := new(big.Float).SetPrec(512) ret.Mul(val.v.(*big.Float), other.v.(*big.Float)) + + // now reduce the precision back to the greater argument, or the minimum + // required by the product. + minPrec := ret.MinPrec() + if minPrec > resPrec { + resPrec = minPrec + } + ret.SetPrec(resPrec) + return NumberVal(ret) } @@ -669,11 +686,14 @@ func (val Value) Modulo(other Value) Value { // FIXME: This is a bit clumsy. Should come back later and see if there's a // more straightforward way to do this. rat := val.Divide(other) - ratFloorInt := &big.Int{} - rat.v.(*big.Float).Int(ratFloorInt) - work := (&big.Float{}).SetInt(ratFloorInt) + ratFloorInt, _ := rat.v.(*big.Float).Int(nil) + + // start with a copy of the original larger value so that we do not lose + // precision. + v := val.v.(*big.Float) + work := new(big.Float).Copy(v).SetInt(ratFloorInt) work.Mul(other.v.(*big.Float), work) - work.Sub(val.v.(*big.Float), work) + work.Sub(v, work) return NumberVal(work) } diff --git a/vendor/golang.org/x/sys/cpu/cpu_aix.go b/vendor/golang.org/x/sys/cpu/cpu_aix.go index 464a209cf..28b521643 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_aix.go +++ b/vendor/golang.org/x/sys/cpu/cpu_aix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix // +build aix package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go index 7f7f272a0..ccf542a73 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc // +build gc package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go index 75a955661..0af2f2484 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc // +build gc package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go index 4adb89cf9..fa7cdb9bc 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (386 || amd64 || amd64p32) && gc // +build 386 amd64 amd64p32 // +build gc diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go index 53ca8d65c..2aff31891 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gccgo // +build gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go index aa986f778..4bfbda619 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gccgo // +build gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go index ba49b91bd..8478a6d59 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (386 || amd64 || amd64p32) && gccgo // +build 386 amd64 amd64p32 // +build gccgo diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go index 6fc874f7f..159a686f6 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !386 && !amd64 && !amd64p32 && !arm64 // +build !386,!amd64,!amd64p32,!arm64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go index 5a4189005..6000db4cd 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go index 42b5d33cb..f4992b1a5 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x // +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go index 99f8a6399..021356d6d 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le diff --git a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go index 57b5b677d..f4063c664 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build mips64 || mips64le // +build mips64 mips64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go index cfc1946b7..07c4e36d8 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build mips || mipsle // +build mips mipsle package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go index b412efc1b..d7b4fb4cc 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !linux && arm // +build !linux,arm package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go index 16c1c4090..f8c484f58 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !linux,!netbsd -// +build arm64 +//go:build !linux && !netbsd && arm64 +// +build !linux,!netbsd,arm64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go index f49fad677..0dafe9644 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !linux && (mips64 || mips64le) // +build !linux // +build mips64 mips64le diff --git a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go index d28d675b5..4e8acd165 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build ppc64 || ppc64le // +build ppc64 ppc64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go index 8b08de341..bd6c128af 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build riscv64 // +build riscv64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/vendor/golang.org/x/sys/cpu/cpu_wasm.go index 5382f2a22..7747d888a 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_wasm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_wasm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build wasm // +build wasm package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index 48d429331..fd380c0a7 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 || amd64 || amd64p32 // +build 386 amd64 amd64p32 package cpu diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go index 76fbe40b7..a864f24d7 100644 --- a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go +++ b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go @@ -8,8 +8,8 @@ // Morever, this file will be used during the building of // gccgo's libgo and thus must not used a CGo method. -// +build aix -// +build gccgo +//go:build aix && gccgo +// +build aix,gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go index 5b427d67e..904be42ff 100644 --- a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go +++ b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go @@ -6,8 +6,8 @@ // system call on AIX without depending on x/sys/unix. // (See golang.org/issue/32102) -// +build aix,ppc64 -// +build gc +//go:build aix && ppc64 && gc +// +build aix,ppc64,gc package cpu diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go index 951fce4d0..abc89c104 100644 --- a/vendor/golang.org/x/sys/unix/aliases.go +++ b/vendor/golang.org/x/sys/unix/aliases.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // +build go1.9 package unix diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_bsd_386.s similarity index 70% rename from vendor/golang.org/x/sys/unix/asm_freebsd_386.s rename to vendor/golang.org/x/sys/unix/asm_bsd_386.s index 49f0ac236..7f29275fa 100644 --- a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_386.s @@ -1,14 +1,14 @@ -// Copyright 2009 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || freebsd || netbsd || openbsd) && gc +// +build darwin freebsd netbsd openbsd // +build gc #include "textflag.h" -// -// System call support for 386, FreeBSD -// +// System call support for 386 BSD // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. @@ -22,7 +22,7 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40 TEXT ·Syscall9(SB),NOSPLIT,$0-52 JMP syscall·Syscall9(SB) -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s similarity index 72% rename from vendor/golang.org/x/sys/unix/asm_darwin_amd64.s rename to vendor/golang.org/x/sys/unix/asm_bsd_amd64.s index f2397fde5..2b99c349a 100644 --- a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s @@ -1,14 +1,14 @@ -// Copyright 2009 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc +// +build darwin dragonfly freebsd netbsd openbsd // +build gc #include "textflag.h" -// -// System call support for AMD64, Darwin -// +// System call support for AMD64 BSD // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s similarity index 74% rename from vendor/golang.org/x/sys/unix/asm_freebsd_arm.s rename to vendor/golang.org/x/sys/unix/asm_bsd_arm.s index 6d740db2c..98ebfad9d 100644 --- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s @@ -1,14 +1,14 @@ -// Copyright 2012 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || freebsd || netbsd || openbsd) && gc +// +build darwin freebsd netbsd openbsd // +build gc #include "textflag.h" -// -// System call support for ARM, FreeBSD -// +// System call support for ARM BSD // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s similarity index 75% rename from vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s rename to vendor/golang.org/x/sys/unix/asm_bsd_arm64.s index e57367c17..fe36a7391 100644 --- a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s @@ -1,14 +1,14 @@ -// Copyright 2009 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || freebsd || netbsd || openbsd) && gc +// +build darwin freebsd netbsd openbsd // +build gc #include "textflag.h" -// -// System call support for AMD64, NetBSD -// +// System call support for ARM64 BSD // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s deleted file mode 100644 index 8a06b87d7..000000000 --- a/vendor/golang.org/x/sys/unix/asm_darwin_386.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for 386, Darwin -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s deleted file mode 100644 index c9e6b6fc8..000000000 --- a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc -// +build arm,darwin - -#include "textflag.h" - -// -// System call support for ARM, Darwin -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - B syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - B syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - B syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - B syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s deleted file mode 100644 index 89843f8f4..000000000 --- a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc -// +build arm64,darwin - -#include "textflag.h" - -// -// System call support for AMD64, Darwin -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - B syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - B syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - B syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - B syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s deleted file mode 100644 index 27674e1ca..000000000 --- a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for AMD64, DragonFly -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s deleted file mode 100644 index f2dfc57b8..000000000 --- a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for AMD64, FreeBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s deleted file mode 100644 index a8f5a29b3..000000000 --- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for ARM64, FreeBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s deleted file mode 100644 index ae7b498d5..000000000 --- a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for 386, NetBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s deleted file mode 100644 index d7da175e1..000000000 --- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for ARM, NetBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - B syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - B syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - B syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - B syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s deleted file mode 100644 index e7cbe1904..000000000 --- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for ARM64, NetBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - B syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - B syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - B syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - B syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s deleted file mode 100644 index 2f00b0310..000000000 --- a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for 386, OpenBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s deleted file mode 100644 index 07632c99c..000000000 --- a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for AMD64, OpenBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s deleted file mode 100644 index 73e997320..000000000 --- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for ARM, OpenBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-28 - B syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-40 - B syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-52 - B syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 - B syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 - B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s deleted file mode 100644 index c47302aa4..000000000 --- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gc - -#include "textflag.h" - -// -// System call support for arm64, OpenBSD -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-56 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - JMP syscall·Syscall6(SB) - -TEXT ·Syscall9(SB),NOSPLIT,$0-104 - JMP syscall·Syscall9(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s new file mode 100644 index 000000000..3b54e1858 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s @@ -0,0 +1,426 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x && gc +// +build zos +// +build s390x +// +build gc + +#include "textflag.h" + +#define PSALAA 1208(R0) +#define GTAB64(x) 80(x) +#define LCA64(x) 88(x) +#define CAA(x) 8(x) +#define EDCHPXV(x) 1016(x) // in the CAA +#define SAVSTACK_ASYNC(x) 336(x) // in the LCA + +// SS_*, where x=SAVSTACK_ASYNC +#define SS_LE(x) 0(x) +#define SS_GO(x) 8(x) +#define SS_ERRNO(x) 16(x) +#define SS_ERRNOJR(x) 20(x) + +#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6 + +TEXT ·clearErrno(SB),NOSPLIT,$0-0 + BL addrerrno<>(SB) + MOVD $0, 0(R3) + RET + +// Returns the address of errno in R3. +TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0 + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get __errno FuncDesc. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + ADD $(0x156*16), R9 + LMG 0(R9), R5, R6 + + // Switch to saved LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Call __errno function. + LE_CALL + NOPH + + // Switch back to Go stack. + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + RET + +TEXT ·syscall_syscall(SB),NOSPLIT,$0-56 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+32(FP) + MOVD R0, r2+40(FP) + MOVD R0, err+48(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL addrerrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+48(FP) +done: + BL runtime·exitsyscall(SB) + RET + +TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56 + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+32(FP) + MOVD R0, r2+40(FP) + MOVD R0, err+48(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL addrerrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+48(FP) +done: + RET + +TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Fill in parameter list. + MOVD a4+32(FP), R12 + MOVD R12, (2176+24)(R4) + MOVD a5+40(FP), R12 + MOVD R12, (2176+32)(R4) + MOVD a6+48(FP), R12 + MOVD R12, (2176+40)(R4) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+56(FP) + MOVD R0, r2+64(FP) + MOVD R0, err+72(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL addrerrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+72(FP) +done: + BL runtime·exitsyscall(SB) + RET + +TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80 + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Fill in parameter list. + MOVD a4+32(FP), R12 + MOVD R12, (2176+24)(R4) + MOVD a5+40(FP), R12 + MOVD R12, (2176+32)(R4) + MOVD a6+48(FP), R12 + MOVD R12, (2176+40)(R4) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+56(FP) + MOVD R0, r2+64(FP) + MOVD R0, err+72(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL ·rrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+72(FP) +done: + RET + +TEXT ·syscall_syscall9(SB),NOSPLIT,$0 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Fill in parameter list. + MOVD a4+32(FP), R12 + MOVD R12, (2176+24)(R4) + MOVD a5+40(FP), R12 + MOVD R12, (2176+32)(R4) + MOVD a6+48(FP), R12 + MOVD R12, (2176+40)(R4) + MOVD a7+56(FP), R12 + MOVD R12, (2176+48)(R4) + MOVD a8+64(FP), R12 + MOVD R12, (2176+56)(R4) + MOVD a9+72(FP), R12 + MOVD R12, (2176+64)(R4) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+80(FP) + MOVD R0, r2+88(FP) + MOVD R0, err+96(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL addrerrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+96(FP) +done: + BL runtime·exitsyscall(SB) + RET + +TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0 + MOVD a1+8(FP), R1 + MOVD a2+16(FP), R2 + MOVD a3+24(FP), R3 + + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get function. + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + MOVD trap+0(FP), R5 + SLD $4, R5 + ADD R5, R9 + LMG 0(R9), R5, R6 + + // Restore LE stack. + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) + + // Fill in parameter list. + MOVD a4+32(FP), R12 + MOVD R12, (2176+24)(R4) + MOVD a5+40(FP), R12 + MOVD R12, (2176+32)(R4) + MOVD a6+48(FP), R12 + MOVD R12, (2176+40)(R4) + MOVD a7+56(FP), R12 + MOVD R12, (2176+48)(R4) + MOVD a8+64(FP), R12 + MOVD R12, (2176+56)(R4) + MOVD a9+72(FP), R12 + MOVD R12, (2176+64)(R4) + + // Call function. + LE_CALL + NOPH + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. + + MOVD R3, r1+80(FP) + MOVD R0, r2+88(FP) + MOVD R0, err+96(FP) + MOVW R3, R4 + CMP R4, $-1 + BNE done + BL addrerrno<>(SB) + MOVWZ 0(R3), R3 + MOVD R3, err+96(FP) +done: + RET + +// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) +TEXT ·svcCall(SB),NOSPLIT,$0 + BL runtime·save_g(SB) // Save g and stack pointer + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD R15, 0(R9) + + MOVD argv+8(FP), R1 // Move function arguments into registers + MOVD dsa+16(FP), g + MOVD fnptr+0(FP), R15 + + BYTE $0x0D // Branch to function + BYTE $0xEF + + BL runtime·load_g(SB) // Restore g and stack pointer + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R15 + + RET + +// func svcLoad(name *byte) unsafe.Pointer +TEXT ·svcLoad(SB),NOSPLIT,$0 + MOVD R15, R2 // Save go stack pointer + MOVD name+0(FP), R0 // Move SVC args into registers + MOVD $0x80000000, R1 + MOVD $0, R15 + BYTE $0x0A // SVC 08 LOAD + BYTE $0x08 + MOVW R15, R3 // Save return code from SVC + MOVD R2, R15 // Restore go stack pointer + CMP R3, $0 // Check SVC return code + BNE error + + MOVD $-2, R3 // Reset last bit of entry point to zero + AND R0, R3 + MOVD R3, addr+8(FP) // Return entry point returned by SVC + CMP R0, R3 // Check if last bit of entry point was set + BNE done + + MOVD R15, R2 // Save go stack pointer + MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) + BYTE $0x0A // SVC 09 DELETE + BYTE $0x09 + MOVD R2, R15 // Restore go stack pointer + +error: + MOVD $0, addr+8(FP) // Return 0 on failure +done: + XOR R0, R0 // Reset r0 to 0 + RET + +// func svcUnload(name *byte, fnptr unsafe.Pointer) int64 +TEXT ·svcUnload(SB),NOSPLIT,$0 + MOVD R15, R2 // Save go stack pointer + MOVD name+0(FP), R0 // Move SVC args into registers + MOVD addr+8(FP), R15 + BYTE $0x0A // SVC 09 + BYTE $0x09 + XOR R0, R0 // Reset r0 to 0 + MOVD R15, R1 // Save SVC return code + MOVD R2, R15 // Restore go stack pointer + MOVD R1, rc+0(FP) // Return SVC return code + RET + +// func gettid() uint64 +TEXT ·gettid(SB), NOSPLIT, $0 + // Get library control area (LCA). + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + + // Get CEECAATHDID + MOVD CAA(R8), R9 + MOVD 0x3D0(R9), R9 + MOVD R9, ret+0(FP) + + RET diff --git a/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/golang.org/x/sys/unix/cap_freebsd.go index df5204877..0b7c6adb8 100644 --- a/vendor/golang.org/x/sys/unix/cap_freebsd.go +++ b/vendor/golang.org/x/sys/unix/cap_freebsd.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build freebsd // +build freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go index 3a6ac648d..394a3965b 100644 --- a/vendor/golang.org/x/sys/unix/constants.go +++ b/vendor/golang.org/x/sys/unix/constants.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go index 5e5fb4510..65a998508 100644 --- a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix -// +build ppc +//go:build aix && ppc +// +build aix,ppc // Functions to access/create device major and minor numbers matching the // encoding used by AIX. diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go index 8b401244c..8fc08ad0a 100644 --- a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix -// +build ppc64 +//go:build aix && ppc64 +// +build aix,ppc64 // Functions to access/create device major and minor numbers matching the // encoding used AIX. diff --git a/vendor/golang.org/x/sys/unix/dev_zos.go b/vendor/golang.org/x/sys/unix/dev_zos.go new file mode 100644 index 000000000..a388e59a0 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_zos.go @@ -0,0 +1,29 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +// Functions to access/create device major and minor numbers matching the +// encoding used by z/OS. +// +// The information below is extracted and adapted from macros. + +package unix + +// Major returns the major component of a z/OS device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 16) & 0x0000FFFF) +} + +// Minor returns the minor component of a z/OS device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0x0000FFFF) +} + +// Mkdev returns a z/OS device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 16) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go index 304016b68..e74e5eaa3 100644 --- a/vendor/golang.org/x/sys/unix/dirent.go +++ b/vendor/golang.org/x/sys/unix/dirent.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go index 86781eac2..a52026557 100644 --- a/vendor/golang.org/x/sys/unix/endian_big.go +++ b/vendor/golang.org/x/sys/unix/endian_big.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 package unix diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go index 8822d8541..4362f47e2 100644 --- a/vendor/golang.org/x/sys/unix/endian_little.go +++ b/vendor/golang.org/x/sys/unix/endian_little.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh // +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh package unix diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go index 84178b0a1..29ccc4d13 100644 --- a/vendor/golang.org/x/sys/unix/env_unix.go +++ b/vendor/golang.org/x/sys/unix/env_unix.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Unix environment variables. diff --git a/vendor/golang.org/x/sys/unix/epoll_zos.go b/vendor/golang.org/x/sys/unix/epoll_zos.go new file mode 100644 index 000000000..cedaf7e02 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/epoll_zos.go @@ -0,0 +1,221 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +import ( + "sync" +) + +// This file simulates epoll on z/OS using poll. + +// Analogous to epoll_event on Linux. +// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove? +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + EPOLLERR = 0x8 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + // The following constants are part of the epoll API, but represent + // currently unsupported functionality on z/OS. + // EPOLL_CLOEXEC = 0x80000 + // EPOLLET = 0x80000000 + // EPOLLONESHOT = 0x40000000 + // EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis + // EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode + // EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability +) + +// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL +// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16). + +// epToPollEvt converts epoll event field to poll equivalent. +// In epoll, Events is a 32-bit field, while poll uses 16 bits. +func epToPollEvt(events uint32) int16 { + var ep2p = map[uint32]int16{ + EPOLLIN: POLLIN, + EPOLLOUT: POLLOUT, + EPOLLHUP: POLLHUP, + EPOLLPRI: POLLPRI, + EPOLLERR: POLLERR, + } + + var pollEvts int16 = 0 + for epEvt, pEvt := range ep2p { + if (events & epEvt) != 0 { + pollEvts |= pEvt + } + } + + return pollEvts +} + +// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields. +func pToEpollEvt(revents int16) uint32 { + var p2ep = map[int16]uint32{ + POLLIN: EPOLLIN, + POLLOUT: EPOLLOUT, + POLLHUP: EPOLLHUP, + POLLPRI: EPOLLPRI, + POLLERR: EPOLLERR, + } + + var epollEvts uint32 = 0 + for pEvt, epEvt := range p2ep { + if (revents & pEvt) != 0 { + epollEvts |= epEvt + } + } + + return epollEvts +} + +// Per-process epoll implementation. +type epollImpl struct { + mu sync.Mutex + epfd2ep map[int]*eventPoll + nextEpfd int +} + +// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances. +// On Linux, this is an in-kernel data structure accessed through a fd. +type eventPoll struct { + mu sync.Mutex + fds map[int]*EpollEvent +} + +// epoll impl for this process. +var impl epollImpl = epollImpl{ + epfd2ep: make(map[int]*eventPoll), + nextEpfd: 0, +} + +func (e *epollImpl) epollcreate(size int) (epfd int, err error) { + e.mu.Lock() + defer e.mu.Unlock() + epfd = e.nextEpfd + e.nextEpfd++ + + e.epfd2ep[epfd] = &eventPoll{ + fds: make(map[int]*EpollEvent), + } + return epfd, nil +} + +func (e *epollImpl) epollcreate1(flag int) (fd int, err error) { + return e.epollcreate(4) +} + +func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) { + e.mu.Lock() + defer e.mu.Unlock() + + ep, ok := e.epfd2ep[epfd] + if !ok { + + return EBADF + } + + switch op { + case EPOLL_CTL_ADD: + // TODO(neeilan): When we make epfds and fds disjoint, detect epoll + // loops here (instances watching each other) and return ELOOP. + if _, ok := ep.fds[fd]; ok { + return EEXIST + } + ep.fds[fd] = event + case EPOLL_CTL_MOD: + if _, ok := ep.fds[fd]; !ok { + return ENOENT + } + ep.fds[fd] = event + case EPOLL_CTL_DEL: + if _, ok := ep.fds[fd]; !ok { + return ENOENT + } + delete(ep.fds, fd) + + } + return nil +} + +// Must be called while holding ep.mu +func (ep *eventPoll) getFds() []int { + fds := make([]int, len(ep.fds)) + for fd := range ep.fds { + fds = append(fds, fd) + } + return fds +} + +func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) { + e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait + ep, ok := e.epfd2ep[epfd] + + if !ok { + e.mu.Unlock() + return 0, EBADF + } + + pollfds := make([]PollFd, 4) + for fd, epollevt := range ep.fds { + pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)}) + } + e.mu.Unlock() + + n, err = Poll(pollfds, msec) + if err != nil { + return n, err + } + + i := 0 + for _, pFd := range pollfds { + if pFd.Revents != 0 { + events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)} + i++ + } + + if i == n { + break + } + } + + return n, nil +} + +func EpollCreate(size int) (fd int, err error) { + return impl.epollcreate(size) +} + +func EpollCreate1(flag int) (fd int, err error) { + return impl.epollcreate1(flag) +} + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + return impl.epollctl(epfd, op, fd, event) +} + +// Because EpollWait mutates events, the caller is expected to coordinate +// concurrent access if calling with the same epfd from multiple goroutines. +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + return impl.epollwait(epfd, events, msec) +} diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go index 4dc534864..e9b991258 100644 --- a/vendor/golang.org/x/sys/unix/fcntl.go +++ b/vendor/golang.org/x/sys/unix/fcntl.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build dragonfly || freebsd || linux || netbsd || openbsd // +build dragonfly freebsd linux netbsd openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go index 8db48e5e0..cb0dfbd09 100644 --- a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go +++ b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) // +build linux,386 linux,arm linux,mips linux,mipsle package unix diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go index b27be0a01..b1e07b220 100644 --- a/vendor/golang.org/x/sys/unix/fdset.go +++ b/vendor/golang.org/x/sys/unix/fdset.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/vendor/golang.org/x/sys/unix/fstatfs_zos.go new file mode 100644 index 000000000..e377cc9f4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/fstatfs_zos.go @@ -0,0 +1,164 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +import ( + "unsafe" +) + +// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent. + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + var stat_v Statvfs_t + err = Fstatvfs(fd, &stat_v) + if err == nil { + // populate stat + stat.Type = 0 + stat.Bsize = stat_v.Bsize + stat.Blocks = stat_v.Blocks + stat.Bfree = stat_v.Bfree + stat.Bavail = stat_v.Bavail + stat.Files = stat_v.Files + stat.Ffree = stat_v.Ffree + stat.Fsid = stat_v.Fsid + stat.Namelen = stat_v.Namemax + stat.Frsize = stat_v.Frsize + stat.Flags = stat_v.Flag + for passn := 0; passn < 5; passn++ { + switch passn { + case 0: + err = tryGetmntent64(stat) + break + case 1: + err = tryGetmntent128(stat) + break + case 2: + err = tryGetmntent256(stat) + break + case 3: + err = tryGetmntent512(stat) + break + case 4: + err = tryGetmntent1024(stat) + break + default: + break + } + //proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred) + if err == nil || err != nil && err != ERANGE { + break + } + } + } + return err +} + +func tryGetmntent64(stat *Statfs_t) (err error) { + var mnt_ent_buffer struct { + header W_Mnth + filesys_info [64]W_Mntent + } + var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) + fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) + if err != nil { + return err + } + err = ERANGE //return ERANGE if no match is found in this batch + for i := 0; i < fs_count; i++ { + if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { + stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) + err = nil + break + } + } + return err +} + +func tryGetmntent128(stat *Statfs_t) (err error) { + var mnt_ent_buffer struct { + header W_Mnth + filesys_info [128]W_Mntent + } + var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) + fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) + if err != nil { + return err + } + err = ERANGE //return ERANGE if no match is found in this batch + for i := 0; i < fs_count; i++ { + if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { + stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) + err = nil + break + } + } + return err +} + +func tryGetmntent256(stat *Statfs_t) (err error) { + var mnt_ent_buffer struct { + header W_Mnth + filesys_info [256]W_Mntent + } + var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) + fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) + if err != nil { + return err + } + err = ERANGE //return ERANGE if no match is found in this batch + for i := 0; i < fs_count; i++ { + if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { + stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) + err = nil + break + } + } + return err +} + +func tryGetmntent512(stat *Statfs_t) (err error) { + var mnt_ent_buffer struct { + header W_Mnth + filesys_info [512]W_Mntent + } + var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) + fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) + if err != nil { + return err + } + err = ERANGE //return ERANGE if no match is found in this batch + for i := 0; i < fs_count; i++ { + if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { + stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) + err = nil + break + } + } + return err +} + +func tryGetmntent1024(stat *Statfs_t) (err error) { + var mnt_ent_buffer struct { + header W_Mnth + filesys_info [1024]W_Mntent + } + var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) + fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) + if err != nil { + return err + } + err = ERANGE //return ERANGE if no match is found in this batch + for i := 0; i < fs_count; i++ { + if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { + stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) + err = nil + break + } + } + return err +} diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go index 86032c11e..0dee23222 100644 --- a/vendor/golang.org/x/sys/unix/gccgo.go +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build gccgo -// +build !aix +//go:build gccgo && !aix +// +build gccgo,!aix package unix diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go index 251a977a8..e60e49a3d 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gccgo && linux && amd64 // +build gccgo,linux,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go index 564167861..6c7ad052e 100644 --- a/vendor/golang.org/x/sys/unix/ioctl.go +++ b/vendor/golang.org/x/sys/unix/ioctl.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go new file mode 100644 index 000000000..5384e7d91 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go @@ -0,0 +1,74 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +import ( + "runtime" + "unsafe" +) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. +// +// To change fd's window size, the req argument should be TIOCSWINSZ. +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + // TODO: if we get the chance, remove the req parameter and + // hardcode TIOCSWINSZ. + err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) + runtime.KeepAlive(value) + return err +} + +// IoctlSetTermios performs an ioctl on fd with a *Termios. +// +// The req value is expected to be TCSETS, TCSETSW, or TCSETSF +func IoctlSetTermios(fd int, req uint, value *Termios) error { + if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) { + return ENOSYS + } + err := Tcsetattr(fd, int(req), value) + runtime.KeepAlive(value) + return err +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +// +// A few ioctl requests use the return value as an output parameter; +// for those, IoctlRetInt should be used instead of this function. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +// IoctlGetTermios performs an ioctl on fd with a *Termios. +// +// The req value is expected to be TCGETS +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + if req != TCGETS { + return &value, ENOSYS + } + err := Tcgetattr(fd, &value) + return &value, err +} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index d257fac50..d727cad19 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -199,7 +199,7 @@ illumos_amd64) mksyscall="go run mksyscall_solaris.go" mkerrors= mksysnum= - mktypes= + mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; *) echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index b8313e98a..87f9d1e35 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -65,6 +65,7 @@ includes_Darwin=' #include #include #include +#include #include #include #include @@ -114,6 +115,7 @@ includes_FreeBSD=' #include #include #include +#include #include #include #include @@ -213,6 +215,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -223,6 +226,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -299,6 +303,17 @@ struct ltchars { // Including linux/l2tp.h here causes conflicts between linux/in.h // and netinet/in.h included via net/route.h above. #define IPPROTO_L2TP 115 + +// Copied from linux/hid.h. +// Keep in sync with the size of the referenced fields. +#define _HIDIOCGRAWNAME_LEN 128 // sizeof_field(struct hid_device, name) +#define _HIDIOCGRAWPHYS_LEN 64 // sizeof_field(struct hid_device, phys) +#define _HIDIOCGRAWUNIQ_LEN 64 // sizeof_field(struct hid_device, uniq) + +#define _HIDIOCGRAWNAME HIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN) +#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN) +#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN) + ' includes_NetBSD=' @@ -446,6 +461,8 @@ ccflags="$@" $2 !~ /^EPROC_/ && $2 !~ /^EQUIV_/ && $2 !~ /^EXPR_/ && + $2 !~ /^EVIOC/ && + $2 !~ /^EV_/ && $2 ~ /^E[A-Z0-9_]+$/ || $2 ~ /^B[0-9_]+$/ || $2 ~ /^(OLD|NEW)DEV$/ || @@ -480,7 +497,7 @@ ccflags="$@" $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ || - $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ || $2 ~ /^TP_STATUS_/ || $2 ~ /^FALLOC_/ || $2 == "ICMPV6_FILTER" || @@ -570,6 +587,9 @@ ccflags="$@" $2 ~ /^W[A-Z0-9]+$/ || $2 ~/^PPPIOC/ || $2 ~ /^FAN_|FANOTIFY_/ || + $2 == "HID_MAX_DESCRIPTOR_SIZE" || + $2 ~ /^_?HIDIOC/ || + $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ || $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} $2 ~ /^__WCOREFLAG$/ {next} $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} @@ -607,6 +627,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | echo '// mkerrors.sh' "$@" echo '// Code generated by the command above; see README.md. DO NOT EDIT.' echo +echo "//go:build ${GOARCH} && ${GOOS}" echo "// +build ${GOARCH},${GOOS}" echo go tool cgo -godefs -- "$@" _const.go >_error.out diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go index bc2f3629a..53f1b4c5b 100644 --- a/vendor/golang.org/x/sys/unix/pagesize_unix.go +++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // For Unix, get the pagesize from the runtime. diff --git a/vendor/golang.org/x/sys/unix/ptrace_darwin.go b/vendor/golang.org/x/sys/unix/ptrace_darwin.go index fc568b540..463c3eff7 100644 --- a/vendor/golang.org/x/sys/unix/ptrace_darwin.go +++ b/vendor/golang.org/x/sys/unix/ptrace_darwin.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin && !ios // +build darwin,!ios package unix diff --git a/vendor/golang.org/x/sys/unix/ptrace_ios.go b/vendor/golang.org/x/sys/unix/ptrace_ios.go index 183441c9a..ed0509a01 100644 --- a/vendor/golang.org/x/sys/unix/ptrace_ios.go +++ b/vendor/golang.org/x/sys/unix/ptrace_ios.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build ios // +build ios package unix diff --git a/vendor/golang.org/x/sys/unix/race.go b/vendor/golang.org/x/sys/unix/race.go index 61712b51c..6f6c5fec5 100644 --- a/vendor/golang.org/x/sys/unix/race.go +++ b/vendor/golang.org/x/sys/unix/race.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin && race) || (linux && race) || (freebsd && race) // +build darwin,race linux,race freebsd,race package unix diff --git a/vendor/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go index ad026678c..706e1322a 100644 --- a/vendor/golang.org/x/sys/unix/race0.go +++ b/vendor/golang.org/x/sys/unix/race0.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly +//go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos +// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos package unix diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdents.go b/vendor/golang.org/x/sys/unix/readdirent_getdents.go index 3a90aa6df..4d6257569 100644 --- a/vendor/golang.org/x/sys/unix/readdirent_getdents.go +++ b/vendor/golang.org/x/sys/unix/readdirent_getdents.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd // +build aix dragonfly freebsd linux netbsd openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go index 5fdae40b3..2a4ba47c4 100644 --- a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go +++ b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin // +build darwin package unix diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index 003916ed7..453a942c5 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Socket control messages diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go index 57a0021da..0840fe4a5 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin freebsd linux netbsd openbsd solaris +//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin freebsd linux netbsd openbsd solaris zos package unix @@ -36,6 +37,10 @@ func cmsgAlignOf(salen int) int { if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" { salign = 16 } + case "zos": + // z/OS socket macros use [32-bit] sizeof(int) alignment, + // not pointer width. + salign = SizeofInt } return (salen + salign - 1) & ^(salign - 1) diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go index 17fb69868..8ba89ed86 100644 --- a/vendor/golang.org/x/sys/unix/str.go +++ b/vendor/golang.org/x/sys/unix/str.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go index ab75ef9cc..649fa8740 100644 --- a/vendor/golang.org/x/sys/unix/syscall.go +++ b/vendor/golang.org/x/sys/unix/syscall.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Package unix contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index 440815382..d8efb715f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix // +build aix // Aix system calls. @@ -251,7 +252,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { } } - bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil @@ -419,8 +420,8 @@ func (w WaitStatus) TrapCause() int { return -1 } //sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) -//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64 -//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64 +//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) @@ -439,8 +440,8 @@ func (w WaitStatus) TrapCause() int { return -1 } //sysnb Times(tms *Tms) (ticks uintptr, err error) //sysnb Umask(mask int) (oldmask int) //sysnb Uname(buf *Utsname) (err error) -//sys Unlink(path string) (err error) -//sys Unlinkat(dirfd int, path string, flags int) (err error) +//sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys write(fd int, p []byte) (n int, err error) //sys readlen(fd int, p *byte, np int) (n int, err error) = read @@ -514,7 +515,7 @@ func Munmap(b []byte) (err error) { //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) -//sysnb pipe(p *[2]_C_int) (err error) +//sysnb pipe(p *[2]_C_int) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go index b3c8e3301..e92a0be16 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix -// +build ppc +//go:build aix && ppc +// +build aix,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go index 9a6e02417..16eed1709 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix -// +build ppc64 +//go:build aix && ppc64 +// +build aix,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index bc634a280..95ac3946b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd // BSD system call wrappers shared by *BSD based systems @@ -318,7 +319,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) { return anyToSockaddr(fd, &rsa) } -//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. @@ -332,8 +333,8 @@ func GetsockoptString(fd, level, opt int) (string, error) { return string(buf[:vallen-1]), nil } -//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) -//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { @@ -626,7 +627,7 @@ func Futimes(fd int, tv []Timeval) error { return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } -//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go index b31ef0358..b0098607c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin && go1.12 && !go1.13 // +build darwin,go1.12,!go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go index ee852f1ab..5fc3cda6f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin && go1.13 // +build darwin,go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 16f9c226b..1223d7aed 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -119,7 +119,7 @@ type attrList struct { Forkattr uint32 } -//sysnb pipe(p *[2]int32) (err error) +//sysnb pipe(p *[2]int32) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -272,7 +272,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { options) } -//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) +//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error { // Darwin doesn't support SYS_UTIMENSAT @@ -320,7 +320,7 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { return err } -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} @@ -378,6 +378,15 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e return } +// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct. +// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively. +func GetsockoptXucred(fd, level, opt int) (*Xucred, error) { + x := new(Xucred) + vallen := _Socklen(SizeofXucred) + err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen) + return x, err +} + //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) /* @@ -472,8 +481,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) -//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) -//sys munmap(addr uintptr, length uintptr) (err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go index ee065fcf2..647467712 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && darwin // +build 386,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index 7a1f64a7b..b37310ce9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && darwin // +build amd64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index 9f85fd404..d51ec9963 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && darwin // +build arm64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go index f34c86c89..38bec3002 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin && go1.12 // +build darwin,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index a4f2944a2..5af108a50 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -95,7 +95,7 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } -//sysnb pipe() (r int, w int, err error) +//sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -105,16 +105,16 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (r int, w int, err error) -func Pipe2(p []int, flags int) error { +func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { return EINVAL } var pp [2]_C_int - err := pipe2(&pp, flags) - p[0] = int(pp[0]) - p[1] = int(pp[1]) + // pipe2 on dragonfly takes an fds array as an argument, but still + // returns the file descriptors. + p[0], p[1], err = pipe2(&pp, flags) return err } @@ -170,7 +170,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error { err := sysctl(mib, old, oldlen, nil, 0) @@ -337,8 +337,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) -//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) -//sys munmap(addr uintptr, length uintptr) (err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go index a6b4830ac..4e2d32120 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && dragonfly // +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index acc00c2e6..18c392cf3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -126,6 +126,15 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) } +// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct. +// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively. +func GetsockoptXucred(fd, level, opt int) (*Xucred, error) { + x := new(Xucred) + vallen := _Socklen(SizeofXucred) + err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen) + return x, err +} + func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny @@ -188,9 +197,9 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { return ENOSYS } -//sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} @@ -665,8 +674,8 @@ func PtraceSingleStep(pid int) (err error) { //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) -//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) -//sys munmap(addr uintptr, length uintptr) (err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go index 72a506ddc..342fc32b1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && freebsd // +build 386,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go index d5e376aca..a32d5aa4a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && freebsd // +build amd64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go index 4ea45bce5..1e36d39ab 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm && freebsd // +build arm,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go index aa5326db1..a09a1537b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && freebsd // +build arm64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go index 7a2d4120f..c5c58806c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_illumos.go +++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go @@ -4,11 +4,14 @@ // illumos system calls not present on Solaris. +//go:build amd64 && illumos // +build amd64,illumos package unix -import "unsafe" +import ( + "unsafe" +) func bytes2iovec(bs [][]byte) []Iovec { iovecs := make([]Iovec, len(bs)) @@ -75,3 +78,52 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { } return } + +//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) + +func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) { + var clp, datap *strbuf + if len(cl) > 0 { + clp = &strbuf{ + Len: int32(len(cl)), + Buf: (*int8)(unsafe.Pointer(&cl[0])), + } + } + if len(data) > 0 { + datap = &strbuf{ + Len: int32(len(data)), + Buf: (*int8)(unsafe.Pointer(&data[0])), + } + } + return putmsg(fd, clp, datap, flags) +} + +//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) + +func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) { + var clp, datap *strbuf + if len(cl) > 0 { + clp = &strbuf{ + Maxlen: int32(len(cl)), + Buf: (*int8)(unsafe.Pointer(&cl[0])), + } + } + if len(data) > 0 { + datap = &strbuf{ + Maxlen: int32(len(data)), + Buf: (*int8)(unsafe.Pointer(&data[0])), + } + } + + if err = getmsg(fd, clp, datap, &flags); err != nil { + return nil, nil, 0, err + } + + if len(cl) > 0 { + retCl = cl[:clp.Len] + } + if len(data) > 0 { + retData = data[:datap.Len] + } + return retCl, retData, flags, nil +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 28be1306e..44ea96e39 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -137,12 +137,61 @@ func IoctlFileClone(destFd, srcFd int) error { return ioctl(destFd, FICLONE, uintptr(srcFd)) } +type FileDedupeRange struct { + Src_offset uint64 + Src_length uint64 + Reserved1 uint16 + Reserved2 uint32 + Info []FileDedupeRangeInfo +} + +type FileDedupeRangeInfo struct { + Dest_fd int64 + Dest_offset uint64 + Bytes_deduped uint64 + Status int32 + Reserved uint32 +} + // IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the -// range of data conveyed in value with the file associated with the file -// descriptor destFd. See the ioctl_fideduperange(2) man page for details. -func IoctlFileDedupeRange(destFd int, value *FileDedupeRange) error { - err := ioctl(destFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(value))) - runtime.KeepAlive(value) +// range of data conveyed in value from the file associated with the file +// descriptor srcFd to the value.Info destinations. See the +// ioctl_fideduperange(2) man page for details. +func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error { + buf := make([]byte, SizeofRawFileDedupeRange+ + len(value.Info)*SizeofRawFileDedupeRangeInfo) + rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0])) + rawrange.Src_offset = value.Src_offset + rawrange.Src_length = value.Src_length + rawrange.Dest_count = uint16(len(value.Info)) + rawrange.Reserved1 = value.Reserved1 + rawrange.Reserved2 = value.Reserved2 + + for i := range value.Info { + rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer( + uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) + + uintptr(i*SizeofRawFileDedupeRangeInfo))) + rawinfo.Dest_fd = value.Info[i].Dest_fd + rawinfo.Dest_offset = value.Info[i].Dest_offset + rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped + rawinfo.Status = value.Info[i].Status + rawinfo.Reserved = value.Info[i].Reserved + } + + err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0]))) + + // Output + for i := range value.Info { + rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer( + uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) + + uintptr(i*SizeofRawFileDedupeRangeInfo))) + value.Info[i].Dest_fd = rawinfo.Dest_fd + value.Info[i].Dest_offset = rawinfo.Dest_offset + value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped + value.Info[i].Status = rawinfo.Status + value.Info[i].Reserved = rawinfo.Reserved + } + return err } @@ -153,6 +202,36 @@ func IoctlWatchdogKeepalive(fd int) error { return ioctl(fd, WDIOC_KEEPALIVE, 0) } +func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error { + err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value))) + runtime.KeepAlive(value) + return err +} + +func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) { + var value HIDRawDevInfo + err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlHIDGetRawName(fd int) (string, error) { + var value [_HIDIOCGRAWNAME_LEN]byte + err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0]))) + return ByteSliceToString(value[:]), err +} + +func IoctlHIDGetRawPhys(fd int) (string, error) { + var value [_HIDIOCGRAWPHYS_LEN]byte + err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0]))) + return ByteSliceToString(value[:]), err +} + +func IoctlHIDGetRawUniq(fd int) (string, error) { + var value [_HIDIOCGRAWUNIQ_LEN]byte + err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0]))) + return ByteSliceToString(value[:]), err +} + //sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) func Link(oldpath string, newpath string) (err error) { @@ -1482,8 +1561,8 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction) } -//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL -//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL +//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL +//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var msg Msghdr @@ -1798,6 +1877,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys ClockGettime(clockid int32, time *Timespec) (err error) //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) //sys Close(fd int) (err error) +//sys CloseRange(first uint, last uint, flags uint) (err error) //sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys DeleteModule(name string, flags int) (err error) //sys Dup(oldfd int) (fd int, err error) @@ -1860,8 +1940,8 @@ func Getpgrp() (pid int) { //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT -//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64 -//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) +//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64 +//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6 //sys read(fd int, p []byte) (n int, err error) //sys Removexattr(path string, attr string) (err error) @@ -1934,9 +2014,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { //sys Syncfs(fd int) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error) //sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) -//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error) -//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error) -//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) +//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error) +//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error) +//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) //sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) //sysnb Times(tms *Tms) (ticks uintptr, err error) //sysnb Umask(mask int) (oldmask int) @@ -2196,8 +2276,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { return EACCES } -//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT -//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT +//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT +//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT // fileHandle is the argument to nameToHandleAt and openByHandleAt. We // originally tried to generate it via unix/linux/types.go with "type diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index c97c2ee53..7b52e5d8a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && linux // +build 386,linux package unix @@ -31,7 +32,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { @@ -98,7 +99,7 @@ type rlimit32 struct { Max uint32 } -//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT const rlimInf32 = ^uint32(0) const rlimInf64 = ^uint64(0) @@ -129,7 +130,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT func Setrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, rlim, nil) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 72efe86ed..28b764115 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && linux // +build amd64,linux package unix @@ -138,7 +139,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go index baa771f8a..8b0f0f3aa 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64,linux -// +build gc +//go:build amd64 && linux && gc +// +build amd64,linux,gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 496837b1e..68877728e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm && linux // +build arm,linux package unix @@ -35,7 +36,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { @@ -129,8 +130,8 @@ func Utime(path string, buf *Utimbuf) error { //sys utimes(path string, times *[2]Timeval) (err error) -//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 -//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 @@ -177,7 +178,7 @@ type rlimit32 struct { Max uint32 } -//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT const rlimInf32 = ^uint32(0) const rlimInf64 = ^uint64(0) @@ -208,7 +209,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT func Setrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, rlim, nil) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index c6de6b913..7ed703476 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && linux // +build arm64,linux package unix @@ -155,7 +156,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go index 9edf3961b..2b1168d7d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && gc // +build linux,gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go index 90e33d8cf..9843fb489 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && gc && 386 // +build linux,gc,386 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go index 1a97baae7..a6008fccd 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm && gc && linux // +build arm,gc,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go index 308eb7aec..7740af242 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && gccgo && 386 // +build linux,gccgo,386 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go index aa7fc9e19..e16a12299 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && gccgo && arm // +build linux,gccgo,arm package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index f0287476c..06dec06fa 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (mips64 || mips64le) // +build linux // +build mips64 mips64le @@ -104,7 +105,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index c11328111..8f0d0a5b5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (mips || mipsle) // +build linux // +build mips mipsle @@ -112,7 +113,7 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { @@ -125,7 +126,7 @@ func Pipe2(p []int, flags int) (err error) { return } -//sysnb pipe() (p1 int, p2 int, err error) +//sysnb pipe() (p1 int, p2 int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -153,7 +154,7 @@ type rlimit32 struct { Max uint32 } -//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT func Getrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, nil, rlim) @@ -181,7 +182,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT func Setrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, rlim, nil) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 349374409..0b1f0d6da 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (ppc64 || ppc64le) // +build linux // +build ppc64 ppc64le @@ -99,7 +100,7 @@ func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } -//sysnb pipe(p *[2]_C_int) (err error) +//sysnb pipe(p *[2]_C_int) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -112,7 +113,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index b0b150556..ce9bcd317 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build riscv64 && linux // +build riscv64,linux package unix @@ -154,7 +155,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index 2363f7499..a1e45694b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build s390x && linux // +build s390x,linux package unix @@ -76,7 +77,7 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -249,7 +250,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen } func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error { - args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)} + args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen} _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index d389f1518..49055a3cf 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build sparc64 && linux // +build sparc64,linux package unix @@ -115,7 +116,7 @@ func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } -//sysnb pipe(p *[2]_C_int) (err error) +//sysnb pipe(p *[2]_C_int) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -128,7 +129,7 @@ func Pipe(p []int) (err error) { return } -//sysnb pipe2(p *[2]_C_int, flags int) (err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 1e6843b4c..853d5f0f4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -110,7 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } -//sysnb pipe() (fd1 int, fd2 int, err error) +//sysnb pipe() (fd1 int, fd2 int, err error) + func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL @@ -119,7 +120,21 @@ func Pipe(p []int) (err error) { return } -//sys Getdents(fd int, buf []byte) (n int, err error) +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) error { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err := pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return err +} + +//sys Getdents(fd int, buf []byte) (n int, err error) + func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { n, err = Getdents(fd, buf) if err != nil || basep == nil { @@ -159,7 +174,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) { var value Ptmget diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go index 24da8b524..5199d282f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && netbsd // +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go index 25a0ac825..70a9c52e9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && netbsd // +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go index 21591ecd4..3eb5942f9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm && netbsd // +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go index 804749635..fc6ccfd81 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && netbsd // +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 6a50b50bd..22b550385 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -92,7 +92,7 @@ func Pipe2(p []int, flags int) error { return err } -//sys Getdents(fd int, buf []byte) (n int, err error) +//sys Getdents(fd int, buf []byte) (n int, err error) func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { n, err = Getdents(fd, buf) if err != nil || basep == nil { @@ -154,7 +154,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go index 42b5a0e51..6baabcdcb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && openbsd // +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go index 6ea4b4883..bab25360e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && openbsd // +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go index 1c3d26fa2..8eed3c4d4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm && openbsd // +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go index a8c458cb0..483dde99d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && openbsd // +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 184786ed9..77fcde7c1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -565,7 +565,12 @@ func Minor(dev uint64) uint32 { * Expose the ioctl function */ -//sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, err = ioctlRet(fd, req, arg) + return err +} func IoctlSetTermio(fd int, req uint, value *Termio) error { err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) @@ -579,7 +584,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { return &value, err } -//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { @@ -682,6 +687,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Statvfs(path string, vfsstat *Statvfs_t) (err error) //sys Symlink(path string, link string) (err error) //sys Sync() (err error) +//sys Sysconf(which int) (n int64, err error) //sysnb Times(tms *Tms) (ticks uintptr, err error) //sys Truncate(path string, length int64) (err error) //sys Fsync(fd int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go index b22a34d7a..0bd25ef81 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && solaris // +build amd64,solaris package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 400ba9fbc..a7618ceb5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go index 87bd161ce..5898e9a52 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 // +build darwin dragonfly freebsd linux netbsd openbsd solaris -// +build gc,!ppc64le,!ppc64 +// +build gc +// +build !ppc64le +// +build !ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go index d36216c3c..f6f707acf 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && (ppc64le || ppc64) && gc // +build linux // +build ppc64le ppc64 // +build gc diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go new file mode 100644 index 000000000..13f58d2b2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -0,0 +1,1781 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +import ( + "bytes" + "runtime" + "sort" + "sync" + "syscall" + "unsafe" +) + +const ( + O_CLOEXEC = 0 // Dummy value (not supported). + AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX +) + +func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) +func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) +func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) +func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) +func syscall_syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) +func syscall_rawsyscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) + +func copyStat(stat *Stat_t, statLE *Stat_LE_t) { + stat.Dev = uint64(statLE.Dev) + stat.Ino = uint64(statLE.Ino) + stat.Nlink = uint64(statLE.Nlink) + stat.Mode = uint32(statLE.Mode) + stat.Uid = uint32(statLE.Uid) + stat.Gid = uint32(statLE.Gid) + stat.Rdev = uint64(statLE.Rdev) + stat.Size = statLE.Size + stat.Atim.Sec = int64(statLE.Atim) + stat.Atim.Nsec = 0 //zos doesn't return nanoseconds + stat.Mtim.Sec = int64(statLE.Mtim) + stat.Mtim.Nsec = 0 //zos doesn't return nanoseconds + stat.Ctim.Sec = int64(statLE.Ctim) + stat.Ctim.Nsec = 0 //zos doesn't return nanoseconds + stat.Blksize = int64(statLE.Blksize) + stat.Blocks = statLE.Blocks +} + +func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) +func svcLoad(name *byte) unsafe.Pointer +func svcUnload(name *byte, fnptr unsafe.Pointer) int64 + +func (d *Dirent) NameString() string { + if d == nil { + return "" + } + return string(d.Name[:d.Namlen]) +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet4 + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet6 + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) || n == 0 { + return nil, 0, EINVAL + } + sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { + // TODO(neeilan): Implement use of first param (fd) + switch rsa.Addr.Family { + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + sa := new(SockaddrUnix) + // For z/OS, only replace NUL with @ when the + // length is not zero. + if pp.Len != 0 && pp.Path[0] == 0 { + // "Abstract" Unix domain socket. + // Rewrite leading NUL as @ for textual display. + // (This is the standard convention.) + // Not friendly to overwrite in place, + // but the callers below don't care. + pp.Path[0] = '@' + } + + // Assume path ends at NUL. + // + // For z/OS, the length of the name is a field + // in the structure. To be on the safe side, we + // will still scan the name for a NUL but only + // to the length provided in the structure. + // + // This is not technically the Linux semantics for + // abstract Unix domain sockets--they are supposed + // to be uninterpreted fixed-size binary blobs--but + // everyone uses this convention. + n := 0 + for n < int(pp.Len) && pp.Path[n] != 0 { + n++ + } + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if err != nil { + return + } + // TODO(neeilan): Remove 0 in call + sa, err = anyToSockaddr(0, &rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = int32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = int32(length) +} + +//sys fcntl(fd int, cmd int, arg int) (val int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys write(fd int, p []byte) (n int, err error) + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP +//sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP +//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL + +//sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A +//sys Chdir(path string) (err error) = SYS___CHDIR_A +//sys Chown(path string, uid int, gid int) (err error) = SYS___CHOWN_A +//sys Chmod(path string, mode uint32) (err error) = SYS___CHMOD_A +//sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A +//sys Dup(oldfd int) (fd int, err error) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL +//sys fstat(fd int, stat *Stat_LE_t) (err error) + +func Fstat(fd int, stat *Stat_t) (err error) { + var statLE Stat_LE_t + err = fstat(fd, &statLE) + copyStat(stat, &statLE) + return +} + +//sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getpagesize() (pgsize int) = SYS_GETPAGESIZE +//sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT +//sys Msync(b []byte, flags int) (err error) = SYS_MSYNC +//sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL +//sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES +//sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT + +//sys Mount(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A +//sys Unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A +//sys Chroot(path string) (err error) = SYS___CHROOT_A +//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A + +func Ptsname(fd int) (name string, err error) { + r0, _, e1 := syscall_syscall(SYS___PTSNAME_A, uintptr(fd), 0, 0) + name = u2s(unsafe.Pointer(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func u2s(cstr unsafe.Pointer) string { + str := (*[1024]uint8)(cstr) + i := 0 + for str[i] != 0 { + i++ + } + return string(str[:i]) +} + +func Close(fd int) (err error) { + _, _, e1 := syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) + for i := 0; e1 == EAGAIN && i < 10; i++ { + _, _, _ = syscall_syscall(SYS_USLEEP, uintptr(10), 0, 0) + _, _, e1 = syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) + } + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +// Dummy function: there are no semantics for Madvise on z/OS +func Madvise(b []byte, advice int) (err error) { + return +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + +//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpid() (pid int) +//sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID + +func Getpgrp() (pid int) { + pid, _ = Getpgid(0) + return +} + +//sysnb Getppid() (pid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_GETRLIMIT + +//sysnb getrusage(who int, rusage *rusage_zos) (err error) = SYS_GETRUSAGE + +func Getrusage(who int, rusage *Rusage) (err error) { + var ruz rusage_zos + err = getrusage(who, &ruz) + //Only the first two fields of Rusage are set + rusage.Utime.Sec = ruz.Utime.Sec + rusage.Utime.Usec = int64(ruz.Utime.Usec) + rusage.Stime.Sec = ruz.Stime.Sec + rusage.Stime.Usec = int64(ruz.Stime.Usec) + return +} + +//sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID +//sysnb Getuid() (uid int) +//sysnb Kill(pid int, sig Signal) (err error) +//sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A +//sys Link(path string, link string) (err error) = SYS___LINK_A +//sys Listen(s int, n int) (err error) +//sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A + +func Lstat(path string, stat *Stat_t) (err error) { + var statLE Stat_LE_t + err = lstat(path, &statLE) + copyStat(stat, &statLE) + return +} + +//sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A +//sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A +//sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) = SYS___READLINK_A +//sys Rename(from string, to string) (err error) = SYS___RENAME_A +//sys Rmdir(path string) (err error) = SYS___RMDIR_A +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID +//sysnb Setrlimit(resource int, lim *Rlimit) (err error) +//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID +//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID +//sysnb Setsid() (pid int, err error) = SYS_SETSID +//sys Setuid(uid int) (err error) = SYS_SETUID +//sys Setgid(uid int) (err error) = SYS_SETGID +//sys Shutdown(fd int, how int) (err error) +//sys stat(path string, statLE *Stat_LE_t) (err error) = SYS___STAT_A + +func Stat(path string, sta *Stat_t) (err error) { + var statLE Stat_LE_t + err = stat(path, &statLE) + copyStat(sta, &statLE) + return +} + +//sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A +//sys Sync() = SYS_SYNC +//sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A +//sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR +//sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR +//sys Umask(mask int) (oldmask int) +//sys Unlink(path string) (err error) = SYS___UNLINK_A +//sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A + +//sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A + +func Open(path string, mode int, perm uint32) (fd int, err error) { + return open(path, mode, perm) +} + +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + wd, err := Getwd() + if err != nil { + return err + } + + if err := Fchdir(dirfd); err != nil { + return err + } + defer Chdir(wd) + + return Mkfifo(path, mode) +} + +//sys remove(path string) (err error) + +func Remove(path string) error { + return remove(path) +} + +const ImplementsGetwd = true + +func Getcwd(buf []byte) (n int, err error) { + var p unsafe.Pointer + if len(buf) > 0 { + p = unsafe.Pointer(&buf[0]) + } else { + p = unsafe.Pointer(&_zero) + } + _, _, e := syscall_syscall(SYS___GETCWD_A, uintptr(p), uintptr(len(buf)), 0) + n = clen(buf) + 1 + if e != 0 { + err = errnoErr(e) + } + return +} + +func Getwd() (wd string, err error) { + var buf [PathMax]byte + n, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + // Getcwd returns the number of bytes written to buf, including the NUL. + if n < 1 || n > len(buf) || buf[n-1] != 0 { + return "", EINVAL + } + return string(buf[0 : n-1]), nil +} + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + if err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Sanity check group count. Max is 1<<16 on Linux. + if n < 0 || n > 1<<20 { + return nil, EINVAL + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if err != nil { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +func gettid() uint64 + +func Gettid() (tid int) { + return int(gettid()) +} + +type WaitStatus uint32 + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. At least that's the idea. +// There are various irregularities. For example, the +// "continued" status is 0xFFFF, distinguishing itself +// from stopped via the core dump bit. + +const ( + mask = 0x7F + core = 0x80 + exited = 0x00 + stopped = 0x7F + shift = 8 +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } + +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } + +func (w WaitStatus) Continued() bool { return w == 0xFFFF } + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) ExitStatus() int { + if !w.Exited() { + return -1 + } + return int(w>>shift) & 0xFF +} + +func (w WaitStatus) Signal() Signal { + if !w.Signaled() { + return -1 + } + return Signal(w & mask) +} + +func (w WaitStatus) StopSignal() Signal { + if !w.Stopped() { + return -1 + } + return Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { return -1 } + +//sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want. + // At the moment rusage will not be touched. + var status _C_int + wpid, err = waitpid(pid, &status, options) + if wstatus != nil { + *wstatus = WaitStatus(status) + } + return +} + +//sysnb gettimeofday(tv *timeval_zos) (err error) + +func Gettimeofday(tv *Timeval) (err error) { + var tvz timeval_zos + err = gettimeofday(&tvz) + tv.Sec = tvz.Sec + tv.Usec = int64(tvz.Usec) + return +} + +func Time(t *Time_t) (tt Time_t, err error) { + var tv Timeval + err = Gettimeofday(&tv) + if err != nil { + return 0, err + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +func setTimespec(sec, nsec int64) Timespec { + return Timespec{Sec: sec, Nsec: nsec} +} + +func setTimeval(sec, usec int64) Timeval { //fix + return Timeval{Sec: sec, Usec: usec} +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sys utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A + +func Utimes(path string, tv []Timeval) (err error) { + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func UtimesNano(path string, ts []Timespec) error { + if len(ts) != 2 { + return EINVAL + } + // Not as efficient as it could be because Timespec and + // Timeval have different types in the different OSes + tv := [2]Timeval{ + NsecToTimeval(TimespecToNsec(ts[0])), + NsecToTimeval(TimespecToNsec(ts[1])), + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + // TODO(neeilan) : Remove this 0 ( added to get sys/unix compiling on z/OS ) + return anyToSockaddr(0, &rsa) +} + +const ( + // identifier constants + nwmHeaderIdentifier = 0xd5e6d4c8 + nwmFilterIdentifier = 0xd5e6d4c6 + nwmTCPConnIdentifier = 0xd5e6d4c3 + nwmRecHeaderIdentifier = 0xd5e6d4d9 + nwmIPStatsIdentifier = 0xd5e6d4c9d7e2e340 + nwmIPGStatsIdentifier = 0xd5e6d4c9d7c7e2e3 + nwmTCPStatsIdentifier = 0xd5e6d4e3c3d7e2e3 + nwmUDPStatsIdentifier = 0xd5e6d4e4c4d7e2e3 + nwmICMPGStatsEntry = 0xd5e6d4c9c3d4d7c7 + nwmICMPTStatsEntry = 0xd5e6d4c9c3d4d7e3 + + // nwmHeader constants + nwmVersion1 = 1 + nwmVersion2 = 2 + nwmCurrentVer = 2 + + nwmTCPConnType = 1 + nwmGlobalStatsType = 14 + + // nwmFilter constants + nwmFilterLclAddrMask = 0x20000000 // Local address + nwmFilterSrcAddrMask = 0x20000000 // Source address + nwmFilterLclPortMask = 0x10000000 // Local port + nwmFilterSrcPortMask = 0x10000000 // Source port + + // nwmConnEntry constants + nwmTCPStateClosed = 1 + nwmTCPStateListen = 2 + nwmTCPStateSynSent = 3 + nwmTCPStateSynRcvd = 4 + nwmTCPStateEstab = 5 + nwmTCPStateFinWait1 = 6 + nwmTCPStateFinWait2 = 7 + nwmTCPStateClosWait = 8 + nwmTCPStateLastAck = 9 + nwmTCPStateClosing = 10 + nwmTCPStateTimeWait = 11 + nwmTCPStateDeletTCB = 12 + + // Existing constants on linux + BPF_TCP_CLOSE = 1 + BPF_TCP_LISTEN = 2 + BPF_TCP_SYN_SENT = 3 + BPF_TCP_SYN_RECV = 4 + BPF_TCP_ESTABLISHED = 5 + BPF_TCP_FIN_WAIT1 = 6 + BPF_TCP_FIN_WAIT2 = 7 + BPF_TCP_CLOSE_WAIT = 8 + BPF_TCP_LAST_ACK = 9 + BPF_TCP_CLOSING = 10 + BPF_TCP_TIME_WAIT = 11 + BPF_TCP_NEW_SYN_RECV = -1 + BPF_TCP_MAX_STATES = -2 +) + +type nwmTriplet struct { + offset uint32 + length uint32 + number uint32 +} + +type nwmQuadruplet struct { + offset uint32 + length uint32 + number uint32 + match uint32 +} + +type nwmHeader struct { + ident uint32 + length uint32 + version uint16 + nwmType uint16 + bytesNeeded uint32 + options uint32 + _ [16]byte + inputDesc nwmTriplet + outputDesc nwmQuadruplet +} + +type nwmFilter struct { + ident uint32 + flags uint32 + resourceName [8]byte + resourceId uint32 + listenerId uint32 + local [28]byte // union of sockaddr4 and sockaddr6 + remote [28]byte // union of sockaddr4 and sockaddr6 + _ uint16 + _ uint16 + asid uint16 + _ [2]byte + tnLuName [8]byte + tnMonGrp uint32 + tnAppl [8]byte + applData [40]byte + nInterface [16]byte + dVipa [16]byte + dVipaPfx uint16 + dVipaPort uint16 + dVipaFamily byte + _ [3]byte + destXCF [16]byte + destXCFPfx uint16 + destXCFFamily byte + _ [1]byte + targIP [16]byte + targIPPfx uint16 + targIPFamily byte + _ [1]byte + _ [20]byte +} + +type nwmRecHeader struct { + ident uint32 + length uint32 + number byte + _ [3]byte +} + +type nwmTCPStatsEntry struct { + ident uint64 + currEstab uint32 + activeOpened uint32 + passiveOpened uint32 + connClosed uint32 + estabResets uint32 + attemptFails uint32 + passiveDrops uint32 + timeWaitReused uint32 + inSegs uint64 + predictAck uint32 + predictData uint32 + inDupAck uint32 + inBadSum uint32 + inBadLen uint32 + inShort uint32 + inDiscOldTime uint32 + inAllBeforeWin uint32 + inSomeBeforeWin uint32 + inAllAfterWin uint32 + inSomeAfterWin uint32 + inOutOfOrder uint32 + inAfterClose uint32 + inWinProbes uint32 + inWinUpdates uint32 + outWinUpdates uint32 + outSegs uint64 + outDelayAcks uint32 + outRsts uint32 + retransSegs uint32 + retransTimeouts uint32 + retransDrops uint32 + pmtuRetrans uint32 + pmtuErrors uint32 + outWinProbes uint32 + probeDrops uint32 + keepAliveProbes uint32 + keepAliveDrops uint32 + finwait2Drops uint32 + acceptCount uint64 + inBulkQSegs uint64 + inDiscards uint64 + connFloods uint32 + connStalls uint32 + cfgEphemDef uint16 + ephemInUse uint16 + ephemHiWater uint16 + flags byte + _ [1]byte + ephemExhaust uint32 + smcRCurrEstabLnks uint32 + smcRLnkActTimeOut uint32 + smcRActLnkOpened uint32 + smcRPasLnkOpened uint32 + smcRLnksClosed uint32 + smcRCurrEstab uint32 + smcRActiveOpened uint32 + smcRPassiveOpened uint32 + smcRConnClosed uint32 + smcRInSegs uint64 + smcROutSegs uint64 + smcRInRsts uint32 + smcROutRsts uint32 + smcDCurrEstabLnks uint32 + smcDActLnkOpened uint32 + smcDPasLnkOpened uint32 + smcDLnksClosed uint32 + smcDCurrEstab uint32 + smcDActiveOpened uint32 + smcDPassiveOpened uint32 + smcDConnClosed uint32 + smcDInSegs uint64 + smcDOutSegs uint64 + smcDInRsts uint32 + smcDOutRsts uint32 +} + +type nwmConnEntry struct { + ident uint32 + local [28]byte // union of sockaddr4 and sockaddr6 + remote [28]byte // union of sockaddr4 and sockaddr6 + startTime [8]byte // uint64, changed to prevent padding from being inserted + lastActivity [8]byte // uint64 + bytesIn [8]byte // uint64 + bytesOut [8]byte // uint64 + inSegs [8]byte // uint64 + outSegs [8]byte // uint64 + state uint16 + activeOpen byte + flag01 byte + outBuffered uint32 + inBuffered uint32 + maxSndWnd uint32 + reXmtCount uint32 + congestionWnd uint32 + ssThresh uint32 + roundTripTime uint32 + roundTripVar uint32 + sendMSS uint32 + sndWnd uint32 + rcvBufSize uint32 + sndBufSize uint32 + outOfOrderCount uint32 + lcl0WindowCount uint32 + rmt0WindowCount uint32 + dupacks uint32 + flag02 byte + sockOpt6Cont byte + asid uint16 + resourceName [8]byte + resourceId uint32 + subtask uint32 + sockOpt byte + sockOpt6 byte + clusterConnFlag byte + proto byte + targetAppl [8]byte + luName [8]byte + clientUserId [8]byte + logMode [8]byte + timeStamp uint32 + timeStampAge uint32 + serverResourceId uint32 + intfName [16]byte + ttlsStatPol byte + ttlsStatConn byte + ttlsSSLProt uint16 + ttlsNegCiph [2]byte + ttlsSecType byte + ttlsFIPS140Mode byte + ttlsUserID [8]byte + applData [40]byte + inOldestTime [8]byte // uint64 + outOldestTime [8]byte // uint64 + tcpTrustedPartner byte + _ [3]byte + bulkDataIntfName [16]byte + ttlsNegCiph4 [4]byte + smcReason uint32 + lclSMCLinkId uint32 + rmtSMCLinkId uint32 + smcStatus byte + smcFlags byte + _ [2]byte + rcvWnd uint32 + lclSMCBufSz uint32 + rmtSMCBufSz uint32 + ttlsSessID [32]byte + ttlsSessIDLen int16 + _ [1]byte + smcDStatus byte + smcDReason uint32 +} + +var svcNameTable [][]byte = [][]byte{ + []byte("\xc5\xe9\xc2\xd5\xd4\xc9\xc6\xf4"), // svc_EZBNMIF4 +} + +const ( + svc_EZBNMIF4 = 0 +) + +func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { + jobname := []byte("\x5c\x40\x40\x40\x40\x40\x40\x40") // "*" + responseBuffer := [4096]byte{0} + var bufferAlet, reasonCode uint32 = 0, 0 + var bufferLen, returnValue, returnCode int32 = 4096, 0, 0 + + dsa := [18]uint64{0} + var argv [7]unsafe.Pointer + argv[0] = unsafe.Pointer(&jobname[0]) + argv[1] = unsafe.Pointer(&responseBuffer[0]) + argv[2] = unsafe.Pointer(&bufferAlet) + argv[3] = unsafe.Pointer(&bufferLen) + argv[4] = unsafe.Pointer(&returnValue) + argv[5] = unsafe.Pointer(&returnCode) + argv[6] = unsafe.Pointer(&reasonCode) + + request := (*struct { + header nwmHeader + filter nwmFilter + })(unsafe.Pointer(&responseBuffer[0])) + + EZBNMIF4 := svcLoad(&svcNameTable[svc_EZBNMIF4][0]) + if EZBNMIF4 == nil { + return nil, errnoErr(EINVAL) + } + + // GetGlobalStats EZBNMIF4 call + request.header.ident = nwmHeaderIdentifier + request.header.length = uint32(unsafe.Sizeof(request.header)) + request.header.version = nwmCurrentVer + request.header.nwmType = nwmGlobalStatsType + request.header.options = 0x80000000 + + svcCall(EZBNMIF4, &argv[0], &dsa[0]) + + // outputDesc field is filled by EZBNMIF4 on success + if returnCode != 0 || request.header.outputDesc.offset == 0 { + return nil, errnoErr(EINVAL) + } + + // Check that EZBNMIF4 returned a nwmRecHeader + recHeader := (*nwmRecHeader)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset])) + if recHeader.ident != nwmRecHeaderIdentifier { + return nil, errnoErr(EINVAL) + } + + // Parse nwmTriplets to get offsets of returned entries + var sections []*uint64 + var sectionDesc *nwmTriplet = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[0])) + for i := uint32(0); i < uint32(recHeader.number); i++ { + offset := request.header.outputDesc.offset + uint32(unsafe.Sizeof(*recHeader)) + i*uint32(unsafe.Sizeof(*sectionDesc)) + sectionDesc = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[offset])) + for j := uint32(0); j < sectionDesc.number; j++ { + offset = request.header.outputDesc.offset + sectionDesc.offset + j*sectionDesc.length + sections = append(sections, (*uint64)(unsafe.Pointer(&responseBuffer[offset]))) + } + } + + // Find nwmTCPStatsEntry in returned entries + var tcpStats *nwmTCPStatsEntry = nil + for _, ptr := range sections { + switch *ptr { + case nwmTCPStatsIdentifier: + if tcpStats != nil { + return nil, errnoErr(EINVAL) + } + tcpStats = (*nwmTCPStatsEntry)(unsafe.Pointer(ptr)) + case nwmIPStatsIdentifier: + case nwmIPGStatsIdentifier: + case nwmUDPStatsIdentifier: + case nwmICMPGStatsEntry: + case nwmICMPTStatsEntry: + default: + return nil, errnoErr(EINVAL) + } + } + if tcpStats == nil { + return nil, errnoErr(EINVAL) + } + + // GetConnectionDetail EZBNMIF4 call + responseBuffer = [4096]byte{0} + dsa = [18]uint64{0} + bufferAlet, reasonCode = 0, 0 + bufferLen, returnValue, returnCode = 4096, 0, 0 + nameptr := (*uint32)(unsafe.Pointer(uintptr(0x21c))) // Get jobname of current process + nameptr = (*uint32)(unsafe.Pointer(uintptr(*nameptr + 12))) + argv[0] = unsafe.Pointer(uintptr(*nameptr)) + + request.header.ident = nwmHeaderIdentifier + request.header.length = uint32(unsafe.Sizeof(request.header)) + request.header.version = nwmCurrentVer + request.header.nwmType = nwmTCPConnType + request.header.options = 0x80000000 + + request.filter.ident = nwmFilterIdentifier + + var localSockaddr RawSockaddrAny + socklen := _Socklen(SizeofSockaddrAny) + err := getsockname(fd, &localSockaddr, &socklen) + if err != nil { + return nil, errnoErr(EINVAL) + } + if localSockaddr.Addr.Family == AF_INET { + localSockaddr := (*RawSockaddrInet4)(unsafe.Pointer(&localSockaddr.Addr)) + localSockFilter := (*RawSockaddrInet4)(unsafe.Pointer(&request.filter.local[0])) + localSockFilter.Family = AF_INET + var i int + for i = 0; i < 4; i++ { + if localSockaddr.Addr[i] != 0 { + break + } + } + if i != 4 { + request.filter.flags |= nwmFilterLclAddrMask + for i = 0; i < 4; i++ { + localSockFilter.Addr[i] = localSockaddr.Addr[i] + } + } + if localSockaddr.Port != 0 { + request.filter.flags |= nwmFilterLclPortMask + localSockFilter.Port = localSockaddr.Port + } + } else if localSockaddr.Addr.Family == AF_INET6 { + localSockaddr := (*RawSockaddrInet6)(unsafe.Pointer(&localSockaddr.Addr)) + localSockFilter := (*RawSockaddrInet6)(unsafe.Pointer(&request.filter.local[0])) + localSockFilter.Family = AF_INET6 + var i int + for i = 0; i < 16; i++ { + if localSockaddr.Addr[i] != 0 { + break + } + } + if i != 16 { + request.filter.flags |= nwmFilterLclAddrMask + for i = 0; i < 16; i++ { + localSockFilter.Addr[i] = localSockaddr.Addr[i] + } + } + if localSockaddr.Port != 0 { + request.filter.flags |= nwmFilterLclPortMask + localSockFilter.Port = localSockaddr.Port + } + } + + svcCall(EZBNMIF4, &argv[0], &dsa[0]) + + // outputDesc field is filled by EZBNMIF4 on success + if returnCode != 0 || request.header.outputDesc.offset == 0 { + return nil, errnoErr(EINVAL) + } + + // Check that EZBNMIF4 returned a nwmConnEntry + conn := (*nwmConnEntry)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset])) + if conn.ident != nwmTCPConnIdentifier { + return nil, errnoErr(EINVAL) + } + + // Copy data from the returned data structures into tcpInfo + // Stats from nwmConnEntry are specific to that connection. + // Stats from nwmTCPStatsEntry are global (to the interface?) + // Fields may not be an exact match. Some fields have no equivalent. + var tcpinfo TCPInfo + tcpinfo.State = uint8(conn.state) + tcpinfo.Ca_state = 0 // dummy + tcpinfo.Retransmits = uint8(tcpStats.retransSegs) + tcpinfo.Probes = uint8(tcpStats.outWinProbes) + tcpinfo.Backoff = 0 // dummy + tcpinfo.Options = 0 // dummy + tcpinfo.Rto = tcpStats.retransTimeouts + tcpinfo.Ato = tcpStats.outDelayAcks + tcpinfo.Snd_mss = conn.sendMSS + tcpinfo.Rcv_mss = conn.sendMSS // dummy + tcpinfo.Unacked = 0 // dummy + tcpinfo.Sacked = 0 // dummy + tcpinfo.Lost = 0 // dummy + tcpinfo.Retrans = conn.reXmtCount + tcpinfo.Fackets = 0 // dummy + tcpinfo.Last_data_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.lastActivity[0]))) + tcpinfo.Last_ack_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.outOldestTime[0]))) + tcpinfo.Last_data_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0]))) + tcpinfo.Last_ack_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0]))) + tcpinfo.Pmtu = conn.sendMSS // dummy, NWMIfRouteMtu is a candidate + tcpinfo.Rcv_ssthresh = conn.ssThresh + tcpinfo.Rtt = conn.roundTripTime + tcpinfo.Rttvar = conn.roundTripVar + tcpinfo.Snd_ssthresh = conn.ssThresh // dummy + tcpinfo.Snd_cwnd = conn.congestionWnd + tcpinfo.Advmss = conn.sendMSS // dummy + tcpinfo.Reordering = 0 // dummy + tcpinfo.Rcv_rtt = conn.roundTripTime // dummy + tcpinfo.Rcv_space = conn.sendMSS // dummy + tcpinfo.Total_retrans = conn.reXmtCount + + svcUnload(&svcNameTable[svc_EZBNMIF4][0], EZBNMIF4) + + return &tcpinfo, nil +} + +// GetsockoptString returns the string value of the socket option opt for the +// socket associated with fd at the given socket level. +func GetsockoptString(fd, level, opt int) (string, error) { + buf := make([]byte, 256) + vallen := _Socklen(len(buf)) + err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) + if err != nil { + return "", err + } + + return string(buf[:vallen-1]), nil +} + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = SizeofSockaddrAny + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); err != nil { + return + } + oobn = int(msg.Controllen) + recvflags = int(msg.Flags) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + // TODO(neeilan): Remove 0 arg added to get this compiling on z/OS + from, err = anyToSockaddr(0, &rsa) + } + return +} + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + var err error + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = int32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +func Opendir(name string) (uintptr, error) { + p, err := BytePtrFromString(name) + if err != nil { + return 0, err + } + dir, _, e := syscall_syscall(SYS___OPENDIR_A, uintptr(unsafe.Pointer(p)), 0, 0) + runtime.KeepAlive(unsafe.Pointer(p)) + if e != 0 { + err = errnoErr(e) + } + return dir, err +} + +// clearsyscall.Errno resets the errno value to 0. +func clearErrno() + +func Readdir(dir uintptr) (*Dirent, error) { + var ent Dirent + var res uintptr + // __readdir_r_a returns errno at the end of the directory stream, rather than 0. + // Therefore to avoid false positives we clear errno before calling it. + + // TODO(neeilan): Commented this out to get sys/unix compiling on z/OS. Uncomment and fix. Error: "undefined: clearsyscall" + //clearsyscall.Errno() // TODO(mundaym): check pre-emption rules. + + e, _, _ := syscall_syscall(SYS___READDIR_R_A, dir, uintptr(unsafe.Pointer(&ent)), uintptr(unsafe.Pointer(&res))) + var err error + if e != 0 { + err = errnoErr(Errno(e)) + } + if res == 0 { + return nil, err + } + return &ent, err +} + +func Closedir(dir uintptr) error { + _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0) + if e != 0 { + return errnoErr(e) + } + return nil +} + +func Seekdir(dir uintptr, pos int) { + _, _, _ = syscall_syscall(SYS_SEEKDIR, dir, uintptr(pos), 0) +} + +func Telldir(dir uintptr) (int, error) { + p, _, e := syscall_syscall(SYS_TELLDIR, dir, 0, 0) + pos := int(p) + if pos == -1 { + return pos, errnoErr(e) + } + return pos, nil +} + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + // struct flock is packed on z/OS. We can't emulate that in Go so + // instead we pack it here. + var flock [24]byte + *(*int16)(unsafe.Pointer(&flock[0])) = lk.Type + *(*int16)(unsafe.Pointer(&flock[2])) = lk.Whence + *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start + *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len + *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid + _, _, errno := syscall_syscall(SYS_FCNTL, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) + lk.Type = *(*int16)(unsafe.Pointer(&flock[0])) + lk.Whence = *(*int16)(unsafe.Pointer(&flock[2])) + lk.Start = *(*int64)(unsafe.Pointer(&flock[4])) + lk.Len = *(*int64)(unsafe.Pointer(&flock[12])) + lk.Pid = *(*int32)(unsafe.Pointer(&flock[20])) + if errno == 0 { + return nil + } + return errno +} + +func Flock(fd int, how int) error { + + var flock_type int16 + var fcntl_cmd int + + switch how { + case LOCK_SH | LOCK_NB: + flock_type = F_RDLCK + fcntl_cmd = F_SETLK + case LOCK_EX | LOCK_NB: + flock_type = F_WRLCK + fcntl_cmd = F_SETLK + case LOCK_EX: + flock_type = F_WRLCK + fcntl_cmd = F_SETLKW + case LOCK_UN: + flock_type = F_UNLCK + fcntl_cmd = F_SETLKW + default: + } + + flock := Flock_t{ + Type: int16(flock_type), + Whence: int16(0), + Start: int64(0), + Len: int64(0), + Pid: int32(Getppid()), + } + + err := FcntlFlock(uintptr(fd), fcntl_cmd, &flock) + return err +} + +func Mlock(b []byte) (err error) { + _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func Mlock2(b []byte, flags int) (err error) { + _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func Mlockall(flags int) (err error) { + _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func Munlock(b []byte) (err error) { + _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func Munlockall() (err error) { + _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func ClockGettime(clockid int32, ts *Timespec) error { + + var ticks_per_sec uint32 = 100 //TODO(kenan): value is currently hardcoded; need sysconf() call otherwise + var nsec_per_sec int64 = 1000000000 + + if ts == nil { + return EFAULT + } + if clockid == CLOCK_REALTIME || clockid == CLOCK_MONOTONIC { + var nanotime int64 = runtime.Nanotime1() + ts.Sec = nanotime / nsec_per_sec + ts.Nsec = nanotime % nsec_per_sec + } else if clockid == CLOCK_PROCESS_CPUTIME_ID || clockid == CLOCK_THREAD_CPUTIME_ID { + var tm Tms + _, err := Times(&tm) + if err != nil { + return EFAULT + } + ts.Sec = int64(tm.Utime / ticks_per_sec) + ts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec) + } else { + return EINVAL + } + return nil +} + +func Statfs(path string, stat *Statfs_t) (err error) { + fd, err := open(path, O_RDONLY, 0) + defer Close(fd) + if err != nil { + return err + } + return Fstatfs(fd, stat) +} + +var ( + Stdin = 0 + Stdout = 1 + Stderr = 2 +) + +// Do the interface allocations only once for common +// Errno values. +var ( + errEAGAIN error = syscall.EAGAIN + errEINVAL error = syscall.EINVAL + errENOENT error = syscall.ENOENT +) + +var ( + signalNameMapOnce sync.Once + signalNameMap map[string]syscall.Signal +) + +// errnoErr returns common boxed Errno values, to prevent +// allocations at runtime. +func errnoErr(e Errno) error { + switch e { + case 0: + return nil + case EAGAIN: + return errEAGAIN + case EINVAL: + return errEINVAL + case ENOENT: + return errENOENT + } + return e +} + +// ErrnoName returns the error name for error number e. +func ErrnoName(e Errno) string { + i := sort.Search(len(errorList), func(i int) bool { + return errorList[i].num >= e + }) + if i < len(errorList) && errorList[i].num == e { + return errorList[i].name + } + return "" +} + +// SignalName returns the signal name for signal number s. +func SignalName(s syscall.Signal) string { + i := sort.Search(len(signalList), func(i int) bool { + return signalList[i].num >= s + }) + if i < len(signalList) && signalList[i].num == s { + return signalList[i].name + } + return "" +} + +// SignalNum returns the syscall.Signal for signal named s, +// or 0 if a signal with such name is not found. +// The signal name should start with "SIG". +func SignalNum(s string) syscall.Signal { + signalNameMapOnce.Do(func() { + signalNameMap = make(map[string]syscall.Signal, len(signalList)) + for _, signal := range signalList { + signalNameMap[signal.name] = signal.num + } + }) + return signalNameMap[s] +} + +// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte. +func clen(n []byte) int { + i := bytes.IndexByte(n, 0) + if i == -1 { + i = len(n) + } + return i +} + +// Mmap manager, for use by operating system-specific implementations. + +type mmapper struct { + sync.Mutex + active map[*byte][]byte // active mappings; key is last byte in mapping + mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error) + munmap func(addr uintptr, length uintptr) error +} + +func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + if length <= 0 { + return nil, EINVAL + } + + // Map the requested memory. + addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset) + if errno != nil { + return nil, errno + } + + // Slice memory layout + var sl = struct { + addr uintptr + len int + cap int + }{addr, length, length} + + // Use unsafe to turn sl into a []byte. + b := *(*[]byte)(unsafe.Pointer(&sl)) + + // Register mapping in m and return it. + p := &b[cap(b)-1] + m.Lock() + defer m.Unlock() + m.active[p] = b + return b, nil +} + +func (m *mmapper) Munmap(data []byte) (err error) { + if len(data) == 0 || len(data) != cap(data) { + return EINVAL + } + + // Find the base of the mapping. + p := &data[cap(data)-1] + m.Lock() + defer m.Unlock() + b := m.active[p] + if b == nil || &b[0] != &data[0] { + return EINVAL + } + + // Unmap the memory and update m. + if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil { + return errno + } + delete(m.active, p) + return nil +} + +func Read(fd int, p []byte) (n int, err error) { + n, err = read(fd, p) + if raceenabled { + if n > 0 { + raceWriteRange(unsafe.Pointer(&p[0]), n) + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } + } + return +} + +func Write(fd int, p []byte) (n int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = write(fd, p) + if raceenabled && n > 0 { + raceReadRange(unsafe.Pointer(&p[0]), n) + } + return +} + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +// Sockaddr represents a socket address. +type Sockaddr interface { + sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs +} + +// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets. +type SockaddrInet4 struct { + Port int + Addr [4]byte + raw RawSockaddrInet4 +} + +// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets. +type SockaddrInet6 struct { + Port int + ZoneId uint32 + Addr [16]byte + raw RawSockaddrInet6 +} + +// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets. +type SockaddrUnix struct { + Name string + raw RawSockaddrUnix +} + +func Bind(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return bind(fd, ptr, n) +} + +func Connect(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connect(fd, ptr, n) +} + +func Getpeername(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getpeername(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(fd, &rsa) +} + +func GetsockoptByte(fd, level, opt int) (value byte, err error) { + var n byte + vallen := _Socklen(1) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return n, err +} + +func GetsockoptInt(fd, level, opt int) (value int, err error) { + var n int32 + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return int(n), err +} + +func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + return value, err +} + +func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { + var value IPMreq + vallen := _Socklen(SizeofIPMreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { + var value IPv6Mreq + vallen := _Socklen(SizeofIPv6Mreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { + var value IPv6MTUInfo + vallen := _Socklen(SizeofIPv6MTUInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { + var value ICMPv6Filter + vallen := _Socklen(SizeofICMPv6Filter) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptLinger(fd, level, opt int) (*Linger, error) { + var linger Linger + vallen := _Socklen(SizeofLinger) + err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen) + return &linger, err +} + +func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) { + var tv Timeval + vallen := _Socklen(unsafe.Sizeof(tv)) + err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen) + return &tv, err +} + +func GetsockoptUint64(fd, level, opt int) (value uint64, err error) { + var n uint64 + vallen := _Socklen(8) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return n, err +} + +func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil { + return + } + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(fd, &rsa) + } + return +} + +func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) { + ptr, n, err := to.sockaddr() + if err != nil { + return err + } + return sendto(fd, p, flags, ptr, n) +} + +func SetsockoptByte(fd, level, opt int, value byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1) +} + +func SetsockoptInt(fd, level, opt int, value int) (err error) { + var n = int32(value) + return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4) +} + +func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4) +} + +func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq) +} + +func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq) +} + +func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error { + return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter) +} + +func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger) +} + +func SetsockoptString(fd, level, opt int, s string) (err error) { + var p unsafe.Pointer + if len(s) > 0 { + p = unsafe.Pointer(&[]byte(s)[0]) + } + return setsockopt(fd, level, opt, p, uintptr(len(s))) +} + +func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv)) +} + +func SetsockoptUint64(fd, level, opt int, value uint64) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8) +} + +func Socket(domain, typ, proto int) (fd int, err error) { + if domain == AF_INET6 && SocketDisableIPv6 { + return -1, EAFNOSUPPORT + } + fd, err = socket(domain, typ, proto) + return +} + +func Socketpair(domain, typ, proto int) (fd [2]int, err error) { + var fdx [2]int32 + err = socketpair(domain, typ, proto, &fdx) + if err == nil { + fd[0] = int(fdx[0]) + fd[1] = int(fdx[1]) + } + return +} + +var ioSync int64 + +func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) } + +func SetNonblock(fd int, nonblocking bool) (err error) { + flag, err := fcntl(fd, F_GETFL, 0) + if err != nil { + return err + } + if nonblocking { + flag |= O_NONBLOCK + } else { + flag &= ^O_NONBLOCK + } + _, err = fcntl(fd, F_SETFL, flag) + return err +} + +// Exec calls execve(2), which replaces the calling executable in the process +// tree. argv0 should be the full path to an executable ("/bin/ls") and the +// executable name should also be the first argument in argv (["ls", "-l"]). +// envv are the environment variables that should be passed to the new +// process (["USER=go", "PWD=/tmp"]). +func Exec(argv0 string, argv []string, envv []string) error { + return syscall.Exec(argv0, argv, envv) +} diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go index 103604299..3d8930405 100644 --- a/vendor/golang.org/x/sys/unix/timestruct.go +++ b/vendor/golang.org/x/sys/unix/timestruct.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go index 30c1d71f4..25df1e378 100644 --- a/vendor/golang.org/x/sys/unix/xattr_bsd.go +++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build freebsd || netbsd // +build freebsd netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go index 104994bc6..ca9799b79 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go @@ -1,6 +1,7 @@ // mkerrors.sh -maix32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc && aix // +build ppc,aix // Created by cgo -godefs - DO NOT EDIT diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go index 4fc8d3064..200c8c26f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go @@ -1,6 +1,7 @@ // mkerrors.sh -maix64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64 && aix // +build ppc64,aix // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go index ec376f51b..7ee196f7f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go @@ -1,6 +1,7 @@ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && darwin // +build 386,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index fea5dfaad..0100cb12f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && darwin // +build amd64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -32,7 +33,7 @@ const ( AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 - AF_MAX = 0x28 + AF_MAX = 0x29 AF_NATM = 0x1f AF_NDRV = 0x1b AF_NETBIOS = 0x21 @@ -49,6 +50,7 @@ const ( AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 + AF_VSOCK = 0x28 ALTWERASE = 0x200 ATTR_BIT_MAP_COUNT = 0x5 ATTR_CMN_ACCESSMASK = 0x20000 @@ -83,7 +85,7 @@ const ( ATTR_CMN_PAROBJID = 0x80 ATTR_CMN_RETURNED_ATTRS = 0x80000000 ATTR_CMN_SCRIPT = 0x100 - ATTR_CMN_SETMASK = 0x41c7ff00 + ATTR_CMN_SETMASK = 0x51c7ff00 ATTR_CMN_USERACCESS = 0x200000 ATTR_CMN_UUID = 0x800000 ATTR_CMN_VALIDMASK = 0xffffffff @@ -357,7 +359,7 @@ const ( DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MAX = 0x10a DLT_MATCHING_MIN = 0x68 DLT_MFR = 0xb6 DLT_MOST = 0xd3 @@ -398,6 +400,7 @@ const ( DLT_SYMANTEC_FIREWALL = 0x63 DLT_TZSP = 0x80 DLT_USB = 0xba + DLT_USB_DARWIN = 0x10a DLT_USB_LINUX = 0xbd DLT_USB_LINUX_MMAPPED = 0xdc DLT_USER0 = 0x93 @@ -442,8 +445,8 @@ const ( EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xf - EVFILT_THREADMARKER = 0xf + EVFILT_SYSCOUNT = 0x11 + EVFILT_THREADMARKER = 0x11 EVFILT_TIMER = -0x7 EVFILT_USER = -0xa EVFILT_VM = -0xc @@ -481,9 +484,12 @@ const ( FSOPT_NOINMEMUPDATE = 0x2 FSOPT_PACK_INVAL_ATTRS = 0x8 FSOPT_REPORT_FULLSIZE = 0x4 + FSOPT_RETURN_REALDEV = 0x200 F_ADDFILESIGS = 0x3d F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 + F_ADDFILESIGS_INFO = 0x67 F_ADDFILESIGS_RETURN = 0x61 + F_ADDFILESUPPL = 0x68 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 @@ -505,8 +511,10 @@ const ( F_GETOWN = 0x5 F_GETPATH = 0x32 F_GETPATH_MTMINFO = 0x47 + F_GETPATH_NOFIRMLINK = 0x66 F_GETPROTECTIONCLASS = 0x3f F_GETPROTECTIONLEVEL = 0x4d + F_GETSIGSINFO = 0x69 F_GLOBAL_NOCACHE = 0x37 F_LOG2PHYS = 0x31 F_LOG2PHYS_EXT = 0x41 @@ -531,6 +539,7 @@ const ( F_SETPROTECTIONCLASS = 0x40 F_SETSIZE = 0x2b F_SINGLE_WRITER = 0x4c + F_SPECULATIVE_READ = 0x65 F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b F_TRIM_ACTIVE_FILE = 0x64 @@ -562,6 +571,7 @@ const ( IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 + IFT_6LOWPAN = 0x40 IFT_AAL5 = 0x31 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 @@ -766,6 +776,9 @@ const ( IPV6_2292PKTINFO = 0x13 IPV6_2292PKTOPTIONS = 0x19 IPV6_2292RTHDR = 0x18 + IPV6_ADDR_MC_FLAGS_PREFIX = 0x20 + IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10 + IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30 IPV6_BINDV6ONLY = 0x1b IPV6_BOUND_IF = 0x7d IPV6_CHECKSUM = 0x1a @@ -775,7 +788,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FLOW_ECN_MASK = 0x300 + IPV6_FLOW_ECN_MASK = 0x3000 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -818,6 +831,7 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 + IP_DONTFRAG = 0x1c IP_DROP_MEMBERSHIP = 0xd IP_DROP_SOURCE_MEMBERSHIP = 0x47 IP_DUMMYNET_CONFIGURE = 0x3c @@ -889,6 +903,12 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_PEERCRED = 0x1 + LOCAL_PEEREPID = 0x3 + LOCAL_PEEREUUID = 0x5 + LOCAL_PEERPID = 0x2 + LOCAL_PEERTOKEN = 0x6 + LOCAL_PEERUUID = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -904,6 +924,7 @@ const ( MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 + MAP_32BIT = 0x8000 MAP_ANON = 0x1000 MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 @@ -920,6 +941,17 @@ const ( MAP_RESILIENT_CODESIGN = 0x2000 MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 + MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000 + MAP_UNIX03 = 0x40000 + MCAST_BLOCK_SOURCE = 0x54 + MCAST_EXCLUDE = 0x2 + MCAST_INCLUDE = 0x1 + MCAST_JOIN_GROUP = 0x50 + MCAST_JOIN_SOURCE_GROUP = 0x52 + MCAST_LEAVE_GROUP = 0x51 + MCAST_LEAVE_SOURCE_GROUP = 0x53 + MCAST_UNBLOCK_SOURCE = 0x55 + MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 @@ -931,6 +963,7 @@ const ( MNT_DOVOLFS = 0x8000 MNT_DWAIT = 0x4 MNT_EXPORTED = 0x100 + MNT_EXT_ROOT_DATA_VOL = 0x1 MNT_FORCE = 0x80000 MNT_IGNORE_OWNERSHIP = 0x200000 MNT_JOURNALED = 0x800000 @@ -947,12 +980,15 @@ const ( MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 + MNT_REMOVABLE = 0x200 MNT_ROOTFS = 0x4000 + MNT_SNAPSHOT = 0x40000000 + MNT_STRICTATIME = 0x80000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNKNOWNPERMISSIONS = 0x200000 MNT_UPDATE = 0x10000 - MNT_VISFLAGMASK = 0x17f0f5ff + MNT_VISFLAGMASK = 0xd7f0f7ff MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 @@ -963,6 +999,7 @@ const ( MSG_HAVEMORE = 0x2000 MSG_HOLD = 0x800 MSG_NEEDSA = 0x10000 + MSG_NOSIGNAL = 0x80000 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_RCVMORE = 0x4000 @@ -979,9 +1016,10 @@ const ( NET_RT_DUMP = 0x1 NET_RT_DUMP2 = 0x7 NET_RT_FLAGS = 0x2 + NET_RT_FLAGS_PRIV = 0xa NET_RT_IFLIST = 0x3 NET_RT_IFLIST2 = 0x6 - NET_RT_MAXID = 0xa + NET_RT_MAXID = 0xb NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 NFDBITS = 0x20 @@ -1019,6 +1057,7 @@ const ( NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_MACHTIME = 0x100 NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 @@ -1065,6 +1104,7 @@ const ( O_NDELAY = 0x4 O_NOCTTY = 0x20000 O_NOFOLLOW = 0x100 + O_NOFOLLOW_ANY = 0x20000000 O_NONBLOCK = 0x4 O_POPUP = 0x80000000 O_RDONLY = 0x0 @@ -1136,6 +1176,7 @@ const ( RTF_BROADCAST = 0x400000 RTF_CLONING = 0x100 RTF_CONDEMNED = 0x2000000 + RTF_DEAD = 0x20000000 RTF_DELCLONE = 0x80 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 @@ -1143,6 +1184,7 @@ const ( RTF_HOST = 0x4 RTF_IFREF = 0x4000000 RTF_IFSCOPE = 0x1000000 + RTF_LLDATA = 0x400 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 @@ -1210,6 +1252,7 @@ const ( SIOCGDRVSPEC = 0xc028697b SIOCGETVLAN = 0xc020697f SIOCGHIWAT = 0x40047301 + SIOCGIF6LOWPAN = 0xc02069c5 SIOCGIFADDR = 0xc0206921 SIOCGIFALTMTU = 0xc0206948 SIOCGIFASYNCMAP = 0xc020697c @@ -1220,6 +1263,7 @@ const ( SIOCGIFDEVMTU = 0xc0206944 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 + SIOCGIFFUNCTIONALTYPE = 0xc02069ad SIOCGIFGENERIC = 0xc020693a SIOCGIFKPI = 0xc0206987 SIOCGIFMAC = 0xc0206982 @@ -1233,6 +1277,7 @@ const ( SIOCGIFSTATUS = 0xc331693d SIOCGIFVLAN = 0xc020697f SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGIFXMEDIA = 0xc02c6948 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCIFCREATE = 0xc0206978 @@ -1243,6 +1288,7 @@ const ( SIOCSDRVSPEC = 0x8028697b SIOCSETVLAN = 0x8020697e SIOCSHIWAT = 0x80047300 + SIOCSIF6LOWPAN = 0x802069c4 SIOCSIFADDR = 0x8020690c SIOCSIFALTMTU = 0x80206945 SIOCSIFASYNCMAP = 0x8020697d @@ -1270,6 +1316,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go index 03feefbf8..e748cb110 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go @@ -1,6 +1,7 @@ // mkerrors.sh // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && darwin // +build arm,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index b40fb1f69..df26a1968 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && darwin // +build arm64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -32,7 +33,7 @@ const ( AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 - AF_MAX = 0x28 + AF_MAX = 0x29 AF_NATM = 0x1f AF_NDRV = 0x1b AF_NETBIOS = 0x21 @@ -49,6 +50,7 @@ const ( AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 + AF_VSOCK = 0x28 ALTWERASE = 0x200 ATTR_BIT_MAP_COUNT = 0x5 ATTR_CMN_ACCESSMASK = 0x20000 @@ -83,7 +85,7 @@ const ( ATTR_CMN_PAROBJID = 0x80 ATTR_CMN_RETURNED_ATTRS = 0x80000000 ATTR_CMN_SCRIPT = 0x100 - ATTR_CMN_SETMASK = 0x41c7ff00 + ATTR_CMN_SETMASK = 0x51c7ff00 ATTR_CMN_USERACCESS = 0x200000 ATTR_CMN_UUID = 0x800000 ATTR_CMN_VALIDMASK = 0xffffffff @@ -357,7 +359,7 @@ const ( DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MAX = 0x10a DLT_MATCHING_MIN = 0x68 DLT_MFR = 0xb6 DLT_MOST = 0xd3 @@ -398,6 +400,7 @@ const ( DLT_SYMANTEC_FIREWALL = 0x63 DLT_TZSP = 0x80 DLT_USB = 0xba + DLT_USB_DARWIN = 0x10a DLT_USB_LINUX = 0xbd DLT_USB_LINUX_MMAPPED = 0xdc DLT_USER0 = 0x93 @@ -442,8 +445,8 @@ const ( EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xf - EVFILT_THREADMARKER = 0xf + EVFILT_SYSCOUNT = 0x11 + EVFILT_THREADMARKER = 0x11 EVFILT_TIMER = -0x7 EVFILT_USER = -0xa EVFILT_VM = -0xc @@ -481,9 +484,12 @@ const ( FSOPT_NOINMEMUPDATE = 0x2 FSOPT_PACK_INVAL_ATTRS = 0x8 FSOPT_REPORT_FULLSIZE = 0x4 + FSOPT_RETURN_REALDEV = 0x200 F_ADDFILESIGS = 0x3d F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 + F_ADDFILESIGS_INFO = 0x67 F_ADDFILESIGS_RETURN = 0x61 + F_ADDFILESUPPL = 0x68 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 @@ -505,8 +511,10 @@ const ( F_GETOWN = 0x5 F_GETPATH = 0x32 F_GETPATH_MTMINFO = 0x47 + F_GETPATH_NOFIRMLINK = 0x66 F_GETPROTECTIONCLASS = 0x3f F_GETPROTECTIONLEVEL = 0x4d + F_GETSIGSINFO = 0x69 F_GLOBAL_NOCACHE = 0x37 F_LOG2PHYS = 0x31 F_LOG2PHYS_EXT = 0x41 @@ -531,6 +539,7 @@ const ( F_SETPROTECTIONCLASS = 0x40 F_SETSIZE = 0x2b F_SINGLE_WRITER = 0x4c + F_SPECULATIVE_READ = 0x65 F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b F_TRIM_ACTIVE_FILE = 0x64 @@ -562,6 +571,7 @@ const ( IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 + IFT_6LOWPAN = 0x40 IFT_AAL5 = 0x31 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 @@ -766,6 +776,9 @@ const ( IPV6_2292PKTINFO = 0x13 IPV6_2292PKTOPTIONS = 0x19 IPV6_2292RTHDR = 0x18 + IPV6_ADDR_MC_FLAGS_PREFIX = 0x20 + IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10 + IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30 IPV6_BINDV6ONLY = 0x1b IPV6_BOUND_IF = 0x7d IPV6_CHECKSUM = 0x1a @@ -775,7 +788,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FLOW_ECN_MASK = 0x300 + IPV6_FLOW_ECN_MASK = 0x3000 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -818,6 +831,7 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 + IP_DONTFRAG = 0x1c IP_DROP_MEMBERSHIP = 0xd IP_DROP_SOURCE_MEMBERSHIP = 0x47 IP_DUMMYNET_CONFIGURE = 0x3c @@ -889,6 +903,12 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_PEERCRED = 0x1 + LOCAL_PEEREPID = 0x3 + LOCAL_PEEREUUID = 0x5 + LOCAL_PEERPID = 0x2 + LOCAL_PEERTOKEN = 0x6 + LOCAL_PEERUUID = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -904,6 +924,7 @@ const ( MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 + MAP_32BIT = 0x8000 MAP_ANON = 0x1000 MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 @@ -920,6 +941,17 @@ const ( MAP_RESILIENT_CODESIGN = 0x2000 MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 + MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000 + MAP_UNIX03 = 0x40000 + MCAST_BLOCK_SOURCE = 0x54 + MCAST_EXCLUDE = 0x2 + MCAST_INCLUDE = 0x1 + MCAST_JOIN_GROUP = 0x50 + MCAST_JOIN_SOURCE_GROUP = 0x52 + MCAST_LEAVE_GROUP = 0x51 + MCAST_LEAVE_SOURCE_GROUP = 0x53 + MCAST_UNBLOCK_SOURCE = 0x55 + MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 @@ -931,6 +963,7 @@ const ( MNT_DOVOLFS = 0x8000 MNT_DWAIT = 0x4 MNT_EXPORTED = 0x100 + MNT_EXT_ROOT_DATA_VOL = 0x1 MNT_FORCE = 0x80000 MNT_IGNORE_OWNERSHIP = 0x200000 MNT_JOURNALED = 0x800000 @@ -947,12 +980,15 @@ const ( MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 + MNT_REMOVABLE = 0x200 MNT_ROOTFS = 0x4000 + MNT_SNAPSHOT = 0x40000000 + MNT_STRICTATIME = 0x80000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNKNOWNPERMISSIONS = 0x200000 MNT_UPDATE = 0x10000 - MNT_VISFLAGMASK = 0x17f0f5ff + MNT_VISFLAGMASK = 0xd7f0f7ff MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 @@ -963,6 +999,7 @@ const ( MSG_HAVEMORE = 0x2000 MSG_HOLD = 0x800 MSG_NEEDSA = 0x10000 + MSG_NOSIGNAL = 0x80000 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_RCVMORE = 0x4000 @@ -979,9 +1016,10 @@ const ( NET_RT_DUMP = 0x1 NET_RT_DUMP2 = 0x7 NET_RT_FLAGS = 0x2 + NET_RT_FLAGS_PRIV = 0xa NET_RT_IFLIST = 0x3 NET_RT_IFLIST2 = 0x6 - NET_RT_MAXID = 0xa + NET_RT_MAXID = 0xb NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 NFDBITS = 0x20 @@ -1019,6 +1057,7 @@ const ( NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_MACHTIME = 0x100 NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 @@ -1065,6 +1104,7 @@ const ( O_NDELAY = 0x4 O_NOCTTY = 0x20000 O_NOFOLLOW = 0x100 + O_NOFOLLOW_ANY = 0x20000000 O_NONBLOCK = 0x4 O_POPUP = 0x80000000 O_RDONLY = 0x0 @@ -1136,6 +1176,7 @@ const ( RTF_BROADCAST = 0x400000 RTF_CLONING = 0x100 RTF_CONDEMNED = 0x2000000 + RTF_DEAD = 0x20000000 RTF_DELCLONE = 0x80 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 @@ -1143,6 +1184,7 @@ const ( RTF_HOST = 0x4 RTF_IFREF = 0x4000000 RTF_IFSCOPE = 0x1000000 + RTF_LLDATA = 0x400 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 @@ -1210,6 +1252,7 @@ const ( SIOCGDRVSPEC = 0xc028697b SIOCGETVLAN = 0xc020697f SIOCGHIWAT = 0x40047301 + SIOCGIF6LOWPAN = 0xc02069c5 SIOCGIFADDR = 0xc0206921 SIOCGIFALTMTU = 0xc0206948 SIOCGIFASYNCMAP = 0xc020697c @@ -1220,6 +1263,7 @@ const ( SIOCGIFDEVMTU = 0xc0206944 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 + SIOCGIFFUNCTIONALTYPE = 0xc02069ad SIOCGIFGENERIC = 0xc020693a SIOCGIFKPI = 0xc0206987 SIOCGIFMAC = 0xc0206982 @@ -1233,6 +1277,7 @@ const ( SIOCGIFSTATUS = 0xc331693d SIOCGIFVLAN = 0xc020697f SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGIFXMEDIA = 0xc02c6948 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCIFCREATE = 0xc0206978 @@ -1243,6 +1288,7 @@ const ( SIOCSDRVSPEC = 0x8028697b SIOCSETVLAN = 0x8020697e SIOCSHIWAT = 0x80047300 + SIOCSIF6LOWPAN = 0x802069c4 SIOCSIFADDR = 0x8020690c SIOCSIFALTMTU = 0x80206945 SIOCSIFASYNCMAP = 0x8020697d @@ -1270,6 +1316,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go index f5e91b7ab..17bba0e44 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && dragonfly // +build amd64,dragonfly // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go index 3689c8084..9c7c5e165 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -1,6 +1,7 @@ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && freebsd // +build 386,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -997,6 +998,11 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_CONNWAIT = 0x4 + LOCAL_CREDS = 0x2 + LOCAL_CREDS_PERSISTENT = 0x3 + LOCAL_PEERCRED = 0x1 + LOCAL_VENDOR = 0x80000000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -1375,6 +1381,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go index b8f7c3c93..b265abb25 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && freebsd // +build amd64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -997,6 +998,11 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_CONNWAIT = 0x4 + LOCAL_CREDS = 0x2 + LOCAL_CREDS_PERSISTENT = 0x3 + LOCAL_PEERCRED = 0x1 + LOCAL_VENDOR = 0x80000000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -1376,6 +1382,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go index be14bb1a4..0326a6b3a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -1,6 +1,7 @@ // mkerrors.sh // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && freebsd // +build arm,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -980,6 +981,11 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_CONNWAIT = 0x4 + LOCAL_CREDS = 0x2 + LOCAL_CREDS_PERSISTENT = 0x3 + LOCAL_PEERCRED = 0x1 + LOCAL_VENDOR = 0x80000000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -1341,6 +1347,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go index 7ce9c0081..218d39906 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && freebsd // +build arm64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -997,6 +998,11 @@ const ( KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 + LOCAL_CONNWAIT = 0x4 + LOCAL_CREDS = 0x2 + LOCAL_CREDS_PERSISTENT = 0x3 + LOCAL_PEERCRED = 0x1 + LOCAL_VENDOR = 0x80000000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 @@ -1376,6 +1382,7 @@ const ( SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 + SOL_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index b3463a8b5..504dd6cd2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1,5 +1,6 @@ // Code generated by mkmerge.go; DO NOT EDIT. +//go:build linux // +build linux package unix @@ -244,6 +245,10 @@ const ( BS0 = 0x0 BTRFS_SUPER_MAGIC = 0x9123683e BTRFS_TEST_MAGIC = 0x73727279 + BUS_BLUETOOTH = 0x5 + BUS_HIL = 0x4 + BUS_USB = 0x3 + BUS_VIRTUAL = 0x6 CAN_BCM = 0x2 CAN_EFF_FLAG = 0x80000000 CAN_EFF_ID_BITS = 0x1d @@ -313,6 +318,7 @@ const ( CAN_J1939 = 0x7 CAN_MAX_DLC = 0x8 CAN_MAX_DLEN = 0x8 + CAN_MAX_RAW_DLC = 0xf CAN_MCNET = 0x5 CAN_MTU = 0x10 CAN_NPROTO = 0x8 @@ -664,6 +670,7 @@ const ( ETH_P_CAIF = 0xf7 ETH_P_CAN = 0xc ETH_P_CANFD = 0xd + ETH_P_CFM = 0x8902 ETH_P_CONTROL = 0x16 ETH_P_CUST = 0x6006 ETH_P_DDCMP = 0x6 @@ -834,7 +841,6 @@ const ( FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0 FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1 FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3 - FSCRYPT_POLICY_FLAGS_VALID = 0x1f FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4 FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 = 0x10 FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8 @@ -865,7 +871,7 @@ const ( FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x1f + FS_POLICY_FLAGS_VALID = 0x7 FS_VERITY_FL = 0x100000 FS_VERITY_HASH_ALG_SHA256 = 0x1 FS_VERITY_HASH_ALG_SHA512 = 0x2 @@ -962,6 +968,7 @@ const ( HDIO_SET_XFER = 0x306 HDIO_TRISTATE_HWIF = 0x31b HDIO_UNREGISTER_HWIF = 0x32a + HID_MAX_DESCRIPTOR_SIZE = 0x1000 HOSTFS_SUPER_MAGIC = 0xc0ffee HPFS_SUPER_MAGIC = 0xf995e849 HUGETLBFS_MAGIC = 0x958458f6 @@ -1138,6 +1145,7 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVERR_RFC4884 = 0x1f IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 @@ -1202,6 +1210,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVERR_RFC4884 = 0x1a IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 @@ -1840,6 +1849,7 @@ const ( PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c PR_SET_SPECULATION_CTRL = 0x35 + PR_SET_SYSCALL_USER_DISPATCH = 0x3b PR_SET_TAGGED_ADDR_CTRL = 0x37 PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d @@ -1859,6 +1869,8 @@ const ( PR_SVE_SET_VL_ONEXEC = 0x40000 PR_SVE_VL_INHERIT = 0x20000 PR_SVE_VL_LEN_MASK = 0xffff + PR_SYS_DISPATCH_OFF = 0x0 + PR_SYS_DISPATCH_ON = 0x1 PR_TAGGED_ADDR_ENABLE = 0x1 PR_TASK_PERF_EVENTS_DISABLE = 0x1f PR_TASK_PERF_EVENTS_ENABLE = 0x20 @@ -2104,12 +2116,13 @@ const ( RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 + RTNH_COMPARE_MASK = 0x59 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_TRAP = 0x40 RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a @@ -2580,6 +2593,7 @@ const ( VMADDR_CID_HOST = 0x2 VMADDR_CID_HYPERVISOR = 0x0 VMADDR_CID_LOCAL = 0x1 + VMADDR_FLAG_TO_HOST = 0x1 VMADDR_PORT_ANY = 0xffffffff VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 @@ -2727,6 +2741,9 @@ const ( Z3FOLD_MAGIC = 0x33 ZONEFS_MAGIC = 0x5a4f4653 ZSMALLOC_MAGIC = 0x58295829 + _HIDIOCGRAWNAME_LEN = 0x80 + _HIDIOCGRAWPHYS_LEN = 0x40 + _HIDIOCGRAWUNIQ_LEN = 0x40 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 336e0b326..e91a1a957 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include -m32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && linux // +build 386,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -93,6 +94,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -165,6 +169,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -192,6 +197,7 @@ const ( PPPIOCSPASS = 0x40087447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe @@ -268,6 +274,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -290,6 +297,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -481,6 +489,9 @@ const ( X86_FXSR_MAGIC = 0x0 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 961507e93..a9cbac644 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && linux // +build amd64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -93,6 +94,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -165,6 +169,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -192,6 +197,7 @@ const ( PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_ARCH_PRCTL = 0x1e @@ -269,6 +275,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -291,6 +298,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -481,6 +489,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index a65576db7..d74f3c15a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && linux // +build arm,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x40087447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETCRUNCHREGS = 0x19 @@ -275,6 +281,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -297,6 +304,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -487,6 +495,9 @@ const ( WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index cf075caa8..e1538995b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && linux // +build arm64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -95,6 +96,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -166,6 +170,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -193,8 +198,10 @@ const ( PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PROT_BTI = 0x10 + PROT_MTE = 0x20 PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_PEEKMTETAGS = 0x21 PTRACE_POKEMTETAGS = 0x22 @@ -264,6 +271,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -286,6 +294,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -477,6 +486,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index efe90deea..5e8e71ff8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips && linux // +build mips,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x80087447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe @@ -268,6 +274,7 @@ const ( SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -290,6 +297,7 @@ const ( SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1e + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 @@ -483,6 +491,9 @@ const ( WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 8b0e8911d..e670ee148 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && linux // +build mips64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPREGS = 0xe @@ -268,6 +274,7 @@ const ( SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -290,6 +297,7 @@ const ( SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1e + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 @@ -483,6 +491,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index e9430cd1a..dd11eacb8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64le && linux // +build mips64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPREGS = 0xe @@ -268,6 +274,7 @@ const ( SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -290,6 +297,7 @@ const ( SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1e + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 @@ -483,6 +491,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 61e4f5db6..a0a5b22ae 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mipsle && linux // +build mipsle,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x80087447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe @@ -268,6 +274,7 @@ const ( SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -290,6 +297,7 @@ const ( SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1e + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 @@ -483,6 +491,9 @@ const ( WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 973ad9346..e60102f6a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64 && linux // +build ppc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -165,6 +169,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -192,6 +197,7 @@ const ( PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff @@ -327,6 +333,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -349,6 +356,7 @@ const ( SO_PEERCRED = 0x15 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -543,6 +551,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4000 XTABS = 0xc00 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 70a7406ba..838ff4ea6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64le && linux // +build ppc64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -165,6 +169,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -192,6 +197,7 @@ const ( PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff @@ -327,6 +333,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -349,6 +356,7 @@ const ( SO_PEERCRED = 0x15 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -543,6 +551,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4000 XTABS = 0xc00 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index b1bf7997c..7cc98f09c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build riscv64 && linux // +build riscv64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff RLIMIT_AS = 0x9 @@ -256,6 +262,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -278,6 +285,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -468,6 +476,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 7053d10ba..a508392d2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build s390x && linux // +build s390x,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -92,6 +93,9 @@ const ( F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -163,6 +167,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 @@ -190,6 +195,7 @@ const ( PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_DISABLE_TE = 0x5010 @@ -329,6 +335,7 @@ const ( SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 @@ -351,6 +358,7 @@ const ( SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 @@ -541,6 +549,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 137cfe796..d5e2dc94f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -1,6 +1,7 @@ // mkerrors.sh -Wall -Werror -static -I/tmp/include // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build sparc64 && linux // +build sparc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. @@ -96,6 +97,9 @@ const ( F_SETOWN = 0x6 F_UNLCK = 0x3 F_WRLCK = 0x2 + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -168,6 +172,7 @@ const ( PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 + PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 @@ -195,6 +200,7 @@ const ( PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPAREGS = 0x14 @@ -322,6 +328,7 @@ const ( SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0x400 SO_BUSY_POLL = 0x30 + SO_BUSY_POLL_BUDGET = 0x49 SO_CNX_ADVICE = 0x37 SO_COOKIE = 0x3b SO_DETACH_REUSEPORT_BPF = 0x47 @@ -344,6 +351,7 @@ const ( SO_PEERCRED = 0x40 SO_PEERGROUPS = 0x3d SO_PEERSEC = 0x1e + SO_PREFER_BUSY_POLL = 0x48 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x100b @@ -531,6 +539,9 @@ const ( WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x40804804 + _HIDIOCGRAWPHYS = 0x40404805 + _HIDIOCGRAWUNIQ = 0x40404808 __TIOCFLUSH = 0x80047410 ) diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go index 20f3a5799..72f7420d2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -1,6 +1,7 @@ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && netbsd // +build 386,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go index 90b8fcd29..8d4eb0c08 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && netbsd // +build amd64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go index c5c03993b..9eef9749f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -1,6 +1,7 @@ // mkerrors.sh -marm // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && netbsd // +build arm,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go index 14dd3c1d1..3b62ba192 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && netbsd // +build arm64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index c865a10df..593cc0fef 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -1,6 +1,7 @@ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && openbsd // +build 386,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index 9db6b2fb6..25cb60948 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && openbsd // +build amd64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index 7072526a6..a4e4c2231 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -1,6 +1,7 @@ // mkerrors.sh // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && openbsd // +build arm,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go index ac5efbe5a..90de7dfc3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && openbsd // +build arm64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go index a74639a46..f1154ff56 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && openbsd // +build mips64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go index 5312c36cc..65fb2c5cd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -1,6 +1,7 @@ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && solaris // +build amd64,solaris // Code generated by cmd/cgo -godefs; DO NOT EDIT. diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go new file mode 100644 index 000000000..4117ce08a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -0,0 +1,831 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +// Hand edited based on zerrors_linux_s390x.go +// TODO: auto-generate. + +package unix + +const ( + BRKINT = 0x0001 + CLOCK_MONOTONIC = 0x1 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CS8 = 0x0030 + CSIZE = 0x0030 + ECHO = 0x00000008 + ECHONL = 0x00000001 + FD_CLOEXEC = 0x01 + FD_CLOFORK = 0x02 + FNDELAY = 0x04 + F_CLOSFD = 9 + F_CONTROL_CVT = 13 + F_DUPFD = 0 + F_DUPFD2 = 8 + F_GETFD = 1 + F_GETFL = 259 + F_GETLK = 5 + F_GETOWN = 10 + F_OK = 0x0 + F_RDLCK = 1 + F_SETFD = 2 + F_SETFL = 4 + F_SETLK = 6 + F_SETLKW = 7 + F_SETOWN = 11 + F_SETTAG = 12 + F_UNLCK = 3 + F_WRLCK = 2 + FSTYPE_ZFS = 0xe9 //"Z" + FSTYPE_HFS = 0xc8 //"H" + FSTYPE_NFS = 0xd5 //"N" + FSTYPE_TFS = 0xe3 //"T" + FSTYPE_AUTOMOUNT = 0xc1 //"A" + IP6F_MORE_FRAG = 0x0001 + IP6F_OFF_MASK = 0xfff8 + IP6F_RESERVED_MASK = 0x0006 + IP6OPT_JUMBO = 0xc2 + IP6OPT_JUMBO_LEN = 6 + IP6OPT_MUTABLE = 0x20 + IP6OPT_NSAP_ADDR = 0xc3 + IP6OPT_PAD1 = 0x00 + IP6OPT_PADN = 0x01 + IP6OPT_ROUTER_ALERT = 0x05 + IP6OPT_TUNNEL_LIMIT = 0x04 + IP6OPT_TYPE_DISCARD = 0x40 + IP6OPT_TYPE_FORCEICMP = 0x80 + IP6OPT_TYPE_ICMP = 0xc0 + IP6OPT_TYPE_SKIP = 0x00 + IP6_ALERT_AN = 0x0002 + IP6_ALERT_MLD = 0x0000 + IP6_ALERT_RSVP = 0x0001 + IPPORT_RESERVED = 1024 + IPPORT_USERRESERVED = 5000 + IPPROTO_AH = 51 + IPPROTO_DSTOPTS = 60 + IPPROTO_EGP = 8 + IPPROTO_ESP = 50 + IPPROTO_FRAGMENT = 44 + IPPROTO_GGP = 2 + IPPROTO_HOPOPTS = 0 + IPPROTO_ICMP = 1 + IPPROTO_ICMPV6 = 58 + IPPROTO_IDP = 22 + IPPROTO_IP = 0 + IPPROTO_IPV6 = 41 + IPPROTO_MAX = 256 + IPPROTO_NONE = 59 + IPPROTO_PUP = 12 + IPPROTO_RAW = 255 + IPPROTO_ROUTING = 43 + IPPROTO_TCP = 6 + IPPROTO_UDP = 17 + IPV6_ADDR_PREFERENCES = 32 + IPV6_CHECKSUM = 19 + IPV6_DONTFRAG = 29 + IPV6_DSTOPTS = 23 + IPV6_HOPLIMIT = 11 + IPV6_HOPOPTS = 22 + IPV6_JOIN_GROUP = 5 + IPV6_LEAVE_GROUP = 6 + IPV6_MULTICAST_HOPS = 9 + IPV6_MULTICAST_IF = 7 + IPV6_MULTICAST_LOOP = 4 + IPV6_NEXTHOP = 20 + IPV6_PATHMTU = 12 + IPV6_PKTINFO = 13 + IPV6_PREFER_SRC_CGA = 0x10 + IPV6_PREFER_SRC_COA = 0x02 + IPV6_PREFER_SRC_HOME = 0x01 + IPV6_PREFER_SRC_NONCGA = 0x20 + IPV6_PREFER_SRC_PUBLIC = 0x08 + IPV6_PREFER_SRC_TMP = 0x04 + IPV6_RECVDSTOPTS = 28 + IPV6_RECVHOPLIMIT = 14 + IPV6_RECVHOPOPTS = 26 + IPV6_RECVPATHMTU = 16 + IPV6_RECVPKTINFO = 15 + IPV6_RECVRTHDR = 25 + IPV6_RECVTCLASS = 31 + IPV6_RTHDR = 21 + IPV6_RTHDRDSTOPTS = 24 + IPV6_RTHDR_TYPE_0 = 0 + IPV6_TCLASS = 30 + IPV6_UNICAST_HOPS = 3 + IPV6_USE_MIN_MTU = 18 + IPV6_V6ONLY = 10 + IP_ADD_MEMBERSHIP = 5 + IP_ADD_SOURCE_MEMBERSHIP = 12 + IP_BLOCK_SOURCE = 10 + IP_DEFAULT_MULTICAST_LOOP = 1 + IP_DEFAULT_MULTICAST_TTL = 1 + IP_DROP_MEMBERSHIP = 6 + IP_DROP_SOURCE_MEMBERSHIP = 13 + IP_MAX_MEMBERSHIPS = 20 + IP_MULTICAST_IF = 7 + IP_MULTICAST_LOOP = 4 + IP_MULTICAST_TTL = 3 + IP_OPTIONS = 1 + IP_PKTINFO = 101 + IP_RECVPKTINFO = 102 + IP_TOS = 2 + IP_TTL = 3 + IP_UNBLOCK_SOURCE = 11 + ICANON = 0x0010 + ICRNL = 0x0002 + IEXTEN = 0x0020 + IGNBRK = 0x0004 + IGNCR = 0x0008 + INLCR = 0x0020 + ISIG = 0x0040 + ISTRIP = 0x0080 + IXON = 0x0200 + IXOFF = 0x0100 + LOCK_SH = 0x1 // Not exist on zOS + LOCK_EX = 0x2 // Not exist on zOS + LOCK_NB = 0x4 // Not exist on zOS + LOCK_UN = 0x8 // Not exist on zOS + POLLIN = 0x0003 + POLLOUT = 0x0004 + POLLPRI = 0x0010 + POLLERR = 0x0020 + POLLHUP = 0x0040 + POLLNVAL = 0x0080 + PROT_READ = 0x1 // mmap - page can be read + PROT_WRITE = 0x2 // page can be written + PROT_NONE = 0x4 // can't be accessed + PROT_EXEC = 0x8 // can be executed + MAP_PRIVATE = 0x1 // changes are private + MAP_SHARED = 0x2 // changes are shared + MAP_FIXED = 0x4 // place exactly + MS_SYNC = 0x1 // msync - synchronous writes + MS_ASYNC = 0x2 // asynchronous writes + MS_INVALIDATE = 0x4 // invalidate mappings + MTM_RDONLY = 0x80000000 + MTM_RDWR = 0x40000000 + MTM_UMOUNT = 0x10000000 + MTM_IMMED = 0x08000000 + MTM_FORCE = 0x04000000 + MTM_DRAIN = 0x02000000 + MTM_RESET = 0x01000000 + MTM_SAMEMODE = 0x00100000 + MTM_UNQSEFORCE = 0x00040000 + MTM_NOSUID = 0x00000400 + MTM_SYNCHONLY = 0x00000200 + MTM_REMOUNT = 0x00000100 + MTM_NOSECURITY = 0x00000080 + O_ACCMODE = 0x03 + O_APPEND = 0x08 + O_ASYNCSIG = 0x0200 + O_CREAT = 0x80 + O_EXCL = 0x40 + O_GETFL = 0x0F + O_LARGEFILE = 0x0400 + O_NONBLOCK = 0x04 + O_RDONLY = 0x02 + O_RDWR = 0x03 + O_SYNC = 0x0100 + O_TRUNC = 0x10 + O_WRONLY = 0x01 + O_NOCTTY = 0x20 + OPOST = 0x0001 + ONLCR = 0x0004 + PARENB = 0x0200 + PARMRK = 0x0400 + QUERYCVT = 3 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 // RUSAGE_THREAD unsupported on z/OS + SEEK_CUR = 1 + SEEK_END = 2 + SEEK_SET = 0 + SETAUTOCVTALL = 5 + SETAUTOCVTON = 2 + SETCVTALL = 4 + SETCVTOFF = 0 + SETCVTON = 1 + AF_APPLETALK = 16 + AF_CCITT = 10 + AF_CHAOS = 5 + AF_DATAKIT = 9 + AF_DLI = 13 + AF_ECMA = 8 + AF_HYLINK = 15 + AF_IMPLINK = 3 + AF_INET = 2 + AF_INET6 = 19 + AF_INTF = 20 + AF_IUCV = 17 + AF_LAT = 14 + AF_LINK = 18 + AF_MAX = 30 + AF_NBS = 7 + AF_NDD = 23 + AF_NETWARE = 22 + AF_NS = 6 + AF_PUP = 4 + AF_RIF = 21 + AF_ROUTE = 20 + AF_SNA = 11 + AF_UNIX = 1 + AF_UNSPEC = 0 + IBMTCP_IMAGE = 1 + MSG_ACK_EXPECTED = 0x10 + MSG_ACK_GEN = 0x40 + MSG_ACK_TIMEOUT = 0x20 + MSG_CONNTERM = 0x80 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_EOF = 0x8000 + MSG_EOR = 0x8 + MSG_MAXIOVLEN = 16 + MSG_NONBLOCK = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + PRIO_PROCESS = 1 + PRIO_PGRP = 2 + PRIO_USER = 3 + RLIMIT_CPU = 0 + RLIMIT_FSIZE = 1 + RLIMIT_DATA = 2 + RLIMIT_STACK = 3 + RLIMIT_CORE = 4 + RLIMIT_AS = 5 + RLIMIT_NOFILE = 6 + RLIMIT_MEMLIMIT = 7 + RLIM_INFINITY = 2147483647 + SCM_RIGHTS = 0x01 + SF_CLOSE = 0x00000002 + SF_REUSE = 0x00000001 + SHUT_RD = 0 + SHUT_RDWR = 2 + SHUT_WR = 1 + SOCK_CONN_DGRAM = 6 + SOCK_DGRAM = 2 + SOCK_RAW = 3 + SOCK_RDM = 4 + SOCK_SEQPACKET = 5 + SOCK_STREAM = 1 + SOL_SOCKET = 0xffff + SOMAXCONN = 10 + SO_ACCEPTCONN = 0x0002 + SO_ACCEPTECONNABORTED = 0x0006 + SO_ACKNOW = 0x7700 + SO_BROADCAST = 0x0020 + SO_BULKMODE = 0x8000 + SO_CKSUMRECV = 0x0800 + SO_CLOSE = 0x01 + SO_CLUSTERCONNTYPE = 0x00004001 + SO_CLUSTERCONNTYPE_INTERNAL = 8 + SO_CLUSTERCONNTYPE_NOCONN = 0 + SO_CLUSTERCONNTYPE_NONE = 1 + SO_CLUSTERCONNTYPE_SAME_CLUSTER = 2 + SO_CLUSTERCONNTYPE_SAME_IMAGE = 4 + SO_DEBUG = 0x0001 + SO_DONTROUTE = 0x0010 + SO_ERROR = 0x1007 + SO_IGNOREINCOMINGPUSH = 0x1 + SO_IGNORESOURCEVIPA = 0x0002 + SO_KEEPALIVE = 0x0008 + SO_LINGER = 0x0080 + SO_NONBLOCKLOCAL = 0x8001 + SO_NOREUSEADDR = 0x1000 + SO_OOBINLINE = 0x0100 + SO_OPTACK = 0x8004 + SO_OPTMSS = 0x8003 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x0004 + SO_REUSEPORT = 0x0200 + SO_SECINFO = 0x00004002 + SO_SET = 0x0200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TYPE = 0x1008 + SO_UNSET = 0x0400 + SO_USELOOPBACK = 0x0040 + SO_USE_IFBUFS = 0x0400 + S_ISUID = 0x0800 + S_ISGID = 0x0400 + S_ISVTX = 0x0200 + S_IRUSR = 0x0100 + S_IWUSR = 0x0080 + S_IXUSR = 0x0040 + S_IRWXU = 0x01C0 + S_IRGRP = 0x0020 + S_IWGRP = 0x0010 + S_IXGRP = 0x0008 + S_IRWXG = 0x0038 + S_IROTH = 0x0004 + S_IWOTH = 0x0002 + S_IXOTH = 0x0001 + S_IRWXO = 0x0007 + S_IREAD = S_IRUSR + S_IWRITE = S_IWUSR + S_IEXEC = S_IXUSR + S_IFDIR = 0x01000000 + S_IFCHR = 0x02000000 + S_IFREG = 0x03000000 + S_IFFIFO = 0x04000000 + S_IFIFO = 0x04000000 + S_IFLNK = 0x05000000 + S_IFBLK = 0x06000000 + S_IFSOCK = 0x07000000 + S_IFVMEXTL = 0xFE000000 + S_IFVMEXTL_EXEC = 0x00010000 + S_IFVMEXTL_DATA = 0x00020000 + S_IFVMEXTL_MEL = 0x00030000 + S_IFEXTL = 0x00000001 + S_IFPROGCTL = 0x00000002 + S_IFAPFCTL = 0x00000004 + S_IFNOSHARE = 0x00000008 + S_IFSHARELIB = 0x00000010 + S_IFMT = 0xFF000000 + S_IFMST = 0x00FF0000 + TCP_KEEPALIVE = 0x8 + TCP_NODELAY = 0x1 + TIOCGWINSZ = 0x4008a368 + TIOCSWINSZ = 0x8008a367 + TIOCSBRK = 0x2000a77b + TIOCCBRK = 0x2000a77a + TIOCSTI = 0x8001a772 + TIOCGPGRP = 0x4004a777 // _IOR(167, 119, int) + TCSANOW = 0 + TCSETS = 0 // equivalent to TCSANOW for tcsetattr + TCSADRAIN = 1 + TCSETSW = 1 // equivalent to TCSADRAIN for tcsetattr + TCSAFLUSH = 2 + TCSETSF = 2 // equivalent to TCSAFLUSH for tcsetattr + TCGETS = 3 // not defined in ioctl.h -- zos golang only + TCIFLUSH = 0 + TCOFLUSH = 1 + TCIOFLUSH = 2 + TCOOFF = 0 + TCOON = 1 + TCIOFF = 2 + TCION = 3 + TIOCSPGRP = 0x8004a776 + TIOCNOTTY = 0x2000a771 + TIOCEXCL = 0x2000a70d + TIOCNXCL = 0x2000a70e + TIOCGETD = 0x4004a700 + TIOCSETD = 0x8004a701 + TIOCPKT = 0x8004a770 + TIOCSTOP = 0x2000a76f + TIOCSTART = 0x2000a76e + TIOCUCNTL = 0x8004a766 + TIOCREMOTE = 0x8004a769 + TIOCMGET = 0x4004a76a + TIOCMSET = 0x8004a76d + TIOCMBIC = 0x8004a76b + TIOCMBIS = 0x8004a76c + VINTR = 0 + VQUIT = 1 + VERASE = 2 + VKILL = 3 + VEOF = 4 + VEOL = 5 + VMIN = 6 + VSTART = 7 + VSTOP = 8 + VSUSP = 9 + VTIME = 10 + WCONTINUED = 0x4 + WNOHANG = 0x1 + WUNTRACED = 0x2 + _BPX_SWAP = 1 + _BPX_NONSWAP = 2 + MCL_CURRENT = 1 // for Linux compatibility -- no zos semantics + MCL_FUTURE = 2 // for Linux compatibility -- no zos semantics + MCL_ONFAULT = 3 // for Linux compatibility -- no zos semantics + MADV_NORMAL = 0 // for Linux compatibility -- no zos semantics + MADV_RANDOM = 1 // for Linux compatibility -- no zos semantics + MADV_SEQUENTIAL = 2 // for Linux compatibility -- no zos semantics + MADV_WILLNEED = 3 // for Linux compatibility -- no zos semantics + MADV_REMOVE = 4 // for Linux compatibility -- no zos semantics + MADV_DONTFORK = 5 // for Linux compatibility -- no zos semantics + MADV_DOFORK = 6 // for Linux compatibility -- no zos semantics + MADV_HWPOISON = 7 // for Linux compatibility -- no zos semantics + MADV_MERGEABLE = 8 // for Linux compatibility -- no zos semantics + MADV_UNMERGEABLE = 9 // for Linux compatibility -- no zos semantics + MADV_SOFT_OFFLINE = 10 // for Linux compatibility -- no zos semantics + MADV_HUGEPAGE = 11 // for Linux compatibility -- no zos semantics + MADV_NOHUGEPAGE = 12 // for Linux compatibility -- no zos semantics + MADV_DONTDUMP = 13 // for Linux compatibility -- no zos semantics + MADV_DODUMP = 14 // for Linux compatibility -- no zos semantics + MADV_FREE = 15 // for Linux compatibility -- no zos semantics + MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics + MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics + AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics + AT_FDCWD = 2 // for Unix compatibility -- no zos semantics +) + +const ( + EDOM = Errno(1) + ERANGE = Errno(2) + EACCES = Errno(111) + EAGAIN = Errno(112) + EBADF = Errno(113) + EBUSY = Errno(114) + ECHILD = Errno(115) + EDEADLK = Errno(116) + EEXIST = Errno(117) + EFAULT = Errno(118) + EFBIG = Errno(119) + EINTR = Errno(120) + EINVAL = Errno(121) + EIO = Errno(122) + EISDIR = Errno(123) + EMFILE = Errno(124) + EMLINK = Errno(125) + ENAMETOOLONG = Errno(126) + ENFILE = Errno(127) + ENODEV = Errno(128) + ENOENT = Errno(129) + ENOEXEC = Errno(130) + ENOLCK = Errno(131) + ENOMEM = Errno(132) + ENOSPC = Errno(133) + ENOSYS = Errno(134) + ENOTDIR = Errno(135) + ENOTEMPTY = Errno(136) + ENOTTY = Errno(137) + ENXIO = Errno(138) + EPERM = Errno(139) + EPIPE = Errno(140) + EROFS = Errno(141) + ESPIPE = Errno(142) + ESRCH = Errno(143) + EXDEV = Errno(144) + E2BIG = Errno(145) + ELOOP = Errno(146) + EILSEQ = Errno(147) + ENODATA = Errno(148) + EOVERFLOW = Errno(149) + EMVSNOTUP = Errno(150) + ECMSSTORAGE = Errno(151) + EMVSDYNALC = Errno(151) + EMVSCVAF = Errno(152) + EMVSCATLG = Errno(153) + ECMSINITIAL = Errno(156) + EMVSINITIAL = Errno(156) + ECMSERR = Errno(157) + EMVSERR = Errno(157) + EMVSPARM = Errno(158) + ECMSPFSFILE = Errno(159) + EMVSPFSFILE = Errno(159) + EMVSBADCHAR = Errno(160) + ECMSPFSPERM = Errno(162) + EMVSPFSPERM = Errno(162) + EMVSSAFEXTRERR = Errno(163) + EMVSSAF2ERR = Errno(164) + EMVSTODNOTSET = Errno(165) + EMVSPATHOPTS = Errno(166) + EMVSNORTL = Errno(167) + EMVSEXPIRE = Errno(168) + EMVSPASSWORD = Errno(169) + EMVSWLMERROR = Errno(170) + EMVSCPLERROR = Errno(171) + EMVSARMERROR = Errno(172) + ELENOFORK = Errno(200) + ELEMSGERR = Errno(201) + EFPMASKINV = Errno(202) + EFPMODEINV = Errno(203) + EBUFLEN = Errno(227) + EEXTLINK = Errno(228) + ENODD = Errno(229) + ECMSESMERR = Errno(230) + ECPERR = Errno(231) + ELEMULTITHREAD = Errno(232) + ELEFENCE = Errno(244) + EBADDATA = Errno(245) + EUNKNOWN = Errno(246) + ENOTSUP = Errno(247) + EBADNAME = Errno(248) + ENOTSAFE = Errno(249) + ELEMULTITHREADFORK = Errno(257) + ECUNNOENV = Errno(258) + ECUNNOCONV = Errno(259) + ECUNNOTALIGNED = Errno(260) + ECUNERR = Errno(262) + EIBMBADCALL = Errno(1000) + EIBMBADPARM = Errno(1001) + EIBMSOCKOUTOFRANGE = Errno(1002) + EIBMSOCKINUSE = Errno(1003) + EIBMIUCVERR = Errno(1004) + EOFFLOADboxERROR = Errno(1005) + EOFFLOADboxRESTART = Errno(1006) + EOFFLOADboxDOWN = Errno(1007) + EIBMCONFLICT = Errno(1008) + EIBMCANCELLED = Errno(1009) + EIBMBADTCPNAME = Errno(1011) + ENOTBLK = Errno(1100) + ETXTBSY = Errno(1101) + EWOULDBLOCK = Errno(1102) + EINPROGRESS = Errno(1103) + EALREADY = Errno(1104) + ENOTSOCK = Errno(1105) + EDESTADDRREQ = Errno(1106) + EMSGSIZE = Errno(1107) + EPROTOTYPE = Errno(1108) + ENOPROTOOPT = Errno(1109) + EPROTONOSUPPORT = Errno(1110) + ESOCKTNOSUPPORT = Errno(1111) + EOPNOTSUPP = Errno(1112) + EPFNOSUPPORT = Errno(1113) + EAFNOSUPPORT = Errno(1114) + EADDRINUSE = Errno(1115) + EADDRNOTAVAIL = Errno(1116) + ENETDOWN = Errno(1117) + ENETUNREACH = Errno(1118) + ENETRESET = Errno(1119) + ECONNABORTED = Errno(1120) + ECONNRESET = Errno(1121) + ENOBUFS = Errno(1122) + EISCONN = Errno(1123) + ENOTCONN = Errno(1124) + ESHUTDOWN = Errno(1125) + ETOOMANYREFS = Errno(1126) + ETIMEDOUT = Errno(1127) + ECONNREFUSED = Errno(1128) + EHOSTDOWN = Errno(1129) + EHOSTUNREACH = Errno(1130) + EPROCLIM = Errno(1131) + EUSERS = Errno(1132) + EDQUOT = Errno(1133) + ESTALE = Errno(1134) + EREMOTE = Errno(1135) + ENOSTR = Errno(1136) + ETIME = Errno(1137) + ENOSR = Errno(1138) + ENOMSG = Errno(1139) + EBADMSG = Errno(1140) + EIDRM = Errno(1141) + ENONET = Errno(1142) + ERREMOTE = Errno(1143) + ENOLINK = Errno(1144) + EADV = Errno(1145) + ESRMNT = Errno(1146) + ECOMM = Errno(1147) + EPROTO = Errno(1148) + EMULTIHOP = Errno(1149) + EDOTDOT = Errno(1150) + EREMCHG = Errno(1151) + ECANCELED = Errno(1152) + EINTRNODATA = Errno(1159) + ENOREUSE = Errno(1160) + ENOMOVE = Errno(1161) +) + +// Signals +const ( + SIGHUP = Signal(1) + SIGINT = Signal(2) + SIGABRT = Signal(3) + SIGILL = Signal(4) + SIGPOLL = Signal(5) + SIGURG = Signal(6) + SIGSTOP = Signal(7) + SIGFPE = Signal(8) + SIGKILL = Signal(9) + SIGBUS = Signal(10) + SIGSEGV = Signal(11) + SIGSYS = Signal(12) + SIGPIPE = Signal(13) + SIGALRM = Signal(14) + SIGTERM = Signal(15) + SIGUSR1 = Signal(16) + SIGUSR2 = Signal(17) + SIGABND = Signal(18) + SIGCONT = Signal(19) + SIGCHLD = Signal(20) + SIGTTIN = Signal(21) + SIGTTOU = Signal(22) + SIGIO = Signal(23) + SIGQUIT = Signal(24) + SIGTSTP = Signal(25) + SIGTRAP = Signal(26) + SIGIOERR = Signal(27) + SIGWINCH = Signal(28) + SIGXCPU = Signal(29) + SIGXFSZ = Signal(30) + SIGVTALRM = Signal(31) + SIGPROF = Signal(32) + SIGDANGER = Signal(33) + SIGTHSTOP = Signal(34) + SIGTHCONT = Signal(35) + SIGTRACE = Signal(37) + SIGDCE = Signal(38) + SIGDUMP = Signal(39) +) + +// Error table +var errorList = [...]struct { + num Errno + name string + desc string +}{ + {1, "EDC5001I", "A domain error occurred."}, + {2, "EDC5002I", "A range error occurred."}, + {111, "EDC5111I", "Permission denied."}, + {112, "EDC5112I", "Resource temporarily unavailable."}, + {113, "EDC5113I", "Bad file descriptor."}, + {114, "EDC5114I", "Resource busy."}, + {115, "EDC5115I", "No child processes."}, + {116, "EDC5116I", "Resource deadlock avoided."}, + {117, "EDC5117I", "File exists."}, + {118, "EDC5118I", "Incorrect address."}, + {119, "EDC5119I", "File too large."}, + {120, "EDC5120I", "Interrupted function call."}, + {121, "EDC5121I", "Invalid argument."}, + {122, "EDC5122I", "Input/output error."}, + {123, "EDC5123I", "Is a directory."}, + {124, "EDC5124I", "Too many open files."}, + {125, "EDC5125I", "Too many links."}, + {126, "EDC5126I", "Filename too long."}, + {127, "EDC5127I", "Too many open files in system."}, + {128, "EDC5128I", "No such device."}, + {129, "EDC5129I", "No such file or directory."}, + {130, "EDC5130I", "Exec format error."}, + {131, "EDC5131I", "No locks available."}, + {132, "EDC5132I", "Not enough memory."}, + {133, "EDC5133I", "No space left on device."}, + {134, "EDC5134I", "Function not implemented."}, + {135, "EDC5135I", "Not a directory."}, + {136, "EDC5136I", "Directory not empty."}, + {137, "EDC5137I", "Inappropriate I/O control operation."}, + {138, "EDC5138I", "No such device or address."}, + {139, "EDC5139I", "Operation not permitted."}, + {140, "EDC5140I", "Broken pipe."}, + {141, "EDC5141I", "Read-only file system."}, + {142, "EDC5142I", "Invalid seek."}, + {143, "EDC5143I", "No such process."}, + {144, "EDC5144I", "Improper link."}, + {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."}, + {146, "EDC5146I", "Too many levels of symbolic links."}, + {147, "EDC5147I", "Illegal byte sequence."}, + {148, "", ""}, + {149, "EDC5149I", "Value Overflow Error."}, + {150, "EDC5150I", "UNIX System Services is not active."}, + {151, "EDC5151I", "Dynamic allocation error."}, + {152, "EDC5152I", "Common VTOC access facility (CVAF) error."}, + {153, "EDC5153I", "Catalog obtain error."}, + {156, "EDC5156I", "Process initialization error."}, + {157, "EDC5157I", "An internal error has occurred."}, + {158, "EDC5158I", "Bad parameters were passed to the service."}, + {159, "EDC5159I", "The Physical File System encountered a permanent file error."}, + {160, "EDC5160I", "Bad character in environment variable name."}, + {162, "EDC5162I", "The Physical File System encountered a system error."}, + {163, "EDC5163I", "SAF/RACF extract error."}, + {164, "EDC5164I", "SAF/RACF error."}, + {165, "EDC5165I", "System TOD clock not set."}, + {166, "EDC5166I", "Access mode argument on function call conflicts with PATHOPTS parameter on JCL DD statement."}, + {167, "EDC5167I", "Access to the UNIX System Services version of the C RTL is denied."}, + {168, "EDC5168I", "Password has expired."}, + {169, "EDC5169I", "Password is invalid."}, + {170, "EDC5170I", "An error was encountered with WLM."}, + {171, "EDC5171I", "An error was encountered with CPL."}, + {172, "EDC5172I", "An error was encountered with Application Response Measurement (ARM) component."}, + {200, "EDC5200I", "The application contains a Language Environment member language that cannot tolerate a fork()."}, + {201, "EDC5201I", "The Language Environment message file was not found in the hierarchical file system."}, + {202, "EDC5202E", "DLL facilities are not supported under SPC environment."}, + {203, "EDC5203E", "DLL facilities are not supported under POSIX environment."}, + {227, "EDC5227I", "Buffer is not long enough to contain a path definition"}, + {228, "EDC5228I", "The file referred to is an external link"}, + {229, "EDC5229I", "No path definition for ddname in effect"}, + {230, "EDC5230I", "ESM error."}, + {231, "EDC5231I", "CP or the external security manager had an error"}, + {232, "EDC5232I", "The function failed because it was invoked from a multithread environment."}, + {244, "EDC5244I", "The program, module or DLL is not supported in this environment."}, + {245, "EDC5245I", "Data is not valid."}, + {246, "EDC5246I", "Unknown system state."}, + {247, "EDC5247I", "Operation not supported."}, + {248, "EDC5248I", "The object name specified is not correct."}, + {249, "EDC5249I", "The function is not allowed."}, + {257, "EDC5257I", "Function cannot be called in the child process of a fork() from a multithreaded process until exec() is called."}, + {258, "EDC5258I", "A CUN_RS_NO_UNI_ENV error was issued by Unicode Services."}, + {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."}, + {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."}, + {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."}, + {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."}, + {1001, "EDC8001I", "An error was found in the IUCV header."}, + {1002, "EDC8002I", "A socket descriptor is out of range."}, + {1003, "EDC8003I", "A socket descriptor is in use."}, + {1004, "EDC8004I", "Request failed because of an IUCV error."}, + {1005, "EDC8005I", "Offload box error."}, + {1006, "EDC8006I", "Offload box restarted."}, + {1007, "EDC8007I", "Offload box down."}, + {1008, "EDC8008I", "Already a conflicting call outstanding on socket."}, + {1009, "EDC8009I", "Request cancelled using a SOCKcallCANCEL request."}, + {1011, "EDC8011I", "A name of a PFS was specified that either is not configured or is not a Sockets PFS."}, + {1100, "EDC8100I", "Block device required."}, + {1101, "EDC8101I", "Text file busy."}, + {1102, "EDC8102I", "Operation would block."}, + {1103, "EDC8103I", "Operation now in progress."}, + {1104, "EDC8104I", "Connection already in progress."}, + {1105, "EDC8105I", "Socket operation on non-socket."}, + {1106, "EDC8106I", "Destination address required."}, + {1107, "EDC8107I", "Message too long."}, + {1108, "EDC8108I", "Protocol wrong type for socket."}, + {1109, "EDC8109I", "Protocol not available."}, + {1110, "EDC8110I", "Protocol not supported."}, + {1111, "EDC8111I", "Socket type not supported."}, + {1112, "EDC8112I", "Operation not supported on socket."}, + {1113, "EDC8113I", "Protocol family not supported."}, + {1114, "EDC8114I", "Address family not supported."}, + {1115, "EDC8115I", "Address already in use."}, + {1116, "EDC8116I", "Address not available."}, + {1117, "EDC8117I", "Network is down."}, + {1118, "EDC8118I", "Network is unreachable."}, + {1119, "EDC8119I", "Network dropped connection on reset."}, + {1120, "EDC8120I", "Connection ended abnormally."}, + {1121, "EDC8121I", "Connection reset."}, + {1122, "EDC8122I", "No buffer space available."}, + {1123, "EDC8123I", "Socket already connected."}, + {1124, "EDC8124I", "Socket not connected."}, + {1125, "EDC8125I", "Can't send after socket shutdown."}, + {1126, "EDC8126I", "Too many references; can't splice."}, + {1127, "EDC8127I", "Connection timed out."}, + {1128, "EDC8128I", "Connection refused."}, + {1129, "EDC8129I", "Host is not available."}, + {1130, "EDC8130I", "Host cannot be reached."}, + {1131, "EDC8131I", "Too many processes."}, + {1132, "EDC8132I", "Too many users."}, + {1133, "EDC8133I", "Disk quota exceeded."}, + {1134, "EDC8134I", "Stale file handle."}, + {1135, "", ""}, + {1136, "EDC8136I", "File is not a STREAM."}, + {1137, "EDC8137I", "STREAMS ioctl() timeout."}, + {1138, "EDC8138I", "No STREAMS resources."}, + {1139, "EDC8139I", "The message identified by set_id and msg_id is not in the message catalog."}, + {1140, "EDC8140I", "Bad message."}, + {1141, "EDC8141I", "Identifier removed."}, + {1142, "", ""}, + {1143, "", ""}, + {1144, "EDC8144I", "The link has been severed."}, + {1145, "", ""}, + {1146, "", ""}, + {1147, "", ""}, + {1148, "EDC8148I", "Protocol error."}, + {1149, "EDC8149I", "Multihop not allowed."}, + {1150, "", ""}, + {1151, "", ""}, + {1152, "EDC8152I", "The asynchronous I/O request has been canceled."}, + {1159, "EDC8159I", "Function call was interrupted before any data was received."}, + {1160, "EDC8160I", "Socket reuse is not supported."}, + {1161, "EDC8161I", "The file system cannot currently be moved."}, +} + +// Signal table +var signalList = [...]struct { + num Signal + name string + desc string +}{ + {1, "SIGHUP", "hangup"}, + {2, "SIGINT", "interrupt"}, + {3, "SIGABT", "aborted"}, + {4, "SIGILL", "illegal instruction"}, + {5, "SIGPOLL", "pollable event"}, + {6, "SIGURG", "urgent I/O condition"}, + {7, "SIGSTOP", "stop process"}, + {8, "SIGFPE", "floating point exception"}, + {9, "SIGKILL", "killed"}, + {10, "SIGBUS", "bus error"}, + {11, "SIGSEGV", "segmentation fault"}, + {12, "SIGSYS", "bad argument to routine"}, + {13, "SIGPIPE", "broken pipe"}, + {14, "SIGALRM", "alarm clock"}, + {15, "SIGTERM", "terminated"}, + {16, "SIGUSR1", "user defined signal 1"}, + {17, "SIGUSR2", "user defined signal 2"}, + {18, "SIGABND", "abend"}, + {19, "SIGCONT", "continued"}, + {20, "SIGCHLD", "child exited"}, + {21, "SIGTTIN", "stopped (tty input)"}, + {22, "SIGTTOU", "stopped (tty output)"}, + {23, "SIGIO", "I/O possible"}, + {24, "SIGQUIT", "quit"}, + {25, "SIGTSTP", "stopped"}, + {26, "SIGTRAP", "trace/breakpoint trap"}, + {27, "SIGIOER", "I/O error"}, + {28, "SIGWINCH", "window changed"}, + {29, "SIGXCPU", "CPU time limit exceeded"}, + {30, "SIGXFSZ", "file size limit exceeded"}, + {31, "SIGVTALRM", "virtual timer expired"}, + {32, "SIGPROF", "profiling timer expired"}, + {33, "SIGDANGER", "danger"}, + {34, "SIGTHSTOP", "stop thread"}, + {35, "SIGTHCONT", "continue thread"}, + {37, "SIGTRACE", "trace"}, + {38, "", "DCE"}, + {39, "SIGDUMP", "dump"}, +} diff --git a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go index 89c5920e0..bd001a6e1 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go @@ -1,5 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. +//go:build linux && (arm || arm64) // +build linux // +build arm arm64 diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go index 24b841eec..c34d0639b 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go @@ -1,5 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. +//go:build linux && (mips || mips64) // +build linux // +build mips mips64 diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go index 47b048956..3ccf0c0c4 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go @@ -1,5 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. +//go:build linux && (mipsle || mips64le) // +build linux // +build mipsle mips64le diff --git a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go index ea5d9cb53..7d6585700 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go @@ -1,5 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. +//go:build linux && (386 || amd64) // +build linux // +build 386 amd64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go index ed657ff1b..91a23cc72 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go @@ -1,6 +1,7 @@ // go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build aix && ppc // +build aix,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go index 664b293b4..33c2609b8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go @@ -1,6 +1,7 @@ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build aix && ppc64 // +build aix,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go index 0550da06d..8b737fa97 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go @@ -1,8 +1,8 @@ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. -// +build aix,ppc64 -// +build gc +//go:build aix && ppc64 && gc +// +build aix,ppc64,gc package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go index cde4dbc5f..3c260917e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go @@ -1,8 +1,8 @@ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. -// +build aix,ppc64 -// +build gccgo +//go:build aix && ppc64 && gccgo +// +build aix,ppc64,gccgo package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go index c8c142c59..48a62e390 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && 386 && go1.13 // +build darwin,386,go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go index 387718348..a266636af 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags darwin,386,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && 386 && go1.12 // +build darwin,386,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go index 888262361..e36299ead 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && amd64 && go1.13 // +build darwin,amd64,go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 508e5639b..f41116288 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && amd64 && go1.12 // +build darwin,amd64,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go index de4738fff..ed437f89a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && arm && go1.13 // +build darwin,arm,go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go index c0c771f40..7f88cb5ea 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags darwin,arm,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && arm && go1.12 // +build darwin,arm,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go index 870eb37ab..d30ec4e29 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && arm64 && go1.13 // +build darwin,arm64,go1.13 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 9b01a79c4..a10df58d0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build darwin && arm64 && go1.12 // +build darwin,arm64,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 1aaccd361..1b6eedfa6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build dragonfly && amd64 // +build dragonfly,amd64 package unix @@ -362,8 +363,10 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) +func pipe2(p *[2]_C_int, flags int) (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + r = int(r0) + w = int(r1) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 600f1d26d..3e9bddb7b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build freebsd && 386 // +build freebsd,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 064934b0d..c72a462b9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build freebsd && amd64 // +build freebsd,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index 31d2c4616..530d5df90 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build freebsd && arm // +build freebsd,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index 4adaaa561..71e7df9e8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build freebsd && arm64 // +build freebsd,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go index 665dd9e4b..af5cb064e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build illumos && amd64 // +build illumos,amd64 package unix @@ -14,19 +15,25 @@ import ( //go:cgo_import_dynamic libc_writev writev "libc.so" //go:cgo_import_dynamic libc_pwritev pwritev "libc.so" //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so" +//go:cgo_import_dynamic libc_putmsg putmsg "libc.so" +//go:cgo_import_dynamic libc_getmsg getmsg "libc.so" //go:linkname procreadv libc_readv //go:linkname procpreadv libc_preadv //go:linkname procwritev libc_writev //go:linkname procpwritev libc_pwritev //go:linkname procaccept4 libc_accept4 +//go:linkname procputmsg libc_putmsg +//go:linkname procgetmsg libc_getmsg var ( procreadv, procpreadv, procwritev, procpwritev, - procaccept4 syscallFunc + procaccept4, + procputmsg, + procgetmsg syscallFunc ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT @@ -99,3 +106,23 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 2fbbbe5a8..7305cc915 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1,5 +1,6 @@ // Code generated by mkmerge.go; DO NOT EDIT. +//go:build linux // +build linux package unix @@ -531,6 +532,16 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CloseRange(first uint, last uint, flags uint) (err error) { + _, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 19ebd3ff7..e37096e4d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && 386 // +build linux,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 5c562182a..9919d8486 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && amd64 // +build linux,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index dc69d99c6..076754d48 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && arm // +build linux,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 1b897dee0..e893f987f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && arm64 // +build linux,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 49186843a..4703cf3c3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -1,6 +1,7 @@ // go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && mips // +build linux,mips package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index 9171d3bd2..a134f9a4d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && mips64 // +build linux,mips64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index 82286f04f..b1fff2d94 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && mips64le // +build linux,mips64le package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 15920621c..d13d6da01 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && mipsle // +build linux,mipsle package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 73a42e2cc..da8ec0396 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && ppc64 // +build linux,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 6b8559536..083f493bb 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && ppc64le // +build linux,ppc64le package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index b76133447..63b393b80 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && riscv64 // +build linux,riscv64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index d7032ab1e..bb347407d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && s390x // +build linux,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index bcbbdd906..8edc517e1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build linux && sparc64 // +build linux,sparc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 3bbd9e39c..4726ab30a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build netbsd && 386 // +build netbsd,386 package unix @@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index d8cf5012c..fe71456db 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build netbsd && amd64 // +build netbsd,amd64 package unix @@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 1153fe69b..0b5b2f014 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build netbsd && arm // +build netbsd,arm package unix @@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 24b4ebb41..bfca28648 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build netbsd && arm64 // +build netbsd,arm64 package unix @@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index b44b31aeb..8f80f4ade 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build openbsd && 386 // +build openbsd,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 67f93ee76..3a47aca7b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build openbsd && amd64 // +build openbsd,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index d7c878b1d..883a9b45e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1,6 +1,7 @@ // go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build openbsd && arm // +build openbsd,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 8facd695d..aac7fdc95 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build openbsd && arm64 // +build openbsd,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index ec6bd5bb7..877618746 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1,6 +1,7 @@ // go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build openbsd && mips64 // +build openbsd,mips64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 6dbb83716..4e18d5c99 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -1,6 +1,7 @@ // go run mksyscall_solaris.go -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build solaris && amd64 // +build solaris,amd64 package unix @@ -115,6 +116,7 @@ import ( //go:cgo_import_dynamic libc_statvfs statvfs "libc.so" //go:cgo_import_dynamic libc_symlink symlink "libc.so" //go:cgo_import_dynamic libc_sync sync "libc.so" +//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" //go:cgo_import_dynamic libc_times times "libc.so" //go:cgo_import_dynamic libc_truncate truncate "libc.so" //go:cgo_import_dynamic libc_fsync fsync "libc.so" @@ -245,6 +247,7 @@ import ( //go:linkname procStatvfs libc_statvfs //go:linkname procSymlink libc_symlink //go:linkname procSync libc_sync +//go:linkname procSysconf libc_sysconf //go:linkname procTimes libc_times //go:linkname procTruncate libc_truncate //go:linkname procFsync libc_fsync @@ -376,6 +379,7 @@ var ( procStatvfs, procSymlink, procSync, + procSysconf, procTimes, procTruncate, procFsync, @@ -615,8 +619,9 @@ func __minor(version int, dev uint64) (val uint) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) +func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) + ret = int(r0) if e1 != 0 { err = e1 } @@ -1687,6 +1692,17 @@ func Sync() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Sysconf(which int) (n int64, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 0, 0) + n = int64(r0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Times(tms *Tms) (ticks uintptr, err error) { r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0) ticks = uintptr(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go new file mode 100644 index 000000000..8285ab841 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go @@ -0,0 +1,1217 @@ +// go run mksyscall.go -tags zos,s390x syscall_zos_s390x.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +import ( + "unsafe" +) + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := syscall_syscall(SYS___ACCEPT_A, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := syscall_syscall(SYS___BIND_A, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := syscall_syscall(SYS___CONNECT_A, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := syscall_rawsyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := syscall_syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := syscall_syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := syscall_rawsyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := syscall_rawsyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := syscall_rawsyscall(SYS___GETPEERNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := syscall_rawsyscall(SYS___GETSOCKNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(SYS___RECVFROM_A, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(SYS___SENDTO_A, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(SYS___RECVMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(SYS___SENDMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := syscall_syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := syscall_syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___ACCESS_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___CHDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___CHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___CHMOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Creat(path string, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := syscall_syscall(SYS___CREAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := syscall_syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := syscall_syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + syscall_syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := syscall_syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := syscall_syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := syscall_syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { + r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + retval = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fstat(fd int, stat *Stat_LE_t) (err error) { + _, _, e1 := syscall_syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatvfs(fd int, stat *Statvfs_t) (err error) { + _, _, e1 := syscall_syscall(SYS_FSTATVFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := syscall_syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := syscall_syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpagesize() (pgsize int) { + r0, _, _ := syscall_syscall(SYS_GETPAGESIZE, 0, 0, 0) + pgsize = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Poll(fds []PollFd, timeout int) (n int, err error) { + var _p0 unsafe.Pointer + if len(fds) > 0 { + _p0 = unsafe.Pointer(&fds[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(SYS_POLL, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := syscall_syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func W_Getmntent(buff *byte, size int) (lastsys int, err error) { + r0, _, e1 := syscall_syscall(SYS_W_GETMNTENT, uintptr(unsafe.Pointer(buff)), uintptr(size), 0) + lastsys = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mount(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(filesystem) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + var _p3 *byte + _p3, err = BytePtrFromString(parm) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(SYS___MOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(filesystem string, mtm int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(filesystem) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___UMOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mtm), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___CHROOT_A, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := syscall_rawsyscall(SYS___UNAME_A, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gethostname(buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall(SYS___GETHOSTNAME_A, uintptr(_p0), uintptr(len(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := syscall_rawsyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (pid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETPPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := syscall_syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrusage(who int, rusage *rusage_zos) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := syscall_rawsyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := syscall_rawsyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig Signal) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___LCHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___LINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := syscall_syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func lstat(path string, stat *Stat_LE_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___LSTAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___MKDIR_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___MKFIFO_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___MKNOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(SYS___READLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___RENAME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___RMDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := syscall_syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := syscall_syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, lim *Rlimit) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := syscall_rawsyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := syscall_syscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(uid int) (err error) { + _, _, e1 := syscall_syscall(SYS_SETGID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := syscall_syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, statLE *Stat_LE_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___STAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___SYMLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + syscall_syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___TRUNCATE_A, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tcgetattr(fildes int, termptr *Termios) (err error) { + _, _, e1 := syscall_syscall(SYS_TCGETATTR, uintptr(fildes), uintptr(unsafe.Pointer(termptr)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { + _, _, e1 := syscall_syscall(SYS_TCSETATTR, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := syscall_syscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___UNLINK_A, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, utim *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___UTIME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := syscall_syscall(SYS___OPEN_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { + r0, _, e1 := syscall_syscall(SYS_WAITPID, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tv *timeval_zos) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := syscall_rawsyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(SYS___UTIMES_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go index 102f1ab47..9e9d0b2a9 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go @@ -1,6 +1,7 @@ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. +//go:build 386 && openbsd // +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go index 4866fced8..adecd0966 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -1,6 +1,7 @@ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. +//go:build amd64 && openbsd // +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go index d3801eb24..8ea52a4a1 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -1,6 +1,7 @@ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. +//go:build arm && openbsd // +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go index ba4304fd2..154b57ae3 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go @@ -1,6 +1,7 @@ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && openbsd // +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go index aca34b349..d96bb2ba4 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go @@ -1,6 +1,7 @@ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. +//go:build mips64 && openbsd // +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go index ad62324c7..1794ffc92 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go @@ -1,6 +1,7 @@ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && darwin // +build 386,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go index a2fc91d6a..f8298ff9b 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go @@ -1,6 +1,7 @@ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && darwin // +build amd64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go index 20d7808ac..6dc736449 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go @@ -1,6 +1,7 @@ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && darwin // +build arm,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go index 527b9588c..5eb433bbf 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -1,6 +1,7 @@ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && darwin // +build arm64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go index 9912c6ee3..703675c0c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && dragonfly // +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go index 9474974b6..59d5dfc20 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && freebsd // +build 386,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go index 48a7beae7..342d471d2 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && freebsd // +build amd64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go index 4a6dfd4a7..e2e3d72c5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && freebsd // +build arm,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go index 3e51af8ed..61ad5ca3c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && freebsd // +build arm64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index f6742bdee..8e5359713 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && linux // +build 386,linux package unix @@ -436,4 +437,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index f7e525573..d7dceb769 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && linux // +build amd64,linux package unix @@ -358,4 +359,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 3f60977da..04093a69f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && linux // +build arm,linux package unix @@ -400,4 +401,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index dbedf4cba..48f94f135 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && linux // +build arm64,linux package unix @@ -303,4 +304,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index eeff7e1dc..499978c3e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips && linux // +build mips,linux package unix @@ -421,4 +422,5 @@ const ( SYS_PIDFD_GETFD = 4438 SYS_FACCESSAT2 = 4439 SYS_PROCESS_MADVISE = 4440 + SYS_EPOLL_PWAIT2 = 4441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 73cfa535c..10d1db2be 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && linux // +build mips64,linux package unix @@ -351,4 +352,5 @@ const ( SYS_PIDFD_GETFD = 5438 SYS_FACCESSAT2 = 5439 SYS_PROCESS_MADVISE = 5440 + SYS_EPOLL_PWAIT2 = 5441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index be74729e0..208d5dcd5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64le && linux // +build mips64le,linux package unix @@ -351,4 +352,5 @@ const ( SYS_PIDFD_GETFD = 5438 SYS_FACCESSAT2 = 5439 SYS_PROCESS_MADVISE = 5440 + SYS_EPOLL_PWAIT2 = 5441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 2a1047c81..f8250602e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mipsle && linux // +build mipsle,linux package unix @@ -421,4 +422,5 @@ const ( SYS_PIDFD_GETFD = 4438 SYS_FACCESSAT2 = 4439 SYS_PROCESS_MADVISE = 4440 + SYS_EPOLL_PWAIT2 = 4441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index 32707428c..d5ed3ff51 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64 && linux // +build ppc64,linux package unix @@ -400,4 +401,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index a58572f78..e29b4424c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64le && linux // +build ppc64le,linux package unix @@ -400,4 +401,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 72a65b760..41deed6c3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build riscv64 && linux // +build riscv64,linux package unix @@ -302,4 +303,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 1fb9ae5d4..8e53a9e8c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build s390x && linux // +build s390x,linux package unix @@ -365,4 +366,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 57636e09e..596e5bc7d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -1,6 +1,7 @@ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build sparc64 && linux // +build sparc64,linux package unix @@ -379,4 +380,5 @@ const ( SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 + SYS_EPOLL_PWAIT2 = 441 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go index e66a8c9d3..3a6699eba 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go @@ -1,6 +1,7 @@ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && netbsd // +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go index 42c788f24..5677cd4f1 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go @@ -1,6 +1,7 @@ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && netbsd // +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go index 0a0757179..e784cb6db 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go @@ -1,6 +1,7 @@ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && netbsd // +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go index 0291c0931..bd4952efa 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go @@ -1,6 +1,7 @@ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; DO NOT EDIT. +//go:build arm64 && netbsd // +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go index b0207d1c9..817edbf95 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && openbsd // +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go index f0dec6f0b..ea453614e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && openbsd // +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go index 33d1dc540..467971eed 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && openbsd // +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go index fe2b689b6..32eec5ed5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && openbsd // +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go index 5c08d573b..a37f77375 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go @@ -1,6 +1,7 @@ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && openbsd // +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go new file mode 100644 index 000000000..073daad43 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go @@ -0,0 +1,2670 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +package unix + +// TODO: auto-generate. + +const ( + SYS_ACOSD128 = 0xB80 + SYS_ACOSD32 = 0xB7E + SYS_ACOSD64 = 0xB7F + SYS_ACOSHD128 = 0xB83 + SYS_ACOSHD32 = 0xB81 + SYS_ACOSHD64 = 0xB82 + SYS_AIO_FSYNC = 0xC69 + SYS_ASCTIME = 0x0AE + SYS_ASCTIME64 = 0xCD7 + SYS_ASCTIME64_R = 0xCD8 + SYS_ASIND128 = 0xB86 + SYS_ASIND32 = 0xB84 + SYS_ASIND64 = 0xB85 + SYS_ASINHD128 = 0xB89 + SYS_ASINHD32 = 0xB87 + SYS_ASINHD64 = 0xB88 + SYS_ATAN2D128 = 0xB8F + SYS_ATAN2D32 = 0xB8D + SYS_ATAN2D64 = 0xB8E + SYS_ATAND128 = 0xB8C + SYS_ATAND32 = 0xB8A + SYS_ATAND64 = 0xB8B + SYS_ATANHD128 = 0xB92 + SYS_ATANHD32 = 0xB90 + SYS_ATANHD64 = 0xB91 + SYS_BIND2ADDRSEL = 0xD59 + SYS_C16RTOMB = 0xD40 + SYS_C32RTOMB = 0xD41 + SYS_CBRTD128 = 0xB95 + SYS_CBRTD32 = 0xB93 + SYS_CBRTD64 = 0xB94 + SYS_CEILD128 = 0xB98 + SYS_CEILD32 = 0xB96 + SYS_CEILD64 = 0xB97 + SYS_CLEARENV = 0x0C9 + SYS_CLEARERR_UNLOCKED = 0xCA1 + SYS_CLOCK = 0x0AA + SYS_CLOGL = 0xA00 + SYS_CLRMEMF = 0x0BD + SYS_CONJ = 0xA03 + SYS_CONJF = 0xA06 + SYS_CONJL = 0xA09 + SYS_COPYSIGND128 = 0xB9E + SYS_COPYSIGND32 = 0xB9C + SYS_COPYSIGND64 = 0xB9D + SYS_COSD128 = 0xBA1 + SYS_COSD32 = 0xB9F + SYS_COSD64 = 0xBA0 + SYS_COSHD128 = 0xBA4 + SYS_COSHD32 = 0xBA2 + SYS_COSHD64 = 0xBA3 + SYS_CPOW = 0xA0C + SYS_CPOWF = 0xA0F + SYS_CPOWL = 0xA12 + SYS_CPROJ = 0xA15 + SYS_CPROJF = 0xA18 + SYS_CPROJL = 0xA1B + SYS_CREAL = 0xA1E + SYS_CREALF = 0xA21 + SYS_CREALL = 0xA24 + SYS_CSIN = 0xA27 + SYS_CSINF = 0xA2A + SYS_CSINH = 0xA30 + SYS_CSINHF = 0xA33 + SYS_CSINHL = 0xA36 + SYS_CSINL = 0xA2D + SYS_CSNAP = 0x0C5 + SYS_CSQRT = 0xA39 + SYS_CSQRTF = 0xA3C + SYS_CSQRTL = 0xA3F + SYS_CTAN = 0xA42 + SYS_CTANF = 0xA45 + SYS_CTANH = 0xA4B + SYS_CTANHF = 0xA4E + SYS_CTANHL = 0xA51 + SYS_CTANL = 0xA48 + SYS_CTIME = 0x0AB + SYS_CTIME64 = 0xCD9 + SYS_CTIME64_R = 0xCDA + SYS_CTRACE = 0x0C6 + SYS_DIFFTIME = 0x0A7 + SYS_DIFFTIME64 = 0xCDB + SYS_DLADDR = 0xC82 + SYS_DYNALLOC = 0x0C3 + SYS_DYNFREE = 0x0C2 + SYS_ERFCD128 = 0xBAA + SYS_ERFCD32 = 0xBA8 + SYS_ERFCD64 = 0xBA9 + SYS_ERFD128 = 0xBA7 + SYS_ERFD32 = 0xBA5 + SYS_ERFD64 = 0xBA6 + SYS_EXP2D128 = 0xBB0 + SYS_EXP2D32 = 0xBAE + SYS_EXP2D64 = 0xBAF + SYS_EXPD128 = 0xBAD + SYS_EXPD32 = 0xBAB + SYS_EXPD64 = 0xBAC + SYS_EXPM1D128 = 0xBB3 + SYS_EXPM1D32 = 0xBB1 + SYS_EXPM1D64 = 0xBB2 + SYS_FABSD128 = 0xBB6 + SYS_FABSD32 = 0xBB4 + SYS_FABSD64 = 0xBB5 + SYS_FDELREC_UNLOCKED = 0xCA2 + SYS_FDIMD128 = 0xBB9 + SYS_FDIMD32 = 0xBB7 + SYS_FDIMD64 = 0xBB8 + SYS_FDOPEN_UNLOCKED = 0xCFC + SYS_FECLEAREXCEPT = 0xAEA + SYS_FEGETENV = 0xAEB + SYS_FEGETEXCEPTFLAG = 0xAEC + SYS_FEGETROUND = 0xAED + SYS_FEHOLDEXCEPT = 0xAEE + SYS_FEOF_UNLOCKED = 0xCA3 + SYS_FERAISEEXCEPT = 0xAEF + SYS_FERROR_UNLOCKED = 0xCA4 + SYS_FESETENV = 0xAF0 + SYS_FESETEXCEPTFLAG = 0xAF1 + SYS_FESETROUND = 0xAF2 + SYS_FETCHEP = 0x0BF + SYS_FETESTEXCEPT = 0xAF3 + SYS_FEUPDATEENV = 0xAF4 + SYS_FE_DEC_GETROUND = 0xBBA + SYS_FE_DEC_SETROUND = 0xBBB + SYS_FFLUSH_UNLOCKED = 0xCA5 + SYS_FGETC_UNLOCKED = 0xC80 + SYS_FGETPOS64 = 0xCEE + SYS_FGETPOS64_UNLOCKED = 0xCF4 + SYS_FGETPOS_UNLOCKED = 0xCA6 + SYS_FGETS_UNLOCKED = 0xC7C + SYS_FGETWC_UNLOCKED = 0xCA7 + SYS_FGETWS_UNLOCKED = 0xCA8 + SYS_FILENO_UNLOCKED = 0xCA9 + SYS_FLDATA = 0x0C1 + SYS_FLDATA_UNLOCKED = 0xCAA + SYS_FLOCATE_UNLOCKED = 0xCAB + SYS_FLOORD128 = 0xBBE + SYS_FLOORD32 = 0xBBC + SYS_FLOORD64 = 0xBBD + SYS_FMA = 0xA63 + SYS_FMAD128 = 0xBC1 + SYS_FMAD32 = 0xBBF + SYS_FMAD64 = 0xBC0 + SYS_FMAF = 0xA66 + SYS_FMAL = 0xA69 + SYS_FMAX = 0xA6C + SYS_FMAXD128 = 0xBC4 + SYS_FMAXD32 = 0xBC2 + SYS_FMAXD64 = 0xBC3 + SYS_FMAXF = 0xA6F + SYS_FMAXL = 0xA72 + SYS_FMIN = 0xA75 + SYS_FMIND128 = 0xBC7 + SYS_FMIND32 = 0xBC5 + SYS_FMIND64 = 0xBC6 + SYS_FMINF = 0xA78 + SYS_FMINL = 0xA7B + SYS_FMODD128 = 0xBCA + SYS_FMODD32 = 0xBC8 + SYS_FMODD64 = 0xBC9 + SYS_FOPEN64 = 0xD49 + SYS_FOPEN64_UNLOCKED = 0xD4A + SYS_FOPEN_UNLOCKED = 0xCFA + SYS_FPRINTF_UNLOCKED = 0xCAC + SYS_FPUTC_UNLOCKED = 0xC81 + SYS_FPUTS_UNLOCKED = 0xC7E + SYS_FPUTWC_UNLOCKED = 0xCAD + SYS_FPUTWS_UNLOCKED = 0xCAE + SYS_FREAD_NOUPDATE = 0xCEC + SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED + SYS_FREAD_UNLOCKED = 0xC7B + SYS_FREEIFADDRS = 0xCE6 + SYS_FREOPEN64 = 0xD4B + SYS_FREOPEN64_UNLOCKED = 0xD4C + SYS_FREOPEN_UNLOCKED = 0xCFB + SYS_FREXPD128 = 0xBCE + SYS_FREXPD32 = 0xBCC + SYS_FREXPD64 = 0xBCD + SYS_FSCANF_UNLOCKED = 0xCAF + SYS_FSEEK64 = 0xCEF + SYS_FSEEK64_UNLOCKED = 0xCF5 + SYS_FSEEKO64 = 0xCF0 + SYS_FSEEKO64_UNLOCKED = 0xCF6 + SYS_FSEEKO_UNLOCKED = 0xCB1 + SYS_FSEEK_UNLOCKED = 0xCB0 + SYS_FSETPOS64 = 0xCF1 + SYS_FSETPOS64_UNLOCKED = 0xCF7 + SYS_FSETPOS_UNLOCKED = 0xCB3 + SYS_FTELL64 = 0xCF2 + SYS_FTELL64_UNLOCKED = 0xCF8 + SYS_FTELLO64 = 0xCF3 + SYS_FTELLO64_UNLOCKED = 0xCF9 + SYS_FTELLO_UNLOCKED = 0xCB5 + SYS_FTELL_UNLOCKED = 0xCB4 + SYS_FUPDATE = 0x0B5 + SYS_FUPDATE_UNLOCKED = 0xCB7 + SYS_FWIDE_UNLOCKED = 0xCB8 + SYS_FWPRINTF_UNLOCKED = 0xCB9 + SYS_FWRITE_UNLOCKED = 0xC7A + SYS_FWSCANF_UNLOCKED = 0xCBA + SYS_GETDATE64 = 0xD4F + SYS_GETIFADDRS = 0xCE7 + SYS_GETIPV4SOURCEFILTER = 0xC77 + SYS_GETSOURCEFILTER = 0xC79 + SYS_GETSYNTX = 0x0FD + SYS_GETS_UNLOCKED = 0xC7D + SYS_GETTIMEOFDAY64 = 0xD50 + SYS_GETWCHAR_UNLOCKED = 0xCBC + SYS_GETWC_UNLOCKED = 0xCBB + SYS_GMTIME = 0x0B0 + SYS_GMTIME64 = 0xCDC + SYS_GMTIME64_R = 0xCDD + SYS_HYPOTD128 = 0xBD1 + SYS_HYPOTD32 = 0xBCF + SYS_HYPOTD64 = 0xBD0 + SYS_ILOGBD128 = 0xBD4 + SYS_ILOGBD32 = 0xBD2 + SYS_ILOGBD64 = 0xBD3 + SYS_ILOGBF = 0xA7E + SYS_ILOGBL = 0xA81 + SYS_INET6_IS_SRCADDR = 0xD5A + SYS_ISBLANK = 0x0FE + SYS_ISWALNUM = 0x0FF + SYS_LDEXPD128 = 0xBD7 + SYS_LDEXPD32 = 0xBD5 + SYS_LDEXPD64 = 0xBD6 + SYS_LGAMMAD128 = 0xBDA + SYS_LGAMMAD32 = 0xBD8 + SYS_LGAMMAD64 = 0xBD9 + SYS_LIO_LISTIO = 0xC6A + SYS_LLRINT = 0xA84 + SYS_LLRINTD128 = 0xBDD + SYS_LLRINTD32 = 0xBDB + SYS_LLRINTD64 = 0xBDC + SYS_LLRINTF = 0xA87 + SYS_LLRINTL = 0xA8A + SYS_LLROUND = 0xA8D + SYS_LLROUNDD128 = 0xBE0 + SYS_LLROUNDD32 = 0xBDE + SYS_LLROUNDD64 = 0xBDF + SYS_LLROUNDF = 0xA90 + SYS_LLROUNDL = 0xA93 + SYS_LOCALTIM = 0x0B1 + SYS_LOCALTIME = 0x0B1 + SYS_LOCALTIME64 = 0xCDE + SYS_LOCALTIME64_R = 0xCDF + SYS_LOG10D128 = 0xBE6 + SYS_LOG10D32 = 0xBE4 + SYS_LOG10D64 = 0xBE5 + SYS_LOG1PD128 = 0xBE9 + SYS_LOG1PD32 = 0xBE7 + SYS_LOG1PD64 = 0xBE8 + SYS_LOG2D128 = 0xBEC + SYS_LOG2D32 = 0xBEA + SYS_LOG2D64 = 0xBEB + SYS_LOGBD128 = 0xBEF + SYS_LOGBD32 = 0xBED + SYS_LOGBD64 = 0xBEE + SYS_LOGBF = 0xA96 + SYS_LOGBL = 0xA99 + SYS_LOGD128 = 0xBE3 + SYS_LOGD32 = 0xBE1 + SYS_LOGD64 = 0xBE2 + SYS_LRINT = 0xA9C + SYS_LRINTD128 = 0xBF2 + SYS_LRINTD32 = 0xBF0 + SYS_LRINTD64 = 0xBF1 + SYS_LRINTF = 0xA9F + SYS_LRINTL = 0xAA2 + SYS_LROUNDD128 = 0xBF5 + SYS_LROUNDD32 = 0xBF3 + SYS_LROUNDD64 = 0xBF4 + SYS_LROUNDL = 0xAA5 + SYS_MBLEN = 0x0AF + SYS_MBRTOC16 = 0xD42 + SYS_MBRTOC32 = 0xD43 + SYS_MEMSET = 0x0A3 + SYS_MKTIME = 0x0AC + SYS_MKTIME64 = 0xCE0 + SYS_MODFD128 = 0xBF8 + SYS_MODFD32 = 0xBF6 + SYS_MODFD64 = 0xBF7 + SYS_NAN = 0xAA8 + SYS_NAND128 = 0xBFB + SYS_NAND32 = 0xBF9 + SYS_NAND64 = 0xBFA + SYS_NANF = 0xAAA + SYS_NANL = 0xAAC + SYS_NEARBYINT = 0xAAE + SYS_NEARBYINTD128 = 0xBFE + SYS_NEARBYINTD32 = 0xBFC + SYS_NEARBYINTD64 = 0xBFD + SYS_NEARBYINTF = 0xAB1 + SYS_NEARBYINTL = 0xAB4 + SYS_NEXTAFTERD128 = 0xC01 + SYS_NEXTAFTERD32 = 0xBFF + SYS_NEXTAFTERD64 = 0xC00 + SYS_NEXTAFTERF = 0xAB7 + SYS_NEXTAFTERL = 0xABA + SYS_NEXTTOWARD = 0xABD + SYS_NEXTTOWARDD128 = 0xC04 + SYS_NEXTTOWARDD32 = 0xC02 + SYS_NEXTTOWARDD64 = 0xC03 + SYS_NEXTTOWARDF = 0xAC0 + SYS_NEXTTOWARDL = 0xAC3 + SYS_NL_LANGINFO = 0x0FC + SYS_PERROR_UNLOCKED = 0xCBD + SYS_POSIX_FALLOCATE = 0xCE8 + SYS_POSIX_MEMALIGN = 0xCE9 + SYS_POSIX_OPENPT = 0xC66 + SYS_POWD128 = 0xC07 + SYS_POWD32 = 0xC05 + SYS_POWD64 = 0xC06 + SYS_PRINTF_UNLOCKED = 0xCBE + SYS_PSELECT = 0xC67 + SYS_PTHREAD_ATTR_GETSTACK = 0xB3E + SYS_PTHREAD_ATTR_SETSTACK = 0xB3F + SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 + SYS_PUTS_UNLOCKED = 0xC7F + SYS_PUTWCHAR_UNLOCKED = 0xCC0 + SYS_PUTWC_UNLOCKED = 0xCBF + SYS_QUANTEXPD128 = 0xD46 + SYS_QUANTEXPD32 = 0xD44 + SYS_QUANTEXPD64 = 0xD45 + SYS_QUANTIZED128 = 0xC0A + SYS_QUANTIZED32 = 0xC08 + SYS_QUANTIZED64 = 0xC09 + SYS_REMAINDERD128 = 0xC0D + SYS_REMAINDERD32 = 0xC0B + SYS_REMAINDERD64 = 0xC0C + SYS_RESIZE_ALLOC = 0xCEB + SYS_REWIND_UNLOCKED = 0xCC1 + SYS_RINTD128 = 0xC13 + SYS_RINTD32 = 0xC11 + SYS_RINTD64 = 0xC12 + SYS_RINTF = 0xACB + SYS_RINTL = 0xACD + SYS_ROUND = 0xACF + SYS_ROUNDD128 = 0xC16 + SYS_ROUNDD32 = 0xC14 + SYS_ROUNDD64 = 0xC15 + SYS_ROUNDF = 0xAD2 + SYS_ROUNDL = 0xAD5 + SYS_SAMEQUANTUMD128 = 0xC19 + SYS_SAMEQUANTUMD32 = 0xC17 + SYS_SAMEQUANTUMD64 = 0xC18 + SYS_SCALBLN = 0xAD8 + SYS_SCALBLND128 = 0xC1C + SYS_SCALBLND32 = 0xC1A + SYS_SCALBLND64 = 0xC1B + SYS_SCALBLNF = 0xADB + SYS_SCALBLNL = 0xADE + SYS_SCALBND128 = 0xC1F + SYS_SCALBND32 = 0xC1D + SYS_SCALBND64 = 0xC1E + SYS_SCALBNF = 0xAE3 + SYS_SCALBNL = 0xAE6 + SYS_SCANF_UNLOCKED = 0xCC2 + SYS_SCHED_YIELD = 0xB32 + SYS_SETENV = 0x0C8 + SYS_SETIPV4SOURCEFILTER = 0xC76 + SYS_SETSOURCEFILTER = 0xC78 + SYS_SHM_OPEN = 0xC8C + SYS_SHM_UNLINK = 0xC8D + SYS_SIND128 = 0xC22 + SYS_SIND32 = 0xC20 + SYS_SIND64 = 0xC21 + SYS_SINHD128 = 0xC25 + SYS_SINHD32 = 0xC23 + SYS_SINHD64 = 0xC24 + SYS_SIZEOF_ALLOC = 0xCEA + SYS_SOCKATMARK = 0xC68 + SYS_SQRTD128 = 0xC28 + SYS_SQRTD32 = 0xC26 + SYS_SQRTD64 = 0xC27 + SYS_STRCHR = 0x0A0 + SYS_STRCSPN = 0x0A1 + SYS_STRERROR = 0x0A8 + SYS_STRERROR_R = 0xB33 + SYS_STRFTIME = 0x0B2 + SYS_STRLEN = 0x0A9 + SYS_STRPBRK = 0x0A2 + SYS_STRSPN = 0x0A4 + SYS_STRSTR = 0x0A5 + SYS_STRTOD128 = 0xC2B + SYS_STRTOD32 = 0xC29 + SYS_STRTOD64 = 0xC2A + SYS_STRTOK = 0x0A6 + SYS_TAND128 = 0xC2E + SYS_TAND32 = 0xC2C + SYS_TAND64 = 0xC2D + SYS_TANHD128 = 0xC31 + SYS_TANHD32 = 0xC2F + SYS_TANHD64 = 0xC30 + SYS_TGAMMAD128 = 0xC34 + SYS_TGAMMAD32 = 0xC32 + SYS_TGAMMAD64 = 0xC33 + SYS_TIME = 0x0AD + SYS_TIME64 = 0xCE1 + SYS_TMPFILE64 = 0xD4D + SYS_TMPFILE64_UNLOCKED = 0xD4E + SYS_TMPFILE_UNLOCKED = 0xCFD + SYS_TRUNCD128 = 0xC40 + SYS_TRUNCD32 = 0xC3E + SYS_TRUNCD64 = 0xC3F + SYS_UNGETC_UNLOCKED = 0xCC3 + SYS_UNGETWC_UNLOCKED = 0xCC4 + SYS_UNSETENV = 0xB34 + SYS_VFPRINTF_UNLOCKED = 0xCC5 + SYS_VFSCANF_UNLOCKED = 0xCC7 + SYS_VFWPRINTF_UNLOCKED = 0xCC9 + SYS_VFWSCANF_UNLOCKED = 0xCCB + SYS_VPRINTF_UNLOCKED = 0xCCD + SYS_VSCANF_UNLOCKED = 0xCCF + SYS_VWPRINTF_UNLOCKED = 0xCD1 + SYS_VWSCANF_UNLOCKED = 0xCD3 + SYS_WCSTOD128 = 0xC43 + SYS_WCSTOD32 = 0xC41 + SYS_WCSTOD64 = 0xC42 + SYS_WPRINTF_UNLOCKED = 0xCD5 + SYS_WSCANF_UNLOCKED = 0xCD6 + SYS__FLUSHLBF = 0xD68 + SYS__FLUSHLBF_UNLOCKED = 0xD6F + SYS___ACOSHF_H = 0xA54 + SYS___ACOSHL_H = 0xA55 + SYS___ASINHF_H = 0xA56 + SYS___ASINHL_H = 0xA57 + SYS___ATANPID128 = 0xC6D + SYS___ATANPID32 = 0xC6B + SYS___ATANPID64 = 0xC6C + SYS___CBRTF_H = 0xA58 + SYS___CBRTL_H = 0xA59 + SYS___CDUMP = 0x0C4 + SYS___CLASS = 0xAFA + SYS___CLASS2 = 0xB99 + SYS___CLASS2D128 = 0xC99 + SYS___CLASS2D32 = 0xC97 + SYS___CLASS2D64 = 0xC98 + SYS___CLASS2F = 0xC91 + SYS___CLASS2F_B = 0xC93 + SYS___CLASS2F_H = 0xC94 + SYS___CLASS2L = 0xC92 + SYS___CLASS2L_B = 0xC95 + SYS___CLASS2L_H = 0xC96 + SYS___CLASS2_B = 0xB9A + SYS___CLASS2_H = 0xB9B + SYS___CLASS_B = 0xAFB + SYS___CLASS_H = 0xAFC + SYS___CLOGL_B = 0xA01 + SYS___CLOGL_H = 0xA02 + SYS___CLRENV = 0x0C9 + SYS___CLRMF = 0x0BD + SYS___CODEPAGE_INFO = 0xC64 + SYS___CONJF_B = 0xA07 + SYS___CONJF_H = 0xA08 + SYS___CONJL_B = 0xA0A + SYS___CONJL_H = 0xA0B + SYS___CONJ_B = 0xA04 + SYS___CONJ_H = 0xA05 + SYS___COPYSIGN_B = 0xA5A + SYS___COPYSIGN_H = 0xAF5 + SYS___COSPID128 = 0xC70 + SYS___COSPID32 = 0xC6E + SYS___COSPID64 = 0xC6F + SYS___CPOWF_B = 0xA10 + SYS___CPOWF_H = 0xA11 + SYS___CPOWL_B = 0xA13 + SYS___CPOWL_H = 0xA14 + SYS___CPOW_B = 0xA0D + SYS___CPOW_H = 0xA0E + SYS___CPROJF_B = 0xA19 + SYS___CPROJF_H = 0xA1A + SYS___CPROJL_B = 0xA1C + SYS___CPROJL_H = 0xA1D + SYS___CPROJ_B = 0xA16 + SYS___CPROJ_H = 0xA17 + SYS___CREALF_B = 0xA22 + SYS___CREALF_H = 0xA23 + SYS___CREALL_B = 0xA25 + SYS___CREALL_H = 0xA26 + SYS___CREAL_B = 0xA1F + SYS___CREAL_H = 0xA20 + SYS___CSINF_B = 0xA2B + SYS___CSINF_H = 0xA2C + SYS___CSINHF_B = 0xA34 + SYS___CSINHF_H = 0xA35 + SYS___CSINHL_B = 0xA37 + SYS___CSINHL_H = 0xA38 + SYS___CSINH_B = 0xA31 + SYS___CSINH_H = 0xA32 + SYS___CSINL_B = 0xA2E + SYS___CSINL_H = 0xA2F + SYS___CSIN_B = 0xA28 + SYS___CSIN_H = 0xA29 + SYS___CSNAP = 0x0C5 + SYS___CSQRTF_B = 0xA3D + SYS___CSQRTF_H = 0xA3E + SYS___CSQRTL_B = 0xA40 + SYS___CSQRTL_H = 0xA41 + SYS___CSQRT_B = 0xA3A + SYS___CSQRT_H = 0xA3B + SYS___CTANF_B = 0xA46 + SYS___CTANF_H = 0xA47 + SYS___CTANHF_B = 0xA4F + SYS___CTANHF_H = 0xA50 + SYS___CTANHL_B = 0xA52 + SYS___CTANHL_H = 0xA53 + SYS___CTANH_B = 0xA4C + SYS___CTANH_H = 0xA4D + SYS___CTANL_B = 0xA49 + SYS___CTANL_H = 0xA4A + SYS___CTAN_B = 0xA43 + SYS___CTAN_H = 0xA44 + SYS___CTEST = 0x0C7 + SYS___CTRACE = 0x0C6 + SYS___D1TOP = 0xC9B + SYS___D2TOP = 0xC9C + SYS___D4TOP = 0xC9D + SYS___DYNALL = 0x0C3 + SYS___DYNFRE = 0x0C2 + SYS___EXP2F_H = 0xA5E + SYS___EXP2L_H = 0xA5F + SYS___EXP2_H = 0xA5D + SYS___EXPM1F_H = 0xA5B + SYS___EXPM1L_H = 0xA5C + SYS___FBUFSIZE = 0xD60 + SYS___FLBF = 0xD62 + SYS___FLDATA = 0x0C1 + SYS___FMAF_B = 0xA67 + SYS___FMAF_H = 0xA68 + SYS___FMAL_B = 0xA6A + SYS___FMAL_H = 0xA6B + SYS___FMAXF_B = 0xA70 + SYS___FMAXF_H = 0xA71 + SYS___FMAXL_B = 0xA73 + SYS___FMAXL_H = 0xA74 + SYS___FMAX_B = 0xA6D + SYS___FMAX_H = 0xA6E + SYS___FMA_B = 0xA64 + SYS___FMA_H = 0xA65 + SYS___FMINF_B = 0xA79 + SYS___FMINF_H = 0xA7A + SYS___FMINL_B = 0xA7C + SYS___FMINL_H = 0xA7D + SYS___FMIN_B = 0xA76 + SYS___FMIN_H = 0xA77 + SYS___FPENDING = 0xD61 + SYS___FPENDING_UNLOCKED = 0xD6C + SYS___FPURGE = 0xD69 + SYS___FPURGE_UNLOCKED = 0xD70 + SYS___FP_CAST_D = 0xBCB + SYS___FREADABLE = 0xD63 + SYS___FREADAHEAD = 0xD6A + SYS___FREADAHEAD_UNLOCKED = 0xD71 + SYS___FREADING = 0xD65 + SYS___FREADING_UNLOCKED = 0xD6D + SYS___FSEEK2 = 0xB3C + SYS___FSETERR = 0xD6B + SYS___FSETLOCKING = 0xD67 + SYS___FTCHEP = 0x0BF + SYS___FTELL2 = 0xB3B + SYS___FUPDT = 0x0B5 + SYS___FWRITABLE = 0xD64 + SYS___FWRITING = 0xD66 + SYS___FWRITING_UNLOCKED = 0xD6E + SYS___GETCB = 0x0B4 + SYS___GETGRGID1 = 0xD5B + SYS___GETGRNAM1 = 0xD5C + SYS___GETTHENT = 0xCE5 + SYS___GETTOD = 0xD3E + SYS___HYPOTF_H = 0xAF6 + SYS___HYPOTL_H = 0xAF7 + SYS___ILOGBF_B = 0xA7F + SYS___ILOGBF_H = 0xA80 + SYS___ILOGBL_B = 0xA82 + SYS___ILOGBL_H = 0xA83 + SYS___ISBLANK_A = 0xB2E + SYS___ISBLNK = 0x0FE + SYS___ISWBLANK_A = 0xB2F + SYS___LE_CEEGTJS = 0xD72 + SYS___LE_TRACEBACK = 0xB7A + SYS___LGAMMAL_H = 0xA62 + SYS___LGAMMA_B_C99 = 0xB39 + SYS___LGAMMA_H_C99 = 0xB38 + SYS___LGAMMA_R_C99 = 0xB3A + SYS___LLRINTF_B = 0xA88 + SYS___LLRINTF_H = 0xA89 + SYS___LLRINTL_B = 0xA8B + SYS___LLRINTL_H = 0xA8C + SYS___LLRINT_B = 0xA85 + SYS___LLRINT_H = 0xA86 + SYS___LLROUNDF_B = 0xA91 + SYS___LLROUNDF_H = 0xA92 + SYS___LLROUNDL_B = 0xA94 + SYS___LLROUNDL_H = 0xA95 + SYS___LLROUND_B = 0xA8E + SYS___LLROUND_H = 0xA8F + SYS___LOCALE_CTL = 0xD47 + SYS___LOG1PF_H = 0xA60 + SYS___LOG1PL_H = 0xA61 + SYS___LOGBF_B = 0xA97 + SYS___LOGBF_H = 0xA98 + SYS___LOGBL_B = 0xA9A + SYS___LOGBL_H = 0xA9B + SYS___LOGIN_APPLID = 0xCE2 + SYS___LRINTF_B = 0xAA0 + SYS___LRINTF_H = 0xAA1 + SYS___LRINTL_B = 0xAA3 + SYS___LRINTL_H = 0xAA4 + SYS___LRINT_B = 0xA9D + SYS___LRINT_H = 0xA9E + SYS___LROUNDF_FIXUP = 0xB31 + SYS___LROUNDL_B = 0xAA6 + SYS___LROUNDL_H = 0xAA7 + SYS___LROUND_FIXUP = 0xB30 + SYS___MOSERVICES = 0xD3D + SYS___MUST_STAY_CLEAN = 0xB7C + SYS___NANF_B = 0xAAB + SYS___NANL_B = 0xAAD + SYS___NAN_B = 0xAA9 + SYS___NEARBYINTF_B = 0xAB2 + SYS___NEARBYINTF_H = 0xAB3 + SYS___NEARBYINTL_B = 0xAB5 + SYS___NEARBYINTL_H = 0xAB6 + SYS___NEARBYINT_B = 0xAAF + SYS___NEARBYINT_H = 0xAB0 + SYS___NEXTAFTERF_B = 0xAB8 + SYS___NEXTAFTERF_H = 0xAB9 + SYS___NEXTAFTERL_B = 0xABB + SYS___NEXTAFTERL_H = 0xABC + SYS___NEXTTOWARDF_B = 0xAC1 + SYS___NEXTTOWARDF_H = 0xAC2 + SYS___NEXTTOWARDL_B = 0xAC4 + SYS___NEXTTOWARDL_H = 0xAC5 + SYS___NEXTTOWARD_B = 0xABE + SYS___NEXTTOWARD_H = 0xABF + SYS___O_ENV = 0xB7D + SYS___PASSWD_APPLID = 0xCE3 + SYS___PTOD1 = 0xC9E + SYS___PTOD2 = 0xC9F + SYS___PTOD4 = 0xCA0 + SYS___REGCOMP_STD = 0x0EA + SYS___REMAINDERF_H = 0xAC6 + SYS___REMAINDERL_H = 0xAC7 + SYS___REMQUOD128 = 0xC10 + SYS___REMQUOD32 = 0xC0E + SYS___REMQUOD64 = 0xC0F + SYS___REMQUOF_H = 0xAC9 + SYS___REMQUOL_H = 0xACA + SYS___REMQUO_H = 0xAC8 + SYS___RINTF_B = 0xACC + SYS___RINTL_B = 0xACE + SYS___ROUNDF_B = 0xAD3 + SYS___ROUNDF_H = 0xAD4 + SYS___ROUNDL_B = 0xAD6 + SYS___ROUNDL_H = 0xAD7 + SYS___ROUND_B = 0xAD0 + SYS___ROUND_H = 0xAD1 + SYS___SCALBLNF_B = 0xADC + SYS___SCALBLNF_H = 0xADD + SYS___SCALBLNL_B = 0xADF + SYS___SCALBLNL_H = 0xAE0 + SYS___SCALBLN_B = 0xAD9 + SYS___SCALBLN_H = 0xADA + SYS___SCALBNF_B = 0xAE4 + SYS___SCALBNF_H = 0xAE5 + SYS___SCALBNL_B = 0xAE7 + SYS___SCALBNL_H = 0xAE8 + SYS___SCALBN_B = 0xAE1 + SYS___SCALBN_H = 0xAE2 + SYS___SETENV = 0x0C8 + SYS___SINPID128 = 0xC73 + SYS___SINPID32 = 0xC71 + SYS___SINPID64 = 0xC72 + SYS___SMF_RECORD2 = 0xD48 + SYS___STATIC_REINIT = 0xB3D + SYS___TGAMMAF_H_C99 = 0xB79 + SYS___TGAMMAL_H = 0xAE9 + SYS___TGAMMA_H_C99 = 0xB78 + SYS___TOCSNAME2 = 0xC9A + SYS_CEIL = 0x01F + SYS_CHAUDIT = 0x1E0 + SYS_EXP = 0x01A + SYS_FCHAUDIT = 0x1E1 + SYS_FREXP = 0x01D + SYS_GETGROUPSBYNAME = 0x1E2 + SYS_GETPWUID = 0x1A0 + SYS_GETUID = 0x1A1 + SYS_ISATTY = 0x1A3 + SYS_KILL = 0x1A4 + SYS_LDEXP = 0x01E + SYS_LINK = 0x1A5 + SYS_LOG10 = 0x01C + SYS_LSEEK = 0x1A6 + SYS_LSTAT = 0x1A7 + SYS_MKDIR = 0x1A8 + SYS_MKFIFO = 0x1A9 + SYS_MKNOD = 0x1AA + SYS_MODF = 0x01B + SYS_MOUNT = 0x1AB + SYS_OPEN = 0x1AC + SYS_OPENDIR = 0x1AD + SYS_PATHCONF = 0x1AE + SYS_PAUSE = 0x1AF + SYS_PIPE = 0x1B0 + SYS_PTHREAD_ATTR_DESTROY = 0x1E7 + SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB + SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 + SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED + SYS_PTHREAD_ATTR_INIT = 0x1E6 + SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA + SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 + SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC + SYS_PTHREAD_CANCEL = 0x1EE + SYS_PTHREAD_CLEANUP_POP = 0x1F0 + SYS_PTHREAD_CLEANUP_PUSH = 0x1EF + SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 + SYS_PTHREAD_CONDATTR_INIT = 0x1F1 + SYS_PTHREAD_COND_BROADCAST = 0x1F6 + SYS_PTHREAD_COND_DESTROY = 0x1F4 + SYS_PTHREAD_COND_INIT = 0x1F3 + SYS_PTHREAD_COND_SIGNAL = 0x1F5 + SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 + SYS_PTHREAD_COND_WAIT = 0x1F7 + SYS_PTHREAD_CREATE = 0x1F9 + SYS_PTHREAD_DETACH = 0x1FA + SYS_PTHREAD_EQUAL = 0x1FB + SYS_PTHREAD_EXIT = 0x1E4 + SYS_PTHREAD_GETSPECIFIC = 0x1FC + SYS_PTHREAD_JOIN = 0x1FD + SYS_PTHREAD_KEY_CREATE = 0x1FE + SYS_PTHREAD_KILL = 0x1E5 + SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF + SYS_READ = 0x1B2 + SYS_READDIR = 0x1B3 + SYS_READLINK = 0x1B4 + SYS_REWINDDIR = 0x1B5 + SYS_RMDIR = 0x1B6 + SYS_SETEGID = 0x1B7 + SYS_SETEUID = 0x1B8 + SYS_SETGID = 0x1B9 + SYS_SETPGID = 0x1BA + SYS_SETSID = 0x1BB + SYS_SETUID = 0x1BC + SYS_SIGACTION = 0x1BD + SYS_SIGADDSET = 0x1BE + SYS_SIGDELSET = 0x1BF + SYS_SIGEMPTYSET = 0x1C0 + SYS_SIGFILLSET = 0x1C1 + SYS_SIGISMEMBER = 0x1C2 + SYS_SIGLONGJMP = 0x1C3 + SYS_SIGPENDING = 0x1C4 + SYS_SIGPROCMASK = 0x1C5 + SYS_SIGSETJMP = 0x1C6 + SYS_SIGSUSPEND = 0x1C7 + SYS_SIGWAIT = 0x1E3 + SYS_SLEEP = 0x1C8 + SYS_STAT = 0x1C9 + SYS_SYMLINK = 0x1CB + SYS_SYSCONF = 0x1CC + SYS_TCDRAIN = 0x1CD + SYS_TCFLOW = 0x1CE + SYS_TCFLUSH = 0x1CF + SYS_TCGETATTR = 0x1D0 + SYS_TCGETPGRP = 0x1D1 + SYS_TCSENDBREAK = 0x1D2 + SYS_TCSETATTR = 0x1D3 + SYS_TCSETPGRP = 0x1D4 + SYS_TIMES = 0x1D5 + SYS_TTYNAME = 0x1D6 + SYS_TZSET = 0x1D7 + SYS_UMASK = 0x1D8 + SYS_UMOUNT = 0x1D9 + SYS_UNAME = 0x1DA + SYS_UNLINK = 0x1DB + SYS_UTIME = 0x1DC + SYS_WAIT = 0x1DD + SYS_WAITPID = 0x1DE + SYS_WRITE = 0x1DF + SYS_W_GETPSENT = 0x1B1 + SYS_W_IOCTL = 0x1A2 + SYS_W_STATFS = 0x1CA + SYS_A64L = 0x2EF + SYS_BCMP = 0x2B9 + SYS_BCOPY = 0x2BA + SYS_BZERO = 0x2BB + SYS_CATCLOSE = 0x2B6 + SYS_CATGETS = 0x2B7 + SYS_CATOPEN = 0x2B8 + SYS_CRYPT = 0x2AC + SYS_DBM_CLEARERR = 0x2F7 + SYS_DBM_CLOSE = 0x2F8 + SYS_DBM_DELETE = 0x2F9 + SYS_DBM_ERROR = 0x2FA + SYS_DBM_FETCH = 0x2FB + SYS_DBM_FIRSTKEY = 0x2FC + SYS_DBM_NEXTKEY = 0x2FD + SYS_DBM_OPEN = 0x2FE + SYS_DBM_STORE = 0x2FF + SYS_DRAND48 = 0x2B2 + SYS_ENCRYPT = 0x2AD + SYS_ENDUTXENT = 0x2E1 + SYS_ERAND48 = 0x2B3 + SYS_ERF = 0x02C + SYS_ERFC = 0x02D + SYS_FCHDIR = 0x2D9 + SYS_FFS = 0x2BC + SYS_FMTMSG = 0x2E5 + SYS_FSTATVFS = 0x2B4 + SYS_FTIME = 0x2F5 + SYS_GAMMA = 0x02E + SYS_GETDATE = 0x2A6 + SYS_GETPAGESIZE = 0x2D8 + SYS_GETTIMEOFDAY = 0x2F6 + SYS_GETUTXENT = 0x2E0 + SYS_GETUTXID = 0x2E2 + SYS_GETUTXLINE = 0x2E3 + SYS_HCREATE = 0x2C6 + SYS_HDESTROY = 0x2C7 + SYS_HSEARCH = 0x2C8 + SYS_HYPOT = 0x02B + SYS_INDEX = 0x2BD + SYS_INITSTATE = 0x2C2 + SYS_INSQUE = 0x2CF + SYS_ISASCII = 0x2ED + SYS_JRAND48 = 0x2E6 + SYS_L64A = 0x2F0 + SYS_LCONG48 = 0x2EA + SYS_LFIND = 0x2C9 + SYS_LRAND48 = 0x2E7 + SYS_LSEARCH = 0x2CA + SYS_MEMCCPY = 0x2D4 + SYS_MRAND48 = 0x2E8 + SYS_NRAND48 = 0x2E9 + SYS_PCLOSE = 0x2D2 + SYS_POPEN = 0x2D1 + SYS_PUTUTXLINE = 0x2E4 + SYS_RANDOM = 0x2C4 + SYS_REMQUE = 0x2D0 + SYS_RINDEX = 0x2BE + SYS_SEED48 = 0x2EC + SYS_SETKEY = 0x2AE + SYS_SETSTATE = 0x2C3 + SYS_SETUTXENT = 0x2DF + SYS_SRAND48 = 0x2EB + SYS_SRANDOM = 0x2C5 + SYS_STATVFS = 0x2B5 + SYS_STRCASECMP = 0x2BF + SYS_STRDUP = 0x2C0 + SYS_STRNCASECMP = 0x2C1 + SYS_SWAB = 0x2D3 + SYS_TDELETE = 0x2CB + SYS_TFIND = 0x2CC + SYS_TOASCII = 0x2EE + SYS_TSEARCH = 0x2CD + SYS_TWALK = 0x2CE + SYS_UALARM = 0x2F1 + SYS_USLEEP = 0x2F2 + SYS_WAIT3 = 0x2A7 + SYS_WAITID = 0x2A8 + SYS_Y1 = 0x02A + SYS___ATOE = 0x2DB + SYS___ATOE_L = 0x2DC + SYS___CATTRM = 0x2A9 + SYS___CNVBLK = 0x2AF + SYS___CRYTRM = 0x2B0 + SYS___DLGHT = 0x2A1 + SYS___ECRTRM = 0x2B1 + SYS___ETOA = 0x2DD + SYS___ETOA_L = 0x2DE + SYS___GDTRM = 0x2AA + SYS___OCLCK = 0x2DA + SYS___OPARGF = 0x2A2 + SYS___OPERRF = 0x2A5 + SYS___OPINDF = 0x2A4 + SYS___OPOPTF = 0x2A3 + SYS___RNDTRM = 0x2AB + SYS___SRCTRM = 0x2F4 + SYS___TZONE = 0x2A0 + SYS___UTXTRM = 0x2F3 + SYS_ASIN = 0x03E + SYS_ISXDIGIT = 0x03B + SYS_SETLOCAL = 0x03A + SYS_SETLOCALE = 0x03A + SYS_SIN = 0x03F + SYS_TOLOWER = 0x03C + SYS_TOUPPER = 0x03D + SYS_ACCEPT_AND_RECV = 0x4F7 + SYS_ATOL = 0x04E + SYS_CHECKSCH = 0x4BC + SYS_CHECKSCHENV = 0x4BC + SYS_CLEARERR = 0x04C + SYS_CONNECTS = 0x4B5 + SYS_CONNECTSERVER = 0x4B5 + SYS_CONNECTW = 0x4B4 + SYS_CONNECTWORKMGR = 0x4B4 + SYS_CONTINUE = 0x4B3 + SYS_CONTINUEWORKUNIT = 0x4B3 + SYS_COPYSIGN = 0x4C2 + SYS_CREATEWO = 0x4B2 + SYS_CREATEWORKUNIT = 0x4B2 + SYS_DELETEWO = 0x4B9 + SYS_DELETEWORKUNIT = 0x4B9 + SYS_DISCONNE = 0x4B6 + SYS_DISCONNECTSERVER = 0x4B6 + SYS_FEOF = 0x04D + SYS_FERROR = 0x04A + SYS_FINITE = 0x4C8 + SYS_GAMMA_R = 0x4E2 + SYS_JOINWORK = 0x4B7 + SYS_JOINWORKUNIT = 0x4B7 + SYS_LEAVEWOR = 0x4B8 + SYS_LEAVEWORKUNIT = 0x4B8 + SYS_LGAMMA_R = 0x4EB + SYS_MATHERR = 0x4D0 + SYS_PERROR = 0x04F + SYS_QUERYMET = 0x4BA + SYS_QUERYMETRICS = 0x4BA + SYS_QUERYSCH = 0x4BB + SYS_QUERYSCHENV = 0x4BB + SYS_REWIND = 0x04B + SYS_SCALBN = 0x4D4 + SYS_SIGNIFIC = 0x4D5 + SYS_SIGNIFICAND = 0x4D5 + SYS___ACOSH_B = 0x4DA + SYS___ACOS_B = 0x4D9 + SYS___ASINH_B = 0x4BE + SYS___ASIN_B = 0x4DB + SYS___ATAN2_B = 0x4DC + SYS___ATANH_B = 0x4DD + SYS___ATAN_B = 0x4BF + SYS___CBRT_B = 0x4C0 + SYS___CEIL_B = 0x4C1 + SYS___COSH_B = 0x4DE + SYS___COS_B = 0x4C3 + SYS___DGHT = 0x4A8 + SYS___ENVN = 0x4B0 + SYS___ERFC_B = 0x4C5 + SYS___ERF_B = 0x4C4 + SYS___EXPM1_B = 0x4C6 + SYS___EXP_B = 0x4DF + SYS___FABS_B = 0x4C7 + SYS___FLOOR_B = 0x4C9 + SYS___FMOD_B = 0x4E0 + SYS___FP_SETMODE = 0x4F8 + SYS___FREXP_B = 0x4CA + SYS___GAMMA_B = 0x4E1 + SYS___GDRR = 0x4A1 + SYS___HRRNO = 0x4A2 + SYS___HYPOT_B = 0x4E3 + SYS___ILOGB_B = 0x4CB + SYS___ISNAN_B = 0x4CC + SYS___J0_B = 0x4E4 + SYS___J1_B = 0x4E6 + SYS___JN_B = 0x4E8 + SYS___LDEXP_B = 0x4CD + SYS___LGAMMA_B = 0x4EA + SYS___LOG10_B = 0x4ED + SYS___LOG1P_B = 0x4CE + SYS___LOGB_B = 0x4CF + SYS___LOGIN = 0x4F5 + SYS___LOG_B = 0x4EC + SYS___MLOCKALL = 0x4B1 + SYS___MODF_B = 0x4D1 + SYS___NEXTAFTER_B = 0x4D2 + SYS___OPENDIR2 = 0x4F3 + SYS___OPEN_STAT = 0x4F6 + SYS___OPND = 0x4A5 + SYS___OPPT = 0x4A6 + SYS___OPRG = 0x4A3 + SYS___OPRR = 0x4A4 + SYS___PID_AFFINITY = 0x4BD + SYS___POW_B = 0x4EE + SYS___READDIR2 = 0x4F4 + SYS___REMAINDER_B = 0x4EF + SYS___RINT_B = 0x4D3 + SYS___SCALB_B = 0x4F0 + SYS___SIGACTIONSET = 0x4FB + SYS___SIGGM = 0x4A7 + SYS___SINH_B = 0x4F1 + SYS___SIN_B = 0x4D6 + SYS___SQRT_B = 0x4F2 + SYS___TANH_B = 0x4D8 + SYS___TAN_B = 0x4D7 + SYS___TRRNO = 0x4AF + SYS___TZNE = 0x4A9 + SYS___TZZN = 0x4AA + SYS___UCREATE = 0x4FC + SYS___UFREE = 0x4FE + SYS___UHEAPREPORT = 0x4FF + SYS___UMALLOC = 0x4FD + SYS___Y0_B = 0x4E5 + SYS___Y1_B = 0x4E7 + SYS___YN_B = 0x4E9 + SYS_ABORT = 0x05C + SYS_ASCTIME_R = 0x5E0 + SYS_ATEXIT = 0x05D + SYS_CONNECTE = 0x5AE + SYS_CONNECTEXPORTIMPORT = 0x5AE + SYS_CTIME_R = 0x5E1 + SYS_DN_COMP = 0x5DF + SYS_DN_EXPAND = 0x5DD + SYS_DN_SKIPNAME = 0x5DE + SYS_EXIT = 0x05A + SYS_EXPORTWO = 0x5A1 + SYS_EXPORTWORKUNIT = 0x5A1 + SYS_EXTRACTW = 0x5A5 + SYS_EXTRACTWORKUNIT = 0x5A5 + SYS_FSEEKO = 0x5C9 + SYS_FTELLO = 0x5C8 + SYS_GETGRGID_R = 0x5E7 + SYS_GETGRNAM_R = 0x5E8 + SYS_GETLOGIN_R = 0x5E9 + SYS_GETPWNAM_R = 0x5EA + SYS_GETPWUID_R = 0x5EB + SYS_GMTIME_R = 0x5E2 + SYS_IMPORTWO = 0x5A3 + SYS_IMPORTWORKUNIT = 0x5A3 + SYS_INET_NTOP = 0x5D3 + SYS_INET_PTON = 0x5D4 + SYS_LLABS = 0x5CE + SYS_LLDIV = 0x5CB + SYS_LOCALTIME_R = 0x5E3 + SYS_PTHREAD_ATFORK = 0x5ED + SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB + SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE + SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 + SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF + SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC + SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 + SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA + SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 + SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 + SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 + SYS_PTHREAD_DETACH_U98 = 0x5FD + SYS_PTHREAD_GETCONCURRENCY = 0x5F4 + SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE + SYS_PTHREAD_KEY_DELETE = 0x5F5 + SYS_PTHREAD_SETCANCELSTATE = 0x5FF + SYS_PTHREAD_SETCONCURRENCY = 0x5F6 + SYS_PTHREAD_SIGMASK = 0x5F7 + SYS_QUERYENC = 0x5AD + SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD + SYS_RAISE = 0x05E + SYS_RAND_R = 0x5E4 + SYS_READDIR_R = 0x5E6 + SYS_REALLOC = 0x05B + SYS_RES_INIT = 0x5D8 + SYS_RES_MKQUERY = 0x5D7 + SYS_RES_QUERY = 0x5D9 + SYS_RES_QUERYDOMAIN = 0x5DC + SYS_RES_SEARCH = 0x5DA + SYS_RES_SEND = 0x5DB + SYS_SETJMP = 0x05F + SYS_SIGQUEUE = 0x5A9 + SYS_STRTOK_R = 0x5E5 + SYS_STRTOLL = 0x5B0 + SYS_STRTOULL = 0x5B1 + SYS_TTYNAME_R = 0x5EC + SYS_UNDOEXPO = 0x5A2 + SYS_UNDOEXPORTWORKUNIT = 0x5A2 + SYS_UNDOIMPO = 0x5A4 + SYS_UNDOIMPORTWORKUNIT = 0x5A4 + SYS_WCSTOLL = 0x5CC + SYS_WCSTOULL = 0x5CD + SYS___ABORT = 0x05C + SYS___CONSOLE2 = 0x5D2 + SYS___CPL = 0x5A6 + SYS___DISCARDDATA = 0x5F8 + SYS___DSA_PREV = 0x5B2 + SYS___EP_FIND = 0x5B3 + SYS___FP_SWAPMODE = 0x5AF + SYS___GETUSERID = 0x5AB + SYS___GET_CPUID = 0x5B9 + SYS___GET_SYSTEM_SETTINGS = 0x5BA + SYS___IPDOMAINNAME = 0x5AC + SYS___MAP_INIT = 0x5A7 + SYS___MAP_SERVICE = 0x5A8 + SYS___MOUNT = 0x5AA + SYS___MSGRCV_TIMED = 0x5B7 + SYS___RES = 0x5D6 + SYS___SEMOP_TIMED = 0x5B8 + SYS___SERVER_THREADS_QUERY = 0x5B4 + SYS_FPRINTF = 0x06D + SYS_FSCANF = 0x06A + SYS_PRINTF = 0x06F + SYS_SETBUF = 0x06B + SYS_SETVBUF = 0x06C + SYS_SSCANF = 0x06E + SYS___CATGETS_A = 0x6C0 + SYS___CHAUDIT_A = 0x6F4 + SYS___CHMOD_A = 0x6E8 + SYS___COLLATE_INIT_A = 0x6AC + SYS___CREAT_A = 0x6F6 + SYS___CTYPE_INIT_A = 0x6AF + SYS___DLLLOAD_A = 0x6DF + SYS___DLLQUERYFN_A = 0x6E0 + SYS___DLLQUERYVAR_A = 0x6E1 + SYS___E2A_L = 0x6E3 + SYS___EXECLE_A = 0x6A0 + SYS___EXECLP_A = 0x6A4 + SYS___EXECVE_A = 0x6C1 + SYS___EXECVP_A = 0x6C2 + SYS___EXECV_A = 0x6B1 + SYS___FPRINTF_A = 0x6FA + SYS___GETADDRINFO_A = 0x6BF + SYS___GETNAMEINFO_A = 0x6C4 + SYS___GET_WCTYPE_STD_A = 0x6AE + SYS___ICONV_OPEN_A = 0x6DE + SYS___IF_INDEXTONAME_A = 0x6DC + SYS___IF_NAMETOINDEX_A = 0x6DB + SYS___ISWCTYPE_A = 0x6B0 + SYS___IS_WCTYPE_STD_A = 0x6B2 + SYS___LOCALECONV_A = 0x6B8 + SYS___LOCALECONV_STD_A = 0x6B9 + SYS___LOCALE_INIT_A = 0x6B7 + SYS___LSTAT_A = 0x6EE + SYS___LSTAT_O_A = 0x6EF + SYS___MKDIR_A = 0x6E9 + SYS___MKFIFO_A = 0x6EC + SYS___MKNOD_A = 0x6F0 + SYS___MONETARY_INIT_A = 0x6BC + SYS___MOUNT_A = 0x6F1 + SYS___NL_CSINFO_A = 0x6D6 + SYS___NL_LANGINFO_A = 0x6BA + SYS___NL_LNAGINFO_STD_A = 0x6BB + SYS___NL_MONINFO_A = 0x6D7 + SYS___NL_NUMINFO_A = 0x6D8 + SYS___NL_RESPINFO_A = 0x6D9 + SYS___NL_TIMINFO_A = 0x6DA + SYS___NUMERIC_INIT_A = 0x6C6 + SYS___OPEN_A = 0x6F7 + SYS___PRINTF_A = 0x6DD + SYS___RESP_INIT_A = 0x6C7 + SYS___RPMATCH_A = 0x6C8 + SYS___RPMATCH_C_A = 0x6C9 + SYS___RPMATCH_STD_A = 0x6CA + SYS___SETLOCALE_A = 0x6F9 + SYS___SPAWNP_A = 0x6C5 + SYS___SPAWN_A = 0x6C3 + SYS___SPRINTF_A = 0x6FB + SYS___STAT_A = 0x6EA + SYS___STAT_O_A = 0x6EB + SYS___STRCOLL_STD_A = 0x6A1 + SYS___STRFMON_A = 0x6BD + SYS___STRFMON_STD_A = 0x6BE + SYS___STRFTIME_A = 0x6CC + SYS___STRFTIME_STD_A = 0x6CD + SYS___STRPTIME_A = 0x6CE + SYS___STRPTIME_STD_A = 0x6CF + SYS___STRXFRM_A = 0x6A2 + SYS___STRXFRM_C_A = 0x6A3 + SYS___STRXFRM_STD_A = 0x6A5 + SYS___SYNTAX_INIT_A = 0x6D4 + SYS___TIME_INIT_A = 0x6CB + SYS___TOD_INIT_A = 0x6D5 + SYS___TOWLOWER_A = 0x6B3 + SYS___TOWLOWER_STD_A = 0x6B4 + SYS___TOWUPPER_A = 0x6B5 + SYS___TOWUPPER_STD_A = 0x6B6 + SYS___UMOUNT_A = 0x6F2 + SYS___VFPRINTF_A = 0x6FC + SYS___VPRINTF_A = 0x6FD + SYS___VSPRINTF_A = 0x6FE + SYS___VSWPRINTF_A = 0x6FF + SYS___WCSCOLL_A = 0x6A6 + SYS___WCSCOLL_C_A = 0x6A7 + SYS___WCSCOLL_STD_A = 0x6A8 + SYS___WCSFTIME_A = 0x6D0 + SYS___WCSFTIME_STD_A = 0x6D1 + SYS___WCSXFRM_A = 0x6A9 + SYS___WCSXFRM_C_A = 0x6AA + SYS___WCSXFRM_STD_A = 0x6AB + SYS___WCTYPE_A = 0x6AD + SYS___W_GETMNTENT_A = 0x6F5 + SYS_____CCSIDTYPE_A = 0x6E6 + SYS_____CHATTR_A = 0x6E2 + SYS_____CSNAMETYPE_A = 0x6E7 + SYS_____OPEN_STAT_A = 0x6ED + SYS_____SPAWN2_A = 0x6D2 + SYS_____SPAWNP2_A = 0x6D3 + SYS_____TOCCSID_A = 0x6E4 + SYS_____TOCSNAME_A = 0x6E5 + SYS_ACL_FREE = 0x7FF + SYS_ACL_INIT = 0x7FE + SYS_FWIDE = 0x7DF + SYS_FWPRINTF = 0x7D1 + SYS_FWRITE = 0x07E + SYS_FWSCANF = 0x7D5 + SYS_GETCHAR = 0x07B + SYS_GETS = 0x07C + SYS_M_CREATE_LAYOUT = 0x7C9 + SYS_M_DESTROY_LAYOUT = 0x7CA + SYS_M_GETVALUES_LAYOUT = 0x7CB + SYS_M_SETVALUES_LAYOUT = 0x7CC + SYS_M_TRANSFORM_LAYOUT = 0x7CD + SYS_M_WTRANSFORM_LAYOUT = 0x7CE + SYS_PREAD = 0x7C7 + SYS_PUTC = 0x07D + SYS_PUTCHAR = 0x07A + SYS_PUTS = 0x07F + SYS_PWRITE = 0x7C8 + SYS_TOWCTRAN = 0x7D8 + SYS_TOWCTRANS = 0x7D8 + SYS_UNATEXIT = 0x7B5 + SYS_VFWPRINT = 0x7D3 + SYS_VFWPRINTF = 0x7D3 + SYS_VWPRINTF = 0x7D4 + SYS_WCTRANS = 0x7D7 + SYS_WPRINTF = 0x7D2 + SYS_WSCANF = 0x7D6 + SYS___ASCTIME_R_A = 0x7A1 + SYS___BASENAME_A = 0x7DC + SYS___BTOWC_A = 0x7E4 + SYS___CDUMP_A = 0x7B7 + SYS___CEE3DMP_A = 0x7B6 + SYS___CEILF_H = 0x7F4 + SYS___CEILL_H = 0x7F5 + SYS___CEIL_H = 0x7EA + SYS___CRYPT_A = 0x7BE + SYS___CSNAP_A = 0x7B8 + SYS___CTEST_A = 0x7B9 + SYS___CTIME_R_A = 0x7A2 + SYS___CTRACE_A = 0x7BA + SYS___DBM_OPEN_A = 0x7E6 + SYS___DIRNAME_A = 0x7DD + SYS___FABSF_H = 0x7FA + SYS___FABSL_H = 0x7FB + SYS___FABS_H = 0x7ED + SYS___FGETWC_A = 0x7AA + SYS___FGETWS_A = 0x7AD + SYS___FLOORF_H = 0x7F6 + SYS___FLOORL_H = 0x7F7 + SYS___FLOOR_H = 0x7EB + SYS___FPUTWC_A = 0x7A5 + SYS___FPUTWS_A = 0x7A8 + SYS___GETTIMEOFDAY_A = 0x7AE + SYS___GETWCHAR_A = 0x7AC + SYS___GETWC_A = 0x7AB + SYS___GLOB_A = 0x7DE + SYS___GMTIME_A = 0x7AF + SYS___GMTIME_R_A = 0x7B0 + SYS___INET_PTON_A = 0x7BC + SYS___J0_H = 0x7EE + SYS___J1_H = 0x7EF + SYS___JN_H = 0x7F0 + SYS___LOCALTIME_A = 0x7B1 + SYS___LOCALTIME_R_A = 0x7B2 + SYS___MALLOC24 = 0x7FC + SYS___MALLOC31 = 0x7FD + SYS___MKTIME_A = 0x7B3 + SYS___MODFF_H = 0x7F8 + SYS___MODFL_H = 0x7F9 + SYS___MODF_H = 0x7EC + SYS___OPENDIR_A = 0x7C2 + SYS___OSNAME = 0x7E0 + SYS___PUTWCHAR_A = 0x7A7 + SYS___PUTWC_A = 0x7A6 + SYS___READDIR_A = 0x7C3 + SYS___STRTOLL_A = 0x7A3 + SYS___STRTOULL_A = 0x7A4 + SYS___SYSLOG_A = 0x7BD + SYS___TZZNA = 0x7B4 + SYS___UNGETWC_A = 0x7A9 + SYS___UTIME_A = 0x7A0 + SYS___VFPRINTF2_A = 0x7E7 + SYS___VPRINTF2_A = 0x7E8 + SYS___VSPRINTF2_A = 0x7E9 + SYS___VSWPRNTF2_A = 0x7BB + SYS___WCSTOD_A = 0x7D9 + SYS___WCSTOL_A = 0x7DA + SYS___WCSTOUL_A = 0x7DB + SYS___WCTOB_A = 0x7E5 + SYS___Y0_H = 0x7F1 + SYS___Y1_H = 0x7F2 + SYS___YN_H = 0x7F3 + SYS_____OPENDIR2_A = 0x7BF + SYS_____OSNAME_A = 0x7E1 + SYS_____READDIR2_A = 0x7C0 + SYS_DLCLOSE = 0x8DF + SYS_DLERROR = 0x8E0 + SYS_DLOPEN = 0x8DD + SYS_DLSYM = 0x8DE + SYS_FLOCKFILE = 0x8D3 + SYS_FTRYLOCKFILE = 0x8D4 + SYS_FUNLOCKFILE = 0x8D5 + SYS_GETCHAR_UNLOCKED = 0x8D7 + SYS_GETC_UNLOCKED = 0x8D6 + SYS_PUTCHAR_UNLOCKED = 0x8D9 + SYS_PUTC_UNLOCKED = 0x8D8 + SYS_SNPRINTF = 0x8DA + SYS_VSNPRINTF = 0x8DB + SYS_WCSCSPN = 0x08B + SYS_WCSLEN = 0x08C + SYS_WCSNCAT = 0x08D + SYS_WCSNCMP = 0x08A + SYS_WCSNCPY = 0x08F + SYS_WCSSPN = 0x08E + SYS___ABSF_H = 0x8E7 + SYS___ABSL_H = 0x8E8 + SYS___ABS_H = 0x8E6 + SYS___ACOSF_H = 0x8EA + SYS___ACOSH_H = 0x8EC + SYS___ACOSL_H = 0x8EB + SYS___ACOS_H = 0x8E9 + SYS___ASINF_H = 0x8EE + SYS___ASINH_H = 0x8F0 + SYS___ASINL_H = 0x8EF + SYS___ASIN_H = 0x8ED + SYS___ATAN2F_H = 0x8F8 + SYS___ATAN2L_H = 0x8F9 + SYS___ATAN2_H = 0x8F7 + SYS___ATANF_H = 0x8F2 + SYS___ATANHF_H = 0x8F5 + SYS___ATANHL_H = 0x8F6 + SYS___ATANH_H = 0x8F4 + SYS___ATANL_H = 0x8F3 + SYS___ATAN_H = 0x8F1 + SYS___CBRT_H = 0x8FA + SYS___COPYSIGNF_H = 0x8FB + SYS___COPYSIGNL_H = 0x8FC + SYS___COSF_H = 0x8FE + SYS___COSL_H = 0x8FF + SYS___COS_H = 0x8FD + SYS___DLERROR_A = 0x8D2 + SYS___DLOPEN_A = 0x8D0 + SYS___DLSYM_A = 0x8D1 + SYS___GETUTXENT_A = 0x8C6 + SYS___GETUTXID_A = 0x8C7 + SYS___GETUTXLINE_A = 0x8C8 + SYS___ITOA = 0x8AA + SYS___ITOA_A = 0x8B0 + SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 + SYS___LE_MSG_ADD_INSERT = 0x8A6 + SYS___LE_MSG_GET = 0x8A7 + SYS___LE_MSG_GET_AND_WRITE = 0x8A8 + SYS___LE_MSG_WRITE = 0x8A9 + SYS___LLTOA = 0x8AE + SYS___LLTOA_A = 0x8B4 + SYS___LTOA = 0x8AC + SYS___LTOA_A = 0x8B2 + SYS___PUTCHAR_UNLOCKED_A = 0x8CC + SYS___PUTC_UNLOCKED_A = 0x8CB + SYS___PUTUTXLINE_A = 0x8C9 + SYS___RESET_EXCEPTION_HANDLER = 0x8E3 + SYS___REXEC_A = 0x8C4 + SYS___REXEC_AF_A = 0x8C5 + SYS___SET_EXCEPTION_HANDLER = 0x8E2 + SYS___SNPRINTF_A = 0x8CD + SYS___SUPERKILL = 0x8A4 + SYS___TCGETATTR_A = 0x8A1 + SYS___TCSETATTR_A = 0x8A2 + SYS___ULLTOA = 0x8AF + SYS___ULLTOA_A = 0x8B5 + SYS___ULTOA = 0x8AD + SYS___ULTOA_A = 0x8B3 + SYS___UTOA = 0x8AB + SYS___UTOA_A = 0x8B1 + SYS___VHM_EVENT = 0x8E4 + SYS___VSNPRINTF_A = 0x8CE + SYS_____GETENV_A = 0x8C3 + SYS_____UTMPXNAME_A = 0x8CA + SYS_CACOSH = 0x9A0 + SYS_CACOSHF = 0x9A3 + SYS_CACOSHL = 0x9A6 + SYS_CARG = 0x9A9 + SYS_CARGF = 0x9AC + SYS_CARGL = 0x9AF + SYS_CASIN = 0x9B2 + SYS_CASINF = 0x9B5 + SYS_CASINH = 0x9BB + SYS_CASINHF = 0x9BE + SYS_CASINHL = 0x9C1 + SYS_CASINL = 0x9B8 + SYS_CATAN = 0x9C4 + SYS_CATANF = 0x9C7 + SYS_CATANH = 0x9CD + SYS_CATANHF = 0x9D0 + SYS_CATANHL = 0x9D3 + SYS_CATANL = 0x9CA + SYS_CCOS = 0x9D6 + SYS_CCOSF = 0x9D9 + SYS_CCOSH = 0x9DF + SYS_CCOSHF = 0x9E2 + SYS_CCOSHL = 0x9E5 + SYS_CCOSL = 0x9DC + SYS_CEXP = 0x9E8 + SYS_CEXPF = 0x9EB + SYS_CEXPL = 0x9EE + SYS_CIMAG = 0x9F1 + SYS_CIMAGF = 0x9F4 + SYS_CIMAGL = 0x9F7 + SYS_CLOGF = 0x9FD + SYS_MEMCHR = 0x09B + SYS_MEMCMP = 0x09A + SYS_STRCOLL = 0x09C + SYS_STRNCMP = 0x09D + SYS_STRRCHR = 0x09F + SYS_STRXFRM = 0x09E + SYS___CACOSHF_B = 0x9A4 + SYS___CACOSHF_H = 0x9A5 + SYS___CACOSHL_B = 0x9A7 + SYS___CACOSHL_H = 0x9A8 + SYS___CACOSH_B = 0x9A1 + SYS___CACOSH_H = 0x9A2 + SYS___CARGF_B = 0x9AD + SYS___CARGF_H = 0x9AE + SYS___CARGL_B = 0x9B0 + SYS___CARGL_H = 0x9B1 + SYS___CARG_B = 0x9AA + SYS___CARG_H = 0x9AB + SYS___CASINF_B = 0x9B6 + SYS___CASINF_H = 0x9B7 + SYS___CASINHF_B = 0x9BF + SYS___CASINHF_H = 0x9C0 + SYS___CASINHL_B = 0x9C2 + SYS___CASINHL_H = 0x9C3 + SYS___CASINH_B = 0x9BC + SYS___CASINH_H = 0x9BD + SYS___CASINL_B = 0x9B9 + SYS___CASINL_H = 0x9BA + SYS___CASIN_B = 0x9B3 + SYS___CASIN_H = 0x9B4 + SYS___CATANF_B = 0x9C8 + SYS___CATANF_H = 0x9C9 + SYS___CATANHF_B = 0x9D1 + SYS___CATANHF_H = 0x9D2 + SYS___CATANHL_B = 0x9D4 + SYS___CATANHL_H = 0x9D5 + SYS___CATANH_B = 0x9CE + SYS___CATANH_H = 0x9CF + SYS___CATANL_B = 0x9CB + SYS___CATANL_H = 0x9CC + SYS___CATAN_B = 0x9C5 + SYS___CATAN_H = 0x9C6 + SYS___CCOSF_B = 0x9DA + SYS___CCOSF_H = 0x9DB + SYS___CCOSHF_B = 0x9E3 + SYS___CCOSHF_H = 0x9E4 + SYS___CCOSHL_B = 0x9E6 + SYS___CCOSHL_H = 0x9E7 + SYS___CCOSH_B = 0x9E0 + SYS___CCOSH_H = 0x9E1 + SYS___CCOSL_B = 0x9DD + SYS___CCOSL_H = 0x9DE + SYS___CCOS_B = 0x9D7 + SYS___CCOS_H = 0x9D8 + SYS___CEXPF_B = 0x9EC + SYS___CEXPF_H = 0x9ED + SYS___CEXPL_B = 0x9EF + SYS___CEXPL_H = 0x9F0 + SYS___CEXP_B = 0x9E9 + SYS___CEXP_H = 0x9EA + SYS___CIMAGF_B = 0x9F5 + SYS___CIMAGF_H = 0x9F6 + SYS___CIMAGL_B = 0x9F8 + SYS___CIMAGL_H = 0x9F9 + SYS___CIMAG_B = 0x9F2 + SYS___CIMAG_H = 0x9F3 + SYS___CLOG = 0x9FA + SYS___CLOGF_B = 0x9FE + SYS___CLOGF_H = 0x9FF + SYS___CLOG_B = 0x9FB + SYS___CLOG_H = 0x9FC + SYS_ISWCTYPE = 0x10C + SYS_ISWXDIGI = 0x10A + SYS_ISWXDIGIT = 0x10A + SYS_MBSINIT = 0x10F + SYS_TOWLOWER = 0x10D + SYS_TOWUPPER = 0x10E + SYS_WCTYPE = 0x10B + SYS_WCSSTR = 0x11B + SYS___RPMTCH = 0x11A + SYS_WCSTOD = 0x12E + SYS_WCSTOK = 0x12C + SYS_WCSTOL = 0x12D + SYS_WCSTOUL = 0x12F + SYS_FGETWC = 0x13C + SYS_FGETWS = 0x13D + SYS_FPUTWC = 0x13E + SYS_FPUTWS = 0x13F + SYS_REGERROR = 0x13B + SYS_REGFREE = 0x13A + SYS_COLLEQUIV = 0x14F + SYS_COLLTOSTR = 0x14E + SYS_ISMCCOLLEL = 0x14C + SYS_STRTOCOLL = 0x14D + SYS_DLLFREE = 0x16F + SYS_DLLQUERYFN = 0x16D + SYS_DLLQUERYVAR = 0x16E + SYS_GETMCCOLL = 0x16A + SYS_GETWMCCOLL = 0x16B + SYS___ERR2AD = 0x16C + SYS_CFSETOSPEED = 0x17A + SYS_CHDIR = 0x17B + SYS_CHMOD = 0x17C + SYS_CHOWN = 0x17D + SYS_CLOSE = 0x17E + SYS_CLOSEDIR = 0x17F + SYS_LOG = 0x017 + SYS_COSH = 0x018 + SYS_FCHMOD = 0x18A + SYS_FCHOWN = 0x18B + SYS_FCNTL = 0x18C + SYS_FILENO = 0x18D + SYS_FORK = 0x18E + SYS_FPATHCONF = 0x18F + SYS_GETLOGIN = 0x19A + SYS_GETPGRP = 0x19C + SYS_GETPID = 0x19D + SYS_GETPPID = 0x19E + SYS_GETPWNAM = 0x19F + SYS_TANH = 0x019 + SYS_W_GETMNTENT = 0x19B + SYS_POW = 0x020 + SYS_PTHREAD_SELF = 0x20A + SYS_PTHREAD_SETINTR = 0x20B + SYS_PTHREAD_SETINTRTYPE = 0x20C + SYS_PTHREAD_SETSPECIFIC = 0x20D + SYS_PTHREAD_TESTINTR = 0x20E + SYS_PTHREAD_YIELD = 0x20F + SYS_SQRT = 0x021 + SYS_FLOOR = 0x022 + SYS_J1 = 0x023 + SYS_WCSPBRK = 0x23F + SYS_BSEARCH = 0x24C + SYS_FABS = 0x024 + SYS_GETENV = 0x24A + SYS_LDIV = 0x24D + SYS_SYSTEM = 0x24B + SYS_FMOD = 0x025 + SYS___RETHROW = 0x25F + SYS___THROW = 0x25E + SYS_J0 = 0x026 + SYS_PUTENV = 0x26A + SYS___GETENV = 0x26F + SYS_SEMCTL = 0x27A + SYS_SEMGET = 0x27B + SYS_SEMOP = 0x27C + SYS_SHMAT = 0x27D + SYS_SHMCTL = 0x27E + SYS_SHMDT = 0x27F + SYS_YN = 0x027 + SYS_JN = 0x028 + SYS_SIGALTSTACK = 0x28A + SYS_SIGHOLD = 0x28B + SYS_SIGIGNORE = 0x28C + SYS_SIGINTERRUPT = 0x28D + SYS_SIGPAUSE = 0x28E + SYS_SIGRELSE = 0x28F + SYS_GETOPT = 0x29A + SYS_GETSUBOPT = 0x29D + SYS_LCHOWN = 0x29B + SYS_SETPGRP = 0x29E + SYS_TRUNCATE = 0x29C + SYS_Y0 = 0x029 + SYS___GDERR = 0x29F + SYS_ISALPHA = 0x030 + SYS_VFORK = 0x30F + SYS__LONGJMP = 0x30D + SYS__SETJMP = 0x30E + SYS_GLOB = 0x31A + SYS_GLOBFREE = 0x31B + SYS_ISALNUM = 0x031 + SYS_PUTW = 0x31C + SYS_SEEKDIR = 0x31D + SYS_TELLDIR = 0x31E + SYS_TEMPNAM = 0x31F + SYS_GETTIMEOFDAY_R = 0x32E + SYS_ISLOWER = 0x032 + SYS_LGAMMA = 0x32C + SYS_REMAINDER = 0x32A + SYS_SCALB = 0x32B + SYS_SYNC = 0x32F + SYS_TTYSLOT = 0x32D + SYS_ENDPROTOENT = 0x33A + SYS_ENDSERVENT = 0x33B + SYS_GETHOSTBYADDR = 0x33D + SYS_GETHOSTBYADDR_R = 0x33C + SYS_GETHOSTBYNAME = 0x33F + SYS_GETHOSTBYNAME_R = 0x33E + SYS_ISCNTRL = 0x033 + SYS_GETSERVBYNAME = 0x34A + SYS_GETSERVBYPORT = 0x34B + SYS_GETSERVENT = 0x34C + SYS_GETSOCKNAME = 0x34D + SYS_GETSOCKOPT = 0x34E + SYS_INET_ADDR = 0x34F + SYS_ISDIGIT = 0x034 + SYS_ISGRAPH = 0x035 + SYS_SELECT = 0x35B + SYS_SELECTEX = 0x35C + SYS_SEND = 0x35D + SYS_SENDTO = 0x35F + SYS_CHROOT = 0x36A + SYS_ISNAN = 0x36D + SYS_ISUPPER = 0x036 + SYS_ULIMIT = 0x36C + SYS_UTIMES = 0x36E + SYS_W_STATVFS = 0x36B + SYS___H_ERRNO = 0x36F + SYS_GRANTPT = 0x37A + SYS_ISPRINT = 0x037 + SYS_TCGETSID = 0x37C + SYS_UNLOCKPT = 0x37B + SYS___TCGETCP = 0x37D + SYS___TCSETCP = 0x37E + SYS___TCSETTABLES = 0x37F + SYS_ISPUNCT = 0x038 + SYS_NLIST = 0x38C + SYS___IPDBCS = 0x38D + SYS___IPDSPX = 0x38E + SYS___IPMSGC = 0x38F + SYS___STHOSTENT = 0x38B + SYS___STSERVENT = 0x38A + SYS_ISSPACE = 0x039 + SYS_COS = 0x040 + SYS_T_ALLOC = 0x40A + SYS_T_BIND = 0x40B + SYS_T_CLOSE = 0x40C + SYS_T_CONNECT = 0x40D + SYS_T_ERROR = 0x40E + SYS_T_FREE = 0x40F + SYS_TAN = 0x041 + SYS_T_RCVREL = 0x41A + SYS_T_RCVUDATA = 0x41B + SYS_T_RCVUDERR = 0x41C + SYS_T_SND = 0x41D + SYS_T_SNDDIS = 0x41E + SYS_T_SNDREL = 0x41F + SYS_GETPMSG = 0x42A + SYS_ISASTREAM = 0x42B + SYS_PUTMSG = 0x42C + SYS_PUTPMSG = 0x42D + SYS_SINH = 0x042 + SYS___ISPOSIXON = 0x42E + SYS___OPENMVSREL = 0x42F + SYS_ACOS = 0x043 + SYS_ATAN = 0x044 + SYS_ATAN2 = 0x045 + SYS_FTELL = 0x046 + SYS_FGETPOS = 0x047 + SYS_SOCK_DEBUG = 0x47A + SYS_SOCK_DO_TESTSTOR = 0x47D + SYS_TAKESOCKET = 0x47E + SYS___SERVER_INIT = 0x47F + SYS_FSEEK = 0x048 + SYS___IPHOST = 0x48B + SYS___IPNODE = 0x48C + SYS___SERVER_CLASSIFY_CREATE = 0x48D + SYS___SERVER_CLASSIFY_DESTROY = 0x48E + SYS___SERVER_CLASSIFY_RESET = 0x48F + SYS___SMF_RECORD = 0x48A + SYS_FSETPOS = 0x049 + SYS___FNWSA = 0x49B + SYS___SPAWN2 = 0x49D + SYS___SPAWNP2 = 0x49E + SYS_ATOF = 0x050 + SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A + SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B + SYS_PTHREAD_RWLOCK_DESTROY = 0x50C + SYS_PTHREAD_RWLOCK_INIT = 0x50D + SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E + SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F + SYS_ATOI = 0x051 + SYS___FP_CLASS = 0x51D + SYS___FP_CLR_FLAG = 0x51A + SYS___FP_FINITE = 0x51E + SYS___FP_ISNAN = 0x51F + SYS___FP_RAISE_XCP = 0x51C + SYS___FP_READ_FLAG = 0x51B + SYS_RAND = 0x052 + SYS_SIGTIMEDWAIT = 0x52D + SYS_SIGWAITINFO = 0x52E + SYS___CHKBFP = 0x52F + SYS___FPC_RS = 0x52C + SYS___FPC_RW = 0x52A + SYS___FPC_SM = 0x52B + SYS_STRTOD = 0x053 + SYS_STRTOL = 0x054 + SYS_STRTOUL = 0x055 + SYS_MALLOC = 0x056 + SYS_SRAND = 0x057 + SYS_CALLOC = 0x058 + SYS_FREE = 0x059 + SYS___OSENV = 0x59F + SYS___W_PIOCTL = 0x59E + SYS_LONGJMP = 0x060 + SYS___FLOORF_B = 0x60A + SYS___FLOORL_B = 0x60B + SYS___FREXPF_B = 0x60C + SYS___FREXPL_B = 0x60D + SYS___LDEXPF_B = 0x60E + SYS___LDEXPL_B = 0x60F + SYS_SIGNAL = 0x061 + SYS___ATAN2F_B = 0x61A + SYS___ATAN2L_B = 0x61B + SYS___COSHF_B = 0x61C + SYS___COSHL_B = 0x61D + SYS___EXPF_B = 0x61E + SYS___EXPL_B = 0x61F + SYS_TMPNAM = 0x062 + SYS___ABSF_B = 0x62A + SYS___ABSL_B = 0x62C + SYS___ABS_B = 0x62B + SYS___FMODF_B = 0x62D + SYS___FMODL_B = 0x62E + SYS___MODFF_B = 0x62F + SYS_ATANL = 0x63A + SYS_CEILF = 0x63B + SYS_CEILL = 0x63C + SYS_COSF = 0x63D + SYS_COSHF = 0x63F + SYS_COSL = 0x63E + SYS_REMOVE = 0x063 + SYS_POWL = 0x64A + SYS_RENAME = 0x064 + SYS_SINF = 0x64B + SYS_SINHF = 0x64F + SYS_SINL = 0x64C + SYS_SQRTF = 0x64D + SYS_SQRTL = 0x64E + SYS_BTOWC = 0x65F + SYS_FREXPL = 0x65A + SYS_LDEXPF = 0x65B + SYS_LDEXPL = 0x65C + SYS_MODFF = 0x65D + SYS_MODFL = 0x65E + SYS_TMPFILE = 0x065 + SYS_FREOPEN = 0x066 + SYS___CHARMAP_INIT_A = 0x66E + SYS___GETHOSTBYADDR_R_A = 0x66C + SYS___GETHOSTBYNAME_A = 0x66A + SYS___GETHOSTBYNAME_R_A = 0x66D + SYS___MBLEN_A = 0x66F + SYS___RES_INIT_A = 0x66B + SYS_FCLOSE = 0x067 + SYS___GETGRGID_R_A = 0x67D + SYS___WCSTOMBS_A = 0x67A + SYS___WCSTOMBS_STD_A = 0x67B + SYS___WCSWIDTH_A = 0x67C + SYS___WCSWIDTH_ASIA = 0x67F + SYS___WCSWIDTH_STD_A = 0x67E + SYS_FFLUSH = 0x068 + SYS___GETLOGIN_R_A = 0x68E + SYS___GETPWNAM_R_A = 0x68C + SYS___GETPWUID_R_A = 0x68D + SYS___TTYNAME_R_A = 0x68F + SYS___WCWIDTH_ASIA = 0x68B + SYS___WCWIDTH_STD_A = 0x68A + SYS_FOPEN = 0x069 + SYS___REGEXEC_A = 0x69A + SYS___REGEXEC_STD_A = 0x69B + SYS___REGFREE_A = 0x69C + SYS___REGFREE_STD_A = 0x69D + SYS___STRCOLL_A = 0x69E + SYS___STRCOLL_C_A = 0x69F + SYS_SCANF = 0x070 + SYS___A64L_A = 0x70C + SYS___ECVT_A = 0x70D + SYS___FCVT_A = 0x70E + SYS___GCVT_A = 0x70F + SYS___STRTOUL_A = 0x70A + SYS_____AE_CORRESTBL_QUERY_A = 0x70B + SYS_SPRINTF = 0x071 + SYS___ACCESS_A = 0x71F + SYS___CATOPEN_A = 0x71E + SYS___GETOPT_A = 0x71D + SYS___REALPATH_A = 0x71A + SYS___SETENV_A = 0x71B + SYS___SYSTEM_A = 0x71C + SYS_FGETC = 0x072 + SYS___GAI_STRERROR_A = 0x72F + SYS___RMDIR_A = 0x72A + SYS___STATVFS_A = 0x72B + SYS___SYMLINK_A = 0x72C + SYS___TRUNCATE_A = 0x72D + SYS___UNLINK_A = 0x72E + SYS_VFPRINTF = 0x073 + SYS___ISSPACE_A = 0x73A + SYS___ISUPPER_A = 0x73B + SYS___ISWALNUM_A = 0x73F + SYS___ISXDIGIT_A = 0x73C + SYS___TOLOWER_A = 0x73D + SYS___TOUPPER_A = 0x73E + SYS_VPRINTF = 0x074 + SYS___CONFSTR_A = 0x74B + SYS___FDOPEN_A = 0x74E + SYS___FLDATA_A = 0x74F + SYS___FTOK_A = 0x74C + SYS___ISWXDIGIT_A = 0x74A + SYS___MKTEMP_A = 0x74D + SYS_VSPRINTF = 0x075 + SYS___GETGRGID_A = 0x75A + SYS___GETGRNAM_A = 0x75B + SYS___GETGROUPSBYNAME_A = 0x75C + SYS___GETHOSTENT_A = 0x75D + SYS___GETHOSTNAME_A = 0x75E + SYS___GETLOGIN_A = 0x75F + SYS_GETC = 0x076 + SYS___CREATEWORKUNIT_A = 0x76A + SYS___CTERMID_A = 0x76B + SYS___FMTMSG_A = 0x76C + SYS___INITGROUPS_A = 0x76D + SYS___MSGRCV_A = 0x76F + SYS_____LOGIN_A = 0x76E + SYS_FGETS = 0x077 + SYS___STRCASECMP_A = 0x77B + SYS___STRNCASECMP_A = 0x77C + SYS___TTYNAME_A = 0x77D + SYS___UNAME_A = 0x77E + SYS___UTIMES_A = 0x77F + SYS_____SERVER_PWU_A = 0x77A + SYS_FPUTC = 0x078 + SYS___CREAT_O_A = 0x78E + SYS___ENVNA = 0x78F + SYS___FREAD_A = 0x78A + SYS___FWRITE_A = 0x78B + SYS___ISASCII = 0x78D + SYS___OPEN_O_A = 0x78C + SYS_FPUTS = 0x079 + SYS___ASCTIME_A = 0x79C + SYS___CTIME_A = 0x79D + SYS___GETDATE_A = 0x79E + SYS___GETSERVBYPORT_A = 0x79A + SYS___GETSERVENT_A = 0x79B + SYS___TZSET_A = 0x79F + SYS_ACL_FROM_TEXT = 0x80C + SYS_ACL_SET_FD = 0x80A + SYS_ACL_SET_FILE = 0x80B + SYS_ACL_SORT = 0x80E + SYS_ACL_TO_TEXT = 0x80D + SYS_UNGETC = 0x080 + SYS___SHUTDOWN_REGISTRATION = 0x80F + SYS_FREAD = 0x081 + SYS_FREEADDRINFO = 0x81A + SYS_GAI_STRERROR = 0x81B + SYS_REXEC_AF = 0x81C + SYS___DYNALLOC_A = 0x81F + SYS___POE = 0x81D + SYS_WCSTOMBS = 0x082 + SYS___INET_ADDR_A = 0x82F + SYS___NLIST_A = 0x82A + SYS_____TCGETCP_A = 0x82B + SYS_____TCSETCP_A = 0x82C + SYS_____W_PIOCTL_A = 0x82E + SYS_MBTOWC = 0x083 + SYS___CABEND = 0x83D + SYS___LE_CIB_GET = 0x83E + SYS___RECVMSG_A = 0x83B + SYS___SENDMSG_A = 0x83A + SYS___SET_LAA_FOR_JIT = 0x83F + SYS_____LCHATTR_A = 0x83C + SYS_WCTOMB = 0x084 + SYS___CBRTL_B = 0x84A + SYS___COPYSIGNF_B = 0x84B + SYS___COPYSIGNL_B = 0x84C + SYS___COTANF_B = 0x84D + SYS___COTANL_B = 0x84F + SYS___COTAN_B = 0x84E + SYS_MBSTOWCS = 0x085 + SYS___LOG1PL_B = 0x85A + SYS___LOG2F_B = 0x85B + SYS___LOG2L_B = 0x85D + SYS___LOG2_B = 0x85C + SYS___REMAINDERF_B = 0x85E + SYS___REMAINDERL_B = 0x85F + SYS_ACOSHF = 0x86E + SYS_ACOSHL = 0x86F + SYS_WCSCPY = 0x086 + SYS___ERFCF_B = 0x86D + SYS___ERFF_B = 0x86C + SYS___LROUNDF_B = 0x86A + SYS___LROUND_B = 0x86B + SYS_COTANL = 0x87A + SYS_EXP2F = 0x87B + SYS_EXP2L = 0x87C + SYS_EXPM1F = 0x87D + SYS_EXPM1L = 0x87E + SYS_FDIMF = 0x87F + SYS_WCSCAT = 0x087 + SYS___COTANL = 0x87A + SYS_REMAINDERF = 0x88A + SYS_REMAINDERL = 0x88B + SYS_REMAINDF = 0x88A + SYS_REMAINDL = 0x88B + SYS_REMQUO = 0x88D + SYS_REMQUOF = 0x88C + SYS_REMQUOL = 0x88E + SYS_TGAMMAF = 0x88F + SYS_WCSCHR = 0x088 + SYS_ERFCF = 0x89B + SYS_ERFCL = 0x89C + SYS_ERFL = 0x89A + SYS_EXP2 = 0x89E + SYS_WCSCMP = 0x089 + SYS___EXP2_B = 0x89D + SYS___FAR_JUMP = 0x89F + SYS_ABS = 0x090 + SYS___ERFCL_H = 0x90A + SYS___EXPF_H = 0x90C + SYS___EXPL_H = 0x90D + SYS___EXPM1_H = 0x90E + SYS___EXP_H = 0x90B + SYS___FDIM_H = 0x90F + SYS_DIV = 0x091 + SYS___LOG2F_H = 0x91F + SYS___LOG2_H = 0x91E + SYS___LOGB_H = 0x91D + SYS___LOGF_H = 0x91B + SYS___LOGL_H = 0x91C + SYS___LOG_H = 0x91A + SYS_LABS = 0x092 + SYS___POWL_H = 0x92A + SYS___REMAINDER_H = 0x92B + SYS___RINT_H = 0x92C + SYS___SCALB_H = 0x92D + SYS___SINF_H = 0x92F + SYS___SIN_H = 0x92E + SYS_STRNCPY = 0x093 + SYS___TANHF_H = 0x93B + SYS___TANHL_H = 0x93C + SYS___TANH_H = 0x93A + SYS___TGAMMAF_H = 0x93E + SYS___TGAMMA_H = 0x93D + SYS___TRUNC_H = 0x93F + SYS_MEMCPY = 0x094 + SYS_VFWSCANF = 0x94A + SYS_VSWSCANF = 0x94E + SYS_VWSCANF = 0x94C + SYS_INET6_RTH_ADD = 0x95D + SYS_INET6_RTH_INIT = 0x95C + SYS_INET6_RTH_REVERSE = 0x95E + SYS_INET6_RTH_SEGMENTS = 0x95F + SYS_INET6_RTH_SPACE = 0x95B + SYS_MEMMOVE = 0x095 + SYS_WCSTOLD = 0x95A + SYS_STRCPY = 0x096 + SYS_STRCMP = 0x097 + SYS_CABS = 0x98E + SYS_STRCAT = 0x098 + SYS___CABS_B = 0x98F + SYS___POW_II = 0x98A + SYS___POW_II_B = 0x98B + SYS___POW_II_H = 0x98C + SYS_CACOSF = 0x99A + SYS_CACOSL = 0x99D + SYS_STRNCAT = 0x099 + SYS___CACOSF_B = 0x99B + SYS___CACOSF_H = 0x99C + SYS___CACOSL_B = 0x99E + SYS___CACOSL_H = 0x99F + SYS_ISWALPHA = 0x100 + SYS_ISWBLANK = 0x101 + SYS___ISWBLK = 0x101 + SYS_ISWCNTRL = 0x102 + SYS_ISWDIGIT = 0x103 + SYS_ISWGRAPH = 0x104 + SYS_ISWLOWER = 0x105 + SYS_ISWPRINT = 0x106 + SYS_ISWPUNCT = 0x107 + SYS_ISWSPACE = 0x108 + SYS_ISWUPPER = 0x109 + SYS_WCTOB = 0x110 + SYS_MBRLEN = 0x111 + SYS_MBRTOWC = 0x112 + SYS_MBSRTOWC = 0x113 + SYS_MBSRTOWCS = 0x113 + SYS_WCRTOMB = 0x114 + SYS_WCSRTOMB = 0x115 + SYS_WCSRTOMBS = 0x115 + SYS___CSID = 0x116 + SYS___WCSID = 0x117 + SYS_STRPTIME = 0x118 + SYS___STRPTM = 0x118 + SYS_STRFMON = 0x119 + SYS_WCSCOLL = 0x130 + SYS_WCSXFRM = 0x131 + SYS_WCSWIDTH = 0x132 + SYS_WCWIDTH = 0x133 + SYS_WCSFTIME = 0x134 + SYS_SWPRINTF = 0x135 + SYS_VSWPRINT = 0x136 + SYS_VSWPRINTF = 0x136 + SYS_SWSCANF = 0x137 + SYS_REGCOMP = 0x138 + SYS_REGEXEC = 0x139 + SYS_GETWC = 0x140 + SYS_GETWCHAR = 0x141 + SYS_PUTWC = 0x142 + SYS_PUTWCHAR = 0x143 + SYS_UNGETWC = 0x144 + SYS_ICONV_OPEN = 0x145 + SYS_ICONV = 0x146 + SYS_ICONV_CLOSE = 0x147 + SYS_COLLRANGE = 0x150 + SYS_CCLASS = 0x151 + SYS_COLLORDER = 0x152 + SYS___DEMANGLE = 0x154 + SYS_FDOPEN = 0x155 + SYS___ERRNO = 0x156 + SYS___ERRNO2 = 0x157 + SYS___TERROR = 0x158 + SYS_MAXCOLL = 0x169 + SYS_DLLLOAD = 0x170 + SYS__EXIT = 0x174 + SYS_ACCESS = 0x175 + SYS_ALARM = 0x176 + SYS_CFGETISPEED = 0x177 + SYS_CFGETOSPEED = 0x178 + SYS_CFSETISPEED = 0x179 + SYS_CREAT = 0x180 + SYS_CTERMID = 0x181 + SYS_DUP = 0x182 + SYS_DUP2 = 0x183 + SYS_EXECL = 0x184 + SYS_EXECLE = 0x185 + SYS_EXECLP = 0x186 + SYS_EXECV = 0x187 + SYS_EXECVE = 0x188 + SYS_EXECVP = 0x189 + SYS_FSTAT = 0x190 + SYS_FSYNC = 0x191 + SYS_FTRUNCATE = 0x192 + SYS_GETCWD = 0x193 + SYS_GETEGID = 0x194 + SYS_GETEUID = 0x195 + SYS_GETGID = 0x196 + SYS_GETGRGID = 0x197 + SYS_GETGRNAM = 0x198 + SYS_GETGROUPS = 0x199 + SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 + SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 + SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 + SYS_PTHREAD_MUTEX_INIT = 0x203 + SYS_PTHREAD_MUTEX_DESTROY = 0x204 + SYS_PTHREAD_MUTEX_LOCK = 0x205 + SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 + SYS_PTHREAD_MUTEX_UNLOCK = 0x207 + SYS_PTHREAD_ONCE = 0x209 + SYS_TW_OPEN = 0x210 + SYS_TW_FCNTL = 0x211 + SYS_PTHREAD_JOIN_D4_NP = 0x212 + SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 + SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 + SYS_EXTLINK_NP = 0x215 + SYS___PASSWD = 0x216 + SYS_SETGROUPS = 0x217 + SYS_INITGROUPS = 0x218 + SYS_WCSRCHR = 0x240 + SYS_SVC99 = 0x241 + SYS___SVC99 = 0x241 + SYS_WCSWCS = 0x242 + SYS_LOCALECO = 0x243 + SYS_LOCALECONV = 0x243 + SYS___LIBREL = 0x244 + SYS_RELEASE = 0x245 + SYS___RLSE = 0x245 + SYS_FLOCATE = 0x246 + SYS___FLOCT = 0x246 + SYS_FDELREC = 0x247 + SYS___FDLREC = 0x247 + SYS_FETCH = 0x248 + SYS___FETCH = 0x248 + SYS_QSORT = 0x249 + SYS___CLEANUPCATCH = 0x260 + SYS___CATCHMATCH = 0x261 + SYS___CLEAN2UPCATCH = 0x262 + SYS_GETPRIORITY = 0x270 + SYS_NICE = 0x271 + SYS_SETPRIORITY = 0x272 + SYS_GETITIMER = 0x273 + SYS_SETITIMER = 0x274 + SYS_MSGCTL = 0x275 + SYS_MSGGET = 0x276 + SYS_MSGRCV = 0x277 + SYS_MSGSND = 0x278 + SYS_MSGXRCV = 0x279 + SYS___MSGXR = 0x279 + SYS_SHMGET = 0x280 + SYS___GETIPC = 0x281 + SYS_SETGRENT = 0x282 + SYS_GETGRENT = 0x283 + SYS_ENDGRENT = 0x284 + SYS_SETPWENT = 0x285 + SYS_GETPWENT = 0x286 + SYS_ENDPWENT = 0x287 + SYS_BSD_SIGNAL = 0x288 + SYS_KILLPG = 0x289 + SYS_SIGSET = 0x290 + SYS_SIGSTACK = 0x291 + SYS_GETRLIMIT = 0x292 + SYS_SETRLIMIT = 0x293 + SYS_GETRUSAGE = 0x294 + SYS_MMAP = 0x295 + SYS_MPROTECT = 0x296 + SYS_MSYNC = 0x297 + SYS_MUNMAP = 0x298 + SYS_CONFSTR = 0x299 + SYS___NDMTRM = 0x300 + SYS_FTOK = 0x301 + SYS_BASENAME = 0x302 + SYS_DIRNAME = 0x303 + SYS_GETDTABLESIZE = 0x304 + SYS_MKSTEMP = 0x305 + SYS_MKTEMP = 0x306 + SYS_NFTW = 0x307 + SYS_GETWD = 0x308 + SYS_LOCKF = 0x309 + SYS_WORDEXP = 0x310 + SYS_WORDFREE = 0x311 + SYS_GETPGID = 0x312 + SYS_GETSID = 0x313 + SYS___UTMPXNAME = 0x314 + SYS_CUSERID = 0x315 + SYS_GETPASS = 0x316 + SYS_FNMATCH = 0x317 + SYS_FTW = 0x318 + SYS_GETW = 0x319 + SYS_ACOSH = 0x320 + SYS_ASINH = 0x321 + SYS_ATANH = 0x322 + SYS_CBRT = 0x323 + SYS_EXPM1 = 0x324 + SYS_ILOGB = 0x325 + SYS_LOGB = 0x326 + SYS_LOG1P = 0x327 + SYS_NEXTAFTER = 0x328 + SYS_RINT = 0x329 + SYS_SPAWN = 0x330 + SYS_SPAWNP = 0x331 + SYS_GETLOGIN_UU = 0x332 + SYS_ECVT = 0x333 + SYS_FCVT = 0x334 + SYS_GCVT = 0x335 + SYS_ACCEPT = 0x336 + SYS_BIND = 0x337 + SYS_CONNECT = 0x338 + SYS_ENDHOSTENT = 0x339 + SYS_GETHOSTENT = 0x340 + SYS_GETHOSTID = 0x341 + SYS_GETHOSTNAME = 0x342 + SYS_GETNETBYADDR = 0x343 + SYS_GETNETBYNAME = 0x344 + SYS_GETNETENT = 0x345 + SYS_GETPEERNAME = 0x346 + SYS_GETPROTOBYNAME = 0x347 + SYS_GETPROTOBYNUMBER = 0x348 + SYS_GETPROTOENT = 0x349 + SYS_INET_LNAOF = 0x350 + SYS_INET_MAKEADDR = 0x351 + SYS_INET_NETOF = 0x352 + SYS_INET_NETWORK = 0x353 + SYS_INET_NTOA = 0x354 + SYS_IOCTL = 0x355 + SYS_LISTEN = 0x356 + SYS_READV = 0x357 + SYS_RECV = 0x358 + SYS_RECVFROM = 0x359 + SYS_SETHOSTENT = 0x360 + SYS_SETNETENT = 0x361 + SYS_SETPEER = 0x362 + SYS_SETPROTOENT = 0x363 + SYS_SETSERVENT = 0x364 + SYS_SETSOCKOPT = 0x365 + SYS_SHUTDOWN = 0x366 + SYS_SOCKET = 0x367 + SYS_SOCKETPAIR = 0x368 + SYS_WRITEV = 0x369 + SYS_ENDNETENT = 0x370 + SYS_CLOSELOG = 0x371 + SYS_OPENLOG = 0x372 + SYS_SETLOGMASK = 0x373 + SYS_SYSLOG = 0x374 + SYS_PTSNAME = 0x375 + SYS_SETREUID = 0x376 + SYS_SETREGID = 0x377 + SYS_REALPATH = 0x378 + SYS___SIGNGAM = 0x379 + SYS_POLL = 0x380 + SYS_REXEC = 0x381 + SYS___ISASCII2 = 0x382 + SYS___TOASCII2 = 0x383 + SYS_CHPRIORITY = 0x384 + SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 + SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 + SYS_PTHREAD_SET_LIMIT_NP = 0x387 + SYS___STNETENT = 0x388 + SYS___STPROTOENT = 0x389 + SYS___SELECT1 = 0x390 + SYS_PTHREAD_SECURITY_NP = 0x391 + SYS___CHECK_RESOURCE_AUTH_NP = 0x392 + SYS___CONVERT_ID_NP = 0x393 + SYS___OPENVMREL = 0x394 + SYS_WMEMCHR = 0x395 + SYS_WMEMCMP = 0x396 + SYS_WMEMCPY = 0x397 + SYS_WMEMMOVE = 0x398 + SYS_WMEMSET = 0x399 + SYS___FPUTWC = 0x400 + SYS___PUTWC = 0x401 + SYS___PWCHAR = 0x402 + SYS___WCSFTM = 0x403 + SYS___WCSTOK = 0x404 + SYS___WCWDTH = 0x405 + SYS_T_ACCEPT = 0x409 + SYS_T_GETINFO = 0x410 + SYS_T_GETPROTADDR = 0x411 + SYS_T_GETSTATE = 0x412 + SYS_T_LISTEN = 0x413 + SYS_T_LOOK = 0x414 + SYS_T_OPEN = 0x415 + SYS_T_OPTMGMT = 0x416 + SYS_T_RCV = 0x417 + SYS_T_RCVCONNECT = 0x418 + SYS_T_RCVDIS = 0x419 + SYS_T_SNDUDATA = 0x420 + SYS_T_STRERROR = 0x421 + SYS_T_SYNC = 0x422 + SYS_T_UNBIND = 0x423 + SYS___T_ERRNO = 0x424 + SYS___RECVMSG2 = 0x425 + SYS___SENDMSG2 = 0x426 + SYS_FATTACH = 0x427 + SYS_FDETACH = 0x428 + SYS_GETMSG = 0x429 + SYS_GETCONTEXT = 0x430 + SYS_SETCONTEXT = 0x431 + SYS_MAKECONTEXT = 0x432 + SYS_SWAPCONTEXT = 0x433 + SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 + SYS_GETCLIENTID = 0x470 + SYS___GETCLIENTID = 0x471 + SYS_GETSTABLESIZE = 0x472 + SYS_GETIBMOPT = 0x473 + SYS_GETIBMSOCKOPT = 0x474 + SYS_GIVESOCKET = 0x475 + SYS_IBMSFLUSH = 0x476 + SYS_MAXDESC = 0x477 + SYS_SETIBMOPT = 0x478 + SYS_SETIBMSOCKOPT = 0x479 + SYS___SERVER_PWU = 0x480 + SYS_PTHREAD_TAG_NP = 0x481 + SYS___CONSOLE = 0x482 + SYS___WSINIT = 0x483 + SYS___IPTCPN = 0x489 + SYS___SERVER_CLASSIFY = 0x490 + SYS___HEAPRPT = 0x496 + SYS___ISBFP = 0x500 + SYS___FP_CAST = 0x501 + SYS___CERTIFICATE = 0x502 + SYS_SEND_FILE = 0x503 + SYS_AIO_CANCEL = 0x504 + SYS_AIO_ERROR = 0x505 + SYS_AIO_READ = 0x506 + SYS_AIO_RETURN = 0x507 + SYS_AIO_SUSPEND = 0x508 + SYS_AIO_WRITE = 0x509 + SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 + SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 + SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 + SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 + SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 + SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 + SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 + SYS___CTTBL = 0x517 + SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 + SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 + SYS___FP_UNORDERED = 0x520 + SYS___FP_READ_RND = 0x521 + SYS___FP_READ_RND_B = 0x522 + SYS___FP_SWAP_RND = 0x523 + SYS___FP_SWAP_RND_B = 0x524 + SYS___FP_LEVEL = 0x525 + SYS___FP_BTOH = 0x526 + SYS___FP_HTOB = 0x527 + SYS___FPC_RD = 0x528 + SYS___FPC_WR = 0x529 + SYS_PTHREAD_SETCANCELTYPE = 0x600 + SYS_PTHREAD_TESTCANCEL = 0x601 + SYS___ATANF_B = 0x602 + SYS___ATANL_B = 0x603 + SYS___CEILF_B = 0x604 + SYS___CEILL_B = 0x605 + SYS___COSF_B = 0x606 + SYS___COSL_B = 0x607 + SYS___FABSF_B = 0x608 + SYS___FABSL_B = 0x609 + SYS___SINF_B = 0x610 + SYS___SINL_B = 0x611 + SYS___TANF_B = 0x612 + SYS___TANL_B = 0x613 + SYS___TANHF_B = 0x614 + SYS___TANHL_B = 0x615 + SYS___ACOSF_B = 0x616 + SYS___ACOSL_B = 0x617 + SYS___ASINF_B = 0x618 + SYS___ASINL_B = 0x619 + SYS___LOGF_B = 0x620 + SYS___LOGL_B = 0x621 + SYS___LOG10F_B = 0x622 + SYS___LOG10L_B = 0x623 + SYS___POWF_B = 0x624 + SYS___POWL_B = 0x625 + SYS___SINHF_B = 0x626 + SYS___SINHL_B = 0x627 + SYS___SQRTF_B = 0x628 + SYS___SQRTL_B = 0x629 + SYS___MODFL_B = 0x630 + SYS_ABSF = 0x631 + SYS_ABSL = 0x632 + SYS_ACOSF = 0x633 + SYS_ACOSL = 0x634 + SYS_ASINF = 0x635 + SYS_ASINL = 0x636 + SYS_ATAN2F = 0x637 + SYS_ATAN2L = 0x638 + SYS_ATANF = 0x639 + SYS_COSHL = 0x640 + SYS_EXPF = 0x641 + SYS_EXPL = 0x642 + SYS_TANHF = 0x643 + SYS_TANHL = 0x644 + SYS_LOG10F = 0x645 + SYS_LOG10L = 0x646 + SYS_LOGF = 0x647 + SYS_LOGL = 0x648 + SYS_POWF = 0x649 + SYS_SINHL = 0x650 + SYS_TANF = 0x651 + SYS_TANL = 0x652 + SYS_FABSF = 0x653 + SYS_FABSL = 0x654 + SYS_FLOORF = 0x655 + SYS_FLOORL = 0x656 + SYS_FMODF = 0x657 + SYS_FMODL = 0x658 + SYS_FREXPF = 0x659 + SYS___CHATTR = 0x660 + SYS___FCHATTR = 0x661 + SYS___TOCCSID = 0x662 + SYS___CSNAMETYPE = 0x663 + SYS___TOCSNAME = 0x664 + SYS___CCSIDTYPE = 0x665 + SYS___AE_CORRESTBL_QUERY = 0x666 + SYS___AE_AUTOCONVERT_STATE = 0x667 + SYS_DN_FIND = 0x668 + SYS___GETHOSTBYADDR_A = 0x669 + SYS___MBLEN_SB_A = 0x670 + SYS___MBLEN_STD_A = 0x671 + SYS___MBLEN_UTF = 0x672 + SYS___MBSTOWCS_A = 0x673 + SYS___MBSTOWCS_STD_A = 0x674 + SYS___MBTOWC_A = 0x675 + SYS___MBTOWC_ISO1 = 0x676 + SYS___MBTOWC_SBCS = 0x677 + SYS___MBTOWC_MBCS = 0x678 + SYS___MBTOWC_UTF = 0x679 + SYS___CSID_A = 0x680 + SYS___CSID_STD_A = 0x681 + SYS___WCSID_A = 0x682 + SYS___WCSID_STD_A = 0x683 + SYS___WCTOMB_A = 0x684 + SYS___WCTOMB_ISO1 = 0x685 + SYS___WCTOMB_STD_A = 0x686 + SYS___WCTOMB_UTF = 0x687 + SYS___WCWIDTH_A = 0x688 + SYS___GETGRNAM_R_A = 0x689 + SYS___READDIR_R_A = 0x690 + SYS___E2A_S = 0x691 + SYS___FNMATCH_A = 0x692 + SYS___FNMATCH_C_A = 0x693 + SYS___EXECL_A = 0x694 + SYS___FNMATCH_STD_A = 0x695 + SYS___REGCOMP_A = 0x696 + SYS___REGCOMP_STD_A = 0x697 + SYS___REGERROR_A = 0x698 + SYS___REGERROR_STD_A = 0x699 + SYS___SWPRINTF_A = 0x700 + SYS___FSCANF_A = 0x701 + SYS___SCANF_A = 0x702 + SYS___SSCANF_A = 0x703 + SYS___SWSCANF_A = 0x704 + SYS___ATOF_A = 0x705 + SYS___ATOI_A = 0x706 + SYS___ATOL_A = 0x707 + SYS___STRTOD_A = 0x708 + SYS___STRTOL_A = 0x709 + SYS___L64A_A = 0x710 + SYS___STRERROR_A = 0x711 + SYS___PERROR_A = 0x712 + SYS___FETCH_A = 0x713 + SYS___GETENV_A = 0x714 + SYS___MKSTEMP_A = 0x717 + SYS___PTSNAME_A = 0x718 + SYS___PUTENV_A = 0x719 + SYS___CHDIR_A = 0x720 + SYS___CHOWN_A = 0x721 + SYS___CHROOT_A = 0x722 + SYS___GETCWD_A = 0x723 + SYS___GETWD_A = 0x724 + SYS___LCHOWN_A = 0x725 + SYS___LINK_A = 0x726 + SYS___PATHCONF_A = 0x727 + SYS___IF_NAMEINDEX_A = 0x728 + SYS___READLINK_A = 0x729 + SYS___EXTLINK_NP_A = 0x730 + SYS___ISALNUM_A = 0x731 + SYS___ISALPHA_A = 0x732 + SYS___A2E_S = 0x733 + SYS___ISCNTRL_A = 0x734 + SYS___ISDIGIT_A = 0x735 + SYS___ISGRAPH_A = 0x736 + SYS___ISLOWER_A = 0x737 + SYS___ISPRINT_A = 0x738 + SYS___ISPUNCT_A = 0x739 + SYS___ISWALPHA_A = 0x740 + SYS___A2E_L = 0x741 + SYS___ISWCNTRL_A = 0x742 + SYS___ISWDIGIT_A = 0x743 + SYS___ISWGRAPH_A = 0x744 + SYS___ISWLOWER_A = 0x745 + SYS___ISWPRINT_A = 0x746 + SYS___ISWPUNCT_A = 0x747 + SYS___ISWSPACE_A = 0x748 + SYS___ISWUPPER_A = 0x749 + SYS___REMOVE_A = 0x750 + SYS___RENAME_A = 0x751 + SYS___TMPNAM_A = 0x752 + SYS___FOPEN_A = 0x753 + SYS___FREOPEN_A = 0x754 + SYS___CUSERID_A = 0x755 + SYS___POPEN_A = 0x756 + SYS___TEMPNAM_A = 0x757 + SYS___FTW_A = 0x758 + SYS___GETGRENT_A = 0x759 + SYS___INET_NTOP_A = 0x760 + SYS___GETPASS_A = 0x761 + SYS___GETPWENT_A = 0x762 + SYS___GETPWNAM_A = 0x763 + SYS___GETPWUID_A = 0x764 + SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 + SYS___CHECKSCHENV_A = 0x766 + SYS___CONNECTSERVER_A = 0x767 + SYS___CONNECTWORKMGR_A = 0x768 + SYS_____CONSOLE_A = 0x769 + SYS___MSGSND_A = 0x770 + SYS___MSGXRCV_A = 0x771 + SYS___NFTW_A = 0x772 + SYS_____PASSWD_A = 0x773 + SYS___PTHREAD_SECURITY_NP_A = 0x774 + SYS___QUERYMETRICS_A = 0x775 + SYS___QUERYSCHENV = 0x776 + SYS___READV_A = 0x777 + SYS_____SERVER_CLASSIFY_A = 0x778 + SYS_____SERVER_INIT_A = 0x779 + SYS___W_GETPSENT_A = 0x780 + SYS___WRITEV_A = 0x781 + SYS___W_STATFS_A = 0x782 + SYS___W_STATVFS_A = 0x783 + SYS___FPUTC_A = 0x784 + SYS___PUTCHAR_A = 0x785 + SYS___PUTS_A = 0x786 + SYS___FGETS_A = 0x787 + SYS___GETS_A = 0x788 + SYS___FPUTS_A = 0x789 + SYS___PUTC_A = 0x790 + SYS___AE_THREAD_SETMODE = 0x791 + SYS___AE_THREAD_SWAPMODE = 0x792 + SYS___GETNETBYADDR_A = 0x793 + SYS___GETNETBYNAME_A = 0x794 + SYS___GETNETENT_A = 0x795 + SYS___GETPROTOBYNAME_A = 0x796 + SYS___GETPROTOBYNUMBER_A = 0x797 + SYS___GETPROTOENT_A = 0x798 + SYS___GETSERVBYNAME_A = 0x799 + SYS_ACL_FIRST_ENTRY = 0x800 + SYS_ACL_GET_ENTRY = 0x801 + SYS_ACL_VALID = 0x802 + SYS_ACL_CREATE_ENTRY = 0x803 + SYS_ACL_DELETE_ENTRY = 0x804 + SYS_ACL_UPDATE_ENTRY = 0x805 + SYS_ACL_DELETE_FD = 0x806 + SYS_ACL_DELETE_FILE = 0x807 + SYS_ACL_GET_FD = 0x808 + SYS_ACL_GET_FILE = 0x809 + SYS___ERFL_B = 0x810 + SYS___ERFCL_B = 0x811 + SYS___LGAMMAL_B = 0x812 + SYS___SETHOOKEVENTS = 0x813 + SYS_IF_NAMETOINDEX = 0x814 + SYS_IF_INDEXTONAME = 0x815 + SYS_IF_NAMEINDEX = 0x816 + SYS_IF_FREENAMEINDEX = 0x817 + SYS_GETADDRINFO = 0x818 + SYS_GETNAMEINFO = 0x819 + SYS___DYNFREE_A = 0x820 + SYS___RES_QUERY_A = 0x821 + SYS___RES_SEARCH_A = 0x822 + SYS___RES_QUERYDOMAIN_A = 0x823 + SYS___RES_MKQUERY_A = 0x824 + SYS___RES_SEND_A = 0x825 + SYS___DN_EXPAND_A = 0x826 + SYS___DN_SKIPNAME_A = 0x827 + SYS___DN_COMP_A = 0x828 + SYS___DN_FIND_A = 0x829 + SYS___INET_NTOA_A = 0x830 + SYS___INET_NETWORK_A = 0x831 + SYS___ACCEPT_A = 0x832 + SYS___ACCEPT_AND_RECV_A = 0x833 + SYS___BIND_A = 0x834 + SYS___CONNECT_A = 0x835 + SYS___GETPEERNAME_A = 0x836 + SYS___GETSOCKNAME_A = 0x837 + SYS___RECVFROM_A = 0x838 + SYS___SENDTO_A = 0x839 + SYS___LCHATTR = 0x840 + SYS___WRITEDOWN = 0x841 + SYS_PTHREAD_MUTEX_INIT2 = 0x842 + SYS___ACOSHF_B = 0x843 + SYS___ACOSHL_B = 0x844 + SYS___ASINHF_B = 0x845 + SYS___ASINHL_B = 0x846 + SYS___ATANHF_B = 0x847 + SYS___ATANHL_B = 0x848 + SYS___CBRTF_B = 0x849 + SYS___EXP2F_B = 0x850 + SYS___EXP2L_B = 0x851 + SYS___EXPM1F_B = 0x852 + SYS___EXPM1L_B = 0x853 + SYS___FDIMF_B = 0x854 + SYS___FDIM_B = 0x855 + SYS___FDIML_B = 0x856 + SYS___HYPOTF_B = 0x857 + SYS___HYPOTL_B = 0x858 + SYS___LOG1PF_B = 0x859 + SYS___REMQUOF_B = 0x860 + SYS___REMQUO_B = 0x861 + SYS___REMQUOL_B = 0x862 + SYS___TGAMMAF_B = 0x863 + SYS___TGAMMA_B = 0x864 + SYS___TGAMMAL_B = 0x865 + SYS___TRUNCF_B = 0x866 + SYS___TRUNC_B = 0x867 + SYS___TRUNCL_B = 0x868 + SYS___LGAMMAF_B = 0x869 + SYS_ASINHF = 0x870 + SYS_ASINHL = 0x871 + SYS_ATANHF = 0x872 + SYS_ATANHL = 0x873 + SYS_CBRTF = 0x874 + SYS_CBRTL = 0x875 + SYS_COPYSIGNF = 0x876 + SYS_CPYSIGNF = 0x876 + SYS_COPYSIGNL = 0x877 + SYS_CPYSIGNL = 0x877 + SYS_COTANF = 0x878 + SYS___COTANF = 0x878 + SYS_COTAN = 0x879 + SYS___COTAN = 0x879 + SYS_FDIM = 0x881 + SYS_FDIML = 0x882 + SYS_HYPOTF = 0x883 + SYS_HYPOTL = 0x884 + SYS_LOG1PF = 0x885 + SYS_LOG1PL = 0x886 + SYS_LOG2F = 0x887 + SYS_LOG2 = 0x888 + SYS_LOG2L = 0x889 + SYS_TGAMMA = 0x890 + SYS_TGAMMAL = 0x891 + SYS_TRUNCF = 0x892 + SYS_TRUNC = 0x893 + SYS_TRUNCL = 0x894 + SYS_LGAMMAF = 0x895 + SYS_LGAMMAL = 0x896 + SYS_LROUNDF = 0x897 + SYS_LROUND = 0x898 + SYS_ERFF = 0x899 + SYS___COSHF_H = 0x900 + SYS___COSHL_H = 0x901 + SYS___COTAN_H = 0x902 + SYS___COTANF_H = 0x903 + SYS___COTANL_H = 0x904 + SYS___ERF_H = 0x905 + SYS___ERFF_H = 0x906 + SYS___ERFL_H = 0x907 + SYS___ERFC_H = 0x908 + SYS___ERFCF_H = 0x909 + SYS___FDIMF_H = 0x910 + SYS___FDIML_H = 0x911 + SYS___FMOD_H = 0x912 + SYS___FMODF_H = 0x913 + SYS___FMODL_H = 0x914 + SYS___GAMMA_H = 0x915 + SYS___HYPOT_H = 0x916 + SYS___ILOGB_H = 0x917 + SYS___LGAMMA_H = 0x918 + SYS___LGAMMAF_H = 0x919 + SYS___LOG2L_H = 0x920 + SYS___LOG1P_H = 0x921 + SYS___LOG10_H = 0x922 + SYS___LOG10F_H = 0x923 + SYS___LOG10L_H = 0x924 + SYS___LROUND_H = 0x925 + SYS___LROUNDF_H = 0x926 + SYS___NEXTAFTER_H = 0x927 + SYS___POW_H = 0x928 + SYS___POWF_H = 0x929 + SYS___SINL_H = 0x930 + SYS___SINH_H = 0x931 + SYS___SINHF_H = 0x932 + SYS___SINHL_H = 0x933 + SYS___SQRT_H = 0x934 + SYS___SQRTF_H = 0x935 + SYS___SQRTL_H = 0x936 + SYS___TAN_H = 0x937 + SYS___TANF_H = 0x938 + SYS___TANL_H = 0x939 + SYS___TRUNCF_H = 0x940 + SYS___TRUNCL_H = 0x941 + SYS___COSH_H = 0x942 + SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 + SYS_VFSCANF = 0x944 + SYS_VSCANF = 0x946 + SYS_VSSCANF = 0x948 + SYS_IMAXABS = 0x950 + SYS_IMAXDIV = 0x951 + SYS_STRTOIMAX = 0x952 + SYS_STRTOUMAX = 0x953 + SYS_WCSTOIMAX = 0x954 + SYS_WCSTOUMAX = 0x955 + SYS_ATOLL = 0x956 + SYS_STRTOF = 0x957 + SYS_STRTOLD = 0x958 + SYS_WCSTOF = 0x959 + SYS_INET6_RTH_GETADDR = 0x960 + SYS_INET6_OPT_INIT = 0x961 + SYS_INET6_OPT_APPEND = 0x962 + SYS_INET6_OPT_FINISH = 0x963 + SYS_INET6_OPT_SET_VAL = 0x964 + SYS_INET6_OPT_NEXT = 0x965 + SYS_INET6_OPT_FIND = 0x966 + SYS_INET6_OPT_GET_VAL = 0x967 + SYS___POW_I = 0x987 + SYS___POW_I_B = 0x988 + SYS___POW_I_H = 0x989 + SYS___CABS_H = 0x990 + SYS_CABSF = 0x991 + SYS___CABSF_B = 0x992 + SYS___CABSF_H = 0x993 + SYS_CABSL = 0x994 + SYS___CABSL_B = 0x995 + SYS___CABSL_H = 0x996 + SYS_CACOS = 0x997 + SYS___CACOS_B = 0x998 + SYS___CACOS_H = 0x999 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go index 295859c50..7a8161c1d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go @@ -1,6 +1,7 @@ // cgo -godefs types_aix.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc && aix // +build ppc,aix package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go index a9ee0ffd4..07ed733c5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go @@ -1,6 +1,7 @@ // cgo -godefs types_aix.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64 && aix // +build ppc64,aix package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go index 725b4bee2..54db43335 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -1,6 +1,7 @@ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && darwin // +build 386,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 080ffce32..eb73e52fb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && darwin // +build amd64,darwin package unix @@ -210,6 +211,13 @@ type RawSockaddrCtl struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 +} + type Linger struct { Onoff int32 Linger int32 @@ -273,6 +281,7 @@ const ( SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x14 SizeofSockaddrCtl = 0x20 + SizeofXucred = 0x4c SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go index f2a77bc4e..8606d654e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -1,6 +1,7 @@ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && darwin // +build arm,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index c9492428b..dcb51f840 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -1,6 +1,7 @@ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && darwin // +build arm64,darwin package unix @@ -210,6 +211,13 @@ type RawSockaddrCtl struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 +} + type Linger struct { Onoff int32 Linger int32 @@ -273,6 +281,7 @@ const ( SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x14 SizeofSockaddrCtl = 0x20 + SizeofXucred = 0x4c SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index 85506a05d..1d049d7a1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_dragonfly.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && dragonfly // +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 3e9dad33e..c51bc88ff 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -1,6 +1,7 @@ // cgo -godefs types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && freebsd // +build 386,freebsd package unix @@ -250,6 +251,14 @@ type RawSockaddrAny struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 + _ *byte +} + type Linger struct { Onoff int32 Linger int32 @@ -312,6 +321,7 @@ const ( SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x36 + SizeofXucred = 0x50 SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index e00e61554..395b69187 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && freebsd // +build amd64,freebsd package unix @@ -246,6 +247,14 @@ type RawSockaddrAny struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 + _ *byte +} + type Linger struct { Onoff int32 Linger int32 @@ -308,6 +317,7 @@ const ( SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x36 + SizeofXucred = 0x58 SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 5da13c871..d3f9d2541 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -1,6 +1,7 @@ // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && freebsd // +build arm,freebsd package unix @@ -248,6 +249,14 @@ type RawSockaddrAny struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 + _ *byte +} + type Linger struct { Onoff int32 Linger int32 @@ -310,6 +319,7 @@ const ( SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x36 + SizeofXucred = 0x50 SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 995ecf9d4..434d6e8e8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && freebsd // +build arm64,freebsd package unix @@ -246,6 +247,14 @@ type RawSockaddrAny struct { type _Socklen uint32 +type Xucred struct { + Version uint32 + Uid uint32 + Ngroups int16 + Groups [16]uint32 + _ *byte +} + type Linger struct { Onoff int32 Linger int32 @@ -308,6 +317,7 @@ const ( SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x36 + SizeofXucred = 0x58 SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go new file mode 100644 index 000000000..1137a5a1f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go @@ -0,0 +1,40 @@ +// cgo -godefs types_illumos.go | go run mkpost.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build amd64 && illumos +// +build amd64,illumos + +package unix + +const ( + TUNNEWPPA = 0x540001 + TUNSETPPA = 0x540002 + + I_STR = 0x5308 + I_POP = 0x5303 + I_PUSH = 0x5302 + I_PLINK = 0x5316 + I_PUNLINK = 0x5317 + + IF_UNITSEL = -0x7ffb8cca +) + +type strbuf struct { + Maxlen int32 + Len int32 + Buf *int8 +} + +type strioctl struct { + Cmd int32 + Timout int32 + Len int32 + Dp *int8 +} + +type lifreq struct { + Name [32]int8 + Lifru1 [4]byte + Type uint32 + Lifru [336]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 9f3b1a4e5..c769e73cd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -1,5 +1,6 @@ // Code generated by mkmerge.go; DO NOT EDIT. +//go:build linux // +build linux package unix @@ -83,7 +84,7 @@ type FileCloneRange struct { Dest_offset uint64 } -type FileDedupeRange struct { +type RawFileDedupeRange struct { Src_offset uint64 Src_length uint64 Dest_count uint16 @@ -91,6 +92,21 @@ type FileDedupeRange struct { Reserved2 uint32 } +type RawFileDedupeRangeInfo struct { + Dest_fd int64 + Dest_offset uint64 + Bytes_deduped uint64 + Status int32 + Reserved uint32 +} + +const ( + SizeofRawFileDedupeRange = 0x18 + SizeofRawFileDedupeRangeInfo = 0x20 + FILE_DEDUPE_RANGE_SAME = 0x0 + FILE_DEDUPE_RANGE_DIFFERS = 0x1 +) + type FscryptPolicy struct { Version uint8 Contents_encryption_mode uint8 @@ -288,7 +304,8 @@ type RawSockaddrVM struct { Reserved1 uint16 Port uint32 Cid uint32 - Zero [4]uint8 + Flags uint8 + Zero [3]uint8 } type RawSockaddrXDP struct { @@ -999,7 +1016,7 @@ const ( PERF_SAMPLE_PHYS_ADDR = 0x80000 PERF_SAMPLE_AUX = 0x100000 PERF_SAMPLE_CGROUP = 0x200000 - PERF_SAMPLE_MAX = 0x400000 + PERF_SAMPLE_MAX = 0x1000000 PERF_SAMPLE_BRANCH_USER_SHIFT = 0x0 PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 0x1 PERF_SAMPLE_BRANCH_HV_SHIFT = 0x2 @@ -3680,3 +3697,26 @@ const ( ETHTOOL_A_TUNNEL_INFO_UDP_PORTS = 0x2 ETHTOOL_A_TUNNEL_INFO_MAX = 0x2 ) + +type ( + HIDRawReportDescriptor struct { + Size uint32 + Value [4096]uint8 + } + HIDRawDevInfo struct { + Bustype uint32 + Vendor int16 + Product int16 + } +) + +const ( + CLOSE_RANGE_UNSHARE = 0x2 + CLOSE_RANGE_CLOEXEC = 0x4 +) + +const ( + NLMSGERR_ATTR_MSG = 0x1 + NLMSGERR_ATTR_OFFS = 0x2 + NLMSGERR_ATTR_COOKIE = 0x3 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 088bd77e3..4d4d283de 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && linux // +build 386,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 078d958ec..8a2eed5ec 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && linux // +build amd64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 2d39122f4..94b34add6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && linux // +build arm,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 304cbd045..2143de4d5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && linux // +build arm64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 7d9d57006..a40216eee 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips && linux // +build mips,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index a1eb2577b..e834b069f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && linux // +build mips64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 2e5ce3b6a..e31083b04 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64le && linux // +build mips64le,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index bbaa1200b..42811f7fb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mipsle && linux // +build mipsle,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 0e6e8a774..2a3afbaef 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64 && linux // +build ppc64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 7382f385f..c0de30a65 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build ppc64le && linux // +build ppc64le,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 28d552216..74faf2e91 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build riscv64 && linux // +build riscv64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index a91a7a44b..9a8f0c2c6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build s390x && linux // +build s390x,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index f824b2358..72cdda75b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build sparc64 && linux // +build sparc64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 3f11f88e3..b10e73abf 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -1,6 +1,7 @@ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && netbsd // +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 0bed83af5..28ed6d55a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && netbsd // +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index e4e3bf736..4ba196ebe 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -1,6 +1,7 @@ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && netbsd // +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go index efac861bb..dd642bd9c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go @@ -1,6 +1,7 @@ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && netbsd // +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 80fa295f1..1fdb0e5fa 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -1,6 +1,7 @@ // cgo -godefs types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build 386 && openbsd // +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index 560dd6d08..e2fc93c7c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && openbsd // +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 0c1700fa4..8d34b5a2f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -1,6 +1,7 @@ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm && openbsd // +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go index 5b3e46633..ea8f1a0d9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build arm64 && openbsd // +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go index 62bff1670..ec6e8bc3f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go @@ -1,6 +1,7 @@ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build mips64 && openbsd // +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go index ca512aff7..85effef9c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -1,6 +1,7 @@ // cgo -godefs types_solaris.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. +//go:build amd64 && solaris // +build amd64,solaris package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go new file mode 100644 index 000000000..8bffde78e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go @@ -0,0 +1,402 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build zos && s390x +// +build zos,s390x + +// Hand edited based on ztypes_linux_s390x.go +// TODO: auto-generate. + +package unix + +const ( + SizeofPtr = 0x8 + SizeofShort = 0x2 + SizeofInt = 0x4 + SizeofLong = 0x8 + SizeofLongLong = 0x8 + PathMax = 0x1000 +) + +const ( + SizeofSockaddrAny = 128 + SizeofCmsghdr = 12 + SizeofIPMreq = 8 + SizeofIPv6Mreq = 20 + SizeofICMPv6Filter = 32 + SizeofIPv6MTUInfo = 32 + SizeofLinger = 8 + SizeofSockaddrInet4 = 16 + SizeofSockaddrInet6 = 28 + SizeofTCPInfo = 0x68 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type timeval_zos struct { //correct (with padding and all) + Sec int64 + _ [4]byte // pad + Usec int32 +} + +type Tms struct { //clock_t is 4-byte unsigned int in zos + Utime uint32 + Stime uint32 + Cutime uint32 + Cstime uint32 +} + +type Time_t int64 + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Utsname struct { + Sysname [65]byte + Nodename [65]byte + Release [65]byte + Version [65]byte + Machine [65]byte + Domainname [65]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [108]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + _ [112]uint8 // pad +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Iov *Iovec + Control *byte + Flags int32 + Namelen int32 + Iovlen int32 + Controllen int32 +} + +type Cmsghdr struct { + Len int32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Addr [4]byte /* in_addr */ + Ifindex uint32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +type _Gid_t uint32 + +type rusage_zos struct { + Utime timeval_zos + Stime timeval_zos +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +// { int, short, short } in poll.h +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +type Stat_t struct { //Linux Definition + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + _ int32 + Rdev uint64 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize int64 + Blocks int64 + _ [3]int64 +} + +type Stat_LE_t struct { + _ [4]byte // eye catcher + Length uint16 + Version uint16 + Mode int32 + Ino uint32 + Dev uint32 + Nlink int32 + Uid int32 + Gid int32 + Size int64 + Atim31 [4]byte + Mtim31 [4]byte + Ctim31 [4]byte + Rdev uint32 + Auditoraudit uint32 + Useraudit uint32 + Blksize int32 + Creatim31 [4]byte + AuditID [16]byte + _ [4]byte // rsrvd1 + File_tag struct { + Ccsid uint16 + Txtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14 + } + CharsetID [8]byte + Blocks int64 + Genvalue uint32 + Reftim31 [4]byte + Fid [8]byte + Filefmt byte + Fspflag2 byte + _ [2]byte // rsrvd2 + Ctimemsec int32 + Seclabel [8]byte + _ [4]byte // rsrvd3 + _ [4]byte // rsrvd4 + Atim Time_t + Mtim Time_t + Ctim Time_t + Creatim Time_t + Reftim Time_t + _ [24]byte // rsrvd5 +} + +type Statvfs_t struct { + ID [4]byte + Len int32 + Bsize uint64 + Blocks uint64 + Usedspace uint64 + Bavail uint64 + Flag uint64 + Maxfilesize int64 + _ [16]byte + Frsize uint64 + Bfree uint64 + Files uint32 + Ffree uint32 + Favail uint32 + Namemax31 uint32 + Invarsec uint32 + _ [4]byte + Fsid uint64 + Namemax uint64 +} + +type Statfs_t struct { + Type uint32 + Bsize uint64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint32 + Ffree uint32 + Fsid uint64 + Namelen uint64 + Frsize uint64 + Flags uint64 +} + +type Dirent struct { + Reclen uint16 + Namlen uint16 + Ino uint32 + Extra uintptr + Name [256]byte +} + +// This struct is packed on z/OS so it can't be used directly. +type Flock_t struct { + Type int16 + Whence int16 + Start int64 + Len int64 + Pid int32 +} + +type Termios struct { + Cflag uint32 + Iflag uint32 + Lflag uint32 + Oflag uint32 + Cc [11]uint8 +} + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +type W_Mnth struct { + Hid [4]byte + Size int32 + Cur1 int32 //32bit pointer + Cur2 int32 //^ + Devno uint32 + _ [4]byte +} + +type W_Mntent struct { + Fstype uint32 + Mode uint32 + Dev uint32 + Parentdev uint32 + Rootino uint32 + Status byte + Ddname [9]byte + Fstname [9]byte + Fsname [45]byte + Pathlen uint32 + Mountpoint [1024]byte + Jobname [8]byte + PID int32 + Parmoffset int32 + Parmlen int16 + Owner [8]byte + Quiesceowner [8]byte + _ [38]byte +} diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go index 3606c3a8b..9eb1fb633 100644 --- a/vendor/golang.org/x/sys/windows/exec_windows.go +++ b/vendor/golang.org/x/sys/windows/exec_windows.go @@ -6,6 +6,11 @@ package windows +import ( + errorspkg "errors" + "unsafe" +) + // EscapeArg rewrites command line argument s as prescribed // in http://msdn.microsoft.com/en-us/library/ms880421. // This function returns "" (2 double quotes) if s is empty. @@ -95,3 +100,33 @@ func FullPath(name string) (path string, err error) { } } } + +// NewProcThreadAttributeList allocates a new ProcThreadAttributeList, with the requested maximum number of attributes. +func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeList, error) { + var size uintptr + err := initializeProcThreadAttributeList(nil, maxAttrCount, 0, &size) + if err != ERROR_INSUFFICIENT_BUFFER { + if err == nil { + return nil, errorspkg.New("unable to query buffer size from InitializeProcThreadAttributeList") + } + return nil, err + } + const psize = unsafe.Sizeof(uintptr(0)) + // size is guaranteed to be ≥1 by InitializeProcThreadAttributeList. + al := (*ProcThreadAttributeList)(unsafe.Pointer(&make([]unsafe.Pointer, (size+psize-1)/psize)[0])) + err = initializeProcThreadAttributeList(al, maxAttrCount, 0, &size) + if err != nil { + return nil, err + } + return al, err +} + +// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute. +func (al *ProcThreadAttributeList) Update(attribute uintptr, flags uint32, value unsafe.Pointer, size uintptr, prevValue unsafe.Pointer, returnedSize *uintptr) error { + return updateProcThreadAttribute(al, flags, attribute, value, size, prevValue, returnedSize) +} + +// Delete frees ProcThreadAttributeList's resources. +func (al *ProcThreadAttributeList) Delete() { + deleteProcThreadAttributeList(al) +} diff --git a/vendor/golang.org/x/sys/windows/mkerrors.bash b/vendor/golang.org/x/sys/windows/mkerrors.bash index 2163843a1..58e0188fb 100644 --- a/vendor/golang.org/x/sys/windows/mkerrors.bash +++ b/vendor/golang.org/x/sys/windows/mkerrors.bash @@ -9,6 +9,8 @@ shopt -s nullglob winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)" [[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; } +ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)" +[[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; } declare -A errors @@ -59,5 +61,10 @@ declare -A errors echo "$key $vtype = $value" done < "$winerror" + while read -r line; do + [[ $line =~ ^#define\ (STATUS_[^\s]+)\ +\(\(NTSTATUS\)((0x)?[0-9a-fA-F]+)L?\) ]] || continue + echo "${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}" + done < "$ntstatus" + echo ")" } | gofmt > "zerrors_windows.go" diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 69eb462c5..0e428ecbb 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -908,6 +908,19 @@ type SECURITY_DESCRIPTOR struct { dacl *ACL } +type SECURITY_QUALITY_OF_SERVICE struct { + Length uint32 + ImpersonationLevel uint32 + ContextTrackingMode byte + EffectiveOnly byte +} + +// Constants for the ContextTrackingMode field of SECURITY_QUALITY_OF_SERVICE. +const ( + SECURITY_STATIC_TRACKING = 0 + SECURITY_DYNAMIC_TRACKING = 1 +) + type SecurityAttributes struct { Length uint32 SecurityDescriptor *SECURITY_DESCRIPTOR diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 0197df872..bb6aaf89e 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -8,6 +8,8 @@ package windows import ( errorspkg "errors" + "fmt" + "runtime" "sync" "syscall" "time" @@ -65,9 +67,8 @@ const ( LOCKFILE_FAIL_IMMEDIATELY = 0x00000001 LOCKFILE_EXCLUSIVE_LOCK = 0x00000002 - // Return values of SleepEx and other APC functions - STATUS_USER_APC = 0x000000C0 - WAIT_IO_COMPLETION = STATUS_USER_APC + // Return value of SleepEx and other APC functions + WAIT_IO_COMPLETION = 0x000000C0 ) // StringToUTF16 is deprecated. Use UTF16FromString instead. @@ -180,6 +181,11 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys IsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process //sys IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2? //sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW +//sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW +//sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) +//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) +//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW +//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState //sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) //sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) //sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) @@ -208,12 +214,15 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetSystemTimeAsFileTime(time *Filetime) //sys GetSystemTimePreciseAsFileTime(time *Filetime) //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] -//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) -//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) -//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) +//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) +//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) +//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) //sys CancelIo(s Handle) (err error) //sys CancelIoEx(s Handle, o *Overlapped) (err error) //sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW +//sys initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) = InitializeProcThreadAttributeList +//sys deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) = DeleteProcThreadAttributeList +//sys updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) = UpdateProcThreadAttribute //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId @@ -248,13 +257,14 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW //sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW //sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0] +//sys LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) //sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) //sys FlushFileBuffers(handle Handle) (err error) //sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW //sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW //sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW //sys GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW -//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW +//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateFileMappingW //sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) //sys UnmapViewOfFile(addr uintptr) (err error) //sys FlushViewOfFile(addr uintptr, length uintptr) (err error) @@ -283,6 +293,9 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy //sys CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW //sys CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension +//sys CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore +//sys CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore +//sys CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey //sys CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject //sys CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject //sys CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData @@ -312,14 +325,14 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW //sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW //sys GetCurrentThreadId() (id uint32) -//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW -//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateEventExW +//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventW +//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventExW //sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW //sys SetEvent(event Handle) (err error) = kernel32.SetEvent //sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent //sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent -//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) = kernel32.CreateMutexW -//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateMutexExW +//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexW +//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexExW //sys OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW //sys ReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex //sys SleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx @@ -334,10 +347,13 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) //sys GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) //sys GetProcessId(process Handle) (id uint32, err error) +//sys QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) = kernel32.QueryFullProcessImageNameW //sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) //sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost //sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) //sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) +//sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) +//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) // Volume Management Functions //sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW @@ -367,16 +383,36 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2 //sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid //sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree -//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion -//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers +//sys CoInitializeEx(reserved uintptr, coInit uint32) (ret error) = ole32.CoInitializeEx +//sys CoUninitialize() = ole32.CoUninitialize +//sys CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) = ole32.CoGetObject //sys getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages //sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages //sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages //sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages +//sys findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) = kernel32.FindResourceW +//sys SizeofResource(module Handle, resInfo Handle) (size uint32, err error) = kernel32.SizeofResource +//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource +//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource // Process Status API (PSAPI) //sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses +// NT Native APIs +//sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb +//sys rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) = ntdll.RtlGetVersion +//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers +//sys RtlGetCurrentPeb() (peb *PEB) = ntdll.RtlGetCurrentPeb +//sys RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) = ntdll.RtlInitUnicodeString +//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString +//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile +//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile +//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus +//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus +//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl +//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess +//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess + // syscall interface implementation for other packages // GetCurrentProcess returns the handle for the current process. @@ -770,6 +806,7 @@ const socket_error = uintptr(^uint32(0)) //sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend //sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom //sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo +//sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW //sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname //sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname //sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs @@ -783,6 +820,7 @@ const socket_error = uintptr(^uint32(0)) //sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo //sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes //sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW +//sys WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult //sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses //sys GetACP() (acp uint32) = kernel32.GetACP //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar @@ -1505,3 +1543,129 @@ func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf func SetConsoleCursorPosition(console Handle, position Coord) error { return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position)))) } + +func (s NTStatus) Errno() syscall.Errno { + return rtlNtStatusToDosErrorNoTeb(s) +} + +func langID(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) } + +func (s NTStatus) Error() string { + b := make([]uint16, 300) + n, err := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil) + if err != nil { + return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s)) + } + // trim terminating \r and \n + for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { + } + return string(utf16.Decode(b[:n])) +} + +// NewNTUnicodeString returns a new NTUnicodeString structure for use with native +// NT APIs that work over the NTUnicodeString type. Note that most Windows APIs +// do not use NTUnicodeString, and instead UTF16PtrFromString should be used for +// the more common *uint16 string type. +func NewNTUnicodeString(s string) (*NTUnicodeString, error) { + var u NTUnicodeString + s16, err := UTF16PtrFromString(s) + if err != nil { + return nil, err + } + RtlInitUnicodeString(&u, s16) + return &u, nil +} + +// Slice returns a uint16 slice that aliases the data in the NTUnicodeString. +func (s *NTUnicodeString) Slice() []uint16 { + var slice []uint16 + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice)) + hdr.Data = unsafe.Pointer(s.Buffer) + hdr.Len = int(s.Length) + hdr.Cap = int(s.MaximumLength) + return slice +} + +func (s *NTUnicodeString) String() string { + return UTF16ToString(s.Slice()) +} + +// NewNTString returns a new NTString structure for use with native +// NT APIs that work over the NTString type. Note that most Windows APIs +// do not use NTString, and instead UTF16PtrFromString should be used for +// the more common *uint16 string type. +func NewNTString(s string) (*NTString, error) { + var nts NTString + s8, err := BytePtrFromString(s) + if err != nil { + return nil, err + } + RtlInitString(&nts, s8) + return &nts, nil +} + +// Slice returns a byte slice that aliases the data in the NTString. +func (s *NTString) Slice() []byte { + var slice []byte + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice)) + hdr.Data = unsafe.Pointer(s.Buffer) + hdr.Len = int(s.Length) + hdr.Cap = int(s.MaximumLength) + return slice +} + +func (s *NTString) String() string { + return ByteSliceToString(s.Slice()) +} + +// FindResource resolves a resource of the given name and resource type. +func FindResource(module Handle, name, resType ResourceIDOrString) (Handle, error) { + var namePtr, resTypePtr uintptr + var name16, resType16 *uint16 + var err error + resolvePtr := func(i interface{}, keep **uint16) (uintptr, error) { + switch v := i.(type) { + case string: + *keep, err = UTF16PtrFromString(v) + if err != nil { + return 0, err + } + return uintptr(unsafe.Pointer(*keep)), nil + case ResourceID: + return uintptr(v), nil + } + return 0, errorspkg.New("parameter must be a ResourceID or a string") + } + namePtr, err = resolvePtr(name, &name16) + if err != nil { + return 0, err + } + resTypePtr, err = resolvePtr(resType, &resType16) + if err != nil { + return 0, err + } + resInfo, err := findResource(module, namePtr, resTypePtr) + runtime.KeepAlive(name16) + runtime.KeepAlive(resType16) + return resInfo, err +} + +func LoadResourceData(module, resInfo Handle) (data []byte, err error) { + size, err := SizeofResource(module, resInfo) + if err != nil { + return + } + resData, err := LoadResource(module, resInfo) + if err != nil { + return + } + ptr, err := LockResource(resData) + if err != nil { + return + } + h := (*unsafeheader.Slice)(unsafe.Pointer(&data)) + h.Data = unsafe.Pointer(ptr) + h.Len = int(size) + h.Cap = int(size) + return +} diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index fd4260762..23fe18ece 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -10,6 +10,10 @@ import ( "unsafe" ) +// NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and +// other native functions. +type NTStatus uint32 + const ( // Invented values to support what package os expects. O_RDONLY = 0x00000 @@ -215,6 +219,18 @@ const ( INHERIT_PARENT_AFFINITY = 0x00010000 ) +const ( + // attributes for ProcThreadAttributeList + PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = 0x00020000 + PROC_THREAD_ATTRIBUTE_HANDLE_LIST = 0x00020002 + PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY = 0x00030003 + PROC_THREAD_ATTRIBUTE_PREFERRED_NODE = 0x00020004 + PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR = 0x00030005 + PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007 + PROC_THREAD_ATTRIBUTE_UMS_THREAD = 0x00030006 + PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL = 0x0002000b +) + const ( // flags for CreateToolhelp32Snapshot TH32CS_SNAPHEAPLIST = 0x01 @@ -287,6 +303,23 @@ const ( PKCS12_NO_PERSIST_KEY = 0x00008000 PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010 + /* Flags for CryptAcquireCertificatePrivateKey */ + CRYPT_ACQUIRE_CACHE_FLAG = 0x00000001 + CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x00000002 + CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x00000004 + CRYPT_ACQUIRE_NO_HEALING = 0x00000008 + CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040 + CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x00000080 + CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x00070000 + CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x00010000 + CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000 + CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x00040000 + + /* pdwKeySpec for CryptAcquireCertificatePrivateKey */ + AT_KEYEXCHANGE = 1 + AT_SIGNATURE = 2 + CERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF + /* Default usage match type is AND with value zero */ USAGE_MATCH_TYPE_AND = 0 USAGE_MATCH_TYPE_OR = 1 @@ -412,6 +445,89 @@ const ( CERT_TRUST_IS_CA_TRUSTED = 0x00004000 CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000 + /* Certificate Information Flags */ + CERT_INFO_VERSION_FLAG = 1 + CERT_INFO_SERIAL_NUMBER_FLAG = 2 + CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3 + CERT_INFO_ISSUER_FLAG = 4 + CERT_INFO_NOT_BEFORE_FLAG = 5 + CERT_INFO_NOT_AFTER_FLAG = 6 + CERT_INFO_SUBJECT_FLAG = 7 + CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8 + CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9 + CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10 + CERT_INFO_EXTENSION_FLAG = 11 + + /* dwFindType for CertFindCertificateInStore */ + CERT_COMPARE_MASK = 0xFFFF + CERT_COMPARE_SHIFT = 16 + CERT_COMPARE_ANY = 0 + CERT_COMPARE_SHA1_HASH = 1 + CERT_COMPARE_NAME = 2 + CERT_COMPARE_ATTR = 3 + CERT_COMPARE_MD5_HASH = 4 + CERT_COMPARE_PROPERTY = 5 + CERT_COMPARE_PUBLIC_KEY = 6 + CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH + CERT_COMPARE_NAME_STR_A = 7 + CERT_COMPARE_NAME_STR_W = 8 + CERT_COMPARE_KEY_SPEC = 9 + CERT_COMPARE_ENHKEY_USAGE = 10 + CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE + CERT_COMPARE_SUBJECT_CERT = 11 + CERT_COMPARE_ISSUER_OF = 12 + CERT_COMPARE_EXISTING = 13 + CERT_COMPARE_SIGNATURE_HASH = 14 + CERT_COMPARE_KEY_IDENTIFIER = 15 + CERT_COMPARE_CERT_ID = 16 + CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17 + CERT_COMPARE_PUBKEY_MD5_HASH = 18 + CERT_COMPARE_SUBJECT_INFO_ACCESS = 19 + CERT_COMPARE_HASH_STR = 20 + CERT_COMPARE_HAS_PRIVATE_KEY = 21 + CERT_FIND_ANY = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT) + CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT) + CERT_FIND_MD5_HASH = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT) + CERT_FIND_SIGNATURE_HASH = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT) + CERT_FIND_KEY_IDENTIFIER = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT) + CERT_FIND_HASH = CERT_FIND_SHA1_HASH + CERT_FIND_PROPERTY = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT) + CERT_FIND_PUBLIC_KEY = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT) + CERT_FIND_SUBJECT_NAME = (CERT_COMPARE_NAME< - The amazon-chroot Packer builder is able to create Amazon AMIs backed by an - EBS - - volume as the root device. For more information on the difference between - - instance storage and EBS-backed instances, storage for the root device section - - in the EC2 documentation. -page_title: Amazon chroot - Builders -sidebar_title: chroot ---- - -# AMI Builder (chroot) - -Type: `amazon-chroot` -Artifact BuilderId: `mitchellh.amazon.chroot` - -The `amazon-chroot` Packer builder is able to create Amazon AMIs backed by an -EBS volume as the root device. For more information on the difference between -instance storage and EBS-backed instances, see the ["storage for the root -device" section in the EC2 -documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - -The difference between this builder and the `amazon-ebs` builder is that this -builder is able to build an EBS-backed AMI without launching a new EC2 -instance. This can dramatically speed up AMI builds for organizations who need -the extra fast build. - -~> **This is an advanced builder** If you're just getting started with -Packer, we recommend starting with the [amazon-ebs -builder](/docs/builders/amazon-ebs), which is much easier to use. - -The builder does _not_ manage AMIs. Once it creates an AMI and stores it in -your account, it is up to you to use, delete, etc., the AMI. - -### How Does it Work? - -This builder works by creating a new EBS volume from an existing source AMI and -attaching it into an already-running EC2 instance. Once attached, a -[chroot](https://en.wikipedia.org/wiki/Chroot) is used to provision the system -within that volume. After provisioning, the volume is detached, snapshotted, -and an AMI is made. - -Using this process, minutes can be shaved off the AMI creation process because -a new EC2 instance doesn't need to be launched. - -There are some restrictions, however. The host EC2 instance where the volume is -attached to must be a similar system (generally the same OS version, kernel -versions, etc.) as the AMI being built. Additionally, this process is much more -expensive because the EC2 instance must be kept running persistently in order -to build AMIs, whereas the other AMI builders start instances on-demand to -build AMIs as needed. - -## Chroot Specific Configuration Reference - -There are many configuration options available for the builder. In addition to -the items listed here, you will want to look at the general configuration -references for [AMI](#ami-configuration), -[BlockDevices](#block-devices-configuration) and -[Access](#access-config-configuration) configuration references, which are -necessary for this build to succeed and can be found further down the page. - -#### Required: - -@include 'builder/amazon/chroot/Config-required.mdx' - -#### Optional: - -@include 'builder/amazon/chroot/Config-not-required.mdx' - -## General Common Configuration Reference - -Following will be a set of fields that are also settable for other aws -builders. - -### AMI Configuration - -#### Required: - -@include 'builder/amazon/common/AMIConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AMIConfig-not-required.mdx' - -@include 'builder/amazon/common/SnapshotConfig-not-required.mdx' - -### Block Devices Configuration - -Block devices can be nested in the -[ami_block_device_mappings](#ami_block_device_mappings) array. - -@include 'builder/amazon/common/BlockDevice.mdx' - -#### Optional: - -@include 'builder/amazon/common/BlockDevice-not-required.mdx' - -### Access Config Configuration - -#### Required: - -@include 'builder/amazon/common/AccessConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AccessConfig-not-required.mdx' - -### Assume Role Configuration - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Polling Configuration - -@include 'builder/amazon/common/AWSPollingConfig.mdx' - -@include 'builder/amazon/common/AWSPollingConfig-not-required.mdx' - -## Basic Example - -Here is a basic example. It is completely valid except for the access keys: - - - - -```hcl -// To make Packer read these variables from the environment into the var object, -// set the environment variables to have the same name as the declared -// variables, with the prefix PKR_VAR_. - -// There are other ways to [set variables](/docs/templates/hcl_templates/variables#assigning-values-to-build-variables), including from a var -// file or as a command argument. - -// export PKR_VAR_aws_access_key=$YOURKEY -variable "aws_access_key" { - type = string - // default = "hardcoded_key" // Not recommended ! -} - -// export PKR_VAR_aws_secret_key=$YOURSECRETKEY -variable "aws_secret_key" { - type = string - // default = "hardcoded_secret_key" // Not recommended ! -} - -source "amazon-chroot" "basic-example" { - access_key = var.aws_access_key - secret_key = var.aws_secret_key - ami_name = "example-chroot" - source_ami = "ami-e81d5881" -} - -build { - sources = [ - "source.amazon-chroot.basic-example" - ] -} -``` - - - - -```json -{ - "type": "amazon-chroot", - "access_key": "YOUR KEY HERE", - "secret_key": "YOUR SECRET KEY HERE", - "source_ami": "ami-e81d5881", - "ami_name": "packer-amazon-chroot {{timestamp}}" -} -``` - - - - -## Chroot Mounts - -The `chroot_mounts` configuration can be used to mount specific devices within -the chroot. By default, the following additional mounts are added into the -chroot by Packer: - -- `/proc` (proc) -- `/sys` (sysfs) -- `/dev` (bind to real `/dev`) -- `/dev/pts` (devpts) -- `/proc/sys/fs/binfmt_misc` (binfmt_misc) - -These default mounts are usually good enough for anyone and are reasonable -defaults. However, if you want to change or add the mount points, you may using -the `chroot_mounts` configuration. Here is an example configuration which only -mounts `/proc` and `/dev`: - - - - -```hcl -source "amazon-chroot" "basic-example" { - // ... other builder options - chroot_mounts = [ - ["proc", "proc", "/proc"], - ["bind", "/dev", "/dev"] - ] -} -``` - - - - -```json -... -"builders": [{ - "type": "amazon-chroot" - ... - "chroot_mounts": [ - ["proc", "proc", "/proc"], - ["bind", "/dev", "/dev"] - ] -}] -``` - - - - -`chroot_mounts` is a list of a 3-tuples of strings. The three components of the -3-tuple, in order, are: - -- The filesystem type. If this is "bind", then Packer will properly bind the - filesystem to another mount point. - -- The source device. - -- The mount directory. - -## Parallelism - -A quick note on parallelism: it is perfectly safe to run multiple _separate_ -Packer processes with the `amazon-chroot` builder on the same EC2 instance. In -fact, this is recommended as a way to push the most performance out of your AMI -builds. - -Packer properly obtains a process lock for the parallelism-sensitive parts of -its internals such as finding an available device. - -## Gotchas - -### Unmounting the Filesystem - -One of the difficulties with using the chroot builder is that your provisioning -scripts must not leave any processes running or packer will be unable to -unmount the filesystem. - -For debian based distributions you can setup a -[policy-rc.d](http://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt) -file which will prevent packages installed by your provisioners from starting -services: - - - - -```hcl -// ... -build { - sources = [ - "source.amazon-chroot.basic-example" - ] - - // Set policy - provisioner "shell" { - inline = [ - "echo '#!/bin/sh' > /usr/sbin/policy-rc.d", - "echo 'exit 101' >> /usr/sbin/policy-rc.d", - "chmod a+x /usr/sbin/policy-rc.d" - ] - } - - // Un-set policy - provisioner "shell" { - inline = ["rm -f /usr/sbin/policy-rc.d"] - } -} -``` - - - - -```json -"provisioners": [ - { - "type": "shell", - "inline": [ - "echo '#!/bin/sh' > /usr/sbin/policy-rc.d", - "echo 'exit 101' >> /usr/sbin/policy-rc.d", - "chmod a+x /usr/sbin/policy-rc.d" - ] - }, - { - "type": "shell", - "inline": ["rm -f /usr/sbin/policy-rc.d"] - } -] -``` - - - - -### Ansible provisioner - -Running ansible against `amazon-chroot` requires changing the Ansible -connection to chroot and running Ansible as root/sudo. - -### Using Instances with NVMe block devices. - -In C5, C5d, M5, and i3.metal instances, EBS volumes are exposed as NVMe block -devices -[reference](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html). -In order to correctly mount these devices, you have to do some extra legwork, -involving the `nvme_device_path` option above. Read that for more information. - -A working example for mounting an NVMe device is below: - - - - -```hcl -// export PKR_VAR_aws_access_key=$YOURKEY -variable "aws_access_key" { - type = string -} - -// export PKR_VAR_aws_secret_key=$YOURSECRETKEY -variable "aws_secret_key" { - type = string -} - -data "amazon-ami" "example" { - filters = { - virtualization-type = "hvm" - name = "amzn-ami-hvm-*" - root-device-type = "ebs" - } - owners = ["137112412989"] - most_recent = true - - # Access Configuration - region = "us-east-1" - access_key = var.aws_access_key - secret_key = var.aws_secret_key -} - -source "amazon-chroot" "basic-example" { - access_key = var.aws_access_key - secret_key = var.aws_secret_key - region = "us-east-1" - source_ami = data.amazon-ami.example.id - ena_support = true - ami_name = "amazon-chroot-test-{{timestamp}}" - nvme_device_path = "/dev/nvme1n1p" - device_path = "/dev/sdf" -} - -build { - sources = [ - "source.amazon-chroot.basic-example" - ] - - provisioner "shell" { - inline = ["echo Test > /tmp/test.txt"] - } -} -``` - - - - -```json -{ - "variables": { - "region": "us-east-2" - }, - "builders": [ - { - "type": "amazon-chroot", - "region": "{{user `region`}}", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "amzn-ami-hvm-*", - "root-device-type": "ebs" - }, - "owners": ["137112412989"], - "most_recent": true - }, - "ena_support": true, - "ami_name": "amazon-chroot-test-{{timestamp}}", - "nvme_device_path": "/dev/nvme1n1p", - "device_path": "/dev/sdf" - } - ], - - "provisioners": [ - { - "type": "shell", - "inline": ["echo Test > /tmp/test.txt"] - } - ] -} -``` - - - - -Note that in the `nvme_device_path` you must end with the `p`; if you try to -define the partition in this path (e.g. `nvme_device_path`: `/dev/nvme1n1p1`) -and haven't also set the `"mount_partition": 0`, a `1` will be appended to the -`nvme_device_path` and Packer will fail. - -## Building From Scratch - -This example demonstrates the essentials of building an image from scratch. A -15G gp2 (SSD) device is created (overriding the default of standard/magnetic). -The device setup commands partition the device with one partition for use as an -HVM image and format it ext4. This builder block should be followed by -provisioning commands to install the os and bootloader. - - - - -```hcl -// This example assumes that AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID are -// set in your environment, or a ~/.aws/credentials file is configured. -source "amazon-chroot" "basic-example" { - region = "us-east-1" - ami_name = "packer-from-scratch {{timestamp}}" - from_scratch = true - ami_virtualization_type = "hvm" - pre_mount_commands = [ - "parted {{.Device}} mklabel msdos mkpart primary 1M 100% set 1 boot on print", - "mkfs.ext4 {{.Device}}1" - ] - root_volume_size = 15 - root_device_name = "xvda" - ami_block_device_mappings { - device_name = "xvda" - delete_on_termination = true - volume_type = "gp2" - } - -} - -build { - sources = [ - "source.amazon-chroot.basic-example" - ] - - provisioner "shell" { - inline = [ - "echo '#!/bin/sh' > /usr/sbin/policy-rc.d", - "echo 'exit 101' >> /usr/sbin/policy-rc.d", - "chmod a+x /usr/sbin/policy-rc.d" - ] - } - - provisioner "shell" { - inline = ["rm -f /usr/sbin/policy-rc.d"] - } -} -``` - - - - -```json -{ - "type": "amazon-chroot", - "ami_name": "packer-from-scratch {{timestamp}}", - "from_scratch": true, - "ami_virtualization_type": "hvm", - "pre_mount_commands": [ - "parted {{.Device}} mklabel msdos mkpart primary 1M 100% set 1 boot on print", - "mkfs.ext4 {{.Device}}1" - ], - "root_volume_size": 15, - "root_device_name": "xvda", - "ami_block_device_mappings": [ - { - "device_name": "xvda", - "delete_on_termination": true, - "volume_type": "gp2" - } - ] -} -``` - - - - -## Build template data - -In configuration directives marked as a template engine above, the following -variables are available: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). -- `SourceAMITags` - The source AMI Tags, as a `map[string]string` object. - -## Build Shared Information Variables - -This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - -The generated variables available for this builder are: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). -- `Device` - Root device path. -- `MountPath` - Device mounting path. - -Usage example: - - - - -```hcl -// When accessing one of these variables from inside the builder, you need to -// use the golang templating syntax. This is due to an architectural quirk that -// won't be easily resolvable until legacy json templates are deprecated: - -{ -source "amazon-ebs" "basic-example" { - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_ID = "{{ .SourceAMI }}" - Base_AMI_Name = "{{ .SourceAMIName }}" - } -} - -// when accessing one of the variables from a provisioner or post-processor, use -// hcl-syntax -post-processor "manifest" { - output = "manifest.json" - strip_path = true - custom_data = { - source_ami_name = "${build.SourceAMIName}" - device = "${build.Device}" - mount_path = "${build.MountPath}" - } -} -``` - - - - -```json -"post-processors": [ - { - "type": "manifest", - "output": "manifest.json", - "strip_path": true, - "custom_data": { - "source_ami_name": "{{ build `SourceAMIName` }}", - "device": "{{ build `Device` }}", - "mount_path": "{{ build `MountPath` }}" - } - } -] -``` - - - diff --git a/website/content/docs/builders/amazon/ebs.mdx b/website/content/docs/builders/amazon/ebs.mdx deleted file mode 100644 index e7034621f..000000000 --- a/website/content/docs/builders/amazon/ebs.mdx +++ /dev/null @@ -1,685 +0,0 @@ ---- -description: | - The amazon-ebs Packer builder is able to create Amazon AMIs backed by EBS - volumes for use in EC2. For more information on the difference between - EBS-backed instances and instance-store backed instances, see the storage for - the root device section in the EC2 documentation. -page_title: Amazon EBS - Builders -sidebar_title: EBS ---- - -# AMI Builder (EBS backed) - -Type: `amazon-ebs` -Artifact BuilderId: `mitchellh.amazonebs` - -The `amazon-ebs` Packer builder is able to create Amazon AMIs backed by EBS -volumes for use in [EC2](https://aws.amazon.com/ec2/). For more information on -the difference between EBS-backed instances and instance-store backed -instances, see the ["storage for the root device" section in the EC2 -documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - -This builder builds an AMI by launching an EC2 instance from a source AMI, -provisioning that running machine, and then creating an AMI from that machine. -This is all done in your own AWS account. The builder will create temporary -keypairs, security group rules, etc. that provide it temporary access to the -instance while the image is being created. This simplifies configuration quite -a bit. - -The builder does _not_ manage AMIs. Once it creates an AMI and stores it in -your account, it is up to you to use, delete, etc. the AMI. - --> **Note:** Temporary resources are, by default, all created with the -prefix `packer`. This can be useful if you want to restrict the security groups -and key pairs Packer is able to operate on. - -## EBS Specific Configuration Reference - -There are many configuration options available for the builder. In addition to -the items listed here, you will want to look at the general configuration -references for [AMI](#ami-configuration), -[BlockDevices](#block-devices-configuration), -[Access](#access-configuration), -[Run](#run-configuration) and -[Communicator](#communicator-configuration) -configuration references, which are -necessary for this build to succeed and can be found further down the page. - -#### Optional: - -@include 'builder/amazon/ebs/Config-not-required.mdx' - -### AMI Configuration - -#### Required: - -@include 'builder/amazon/common/AMIConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AMIConfig-not-required.mdx' - -@include 'builder/amazon/common/SnapshotConfig-not-required.mdx' - -### Access Configuration - -#### Required: - -@include 'builder/amazon/common/AccessConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AccessConfig-not-required.mdx' - -### Assume Role Configuration - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Polling Configuration - -@include 'builder/amazon/common/AWSPollingConfig.mdx' - -@include 'builder/amazon/common/AWSPollingConfig-not-required.mdx' - -### Run Configuration - -#### Required: - -@include 'builder/amazon/common/RunConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/RunConfig-not-required.mdx' - -#### Metadata Settings - -@include 'builder/amazon/common/MetadataOptions.mdx' - -@include 'builder/amazon/common/MetadataOptions-not-required.mdx' - -Usage Example - - - - -```hcl -source "amazon-ebs" "basic-example" { - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_AWS_example_{{timestamp}}" - metadata_options { - http_endpoint = "enabled" - http_tokens = "required" - http_put_response_hop_limit = 1 - } -} -``` - - - - -```json -{ - "variables": { - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" - }, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer_AWS {{timestamp}}", - "metadata_options": { - "http_endpoint": "enabled", - "http_tokens": "required", - "http_put_response_hop_limit": 1 - } - } - ] -} -``` - - - - -@include 'builders/aws-session-manager.mdx' - -### Block Devices Configuration - -Block devices can be nested in the -[ami_block_device_mappings](#ami_block_device_mappings) or the -[launch_block_device_mappings](#launch_block_device_mappings) array. - -@include 'builder/amazon/common/BlockDevice.mdx' - -#### Optional: - -@include 'builder/amazon/common/BlockDevice-not-required.mdx' - -### Communicator Configuration - -#### Optional: - -@include 'packer-plugin-sdk/communicator/Config-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Key-Pair-Name-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Agent-Auth-not-required.mdx' - -## Basic Example - -Here is a basic example. You will need to provide access keys, and may need to -change the AMI IDs according to what images exist at the time the template is -run: - - - - -```hcl -// To make Packer read these variables from the environment into the var object, -// set the environment variables to have the same name as the declared -// variables, with the prefix PKR_VAR_. - -// There are other ways to [set variables](/docs/templates/hcl_templates/variables#assigning-values-to-build-variables) -// including from a var file or as a command argument. - -// export PKR_VAR_aws_access_key=$YOURKEY -variable "aws_access_key" { - type = string - // default = "hardcoded_key" -} - -// export PKR_VAR_aws_secret_key=$YOURSECRETKEY -variable "aws_secret_key" { - type = string - // default = "hardcoded_secret_key" -} - -source "amazon-ebs" "basic-example" { - access_key = var.aws_access_key - secret_key = var.aws_secret_key - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_AWS {{timestamp}}" -} - -build { - sources = [ - "source.amazon-ebs.basic-example" - ] -} -``` - - - - -```json -{ - "variables": { - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" -}, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer_AWS {{timestamp}}" - } - ] -} -``` - - - - --> **Note:** Packer can also read the access key and secret access key directly -from environmental variables instead of being set as user variables. See the -configuration reference in the section above for more information on what -environmental variables Packer will look for. - -Further information on locating AMI IDs and their relationship to instance -types and regions can be found in the AWS EC2 Documentation [for -Linux](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) -or [for -Windows](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/finding-an-ami.html). - -## Accessing the Instance to Debug - -If you need to access the instance to debug for some reason, run the builder -with the `-debug` flag. In debug mode, the Amazon builder will save the private -key in the current directory and will output the DNS or IP information as well. -You can use this information to access the instance as it is running. - -## AMI Block Device Mappings Example - -Here is an example using the optional AMI block device mappings. Our -configuration of `launch_block_device_mappings` will expand the root volume -(`/dev/sda`) to 40gb during the build (up from the default of 8gb). With -`ami_block_device_mappings` AWS will attach additional volumes `/dev/sdb` and -`/dev/sdc` when we boot a new instance of our AMI. - - - - -```hcl -source "amazon-ebs" "basic-example" { - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_AWS_example_{{timestamp}}" - launch_block_device_mappings { - device_name = "/dev/sda1" - volume_size = 40 - volume_type = "gp2" - delete_on_termination = true - } - // Notice that instead of providing a list of mappings, you are just providing - // multiple mappings in a row. This diverges from the JSON template format. - ami_block_device_mappings { - device_name = "/dev/sdb" - virtual_name = "ephemeral0" - } - ami_block_device_mappings { - device_name = "/dev/sdc" - virtual_name = "ephemeral1" - } -} - -build { - sources = [ - "source.amazon-ebs.basic-example" - ] -} -``` - - - - -```json -{ - "builders": [ - { - "type": "amazon-ebs", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer-quick-start {{timestamp}}", - "launch_block_device_mappings": [ - { - "device_name": "/dev/sda1", - "volume_size": 40, - "volume_type": "gp2", - "delete_on_termination": true - } - ], - "ami_block_device_mappings": [ - { - "device_name": "/dev/sdb", - "virtual_name": "ephemeral0" - }, - { - "device_name": "/dev/sdc", - "virtual_name": "ephemeral1" - } - ] - } - ] -} -``` - - - - -The above build template is functional assuming you have set the environment -variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. - --> **Note:** Packer uses pre-built AMIs as the source for building images. -These source AMIs may include volumes that are not flagged to be destroyed on -termination of the instance building the new image. Packer will attempt to -clean up all residual volumes that are not designated by the user to remain -after termination. If you need to preserve those source volumes, you can -overwrite the termination setting by setting `delete_on_termination` to `false` -in the `launch_block_device_mappings` block for the device. - -## Build template data - -In configuration directives marked as a template engine above, the following -variables are available: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). -- `SourceAMITags` - The source AMI Tags, as a `map[string]string` object. - -## Build Shared Information Variables - -This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - -The generated variables available for this builder are: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). - -Usage example: - - - - -```hcl -# When accessing one of these variables from inside the builder, you need to -# use the golang templating syntax. This is due to an architectural quirk that -# won't be easily resolvable until legacy json templates are deprecated: -build { - source "amazon-ebs" "basic-example" { - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_ID = "{{ .SourceAMI }}" - Base_AMI_Name = "{{ .SourceAMIName }}" - } - } - - // when accessing one of the variables from a provisioner or post-processor, use - // hcl-syntax - post-processor "manifest" { - output = "manifest.json" - strip_path = true - custom_data = { - source_ami_name = "${build.SourceAMIName}" - } -} -``` - - - - -```json -"post-processors": [ - { - "type": "manifest", - "output": "manifest.json", - "strip_path": true, - "custom_data": { - "source_ami_name": "{{ build `SourceAMIName` }}" - } - } -] -``` - - - - -## Tag Example - -Here is an example using the optional AMI tags. This will add the tags -`OS_Version` and `Release` to the finished AMI. As before, you will need to -provide your access keys, and may need to change the source AMI ID based on -what images exist when this template is run: - - - - -```hcl -source "amazon-ebs" "basic-example" { - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_tag_example {{timestamp}}" - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_Name = "{{ .SourceAMIName }}" - Extra = "{{ .SourceAMITags.TagName }}" - } -} - -build { - sources = [ - "source.amazon-ebs.basic-example" - ] -} -``` - - - - -```json -{ - "builders": [ - { - "type": "amazon-ebs", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer-tag-example {{timestamp}}", - "tags": { - "OS_Version": "Ubuntu", - "Release": "Latest", - "Base_AMI_Name": "{{ .SourceAMIName }}", - "Extra": "{{ .SourceAMITags.TagName }}" - } - } - ] -} -``` - - - - -## Connecting to Windows instances using WinRM - -If you want to launch a Windows instance and connect using WinRM, you will need -to configure WinRM on that instance. The following is a basic powershell script -that can be supplied to AWS using the "user_data_file" option. It enables -WinRM via HTTPS on port 5986, and creates a self-signed certificate to use to -connect. If you are using a certificate from a CA, rather than creating a -self-signed certificate, you can omit the "winrm_insecure" option mentioned -below. - -autogenerated_password_https_boostrap.txt - -```powershell - - -# MAKE SURE IN YOUR PACKER CONFIG TO SET: -# -# -# "winrm_username": "Administrator", -# "winrm_insecure": true, -# "winrm_use_ssl": true, -# -# - - -write-output "Running User Data Script" -write-host "(host) Running User Data Script" - -Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore - -# Don't set this before Set-ExecutionPolicy as it throws an error -$ErrorActionPreference = "stop" - -# Remove HTTP listener -Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse - -# Create a self-signed certificate to let ssl work -$Cert = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "packer" -New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $Cert.Thumbprint -Force - -# WinRM -write-output "Setting up WinRM" -write-host "(host) setting up WinRM" - -cmd.exe /c winrm quickconfig -q -cmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}' -cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="1024"}' -cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}' -cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}' -cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}' -cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}' -cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}' -cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTPS" "@{Port=`"5986`";Hostname=`"packer`";CertificateThumbprint=`"$($Cert.Thumbprint)`"}" -cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes -cmd.exe /c netsh firewall add portopening TCP 5986 "Port 5986" -cmd.exe /c net stop winrm -cmd.exe /c sc config winrm start= auto -cmd.exe /c net start winrm - - -``` - -You'll notice that this config does not define a user or password; instead, -Packer will ask AWS to provide a random password that it generates -automatically. The following config will work with the above template: - - - - -```hcl -# This example uses a amazon-ami data source rather than a specific AMI. -# this allows us to use the same filter regardless of what region we're in, -# among other benefits. -data "amazon-ami" "example" { - filters = { - virtualization-type = "hvm" - name = "*Windows_Server-2012*English-64Bit-Base*" - root-device-type = "ebs" - } - owners = ["amazon"] - most_recent = true - # Access Region Configuration - region = "us-east-1" -} - -source "amazon-ebs" "winrm-example" { - region = "us-east-1" - source_ami = data.amazon-ami.example.id - instance_type = "t2.micro" - ami_name = "packer_winrm_example {{timestamp}}" - # This user data file sets up winrm and configures it so that the connection - # from Packer is allowed. Without this file being set, Packer will not - # connect to the instance. - user_data_file = "../boot_config/winrm_bootstrap.txt" - communicator = "winrm" - force_deregister = true - winrm_insecure = true - winrm_username = "Administrator" - winrm_use_ssl = true -} - -build { - sources = [ - "source.amazon-ebs.winrm-example" - ] -} -``` - - - - -```json -{ - "builders": [ - { - "type": "amazon-ebs", - "region": "us-east-1", - "instance_type": "t2.micro", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "*Windows_Server-2012*English-64Bit-Base*", - "root-device-type": "ebs" - }, - "most_recent": true, - "owners": "amazon" - }, - "ami_name": "default-packer", - "user_data_file": "./boot_config/winrm_bootstrap.txt", - "communicator": "winrm", - "force_deregister": true, - "winrm_insecure": true, - "winrm_username": "Administrator", - "winrm_use_ssl": true - } - ] -} -``` - - - - -## Windows 2016 Sysprep Commands - For Amazon Windows AMIs Only - -For Amazon Windows 2016 AMIs it is necessary to run Sysprep commands which can -be easily added to the provisioner section. - - - - -```hcl -provisioner "powershell" { - inline = [ - "C:/ProgramData/Amazon/EC2-Windows/Launch/Scripts/InitializeInstance.ps1 -Schedule", - "C:/ProgramData/Amazon/EC2-Windows/Launch/Scripts/SysprepInstance.ps1 -NoShutdown" - ] -} -``` - - - - -```json -{ - "type": "powershell", - "inline": [ - "C:/ProgramData/Amazon/EC2-Windows/Launch/Scripts/InitializeInstance.ps1 -Schedule", - "C:/ProgramData/Amazon/EC2-Windows/Launch/Scripts/SysprepInstance.ps1 -NoShutdown" - ] -} -``` - - - - -@include 'builders/aws-ssh-differentiation-table.mdx' diff --git a/website/content/docs/builders/amazon/ebssurrogate.mdx b/website/content/docs/builders/amazon/ebssurrogate.mdx deleted file mode 100644 index a253fb507..000000000 --- a/website/content/docs/builders/amazon/ebssurrogate.mdx +++ /dev/null @@ -1,368 +0,0 @@ ---- -description: > - The amazon-ebssurrogate Packer builder is like the chroot builder, but does - not - - require running inside an EC2 instance. -page_title: Amazon EBS Surrogate - Builders -sidebar_title: EBS Surrogate ---- - -# EBS Surrogate Builder - -Type: `amazon-ebssurrogate` -Artifact BuilderId: `mitchellh.amazon.ebssurrogate` - -The `amazon-ebssurrogate` Packer builder is able to create Amazon AMIs by -running a source instance with an attached volume, provisioning the attached -volume in such a way that it can be used as the root volume for the AMI, and -then snapshotting and creating the AMI from that volume. - -This builder can therefore be used to bootstrap scratch-build images - for -example FreeBSD or Ubuntu using ZFS as the root file system. - -This is all done in your own AWS account. This builder will create temporary -key pairs, security group rules, etc., that provide it temporary access to the -instance while the image is being created. - -## Configuration Reference - -There are many configuration options available for the builder. In addition to -the items listed here, you will want to look at the general configuration -references for [AMI](#ami-configuration), -[BlockDevices](#block-devices-configuration), -[Access](#access-configuration), -[Run](#run-configuration) and -[Communicator](#communicator-configuration) -configuration references, which are -necessary for this build to succeed and can be found further down the page. - -### Required: - -@include 'builder/amazon/ebssurrogate/Config-required.mdx' - -### Optional: - -@include 'builder/amazon/ebssurrogate/Config-not-required.mdx' - -### AMI Configuration - -#### Required: - -@include 'builder/amazon/common/AMIConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AMIConfig-not-required.mdx' - -@include 'builder/amazon/common/SnapshotConfig-not-required.mdx' - -### Access Configuration - -#### Required: - -@include 'builder/amazon/common/AccessConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AccessConfig-not-required.mdx' - -### Assume Role Configuration - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Polling Configuration - -@include 'builder/amazon/common/AWSPollingConfig.mdx' - -@include 'builder/amazon/common/AWSPollingConfig-not-required.mdx' - -### Run Configuration - -#### Required: - -@include 'builder/amazon/common/RunConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/RunConfig-not-required.mdx' - -#### Metadata Settings - -@include 'builder/amazon/common/MetadataOptions.mdx' - -@include 'builder/amazon/common/MetadataOptions-not-required.mdx' - -Usage Example - - - - -```hcl -source "amazon-ebs" "basic-example" { - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_AWS_example_{{timestamp}}" - metadata_options { - http_endpoint = "enabled" - http_tokens = "required" - http_put_response_hop_limit = 1 - } -} -``` - - - - -```json -{ - "variables": { - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" - }, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer_AWS {{timestamp}}", - "metadata_options": { - "http_endpoint": "enabled", - "http_tokens": "required", - "http_put_response_hop_limit": 1 - } - } - ] -} -``` - - - - -@include 'builders/aws-session-manager.mdx' - -### Block Devices Configuration - -Block devices can be nested in the -[ami_block_device_mappings](#ami_block_device_mappings) array. - -@include 'builder/amazon/common/BlockDevice.mdx' - -#### Optional only for [launch_block_device_mappings](#launch_block_device_mappings) - -@include 'builder/amazon/ebssurrogate/BlockDevice-not-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/BlockDevice-not-required.mdx' - -### Communicator Configuration - -#### Optional: - -@include 'packer-plugin-sdk/communicator/Config-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Key-Pair-Name-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Agent-Auth-not-required.mdx' - -## Basic Example - - - - -```hcl -source "amazon-ebssurrogate" "basic-example" { - region = "us-east-1" - ssh_username = "ubuntu" - instance_type = "t2.medium" - source_ami = "ami-40d28157" - ami_name = "packer-test-ami" - ami_virtualization_type = "paravirtual" - - launch_block_device_mappings { - volume_type = "gp2" - device_name = "/dev/xvdf" - delete_on_termination = false - volume_size = 10 - } - - ami_root_device { - source_device_name = "/dev/xvdf" - device_name = "/dev/xvda" - delete_on_termination = true - volume_size = 16 - volume_type = "gp2" - } -} - -build { - sources = ["sources.amazon-ebssurrogate.basic-example"] - - provisioner "shell" { - inline = ["..."] - } -} -``` - - - - -```json -{ - "builders": [ - { - "type": "amazon-ebssurrogate", - "secret_key": "YOUR SECRET KEY HERE", - "access_key": "YOUR KEY HERE", - "ami_name": "packer-test-ami", - "ami_virtualization_type": "paravirtual", - "region": "us-east-1", - "ssh_username": "ubuntu", - "instance_type": "t2.medium", - "source_ami": "ami-40d28157", - "launch_block_device_mappings": [ - { - "volume_type": "gp2", - "device_name": "/dev/xvdf", - "delete_on_termination": false, - "volume_size": 10 - } - ], - "ami_root_device": { - "source_device_name": "/dev/xvdf", - "device_name": "/dev/xvda", - "delete_on_termination": true, - "volume_size": 16, - "volume_type": "gp2" - } - } - ] -} -``` - - - - - -> **Note:** Packer can also read the access key and secret access key from - environmental variables. See the configuration reference in the section above - for more information on what environmental variables Packer will look for. - - Further information on locating AMI IDs and their relationship to instance - types and regions can be found in the AWS EC2 Documentation [for - Linux](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) - or [for - Windows](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/finding-an-ami.html). - - ## Accessing the Instance to Debug - - If you need to access the instance to debug for some reason, run this builder - with the `-debug` flag. In debug mode, the Amazon builder will save the private - key in the current directory and will output the DNS or IP information as well. - You can use this information to access the instance as it is running. - - ## Build template data - - In configuration directives marked as a template engine above, the following - variables are available: - - - `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. - - `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. - - `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). - - `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. - - `SourceAMIOwner` - The source AMI owner ID. - - `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). - - `SourceAMITags` - The source AMI Tags, as a `map[string]string` object. - - ## Build Shared Information Variables - - This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - - The generated variables available for this builder are: - - - `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. - - `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. - - `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). - - `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. - - `SourceAMIOwner` - The source AMI owner ID. - - `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). - - Usage example: - - - - -```hcl -// When accessing one of these variables from inside the builder, you need to -// use the golang templating syntax. This is due to an architectural quirk that -// won't be easily resolvable until legacy json templates are deprecated: - -build { - source "amazon-ebs" "basic-example" { - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_ID = "{{ .SourceAMI }}" - Base_AMI_Name = "{{ .SourceAMIName }}" - } - } - - // when accessing one of the variables from a provisioner or post-processor, use - // hcl-syntax - post-processor "manifest" { - output = "manifest.json" - strip_path = true - custom_data = { - source_ami_name = "${build.SourceAMIName}" - } -} -``` - - - - -```json -"post-processors": [ - { - "type": "manifest", - "output": "manifest.json", - "strip_path": true, - "custom_data": { - "source_ami_name": "{{ build `SourceAMIName` }}" - } - } -] -``` - - - - --> **Note:** Packer uses pre-built AMIs as the source for building images. -These source AMIs may include volumes that are not flagged to be destroyed on -termination of the instance building the new image. In addition to those -volumes created by this builder, any volumes in the source AMI which are not -marked for deletion on termination will remain in your account. - -@include 'builders/aws-ssh-differentiation-table.mdx' diff --git a/website/content/docs/builders/amazon/ebsvolume.mdx b/website/content/docs/builders/amazon/ebsvolume.mdx deleted file mode 100644 index 814449764..000000000 --- a/website/content/docs/builders/amazon/ebsvolume.mdx +++ /dev/null @@ -1,393 +0,0 @@ ---- -description: | - The amazon-ebsvolume Packer builder is like the EBS builder, but is - intended to create EBS volumes rather than a machine image. -page_title: Amazon EBS Volume - Builders -sidebar_title: EBS Volume ---- - -# EBS Volume Builder - -Type: `amazon-ebsvolume` -Artifact BuilderId: `mitchellh.amazon.ebsvolume` - -The `amazon-ebsvolume` Packer builder is able to create Amazon Elastic Block -Store volumes which are prepopulated with filesystems or data. - -This builder creates EBS volumes by launching an EC2 instance from a source -AMI. One or more EBS volumes are attached to the running instance, allowing -them to be provisioned into from the running machine. Once provisioning is -complete the source machine is destroyed. The provisioned volumes are kept -intact. - -This is all done in your own AWS account. The builder will create temporary key -pairs, security group rules, etc. that provide it temporary access to the -instance while the image is being created. - -The builder does _not_ manage EBS Volumes. Once it creates volumes and stores -it in your account, it is up to you to use, delete, etc. the volumes. - --> **Note:** Temporary resources are, by default, all created with the -prefix `packer`. This can be useful if you want to restrict the security groups -and key pairs Packer is able to operate on. - -## Configuration Reference - -There are many configuration options available for the builder. In addition to -the items listed here, you will want to look at the general configuration -references for [AMI](#ami-configuration), -[BlockDevices](#block-devices-configuration), -[Access](#access-configuration), -[Run](#run-configuration) and -[Communicator](#communicator-configuration) -configuration references, which are -necessary for this build to succeed and can be found further down the page. - -### Optional: - -@include 'builder/amazon/ebsvolume/Config-not-required.mdx' - -### Access Configuration - -#### Required: - -@include 'builder/amazon/common/AccessConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AccessConfig-not-required.mdx' - -### Assume Role Configuration - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Polling Configuration - -@include 'builder/amazon/common/AWSPollingConfig.mdx' - -@include 'builder/amazon/common/AWSPollingConfig-not-required.mdx' - -### Block Devices Configuration - -Block devices can be nested in the -[ebs_volumes](#ebs_volumes) array. - -@include 'builder/amazon/common/BlockDevice.mdx' - -#### Optional: - -@include 'builder/amazon/common/BlockDevice-not-required.mdx' - -@include 'builder/amazon/ebsvolume/BlockDevice-not-required.mdx' - -@include 'builder/amazon/common/SnapshotConfig-not-required.mdx' - -### Run Configuration - -#### Required: - -@include 'builder/amazon/common/RunConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/RunConfig-not-required.mdx' - -#### Metadata Settings - -@include 'builder/amazon/common/MetadataOptions.mdx' - -@include 'builder/amazon/common/MetadataOptions-not-required.mdx' - -Usage Example - - - - -```hcl -source "amazon-ebs" "basic-example" { - region = "us-east-1" - source_ami = "ami-fce3c696" - instance_type = "t2.micro" - ssh_username = "ubuntu" - ami_name = "packer_AWS_example_{{timestamp}}" - metadata_options { - http_endpoint = "enabled" - http_tokens = "required" - http_put_response_hop_limit = 1 - } -} -``` - - - - -```json -{ - "variables": { - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" - }, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer_AWS {{timestamp}}", - "metadata_options": { - "http_endpoint": "enabled", - "http_tokens": "required", - "http_put_response_hop_limit": 1 - } - } - ] -} -``` - - - - -@include 'builders/aws-session-manager.mdx' - -### Communicator Configuration - -#### Optional: - -@include 'packer-plugin-sdk/communicator/Config-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Key-Pair-Name-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Agent-Auth-not-required.mdx' - -## Basic Example - - - - -```hcl -source "amazon-ebsvolume" "basic-example" { - region = "us-east-1" - ssh_username = "ubuntu" - instance_type = "t2.medium" - source_ami = "ami-40d28157" - - ebs_volumes { - volume_type = "gp2" - device_name = "/dev/xvdf" - delete_on_termination = false - tags = { - zpool = "data" - Name = "Data1" - } - volume_size = 10 - } - - ebs_volumes { - volume_type = "gp2" - device_name = "/dev/xvdg" - tags = { - zpool = "data" - Name = "Data2" - } - delete_on_termination = false - volume_size = 10 - } - - ebs_volumes { - volume_size = 10 - tags = { - zpool = "data" - Name = "Data3" - } - delete_on_termination = false - device_name = "/dev/xvdh" - volume_type = "gp2" - } -} - -build { - sources = ["sources.amazon-ebsvolume.basic-example"] -} -``` - - - - -```json -{ - "builders": [ - { - "type": "amazon-ebsvolume", - "region": "us-east-1", - "ssh_username": "ubuntu", - "instance_type": "t2.medium", - "source_ami": "ami-40d28157", - "ebs_volumes": [ - { - "volume_type": "gp2", - "device_name": "/dev/xvdf", - "delete_on_termination": false, - "tags": { - "zpool": "data", - "Name": "Data1" - }, - "volume_size": 10 - }, - { - "volume_type": "gp2", - "device_name": "/dev/xvdg", - "tags": { - "zpool": "data", - "Name": "Data2" - }, - "delete_on_termination": false, - "volume_size": 10 - }, - { - "volume_size": 10, - "tags": { - "Name": "Data3", - "zpool": "data" - }, - "delete_on_termination": false, - "device_name": "/dev/xvdh", - "volume_type": "gp2" - } - ] - } - ] -} -``` - - - - --> **Note:** Packer can also read the access key and secret access key from -environmental variables. See the configuration reference in the section above -for more information on what environmental variables Packer will look for. - -Further information on locating AMI IDs and their relationship to instance -types and regions can be found in the AWS EC2 Documentation [for -Linux](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) -or [for -Windows](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/finding-an-ami.html). - -## Accessing the Instance to Debug - -If you need to access the instance to debug for some reason, run the builder -with the `-debug` flag. In debug mode, the Amazon builder will save the private -key in the current directory and will output the DNS or IP information as well. -You can use this information to access the instance as it is running. - -## Build template data - -In configuration directives marked as a template engine above, the following -variables are available: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). -- `SourceAMITags` - The source AMI Tags, as a `map[string]string` object. - -## Build Shared Information Variables - -This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - -The generated variables available for this builder are: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). - --> **Note:** Packer uses pre-built AMIs as the source for building images. -These source AMIs may include volumes that are not flagged to be destroyed on -termination of the instance building the new image. In addition to those -volumes created by this builder, any volumes in the source AMI which are not -marked for deletion on termination will remain in your account. - -## Build Shared Information Variables - -This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - -The generated variables available for this builder are: - -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. - -Usage example: - - - - -```hcl -// When accessing one of these variables from inside the builder, you need to -// use the golang templating syntax. This is due to an architectural quirk that -// won't be easily resolvable until legacy json templates are deprecated: - -{ -source "amazon-ebs" "basic-example" { - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_ID = "{{ .SourceAMI }}" - Base_AMI_Name = "{{ .SourceAMIName }}" - } -} - -// when accessing one of the variables from a provisioner or post-processor, use -// hcl-syntax -post-processor "manifest" { - output = "manifest.json" - strip_path = true - custom_data = { - source_ami_name = "${build.SourceAMIName}" - } -} -``` - - - - -```json -"post-processors": [ - { - "type": "manifest", - "output": "manifest.json", - "strip_path": true, - "custom_data": { - "source_ami_name": "{{ build `SourceAMIName` }}" - } - } -] -``` - - - - -@include 'builders/aws-ssh-differentiation-table.mdx' diff --git a/website/content/docs/builders/amazon/index.mdx b/website/content/docs/builders/amazon/index.mdx deleted file mode 100644 index 011137154..000000000 --- a/website/content/docs/builders/amazon/index.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -description: | - Packer is able to create Amazon AMIs. To achieve this, Packer comes with - multiple builders depending on the strategy you want to use to build the AMI. -page_title: Amazon AMI - Builders -sidebar_title: Amazon EC2 ---- - -# Amazon AMI Builder - -Packer is able to create Amazon AMIs. To achieve this, Packer comes with -multiple builders depending on the strategy you want to use to build the AMI. -Packer supports the following builders at the moment: - -- [amazon-ebs](/docs/builders/amazon/ebs) - Create EBS-backed AMIs by - launching a source AMI and re-packaging it into a new AMI after - provisioning. If in doubt, use this builder, which is the easiest to get - started with. - -- [amazon-instance](/docs/builders/amazon/instance) - Create - instance-store AMIs by launching and provisioning a source instance, then - rebundling it and uploading it to S3. - -- [amazon-chroot](/docs/builders/amazon/chroot) - Create EBS-backed AMIs - from an existing EC2 instance by mounting the root device and using a - [Chroot](https://en.wikipedia.org/wiki/Chroot) environment to provision - that device. This is an **advanced builder and should not be used by - newcomers**. However, it is also the fastest way to build an EBS-backed AMI - since no new EC2 instance needs to be launched. - -- [amazon-ebssurrogate](/docs/builders/amazon/ebssurrogate) - Create EBS - -backed AMIs from scratch. Works similarly to the `chroot` builder but does - not require running in AWS. This is an **advanced builder and should not be - used by newcomers**. - --> **Don't know which builder to use?** If in doubt, use the [amazon-ebs -builder](/docs/builders/amazon/ebs). It is much easier to use and Amazon -generally recommends EBS-backed images nowadays. - -# Amazon EBS Volume Builder - -Packer is able to create Amazon EBS Volumes which are preinitialized with a -filesystem and data. - -- [amazon-ebsvolume](/docs/builders/amazon/ebsvolume) - Create EBS - volumes by launching a source AMI with block devices mapped. Provision the - instance, then destroy it, retaining the EBS volumes and or Snapshot. - - - - - -## Authentication - -The AWS provider offers a flexible means of providing credentials for -authentication. The following methods are supported, in this order, and -explained below: - -- Static credentials -- Environment variables -- Shared credentials file -- EC2 Role - -### Static Credentials - -Static credentials can be provided in the form of an access key id and secret. -These look like: - - - - -```json -"builders": { - "type": "amazon-ebs", - "access_key": "AKIAIOSFODNN7EXAMPLE", - "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "region": "us-east-1", -} -``` - - - - -```hcl -source "amazon-ebs" "basic-example" { - access_key = "AKIAIOSFODNN7EXAMPLE" - secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" - region = "us-east-1" -} -``` - - - - -If you would like, you may also assume a role using the assume_role -configuration option. You must still have one of the valid credential resources -explained above, and your user must have permission to assume the role in -question. This is a way of running Packer with a more restrictive set of -permissions than your user. - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Environment variables - -You can provide your credentials via the `AWS_ACCESS_KEY_ID` and -`AWS_SECRET_ACCESS_KEY`, environment variables, representing your AWS Access -Key and AWS Secret Key, respectively. Note that setting your AWS credentials -using either these environment variables will override the use of -`AWS_SHARED_CREDENTIALS_FILE` and `AWS_PROFILE`. The `AWS_DEFAULT_REGION` and -`AWS_SESSION_TOKEN` environment variables are also used, if applicable: - -Usage: - - $ export AWS_ACCESS_KEY_ID="anaccesskey" - $ export AWS_SECRET_ACCESS_KEY="asecretkey" - $ export AWS_DEFAULT_REGION="us-west-2" - $ packer build template.pkr.hcl - -### Shared Credentials file - -You can use an AWS credentials file to specify your credentials. The default -location is `$HOME/.aws/credentials` on Linux and OS X, or -`%USERPROFILE%.aws\credentials` for Windows users. If we fail to detect -credentials inline, or in the environment, Packer will check this location. You -can optionally specify a different location in the configuration by setting the -environment with the `AWS_SHARED_CREDENTIALS_FILE` variable. - -The format for the credentials file is like so - - [default] - aws_access_key_id= - aws_secret_access_key= - -You may also configure the profile to use by setting the `profile` -configuration option, or setting the `AWS_PROFILE` environment variable: - - - - -```json -"builders": { - "type": "amazon-ebs" - "profile": "customprofile", - "region": "us-east-1", -} -``` - - - - -```hcl -source "amazon-ebs" "basic-example" { - profile = "customprofile" - region = "us-east-1" -} -``` - - - - -### IAM Task or Instance Role - -Finally, Packer will use credentials provided by the task's or instance's IAM -role, if it has one. - -This is a preferred approach over any other when running in EC2 as you can -avoid hard coding credentials. Instead these are leased on-the-fly by Packer, -which reduces the chance of leakage. - -The following policy document provides the minimal set permissions necessary -for Packer to work: - -```json -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "ec2:AttachVolume", - "ec2:AuthorizeSecurityGroupIngress", - "ec2:CopyImage", - "ec2:CreateImage", - "ec2:CreateKeypair", - "ec2:CreateSecurityGroup", - "ec2:CreateSnapshot", - "ec2:CreateTags", - "ec2:CreateVolume", - "ec2:DeleteKeyPair", - "ec2:DeleteSecurityGroup", - "ec2:DeleteSnapshot", - "ec2:DeleteVolume", - "ec2:DeregisterImage", - "ec2:DescribeImageAttribute", - "ec2:DescribeImages", - "ec2:DescribeInstances", - "ec2:DescribeInstanceStatus", - "ec2:DescribeRegions", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSnapshots", - "ec2:DescribeSubnets", - "ec2:DescribeTags", - "ec2:DescribeVolumes", - "ec2:DetachVolume", - "ec2:GetPasswordData", - "ec2:ModifyImageAttribute", - "ec2:ModifyInstanceAttribute", - "ec2:ModifySnapshotAttribute", - "ec2:RegisterImage", - "ec2:RunInstances", - "ec2:StopInstances", - "ec2:TerminateInstances" - ], - "Resource": "*" - } - ] -} -``` - -Note that if you'd like to create a spot instance, you must also add: - - ec2:CreateLaunchTemplate, - ec2:DeleteLaunchTemplate, - ec2:CreateFleet - -If you have the `spot_price` parameter set to `auto`, you must also add: - - ec2:DescribeSpotPriceHistory - -If you are using the `vpc_filter` option, you must also add: - - ec2:DescribeVpcs - -## Troubleshooting - -### Attaching IAM Policies to Roles - -IAM policies can be associated with users or roles. If you use packer with IAM -roles, you may encounter an error like this one: - - ==> amazon-ebs: Error launching source instance: You are not authorized to perform this operation. - -You can read more about why this happens on the [Amazon Security -Blog](https://blogs.aws.amazon.com/security/post/Tx3M0IFB5XBOCQX/Granting-Permission-to-Launch-EC2-Instances-with-IAM-Roles-PassRole-Permission). -The example policy below may help packer work with IAM roles. Note that this -example provides more than the minimal set of permissions needed for packer to -work, but specifics will depend on your use-case. - -```json -{ - "Sid": "PackerIAMPassRole", - "Effect": "Allow", - "Action": ["iam:PassRole", "iam:GetInstanceProfile"], - "Resource": ["*"] -} -``` - -If using an existing instance profile with spot instances/spot pricing, the `iam:CreateServiceLinkedRole` action is also required: - -```json -{ - "Sid": "PackerIAMPassRole", - "Effect": "Allow", - "Action": ["iam:PassRole", "iam:GetInstanceProfile", "iam:CreateServiceLinkedRole"], - "Resource": ["*"] -} -``` - -In case when you're creating a temporary instance profile you will require to have following -IAM policies. - -```json -{ - "Sid": "PackerIAMCreateRole", - "Effect": "Allow", - "Action": [ - "iam:PassRole", - "iam:CreateInstanceProfile", - "iam:DeleteInstanceProfile", - "iam:GetRole", - "iam:GetInstanceProfile", - "iam:DeleteRolePolicy", - "iam:RemoveRoleFromInstanceProfile", - "iam:CreateRole", - "iam:DeleteRole", - "iam:PutRolePolicy", - "iam:AddRoleToInstanceProfile" - ], - "Resource": "*" -} -``` - -In cases where you are using a KMS key for encryption, your key will need the -following policies at a minimum: - -```json -{ - "Sid": "Allow use of the key", - "Effect": "Allow", - "Action": ["kms:ReEncrypt*", "kms:GenerateDataKey*"], - "Resource": "*" -} -``` - -If you are using a key provided by a different account than the one you are -using to run the Packer build, your key will also need - -```json -("kms:CreateGrant", "kms:DescribeKey") -``` - -### Checking that system time is current - -Amazon uses the current time as part of the [request signing -process](http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html). If -your system clock is too skewed from the current time, your requests might -fail. If that's the case, you might see an error like this: - - ==> amazon-ebs: Error querying AMI: AuthFailure: AWS was not able to validate the provided access credentials - -If you suspect your system's date is wrong, you can compare it against -`http://www.time.gov/`. On Linux/OS X, you can run the `date` command to get the current time. If you're -on Linux, you can try setting the time with ntp by running `sudo ntpd -q`. - -### ResourceNotReady Error - -This error generally appears as either `ResourceNotReady: exceeded wait attempts` or `ResourceNotReady: failed waiting for successful resource state`. - -This opaque error gets returned from AWS's API for a number of reasons, -generally during image copy/encryption. Possible reasons for the error include: - -- You aren't waiting long enough. This is where you'll see the `exceeded wait attempts` variety of this error message: - We use the AWS SDK's built-in waiters to wait for longer-running tasks to - complete. These waiters have default delays between queries and maximum - number of queries that don't always work for our users. - - If you find that you are being rate-limited or have exceeded your max wait - attempts, you can override the defaults by setting the following packer - environment variables (note that these will apply to all AWS tasks that we - have to wait for): - - - `AWS_MAX_ATTEMPTS` - This is how many times to re-send a status update - request. Excepting tasks that we know can take an extremely long time, this - defaults to 40 tries. - - - `AWS_POLL_DELAY_SECONDS` - How many seconds to wait in between status update - requests. Generally defaults to 2 or 5 seconds, depending on the task. - -- You are using short-lived credentials that expired during the build. If this - is the problem, you may also see `RequestExpired: Request has expired.` - errors displayed in the Packer output: - - - If you are using STS credentials, make sure that they expire only after the - build has completed - - - If you are chaining roles, make sure your build doesn't last more than an - hour, since when you chain roles the maximum length of time your credentials - will last is an hour: - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html - -- Something is wrong with your KMS key. This is where you'll see the - `ResourceNotReady: failed waiting for successful resource state` variety of - this error message. Issues we've seen include: - - Your KMS key is invalid, possibly because of a typo - - Your KMS key is valid but does not have the necessary permissions (see - above for the necessary key permissions) - - Your KMS key is valid, but not in the region you've told us to use it in. diff --git a/website/content/docs/builders/amazon/instance.mdx b/website/content/docs/builders/amazon/instance.mdx deleted file mode 100644 index fce19e3f9..000000000 --- a/website/content/docs/builders/amazon/instance.mdx +++ /dev/null @@ -1,385 +0,0 @@ ---- -description: > - The amazon-instance Packer builder is able to create Amazon AMIs backed by - - instance storage as the root device. For more information on the difference - - between instance storage and EBS-backed instances, see the storage for the - root - - device section in the EC2 documentation. -page_title: Amazon instance-store - Builders -sidebar_title: Instance ---- - -# AMI Builder (instance-store) - -Type: `amazon-instance` -Artifact BuilderId: `mitchellh.amazon.instance` - -The `amazon-instance` Packer builder is able to create Amazon AMIs backed by -instance storage as the root device. For more information on the difference -between instance storage and EBS-backed instances, see the ["storage for the -root device" section in the EC2 -documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - -This builder builds an AMI by launching an EC2 instance from an existing -instance-storage backed AMI, provisioning that running machine, and then -bundling and creating a new AMI from that machine. This is all done in your own -AWS account. This builder will create temporary key pairs, security group -rules, etc. that provide it temporary access to the instance while the image is -being created. This simplifies configuration quite a bit. - -This builder does _not_ manage AMIs. Once it creates an AMI and stores it in -your account, it is up to you to use, delete, etc. the AMI. - --> **Note:** Temporary resources are, by default, all created with the -prefix `packer`. This can be useful if you want to restrict the security groups -and key pairs packer is able to operate on. - --> **Note:** This builder requires that the [Amazon EC2 AMI -Tools](https://aws.amazon.com/developertools/368) are installed onto the -machine. This can be done within a provisioner, but must be done before the -builder finishes running. - -~> Instance builds are not supported for Windows. Use -[`amazon-ebs`](/docs/builders/amazon-ebs) instead. - -## Configuration Reference - -There are many configuration options available for the builder. In addition to -the items listed here, you will want to look at the general configuration -references for [AMI](#ami-configuration), -[BlockDevices](#block-devices-configuration), -[Access](#access-configuration), -[Run](#run-configuration) and -[Communicator](#communicator-configuration) -configuration references, which are -necessary for this build to succeed and can be found further down the page. - -### Required: - -@include 'builder/amazon/instance/Config-required.mdx' - -### Optional: - -@include 'builder/amazon/instance/Config-not-required.mdx' - -### AMI Configuration - -#### Required: - -@include 'builder/amazon/common/AMIConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AMIConfig-not-required.mdx' - -### Access Configuration - -#### Required: - -@include 'builder/amazon/common/AccessConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/AccessConfig-not-required.mdx' - -### Assume Role Configuration - -@include 'builder/amazon/common/AssumeRoleConfig.mdx' - -@include 'builder/amazon/common/AssumeRoleConfig-not-required.mdx' - -### Polling Configuration - -@include 'builder/amazon/common/AWSPollingConfig.mdx' - -@include 'builder/amazon/common/AWSPollingConfig-not-required.mdx' - -### Run Configuration - -#### Required: - -@include 'builder/amazon/common/RunConfig-required.mdx' - -#### Optional: - -@include 'builder/amazon/common/RunConfig-not-required.mdx' - -@include 'builders/aws-session-manager.mdx' - -### Block Devices Configuration - -Block devices can be nested in the -[ami_block_device_mappings](#ami_block_device_mappings) or the -[launch_block_device_mappings](#launch_block_device_mappings) array. - -@include 'builder/amazon/common/BlockDevice.mdx' - -#### Optional: - -@include 'builder/amazon/common/BlockDevice-not-required.mdx' - -### Communicator Configuration - -#### Optional: - -@include 'packer-plugin-sdk/communicator/Config-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Key-Pair-Name-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx' - -@include 'packer-plugin-sdk/communicator/SSH-Agent-Auth-not-required.mdx' - -## Basic Example - -Here is a basic example. It is completely valid except for the access keys: - - - - -```hcl -source "amazon-instance" "basic-example" { - region = "us-east-1" - source_ami = "ami-d9d6a6b0" - instance_type = "m1.small" - ssh_username = "ubuntu" - - account_id = "0123-4567-0890" - s3_bucket = "packer-images" - x509_cert_path = "x509.cert" - x509_key_path = "x509.key" - x509_upload_path = "/tmp" -} - -build { - source "sources.amazon-instance.basic-example" { - ami_name = "packer-quick-start {{timestamp}}" - } -} -``` - - - - -```json -{ - "type": "amazon-instance", - "access_key": "YOUR KEY HERE", - "secret_key": "YOUR SECRET KEY HERE", - "region": "us-east-1", - "source_ami": "ami-d9d6a6b0", - "instance_type": "m1.small", - "ssh_username": "ubuntu", - - "account_id": "0123-4567-0890", - "s3_bucket": "packer-images", - "x509_cert_path": "x509.cert", - "x509_key_path": "x509.key", - "x509_upload_path": "/tmp", - - "ami_name": "packer-quick-start {{timestamp}}" -} -``` - - - - --> **Note:** Packer can also read the access key and secret access key from -environmental variables. See the configuration reference in the section above -for more information on what environmental variables Packer will look for. - -## Accessing the Instance to Debug - -If you need to access the instance to debug for some reason, run this builder -with the `-debug` flag. In debug mode, the Amazon builder will save the private -key in the current directory and will output the DNS or IP information as well. -You can use this information to access the instance as it is running. - -## Build template data - -In configuration directives marked as a template engine above, the following -variables are available: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). -- `SourceAMITags` - The source AMI Tags, as a `map[string]string` object. - -## Build Shared Information Variables - -This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/legacy_json_templates/engine) for JSON and [contextual variables](/docs/templates/hcl_templates/contextual-variables) for HCL2. - -The generated variables available for this builder are: - -- `BuildRegion` - The region (for example `eu-central-1`) where Packer is - building the AMI. -- `SourceAMI` - The source AMI ID (for example `ami-a2412fcd`) used to build - the AMI. -- `SourceAMICreationDate` - The source AMI creation date (for example `"2020-05-14T19:26:34.000Z"`). -- `SourceAMIName` - The source AMI Name (for example - `ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20180306`) used to - build the AMI. -- `SourceAMIOwner` - The source AMI owner ID. -- `SourceAMIOwnerName` - The source AMI owner alias/name (for example `amazon`). - -Usage example: - - - - -```hcl -// When accessing one of these variables from inside the builder, you need to -// use the golang templating syntax. This is due to an architectural quirk that -// won't be easily resolvable until legacy json templates are deprecated: - -{ -source "amazon-ebs" "basic-example" { - tags = { - OS_Version = "Ubuntu" - Release = "Latest" - Base_AMI_ID = "{{ .SourceAMI }}" - Base_AMI_Name = "{{ .SourceAMIName }}" - } -} - -// when accessing one of the variables from a provisioner or post-processor, use -// hcl-syntax -post-processor "manifest" { - output = "manifest.json" - strip_path = true - custom_data = { - source_ami_name = "${build.SourceAMIName}" - } -} -``` - - - - -```json -"post-processors": [ - { - "type": "manifest", - "output": "manifest.json", - "strip_path": true, - "custom_data": { - "source_ami_name": "{{ build `SourceAMIName` }}" - } - } -] -``` - - - - -## Custom Bundle Commands - -A lot of the process required for creating an instance-store backed AMI -involves commands being run on the actual source instance. Specifically, the -`ec2-bundle-vol` and `ec2-upload-bundle` commands must be used to bundle the -root filesystem and upload it, respectively. - -Each of these commands have a lot of available flags. Instead of exposing each -possible flag as a template configuration option, the instance-store AMI -builder for Packer lets you customize the entire command used to bundle and -upload the AMI. - -These are configured with `bundle_vol_command` and `bundle_upload_command`. -Both of these configurations are [configuration -templates](/docs/templates/legacy_json_templates/engine) and have support for their own set of -template variables. - -### Bundle Volume Command - -The default value for `bundle_vol_command` is shown below. It is split across -multiple lines for convenience of reading. The bundle volume command is -responsible for executing `ec2-bundle-vol` in order to store and image of the -root filesystem to use to create the AMI. - -```shell-session -$ sudo -i -n ec2-bundle-vol \ - -k {{.KeyPath}} \ - -u {{.AccountId}} \ - -c {{.CertPath}} \ - -r {{.Architecture}} \ - -e {{.PrivatePath}}/* \ - -d {{.Destination}} \ - -p {{.Prefix}} \ - --batch \ - --no-filter -``` - -The available template variables should be self-explanatory based on the -parameters they're used to satisfy the `ec2-bundle-vol` command. - -~> **Warning!** Some versions of ec2-bundle-vol silently ignore all .pem -and .gpg files during the bundling of the AMI, which can cause problems on some -systems, such as Ubuntu. You may want to customize the bundle volume command to -include those files (see the `--no-filter` option of `ec2-bundle-vol`). - -### Bundle Upload Command - -The default value for `bundle_upload_command` is shown below. It is split -across multiple lines for convenience of reading. Access key and secret key are -omitted if using instance profile. The bundle upload command is responsible for -taking the bundled volume and uploading it to S3. - -```shell-session -$ sudo -i -n ec2-upload-bundle \ - -b {{.BucketName}} \ - -m {{.ManifestPath}} \ - -a {{.AccessKey}} \ - -s {{.SecretKey}} \ - -d {{.BundleDirectory}} \ - --batch \ - --region {{.Region}} \ - --retry -``` - -The available template variables should be self-explanatory based on the -parameters they're used to satisfy the `ec2-upload-bundle` command. -Additionally, `{{.Token}}` is available when overriding this command. You must -create your own bundle command with the addition of `-t {{.Token}}` if you are -assuming a role. - -#### Bundle Upload Permissions - -The `ec2-upload-bundle` requires a policy document that looks something like -this: - -```json -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "s3:PutObject", - "s3:GetObject", - "s3:ListBucket", - "s3:GetBucketLocation", - "s3:PutObjectAcl" - ], - "Resource": "*" - } - ] -} -``` - -You may wish to constrain the resource to a specific bucket. - -@include 'builders/aws-ssh-differentiation-table.mdx' diff --git a/website/content/docs/datasources/amazon/ami.mdx b/website/content/docs/datasources/amazon/ami.mdx deleted file mode 100644 index b8b1a2a63..000000000 --- a/website/content/docs/datasources/amazon/ami.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -description: | - The Amazon AMI data source provides information from an AMI that will be fetched based - on the filter options provided in the configuration. - -page_title: Amazon AMI - Data Source -sidebar_title: Amazon AMI ---- - -# Amazon AMI Data Source - -Type: `amazon-ami` - -The Amazon AMI data source will filter and fetch an Amazon AMI, and output all the AMI information that will -be then available to use in the [Amazon builders](/docs/builders/amazon/instance). - --> **Note:** Data sources is a feature exclusively to HCL2 templates. - -Basic example of usage: - -```hcl -data "amazon-ami" "basic-example" { - filters = { - virtualization-type = "hvm" - name = "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*" - root-device-type = "ebs" - } - owners = ["099720109477"] - most_recent = true -} -``` -This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. Note that the data source will fail unless -*exactly* one AMI is returned. In the above example, `most_recent` will cause this to succeed by selecting the newest image. - -## Configuration Reference - -@include 'builder/amazon/common/AmiFilterOptions-not-required.mdx' - -## Output Data - -@include 'datasource/amazon/ami/DatasourceOutput.mdx' diff --git a/website/content/docs/datasources/amazon/index.mdx b/website/content/docs/datasources/amazon/index.mdx deleted file mode 100644 index da4300a02..000000000 --- a/website/content/docs/datasources/amazon/index.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -description: | - Packer is able to fetch data from AWS. To achieve this, Packer comes with - data sources to retrieve AMI and secrets information. -page_title: Amazon - Data Sources -sidebar_title: Amazon ---- - -# Amazon Data Sources - -Packer is able to fetch data from AWS. To achieve this, Packer comes with data sources to retrieve AMI and secrets information. -Packer supports the following data sources at the moment: - -- [amazon-ami](/docs/datasources/amazon/ami) - Filter and fetch an Amazon AMI to output all the AMI information. - -- [amazon-secretsmanager](/docs/datasources/amazon/secretsmanager) - Retrieve information -about a Secrets Manager secret version, including its secret value. - - -## Authentication - -The Amazon Data Sources authentication works just like for the [Amazon Builders](/docs/builders/amazon). Both -have the same authentication options and you can refer to the [Amazon Builders authentication](/docs/builders/amazon#authentication) -to learn the options to authenticate for data sources. - --> **Note:** A data source will start and execute in your own authentication session. The authentication in the data source -doesn't relate with the authentication on Amazon Builders. - -Basic example of an Amazon data source authentication using `assume_role`: - -```hcl -data "amazon-secretsmanager" "basic-example" { - name = "packer_test_secret" - key = "packer_test_key" - - assume_role { - role_arn = "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME" - session_name = "SESSION_NAME" - external_id = "EXTERNAL_ID" - } -} -``` diff --git a/website/content/docs/datasources/amazon/secretsmanager.mdx b/website/content/docs/datasources/amazon/secretsmanager.mdx deleted file mode 100644 index 352cf8306..000000000 --- a/website/content/docs/datasources/amazon/secretsmanager.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -description: | - The Amazon Secrets Manager data source provides information about a Secrets Manager secret version, - including its secret value. - -page_title: Secrets Manager - Data Source -sidebar_title: Secrets Manager ---- - -# Amazon Secrets Manager Data Source - -The Secrets Manager data source provides information about a Secrets Manager secret version, -including its secret value. - --> **Note:** Data sources is a feature exclusively to HCL2 templates. - -Basic examples of usage: - -```hcl -data "amazon-secretsmanager" "basic-example" { - name = "packer_test_secret" - key = "packer_test_key" - version_stage = "example" -} - -# usage example of the data source output -locals { - value = data.amazon-secretsmanager.basic-example.value - secret_string = data.amazon-secretsmanager.basic-example.secret_string - version_id = data.amazon-secretsmanager.basic-example.version_id - secret_value = jsondecode(data.amazon-secretsmanager.basic-example.secret_string)["packer_test_key"] -} -``` - -Reading key-value pairs from JSON back into a native Packer map can be accomplished -with the [jsondecode() function](/docs/templates/hcl_templates/functions/encoding/jsondecode). - - -## Configuration Reference - -### Required - -@include 'datasource/amazon/secretsmanager/Config-required.mdx' - -### Optional - -@include 'datasource/amazon/secretsmanager/Config-not-required.mdx' - -## Output Data - -@include 'datasource/amazon/secretsmanager/DatasourceOutput.mdx' diff --git a/website/content/docs/plugins/creation/custom-datasources.mdx b/website/content/docs/plugins/creation/custom-datasources.mdx index b9f1055fd..238232b9f 100644 --- a/website/content/docs/plugins/creation/custom-datasources.mdx +++ b/website/content/docs/plugins/creation/custom-datasources.mdx @@ -10,7 +10,7 @@ sidebar_title: Custom Data Sources Packer Data Sources are the components of Packer that allow data to be fetched for use within the configuration. Use of data sources allows a build to use information defined outside of Packer. An example of -data source is the [amazon-ami data source](/docs/datasources/amazon/ami), which outputs the data of a fetched Amazon AMI. +data source is the [amazon-ami data source](/docs/datasources/amazon/ami.mdx), which outputs the data of a fetched Amazon AMI. Prior to reading this page, it is assumed you have read the page on [plugin development basics](/docs/plugins). diff --git a/website/content/docs/post-processors/amazon-import.mdx b/website/content/docs/post-processors/amazon-import.mdx deleted file mode 100644 index a497bda45..000000000 --- a/website/content/docs/post-processors/amazon-import.mdx +++ /dev/null @@ -1,257 +0,0 @@ ---- -description: | - The Packer Amazon Import post-processor takes an OVA artifact from various - builders and imports it to an AMI available to Amazon Web Services EC2. -page_title: Amazon Import - Post-Processors -sidebar_title: Amazon Import ---- - -# Amazon Import Post-Processor - -Type: `amazon-import` -Artifact BuilderId: `packer.post-processor.amazon-import` - -The Packer Amazon Import post-processor takes an OVA artifact from various -builders and imports it to an AMI available to Amazon Web Services EC2. - -~> This post-processor is for advanced users. It depends on specific IAM -roles inside AWS and is best used with images that operate with the EC2 -configuration model (eg, cloud-init for Linux systems). Please ensure you read -the [prerequisites for import](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html) -before using this post-processor. - -## How Does it Work? - -The import process operates making a temporary copy of the OVA to an S3 bucket, -and calling an import task in EC2 on the OVA file. Once completed, an AMI is -returned containing the converted virtual machine. The temporary OVA copy in S3 -can be discarded after the import is complete. - -The import process itself run by AWS includes modifications to the image -uploaded, to allow it to boot and operate in the AWS EC2 environment. However, -not all modifications required to make the machine run well in EC2 are -performed. Take care around console output from the machine, as debugging can -be very difficult without it. You may also want to include tools suitable for -instances in EC2 such as `cloud-init` for Linux. - -Further information about the import process can be found in AWS's [EC2 -Import/Export Instance -documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instances_of_your_vm.html). - -## Configuration - -There are some configuration options available for the post-processor. They are -segmented below into two categories: required and optional parameters. Within -each category, the available configuration keys are alphabetized. - -Required: - -- `access_key` (string) - The access key used to communicate with AWS. [Learn - how to set this.](/docs/builders/amazon#specifying-amazon-credentials) - -- `region` (string) - The name of the region, such as `us-east-1` in which to - upload the OVA file to S3 and create the AMI. A list of valid regions can - be obtained with AWS CLI tools or by consulting the AWS website. - -- `s3_bucket_name` (string) - The name of the S3 bucket where the OVA file - will be copied to for import. This bucket must exist when the - post-processor is run. - -- `secret_key` (string) - The secret key used to communicate with AWS. [Learn - how to set this.](/docs/builders/amazon#specifying-amazon-credentials) - -Optional: - -- `ami_description` (string) - The description to set for the resulting - imported AMI. By default this description is generated by the AMI import - process. - -- `ami_encrypt` (boolean) - Encrypt the resulting AMI using KMS. This defaults - to `false`. - -- `ami_groups` (array of strings) - A list of groups that have access to - launch the imported AMI. By default no groups have permission to launch the - AMI. `all` will make the AMI publicly accessible. AWS currently doesn't - accept any value other than "all". - -- `ami_kms_key` (string) - The ID of the KMS key used to encrypt the AMI - if `ami_encrypt` is true. If set, the role specified in `role_name` must - be granted access to use this key. If not set, the account default KMS key - will be used. - -- `ami_name` (string) - The name of the ami within the console. If not - specified, this will default to something like `ami-import-sfwerwf`. Please - note, specifying this option will result in a slightly longer execution - time. - -- `ami_users` (array of strings) - A list of account IDs that have access to - launch the imported AMI. By default no additional users other than the user - importing the AMI has permission to launch it. - -- `custom_endpoint_ec2` (string) - This option is useful if you use a cloud - provider whose API is compatible with aws EC2. Specify another endpoint - like this `https://ec2.custom.endpoint.com`. - -- `format` (string) - One of: `ova`, `raw`, `vhd`, `vhdx`, or `vmdk`. This - specifies the format of the source virtual machine image. The resulting - artifact from the builder is assumed to have a file extension matching the - format. This defaults to `ova`. - -- `insecure_skip_tls_verify` (boolean) - This allows skipping TLS - verification of the AWS EC2 endpoint. The default is `false`. - -- `keep_input_artifact` (boolean) - if true, do not delete the source virtual - machine image after importing it to the cloud. Defaults to false. - -- `license_type` (string) - The license type to be used for the Amazon - Machine Image (AMI) after importing. Valid values: `AWS` or `BYOL` - (default). For more details regarding licensing, see - [Prerequisites](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html) - in the VM Import/Export User Guide. - -- `mfa_code` (string) - The MFA - [TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm) - code. This should probably be a user variable since it changes all the - time. - -- `profile` (string) - The profile to use in the shared credentials file for - AWS. See Amazon's documentation on [specifying - profiles](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-profiles) - for more details. - -- `role_name` (string) - The name of the role to use when not using the - default role, 'vmimport' - -- `s3_encryption` (string) - One of: `aws:kms`, or `AES256`. The algorithm - used to encrypt the artifact in S3. This **does not** encrypt the - resulting AMI, and is only used to encrypt the uploaded artifact before - it becomes an AMI. By default no encryption is used. - -- `s3_encryption_key` (string) - The KMS key ID to use when `aws:kms` is - specified in `s3_encryption`. This setting is ignored if AES is used - as Amazon does not currently support custom AES keys when using the VM - import service. If set, the role specified in `role_name` must be granted - access to use this key. If not set, and `s3_encryption` is set to `aws:kms`, - the account default KMS key will be used. - -- `s3_key_name` (string) - The name of the key in `s3_bucket_name` where the - OVA file will be copied to for import. If not specified, this will default - to "packer-import-{{timestamp}}.ova". This key (i.e., the uploaded OVA) - will be removed after import, unless `skip_clean` is `true`. This is - treated as a [template engine](/docs/templates/legacy_json_templates/engine). Therefore, you - may use user variables and template functions in this field. - -- `skip_clean` (boolean) - Whether we should skip removing the OVA file - uploaded to S3 after the import process has completed. "true" means that we - should leave it in the S3 bucket, "false" means to clean it out. Defaults - to `false`. - -- `skip_region_validation` (boolean) - Set to true if you want to skip - validation of the region configuration option. Default `false`. - -- `tags` (object of key/value strings) - Tags applied to the created AMI and - relevant snapshots. - -- `token` (string) - The access token to use. This is different from the - access key and secret key. If you're not sure what this is, then you - probably don't need it. This will also be read from the `AWS_SESSION_TOKEN` - environmental variable. - -## Basic Example - -Here is a basic example. This assumes that the builder has produced an OVA -artifact for us to work with, and IAM roles for import exist in the AWS account -being imported into. - -```json -{ - "type": "amazon-import", - "access_key": "YOUR KEY HERE", - "secret_key": "YOUR SECRET KEY HERE", - "region": "us-east-1", - "s3_bucket_name": "importbucket", - "license_type": "BYOL", - "tags": { - "Description": "packer amazon-import {{timestamp}}" - } -} -``` - -## VMWare Example - -This is an example that uses `vmware-iso` builder and exports the `.ova` file -using ovftool. - -```json -"post-processors" : [ - [ - { - "type": "shell-local", - "inline": [ "/usr/bin/ovftool /.vmx /.ova" ] - }, - { - "files": [ - "/.ova" - ], - "type": "artifice" - }, - { - "type": "amazon-import", - "access_key": "YOUR KEY HERE", - "secret_key": "YOUR SECRET KEY HERE", - "region": "us-east-1", - "s3_bucket_name": "importbucket", - "license_type": "BYOL", - "tags": { - "Description": "packer amazon-import {{timestamp}}" - } - } - ] - ] -``` - -## Amazon Permissions - -You'll need at least the following permissions in the policy for your IAM user -in order to successfully upload an image via the amazon-import post-processor. - -```json -("ec2:CancelImportTask", -"ec2:CopyImage", -"ec2:CreateTags", -"ec2:DescribeImages", -"ec2:DescribeImportImageTasks", -"ec2:ImportImage", -"ec2:ModifyImageAttribute", -"ec2:DeregisterImage") -``` - -## Troubleshooting Timeouts - -The amazon-import feature can take a long time to upload and convert your OVAs -into AMIs; if you find that your build is failing because you have exceeded -your max retries or find yourself being rate limited, you can override the max -retries and the delay in between retries by setting the environment variables -`AWS_MAX_ATTEMPTS` and `AWS_POLL_DELAY_SECONDS` on the machine running the -Packer build. By default, the waiter that waits for your image to be imported -from s3 will retry for up to an hour: it retries up to 720 times with a 5 -second delay in between retries. - -This is dramatically higher than many of our other waiters, to account for how -long this process can take. - --> **Note:** Packer can also read the access key and secret access key from -environmental variables. See the configuration reference in the section above -for more information on what environmental variables Packer will look for. - -This will take the OVA generated by a builder and upload it to S3. In this -case, an existing bucket called `importbucket` in the `us-east-1` region will -be where the copy is placed. The key name of the copy will be a default name -generated by packer. - -Once uploaded, the import process will start, creating an AMI in the -"us-east-1" region with a "Description" tag applied to both the AMI and the -snapshots associated with it. Note: the import process does not allow you to -name the AMI, the name is automatically generated by AWS. - -After tagging is completed, the OVA uploaded to S3 will be removed. diff --git a/website/content/docs/templates/hcl_templates/contextual-variables.mdx b/website/content/docs/templates/hcl_templates/contextual-variables.mdx index 1bc7152c9..7bbfbc015 100644 --- a/website/content/docs/templates/hcl_templates/contextual-variables.mdx +++ b/website/content/docs/templates/hcl_templates/contextual-variables.mdx @@ -78,11 +78,11 @@ Example of using [upper](/docs/templates/hcl_templates/functions/string/upper) t For builder-specific builder variables, please also refer to the builder docs: -- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables), - [EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables), - [EBS](/docs/builders/amazon/ebs#build-shared-information-variables), - [EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables), - [Instance](/docs/builders/amazon/instance#build-shared-information-variables). +- Amazon EC2: [chroot](/docs/builders/amazon/chroot.mdx#build-shared-information-variables), + [EBS Volume](/docs/builders/amazon/ebsvolume.mdx#build-shared-information-variables), + [EBS](/docs/builders/amazon/ebs.mdx#build-shared-information-variables), + [EBS Surrogate](/docs/builders/amazon/ebssurrogate.mdx#build-shared-information-variables), + [Instance](/docs/builders/amazon/instance.mdx#build-shared-information-variables). The HCL2 Special Build Variables is in beta; please report any issues or requests on the Packer issue tracker on GitHub. diff --git a/website/content/docs/templates/legacy_json_templates/engine.mdx b/website/content/docs/templates/legacy_json_templates/engine.mdx index 0868f84a6..727ff2135 100644 --- a/website/content/docs/templates/legacy_json_templates/engine.mdx +++ b/website/content/docs/templates/legacy_json_templates/engine.mdx @@ -110,11 +110,11 @@ Here is a full list of the available functions for reference. For builder-specific builder variables, please also refer to the builder docs: - - Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables), - [EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables), - [EBS](/docs/builders/amazon/ebs#build-shared-information-variables), - [EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables), - [Instance](/docs/builders/amazon/instance#build-shared-information-variables). + - Amazon EC2: [chroot](/docs/builders/amazon/chroot.mdx#build-shared-information-variables), + [EBS Volume](/docs/builders/amazon/ebsvolume.mdx#build-shared-information-variables), + [EBS](/docs/builders/amazon/ebs.mdx#build-shared-information-variables), + [EBS Surrogate](/docs/builders/amazon/ebssurrogate.mdx#build-shared-information-variables), + [Instance](/docs/builders/amazon/instance.mdx#build-shared-information-variables). This engine is in beta; please report any issues or requests on the Packer issue tracker on GitHub. diff --git a/website/content/guides/hcl/component-object-spec.mdx b/website/content/guides/hcl/component-object-spec.mdx index 4a9d31a3b..d05df574d 100644 --- a/website/content/guides/hcl/component-object-spec.mdx +++ b/website/content/guides/hcl/component-object-spec.mdx @@ -40,4 +40,4 @@ follow to make it HCL2 enabled: From now on every time you add or change a field of Config you will need to run the `go generate` command again. -A good example of this is the [Config struct of the amazon-ebs builder](https://github.com/hashicorp/packer/blob/master/builder/amazon/ebs/builder.go) +A good example of this is the [Config struct of the amazon-ebs builder](https://github.com/hashicorp/packer-plugin-amazon/blob/main/builder/ebs/builder.go) diff --git a/website/content/partials/builder/amazon/chroot/Config-not-required.mdx b/website/content/partials/builder/amazon/chroot/Config-not-required.mdx deleted file mode 100644 index 9952dafda..000000000 --- a/website/content/partials/builder/amazon/chroot/Config-not-required.mdx +++ /dev/null @@ -1,154 +0,0 @@ - - -- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more [block device - mappings](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) - to the AMI. If this field is populated, and you are building from an - existing source image, the block device mappings in the source image - will be overwritten. This means you must have a block device mapping - entry for your root volume, `root_volume_size` and `root_device_name`. - See the [BlockDevices](#block-devices-configuration) documentation for - fields. - -- `chroot_mounts` ([][]string) - This is a list of devices to mount into the chroot environment. This - configuration parameter requires some additional documentation which is - in the Chroot Mounts section. Please read that section for more - information on how to use this. - -- `command_wrapper` (string) - How to run shell commands. This defaults to `{{.Command}}`. This may be - useful to set if you want to set environmental variables or perhaps run - it with sudo or so on. This is a configuration template where the - .Command variable is replaced with the command to be run. Defaults to - `{{.Command}}`. - -- `copy_files` ([]string) - Paths to files on the running EC2 instance that will be copied into the - chroot environment prior to provisioning. Defaults to /etc/resolv.conf - so that DNS lookups work. Pass an empty list to skip copying - /etc/resolv.conf. You may need to do this if you're building an image - that uses systemd. - -- `device_path` (string) - The path to the device where the root volume of the source AMI will be - attached. This defaults to "" (empty string), which forces Packer to - find an open device automatically. - -- `nvme_device_path` (string) - When we call the mount command (by default mount -o device dir), the - string provided in nvme_mount_path will replace device in that command. - When this option is not set, device in that command will be something - like /dev/sdf1, mirroring the attached device name. This assumption - works for most instances but will fail with c5 and m5 instances. In - order to use the chroot builder with c5 and m5 instances, you must - manually set nvme_device_path and device_path. - -- `from_scratch` (bool) - Build a new volume instead of starting from an existing AMI root volume - snapshot. Default false. If true, source_ami/source_ami_filter are no - longer used and the following options become required: - ami_virtualization_type, pre_mount_commands and root_volume_size. - -- `mount_options` ([]string) - Options to supply the mount command when mounting devices. Each option - will be prefixed with -o and supplied to the mount command ran by - Packer. Because this command is ran in a shell, user discretion is - advised. See this manual page for the mount command for valid file - system specific options. - -- `mount_partition` (string) - The partition number containing the / partition. By default this is the - first partition of the volume, (for example, xvda1) but you can - designate the entire block device by setting "mount_partition": "0" in - your config, which will mount xvda instead. - -- `mount_path` (string) - The path where the volume will be mounted. This is where the chroot - environment will be. This defaults to - `/mnt/packer-amazon-chroot-volumes/{{.Device}}`. This is a configuration - template where the .Device variable is replaced with the name of the - device where the volume is attached. - -- `post_mount_commands` ([]string) - As pre_mount_commands, but the commands are executed after mounting the - root device and before the extra mount and copy steps. The device and - mount path are provided by `{{.Device}}` and `{{.MountPath}}`. - -- `pre_mount_commands` ([]string) - A series of commands to execute after attaching the root volume and - before mounting the chroot. This is not required unless using - from_scratch. If so, this should include any partitioning and filesystem - creation commands. The path to the device is provided by `{{.Device}}`. - -- `root_device_name` (string) - The root device name. For example, xvda. - -- `root_volume_size` (int64) - The size of the root volume in GB for the chroot environment and the - resulting AMI. Default size is the snapshot size of the source_ami - unless from_scratch is true, in which case this field must be defined. - -- `root_volume_type` (string) - The type of EBS volume for the chroot environment and resulting AMI. The - default value is the type of the source_ami, unless from_scratch is - true, in which case the default value is gp2. You can only specify io1 - if building based on top of a source_ami which is also io1. - -- `source_ami_filter` (awscommon.AmiFilterOptions) - Filters used to populate the source_ami field. Example: - - ```json - { - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", - "root-device-type": "ebs" - }, - "owners": ["099720109477"], - "most_recent": true - } - } - ``` - - This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE: - This will fail unless *exactly* one AMI is returned. In the above example, - `most_recent` will cause this to succeed by selecting the newest image. - - - `filters` (map of strings) - filters used to select a `source_ami`. - NOTE: This will fail unless *exactly* one AMI is returned. Any filter - described in the docs for - [DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) - is valid. - - - `owners` (array of strings) - Filters the images by their owner. You - may specify one or more AWS account IDs, "self" (which will use the - account whose credentials you are using to run Packer), or an AWS owner - alias: for example, "amazon", "aws-marketplace", or "microsoft". This - option is required for security reasons. - - - `most_recent` (boolean) - Selects the newest created image when true. - This is most useful for selecting a daily distro build. - - You may set this in place of `source_ami` or in conjunction with it. If you - set this in conjunction with `source_ami`, the `source_ami` will be added - to the filter. The provided `source_ami` must meet all of the filtering - criteria provided in `source_ami_filter`; this pins the AMI returned by the - filter, but will cause Packer to fail if the `source_ami` does not exist. - -- `root_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes that are *launched*. This is - a [template engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `root_volume_tag` ([]{key string, value string}) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a - singular block containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `root_volume_encrypt_boot` (boolean) - Whether or not to encrypt the volumes that are *launched*. By default, Packer will keep - the encryption setting to what it was in the source image when set to `false`. Setting true will - always result in an encrypted one. - -- `root_volume_kms_key_id` (string) - ID, alias or ARN of the KMS key to use for *launched* volumes encryption. - - Set this value if you select `root_volume_encrypt_boot`, but don't want to use the - region's default KMS key. - - If you have a custom kms key you'd like to apply to the launch volume, - and are only building in one region, it is more efficient to set this - and `root_volume_encrypt_boot` to `true` and not use `encrypt_boot` and `kms_key_id`. This saves - potentially many minutes at the end of the build by preventing Packer - from having to copy and re-encrypt the image at the end of the build. - - For valid formats see *KmsKeyId* in the [AWS API docs - - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). - This field is validated by Packer, when using an alias, you will have to - prefix `kms_key_id` with `alias/`. - -- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options - are "x86_64" or "arm64". Defaults to "x86_64". diff --git a/website/content/partials/builder/amazon/chroot/Config-required.mdx b/website/content/partials/builder/amazon/chroot/Config-required.mdx deleted file mode 100644 index b0827d61f..000000000 --- a/website/content/partials/builder/amazon/chroot/Config-required.mdx +++ /dev/null @@ -1,6 +0,0 @@ - - -- `source_ami` (string) - The source AMI whose root volume will be copied and provisioned on the - currently running instance. This must be an EBS-backed AMI with a root - volume snapshot that you have access to. Note: this is not used when - from_scratch is set to true. diff --git a/website/content/partials/builder/amazon/chroot/Config.mdx b/website/content/partials/builder/amazon/chroot/Config.mdx deleted file mode 100644 index 7de2e8261..000000000 --- a/website/content/partials/builder/amazon/chroot/Config.mdx +++ /dev/null @@ -1,4 +0,0 @@ - - -Config is the configuration that is chained through the steps and settable -from the template. diff --git a/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx b/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx deleted file mode 100644 index c07f415c9..000000000 --- a/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx +++ /dev/null @@ -1,118 +0,0 @@ - - -- `ami_description` (string) - The description to set for the resulting - AMI(s). By default this description is empty. This is a - [template engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `ami_virtualization_type` (string) - The type of virtualization for the AMI - you are building. This option is required to register HVM images. Can be - paravirtual (default) or hvm. - -- `ami_users` ([]string) - A list of account IDs that have access to - launch the resulting AMI(s). By default no additional users other than the - user creating the AMI has permissions to launch it. - -- `ami_groups` ([]string) - A list of groups that have access to - launch the resulting AMI(s). By default no groups have permission to launch - the AMI. all will make the AMI publicly accessible. - -- `ami_product_codes` ([]string) - A list of product codes to - associate with the AMI. By default no product codes are associated with the - AMI. - -- `ami_regions` ([]string) - A list of regions to copy the AMI to. - Tags and attributes are copied along with the AMI. AMI copying takes time - depending on the size of the AMI, but will generally take many minutes. - -- `skip_region_validation` (bool) - Set to true if you want to skip - validation of the ami_regions configuration option. Default false. - -- `tags` (map[string]string) - Key/value pair tags applied to the AMI. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block - containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on - HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your - AWS IAM policy. - - Note: you must make sure enhanced networking is enabled on your - instance. See [Amazon's documentation on enabling enhanced - networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). - -- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on - HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your - AWS IAM policy. Note: you must make sure enhanced networking is enabled - on your instance. See [Amazon's documentation on enabling enhanced - networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). - Default `false`. - -- `force_deregister` (bool) - Force Packer to first deregister an existing - AMI if one with the same name already exists. Default false. - -- `force_delete_snapshot` (bool) - Force Packer to delete snapshots - associated with AMIs, which have been deregistered by force_deregister. - Default false. - -- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when - copying a provisioned instance to an AMI. By default, Packer will keep - the encryption setting to what it was in the source image. Setting false - will result in an unencrypted image, and true will result in an encrypted - one. - - If you have used the `launch_block_device_mappings` to set an encryption - key and that key is the same as the one you want the image encrypted with - at the end, then you don't need to set this field; leaving it empty will - prevent an unnecessary extra copy step and save you some time. - - Please note that if you are using an account with the global "Always - encrypt new EBS volumes" option set to `true`, Packer will be unable to - override this setting, and the final image will be encryoted whether - you set this value or not. - -- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This - only applies to the main `region` -- any regions the AMI gets copied to - copied will be encrypted by the default EBS KMS key for that region, - unless you set region-specific keys in AMIRegionKMSKeyIDs. - - Set this value if you select `encrypt_boot`, but don't want to use the - region's default KMS key. - - If you have a custom kms key you'd like to apply to the launch volume, - and are only building in one region, it is more efficient to leave this - and `encrypt_boot` empty and to instead set the key id in the - launch_block_device_mappings (you can find an example below). This saves - potentially many minutes at the end of the build by preventing Packer - from having to copy and re-encrypt the image at the end of the build. - - For valid formats see *KmsKeyId* in the [AWS API docs - - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). - This field is validated by Packer, when using an alias, you will have to - prefix `kms_key_id` with `alias/`. - -- `region_kms_key_ids` (map[string]string) - regions to copy the ami to, along with the custom kms key id (alias or - arn) to use for encryption for that region. Keys must match the regions - provided in `ami_regions`. If you just want to encrypt using a default - ID, you can stick with `kms_key_id` and `ami_regions`. If you want a - region to be encrypted with that region's default key ID, you can use an - empty string `""` instead of a key id in this map. (e.g. `"us-east-1": - ""`) However, you cannot use default key IDs if you are using this in - conjunction with `snapshot_users` -- in that situation you must use - custom keys. For valid formats see *KmsKeyId* in the [AWS API docs - - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). - - This option supercedes the `kms_key_id` option -- if you set both, and - they are different, Packer will respect the value in - `region_kms_key_ids` for your build region and silently disregard the - value provided in `kms_key_id`. - -- `skip_save_build_region` (bool) - If true, Packer will not check whether an AMI with the `ami_name` exists - in the region it is building in. It will use an intermediary AMI name, - which it will not convert to an AMI in the build region. It will copy - the intermediary AMI into any regions provided in `ami_regions`, then - delete the intermediary AMI. Default `false`. diff --git a/website/content/partials/builder/amazon/common/AMIConfig-required.mdx b/website/content/partials/builder/amazon/common/AMIConfig-required.mdx deleted file mode 100644 index b6c179c18..000000000 --- a/website/content/partials/builder/amazon/common/AMIConfig-required.mdx +++ /dev/null @@ -1,6 +0,0 @@ - - -- `ami_name` (string) - The name of the resulting AMI that will appear when managing AMIs in the - AWS console or via APIs. This must be unique. To help make this unique, - use a function like timestamp (see [template - engine](/docs/templates/legacy_json_templates/engine) for more info). diff --git a/website/content/partials/builder/amazon/common/AMIConfig.mdx b/website/content/partials/builder/amazon/common/AMIConfig.mdx deleted file mode 100644 index 0f65733bb..000000000 --- a/website/content/partials/builder/amazon/common/AMIConfig.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - -AMIConfig is for common configuration related to creating AMIs. diff --git a/website/content/partials/builder/amazon/common/AWSPollingConfig-not-required.mdx b/website/content/partials/builder/amazon/common/AWSPollingConfig-not-required.mdx deleted file mode 100644 index 1462788e2..000000000 --- a/website/content/partials/builder/amazon/common/AWSPollingConfig-not-required.mdx +++ /dev/null @@ -1,11 +0,0 @@ - - -- `max_attempts` (int) - Specifies the maximum number of attempts the waiter will check for resource state. - This value can also be set via the AWS_MAX_ATTEMPTS. - If both option and environment variable are set, the max_attempts will be considered over the AWS_MAX_ATTEMPTS. - If none is set, defaults to AWS waiter default which is 40 max_attempts. - -- `delay_seconds` (int) - Specifies the delay in seconds between attempts to check the resource state. - This value can also be set via the AWS_POLL_DELAY_SECONDS. - If both option and environment variable are set, the delay_seconds will be considered over the AWS_POLL_DELAY_SECONDS. - If none is set, defaults to AWS waiter default which is 15 seconds. diff --git a/website/content/partials/builder/amazon/common/AWSPollingConfig.mdx b/website/content/partials/builder/amazon/common/AWSPollingConfig.mdx deleted file mode 100644 index e56f6ea93..000000000 --- a/website/content/partials/builder/amazon/common/AWSPollingConfig.mdx +++ /dev/null @@ -1,20 +0,0 @@ - - -Polling configuration for the AWS waiter. Configures the waiter for resources creation or actions like attaching -volumes or importing image. - -HCL2 example: -```hcl -aws_polling { - delay_seconds = 30 - max_attempts = 50 -} -``` - -JSON example: -```json -"aws_polling" : { - "delay_seconds": 30, - "max_attempts": 50 -} -``` diff --git a/website/content/partials/builder/amazon/common/AccessConfig-not-required.mdx b/website/content/partials/builder/amazon/common/AccessConfig-not-required.mdx deleted file mode 100644 index f002ac703..000000000 --- a/website/content/partials/builder/amazon/common/AccessConfig-not-required.mdx +++ /dev/null @@ -1,92 +0,0 @@ - - -- `assume_role` (AssumeRoleConfig) - If provided with a role ARN, Packer will attempt to assume this role - using the supplied credentials. See - [AssumeRoleConfig](#assume-role-configuration) below for more - details on all of the options available, and for a usage example. - -- `custom_endpoint_ec2` (string) - This option is useful if you use a cloud - provider whose API is compatible with aws EC2. Specify another endpoint - like this https://ec2.custom.endpoint.com. - -- `shared_credentials_file` (string) - Path to a credentials file to load credentials from - -- `decode_authorization_messages` (bool) - Enable automatic decoding of any encoded authorization (error) messages - using the `sts:DecodeAuthorizationMessage` API. Note: requires that the - effective user/role have permissions to `sts:DecodeAuthorizationMessage` - on resource `*`. Default `false`. - -- `insecure_skip_tls_verify` (bool) - This allows skipping TLS - verification of the AWS EC2 endpoint. The default is false. - -- `max_retries` (int) - This is the maximum number of times an API call is retried, in the case - where requests are being throttled or experiencing transient failures. - The delay between the subsequent API calls increases exponentially. - -- `mfa_code` (string) - The MFA - [TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm) - code. This should probably be a user variable since it changes all the - time. - -- `profile` (string) - The profile to use in the shared credentials file for - AWS. See Amazon's documentation on [specifying - profiles](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-profiles) - for more details. - -- `skip_metadata_api_check` (bool) - Skip Metadata Api Check - -- `skip_credential_validation` (bool) - Set to true if you want to skip validating AWS credentials before runtime. - -- `token` (string) - The access token to use. This is different from the - access key and secret key. If you're not sure what this is, then you - probably don't need it. This will also be read from the AWS_SESSION_TOKEN - environmental variable. - -- `vault_aws_engine` (VaultAWSEngineOptions) - Get credentials from HashiCorp Vault's aws secrets engine. You must - already have created a role to use. For more information about - generating credentials via the Vault engine, see the [Vault - docs.](https://www.vaultproject.io/api/secret/aws#generate-credentials) - If you set this flag, you must also set the below options: - - `name` (string) - Required. Specifies the name of the role to generate - credentials against. This is part of the request URL. - - `engine_name` (string) - The name of the aws secrets engine. In the - Vault docs, this is normally referred to as "aws", and Packer will - default to "aws" if `engine_name` is not set. - - `role_arn` (string)- The ARN of the role to assume if credential\_type - on the Vault role is assumed\_role. Must match one of the allowed role - ARNs in the Vault role. Optional if the Vault role only allows a single - AWS role ARN; required otherwise. - - `ttl` (string) - Specifies the TTL for the use of the STS token. This - is specified as a string with a duration suffix. Valid only when - credential\_type is assumed\_role or federation\_token. When not - specified, the default\_sts\_ttl set for the role will be used. If that - is also not set, then the default value of 3600s will be used. AWS - places limits on the maximum TTL allowed. See the AWS documentation on - the DurationSeconds parameter for AssumeRole (for assumed\_role - credential types) and GetFederationToken (for federation\_token - credential types) for more details. - - HCL2 example: - - ```hcl - vault_aws_engine { - name = "myrole" - role_arn = "myarn" - ttl = "3600s" - } - ``` - - JSON example: - - ```json - { - "vault_aws_engine": { - "name": "myrole", - "role_arn": "myarn", - "ttl": "3600s" - } - } - ``` - -- `aws_polling` (\*AWSPollingConfig) - [Polling configuration](#polling-configuration) for the AWS waiter. Configures the waiter that checks - resource state. diff --git a/website/content/partials/builder/amazon/common/AccessConfig-required.mdx b/website/content/partials/builder/amazon/common/AccessConfig-required.mdx deleted file mode 100644 index 23fb2db77..000000000 --- a/website/content/partials/builder/amazon/common/AccessConfig-required.mdx +++ /dev/null @@ -1,14 +0,0 @@ - - -- `access_key` (string) - The access key used to communicate with AWS. [Learn how to set this] - (/docs/builders/amazon#specifying-amazon-credentials). On EBS, this - is not required if you are using `use_vault_aws_engine` for - authentication instead. - -- `region` (string) - The name of the region, such as `us-east-1`, in which - to launch the EC2 instance to create the AMI. - When chroot building, this value is guessed from environment. - -- `secret_key` (string) - The secret key used to communicate with AWS. [Learn how to set - this](/docs/builders/amazon#specifying-amazon-credentials). This is not required - if you are using `use_vault_aws_engine` for authentication instead. diff --git a/website/content/partials/builder/amazon/common/AccessConfig.mdx b/website/content/partials/builder/amazon/common/AccessConfig.mdx deleted file mode 100644 index 198f9c266..000000000 --- a/website/content/partials/builder/amazon/common/AccessConfig.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - -AccessConfig is for common configuration related to AWS access diff --git a/website/content/partials/builder/amazon/common/AmiFilterOptions-not-required.mdx b/website/content/partials/builder/amazon/common/AmiFilterOptions-not-required.mdx deleted file mode 100644 index bcd0f9bd2..000000000 --- a/website/content/partials/builder/amazon/common/AmiFilterOptions-not-required.mdx +++ /dev/null @@ -1,14 +0,0 @@ - - -- `filters` (map[string]string) - Filters used to select an AMI. Any filter described in the docs for - [DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) - is valid. - -- `owners` ([]string) - Filters the images by their owner. You - may specify one or more AWS account IDs, "self" (which will use the - account whose credentials you are using to run Packer), or an AWS owner - alias: for example, `amazon`, `aws-marketplace`, or `microsoft`. This - option is required for security reasons. - -- `most_recent` (bool) - Selects the newest created image when true. - This is most useful for selecting a daily distro build. diff --git a/website/content/partials/builder/amazon/common/AssumeRoleConfig-not-required.mdx b/website/content/partials/builder/amazon/common/AssumeRoleConfig-not-required.mdx deleted file mode 100644 index b330b6f09..000000000 --- a/website/content/partials/builder/amazon/common/AssumeRoleConfig-not-required.mdx +++ /dev/null @@ -1,20 +0,0 @@ - - -- `role_arn` (string) - Amazon Resource Name (ARN) of the IAM Role to assume. - -- `duration_seconds` (int) - Number of seconds to restrict the assume role session duration. - -- `external_id` (string) - The external ID to use when assuming the role. If omitted, no external - ID is passed to the AssumeRole call. - -- `policy` (string) - IAM Policy JSON describing further restricting permissions for the IAM - Role being assumed. - -- `policy_arns` ([]string) - Set of Amazon Resource Names (ARNs) of IAM Policies describing further - restricting permissions for the IAM Role being - -- `session_name` (string) - Session name to use when assuming the role. - -- `tags` (map[string]string) - Map of assume role session tags. - -- `transitive_tag_keys` ([]string) - Set of assume role session tag keys to pass to any subsequent sessions. diff --git a/website/content/partials/builder/amazon/common/AssumeRoleConfig.mdx b/website/content/partials/builder/amazon/common/AssumeRoleConfig.mdx deleted file mode 100644 index bacfe40a1..000000000 --- a/website/content/partials/builder/amazon/common/AssumeRoleConfig.mdx +++ /dev/null @@ -1,31 +0,0 @@ - - -AssumeRoleConfig lets users set configuration options for assuming a special -role when executing Packer. - -Usage example: - -HCL config example: - -```HCL -source "amazon-ebs" "example" { - assume_role { - role_arn = "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME" - session_name = "SESSION_NAME" - external_id = "EXTERNAL_ID" - } -} -``` - -JSON config example: - -```json -builder{ - "type": "amazon-ebs", - "assume_role": { - "role_arn" : "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME", - "session_name": "SESSION_NAME", - "external_id" : "EXTERNAL_ID" - } -} -``` diff --git a/website/content/partials/builder/amazon/common/BlockDevice-not-required.mdx b/website/content/partials/builder/amazon/common/BlockDevice-not-required.mdx deleted file mode 100644 index f9f7b5c31..000000000 --- a/website/content/partials/builder/amazon/common/BlockDevice-not-required.mdx +++ /dev/null @@ -1,49 +0,0 @@ - - -- `delete_on_termination` (bool) - Indicates whether the EBS volume is deleted on instance termination. - Default false. NOTE: If this value is not explicitly set to true and - volumes are not cleaned up by an alternative method, additional volumes - will accumulate after every build. - -- `device_name` (string) - The device name exposed to the instance (for example, /dev/sdh or xvdh). - Required for every device in the block device mapping. - -- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. By default, Packer will - keep the encryption setting to what it was in the source image. Setting - false will result in an unencrypted device, and true will result in an - encrypted one. - -- `iops` (\*int64) - The number of I/O operations per second (IOPS) that the volume supports. - See the documentation on - [IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) - for more information - -- `no_device` (bool) - Suppresses the specified device included in the block device mapping of - the AMI. - -- `snapshot_id` (string) - The ID of the snapshot. - -- `throughput` (\*int64) - The throughput for gp3 volumes, only valid for gp3 types - See the documentation on - [Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) - for more information - -- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping - for more information. - -- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2 - for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD, - sc1 for Cold HDD, and standard for Magnetic volumes. - -- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a - snapshot_id. - -- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. - This option exists for launch_block_device_mappings but not - ami_block_device_mappings. The kms key id defined here only applies to - the original build region; if the AMI gets copied to other regions, the - volume in those regions will be encrypted by the default EBS KMS key. - For valid formats see KmsKeyId in the [AWS API docs - - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html) - This field is validated by Packer. When using an alias, you will have to - prefix kms_key_id with alias/. diff --git a/website/content/partials/builder/amazon/common/BlockDevice.mdx b/website/content/partials/builder/amazon/common/BlockDevice.mdx deleted file mode 100644 index 29c68b441..000000000 --- a/website/content/partials/builder/amazon/common/BlockDevice.mdx +++ /dev/null @@ -1,36 +0,0 @@ - - -These will be attached when launching your instance. Your -options here may vary depending on the type of VM you use. - -Example use case: - -The following mapping will tell Packer to encrypt the root volume of the -build instance at launch using a specific non-default kms key: - -HCL2 example: - -```hcl -launch_block_device_mappings { - device_name = "/dev/sda1" - encrypted = true - kms_key_id = "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d" -} -``` - -JSON example: -```json -"launch_block_device_mappings": [ - { - "device_name": "/dev/sda1", - "encrypted": true, - "kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d" - } -] -``` - -Please note that the kms_key_id option in this example exists for -launch_block_device_mappings but not ami_block_device_mappings. - -Documentation for Block Devices Mappings can be found here: -https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html diff --git a/website/content/partials/builder/amazon/common/MetadataOptions-not-required.mdx b/website/content/partials/builder/amazon/common/MetadataOptions-not-required.mdx deleted file mode 100644 index dd1eb033c..000000000 --- a/website/content/partials/builder/amazon/common/MetadataOptions-not-required.mdx +++ /dev/null @@ -1,10 +0,0 @@ - - -- `http_endpoint` (string) - A string to enable or disble the IMDS endpoint for an instance. Defaults to enabled. - Accepts either "enabled" or "disabled" - -- `http_tokens` (string) - A string to either set the use of IMDSv2 for the instance to optional or required. Defaults to "optional". - Accepts either "optional" or "required" - -- `http_put_response_hop_limit` (int64) - A numerical value to set an upper limit for the amount of hops allowed when communicating with IMDS endpoints. - Defaults to 1. diff --git a/website/content/partials/builder/amazon/common/MetadataOptions.mdx b/website/content/partials/builder/amazon/common/MetadataOptions.mdx deleted file mode 100644 index 3cbdc1b6c..000000000 --- a/website/content/partials/builder/amazon/common/MetadataOptions.mdx +++ /dev/null @@ -1,4 +0,0 @@ - - -Configures the metadata options. -See [Configure IMDS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) for details. diff --git a/website/content/partials/builder/amazon/common/PolicyDocument-not-required.mdx b/website/content/partials/builder/amazon/common/PolicyDocument-not-required.mdx deleted file mode 100644 index c54034445..000000000 --- a/website/content/partials/builder/amazon/common/PolicyDocument-not-required.mdx +++ /dev/null @@ -1,5 +0,0 @@ - - -- `Version` (string) - Version - -- `Statement` ([]Statement) - Statement diff --git a/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx b/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx deleted file mode 100644 index 4de67420f..000000000 --- a/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx +++ /dev/null @@ -1,414 +0,0 @@ - - -- `associate_public_ip_address` (bool) - If using a non-default VPC, - public IP addresses are not provided by default. If this is true, your - new instance will get a Public IP. default: false - -- `availability_zone` (string) - Destination availability zone to launch - instance in. Leave this empty to allow Amazon to auto-assign. - -- `block_duration_minutes` (int64) - Requires spot_price to be set. The - required duration for the Spot Instances (also known as Spot blocks). This - value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). You can't - specify an Availability Zone group or a launch group if you specify a - duration. - -- `disable_stop_instance` (bool) - Packer normally stops the build instance after all provisioners have - run. For Windows instances, it is sometimes desirable to [run - Sysprep](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_EBSbacked_WinAMI.html) - which will stop the instance for you. If this is set to `true`, Packer - *will not* stop the instance but will assume that you will send the stop - signal yourself through your final provisioner. You can do this with a - [windows-shell provisioner](/docs/provisioners/windows-shell). Note that - Packer will still wait for the instance to be stopped, and failing to - send the stop signal yourself, when you have set this flag to `true`, - will cause a timeout. - - An example of a valid windows shutdown command in a `windows-shell` - provisioner is : - ```shell-session - ec2config.exe -sysprep - ``` - or - ```sell-session - "%programfiles%\amazon\ec2configservice\"ec2config.exe -sysprep"" - ``` - -> Note: The double quotation marks in the command are not required if - your CMD shell is already in the - `C:\Program Files\Amazon\EC2ConfigService\` directory. - -- `ebs_optimized` (bool) - Mark instance as [EBS - Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html). - Default `false`. - -- `enable_t2_unlimited` (bool) - Enabling T2 Unlimited allows the source instance to burst additional CPU - beyond its available [CPU - Credits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-credits-baseline-concepts.html) - for as long as the demand exists. This is in contrast to the standard - configuration that only allows an instance to consume up to its - available CPU Credits. See the AWS documentation for [T2 - Unlimited](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html) - and the **T2 Unlimited Pricing** section of the [Amazon EC2 On-Demand - Pricing](https://aws.amazon.com/ec2/pricing/on-demand/) document for - more information. By default this option is disabled and Packer will set - up a [T2 - Standard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-std.html) - instance instead. - - To use T2 Unlimited you must use a T2 instance type, e.g. `t2.micro`. - Additionally, T2 Unlimited cannot be used in conjunction with Spot - Instances, e.g. when the `spot_price` option has been configured. - Attempting to do so will cause an error. - - !> **Warning!** Additional costs may be incurred by enabling T2 - Unlimited - even for instances that would usually qualify for the - [AWS Free Tier](https://aws.amazon.com/free/). - -- `iam_instance_profile` (string) - The name of an [IAM instance - profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) - to launch the EC2 instance with. - -- `skip_profile_validation` (bool) - Whether or not to check if the IAM instance profile exists. Defaults to false - -- `temporary_iam_instance_profile_policy_document` (\*PolicyDocument) - Temporary IAM instance profile policy document - If IamInstanceProfile is specified it will be used instead. - - HCL2 example: - ```hcl - temporary_iam_instance_profile_policy_document { - Statement { - Action = ["logs:*"] - Effect = "Allow" - Resource = "*" - } - Version = "2012-10-17" - } - ``` - - JSON example: - ```json - { - "Version": "2012-10-17", - "Statement": [ - { - "Action": [ - "logs:*" - ], - "Effect": "Allow", - "Resource": "*" - } - ] - } - ``` - -- `shutdown_behavior` (string) - Automatically terminate instances on - shutdown in case Packer exits ungracefully. Possible values are stop and - terminate. Defaults to stop. - -- `security_group_filter` (SecurityGroupFilterOptions) - Filters used to populate the `security_group_ids` field. - - HCL2 Example: - - ```hcl - security_group_filter { - filters = { - "tag:Class": "packer" - } - } - ``` - - JSON Example: - ```json - { - "security_group_filter": { - "filters": { - "tag:Class": "packer" - } - } - } - ``` - - This selects the SG's with tag `Class` with the value `packer`. - - - `filters` (map of strings) - filters used to select a - `security_group_ids`. Any filter described in the docs for - [DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html) - is valid. - - `security_group_ids` take precedence over this. - -- `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is that is *launched* - to create the EBS volumes. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable - block containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `security_group_id` (string) - The ID (not the name) of the security - group to assign to the instance. By default this is not set and Packer will - automatically create a new temporary security group to allow SSH access. - Note that if this is specified, you must be sure the security group allows - access to the ssh_port given below. - -- `security_group_ids` ([]string) - A list of security groups as - described above. Note that if this is specified, you must omit the - security_group_id. - -- `source_ami_filter` (AmiFilterOptions) - Filters used to populate the `source_ami` - field. - - HCL2 example: - ```hcl - source "amazon-ebs" "basic-example" { - source_ami_filter { - filters = { - virtualization-type = "hvm" - name = "ubuntu/images/\*ubuntu-xenial-16.04-amd64-server-\*" - root-device-type = "ebs" - } - owners = ["099720109477"] - most_recent = true - } - } - ``` - - JSON Example: - ```json - "builders" [ - { - "type": "amazon-ebs", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "ubuntu/images/\*ubuntu-xenial-16.04-amd64-server-\*", - "root-device-type": "ebs" - }, - "owners": ["099720109477"], - "most_recent": true - } - } - ] - ``` - - This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE: - This will fail unless *exactly* one AMI is returned. In the above example, - `most_recent` will cause this to succeed by selecting the newest image. - - - `filters` (map of strings) - filters used to select a `source_ami`. - NOTE: This will fail unless *exactly* one AMI is returned. Any filter - described in the docs for - [DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) - is valid. - - - `owners` (array of strings) - Filters the images by their owner. You - may specify one or more AWS account IDs, "self" (which will use the - account whose credentials you are using to run Packer), or an AWS owner - alias: for example, `amazon`, `aws-marketplace`, or `microsoft`. This - option is required for security reasons. - - - `most_recent` (boolean) - Selects the newest created image when true. - This is most useful for selecting a daily distro build. - - You may set this in place of `source_ami` or in conjunction with it. If you - set this in conjunction with `source_ami`, the `source_ami` will be added - to the filter. The provided `source_ami` must meet all of the filtering - criteria provided in `source_ami_filter`; this pins the AMI returned by the - filter, but will cause Packer to fail if the `source_ami` does not exist. - -- `spot_instance_types` ([]string) - a list of acceptable instance - types to run your build on. We will request a spot instance using the max - price of spot_price and the allocation strategy of "lowest price". - Your instance will be launched on an instance type of the lowest available - price that you have in your list. This is used in place of instance_type. - You may only set either spot_instance_types or instance_type, not both. - This feature exists to help prevent situations where a Packer build fails - because a particular availability zone does not have capacity for the - specific instance_type requested in instance_type. - -- `spot_price` (string) - With Spot Instances, you pay the Spot price that's in effect for the - time period your instances are running. Spot Instance prices are set by - Amazon EC2 and adjust gradually based on long-term trends in supply and - demand for Spot Instance capacity. - - When this field is set, it represents the maximum hourly price you are - willing to pay for a spot instance. If you do not set this value, it - defaults to a maximum price equal to the on demand price of the - instance. In the situation where the current Amazon-set spot price - exceeds the value set in this field, Packer will not launch an instance - and the build will error. In the situation where the Amazon-set spot - price is less than the value set in this field, Packer will launch and - you will pay the Amazon-set spot price, not this maximum value. - For more information, see the Amazon docs on - [spot pricing](https://aws.amazon.com/ec2/spot/pricing/). - -- `spot_tags` (map[string]string) - Requires spot_price to be set. Key/value pair tags to apply tags to the - spot request that is issued. - -- `spot_tag` ([]{key string, value string}) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block - containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `subnet_filter` (SubnetFilterOptions) - Filters used to populate the `subnet_id` field. - - HCL2 example: - - ```hcl - source "amazon-ebs" "basic-example" { - subnet_filter { - filters = { - "tag:Class": "build" - } - most_free = true - random = false - } - } - ``` - - JSON Example: - ```json - "builders" [ - { - "type": "amazon-ebs", - "subnet_filter": { - "filters": { - "tag:Class": "build" - }, - "most_free": true, - "random": false - } - } - ] - ``` - - This selects the Subnet with tag `Class` with the value `build`, which has - the most free IP addresses. NOTE: This will fail unless *exactly* one - Subnet is returned. By using `most_free` or `random` one will be selected - from those matching the filter. - - - `filters` (map of strings) - filters used to select a `subnet_id`. - NOTE: This will fail unless *exactly* one Subnet is returned. Any - filter described in the docs for - [DescribeSubnets](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html) - is valid. - - - `most_free` (boolean) - The Subnet with the most free IPv4 addresses - will be used if multiple Subnets matches the filter. - - - `random` (boolean) - A random Subnet will be used if multiple Subnets - matches the filter. `most_free` have precendence over this. - - `subnet_id` take precedence over this. - -- `subnet_id` (string) - If using VPC, the ID of the subnet, such as - subnet-12345def, where Packer will launch the EC2 instance. This field is - required if you are using an non-default VPC. - -- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used - when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware. - - The default is "default", meaning shared tenancy. Allowed values are "default", - "dedicated" and "host". - -- `temporary_security_group_source_cidrs` ([]string) - A list of IPv4 CIDR blocks to be authorized access to the instance, when - packer is creating a temporary security group. - - The default is [`0.0.0.0/0`] (i.e., allow any IPv4 source). This is only - used when `security_group_id` or `security_group_ids` is not specified. - -- `user_data` (string) - User data to apply when launching the instance. Note - that you need to be careful about escaping characters due to the templates - being JSON. It is often more convenient to use user_data_file, instead. - Packer will not automatically wait for a user script to finish before - shutting down the instance this must be handled in a provisioner. - -- `user_data_file` (string) - Path to a file that will be used for the user - data when launching the instance. - -- `vpc_filter` (VpcFilterOptions) - Filters used to populate the `vpc_id` field. - - HCL2 example: - ```hcl - source "amazon-ebs" "basic-example" { - vpc_filter { - filters = { - "tag:Class": "build", - "isDefault": "false", - "cidr": "/24" - } - } - } - ``` - - JSON Example: - ```json - "builders" [ - { - "type": "amazon-ebs", - "vpc_filter": { - "filters": { - "tag:Class": "build", - "isDefault": "false", - "cidr": "/24" - } - } - } - ] - ``` - - This selects the VPC with tag `Class` with the value `build`, which is not - the default VPC, and have a IPv4 CIDR block of `/24`. NOTE: This will fail - unless *exactly* one VPC is returned. - - - `filters` (map of strings) - filters used to select a `vpc_id`. NOTE: - This will fail unless *exactly* one VPC is returned. Any filter - described in the docs for - [DescribeVpcs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html) - is valid. - - `vpc_id` take precedence over this. - -- `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID - in order to create a temporary security group within the VPC. Requires - subnet_id to be set. If this field is left blank, Packer will try to get - the VPC ID from the subnet_id. - -- `windows_password_timeout` (duration string | ex: "1h5m2s") - The timeout for waiting for a Windows - password for Windows instances. Defaults to 20 minutes. Example value: - 10m - -- `metadata_options` (MetadataOptions) - [Metadata Settings](#metadata-settings) - -- `ssh_interface` (string) - One of `public_ip`, `private_ip`, `public_dns`, `private_dns` or `session_manager`. - If set, either the public IP address, private IP address, public DNS name - or private DNS name will be used as the host for SSH. The default behaviour - if inside a VPC is to use the public IP address if available, otherwise - the private IP address will be used. If not in a VPC the public DNS name - will be used. Also works for WinRM. - - Where Packer is configured for an outbound proxy but WinRM traffic - should be direct, `ssh_interface` must be set to `private_dns` and - `.compute.internal` included in the `NO_PROXY` environment - variable. - - When using `session_manager` the machine running Packer must have - the AWS Session Manager Plugin installed and within the users' system path. - Connectivity via the `session_manager` interface establishes a secure tunnel - between the local host and the remote host on an available local port to the specified `ssh_port`. - See [Session Manager Connections](#session-manager-connections) for more information. - - Session manager connectivity is currently only implemented for the SSH communicator, not the WinRM communicator. - - Upon termination the secure tunnel will be terminated automatically, if however there is a failure in - terminating the tunnel it will automatically terminate itself after 20 minutes of inactivity. - -- `pause_before_ssm` (duration string | ex: "1h5m2s") - The time to wait before establishing the Session Manager session. - The value of this should be a duration. Examples are - `5s` and `1m30s` which will cause Packer to wait five seconds and one - minute 30 seconds, respectively. If no set, defaults to 10 seconds. - This option is useful when the remote port takes longer to become available. - -- `session_manager_port` (int) - Which port to connect the local end of the session tunnel to. If - left blank, Packer will choose a port for you from available ports. - This option is only used when `ssh_interface` is set `session_manager`. diff --git a/website/content/partials/builder/amazon/common/RunConfig-required.mdx b/website/content/partials/builder/amazon/common/RunConfig-required.mdx deleted file mode 100644 index 9afb50308..000000000 --- a/website/content/partials/builder/amazon/common/RunConfig-required.mdx +++ /dev/null @@ -1,8 +0,0 @@ - - -- `instance_type` (string) - The EC2 instance type to use while building the - AMI, such as t2.small. - -- `source_ami` (string) - The source AMI whose root volume will be copied and - provisioned on the currently running instance. This must be an EBS-backed - AMI with a root volume snapshot that you have access to. diff --git a/website/content/partials/builder/amazon/common/RunConfig.mdx b/website/content/partials/builder/amazon/common/RunConfig.mdx deleted file mode 100644 index ee0844c3d..000000000 --- a/website/content/partials/builder/amazon/common/RunConfig.mdx +++ /dev/null @@ -1,4 +0,0 @@ - - -RunConfig contains configuration for running an instance from a source -AMI and details on how to access that launched image. diff --git a/website/content/partials/builder/amazon/common/SnapshotConfig-not-required.mdx b/website/content/partials/builder/amazon/common/SnapshotConfig-not-required.mdx deleted file mode 100644 index ebfd16e78..000000000 --- a/website/content/partials/builder/amazon/common/SnapshotConfig-not-required.mdx +++ /dev/null @@ -1,21 +0,0 @@ - - -- `snapshot_tags` (map[string]string) - Key/value pair tags to apply to snapshot. They will override AMI tags if - already applied to snapshot. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `snapshot_tag` ([]{key string, value string}) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular - repeatable block containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `snapshot_users` ([]string) - A list of account IDs that have - access to create volumes from the snapshot(s). By default no additional - users other than the user creating the AMI has permissions to create - volumes from the backing snapshot(s). - -- `snapshot_groups` ([]string) - A list of groups that have access to - create volumes from the snapshot(s). By default no groups have permission - to create volumes from the snapshot(s). all will make the snapshot - publicly accessible. diff --git a/website/content/partials/builder/amazon/common/SnapshotConfig.mdx b/website/content/partials/builder/amazon/common/SnapshotConfig.mdx deleted file mode 100644 index 9ed3d99da..000000000 --- a/website/content/partials/builder/amazon/common/SnapshotConfig.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - -SnapshotConfig is for common configuration related to creating AMIs. diff --git a/website/content/partials/builder/amazon/common/StateChangeConf.mdx b/website/content/partials/builder/amazon/common/StateChangeConf.mdx deleted file mode 100644 index 33237d2d4..000000000 --- a/website/content/partials/builder/amazon/common/StateChangeConf.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - -StateChangeConf is the configuration struct used for `WaitForState`. diff --git a/website/content/partials/builder/amazon/common/Statement-not-required.mdx b/website/content/partials/builder/amazon/common/Statement-not-required.mdx deleted file mode 100644 index 9e4fae587..000000000 --- a/website/content/partials/builder/amazon/common/Statement-not-required.mdx +++ /dev/null @@ -1,7 +0,0 @@ - - -- `Effect` (string) - Effect - -- `Action` ([]string) - Action - -- `Resource` ([]string) - Resource diff --git a/website/content/partials/builder/amazon/common/SubnetFilterOptions-not-required.mdx b/website/content/partials/builder/amazon/common/SubnetFilterOptions-not-required.mdx deleted file mode 100644 index 633e31144..000000000 --- a/website/content/partials/builder/amazon/common/SubnetFilterOptions-not-required.mdx +++ /dev/null @@ -1,5 +0,0 @@ - - -- `most_free` (bool) - Most Free - -- `random` (bool) - Random diff --git a/website/content/partials/builder/amazon/common/VaultAWSEngineOptions-not-required.mdx b/website/content/partials/builder/amazon/common/VaultAWSEngineOptions-not-required.mdx deleted file mode 100644 index 50d4fab5f..000000000 --- a/website/content/partials/builder/amazon/common/VaultAWSEngineOptions-not-required.mdx +++ /dev/null @@ -1,17 +0,0 @@ - - -- `name` (string) - Name - -- `role_arn` (string) - Role ARN - -- `ttl` (string) - Specifies the TTL for the use of the STS token. This - is specified as a string with a duration suffix. Valid only when - credential_type is assumed_role or federation_token. When not - specified, the default_sts_ttl set for the role will be used. If that - is also not set, then the default value of 3600s will be used. AWS - places limits on the maximum TTL allowed. See the AWS documentation on - the DurationSeconds parameter for AssumeRole (for assumed_role - credential types) and GetFederationToken (for federation_token - credential types) for more details. - -- `engine_name` (string) - Engine Name diff --git a/website/content/partials/builder/amazon/ebs/Config-not-required.mdx b/website/content/partials/builder/amazon/ebs/Config-not-required.mdx deleted file mode 100644 index 9da194803..000000000 --- a/website/content/partials/builder/amazon/ebs/Config-not-required.mdx +++ /dev/null @@ -1,41 +0,0 @@ - - -- `skip_create_ami` (bool) - If true, Packer will not create the AMI. Useful for setting to `true` - during a build test stage. Default `false`. - -- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached - when booting a new instance from your AMI. To add a block device during - the Packer build see `launch_block_device_mappings` below. Your options - here may vary depending on the type of VM you use. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add - instance store volumes or EBS volumes in addition to the root device - volume, the created AMI will contain block device mapping information - for those volumes. Amazon creates snapshots of the source instance's - root volume and any other EBS volumes described here. When you launch an - instance from this new AMI, the instance automatically launches with - these additional volumes, and will restore them from snapshots taken - from the source instance. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI. - These tags are *not* applied to the resulting AMI unless they're - duplicated in `tags`. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular - block containing a `name` and a `value` field. In HCL2 mode the - [`dynamic_block`](https://packer.io/docs/templates/hcl_templates/expressions.html#dynamic-blocks) - will allow you to create those programatically. - -- `no_ephemeral` (bool) - Relevant only to Windows guests: If you set this flag, we'll add clauses - to the launch_block_device_mappings that make sure ephemeral drives - don't show up in the EC2 console. If you launched from the EC2 console, - you'd get this automatically, but the SDK does not provide this service. - For more information, see - https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html. - Because we don't validate the OS type of your guest, it is up to you to - make sure you don't set this for *nix guests; behavior may be - unpredictable. diff --git a/website/content/partials/builder/amazon/ebssurrogate/BlockDevice-not-required.mdx b/website/content/partials/builder/amazon/ebssurrogate/BlockDevice-not-required.mdx deleted file mode 100644 index b4ea7da55..000000000 --- a/website/content/partials/builder/amazon/ebssurrogate/BlockDevice-not-required.mdx +++ /dev/null @@ -1,7 +0,0 @@ - - -- `omit_from_artifact` (bool) - If true, this block device will not be snapshotted and the created AMI - will not contain block device mapping information for this volume. If - false, the block device will be mapped into the final created AMI. Set - this option to true if you need a block device mounted in the surrogate - AMI but not in the final created AMI. diff --git a/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx b/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx deleted file mode 100644 index 098ebabf7..000000000 --- a/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx +++ /dev/null @@ -1,31 +0,0 @@ - - -- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached - when booting a new instance from your AMI. To add a block device during - the Packer build see `launch_block_device_mappings` below. Your options - here may vary depending on the type of VM you use. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `launch_block_device_mappings` (BlockDevices) - Add one or more block devices before the Packer build starts. If you add - instance store volumes or EBS volumes in addition to the root device - volume, the created AMI will contain block device mapping information - for those volumes. Amazon creates snapshots of the source instance's - root volume and any other EBS volumes described here. When you launch an - instance from this new AMI, the instance automatically launches with - these additional volumes, and will restore them from snapshots taken - from the source instance. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI. - These tags are *not* applied to the resulting AMI unless they're - duplicated in `tags`. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - -- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular - block containing a `name` and a `value` field. In HCL2 mode the - [`dynamic_block`](https://packer.io/docs/templates/hcl_templates/expressions.html#dynamic-blocks) - will allow you to create those programatically. - -- `ami_architecture` (string) - what architecture to use when registering the - final AMI; valid options are "x86_64" or "arm64". Defaults to "x86_64". diff --git a/website/content/partials/builder/amazon/ebssurrogate/Config-required.mdx b/website/content/partials/builder/amazon/ebssurrogate/Config-required.mdx deleted file mode 100644 index e5994df14..000000000 --- a/website/content/partials/builder/amazon/ebssurrogate/Config-required.mdx +++ /dev/null @@ -1,9 +0,0 @@ - - -- `ami_root_device` (RootBlockDevice) - A block device mapping describing the root device of the AMI. This looks - like the mappings in `ami_block_device_mapping`, except with an - additional field: - - - `source_device_name` (string) - The device name of the block device on - the source instance to be used as the root device for the AMI. This - must correspond to a block device in `launch_block_device_mapping`. diff --git a/website/content/partials/builder/amazon/ebssurrogate/RootBlockDevice-not-required.mdx b/website/content/partials/builder/amazon/ebssurrogate/RootBlockDevice-not-required.mdx deleted file mode 100644 index 07bf243ec..000000000 --- a/website/content/partials/builder/amazon/ebssurrogate/RootBlockDevice-not-required.mdx +++ /dev/null @@ -1,26 +0,0 @@ - - -- `source_device_name` (string) - Source Device Name - -- `device_name` (string) - The device name exposed to the instance (for - example, /dev/sdh or xvdh). Required for every device in the block - device mapping. - -- `delete_on_termination` (bool) - Indicates whether the EBS volume is - deleted on instance termination. Default false. NOTE: If this - value is not explicitly set to true and volumes are not cleaned up by - an alternative method, additional volumes will accumulate after every - build. - -- `iops` (int64) - The number of I/O operations per second (IOPS) that - the volume supports. See the documentation on - IOPs - for more information - -- `volume_type` (string) - The volume type. gp2 for General Purpose - (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for - Throughput Optimized HDD, sc1 for Cold HDD, and standard for - Magnetic volumes. - -- `volume_size` (int64) - The size of the volume, in GiB. Required if - not specifying a snapshot_id. diff --git a/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx b/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx deleted file mode 100644 index fbeffd139..000000000 --- a/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx +++ /dev/null @@ -1,12 +0,0 @@ - - -- `tags` (map[string]string) - Key/value pair tags to apply to the volume. These are retained after the builder - completes. This is a [template engine](/docs/templates/legacy_json_templates/engine), see - [Build template data](#build-template-data) for more information. - -- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block - containing a `key` and a `value` field. In HCL2 mode the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. - -- `snapshot_volume` (bool) - Create a Snapshot of this Volume. diff --git a/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx b/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx deleted file mode 100644 index 79c6bccef..000000000 --- a/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx +++ /dev/null @@ -1,43 +0,0 @@ - - -- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on - HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your - AWS IAM policy. Note: you must make sure enhanced networking is enabled - on your instance. See [Amazon's documentation on enabling enhanced - networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). - -- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on - HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your - AWS IAM policy. Note: you must make sure enhanced networking is enabled - on your instance. See [Amazon's documentation on enabling enhanced - networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). - Default `false`. - -- `ebs_volumes` (BlockDevices) - Add the block device mappings to the AMI. If you add instance store - volumes or EBS volumes in addition to the root device volume, the - created AMI will contain block device mapping information for those - volumes. Amazon creates snapshots of the source instance's root volume - and any other EBS volumes described here. When you launch an instance - from this new AMI, the instance automatically launches with these - additional volumes, and will restore them from snapshots taken from the - source instance. See the [BlockDevices](#block-devices-configuration) - documentation for fields. - -- `run_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes of the instance that is - *launched* to create EBS Volumes. These tags will *not* appear in the - tags of the resulting EBS volumes unless they're duplicated under `tags` - in the `ebs_volumes` setting. This is a [template - engine](/docs/templates/legacy_json_templates/engine), see [Build template - data](#build-template-data) for more information. - - Note: The tags specified here will be *temporarily* applied to volumes - specified in `ebs_volumes` - but only while the instance is being - created. Packer will replace all tags on the volume with the tags - configured in the `ebs_volumes` section as soon as the instance is - reported as 'ready'. - -- `run_volume_tag` ([]{key string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular - repeatable block containing a `key` and a `value` field. In HCL2 mode - the - [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks) - will allow you to create those programatically. diff --git a/website/content/partials/builder/amazon/instance/Config-not-required.mdx b/website/content/partials/builder/amazon/instance/Config-not-required.mdx deleted file mode 100644 index 1cc446aea..000000000 --- a/website/content/partials/builder/amazon/instance/Config-not-required.mdx +++ /dev/null @@ -1,38 +0,0 @@ - - -- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached - when booting a new instance from your AMI. To add a block device during - the Packer build see `launch_block_device_mappings` below. Your options - here may vary depending on the type of VM you use. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add - instance store volumes or EBS volumes in addition to the root device - volume, the created AMI will contain block device mapping information - for those volumes. Amazon creates snapshots of the source instance's - root volume and any other EBS volumes described here. When you launch an - instance from this new AMI, the instance automatically launches with - these additional volumes, and will restore them from snapshots taken - from the source instance. See the - [BlockDevices](#block-devices-configuration) documentation for fields. - -- `bundle_destination` (string) - The directory on the running instance where the bundled AMI will be - saved prior to uploading. By default this is /tmp. This directory must - exist and be writable. - -- `bundle_prefix` (string) - The prefix for files created from bundling the root volume. By default - this is `image-{{timestamp}}`. The timestamp variable should be used to - make sure this is unique, otherwise it can collide with other created - AMIs by Packer in your account. - -- `bundle_upload_command` (string) - The command to use to upload the bundled volume. See the "custom bundle - commands" section below for more information. - -- `bundle_vol_command` (string) - The command to use to bundle the volume. See the "custom bundle - commands" section below for more information. - -- `x509_upload_path` (string) - The path on the remote machine where the X509 certificate will be - uploaded. This path must already exist and be writable. X509 - certificates are uploaded after provisioning is run, so it is perfectly - okay to create this directory as part of the provisioning process. - Defaults to /tmp. diff --git a/website/content/partials/builder/amazon/instance/Config-required.mdx b/website/content/partials/builder/amazon/instance/Config-required.mdx deleted file mode 100644 index f328d4ff9..000000000 --- a/website/content/partials/builder/amazon/instance/Config-required.mdx +++ /dev/null @@ -1,15 +0,0 @@ - - -- `account_id` (string) - Your AWS account ID. This is required for bundling the AMI. This is not - the same as the access key. You can find your account ID in the security - credentials page of your AWS account. - -- `s3_bucket` (string) - The name of the S3 bucket to upload the AMI. This bucket will be created - if it doesn't exist. - -- `x509_cert_path` (string) - The local path to a valid X509 certificate for your AWS account. This is - used for bundling the AMI. This X509 certificate must be registered with - your account from the security credentials page in the AWS console. - -- `x509_key_path` (string) - The local path to the private key for the X509 certificate specified by - x509_cert_path. This is used for bundling the AMI. diff --git a/website/content/partials/builder/amazon/instance/Config.mdx b/website/content/partials/builder/amazon/instance/Config.mdx deleted file mode 100644 index 384ca642d..000000000 --- a/website/content/partials/builder/amazon/instance/Config.mdx +++ /dev/null @@ -1,4 +0,0 @@ - - -Config is the configuration that is chained through the steps and settable -from the template. diff --git a/website/content/partials/builders/aws-common-block-device-a-i.mdx b/website/content/partials/builders/aws-common-block-device-a-i.mdx deleted file mode 100644 index c035b5128..000000000 --- a/website/content/partials/builders/aws-common-block-device-a-i.mdx +++ /dev/null @@ -1,19 +0,0 @@ -- `delete_on_termination` (boolean) - Indicates whether the EBS volume is - deleted on instance termination. Default `false`. **NOTE**: If this - value is not explicitly set to `true` and volumes are not cleaned up by - an alternative method, additional volumes will accumulate after every - build. - -- `device_name` (string) - The device name exposed to the instance (for - example, `/dev/sdh` or `xvdh`). Required for every device in the block - device mapping. - -- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. - By default, Packer will keep the encryption setting to what it was in - the source image. Setting `false` will result in an unencrypted device, - and `true` will result in an encrypted one. - -- `iops` (number) - The number of I/O operations per second (IOPS) that - the volume supports. See the documentation on - [IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) - for more information diff --git a/website/content/partials/builders/aws-common-block-device-i-v.mdx b/website/content/partials/builders/aws-common-block-device-i-v.mdx deleted file mode 100644 index e596136cd..000000000 --- a/website/content/partials/builders/aws-common-block-device-i-v.mdx +++ /dev/null @@ -1,17 +0,0 @@ -- `no_device` (boolean) - Suppresses the specified device included in the - block device mapping of the AMI. - -- `snapshot_id` (string) - The ID of the snapshot. - -- `virtual_name` (string) - The virtual device name. See the - documentation on [Block Device - Mapping](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html) - for more information. - -- `volume_size` (number) - The size of the volume, in GiB. Required if - not specifying a `snapshot_id`. - -- `volume_type` (string) - The volume type. `gp2` for General Purpose - (SSD) volumes, `io1` for Provisioned IOPS (SSD) volumes, `st1` for - Throughput Optimized HDD, `sc1` for Cold HDD, and `standard` for - Magnetic volumes. diff --git a/website/content/partials/builders/aws-common-opional-fields.mdx b/website/content/partials/builders/aws-common-opional-fields.mdx deleted file mode 100644 index 3f32d1ba7..000000000 --- a/website/content/partials/builders/aws-common-opional-fields.mdx +++ /dev/null @@ -1,7 +0,0 @@ -- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot - volume encryption. This only applies to the main `region`, other regions - where the AMI will be copied will be encrypted by the default EBS KMS key. - For valid formats see _KmsKeyId_ in the [AWS API docs - - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). - This field is validated by Packer, when using an alias, you will have to - prefix `kms_key_id` with `alias/`. diff --git a/website/content/partials/builders/aws-session-manager.mdx b/website/content/partials/builders/aws-session-manager.mdx deleted file mode 100644 index 4f64b207a..000000000 --- a/website/content/partials/builders/aws-session-manager.mdx +++ /dev/null @@ -1,102 +0,0 @@ -### Session Manager Connections - -Support for the AWS Systems Manager session manager lets users manage EC2 instances without the need to open inbound ports, or maintain bastion hosts. Session manager connectivity relies on the use of the [session manager plugin](#session-manager-plugin) to open a secure tunnel between the local machine and the remote instance. Once the tunnel has been created all SSH communication will be tunneled through SSM to the remote instance. - --> Note: Session manager connectivity is currently only implemented for the SSH communicator, not the WinRM Communicator. - -To use the session manager as the connection interface for the SSH communicator you need to add the following configuration options to the Amazon builder options: - -- `ssh_interface`: The ssh interface must be set to "session_manager". When using this option the builder will create an SSM tunnel to the configured `ssh_port` (defaults to 22) on the remote host. -- `iam_instance_profile`: A valid instance profile granting Systems Manager permissions to manage the remote instance is required in order for the aws ssm-agent to start and stop session connections. - See below for more details on [IAM instance profile for Systems Manager](#iam-instance-profile-for-systems-manager). - -#### Optional - -- `session_manager_port`: A local port on the host machine that should be used as the local end of the session tunnel to the remote host. If not specified Packer will find an available port to use. -- `temporary_iam_instance_profile_policy_document`: Creates a temporary instance profile policy document to grant Systems Manager permissions to the Ec2 instance. This is an alternative to using an existing `iam_instance_profile`. - -HCL2 example: - -```hcl -# file: example.pkr.hcl - -# In order to get these variables to read from the environment, -# set the environment variables to have the same name as the declared -# variables, with the prefix PKR_VAR_. -# You could also hardcode them into the file, but we recommend that. - -data "amazon-ami" "example" { - filters = { - virtualization-type = "hvm" - name = "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*" - root-device-type = "ebs" - } - owners = ["099720109477"] - most_recent = true - region = "us-east-1" -} - -source "amazon-ebs" "ssm-example" { - ami_name = "packer_AWS {{timestamp}}" - instance_type = "t2.micro" - region = "us-east-1" - source_ami = data.amazon-ami.example.id - ssh_username = "ubuntu" - ssh_interface = "session_manager" - communicator = "ssh" - iam_instance_profile = "myinstanceprofile" -} - -build { - sources = ["source.amazon-ebs.ssm-example"] - - provisioner "shell" { - inline = ["echo Connected via SSM at '${build.User}@${build.Host}:${build.Port}'"] - } -} -``` - -JSON example: -```json -{ - "builders": [ - { - "type": "amazon-ebs", - "ami_name": "packer-ami-{{timestamp}}", - "instance_type": "t2.micro", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", - "root-device-type": "ebs" - }, - "owners": ["099720109477"], - "most_recent": true - }, - "ssh_username": "ubuntu", - "ssh_interface": "session_manager", - "communicator": "ssh", - "iam_instance_profile": "{{user `iam_instance_profile`}}" - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "echo Connected via SSM at '{{build `User`}}@{{build `Host`}}:{{build `Port`}}'" - ] - } - ] -} -``` - -#### Session Manager Plugin - -Connectivity via the session manager requires the use of a session-manger-plugin, which needs to be installed alongside Packer, and an instance AMI that is capable of running the AWS ssm-agent - see [About SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/prereqs-ssm-agent.html) for details on supported AMIs. - -In order for Packer to start and end sessions that connect you to your managed instances, you must first install the Session Manager plugin on your local machine. The plugin can be installed on supported versions of Microsoft Windows, macOS, Linux, and Ubuntu Server. -[Installation instructions for the session-manager-plugin](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) - -#### IAM instance profile for Systems Manager - -By default Systems Manager doesn't have permission to perform actions on created instances so SSM access must be granted by creating an instance profile with the `AmazonSSMManagedInstanceCore` policy. The instance profile can then be attached to any instance you wish to manage via the session-manager-plugin. See [Adding System Manager instance profile](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html#instance-profile-add-permissions) for details on creating the required instance profile. diff --git a/website/content/partials/builders/aws-spot-docs.mdx b/website/content/partials/builders/aws-spot-docs.mdx deleted file mode 100644 index 3e0643845..000000000 --- a/website/content/partials/builders/aws-spot-docs.mdx +++ /dev/null @@ -1,32 +0,0 @@ -- `spot_instance_types` (array of strings) - a list of acceptable instance - types to run your build on. We will request a spot instance using the max - price of `spot_price` and the allocation strategy of "lowest price". - Your instance will be launched on an instance type of the lowest available - price that you have in your list. This is used in place of instance_type. - You may only set either spot_instance_types or instance_type, not both. - This feature exists to help prevent situations where a Packer build fails - because a particular availability zone does not have capacity for the - specific instance_type requested in instance_type. - -- `spot_price` (string) - The maximum hourly price to pay for a spot instance - to create the AMI. Spot instances are a type of instance that EC2 starts - when the current spot price is less than the maximum price you specify. - Spot price will be updated based on available spot instance capacity and - current spot instance requests. It may save you some costs. You can set - this to `auto` for Packer to automatically discover the best spot price or - to "0" to use an on demand instance (default). - -- `spot_price_auto_product` (string) - Deprecated. Prior to v1.4.3, was - required if `spot_price` is set to `auto`. - - If you are using Packer v1.4.3 or later, simply remove this from your - template; it is no longer necessary based on recent changes to how Amazon - calculates spot prices. - - Prior to version 1.4.3, This told Packer what sort of AMI you're launching - to find the best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`, - `Windows`, `Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`, - `Windows (Amazon VPC)` - -- `spot_tags` (object of key/value strings) - Requires `spot_price` to be - set. This tells Packer to apply tags to the spot request that is issued. diff --git a/website/content/partials/builders/aws-ssh-differentiation-table.mdx b/website/content/partials/builders/aws-ssh-differentiation-table.mdx deleted file mode 100644 index f3795a597..000000000 --- a/website/content/partials/builders/aws-ssh-differentiation-table.mdx +++ /dev/null @@ -1,11 +0,0 @@ -## Which SSH Options to use: - -This chart breaks down what Packer does if you set any of the below SSH options: - -| ssh_password | ssh_private_key_file | ssh_keypair_name | temporary_key_pair_name | Packer will... | -| ------------ | -------------------- | ---------------- | ----------------------- | ------------------------------------------------------------------------------------------ | -| X | - | - | - | ssh authenticating with username and given password | -| - | X | - | - | ssh authenticating with private key file | -| - | X | X | - | ssh authenticating with given private key file and "attaching" the keypair to the instance | -| - | - | - | X | Create a temporary ssh keypair with a particular name, clean it up | -| - | - | - | - | Create a temporary ssh keypair with a default name, clean it up | diff --git a/website/content/partials/datasource/.gitkeep b/website/content/partials/datasource/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/website/content/partials/datasource/amazon/ami/DatasourceOutput.mdx b/website/content/partials/datasource/amazon/ami/DatasourceOutput.mdx deleted file mode 100644 index 19ada68ff..000000000 --- a/website/content/partials/datasource/amazon/ami/DatasourceOutput.mdx +++ /dev/null @@ -1,13 +0,0 @@ - - -- `id` (string) - The ID of the AMI. - -- `name` (string) - The name of the AMI. - -- `creation_date` (string) - The date of creation of the AMI. - -- `owner` (string) - The AWS account ID of the owner. - -- `owner_name` (string) - The owner alias. - -- `tags` (map[string]string) - The key/value combination of the tags assigned to the AMI. diff --git a/website/content/partials/datasource/amazon/secretsmanager/Config-not-required.mdx b/website/content/partials/datasource/amazon/secretsmanager/Config-not-required.mdx deleted file mode 100644 index b4a94b5cd..000000000 --- a/website/content/partials/datasource/amazon/secretsmanager/Config-not-required.mdx +++ /dev/null @@ -1,10 +0,0 @@ - - -- `key` (string) - Optional key for JSON secrets that contain more than one value. When set, the `value` output will - contain the value for the provided key. - -- `version_id` (string) - Specifies the unique identifier of the version of the secret that you want to retrieve. - Overrides version_stage. - -- `version_stage` (string) - Specifies the secret version that you want to retrieve by the staging label attached to the version. - Defaults to AWSCURRENT. diff --git a/website/content/partials/datasource/amazon/secretsmanager/Config-required.mdx b/website/content/partials/datasource/amazon/secretsmanager/Config-required.mdx deleted file mode 100644 index c63df6888..000000000 --- a/website/content/partials/datasource/amazon/secretsmanager/Config-required.mdx +++ /dev/null @@ -1,4 +0,0 @@ - - -- `name` (string) - Specifies the secret containing the version that you want to retrieve. - You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. diff --git a/website/content/partials/datasource/amazon/secretsmanager/DatasourceOutput.mdx b/website/content/partials/datasource/amazon/secretsmanager/DatasourceOutput.mdx deleted file mode 100644 index 6c34f99a9..000000000 --- a/website/content/partials/datasource/amazon/secretsmanager/DatasourceOutput.mdx +++ /dev/null @@ -1,12 +0,0 @@ - - -- `value` (string) - When a [key](#key) is provided, this will be the value for that key. If a key is not provided, - `value` will contain the first value found in the secret string. - -- `secret_string` (string) - The decrypted part of the protected secret information that - was originally provided as a string. - -- `secret_binary` (string) - The decrypted part of the protected secret information that - was originally provided as a binary. Base64 encoded. - -- `version_id` (string) - The unique identifier of this version of the secret. diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json index ada4ff3c0..7bd22da62 100644 --- a/website/data/docs-nav-data.json +++ b/website/data/docs-nav-data.json @@ -675,35 +675,6 @@ "title": "Alicloud ECS", "path": "builders/alicloud-ecs" }, - { - "title": "Amazon EC2", - "routes": [ - { - "title": "Overview", - "path": "builders/amazon" - }, - { - "title": "chroot", - "path": "builders/amazon/chroot" - }, - { - "title": "EBS", - "path": "builders/amazon/ebs" - }, - { - "title": "EBS Surrogate", - "path": "builders/amazon/ebssurrogate" - }, - { - "title": "EBS Volume", - "path": "builders/amazon/ebsvolume" - }, - { - "title": "Instance", - "path": "builders/amazon/instance" - } - ] - }, { "title": "Azure", "routes": [ @@ -964,23 +935,6 @@ { "title": "Overview", "path": "datasources" - }, - { - "title": "Amazon", - "routes": [ - { - "title": "Overview", - "path": "datasources/amazon" - }, - { - "title": "Amazon AMI", - "path": "datasources/amazon/ami" - }, - { - "title": "Secrets Manager", - "path": "datasources/amazon/secretsmanager" - } - ] } ] }, @@ -1076,10 +1030,6 @@ "title": "Alicloud Import", "path": "post-processors/alicloud-import" }, - { - "title": "Amazon Import", - "path": "post-processors/amazon-import" - }, { "title": "Artifice", "path": "post-processors/artifice" diff --git a/website/data/docs-navigation.js b/website/data/docs-navigation.js deleted file mode 100644 index 118101f7c..000000000 --- a/website/data/docs-navigation.js +++ /dev/null @@ -1,336 +0,0 @@ -// The root folder for this documentation category is `pages/docs` -// -// - A string refers to the name of a file -// - A "category" value refers to the name of a directory -// - All directories must have an "index.mdx" file to serve as -// the landing page for the category - -export default [ - '--------', - 'terminology', - { - category: 'commands', - content: ['init', 'build', 'console', 'fix', 'fmt', 'inspect', 'validate', 'hcl2_upgrade'], - }, - { - category: 'templates', - content: [ - { - category: 'hcl_templates', - content: [ - { - category: 'blocks', - content: [ - { - category: 'build', - content: [ - 'source', - 'provisioner', - 'post-processor', - 'post-processors', - ], - }, - 'locals', - 'source', - 'variable', - 'packer', - 'data' - ], - }, - { - category: 'functions', - content: [ - { - category: 'contextual', - content: [ - 'aws_secretsmanager', - 'consul', - 'env', - 'vault', - ], - }, - { - category: 'numeric', - content: [ - 'abs', - 'ceil', - 'floor', - 'log', - 'max', - 'min', - 'parseint', - 'pow', - 'signum', - ], - }, - { - category: 'string', - content: [ - 'chomp', - 'format', - 'formatlist', - 'indent', - 'join', - 'lower', - 'replace', - 'regex_replace', - 'regex', - 'regexall', - 'split', - 'strrev', - 'substr', - 'title', - 'trim', - 'trimprefix', - 'trimsuffix', - 'trimspace', - 'upper', - ], - }, - { - category: 'collection', - content: [ - 'chunklist', - 'coalesce', - 'coalescelist', - 'compact', - 'concat', - 'contains', - 'distinct', - 'element', - 'flatten', - 'keys', - 'length', - 'lookup', - 'merge', - 'range', - 'reverse', - 'setintersection', - 'setproduct', - 'setunion', - 'slice', - 'sort', - 'values', - 'zipmap', - ], - }, - { - category: 'encoding', - content: [ - 'base64decode', - 'base64encode', - 'csvdecode', - 'jsondecode', - 'jsonencode', - 'urlencode', - 'yamldecode', - 'yamlencode', - ], - }, - { - category: 'file', - content: [ - 'abspath', - 'basename', - 'dirname', - 'file', - 'fileexists', - 'fileset', - 'pathexpand', - 'templatefile', - ], - }, - { - category: 'datetime', - content: ['formatdate', 'timeadd', 'timestamp'], - }, - { - category: 'crypto', - content: [ - 'bcrypt', - 'md5', - 'rsadecrypt', - 'sha1', - 'sha256', - 'sha512', - ], - }, - { - category: 'uuid', - content: ['uuidv4', 'uuidv5'], - }, - { - category: 'ipnet', - content: ['cidrhost', 'cidrnetmask', 'cidrsubnet'], - }, - { - category: 'conversion', - content: ['can', 'convert', 'try'], - }, - ], - }, - 'variables', - 'locals', - 'contextual-variables', - 'datasources', - 'path-variables', - 'syntax', - 'onlyexcept', - 'expressions', - 'syntax-json', - ], - }, - { - category: "legacy_json_templates", - content: [ - 'builders', - 'communicator', - 'engine', - 'post-processors', - 'provisioners', - 'user-variables', - ] - }, - ], - }, - '----------', - {category: 'communicators', content: ['ssh', 'winrm']}, - { - category: 'builders', - content: [ - 'alicloud-ecs', - { - category: 'amazon', - content: ['chroot', 'ebs', 'ebssurrogate', 'ebsvolume', 'instance'], - }, - { - category: 'azure', - content: ['arm', 'chroot'], - }, - 'cloudstack', - 'digitalocean', - 'docker', - 'file', - 'googlecompute', - 'hetzner-cloud', - 'hyperone', - {category: 'hyperv', content: ['iso', 'vmcx']}, - 'linode', - 'lxc', - 'lxd', - 'ncloud', - 'null', - 'oneandone', - 'openstack', - {category: 'oracle', content: ['classic', 'oci']}, - { - category: 'outscale', - content: ['chroot', 'bsu', 'bsusurrogate', 'bsuvolume'], - }, - {category: 'parallels', content: ['iso', 'pvm']}, - 'profitbricks', - {category: 'proxmox', content: ['iso', 'clone']}, - 'qemu', - 'scaleway', - 'tencentcloud-cvm', - 'jdcloud', - 'triton', - 'ucloud-uhost', - 'vagrant', - { - category: 'virtualbox', - content: ['iso', 'ovf', 'vm'], - }, - { - category: 'vmware', - content: ['iso', 'vmx', 'vsphere-iso', 'vsphere-clone'], - }, - 'yandex', - 'custom', - 'community-supported', - ], - }, - { - category: 'datasources', - content: [ - { - category: 'amazon', - content: [ - 'ami', - 'secretsmanager' - ], - }, - ] - }, - { - category: 'provisioners', - content: [ - 'ansible-local', - 'ansible', - 'breakpoint', - 'chef-client', - 'chef-solo', - 'converge', - 'file', - 'inspec', - 'powershell', - 'puppet-masterless', - 'puppet-server', - 'salt-masterless', - 'shell', - 'shell-local', - 'windows-shell', - 'windows-restart', - 'custom', - 'community-supported', - ], - }, - { - category: 'post-processors', - content: [ - 'alicloud-import', - 'amazon-import', - 'artifice', - 'compress', - 'checksum', - 'digitalocean-import', - 'docker-import', - 'docker-push', - 'docker-save', - 'docker-tag', - 'googlecompute-export', - 'googlecompute-import', - 'manifest', - 'shell-local', - 'ucloud-import', - 'vagrant', - 'vagrant-cloud', - 'vsphere', - 'vsphere-template', - 'yandex-export', - 'yandex-import', - 'community-supported', - ], - }, - '----------', - 'install', - 'configure', - '----------', - { - category: 'plugins', - content: [ - { - category: 'creation', - content: [ - 'custom-builders', - 'custom-post-processors', - 'custom-provisioners', - 'custom-datasources', - ], - }, - ], - }, - - '---------', - 'debugging', -] diff --git a/website/data/docs-remote-plugins.json b/website/data/docs-remote-plugins.json index b3199e499..7c6ae6de3 100644 --- a/website/data/docs-remote-plugins.json +++ b/website/data/docs-remote-plugins.json @@ -4,5 +4,11 @@ "path": "docker", "repo": "hashicorp/packer-plugin-docker", "version": "latest" + }, + { + "title": "Amazon EC2", + "path": "amazon", + "repo": "hashicorp/packer-plugin-amazon", + "version": "latest" } ]