├── .editorconfig ├── .gitignore ├── builder.nix ├── default.nix ├── docs ├── index.md └── resources │ └── instance.md ├── example └── vultr │ ├── .gitignore │ ├── authorized_key │ ├── image.nix │ ├── main.nix │ ├── main.tf │ ├── makefile │ └── secrets │ └── key ├── go.mod ├── go.sum ├── license ├── main.go ├── makefile ├── nix-cage.json ├── provider ├── command.go ├── enclave.go ├── instance.go ├── log.go ├── marshaling.go ├── net.go ├── nix.go ├── nix_conf_wrapper.go ├── nix_conf_wrapper.nix ├── os.go ├── provider.go ├── resource.go ├── schema.go ├── schema_defaults.go ├── schema_test.go ├── secrets.go ├── ssh.go └── tar.go ├── readme.md ├── release.nix ├── shell.nix ├── test ├── .gitignore ├── main.tf ├── secrets │ ├── key1 │ └── subdir │ │ └── key2 └── test.nix └── vendor ├── github.com ├── agext │ └── levenshtein │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── DCO │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── NOTICE │ │ ├── README.md │ │ ├── levenshtein.go │ │ ├── params.go │ │ └── test.sh ├── apparentlymart │ └── go-textseg │ │ └── v13 │ │ ├── LICENSE │ │ └── textseg │ │ ├── all_tokens.go │ │ ├── emoji_table.rl │ │ ├── generate.go │ │ ├── grapheme_clusters.go │ │ ├── grapheme_clusters.rl │ │ ├── grapheme_clusters_table.rl │ │ ├── tables.go │ │ ├── unicode2ragel.rb │ │ └── utf8_seqs.go ├── awnumar │ ├── memcall │ │ ├── .cirrus.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── memcall.go │ │ ├── memcall_freebsd.go │ │ ├── memcall_openbsd.go │ │ ├── memcall_osx.go │ │ ├── memcall_unix.go │ │ └── memcall_windows.go │ └── memguard │ │ ├── .cirrus.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── buffer.go │ │ ├── core │ │ ├── auxiliary.go │ │ ├── buffer.go │ │ ├── coffer.go │ │ ├── crypto.go │ │ ├── enclave.go │ │ ├── exit.go │ │ └── init.go │ │ ├── docs.go │ │ ├── enclave.go │ │ ├── logo.svg │ │ ├── memguard.go │ │ ├── signals.go │ │ └── stream.go ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go ├── fatih │ └── color │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── color.go │ │ └── doc.go ├── golang │ └── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── proto │ │ ├── buffer.go │ │ ├── defaults.go │ │ ├── deprecated.go │ │ ├── discard.go │ │ ├── extensions.go │ │ ├── properties.go │ │ ├── proto.go │ │ ├── registry.go │ │ ├── text_decode.go │ │ ├── text_encode.go │ │ ├── wire.go │ │ └── wrappers.go │ │ └── ptypes │ │ ├── any.go │ │ ├── any │ │ └── any.pb.go │ │ ├── doc.go │ │ ├── duration.go │ │ ├── duration │ │ └── duration.pb.go │ │ ├── empty │ │ └── empty.pb.go │ │ ├── timestamp.go │ │ └── timestamp │ │ └── timestamp.pb.go ├── google │ └── go-cmp │ │ ├── LICENSE │ │ └── cmp │ │ ├── compare.go │ │ ├── export_panic.go │ │ ├── export_unsafe.go │ │ ├── internal │ │ ├── diff │ │ │ ├── debug_disable.go │ │ │ ├── debug_enable.go │ │ │ └── diff.go │ │ ├── flags │ │ │ └── flags.go │ │ ├── function │ │ │ └── func.go │ │ └── value │ │ │ ├── name.go │ │ │ ├── pointer_purego.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── sort.go │ │ │ └── zero.go │ │ ├── options.go │ │ ├── path.go │ │ ├── report.go │ │ ├── report_compare.go │ │ ├── report_references.go │ │ ├── report_reflect.go │ │ ├── report_slices.go │ │ ├── report_text.go │ │ └── report_value.go ├── hashicorp │ ├── errwrap │ │ ├── LICENSE │ │ ├── README.md │ │ └── errwrap.go │ ├── go-checkpoint │ │ ├── LICENSE │ │ ├── README.md │ │ ├── check.go │ │ ├── telemetry.go │ │ └── versions.go │ ├── go-cleanhttp │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cleanhttp.go │ │ ├── doc.go │ │ └── handlers.go │ ├── go-cty │ │ ├── LICENSE │ │ └── cty │ │ │ ├── capsule.go │ │ │ ├── capsule_ops.go │ │ │ ├── collection.go │ │ │ ├── convert │ │ │ ├── compare_types.go │ │ │ ├── conversion.go │ │ │ ├── conversion_capsule.go │ │ │ ├── conversion_collection.go │ │ │ ├── conversion_dynamic.go │ │ │ ├── conversion_object.go │ │ │ ├── conversion_primitive.go │ │ │ ├── conversion_tuple.go │ │ │ ├── doc.go │ │ │ ├── mismatch_msg.go │ │ │ ├── public.go │ │ │ ├── sort_types.go │ │ │ └── unify.go │ │ │ ├── doc.go │ │ │ ├── element_iterator.go │ │ │ ├── error.go │ │ │ ├── gob.go │ │ │ ├── gocty │ │ │ ├── doc.go │ │ │ ├── helpers.go │ │ │ ├── in.go │ │ │ ├── out.go │ │ │ └── type_implied.go │ │ │ ├── helper.go │ │ │ ├── json.go │ │ │ ├── json │ │ │ ├── doc.go │ │ │ ├── marshal.go │ │ │ ├── simple.go │ │ │ ├── type.go │ │ │ ├── type_implied.go │ │ │ ├── unmarshal.go │ │ │ └── value.go │ │ │ ├── list_type.go │ │ │ ├── map_type.go │ │ │ ├── marks.go │ │ │ ├── msgpack │ │ │ ├── doc.go │ │ │ ├── dynamic.go │ │ │ ├── infinity.go │ │ │ ├── marshal.go │ │ │ ├── type_implied.go │ │ │ ├── unknown.go │ │ │ └── unmarshal.go │ │ │ ├── null.go │ │ │ ├── object_type.go │ │ │ ├── path.go │ │ │ ├── path_set.go │ │ │ ├── primitive_type.go │ │ │ ├── set │ │ │ ├── gob.go │ │ │ ├── iterator.go │ │ │ ├── ops.go │ │ │ ├── rules.go │ │ │ └── set.go │ │ │ ├── set_helper.go │ │ │ ├── set_internals.go │ │ │ ├── set_type.go │ │ │ ├── tuple_type.go │ │ │ ├── type.go │ │ │ ├── type_conform.go │ │ │ ├── types_to_register.go │ │ │ ├── unknown.go │ │ │ ├── unknown_as_null.go │ │ │ ├── value.go │ │ │ ├── value_init.go │ │ │ ├── value_ops.go │ │ │ └── walk.go │ ├── go-hclog │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorize_unix.go │ │ ├── colorize_windows.go │ │ ├── context.go │ │ ├── exclude.go │ │ ├── global.go │ │ ├── interceptlogger.go │ │ ├── intlogger.go │ │ ├── logger.go │ │ ├── nulllogger.go │ │ ├── stacktrace.go │ │ ├── stdlog.go │ │ └── writer.go │ ├── go-multierror │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── append.go │ │ ├── flatten.go │ │ ├── format.go │ │ ├── group.go │ │ ├── multierror.go │ │ ├── prefix.go │ │ └── sort.go │ ├── go-plugin │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── client.go │ │ ├── discover.go │ │ ├── error.go │ │ ├── grpc_broker.go │ │ ├── grpc_client.go │ │ ├── grpc_controller.go │ │ ├── grpc_server.go │ │ ├── grpc_stdio.go │ │ ├── internal │ │ │ └── plugin │ │ │ │ ├── gen.go │ │ │ │ ├── grpc_broker.pb.go │ │ │ │ ├── grpc_broker.proto │ │ │ │ ├── grpc_controller.pb.go │ │ │ │ ├── grpc_controller.proto │ │ │ │ ├── grpc_stdio.pb.go │ │ │ │ └── grpc_stdio.proto │ │ ├── log_entry.go │ │ ├── mtls.go │ │ ├── mux_broker.go │ │ ├── plugin.go │ │ ├── process.go │ │ ├── process_posix.go │ │ ├── process_windows.go │ │ ├── protocol.go │ │ ├── rpc_client.go │ │ ├── rpc_server.go │ │ ├── server.go │ │ ├── server_mux.go │ │ ├── stream.go │ │ └── testing.go │ ├── go-uuid │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── uuid.go │ ├── go-version │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── constraint.go │ │ ├── version.go │ │ └── version_collection.go │ ├── hc-install │ │ ├── .go-version │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── checkpoint │ │ │ └── latest_version.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── fs │ │ │ ├── any_version.go │ │ │ ├── exact_version.go │ │ │ ├── fs.go │ │ │ ├── fs_unix.go │ │ │ └── fs_windows.go │ │ ├── installer.go │ │ ├── internal │ │ │ ├── build │ │ │ │ ├── get_go_version.go │ │ │ │ ├── go_build.go │ │ │ │ ├── go_is_installed.go │ │ │ │ └── install_go_version.go │ │ │ ├── httpclient │ │ │ │ └── httpclient.go │ │ │ ├── pubkey │ │ │ │ └── pubkey.go │ │ │ ├── releasesjson │ │ │ │ ├── checksum_downloader.go │ │ │ │ ├── downloader.go │ │ │ │ ├── product_version.go │ │ │ │ └── releases.go │ │ │ ├── src │ │ │ │ └── src.go │ │ │ ├── validators │ │ │ │ └── validators.go │ │ │ └── version │ │ │ │ └── version.go │ │ ├── product │ │ │ ├── consul.go │ │ │ ├── product.go │ │ │ └── terraform.go │ │ ├── releases │ │ │ ├── exact_version.go │ │ │ ├── latest_version.go │ │ │ ├── releases.go │ │ │ └── versions.go │ │ └── src │ │ │ └── src.go │ ├── hcl │ │ └── v2 │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── diagnostic.go │ │ │ ├── diagnostic_text.go │ │ │ ├── didyoumean.go │ │ │ ├── doc.go │ │ │ ├── eval_context.go │ │ │ ├── expr_call.go │ │ │ ├── expr_list.go │ │ │ ├── expr_map.go │ │ │ ├── expr_unwrap.go │ │ │ ├── ext │ │ │ └── customdecode │ │ │ │ ├── README.md │ │ │ │ ├── customdecode.go │ │ │ │ └── expression_type.go │ │ │ ├── hclsyntax │ │ │ ├── diagnostics.go │ │ │ ├── didyoumean.go │ │ │ ├── doc.go │ │ │ ├── expression.go │ │ │ ├── expression_ops.go │ │ │ ├── expression_template.go │ │ │ ├── expression_vars.go │ │ │ ├── file.go │ │ │ ├── generate.go │ │ │ ├── keywords.go │ │ │ ├── navigation.go │ │ │ ├── node.go │ │ │ ├── parser.go │ │ │ ├── parser_template.go │ │ │ ├── parser_traversal.go │ │ │ ├── peeker.go │ │ │ ├── public.go │ │ │ ├── scan_string_lit.go │ │ │ ├── scan_string_lit.rl │ │ │ ├── scan_tokens.go │ │ │ ├── scan_tokens.rl │ │ │ ├── spec.md │ │ │ ├── structure.go │ │ │ ├── structure_at_pos.go │ │ │ ├── token.go │ │ │ ├── token_type_string.go │ │ │ ├── unicode2ragel.rb │ │ │ ├── unicode_derived.rl │ │ │ ├── variables.go │ │ │ └── walk.go │ │ │ ├── merged.go │ │ │ ├── ops.go │ │ │ ├── pos.go │ │ │ ├── pos_scanner.go │ │ │ ├── schema.go │ │ │ ├── spec.md │ │ │ ├── static_expr.go │ │ │ ├── structure.go │ │ │ ├── structure_at_pos.go │ │ │ ├── traversal.go │ │ │ └── traversal_for_expr.go │ ├── logutils │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── level.go │ ├── terraform-exec │ │ ├── LICENSE │ │ ├── internal │ │ │ └── version │ │ │ │ └── version.go │ │ └── tfexec │ │ │ ├── apply.go │ │ │ ├── cmd.go │ │ │ ├── cmd_default.go │ │ │ ├── cmd_linux.go │ │ │ ├── destroy.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── exit_errors.go │ │ │ ├── fmt.go │ │ │ ├── force_unlock.go │ │ │ ├── get.go │ │ │ ├── graph.go │ │ │ ├── import.go │ │ │ ├── init.go │ │ │ ├── options.go │ │ │ ├── output.go │ │ │ ├── plan.go │ │ │ ├── providers_lock.go │ │ │ ├── providers_schema.go │ │ │ ├── refresh.go │ │ │ ├── show.go │ │ │ ├── state_mv.go │ │ │ ├── state_rm.go │ │ │ ├── taint.go │ │ │ ├── terraform.go │ │ │ ├── untaint.go │ │ │ ├── upgrade012.go │ │ │ ├── upgrade013.go │ │ │ ├── validate.go │ │ │ ├── version.go │ │ │ ├── workspace_delete.go │ │ │ ├── workspace_list.go │ │ │ ├── workspace_new.go │ │ │ ├── workspace_select.go │ │ │ └── workspace_show.go │ ├── terraform-json │ │ ├── .gitignore │ │ ├── .go-version │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── action.go │ │ ├── config.go │ │ ├── expression.go │ │ ├── plan.go │ │ ├── schemas.go │ │ ├── state.go │ │ ├── tfjson.go │ │ ├── validate.go │ │ └── version.go │ ├── terraform-plugin-go │ │ ├── LICENSE │ │ ├── internal │ │ │ └── logging │ │ │ │ ├── context.go │ │ │ │ ├── doc.go │ │ │ │ ├── environment_variables.go │ │ │ │ ├── keys.go │ │ │ │ ├── protocol.go │ │ │ │ ├── protocol_data.go │ │ │ │ └── provider.go │ │ ├── tfprotov5 │ │ │ ├── data_source.go │ │ │ ├── diagnostic.go │ │ │ ├── doc.go │ │ │ ├── dynamic_value.go │ │ │ ├── internal │ │ │ │ ├── fromproto │ │ │ │ │ ├── attribute_path.go │ │ │ │ │ ├── data_source.go │ │ │ │ │ ├── diagnostic.go │ │ │ │ │ ├── provider.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── schema.go │ │ │ │ │ ├── state.go │ │ │ │ │ ├── string_kind.go │ │ │ │ │ └── types.go │ │ │ │ ├── tfplugin5 │ │ │ │ │ ├── tfplugin5.pb.go │ │ │ │ │ ├── tfplugin5.proto │ │ │ │ │ └── tfplugin5_grpc.pb.go │ │ │ │ └── toproto │ │ │ │ │ ├── attribute_path.go │ │ │ │ │ ├── data_source.go │ │ │ │ │ ├── diagnostic.go │ │ │ │ │ ├── dynamic_value.go │ │ │ │ │ ├── provider.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── schema.go │ │ │ │ │ ├── state.go │ │ │ │ │ └── string_kind.go │ │ │ ├── provider.go │ │ │ ├── resource.go │ │ │ ├── schema.go │ │ │ ├── state.go │ │ │ ├── string_kind.go │ │ │ └── tf5server │ │ │ │ ├── doc.go │ │ │ │ ├── plugin.go │ │ │ │ └── server.go │ │ ├── tfprotov6 │ │ │ ├── data_source.go │ │ │ ├── diagnostic.go │ │ │ ├── doc.go │ │ │ ├── dynamic_value.go │ │ │ ├── internal │ │ │ │ ├── fromproto │ │ │ │ │ ├── attribute_path.go │ │ │ │ │ ├── data_source.go │ │ │ │ │ ├── diagnostic.go │ │ │ │ │ ├── provider.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── schema.go │ │ │ │ │ ├── state.go │ │ │ │ │ ├── string_kind.go │ │ │ │ │ └── types.go │ │ │ │ ├── tfplugin6 │ │ │ │ │ ├── tfplugin6.pb.go │ │ │ │ │ ├── tfplugin6.proto │ │ │ │ │ └── tfplugin6_grpc.pb.go │ │ │ │ └── toproto │ │ │ │ │ ├── attribute_path.go │ │ │ │ │ ├── data_source.go │ │ │ │ │ ├── diagnostic.go │ │ │ │ │ ├── dynamic_value.go │ │ │ │ │ ├── provider.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── schema.go │ │ │ │ │ ├── state.go │ │ │ │ │ └── string_kind.go │ │ │ ├── provider.go │ │ │ ├── resource.go │ │ │ ├── schema.go │ │ │ ├── state.go │ │ │ ├── string_kind.go │ │ │ └── tf6server │ │ │ │ ├── doc.go │ │ │ │ ├── plugin.go │ │ │ │ └── server.go │ │ └── tftypes │ │ │ ├── attribute_path.go │ │ │ ├── attribute_path_error.go │ │ │ ├── diff.go │ │ │ ├── doc.go │ │ │ ├── list.go │ │ │ ├── map.go │ │ │ ├── object.go │ │ │ ├── primitive.go │ │ │ ├── set.go │ │ │ ├── tuple.go │ │ │ ├── type.go │ │ │ ├── unknown_value.go │ │ │ ├── value.go │ │ │ ├── value_json.go │ │ │ ├── value_msgpack.go │ │ │ └── walk.go │ ├── terraform-plugin-log │ │ ├── LICENSE │ │ ├── internal │ │ │ ├── hclogutils │ │ │ │ ├── args.go │ │ │ │ └── logger_options.go │ │ │ └── logging │ │ │ │ ├── log.go │ │ │ │ ├── options.go │ │ │ │ ├── provider.go │ │ │ │ ├── sdk.go │ │ │ │ └── sink.go │ │ ├── tflog │ │ │ ├── doc.go │ │ │ ├── options.go │ │ │ ├── provider.go │ │ │ └── subsystem.go │ │ └── tfsdklog │ │ │ ├── doc.go │ │ │ ├── options.go │ │ │ ├── sdk.go │ │ │ ├── sink.go │ │ │ └── subsystem.go │ ├── terraform-plugin-sdk │ │ └── v2 │ │ │ ├── LICENSE │ │ │ ├── diag │ │ │ ├── diagnostic.go │ │ │ └── helpers.go │ │ │ ├── helper │ │ │ ├── logging │ │ │ │ ├── logging.go │ │ │ │ └── transport.go │ │ │ ├── resource │ │ │ │ ├── environment_variables.go │ │ │ │ ├── error.go │ │ │ │ ├── id.go │ │ │ │ ├── json.go │ │ │ │ ├── plugin.go │ │ │ │ ├── state.go │ │ │ │ ├── state_shim.go │ │ │ │ ├── testing.go │ │ │ │ ├── testing_config.go │ │ │ │ ├── testing_new.go │ │ │ │ ├── testing_new_config.go │ │ │ │ ├── testing_new_import_state.go │ │ │ │ ├── testing_sets.go │ │ │ │ └── wait.go │ │ │ └── schema │ │ │ │ ├── README.md │ │ │ │ ├── context.go │ │ │ │ ├── core_schema.go │ │ │ │ ├── data_source_resource_shim.go │ │ │ │ ├── equal.go │ │ │ │ ├── field_reader.go │ │ │ │ ├── field_reader_config.go │ │ │ │ ├── field_reader_diff.go │ │ │ │ ├── field_reader_map.go │ │ │ │ ├── field_reader_multi.go │ │ │ │ ├── field_writer.go │ │ │ │ ├── field_writer_map.go │ │ │ │ ├── getsource_string.go │ │ │ │ ├── grpc_provider.go │ │ │ │ ├── json.go │ │ │ │ ├── provider.go │ │ │ │ ├── resource.go │ │ │ │ ├── resource_data.go │ │ │ │ ├── resource_data_get_source.go │ │ │ │ ├── resource_diff.go │ │ │ │ ├── resource_importer.go │ │ │ │ ├── resource_timeout.go │ │ │ │ ├── schema.go │ │ │ │ ├── serialize.go │ │ │ │ ├── set.go │ │ │ │ ├── shims.go │ │ │ │ ├── testing.go │ │ │ │ ├── unknown.go │ │ │ │ ├── valuetype.go │ │ │ │ └── valuetype_string.go │ │ │ ├── internal │ │ │ ├── addrs │ │ │ │ ├── doc.go │ │ │ │ ├── instance_key.go │ │ │ │ ├── module.go │ │ │ │ ├── module_instance.go │ │ │ │ ├── resource.go │ │ │ │ └── resourcemode_string.go │ │ │ ├── configs │ │ │ │ ├── configschema │ │ │ │ │ ├── coerce_value.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── empty_value.go │ │ │ │ │ ├── implied_type.go │ │ │ │ │ ├── nestingmode_string.go │ │ │ │ │ └── schema.go │ │ │ │ └── hcl2shim │ │ │ │ │ ├── flatmap.go │ │ │ │ │ ├── paths.go │ │ │ │ │ ├── values.go │ │ │ │ │ └── values_equiv.go │ │ │ ├── helper │ │ │ │ └── hashcode │ │ │ │ │ └── hashcode.go │ │ │ ├── logging │ │ │ │ ├── context.go │ │ │ │ ├── environment_variables.go │ │ │ │ ├── helper_resource.go │ │ │ │ ├── helper_schema.go │ │ │ │ └── keys.go │ │ │ ├── plans │ │ │ │ └── objchange │ │ │ │ │ └── normalize_obj.go │ │ │ ├── plugin │ │ │ │ └── convert │ │ │ │ │ ├── diagnostics.go │ │ │ │ │ └── schema.go │ │ │ ├── plugintest │ │ │ │ ├── config.go │ │ │ │ ├── doc.go │ │ │ │ ├── environment_variables.go │ │ │ │ ├── guard.go │ │ │ │ ├── helper.go │ │ │ │ ├── util.go │ │ │ │ └── working_dir.go │ │ │ └── tfdiags │ │ │ │ ├── config_traversals.go │ │ │ │ ├── contextual.go │ │ │ │ ├── diagnostic.go │ │ │ │ ├── diagnostic_base.go │ │ │ │ ├── diagnostics.go │ │ │ │ ├── doc.go │ │ │ │ ├── error.go │ │ │ │ ├── rpc_friendly.go │ │ │ │ ├── severity_string.go │ │ │ │ └── simple_warning.go │ │ │ ├── meta │ │ │ └── meta.go │ │ │ ├── plugin │ │ │ ├── debug.go │ │ │ └── serve.go │ │ │ └── terraform │ │ │ ├── diff.go │ │ │ ├── instancetype.go │ │ │ ├── instancetype_string.go │ │ │ ├── resource.go │ │ │ ├── resource_address.go │ │ │ ├── resource_mode.go │ │ │ ├── resource_mode_string.go │ │ │ ├── resource_provider.go │ │ │ ├── schemas.go │ │ │ ├── state.go │ │ │ ├── state_filter.go │ │ │ └── util.go │ ├── terraform-registry-address │ │ ├── .go-version │ │ ├── LICENSE │ │ ├── README.md │ │ ├── errors.go │ │ └── provider.go │ ├── terraform-svchost │ │ ├── LICENSE │ │ ├── label_iter.go │ │ └── svchost.go │ └── yamux │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── addr.go │ │ ├── const.go │ │ ├── mux.go │ │ ├── session.go │ │ ├── spec.md │ │ ├── stream.go │ │ └── util.go ├── imdario │ └── mergo │ │ ├── .deepsource.toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── map.go │ │ ├── merge.go │ │ └── mergo.go ├── mattn │ ├── go-colorable │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorable_appengine.go │ │ ├── colorable_others.go │ │ ├── colorable_windows.go │ │ └── noncolorable.go │ └── go-isatty │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── isatty_android.go │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go ├── mitchellh │ ├── copystructure │ │ ├── LICENSE │ │ ├── README.md │ │ ├── copier_time.go │ │ └── copystructure.go │ ├── go-testing-interface │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── testing.go │ ├── go-wordwrap │ │ ├── LICENSE.md │ │ ├── README.md │ │ └── wordwrap.go │ ├── mapstructure │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ └── mapstructure.go │ └── reflectwalk │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── location.go │ │ ├── location_string.go │ │ └── reflectwalk.go ├── oklog │ └── run │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── group.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go ├── pmezard │ └── go-difflib │ │ ├── LICENSE │ │ └── difflib │ │ └── difflib.go ├── stretchr │ └── testify │ │ ├── LICENSE │ │ └── assert │ │ ├── assertion_compare.go │ │ ├── assertion_compare_can_convert.go │ │ ├── assertion_compare_legacy.go │ │ ├── assertion_format.go │ │ ├── assertion_format.go.tmpl │ │ ├── assertion_forward.go │ │ ├── assertion_forward.go.tmpl │ │ ├── assertion_order.go │ │ ├── assertions.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── forward_assertions.go │ │ └── http_assertions.go ├── vmihailenco │ ├── msgpack │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appengine.go │ │ ├── codes │ │ │ └── codes.go │ │ ├── decode.go │ │ ├── decode_map.go │ │ ├── decode_number.go │ │ ├── decode_query.go │ │ ├── decode_slice.go │ │ ├── decode_string.go │ │ ├── decode_value.go │ │ ├── encode.go │ │ ├── encode_map.go │ │ ├── encode_number.go │ │ ├── encode_slice.go │ │ ├── encode_value.go │ │ ├── ext.go │ │ ├── msgpack.go │ │ ├── tag.go │ │ ├── time.go │ │ ├── types.go │ │ └── v4 │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── appengine.go │ │ │ ├── codes │ │ │ └── codes.go │ │ │ ├── decode.go │ │ │ ├── decode_map.go │ │ │ ├── decode_number.go │ │ │ ├── decode_query.go │ │ │ ├── decode_slice.go │ │ │ ├── decode_string.go │ │ │ ├── decode_value.go │ │ │ ├── encode.go │ │ │ ├── encode_map.go │ │ │ ├── encode_number.go │ │ │ ├── encode_slice.go │ │ │ ├── encode_value.go │ │ │ ├── ext.go │ │ │ ├── intern.go │ │ │ ├── msgpack.go │ │ │ ├── safe.go │ │ │ ├── time.go │ │ │ ├── types.go │ │ │ └── unsafe.go │ └── tagparser │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── internal │ │ ├── parser │ │ │ └── parser.go │ │ ├── safe.go │ │ └── unsafe.go │ │ └── tagparser.go └── zclconf │ └── go-cty │ ├── LICENSE │ └── cty │ ├── capsule.go │ ├── capsule_ops.go │ ├── collection.go │ ├── convert │ ├── compare_types.go │ ├── conversion.go │ ├── conversion_capsule.go │ ├── conversion_collection.go │ ├── conversion_dynamic.go │ ├── conversion_object.go │ ├── conversion_primitive.go │ ├── conversion_tuple.go │ ├── doc.go │ ├── mismatch_msg.go │ ├── public.go │ ├── sort_types.go │ └── unify.go │ ├── doc.go │ ├── element_iterator.go │ ├── error.go │ ├── function │ ├── argument.go │ ├── doc.go │ ├── error.go │ ├── function.go │ ├── stdlib │ │ ├── bool.go │ │ ├── bytes.go │ │ ├── collection.go │ │ ├── conversion.go │ │ ├── csv.go │ │ ├── datetime.go │ │ ├── doc.go │ │ ├── format.go │ │ ├── format_fsm.go │ │ ├── format_fsm.rl │ │ ├── general.go │ │ ├── json.go │ │ ├── number.go │ │ ├── regexp.go │ │ ├── sequence.go │ │ ├── set.go │ │ ├── string.go │ │ └── string_replace.go │ └── unpredictable.go │ ├── gob.go │ ├── gocty │ ├── doc.go │ ├── helpers.go │ ├── in.go │ ├── out.go │ └── type_implied.go │ ├── helper.go │ ├── json.go │ ├── json │ ├── doc.go │ ├── marshal.go │ ├── simple.go │ ├── type.go │ ├── type_implied.go │ ├── unmarshal.go │ └── value.go │ ├── list_type.go │ ├── map_type.go │ ├── marks.go │ ├── null.go │ ├── object_type.go │ ├── path.go │ ├── path_set.go │ ├── primitive_type.go │ ├── set │ ├── gob.go │ ├── iterator.go │ ├── ops.go │ ├── rules.go │ └── set.go │ ├── set_helper.go │ ├── set_internals.go │ ├── set_type.go │ ├── tuple_type.go │ ├── type.go │ ├── type_conform.go │ ├── types_to_register.go │ ├── unknown.go │ ├── unknown_as_null.go │ ├── value.go │ ├── value_init.go │ ├── value_ops.go │ └── walk.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── blake2b │ │ ├── blake2b.go │ │ ├── blake2bAVX2_amd64.go │ │ ├── blake2bAVX2_amd64.s │ │ ├── blake2b_amd64.go │ │ ├── blake2b_amd64.s │ │ ├── blake2b_generic.go │ │ ├── blake2b_ref.go │ │ ├── blake2x.go │ │ └── register.go │ ├── cast5 │ │ └── cast5.go │ ├── internal │ │ ├── poly1305 │ │ │ ├── bits_compat.go │ │ │ ├── bits_go1.13.go │ │ │ ├── mac_noasm.go │ │ │ ├── poly1305.go │ │ │ ├── sum_amd64.go │ │ │ ├── sum_amd64.s │ │ │ ├── sum_generic.go │ │ │ ├── sum_ppc64le.go │ │ │ ├── sum_ppc64le.s │ │ │ ├── sum_s390x.go │ │ │ └── sum_s390x.s │ │ └── subtle │ │ │ ├── aliasing.go │ │ │ └── aliasing_purego.go │ ├── nacl │ │ └── secretbox │ │ │ └── secretbox.go │ ├── openpgp │ │ ├── armor │ │ │ ├── armor.go │ │ │ └── encode.go │ │ ├── canonical_text.go │ │ ├── elgamal │ │ │ └── elgamal.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── keys.go │ │ ├── packet │ │ │ ├── compressed.go │ │ │ ├── config.go │ │ │ ├── encrypted_key.go │ │ │ ├── literal.go │ │ │ ├── ocfb.go │ │ │ ├── one_pass_signature.go │ │ │ ├── opaque.go │ │ │ ├── packet.go │ │ │ ├── private_key.go │ │ │ ├── public_key.go │ │ │ ├── public_key_v3.go │ │ │ ├── reader.go │ │ │ ├── signature.go │ │ │ ├── signature_v3.go │ │ │ ├── symmetric_key_encrypted.go │ │ │ ├── symmetrically_encrypted.go │ │ │ ├── userattribute.go │ │ │ └── userid.go │ │ ├── read.go │ │ ├── s2k │ │ │ └── s2k.go │ │ └── write.go │ ├── pbkdf2 │ │ └── pbkdf2.go │ └── salsa20 │ │ └── salsa │ │ ├── hsalsa20.go │ │ ├── salsa208.go │ │ ├── salsa20_amd64.go │ │ ├── salsa20_amd64.s │ │ ├── salsa20_noasm.go │ │ └── salsa20_ref.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── context │ │ ├── context.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ ├── http │ │ └── httpguts │ │ │ ├── guts.go │ │ │ └── httplex.go │ ├── http2 │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── ascii.go │ │ ├── ciphers.go │ │ ├── client_conn_pool.go │ │ ├── databuffer.go │ │ ├── errors.go │ │ ├── flow.go │ │ ├── frame.go │ │ ├── go111.go │ │ ├── go115.go │ │ ├── gotrack.go │ │ ├── headermap.go │ │ ├── hpack │ │ │ ├── encode.go │ │ │ ├── hpack.go │ │ │ ├── huffman.go │ │ │ └── tables.go │ │ ├── http2.go │ │ ├── not_go111.go │ │ ├── not_go115.go │ │ ├── pipe.go │ │ ├── server.go │ │ ├── transport.go │ │ ├── write.go │ │ ├── writesched.go │ │ ├── writesched_priority.go │ │ └── writesched_random.go │ ├── idna │ │ ├── go118.go │ │ ├── idna10.0.0.go │ │ ├── idna9.0.0.go │ │ ├── pre_go118.go │ │ ├── punycode.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables9.0.0.go │ │ ├── trie.go │ │ └── trieval.go │ ├── internal │ │ └── timeseries │ │ │ └── timeseries.go │ └── trace │ │ ├── events.go │ │ ├── histogram.go │ │ └── trace.go │ ├── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── cpu │ │ ├── asm_aix_ppc64.s │ │ ├── byteorder.go │ │ ├── cpu.go │ │ ├── cpu_aix.go │ │ ├── cpu_arm.go │ │ ├── cpu_arm64.go │ │ ├── cpu_arm64.s │ │ ├── cpu_gc_arm64.go │ │ ├── cpu_gc_s390x.go │ │ ├── cpu_gc_x86.go │ │ ├── cpu_gccgo_arm64.go │ │ ├── cpu_gccgo_s390x.go │ │ ├── cpu_gccgo_x86.c │ │ ├── cpu_gccgo_x86.go │ │ ├── cpu_linux.go │ │ ├── cpu_linux_arm.go │ │ ├── cpu_linux_arm64.go │ │ ├── cpu_linux_mips64x.go │ │ ├── cpu_linux_noinit.go │ │ ├── cpu_linux_ppc64x.go │ │ ├── cpu_linux_s390x.go │ │ ├── cpu_mips64x.go │ │ ├── cpu_mipsx.go │ │ ├── cpu_netbsd_arm64.go │ │ ├── cpu_other_arm.go │ │ ├── cpu_other_arm64.go │ │ ├── cpu_other_mips64x.go │ │ ├── cpu_ppc64x.go │ │ ├── cpu_riscv64.go │ │ ├── cpu_s390x.go │ │ ├── cpu_s390x.s │ │ ├── cpu_wasm.go │ │ ├── cpu_x86.go │ │ ├── cpu_x86.s │ │ ├── cpu_zos.go │ │ ├── cpu_zos_s390x.go │ │ ├── hwcap_linux.go │ │ ├── syscall_aix_gccgo.go │ │ └── syscall_aix_ppc64_gc.go │ ├── internal │ │ └── unsafeheader │ │ │ └── unsafeheader.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── epoll_zos.go │ │ ├── errors_freebsd_386.go │ │ ├── errors_freebsd_amd64.go │ │ ├── errors_freebsd_arm.go │ │ ├── errors_freebsd_arm64.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── fstatfs_zos.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ioctl.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.1_12.go │ │ ├── syscall_darwin.1_13.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_illumos_amd64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── empty.s │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapierrors_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── text │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── secure │ └── bidirule │ │ ├── bidirule.go │ │ ├── bidirule10.0.0.go │ │ └── bidirule9.0.0.go │ ├── transform │ └── transform.go │ └── unicode │ ├── bidi │ ├── bidi.go │ ├── bracket.go │ ├── core.go │ ├── prop.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ └── trieval.go │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ └── trie.go ├── google.golang.org ├── appengine │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── appengine.go │ ├── appengine_vm.go │ ├── datastore │ │ ├── datastore.go │ │ ├── doc.go │ │ ├── internal │ │ │ ├── cloudkey │ │ │ │ └── cloudkey.go │ │ │ └── cloudpb │ │ │ │ └── entity.pb.go │ │ ├── key.go │ │ ├── keycompat.go │ │ ├── load.go │ │ ├── metadata.go │ │ ├── prop.go │ │ ├── query.go │ │ ├── save.go │ │ └── transaction.go │ ├── errors.go │ ├── identity.go │ ├── internal │ │ ├── api.go │ │ ├── api_classic.go │ │ ├── api_common.go │ │ ├── app_id.go │ │ ├── app_identity │ │ │ ├── app_identity_service.pb.go │ │ │ └── app_identity_service.proto │ │ ├── base │ │ │ ├── api_base.pb.go │ │ │ └── api_base.proto │ │ ├── datastore │ │ │ ├── datastore_v3.pb.go │ │ │ └── datastore_v3.proto │ │ ├── identity.go │ │ ├── identity_classic.go │ │ ├── identity_flex.go │ │ ├── identity_vm.go │ │ ├── internal.go │ │ ├── log │ │ │ ├── log_service.pb.go │ │ │ └── log_service.proto │ │ ├── main.go │ │ ├── main_common.go │ │ ├── main_vm.go │ │ ├── metadata.go │ │ ├── modules │ │ │ ├── modules_service.pb.go │ │ │ └── modules_service.proto │ │ ├── net.go │ │ ├── regen.sh │ │ ├── remote_api │ │ │ ├── remote_api.pb.go │ │ │ └── remote_api.proto │ │ └── transaction.go │ ├── namespace.go │ ├── timeout.go │ ├── travis_install.sh │ └── travis_test.sh ├── genproto │ ├── LICENSE │ └── googleapis │ │ └── rpc │ │ └── status │ │ └── status.pb.go ├── grpc │ ├── AUTHORS │ ├── CODE-OF-CONDUCT.md │ ├── CONTRIBUTING.md │ ├── GOVERNANCE.md │ ├── LICENSE │ ├── MAINTAINERS.md │ ├── Makefile │ ├── NOTICE.txt │ ├── README.md │ ├── SECURITY.md │ ├── attributes │ │ └── attributes.go │ ├── backoff.go │ ├── backoff │ │ └── backoff.go │ ├── balancer │ │ ├── balancer.go │ │ ├── base │ │ │ ├── balancer.go │ │ │ └── base.go │ │ ├── grpclb │ │ │ └── state │ │ │ │ └── state.go │ │ └── roundrobin │ │ │ └── roundrobin.go │ ├── balancer_conn_wrappers.go │ ├── binarylog │ │ └── grpc_binarylog_v1 │ │ │ └── binarylog.pb.go │ ├── call.go │ ├── clientconn.go │ ├── codec.go │ ├── codegen.sh │ ├── codes │ │ ├── code_string.go │ │ └── codes.go │ ├── connectivity │ │ └── connectivity.go │ ├── credentials │ │ ├── credentials.go │ │ ├── insecure │ │ │ └── insecure.go │ │ └── tls.go │ ├── dialoptions.go │ ├── doc.go │ ├── encoding │ │ ├── encoding.go │ │ └── proto │ │ │ └── proto.go │ ├── grpclog │ │ ├── component.go │ │ ├── grpclog.go │ │ ├── logger.go │ │ └── loggerv2.go │ ├── health │ │ ├── client.go │ │ ├── grpc_health_v1 │ │ │ ├── health.pb.go │ │ │ └── health_grpc.pb.go │ │ ├── logging.go │ │ └── server.go │ ├── interceptor.go │ ├── internal │ │ ├── backoff │ │ │ └── backoff.go │ │ ├── balancerload │ │ │ └── load.go │ │ ├── binarylog │ │ │ ├── binarylog.go │ │ │ ├── binarylog_testutil.go │ │ │ ├── env_config.go │ │ │ ├── method_logger.go │ │ │ └── sink.go │ │ ├── buffer │ │ │ └── unbounded.go │ │ ├── channelz │ │ │ ├── funcs.go │ │ │ ├── logging.go │ │ │ ├── types.go │ │ │ ├── types_linux.go │ │ │ ├── types_nonlinux.go │ │ │ ├── util_linux.go │ │ │ └── util_nonlinux.go │ │ ├── credentials │ │ │ ├── credentials.go │ │ │ ├── spiffe.go │ │ │ ├── syscallconn.go │ │ │ └── util.go │ │ ├── envconfig │ │ │ ├── envconfig.go │ │ │ └── xds.go │ │ ├── grpclog │ │ │ ├── grpclog.go │ │ │ └── prefixLogger.go │ │ ├── grpcrand │ │ │ └── grpcrand.go │ │ ├── grpcsync │ │ │ └── event.go │ │ ├── grpcutil │ │ │ ├── encode_duration.go │ │ │ ├── grpcutil.go │ │ │ ├── metadata.go │ │ │ ├── method.go │ │ │ └── regex.go │ │ ├── internal.go │ │ ├── metadata │ │ │ └── metadata.go │ │ ├── resolver │ │ │ ├── config_selector.go │ │ │ ├── dns │ │ │ │ └── dns_resolver.go │ │ │ ├── passthrough │ │ │ │ └── passthrough.go │ │ │ └── unix │ │ │ │ └── unix.go │ │ ├── serviceconfig │ │ │ └── serviceconfig.go │ │ ├── status │ │ │ └── status.go │ │ ├── syscall │ │ │ ├── syscall_linux.go │ │ │ └── syscall_nonlinux.go │ │ ├── transport │ │ │ ├── bdp_estimator.go │ │ │ ├── controlbuf.go │ │ │ ├── defaults.go │ │ │ ├── flowcontrol.go │ │ │ ├── handler_server.go │ │ │ ├── http2_client.go │ │ │ ├── http2_server.go │ │ │ ├── http_util.go │ │ │ ├── networktype │ │ │ │ └── networktype.go │ │ │ ├── proxy.go │ │ │ └── transport.go │ │ └── xds_handshake_cluster.go │ ├── keepalive │ │ └── keepalive.go │ ├── metadata │ │ └── metadata.go │ ├── peer │ │ └── peer.go │ ├── picker_wrapper.go │ ├── pickfirst.go │ ├── preloader.go │ ├── reflection │ │ ├── README.md │ │ ├── grpc_reflection_v1alpha │ │ │ ├── reflection.pb.go │ │ │ ├── reflection.proto │ │ │ └── reflection_grpc.pb.go │ │ └── serverreflection.go │ ├── regenerate.sh │ ├── resolver │ │ ├── map.go │ │ └── resolver.go │ ├── resolver_conn_wrapper.go │ ├── rpc_util.go │ ├── server.go │ ├── service_config.go │ ├── serviceconfig │ │ └── serviceconfig.go │ ├── stats │ │ ├── handlers.go │ │ └── stats.go │ ├── status │ │ └── status.go │ ├── stream.go │ ├── tap │ │ └── tap.go │ ├── trace.go │ ├── version.go │ └── vet.sh └── protobuf │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── prototext │ │ ├── decode.go │ │ ├── doc.go │ │ └── encode.go │ └── protowire │ │ └── wire.go │ ├── internal │ ├── descfmt │ │ └── stringer.go │ ├── descopts │ │ └── options.go │ ├── detrand │ │ └── rand.go │ ├── encoding │ │ ├── defval │ │ │ └── default.go │ │ ├── messageset │ │ │ └── messageset.go │ │ ├── tag │ │ │ └── tag.go │ │ └── text │ │ │ ├── decode.go │ │ │ ├── decode_number.go │ │ │ ├── decode_string.go │ │ │ ├── decode_token.go │ │ │ ├── doc.go │ │ │ └── encode.go │ ├── errors │ │ ├── errors.go │ │ ├── is_go112.go │ │ └── is_go113.go │ ├── filedesc │ │ ├── build.go │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_lazy.go │ │ ├── desc_list.go │ │ ├── desc_list_gen.go │ │ └── placeholder.go │ ├── filetype │ │ └── build.go │ ├── flags │ │ ├── flags.go │ │ ├── proto_legacy_disable.go │ │ └── proto_legacy_enable.go │ ├── genid │ │ ├── any_gen.go │ │ ├── api_gen.go │ │ ├── descriptor_gen.go │ │ ├── doc.go │ │ ├── duration_gen.go │ │ ├── empty_gen.go │ │ ├── field_mask_gen.go │ │ ├── goname.go │ │ ├── map_entry.go │ │ ├── source_context_gen.go │ │ ├── struct_gen.go │ │ ├── timestamp_gen.go │ │ ├── type_gen.go │ │ ├── wrappers.go │ │ └── wrappers_gen.go │ ├── impl │ │ ├── api_export.go │ │ ├── checkinit.go │ │ ├── codec_extension.go │ │ ├── codec_field.go │ │ ├── codec_gen.go │ │ ├── codec_map.go │ │ ├── codec_map_go111.go │ │ ├── codec_map_go112.go │ │ ├── codec_message.go │ │ ├── codec_messageset.go │ │ ├── codec_reflect.go │ │ ├── codec_tables.go │ │ ├── codec_unsafe.go │ │ ├── convert.go │ │ ├── convert_list.go │ │ ├── convert_map.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── enum.go │ │ ├── extension.go │ │ ├── legacy_enum.go │ │ ├── legacy_export.go │ │ ├── legacy_extension.go │ │ ├── legacy_file.go │ │ ├── legacy_message.go │ │ ├── merge.go │ │ ├── merge_gen.go │ │ ├── message.go │ │ ├── message_reflect.go │ │ ├── message_reflect_field.go │ │ ├── message_reflect_gen.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── validate.go │ │ └── weak.go │ ├── order │ │ ├── order.go │ │ └── range.go │ ├── pragma │ │ └── pragma.go │ ├── set │ │ └── ints.go │ ├── strs │ │ ├── strings.go │ │ ├── strings_pure.go │ │ └── strings_unsafe.go │ └── version │ │ └── version.go │ ├── proto │ ├── checkinit.go │ ├── decode.go │ ├── decode_gen.go │ ├── doc.go │ ├── encode.go │ ├── encode_gen.go │ ├── equal.go │ ├── extension.go │ ├── merge.go │ ├── messageset.go │ ├── proto.go │ ├── proto_methods.go │ ├── proto_reflect.go │ ├── reset.go │ ├── size.go │ ├── size_gen.go │ └── wrappers.go │ ├── reflect │ ├── protodesc │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_resolve.go │ │ ├── desc_validate.go │ │ └── proto.go │ ├── protoreflect │ │ ├── methods.go │ │ ├── proto.go │ │ ├── source.go │ │ ├── source_gen.go │ │ ├── type.go │ │ ├── value.go │ │ ├── value_pure.go │ │ ├── value_union.go │ │ └── value_unsafe.go │ └── protoregistry │ │ └── registry.go │ ├── runtime │ ├── protoiface │ │ ├── legacy.go │ │ └── methods.go │ └── protoimpl │ │ ├── impl.go │ │ └── version.go │ └── types │ ├── descriptorpb │ └── descriptor.pb.go │ └── known │ ├── anypb │ └── any.pb.go │ ├── durationpb │ └── duration.pb.go │ ├── emptypb │ └── empty.pb.go │ └── timestamppb │ └── timestamp.pb.go ├── gopkg.in └── yaml.v3 │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | end_of_line = lf 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.go] 12 | indent_style = tab 13 | 14 | [makefile] 15 | indent_style = tab 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.dll 2 | *.exe 3 | .DS_Store 4 | example.tf 5 | terraform.tfplan 6 | terraform.tfstate 7 | bin/ 8 | dist/ 9 | modules-dev/ 10 | /pkg/ 11 | website/.vagrant 12 | website/.bundle 13 | website/build 14 | website/node_modules 15 | .vagrant/ 16 | *.backup 17 | ./*.tfstate 18 | .terraform/ 19 | *.log 20 | *.bak 21 | *~ 22 | .*.swp 23 | .idea 24 | *.iml 25 | *.test 26 | *.iml 27 | website/vendor 28 | /.cache 29 | /.local 30 | /.config 31 | .personal.* 32 | .tmux.conf 33 | /result 34 | /release -------------------------------------------------------------------------------- /example/vultr/.gitignore: -------------------------------------------------------------------------------- 1 | /image.raw 2 | /terraform.tfstate* 3 | /.terraform* 4 | /pub 5 | *.log -------------------------------------------------------------------------------- /example/vultr/authorized_key: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBACa4D4ycVdMtyIt1WUeoG3S/cdCARlyffhn6LsogFLHURvKtoMVV4cgZBrexju4SjpO/nAlHio8y8T1U0nV5WKDJAAIH0PhPt79HWQOi6HB4d/7UUncMndktyVYar0Mneir/Ci2yQEVmq6vYKKPTuwVynCB2r6yG1IzD1rhFEAG5OUeSg== example@localhost -------------------------------------------------------------------------------- /example/vultr/main.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, lib, ... }: 2 | let 3 | inherit (builtins) 4 | fromJSON 5 | ; 6 | inherit (lib) 7 | types 8 | mkOption 9 | ; 10 | in { 11 | config = { 12 | boot.initrd.availableKernelModules = [ 13 | "ata_piix" 14 | "sr_mod" 15 | "uhci_hcd" 16 | "virtio_blk" 17 | "virtio_pci" 18 | ]; 19 | users = { 20 | mutableUsers = false; 21 | extraUsers.root = { 22 | isNormalUser = false; 23 | hashedPassword = "!"; 24 | shell = "${pkgs.fish}/bin/fish"; 25 | }; 26 | }; 27 | 28 | fileSystems.nixos = { 29 | label = "nixos"; 30 | device = "/dev/vda1"; 31 | fsType = "ext4"; 32 | mountPoint = "/"; 33 | }; 34 | boot.loader.grub.devices = ["/dev/vda"]; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /example/vultr/makefile: -------------------------------------------------------------------------------- 1 | .PHONY: image 2 | image: 3 | mkdir -p pub 4 | nixos-generate -f openstack -c ./image.nix | xargs -I {} qemu-img convert {} pub/image.raw 5 | 6 | .PHONY: serve 7 | serve: 8 | cd pub && python -mhttp.server 8666 > serve.log 9 | -------------------------------------------------------------------------------- /example/vultr/secrets/key: -------------------------------------------------------------------------------- 1 | super secret -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/corpix/terraform-provider-nixos/provider" 7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" 8 | "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" 9 | ) 10 | 11 | func main() { 12 | var debugMode bool 13 | 14 | flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve") 15 | flag.Parse() 16 | 17 | plugin.Serve(&plugin.ServeOpts{ 18 | Debug: debugMode, 19 | ProviderAddr: "registry.terraform.io/corpix/nixos", 20 | ProviderFunc: func() *schema.Provider { return provider.New() }, 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /nix-cage.json: -------------------------------------------------------------------------------- 1 | { 2 | "mounts": { 3 | "rw": [ 4 | ".", "~/.emacs.d", 5 | ["./.cache", "~/.cache", "d"], 6 | ["./.config", "~/.config", "d"], 7 | ["./.local", "~/.local", "d"], 8 | ["$SSH_AUTH_SOCK", "$SSH_AUTH_SOCK"], 9 | "/run/current-system" 10 | ], 11 | "ro": [ 12 | "~/.ssh", 13 | "~/.gitconfig", 14 | "/" 15 | ], 16 | "dev": ["/dev"], 17 | "tmpfs": [ 18 | "/run", 19 | "/tmp", 20 | "/home", 21 | "~" 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /provider/enclave.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "github.com/awnumar/memguard" 5 | ) 6 | 7 | type ( 8 | Enclave = memguard.Enclave 9 | LockedBuffer = memguard.LockedBuffer 10 | ) 11 | 12 | func NewLockedBuffer(buf []byte) *LockedBuffer { 13 | return memguard.NewBufferFromBytes(buf) 14 | } 15 | -------------------------------------------------------------------------------- /provider/log.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | 7 | "github.com/hashicorp/terraform-plugin-log/tflog" 8 | ) 9 | 10 | type LogWriter struct { 11 | Context context.Context 12 | } 13 | 14 | func (w *LogWriter) Write(buf []byte) (int, error) { 15 | lines := bytes.Split(buf, []byte{'\n'}) 16 | for _, line := range lines { 17 | tflog.Info(w.Context, string(line)) 18 | } 19 | 20 | return len(buf), nil 21 | } 22 | 23 | func NewLogWriter(ctx context.Context) *LogWriter { 24 | return &LogWriter{ 25 | Context: ctx, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /provider/marshaling.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "encoding/json" 5 | "reflect" 6 | ) 7 | 8 | type ( 9 | Unmarshaler interface { 10 | Unmarshal(buf []byte, v interface{}) error 11 | } 12 | UnmarshalerPassthrough struct{} 13 | UnmarshalerJSON struct{} 14 | ) 15 | 16 | func (*UnmarshalerPassthrough) Unmarshal(buf []byte, v interface{}) error { 17 | rv := reflect.ValueOf(v) 18 | rv.Elem().Set(reflect.ValueOf(buf)) 19 | return nil 20 | } 21 | 22 | func (*UnmarshalerJSON) Unmarshal(buf []byte, v interface{}) error { 23 | return json.Unmarshal(buf, v) 24 | } 25 | 26 | // 27 | 28 | func NewUnmarshalerPassthrough() *UnmarshalerPassthrough { return &UnmarshalerPassthrough{} } 29 | func NewUnmarshalerJSON() *UnmarshalerJSON { return &UnmarshalerJSON{} } 30 | 31 | var ( 32 | _ Unmarshaler = NewUnmarshalerPassthrough() 33 | _ Unmarshaler = NewUnmarshalerJSON() 34 | ) 35 | -------------------------------------------------------------------------------- /provider/nix_conf_wrapper.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | _ "embed" 5 | "os" 6 | ) 7 | 8 | //go:embed nix_conf_wrapper.nix 9 | var NixWrapper []byte 10 | 11 | func NewNixWrapperFile(path string) (File, error) { 12 | var ( 13 | fd File 14 | err error 15 | ) 16 | if path == "" { 17 | fd, err = CreateTemp("nix_wrapper.nix.*") 18 | if err != nil { 19 | return nil, err 20 | } 21 | _, err = fd.Write(NixWrapper) 22 | if err != nil { 23 | fd.Close() 24 | return nil, err 25 | } 26 | } else { 27 | fd, err = os.Open(path) 28 | if err != nil { 29 | return nil, err 30 | } 31 | } 32 | return fd, nil 33 | } 34 | -------------------------------------------------------------------------------- /provider/nix_conf_wrapper.nix: -------------------------------------------------------------------------------- 1 | { nixpkgs ? 2 | , system ? builtins.currentSystem 3 | , settings ? "{}" 4 | , configuration 5 | }: 6 | let 7 | inherit (builtins) 8 | concatStringsSep 9 | fromJSON 10 | ; 11 | 12 | concat = concatStringsSep " "; 13 | 14 | ## 15 | 16 | configurationModule = { config, lib, pkgs, ... }: 17 | { imports = [ configuration ]; 18 | config = fromJSON settings; 19 | }; 20 | os = import "${nixpkgs}/nixos" 21 | { inherit system; 22 | configuration = configurationModule; 23 | }; 24 | in { 25 | currentSystem = system; 26 | 27 | # nix conf 28 | substituters = concat os.config.nix.binaryCaches; 29 | trusted-public-keys = concat os.config.nix.binaryCachePublicKeys; 30 | 31 | drv_path = os.config.system.build.toplevel.drvPath; 32 | out_path = os.config.system.build.toplevel; 33 | } 34 | -------------------------------------------------------------------------------- /provider/os.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | type File interface { 8 | Name() string 9 | Seek(offset int64, whence int) (ret int64, err error) 10 | Read(b []byte) (n int, err error) 11 | Write(b []byte) (n int, err error) 12 | Close() error 13 | } 14 | 15 | type TempFile struct { 16 | *os.File 17 | } 18 | 19 | func (fd TempFile) Close() error { 20 | _ = fd.File.Close() 21 | return os.Remove(fd.Name()) 22 | } 23 | 24 | func CreateTemp(name string) (*TempFile, error) { 25 | fd, err := os.CreateTemp("", name) 26 | if err != nil { 27 | return nil, err 28 | } 29 | return &TempFile{File: fd}, nil 30 | } 31 | 32 | var ( 33 | _ File = TempFile{} 34 | ) 35 | -------------------------------------------------------------------------------- /release.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import {}, lib ? pkgs.lib, ... }: let 2 | terraform = pkgs.terraform_1; 3 | mkProvider = terraform.plugins.mkProvider; 4 | in terraform.withPlugins (p: [ 5 | (mkProvider rec { 6 | owner = "corpix"; 7 | repo = "terraform-provider-nixos"; 8 | rev = "0.0.14"; 9 | version = rev; 10 | sha256 = "sha256-4QATev3WtwpEwc4/+JjOBfvUVzUre15VZT7tXLkSrXM="; 11 | vendorSha256 = null; 12 | provider-source-address = "registry.terraform.io/corpix/nixos"; 13 | }) 14 | ]) 15 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | /.terraform 2 | /.terraform.lock.hcl -------------------------------------------------------------------------------- /test/secrets/key1: -------------------------------------------------------------------------------- 1 | i am key1 -------------------------------------------------------------------------------- /test/secrets/subdir/key2: -------------------------------------------------------------------------------- 1 | i am key2 -------------------------------------------------------------------------------- /test/test.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: { 2 | config = { 3 | fileSystems.rootfs = { 4 | label = "rootfs"; 5 | device = "/dev/sda"; 6 | fsType = "ext4"; 7 | mountPoint = "/"; 8 | }; 9 | boot.loader.grub.devices = ["/dev/sda"]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/agext/levenshtein/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore docs files 2 | _gh_pages 3 | _site 4 | 5 | # Ignore temporary files 6 | README.html 7 | coverage.out 8 | .tmp 9 | 10 | # Numerous always-ignore extensions 11 | *.diff 12 | *.err 13 | *.log 14 | *.orig 15 | *.rej 16 | *.swo 17 | *.swp 18 | *.vi 19 | *.zip 20 | *~ 21 | 22 | # OS or Editor folders 23 | ._* 24 | .cache 25 | .DS_Store 26 | .idea 27 | .project 28 | .settings 29 | .tmproj 30 | *.esproj 31 | *.sublime-project 32 | *.sublime-workspace 33 | nbproject 34 | Thumbs.db 35 | 36 | # Komodo 37 | .komodotools 38 | *.komodoproject 39 | 40 | # SCSS-Lint 41 | scss-lint-report.xml 42 | 43 | # grunt-contrib-sass cache 44 | .sass-cache 45 | 46 | # Jekyll metadata 47 | docs/.jekyll-metadata 48 | 49 | # Folders to ignore 50 | .build 51 | .test 52 | bower_components 53 | node_modules 54 | -------------------------------------------------------------------------------- /vendor/github.com/agext/levenshtein/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | matrix: 4 | fast_finish: true 5 | include: 6 | - go: 1.11.x 7 | env: TEST_METHOD=goveralls 8 | - go: 1.10.x 9 | - go: tip 10 | - go: 1.9.x 11 | - go: 1.8.x 12 | - go: 1.7.x 13 | - go: 1.6.x 14 | - go: 1.5.x 15 | allow_failures: 16 | - go: tip 17 | - go: 1.9.x 18 | - go: 1.8.x 19 | - go: 1.7.x 20 | - go: 1.6.x 21 | - go: 1.5.x 22 | script: ./test.sh $TEST_METHOD 23 | notifications: 24 | email: 25 | on_success: never 26 | -------------------------------------------------------------------------------- /vendor/github.com/agext/levenshtein/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alex Bucataru (@AlexBucataru) 2 | -------------------------------------------------------------------------------- /vendor/github.com/agext/levenshtein/NOTICE: -------------------------------------------------------------------------------- 1 | Alrux Go EXTensions (AGExt) - package levenshtein 2 | Copyright 2016 ALRUX Inc. 3 | 4 | This product includes software developed at ALRUX Inc. 5 | (http://www.alrux.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/agext/levenshtein/test.sh: -------------------------------------------------------------------------------- 1 | set -ev 2 | 3 | if [[ "$1" == "goveralls" ]]; then 4 | echo "Testing with goveralls..." 5 | go get github.com/mattn/goveralls 6 | $HOME/gopath/bin/goveralls -service=travis-ci 7 | else 8 | echo "Testing with go test..." 9 | go test -v ./... 10 | fi 11 | -------------------------------------------------------------------------------- /vendor/github.com/apparentlymart/go-textseg/v13/textseg/generate.go: -------------------------------------------------------------------------------- 1 | package textseg 2 | 3 | //go:generate go run make_tables.go -output tables.go 4 | //go:generate go run make_test_tables.go -output tables_test.go 5 | //go:generate ruby unicode2ragel.rb --url=https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt -m GraphemeCluster -p "Prepend,CR,LF,Control,Extend,Regional_Indicator,SpacingMark,L,V,T,LV,LVT,ZWJ" -o grapheme_clusters_table.rl 6 | //go:generate ruby unicode2ragel.rb --url=https://www.unicode.org/Public/13.0.0/ucd/emoji/emoji-data.txt -m Emoji -p "Extended_Pictographic" -o emoji_table.rl 7 | //go:generate ragel -Z grapheme_clusters.rl 8 | //go:generate gofmt -w grapheme_clusters.go 9 | -------------------------------------------------------------------------------- /vendor/github.com/apparentlymart/go-textseg/v13/textseg/utf8_seqs.go: -------------------------------------------------------------------------------- 1 | package textseg 2 | 3 | import "unicode/utf8" 4 | 5 | // ScanGraphemeClusters is a split function for bufio.Scanner that splits 6 | // on UTF8 sequence boundaries. 7 | // 8 | // This is included largely for completeness, since this behavior is already 9 | // built in to Go when ranging over a string. 10 | func ScanUTF8Sequences(data []byte, atEOF bool) (int, []byte, error) { 11 | if len(data) == 0 { 12 | return 0, nil, nil 13 | } 14 | r, seqLen := utf8.DecodeRune(data) 15 | if r == utf8.RuneError && !atEOF { 16 | return 0, nil, nil 17 | } 18 | return seqLen, data[:seqLen], nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/awnumar/memcall/README.md: -------------------------------------------------------------------------------- 1 | memcall 2 | ------- 3 | 4 | [![Cirrus CI](https://api.cirrus-ci.com/github/awnumar/memcall.svg)](https://cirrus-ci.com/github/awnumar/memcall) 5 | [![GoDoc](https://godoc.org/github.com/awnumar/memcall?status.svg)](https://godoc.org/github.com/awnumar/memcall) 6 | [![Go Report Card](https://goreportcard.com/badge/github.com/awnumar/memcall)](https://goreportcard.com/report/github.com/awnumar/memcall) 7 | 8 | This package provides a cross-platform wrapper over some common memory-related system calls. 9 | 10 | Please report any issues that you experience. 11 | -------------------------------------------------------------------------------- /vendor/github.com/awnumar/memguard/AUTHORS: -------------------------------------------------------------------------------- 1 | # Entries should be added alphabetically in the form: 2 | # Name or Organization 3 | 4 | Andrew LeFevre 5 | Awn Umar 6 | Carlo Alberto Ferraris 7 | dotcppfile 8 | Fedor Korotkov 9 | Jam Adams 10 | Joseph Richey 11 | Neven Sajko 12 | Paul Zeinlinger 13 | -------------------------------------------------------------------------------- /vendor/github.com/awnumar/memguard/core/auxiliary.go: -------------------------------------------------------------------------------- 1 | package core 2 | 3 | import ( 4 | "os" 5 | "unsafe" 6 | ) 7 | 8 | var ( 9 | // Ascertain and store the system memory page size. 10 | pageSize = os.Getpagesize() 11 | ) 12 | 13 | // Round a length to a multiple of the system page size. 14 | func roundToPageSize(length int) int { 15 | return (length + (pageSize - 1)) & (^(pageSize - 1)) 16 | } 17 | 18 | // Convert a pointer and length to a byte slice that describes that memory. 19 | func getBytes(ptr *byte, len int) []byte { 20 | var sl = struct { 21 | addr uintptr 22 | len int 23 | cap int 24 | }{uintptr(unsafe.Pointer(ptr)), len, len} 25 | return *(*[]byte)(unsafe.Pointer(&sl)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/awnumar/memguard/core/init.go: -------------------------------------------------------------------------------- 1 | package core 2 | 3 | import ( 4 | "github.com/awnumar/memcall" 5 | ) 6 | 7 | func init() { 8 | memcall.DisableCoreDumps() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/awnumar/memguard/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8.x 4 | - tip 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/mattn/go-colorable" 6 | packages = ["."] 7 | revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" 8 | version = "v0.0.9" 9 | 10 | [[projects]] 11 | name = "github.com/mattn/go-isatty" 12 | packages = ["."] 13 | revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" 14 | version = "v0.0.3" 15 | 16 | [[projects]] 17 | branch = "master" 18 | name = "golang.org/x/sys" 19 | packages = ["unix"] 20 | revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" 21 | 22 | [solve-meta] 23 | analyzer-name = "dep" 24 | analyzer-version = 1 25 | inputs-digest = "e8a50671c3cb93ea935bf210b1cd20702876b9d9226129be581ef646d1565cdc" 26 | solver-name = "gps-cdcl" 27 | solver-version = 1 28 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/mattn/go-colorable" 26 | version = "0.0.9" 27 | 28 | [[constraint]] 29 | name = "github.com/mattn/go-isatty" 30 | version = "0.0.3" 31 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/ptypes/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package ptypes provides functionality for interacting with well-known types. 6 | // 7 | // Deprecated: Well-known types have specialized functionality directly 8 | // injected into the generated packages for each message type. 9 | // See the deprecation notice for each function for the suggested alternative. 10 | package ptypes 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_panic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego 6 | // +build purego 7 | 8 | package cmp 9 | 10 | import "reflect" 11 | 12 | const supportExporters = false 13 | 14 | func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value { 15 | panic("no support for forcibly accessing unexported fields") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !cmp_debug 6 | // +build !cmp_debug 7 | 8 | package diff 9 | 10 | var debug debugger 11 | 12 | type debugger struct{} 13 | 14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 15 | return f 16 | } 17 | func (debugger) Update() {} 18 | func (debugger) Finish() {} 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/convert/conversion_capsule.go: -------------------------------------------------------------------------------- 1 | package convert 2 | 3 | import ( 4 | "github.com/hashicorp/go-cty/cty" 5 | ) 6 | 7 | func conversionToCapsule(inTy, outTy cty.Type, fn func(inTy cty.Type) func(cty.Value, cty.Path) (interface{}, error)) conversion { 8 | rawConv := fn(inTy) 9 | if rawConv == nil { 10 | return nil 11 | } 12 | 13 | return func(in cty.Value, path cty.Path) (cty.Value, error) { 14 | rawV, err := rawConv(in, path) 15 | if err != nil { 16 | return cty.NilVal, err 17 | } 18 | return cty.CapsuleVal(outTy, rawV), nil 19 | } 20 | } 21 | 22 | func conversionFromCapsule(inTy, outTy cty.Type, fn func(outTy cty.Type) func(interface{}, cty.Path) (cty.Value, error)) conversion { 23 | rawConv := fn(outTy) 24 | if rawConv == nil { 25 | return nil 26 | } 27 | 28 | return func(in cty.Value, path cty.Path) (cty.Value, error) { 29 | return rawConv(in.EncapsulatedValue(), path) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/gocty/doc.go: -------------------------------------------------------------------------------- 1 | // Package gocty deals with converting between cty Values and native go 2 | // values. 3 | // 4 | // It operates under a similar principle to the encoding/json and 5 | // encoding/xml packages in the standard library, using reflection to 6 | // populate native Go data structures from cty values and vice-versa. 7 | package gocty 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/json/doc.go: -------------------------------------------------------------------------------- 1 | // Package json provides functions for serializing cty types and values in 2 | // JSON format, and for decoding them again. 3 | // 4 | // Since the cty type system is a superset of the JSON type system, 5 | // round-tripping through JSON is lossy unless type information is provided 6 | // both at encoding time and decoding time. Callers of this package are 7 | // therefore suggested to define their expected structure as a cty.Type 8 | // and pass it in consistently both when encoding and when decoding, though 9 | // default (type-lossy) behavior is provided for situations where the precise 10 | // representation of the data is not significant. 11 | package json 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/json/type.go: -------------------------------------------------------------------------------- 1 | package json 2 | 3 | import ( 4 | "github.com/hashicorp/go-cty/cty" 5 | ) 6 | 7 | // MarshalType returns a JSON serialization of the given type. 8 | // 9 | // This is just a thin wrapper around t.MarshalJSON, for symmetry with 10 | // UnmarshalType. 11 | func MarshalType(t cty.Type) ([]byte, error) { 12 | return t.MarshalJSON() 13 | } 14 | 15 | // UnmarshalType decodes a JSON serialization of the given type as produced 16 | // by either Type.MarshalJSON or MarshalType. 17 | // 18 | // This is a convenience wrapper around Type.UnmarshalJSON. 19 | func UnmarshalType(buf []byte) (cty.Type, error) { 20 | var t cty.Type 21 | err := t.UnmarshalJSON(buf) 22 | return t, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/msgpack/doc.go: -------------------------------------------------------------------------------- 1 | // Package msgpack provides functions for serializing cty values in the 2 | // msgpack encoding, and decoding them again. 3 | // 4 | // If the same type information is provided both at encoding and decoding time 5 | // then values can be round-tripped without loss, except for capsule types 6 | // which are not currently supported. 7 | // 8 | // If any unknown values are passed to Marshal then they will be represented 9 | // using a msgpack extension with type code zero, which is understood by 10 | // the Unmarshal function within this package but will not be understood by 11 | // a generic (non-cty-aware) msgpack decoder. Ensure that no unknown values 12 | // are used if interoperability with other msgpack implementations is 13 | // required. 14 | package msgpack 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/msgpack/dynamic.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/hashicorp/go-cty/cty" 7 | "github.com/vmihailenco/msgpack" 8 | ) 9 | 10 | type dynamicVal struct { 11 | Value cty.Value 12 | Path cty.Path 13 | } 14 | 15 | func (dv *dynamicVal) MarshalMsgpack() ([]byte, error) { 16 | // Rather than defining a msgpack-specific serialization of types, 17 | // instead we use the existing JSON serialization. 18 | typeJSON, err := dv.Value.Type().MarshalJSON() 19 | if err != nil { 20 | return nil, dv.Path.NewErrorf("failed to serialize type: %s", err) 21 | } 22 | var buf bytes.Buffer 23 | enc := msgpack.NewEncoder(&buf) 24 | enc.EncodeArrayLen(2) 25 | enc.EncodeBytes(typeJSON) 26 | err = marshal(dv.Value, dv.Value.Type(), dv.Path, enc) 27 | if err != nil { 28 | return nil, err 29 | } 30 | return buf.Bytes(), nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/msgpack/infinity.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | import ( 4 | "math" 5 | ) 6 | 7 | var negativeInfinity = math.Inf(-1) 8 | var positiveInfinity = math.Inf(1) 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/msgpack/unknown.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | type unknownType struct{} 4 | 5 | var unknownVal = unknownType{} 6 | 7 | // unknownValBytes is the raw bytes of the msgpack fixext1 value we 8 | // write to represent an unknown value. It's an extension value of 9 | // type zero whose value is irrelevant. Since it's irrelevant, we 10 | // set it to a single byte whose value is also zero, since that's 11 | // the most compact possible representation. 12 | var unknownValBytes = []byte{0xd4, 0, 0} 13 | 14 | func (uv unknownType) MarshalMsgpack() ([]byte, error) { 15 | return unknownValBytes, nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/null.go: -------------------------------------------------------------------------------- 1 | package cty 2 | 3 | // NullVal returns a null value of the given type. A null can be created of any 4 | // type, but operations on such values will always panic. Calling applications 5 | // are encouraged to use nulls only sparingly, particularly when user-provided 6 | // expressions are to be evaluated, since the precence of nulls creates a 7 | // much higher chance of evaluation errors that can't be caught by a type 8 | // checker. 9 | func NullVal(t Type) Value { 10 | return Value{ 11 | ty: t, 12 | v: nil, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cty/cty/set/iterator.go: -------------------------------------------------------------------------------- 1 | package set 2 | 3 | type Iterator struct { 4 | vals []interface{} 5 | idx int 6 | } 7 | 8 | func (it *Iterator) Value() interface{} { 9 | return it.vals[it.idx] 10 | } 11 | 12 | func (it *Iterator) Next() bool { 13 | it.idx++ 14 | return it.idx < len(it.vals) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-hclog/.gitignore: -------------------------------------------------------------------------------- 1 | .idea* -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-hclog/colorize_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package hclog 5 | 6 | import ( 7 | "github.com/mattn/go-isatty" 8 | ) 9 | 10 | // setColorization will mutate the values of this logger 11 | // to approperately configure colorization options. It provides 12 | // a wrapper to the output stream on Windows systems. 13 | func (l *intLogger) setColorization(opts *LoggerOptions) { 14 | switch opts.Color { 15 | case ColorOff: 16 | fallthrough 17 | case ForceColor: 18 | return 19 | case AutoColor: 20 | fi := l.checkWriterIsFile() 21 | isUnixTerm := isatty.IsTerminal(fi.Fd()) 22 | isCygwinTerm := isatty.IsCygwinTerminal(fi.Fd()) 23 | isTerm := isUnixTerm || isCygwinTerm 24 | if !isTerm { 25 | l.headerColor = ColorOff 26 | l.writer.color = ColorOff 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/flatten.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Flatten flattens the given error, merging any *Errors together into 4 | // a single *Error. 5 | func Flatten(err error) error { 6 | // If it isn't an *Error, just return the error as-is 7 | if _, ok := err.(*Error); !ok { 8 | return err 9 | } 10 | 11 | // Otherwise, make the result and flatten away! 12 | flatErr := new(Error) 13 | flatten(err, flatErr) 14 | return flatErr 15 | } 16 | 17 | func flatten(err error, flatErr *Error) { 18 | switch err := err.(type) { 19 | case *Error: 20 | for _, e := range err.Errors { 21 | flatten(e, flatErr) 22 | } 23 | default: 24 | flatErr.Errors = append(flatErr.Errors, err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/format.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // ErrorFormatFunc is a function callback that is called by Error to 9 | // turn the list of errors into a string. 10 | type ErrorFormatFunc func([]error) string 11 | 12 | // ListFormatFunc is a basic formatter that outputs the number of errors 13 | // that occurred along with a bullet point list of the errors. 14 | func ListFormatFunc(es []error) string { 15 | if len(es) == 1 { 16 | return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) 17 | } 18 | 19 | points := make([]string, len(es)) 20 | for i, err := range es { 21 | points[i] = fmt.Sprintf("* %s", err) 22 | } 23 | 24 | return fmt.Sprintf( 25 | "%d errors occurred:\n\t%s\n\n", 26 | len(es), strings.Join(points, "\n\t")) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/sort.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Len implements sort.Interface function for length 4 | func (err Error) Len() int { 5 | return len(err.Errors) 6 | } 7 | 8 | // Swap implements sort.Interface function for swapping elements 9 | func (err Error) Swap(i, j int) { 10 | err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] 11 | } 12 | 13 | // Less implements sort.Interface function for determining order 14 | func (err Error) Less(i, j int) bool { 15 | return err.Errors[i].Error() < err.Errors[j].Error() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/discover.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | // Discover discovers plugins that are in a given directory. 8 | // 9 | // The directory doesn't need to be absolute. For example, "." will work fine. 10 | // 11 | // This currently assumes any file matching the glob is a plugin. 12 | // In the future this may be smarter about checking that a file is 13 | // executable and so on. 14 | // 15 | // TODO: test 16 | func Discover(glob, dir string) ([]string, error) { 17 | var err error 18 | 19 | // Make the directory absolute if it isn't already 20 | if !filepath.IsAbs(dir) { 21 | dir, err = filepath.Abs(dir) 22 | if err != nil { 23 | return nil, err 24 | } 25 | } 26 | 27 | return filepath.Glob(filepath.Join(dir, glob)) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/error.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | // This is a type that wraps error types so that they can be messaged 4 | // across RPC channels. Since "error" is an interface, we can't always 5 | // gob-encode the underlying structure. This is a valid error interface 6 | // implementer that we will push across. 7 | type BasicError struct { 8 | Message string 9 | } 10 | 11 | // NewBasicError is used to create a BasicError. 12 | // 13 | // err is allowed to be nil. 14 | func NewBasicError(err error) *BasicError { 15 | if err == nil { 16 | return nil 17 | } 18 | 19 | return &BasicError{err.Error()} 20 | } 21 | 22 | func (e *BasicError) Error() string { 23 | return e.Message 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/grpc_controller.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/hashicorp/go-plugin/internal/plugin" 7 | ) 8 | 9 | // GRPCControllerServer handles shutdown calls to terminate the server when the 10 | // plugin client is closed. 11 | type grpcControllerServer struct { 12 | server *GRPCServer 13 | } 14 | 15 | // Shutdown stops the grpc server. It first will attempt a graceful stop, then a 16 | // full stop on the server. 17 | func (s *grpcControllerServer) Shutdown(ctx context.Context, _ *plugin.Empty) (*plugin.Empty, error) { 18 | resp := &plugin.Empty{} 19 | 20 | // TODO: figure out why GracefullStop doesn't work. 21 | s.server.Stop() 22 | return resp, nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/internal/plugin/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc -I ./ ./grpc_broker.proto ./grpc_controller.proto ./grpc_stdio.proto --go_out=plugins=grpc:. 2 | 3 | package plugin 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package plugin; 3 | option go_package = "plugin"; 4 | 5 | message ConnInfo { 6 | uint32 service_id = 1; 7 | string network = 2; 8 | string address = 3; 9 | } 10 | 11 | service GRPCBroker { 12 | rpc StartStream(stream ConnInfo) returns (stream ConnInfo); 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package plugin; 3 | option go_package = "plugin"; 4 | 5 | message Empty { 6 | } 7 | 8 | // The GRPCController is responsible for telling the plugin server to shutdown. 9 | service GRPCController { 10 | rpc Shutdown(Empty) returns (Empty); 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/process.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // pidAlive checks whether a pid is alive. 8 | func pidAlive(pid int) bool { 9 | return _pidAlive(pid) 10 | } 11 | 12 | // pidWait blocks for a process to exit. 13 | func pidWait(pid int) error { 14 | ticker := time.NewTicker(1 * time.Second) 15 | defer ticker.Stop() 16 | 17 | for range ticker.C { 18 | if !pidAlive(pid) { 19 | break 20 | } 21 | } 22 | 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/process_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package plugin 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | // _pidAlive tests whether a process is alive or not by sending it Signal 0, 11 | // since Go otherwise has no way to test this. 12 | func _pidAlive(pid int) bool { 13 | proc, err := os.FindProcess(pid) 14 | if err == nil { 15 | err = proc.Signal(syscall.Signal(0)) 16 | } 17 | 18 | return err == nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/process_windows.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | const ( 8 | // Weird name but matches the MSDN docs 9 | exit_STILL_ACTIVE = 259 10 | 11 | processDesiredAccess = syscall.STANDARD_RIGHTS_READ | 12 | syscall.PROCESS_QUERY_INFORMATION | 13 | syscall.SYNCHRONIZE 14 | ) 15 | 16 | // _pidAlive tests whether a process is alive or not 17 | func _pidAlive(pid int) bool { 18 | h, err := syscall.OpenProcess(processDesiredAccess, false, uint32(pid)) 19 | if err != nil { 20 | return false 21 | } 22 | defer syscall.CloseHandle(h) 23 | 24 | var ec uint32 25 | if e := syscall.GetExitCodeProcess(h, &ec); e != nil { 26 | return false 27 | } 28 | 29 | return ec == exit_STILL_ACTIVE 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/server_mux.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | // ServeMuxMap is the type that is used to configure ServeMux 9 | type ServeMuxMap map[string]*ServeConfig 10 | 11 | // ServeMux is like Serve, but serves multiple types of plugins determined 12 | // by the argument given on the command-line. 13 | // 14 | // This command doesn't return until the plugin is done being executed. Any 15 | // errors are logged or output to stderr. 16 | func ServeMux(m ServeMuxMap) { 17 | if len(os.Args) != 2 { 18 | fmt.Fprintf(os.Stderr, 19 | "Invoked improperly. This is an internal command that shouldn't\n"+ 20 | "be manually invoked.\n") 21 | os.Exit(1) 22 | } 23 | 24 | opts, ok := m[os.Args[1]] 25 | if !ok { 26 | fmt.Fprintf(os.Stderr, "Unknown plugin: %s\n", os.Args[1]) 27 | os.Exit(1) 28 | } 29 | 30 | Serve(opts) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-plugin/stream.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "io" 5 | "log" 6 | ) 7 | 8 | func copyStream(name string, dst io.Writer, src io.Reader) { 9 | if src == nil { 10 | panic(name + ": src is nil") 11 | } 12 | if dst == nil { 13 | panic(name + ": dst is nil") 14 | } 15 | if _, err := io.Copy(dst, src); err != nil && err != io.EOF { 16 | log.Printf("[ERR] plugin: stream copy '%s' error: %s", name, err) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | 11 | script: 12 | - go test -bench . -benchmem -v ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/README.md: -------------------------------------------------------------------------------- 1 | # uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) 2 | 3 | Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. 4 | 5 | Documentation 6 | ============= 7 | 8 | The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-uuid). 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-version/version_collection.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | // Collection is a type that implements the sort.Interface interface 4 | // so that versions can be sorted. 5 | type Collection []*Version 6 | 7 | func (v Collection) Len() int { 8 | return len(v) 9 | } 10 | 11 | func (v Collection) Less(i, j int) bool { 12 | return v[i].LessThan(v[j]) 13 | } 14 | 15 | func (v Collection) Swap(i, j int) { 16 | v[i], v[j] = v[j], v[i] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/.go-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/.goreleaser.yml: -------------------------------------------------------------------------------- 1 | project_name: tfinstall 2 | builds: 3 | - env: 4 | - CGO_ENABLED=0 5 | main: ./cmd/hcinstall/main.go 6 | mod_timestamp: '{{ .CommitTimestamp }}' 7 | id: "tfinstall" 8 | binary: tfinstall 9 | flags: 10 | - -trimpath 11 | ldflags: 12 | - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' 13 | goos: 14 | - linux 15 | - darwin 16 | - windows 17 | goarch: 18 | - amd64 19 | - arm 20 | - arm64 21 | archives: 22 | - files: [] 23 | format: zip 24 | name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' 25 | checksum: 26 | name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' 27 | algorithm: sha256 28 | changelog: 29 | skip: true 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/errors/errors.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | type skippableErr struct { 4 | Err error 5 | } 6 | 7 | func (e skippableErr) Error() string { 8 | return e.Err.Error() 9 | } 10 | 11 | func SkippableErr(err error) skippableErr { 12 | return skippableErr{Err: err} 13 | } 14 | 15 | func IsErrorSkippable(err error) bool { 16 | _, ok := err.(skippableErr) 17 | return ok 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/fs/fs.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "io/ioutil" 5 | "log" 6 | "time" 7 | ) 8 | 9 | var ( 10 | defaultTimeout = 10 * time.Second 11 | discardLogger = log.New(ioutil.Discard, "", 0) 12 | ) 13 | 14 | type fileCheckFunc func(path string) error 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/internal/build/go_is_installed.go: -------------------------------------------------------------------------------- 1 | package build 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | 7 | "github.com/hashicorp/go-version" 8 | ) 9 | 10 | // GoIsInstalled represents a checker of whether Go is installed locally 11 | type GoIsInstalled struct { 12 | RequiredVersion version.Constraints 13 | } 14 | 15 | // Check checks whether any Go version is installed locally 16 | func (gii *GoIsInstalled) Check(ctx context.Context) error { 17 | goVersion, err := GetGoVersion(ctx) 18 | if err != nil { 19 | return err 20 | } 21 | 22 | if gii.RequiredVersion != nil && !gii.RequiredVersion.Check(goVersion) { 23 | return fmt.Errorf("go %s required (%s available)", 24 | gii.RequiredVersion, goVersion) 25 | } 26 | 27 | return nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/internal/src/src.go: -------------------------------------------------------------------------------- 1 | package src 2 | 3 | type InstallSrcSigil struct{} 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/internal/validators/validators.go: -------------------------------------------------------------------------------- 1 | package validators 2 | 3 | import "regexp" 4 | 5 | var ( 6 | productNameRe = regexp.MustCompile(`^[a-z0-9-]+$`) 7 | binaryNameRe = regexp.MustCompile(`^[a-zA-Z0-9-_.]+$`) 8 | ) 9 | 10 | // IsProductNameValid provides early user-facing validation of a product name 11 | func IsProductNameValid(productName string) bool { 12 | return productNameRe.MatchString(productName) 13 | } 14 | 15 | // IsBinaryNameValid provides early user-facing validation of binary name 16 | func IsBinaryNameValid(binaryName string) bool { 17 | return binaryNameRe.MatchString(binaryName) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/internal/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | const version = "0.1.0" 4 | 5 | // ModuleVersion returns the current version of the github.com/hashicorp/hc-install Go module. 6 | // This is a function to allow for future possible enhancement using debug.BuildInfo. 7 | func ModuleVersion() string { 8 | return version 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/releases/releases.go: -------------------------------------------------------------------------------- 1 | package releases 2 | 3 | import ( 4 | "io/ioutil" 5 | "log" 6 | "time" 7 | ) 8 | 9 | var ( 10 | defaultInstallTimeout = 30 * time.Second 11 | defaultListTimeout = 10 * time.Second 12 | discardLogger = log.New(ioutil.Discard, "", 0) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hc-install/src/src.go: -------------------------------------------------------------------------------- 1 | package src 2 | 3 | import ( 4 | "context" 5 | "log" 6 | 7 | isrc "github.com/hashicorp/hc-install/internal/src" 8 | ) 9 | 10 | // Source represents an installer, finder, or builder 11 | type Source interface { 12 | IsSourceImpl() isrc.InstallSrcSigil 13 | } 14 | 15 | type Installable interface { 16 | Source 17 | Install(ctx context.Context) (string, error) 18 | } 19 | 20 | type Findable interface { 21 | Source 22 | Find(ctx context.Context) (string, error) 23 | } 24 | 25 | type Buildable interface { 26 | Source 27 | Build(ctx context.Context) (string, error) 28 | } 29 | 30 | type Validatable interface { 31 | Source 32 | Validate() error 33 | } 34 | 35 | type Removable interface { 36 | Source 37 | Remove(ctx context.Context) error 38 | } 39 | 40 | type LoggerSettable interface { 41 | SetLogger(logger *log.Logger) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/didyoumean.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "github.com/agext/levenshtein" 5 | ) 6 | 7 | // nameSuggestion tries to find a name from the given slice of suggested names 8 | // that is close to the given name and returns it if found. If no suggestion 9 | // is close enough, returns the empty string. 10 | // 11 | // The suggestions are tried in order, so earlier suggestions take precedence 12 | // if the given string is similar to two or more suggestions. 13 | // 14 | // This function is intended to be used with a relatively-small number of 15 | // suggestions. It's not optimized for hundreds or thousands of them. 16 | func nameSuggestion(given string, suggestions []string) string { 17 | for _, suggestion := range suggestions { 18 | dist := levenshtein.Distance(given, suggestion, nil) 19 | if dist < 3 { // threshold determined experimentally 20 | return suggestion 21 | } 22 | } 23 | return "" 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/eval_context.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "github.com/zclconf/go-cty/cty" 5 | "github.com/zclconf/go-cty/cty/function" 6 | ) 7 | 8 | // An EvalContext provides the variables and functions that should be used 9 | // to evaluate an expression. 10 | type EvalContext struct { 11 | Variables map[string]cty.Value 12 | Functions map[string]function.Function 13 | parent *EvalContext 14 | } 15 | 16 | // NewChild returns a new EvalContext that is a child of the receiver. 17 | func (ctx *EvalContext) NewChild() *EvalContext { 18 | return &EvalContext{parent: ctx} 19 | } 20 | 21 | // Parent returns the parent of the receiver, or nil if the receiver has 22 | // no parent. 23 | func (ctx *EvalContext) Parent() *EvalContext { 24 | return ctx.parent 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/diagnostics.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | import ( 4 | "github.com/hashicorp/hcl/v2" 5 | ) 6 | 7 | // setDiagEvalContext is an internal helper that will impose a particular 8 | // EvalContext on a set of diagnostics in-place, for any diagnostic that 9 | // does not already have an EvalContext set. 10 | // 11 | // We generally expect diagnostics to be immutable, but this is safe to use 12 | // on any Diagnostics where none of the contained Diagnostic objects have yet 13 | // been seen by a caller. Its purpose is to apply additional context to a 14 | // set of diagnostics produced by a "deeper" component as the stack unwinds 15 | // during expression evaluation. 16 | func setDiagEvalContext(diags hcl.Diagnostics, expr hcl.Expression, ctx *hcl.EvalContext) { 17 | for _, diag := range diags { 18 | if diag.Expression == nil { 19 | diag.Expression = expr 20 | diag.EvalContext = ctx 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/didyoumean.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | import ( 4 | "github.com/agext/levenshtein" 5 | ) 6 | 7 | // nameSuggestion tries to find a name from the given slice of suggested names 8 | // that is close to the given name and returns it if found. If no suggestion 9 | // is close enough, returns the empty string. 10 | // 11 | // The suggestions are tried in order, so earlier suggestions take precedence 12 | // if the given string is similar to two or more suggestions. 13 | // 14 | // This function is intended to be used with a relatively-small number of 15 | // suggestions. It's not optimized for hundreds or thousands of them. 16 | func nameSuggestion(given string, suggestions []string) string { 17 | for _, suggestion := range suggestions { 18 | dist := levenshtein.Distance(given, suggestion, nil) 19 | if dist < 3 { // threshold determined experimentally 20 | return suggestion 21 | } 22 | } 23 | return "" 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/doc.go: -------------------------------------------------------------------------------- 1 | // Package hclsyntax contains the parser, AST, etc for HCL's native language, 2 | // as opposed to the JSON variant. 3 | // 4 | // In normal use applications should rarely depend on this package directly, 5 | // instead preferring the higher-level interface of the main hcl package and 6 | // its companion package hclparse. 7 | package hclsyntax 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/file.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | import ( 4 | "github.com/hashicorp/hcl/v2" 5 | ) 6 | 7 | // File is the top-level object resulting from parsing a configuration file. 8 | type File struct { 9 | Body *Body 10 | Bytes []byte 11 | } 12 | 13 | func (f *File) AsHCLFile() *hcl.File { 14 | return &hcl.File{ 15 | Body: f.Body, 16 | Bytes: f.Bytes, 17 | 18 | // TODO: The Nav object, once we have an implementation of it 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/generate.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | //go:generate go run expression_vars_gen.go 4 | //go:generate ruby unicode2ragel.rb --url=http://www.unicode.org/Public/9.0.0/ucd/DerivedCoreProperties.txt -m UnicodeDerived -p ID_Start,ID_Continue -o unicode_derived.rl 5 | //go:generate ragel -Z scan_tokens.rl 6 | //go:generate gofmt -w scan_tokens.go 7 | //go:generate ragel -Z scan_string_lit.rl 8 | //go:generate gofmt -w scan_string_lit.go 9 | //go:generate stringer -type TokenType -output token_type_string.go 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/keywords.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | import ( 4 | "bytes" 5 | ) 6 | 7 | type Keyword []byte 8 | 9 | var forKeyword = Keyword([]byte{'f', 'o', 'r'}) 10 | var inKeyword = Keyword([]byte{'i', 'n'}) 11 | var ifKeyword = Keyword([]byte{'i', 'f'}) 12 | var elseKeyword = Keyword([]byte{'e', 'l', 's', 'e'}) 13 | var endifKeyword = Keyword([]byte{'e', 'n', 'd', 'i', 'f'}) 14 | var endforKeyword = Keyword([]byte{'e', 'n', 'd', 'f', 'o', 'r'}) 15 | 16 | func (kw Keyword) TokenMatches(token Token) bool { 17 | if token.Type != TokenIdent { 18 | return false 19 | } 20 | return bytes.Equal([]byte(kw), token.Bytes) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/hclsyntax/node.go: -------------------------------------------------------------------------------- 1 | package hclsyntax 2 | 3 | import ( 4 | "github.com/hashicorp/hcl/v2" 5 | ) 6 | 7 | // Node is the abstract type that every AST node implements. 8 | // 9 | // This is a closed interface, so it cannot be implemented from outside of 10 | // this package. 11 | type Node interface { 12 | // This is the mechanism by which the public-facing walk functions 13 | // are implemented. Implementations should call the given function 14 | // for each child node and then replace that node with its return value. 15 | // The return value might just be the same node, for non-transforming 16 | // walks. 17 | walkChildNodes(w internalWalkFunc) 18 | 19 | Range() hcl.Range 20 | } 21 | 22 | type internalWalkFunc func(Node) 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/v2/schema.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | // BlockHeaderSchema represents the shape of a block header, and is 4 | // used for matching blocks within bodies. 5 | type BlockHeaderSchema struct { 6 | Type string 7 | LabelNames []string 8 | } 9 | 10 | // AttributeSchema represents the requirements for an attribute, and is used 11 | // for matching attributes within bodies. 12 | type AttributeSchema struct { 13 | Name string 14 | Required bool 15 | } 16 | 17 | // BodySchema represents the desired shallow structure of a body. 18 | type BodySchema struct { 19 | Attributes []AttributeSchema 20 | Blocks []BlockHeaderSchema 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/logutils/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-exec/internal/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | const version = "0.16.1" 4 | 5 | // ModuleVersion returns the current version of the github.com/hashicorp/terraform-exec Go module. 6 | // This is a function to allow for future possible enhancement using debug.BuildInfo. 7 | func ModuleVersion() string { 8 | return version 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-exec/tfexec/doc.go: -------------------------------------------------------------------------------- 1 | // Package tfexec exposes functionality for constructing and running Terraform 2 | // CLI commands. Structured return values use the data types defined in the 3 | // github.com/hashicorp/terraform-json package. 4 | package tfexec 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-exec/tfexec/workspace_select.go: -------------------------------------------------------------------------------- 1 | package tfexec 2 | 3 | import "context" 4 | 5 | // WorkspaceSelect represents the workspace select subcommand to the Terraform CLI. 6 | func (tf *Terraform) WorkspaceSelect(ctx context.Context, workspace string) error { 7 | // TODO: [DIR] param option 8 | 9 | return tf.runTerraformCmd(ctx, tf.buildTerraformCmd(ctx, nil, "workspace", "select", "-no-color", workspace)) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-json/.gitignore: -------------------------------------------------------------------------------- 1 | .terraform 2 | plan.tfplan 3 | terraform.tfstate.backup 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-json/.go-version: -------------------------------------------------------------------------------- 1 | 1.16 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-json/Makefile: -------------------------------------------------------------------------------- 1 | GOTOOLS = \ 2 | gotest.tools/gotestsum@latest 3 | 4 | test: tools 5 | gotestsum --format=short-verbose $(TEST) $(TESTARGS) 6 | 7 | generate: 8 | cd testdata && make generate 9 | 10 | modules: 11 | go mod download && go mod verify 12 | 13 | test-circle: 14 | mkdir -p test-results/terraform-json 15 | gotestsum --format=short-verbose --junitfile test-results/terraform-json/results.xml 16 | 17 | tools: 18 | @echo $(GOTOOLS) | xargs -t -n1 go install 19 | go mod tidy 20 | 21 | .PHONY: test generate modules test-circle tools 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-json/tfjson.go: -------------------------------------------------------------------------------- 1 | // Package tfjson is a de-coupled helper library containing types for 2 | // the plan format output by "terraform show -json" command. This 3 | // command is designed for the export of Terraform plan data in 4 | // a format that can be easily processed by tools unrelated to 5 | // Terraform. 6 | // 7 | // This format is stable and should be used over the binary plan data 8 | // whenever possible. 9 | package tfjson 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-json/version.go: -------------------------------------------------------------------------------- 1 | package tfjson 2 | 3 | // VersionOutput represents output from the version -json command 4 | // added in v0.13 5 | type VersionOutput struct { 6 | Version string `json:"terraform_version"` 7 | Revision string `json:"terraform_revision"` 8 | Platform string `json:"platform,omitempty"` 9 | ProviderSelections map[string]string `json:"provider_selections"` 10 | Outdated bool `json:"terraform_outdated"` 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/doc.go: -------------------------------------------------------------------------------- 1 | // Package logging contains shared environment variable and log functionality. 2 | package logging 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol.go: -------------------------------------------------------------------------------- 1 | package logging 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/hashicorp/terraform-plugin-log/tfsdklog" 7 | ) 8 | 9 | const ( 10 | // SubsystemProto is the tfsdklog subsystem name for protocol logging. 11 | SubsystemProto = "proto" 12 | ) 13 | 14 | // ProtocolError emits a protocol subsystem log at ERROR level. 15 | func ProtocolError(ctx context.Context, msg string, additionalFields ...map[string]interface{}) { 16 | tfsdklog.SubsystemError(ctx, SubsystemProto, msg, additionalFields...) 17 | } 18 | 19 | // ProtocolTrace emits a protocol subsystem log at TRACE level. 20 | func ProtocolTrace(ctx context.Context, msg string, additionalFields ...map[string]interface{}) { 21 | tfsdklog.SubsystemTrace(ctx, SubsystemProto, msg, additionalFields...) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/provider.go: -------------------------------------------------------------------------------- 1 | package logging 2 | 3 | import ( 4 | "log" 5 | "strings" 6 | 7 | tfaddr "github.com/hashicorp/terraform-registry-address" 8 | ) 9 | 10 | func ProviderLoggerName(providerAddress string) string { 11 | provider, err := tfaddr.ParseRawProviderSourceString(providerAddress) 12 | 13 | if err != nil { 14 | log.Printf("[ERROR] Error parsing provider name %q: %s", providerAddress, err) 15 | return "" 16 | } 17 | 18 | return strings.ReplaceAll(provider.Type, "-", "_") 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/state.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov5" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" 6 | ) 7 | 8 | func RawState(in *tfplugin5.RawState) *tfprotov5.RawState { 9 | return &tfprotov5.RawState{ 10 | JSON: in.Json, 11 | Flatmap: in.Flatmap, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/string_kind.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov5" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" 6 | ) 7 | 8 | func StringKind(in tfplugin5.StringKind) tfprotov5.StringKind { 9 | return tfprotov5.StringKind(in) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/types.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov5" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" 6 | ) 7 | 8 | func DynamicValue(in *tfplugin5.DynamicValue) *tfprotov5.DynamicValue { 9 | return &tfprotov5.DynamicValue{ 10 | MsgPack: in.Msgpack, 11 | JSON: in.Json, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/state.go: -------------------------------------------------------------------------------- 1 | package toproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov5" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" 6 | ) 7 | 8 | func RawState(in *tfprotov5.RawState) *tfplugin5.RawState { 9 | return &tfplugin5.RawState{ 10 | Json: in.JSON, 11 | Flatmap: in.Flatmap, 12 | } 13 | } 14 | 15 | // we have to say this next thing to get golint to stop yelling at us about the 16 | // underscores in the function names. We want the function names to match 17 | // actually-generated code, so it feels like fair play. It's just a shame we 18 | // lose golint for the entire file. 19 | // 20 | // This file is not actually generated. You can edit it. Ignore this next line. 21 | // Code generated by hand ignore this next bit DO NOT EDIT. 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/string_kind.go: -------------------------------------------------------------------------------- 1 | package toproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov5" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" 6 | ) 7 | 8 | func StringKind(in tfprotov5.StringKind) tfplugin5.StringKind { 9 | return tfplugin5.StringKind(in) 10 | } 11 | 12 | // we have to say this next thing to get golint to stop yelling at us about the 13 | // underscores in the function names. We want the function names to match 14 | // actually-generated code, so it feels like fair play. It's just a shame we 15 | // lose golint for the entire file. 16 | // 17 | // This file is not actually generated. You can edit it. Ignore this next line. 18 | // Code generated by hand ignore this next bit DO NOT EDIT. 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/string_kind.go: -------------------------------------------------------------------------------- 1 | package tfprotov5 2 | 3 | const ( 4 | // StringKindPlain indicates a string is plaintext, and should be 5 | // interpreted as having no formatting information. 6 | StringKindPlain StringKind = 0 7 | 8 | // StringKindMarkdown indicates a string is markdown-formatted, and 9 | // should be rendered using a Markdown renderer to correctly display 10 | // its formatting. 11 | StringKindMarkdown StringKind = 1 12 | ) 13 | 14 | // StringKind indicates a formatting or encoding scheme for a string. 15 | type StringKind int32 16 | 17 | func (s StringKind) String() string { 18 | switch s { 19 | case 0: 20 | return "PLAIN" 21 | case 1: 22 | return "MARKDOWN" 23 | } 24 | return "UNKNOWN" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/doc.go: -------------------------------------------------------------------------------- 1 | // Package tf5server implements a server implementation to run 2 | // tfprotov5.ProviderServers as gRPC servers. 3 | // 4 | // Providers will likely be calling tf5server.Serve from their main function to 5 | // start the server so Terraform can connect to it. 6 | package tf5server 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/state.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov6" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" 6 | ) 7 | 8 | func RawState(in *tfplugin6.RawState) *tfprotov6.RawState { 9 | return &tfprotov6.RawState{ 10 | JSON: in.Json, 11 | Flatmap: in.Flatmap, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/string_kind.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov6" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" 6 | ) 7 | 8 | func StringKind(in tfplugin6.StringKind) tfprotov6.StringKind { 9 | return tfprotov6.StringKind(in) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/types.go: -------------------------------------------------------------------------------- 1 | package fromproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov6" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" 6 | ) 7 | 8 | func DynamicValue(in *tfplugin6.DynamicValue) *tfprotov6.DynamicValue { 9 | return &tfprotov6.DynamicValue{ 10 | MsgPack: in.Msgpack, 11 | JSON: in.Json, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/state.go: -------------------------------------------------------------------------------- 1 | package toproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov6" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" 6 | ) 7 | 8 | func RawState(in *tfprotov6.RawState) *tfplugin6.RawState { 9 | return &tfplugin6.RawState{ 10 | Json: in.JSON, 11 | Flatmap: in.Flatmap, 12 | } 13 | } 14 | 15 | // we have to say this next thing to get golint to stop yelling at us about the 16 | // underscores in the function names. We want the function names to match 17 | // actually-generated code, so it feels like fair play. It's just a shame we 18 | // lose golint for the entire file. 19 | // 20 | // This file is not actually generated. You can edit it. Ignore this next line. 21 | // Code generated by hand ignore this next bit DO NOT EDIT. 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/string_kind.go: -------------------------------------------------------------------------------- 1 | package toproto 2 | 3 | import ( 4 | "github.com/hashicorp/terraform-plugin-go/tfprotov6" 5 | "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" 6 | ) 7 | 8 | func StringKind(in tfprotov6.StringKind) tfplugin6.StringKind { 9 | return tfplugin6.StringKind(in) 10 | } 11 | 12 | // we have to say this next thing to get golint to stop yelling at us about the 13 | // underscores in the function names. We want the function names to match 14 | // actually-generated code, so it feels like fair play. It's just a shame we 15 | // lose golint for the entire file. 16 | // 17 | // This file is not actually generated. You can edit it. Ignore this next line. 18 | // Code generated by hand ignore this next bit DO NOT EDIT. 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/string_kind.go: -------------------------------------------------------------------------------- 1 | package tfprotov6 2 | 3 | const ( 4 | // StringKindPlain indicates a string is plaintext, and should be 5 | // interpreted as having no formatting information. 6 | StringKindPlain StringKind = 0 7 | 8 | // StringKindMarkdown indicates a string is markdown-formatted, and 9 | // should be rendered using a Markdown renderer to correctly display 10 | // its formatting. 11 | StringKindMarkdown StringKind = 1 12 | ) 13 | 14 | // StringKind indicates a formatting or encoding scheme for a string. 15 | type StringKind int32 16 | 17 | func (s StringKind) String() string { 18 | switch s { 19 | case 0: 20 | return "PLAIN" 21 | case 1: 22 | return "MARKDOWN" 23 | } 24 | return "UNKNOWN" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server/doc.go: -------------------------------------------------------------------------------- 1 | // Package tf6server implements a server implementation to run 2 | // tfprotov6.ProviderServers as gRPC servers. 3 | // 4 | // Providers will likely be calling tf6server.Serve from their main function to 5 | // start the server so Terraform can connect to it. 6 | package tf6server 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-go/tftypes/unknown_value.go: -------------------------------------------------------------------------------- 1 | package tftypes 2 | 3 | const ( 4 | // UnknownValue represents a value that is not yet known. It can be the 5 | // value of any type. 6 | UnknownValue = unknown(0) 7 | ) 8 | 9 | type unknown byte 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-log/tflog/doc.go: -------------------------------------------------------------------------------- 1 | // Package tflog provides helper functions for writing log output and creating 2 | // loggers for Terraform plugins. 3 | // 4 | // For most plugin authors, building on an SDK or framework, the SDK or 5 | // framework will take care of injecting a logger using New. 6 | // 7 | // tflog also allows plugin authors to create subsystem loggers, which are 8 | // loggers for sufficiently distinct areas of the codebase or concerns. The 9 | // benefit of using distinct loggers for these concerns is doing so allows 10 | // plugin authors and practitioners to configure different log levels for each 11 | // subsystem's log, allowing log output to be turned on or off without 12 | // recompiling. 13 | package tflog 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-log/tfsdklog/doc.go: -------------------------------------------------------------------------------- 1 | // Package tfsdklog provides helper functions for logging from SDKs and 2 | // frameworks for building Terraform plugins. 3 | // 4 | // Plugin authors shouldn't need to use this package; it is meant for authors 5 | // of the frameworks and SDKs for plugins. Plugin authors should use the tflog 6 | // package. 7 | // 8 | // This package provides very similar functionality to tflog, except it uses a 9 | // separate namespace for its logs. 10 | package tfsdklog 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/json.go: -------------------------------------------------------------------------------- 1 | package resource 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | ) 7 | 8 | func unmarshalJSON(data []byte, v interface{}) error { 9 | dec := json.NewDecoder(bytes.NewReader(data)) 10 | dec.UseNumber() 11 | return dec.Decode(v) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing_config.go: -------------------------------------------------------------------------------- 1 | package resource 2 | 3 | import ( 4 | "context" 5 | "errors" 6 | "fmt" 7 | 8 | "github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging" 9 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" 10 | ) 11 | 12 | func testStepTaint(ctx context.Context, state *terraform.State, step TestStep) error { 13 | if len(step.Taint) == 0 { 14 | return nil 15 | } 16 | 17 | logging.HelperResourceTrace(ctx, fmt.Sprintf("Using TestStep Taint: %v", step.Taint)) 18 | 19 | for _, p := range step.Taint { 20 | m := state.RootModule() 21 | if m == nil { 22 | return errors.New("no state") 23 | } 24 | rs, ok := m.Resources[p] 25 | if !ok { 26 | return fmt.Errorf("resource %q not found in state", p) 27 | } 28 | logging.HelperResourceWarn(ctx, fmt.Sprintf("Explicitly tainting resource %q", p)) 29 | rs.Taint() 30 | } 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/README.md: -------------------------------------------------------------------------------- 1 | # Terraform Helper Lib: schema 2 | 3 | The `schema` package provides a high-level interface for writing resource 4 | providers for Terraform. 5 | 6 | If you're writing a resource provider, we recommend you use this package. 7 | 8 | The interface exposed by this package is much friendlier than trying to 9 | write to the Terraform API directly. The core Terraform API is low-level 10 | and built for maximum flexibility and control, whereas this library is built 11 | as a framework around that to more easily write common providers. 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/context.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | type Key string 4 | 5 | var ( 6 | StopContextKey = Key("StopContext") 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/equal.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | // Equal is an interface that checks for deep equality between two objects. 4 | type Equal interface { 5 | Equal(interface{}) bool 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_writer.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | // FieldWriters are responsible for writing fields by address into 4 | // a proper typed representation. ResourceData uses this to write new data 5 | // into existing sources. 6 | type FieldWriter interface { 7 | WriteField([]string, interface{}) error 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/json.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | ) 7 | 8 | func unmarshalJSON(data []byte, v interface{}) error { 9 | dec := json.NewDecoder(bytes.NewReader(data)) 10 | dec.UseNumber() 11 | return dec.Decode(v) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data_get_source.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | //go:generate go run golang.org/x/tools/cmd/stringer -type=getSource resource_data_get_source.go 4 | 5 | // getSource represents the level we want to get for a value (internally). 6 | // Any source less than or equal to the level will be loaded (whichever 7 | // has a value first). 8 | type getSource byte 9 | 10 | const ( 11 | getSourceState getSource = 1 << iota 12 | getSourceConfig 13 | getSourceDiff 14 | getSourceSet 15 | getSourceExact // Only get from the _exact_ level 16 | getSourceLevelMask getSource = getSourceState | getSourceConfig | getSourceDiff | getSourceSet 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/testing.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | import ( 4 | "context" 5 | 6 | testing "github.com/mitchellh/go-testing-interface" 7 | 8 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" 9 | ) 10 | 11 | // TestResourceDataRaw creates a ResourceData from a raw configuration map. 12 | func TestResourceDataRaw(t testing.T, schema map[string]*Schema, raw map[string]interface{}) *ResourceData { 13 | t.Helper() 14 | 15 | c := terraform.NewResourceConfigRaw(raw) 16 | 17 | sm := schemaMap(schema) 18 | diff, err := sm.Diff(context.Background(), nil, c, nil, nil, true) 19 | if err != nil { 20 | t.Fatalf("err: %s", err) 21 | } 22 | 23 | result, err := sm.Data(nil, diff) 24 | if err != nil { 25 | t.Fatalf("err: %s", err) 26 | } 27 | 28 | return result 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/valuetype.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | //go:generate go run golang.org/x/tools/cmd/stringer -type=ValueType valuetype.go 4 | 5 | // ValueType is an enum of the type that can be represented by a schema. 6 | type ValueType int 7 | 8 | const ( 9 | TypeInvalid ValueType = iota 10 | TypeBool 11 | TypeInt 12 | TypeFloat 13 | TypeString 14 | TypeList 15 | TypeMap 16 | TypeSet 17 | typeObject 18 | ) 19 | 20 | // NOTE: ValueType has more functions defined on it in schema.go. We can't 21 | // put them here because we reference other files. 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/module.go: -------------------------------------------------------------------------------- 1 | package addrs 2 | 3 | // Module is an address for a module call within configuration. This is 4 | // the static counterpart of ModuleInstance, representing a traversal through 5 | // the static module call tree in configuration and does not take into account 6 | // the potentially-multiple instances of a module that might be created by 7 | // "count" and "for_each" arguments within those calls. 8 | // 9 | // This type should be used only in very specialized cases when working with 10 | // the static module call tree. Type ModuleInstance is appropriate in more cases. 11 | // 12 | // Although Module is a slice, it should be treated as immutable after creation. 13 | type Module []string 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/doc.go: -------------------------------------------------------------------------------- 1 | // Package configschema contains types for describing the expected structure 2 | // of a configuration block whose shape is not known until runtime. 3 | // 4 | // For example, this is used to describe the expected contents of a resource 5 | // configuration block, which is defined by the corresponding provider plugin 6 | // and thus not compiled into Terraform core. 7 | // 8 | // A configschema primarily describes the shape of configuration, but it is 9 | // also suitable for use with other structures derived from the configuration, 10 | // such as the cached state of a resource or a resource diff. 11 | // 12 | // This package should not be confused with the package helper/schema, which 13 | // is the higher-level helper library used to implement providers themselves. 14 | package configschema 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/hashcode/hashcode.go: -------------------------------------------------------------------------------- 1 | package hashcode 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "hash/crc32" 7 | ) 8 | 9 | // String hashes a string to a unique hashcode. 10 | // 11 | // crc32 returns a uint32, but for our use we need 12 | // and non negative integer. Here we cast to an integer 13 | // and invert it if the result is negative. 14 | func String(s string) int { 15 | v := int(crc32.ChecksumIEEE([]byte(s))) 16 | if v >= 0 { 17 | return v 18 | } 19 | if -v >= 0 { 20 | return -v 21 | } 22 | // v == MinInt 23 | return 0 24 | } 25 | 26 | // Strings hashes a list of strings to a unique hashcode. 27 | func Strings(strings []string) string { 28 | var buf bytes.Buffer 29 | 30 | for _, s := range strings { 31 | buf.WriteString(fmt.Sprintf("%s-", s)) 32 | } 33 | 34 | return fmt.Sprintf("%d", String(buf.String())) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugintest/doc.go: -------------------------------------------------------------------------------- 1 | // Package plugintest contains utilities to help with writing tests for 2 | // Terraform plugins. 3 | // 4 | // This is not a package for testing configurations or modules written in the 5 | // Terraform language. It is for testing the plugins that allow Terraform to 6 | // manage various cloud services and other APIs. 7 | package plugintest 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags/diagnostic.go: -------------------------------------------------------------------------------- 1 | package tfdiags 2 | 3 | type Diagnostic interface { 4 | Severity() Severity 5 | Description() Description 6 | } 7 | 8 | type Severity rune 9 | 10 | //go:generate go run golang.org/x/tools/cmd/stringer -type=Severity 11 | 12 | const ( 13 | Error Severity = 'E' 14 | Warning Severity = 'W' 15 | ) 16 | 17 | type Description struct { 18 | Summary string 19 | Detail string 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags/doc.go: -------------------------------------------------------------------------------- 1 | // Package tfdiags is a utility package for representing errors and 2 | // warnings in a manner that allows us to produce good messages for the 3 | // user. 4 | // 5 | // "diag" is short for "diagnostics", and is meant as a general word for 6 | // feedback to a user about potential or actual problems. 7 | // 8 | // A design goal for this package is for it to be able to provide rich 9 | // messaging where possible but to also be pragmatic about dealing with 10 | // generic errors produced by system components that _can't_ provide 11 | // such rich messaging. As a consequence, the main types in this package -- 12 | // Diagnostics and Diagnostic -- are designed so that they can be "smuggled" 13 | // over an error channel and then be unpacked at the other end, so that 14 | // error diagnostics (at least) can transit through APIs that are not 15 | // aware of this package. 16 | package tfdiags 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags/error.go: -------------------------------------------------------------------------------- 1 | package tfdiags 2 | 3 | // nativeError is a Diagnostic implementation that wraps a normal Go error 4 | type nativeError struct { 5 | err error 6 | } 7 | 8 | var _ Diagnostic = nativeError{} 9 | 10 | func (e nativeError) Severity() Severity { 11 | return Error 12 | } 13 | 14 | func (e nativeError) Description() Description { 15 | return Description{ 16 | Summary: FormatError(e.err), 17 | } 18 | } 19 | 20 | func FromError(err error) Diagnostic { 21 | return &nativeError{ 22 | err: err, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags/severity_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Severity"; DO NOT EDIT. 2 | 3 | package tfdiags 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[Error-69] 12 | _ = x[Warning-87] 13 | } 14 | 15 | const ( 16 | _Severity_name_0 = "Error" 17 | _Severity_name_1 = "Warning" 18 | ) 19 | 20 | func (i Severity) String() string { 21 | switch { 22 | case i == 69: 23 | return _Severity_name_0 24 | case i == 87: 25 | return _Severity_name_1 26 | default: 27 | return "Severity(" + strconv.FormatInt(int64(i), 10) + ")" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags/simple_warning.go: -------------------------------------------------------------------------------- 1 | package tfdiags 2 | 3 | type simpleWarning string 4 | 5 | var _ Diagnostic = simpleWarning("") 6 | 7 | // SimpleWarning constructs a simple (summary-only) warning diagnostic. 8 | func SimpleWarning(msg string) Diagnostic { 9 | return simpleWarning(msg) 10 | } 11 | 12 | func (e simpleWarning) Severity() Severity { 13 | return Warning 14 | } 15 | 16 | func (e simpleWarning) Description() Description { 17 | return Description{ 18 | Summary: string(e), 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/instancetype.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | //go:generate go run golang.org/x/tools/cmd/stringer -type=instanceType instancetype.go 4 | 5 | // instanceType is an enum of the various types of instances store in the State 6 | type instanceType int 7 | 8 | const ( 9 | typeInvalid instanceType = iota 10 | typePrimary 11 | typeTainted 12 | typeDeposed 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/instancetype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=instanceType instancetype.go"; DO NOT EDIT. 2 | 3 | package terraform 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[typeInvalid-0] 12 | _ = x[typePrimary-1] 13 | _ = x[typeTainted-2] 14 | _ = x[typeDeposed-3] 15 | } 16 | 17 | const _instanceType_name = "typeInvalidtypePrimarytypeTaintedtypeDeposed" 18 | 19 | var _instanceType_index = [...]uint8{0, 11, 22, 33, 44} 20 | 21 | func (i instanceType) String() string { 22 | if i < 0 || i >= instanceType(len(_instanceType_index)-1) { 23 | return "instanceType(" + strconv.FormatInt(int64(i), 10) + ")" 24 | } 25 | return _instanceType_name[_instanceType_index[i]:_instanceType_index[i+1]] 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/resource_mode.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | //go:generate go run golang.org/x/tools/cmd/stringer -type=ResourceMode -output=resource_mode_string.go resource_mode.go 4 | 5 | // ResourceMode is deprecated, use addrs.ResourceMode instead. 6 | // It has been preserved for backwards compatibility. 7 | type ResourceMode int 8 | 9 | const ( 10 | ManagedResourceMode ResourceMode = iota 11 | DataResourceMode 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/resource_mode_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=ResourceMode -output=resource_mode_string.go resource_mode.go"; DO NOT EDIT. 2 | 3 | package terraform 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[ManagedResourceMode-0] 12 | _ = x[DataResourceMode-1] 13 | } 14 | 15 | const _ResourceMode_name = "ManagedResourceModeDataResourceMode" 16 | 17 | var _ResourceMode_index = [...]uint8{0, 19, 35} 18 | 19 | func (i ResourceMode) String() string { 20 | if i < 0 || i >= ResourceMode(len(_ResourceMode_index)-1) { 21 | return "ResourceMode(" + strconv.FormatInt(int64(i), 10) + ")" 22 | } 23 | return _ResourceMode_name[_ResourceMode_index[i]:_ResourceMode_index[i+1]] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/util.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // deduplicate a slice of strings 8 | func uniqueStrings(s []string) []string { 9 | if len(s) < 2 { 10 | return s 11 | } 12 | 13 | sort.Strings(s) 14 | result := make([]string, 1, len(s)) 15 | result[0] = s[0] 16 | for i := 1; i < len(s); i++ { 17 | if s[i] != result[len(result)-1] { 18 | result = append(result, s[i]) 19 | } 20 | } 21 | return result 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-registry-address/.go-version: -------------------------------------------------------------------------------- 1 | 1.15.2 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform-registry-address/errors.go: -------------------------------------------------------------------------------- 1 | package tfaddr 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type ParserError struct { 8 | Summary string 9 | Detail string 10 | } 11 | 12 | func (pe *ParserError) Error() string { 13 | return fmt.Sprintf("%s: %s", pe.Summary, pe.Detail) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/yamux/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/yamux/util.go: -------------------------------------------------------------------------------- 1 | package yamux 2 | 3 | import ( 4 | "sync" 5 | "time" 6 | ) 7 | 8 | var ( 9 | timerPool = &sync.Pool{ 10 | New: func() interface{} { 11 | timer := time.NewTimer(time.Hour * 1e6) 12 | timer.Stop() 13 | return timer 14 | }, 15 | } 16 | ) 17 | 18 | // asyncSendErr is used to try an async send of an error 19 | func asyncSendErr(ch chan error, err error) { 20 | if ch == nil { 21 | return 22 | } 23 | select { 24 | case ch <- err: 25 | default: 26 | } 27 | } 28 | 29 | // asyncNotify is used to signal a waiting goroutine 30 | func asyncNotify(ch chan struct{}) { 31 | select { 32 | case ch <- struct{}{}: 33 | default: 34 | } 35 | } 36 | 37 | // min computes the minimum of two values 38 | func min(a, b uint32) uint32 { 39 | if a < b { 40 | return a 41 | } 42 | return b 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = [ 4 | "*_test.go" 5 | ] 6 | 7 | [[analyzers]] 8 | name = "go" 9 | enabled = true 10 | 11 | [analyzers.meta] 12 | import_path = "github.com/imdario/mergo" -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.gitignore: -------------------------------------------------------------------------------- 1 | #### joe made this: http://goel.io/joe 2 | 3 | #### go #### 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 17 | .glide/ 18 | 19 | #### vim #### 20 | # Swap 21 | [._]*.s[a-v][a-z] 22 | [._]*.sw[a-p] 23 | [._]s[a-v][a-z] 24 | [._]sw[a-p] 25 | 26 | # Session 27 | Session.vim 28 | 29 | # Temporary 30 | .netrwhist 31 | *~ 32 | # Auto-generated tag files 33 | tags 34 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | arch: 3 | - amd64 4 | - ppc64le 5 | install: 6 | - go get -t 7 | - go get golang.org/x/tools/cmd/cover 8 | - go get github.com/mattn/goveralls 9 | script: 10 | - go test -race -v ./... 11 | after_script: 12 | - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | before_install: 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | _ "github.com/mattn/go-isatty" 10 | ) 11 | 12 | // NewColorable returns new instance of Writer which handles escape sequence. 13 | func NewColorable(file *os.File) io.Writer { 14 | if file == nil { 15 | panic("nil passed instead of *os.File to NewColorable()") 16 | } 17 | 18 | return file 19 | } 20 | 21 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 22 | func NewColorableStdout() io.Writer { 23 | return os.Stdout 24 | } 25 | 26 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 27 | func NewColorableStderr() io.Writer { 28 | return os.Stderr 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable returns new instance of Writer which handles escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | os: 6 | - linux 7 | - osx 8 | 9 | before_install: 10 | - go get github.com/mattn/goveralls 11 | - go get golang.org/x/tools/cmd/cover 12 | script: 13 | - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_android.go: -------------------------------------------------------------------------------- 1 | // +build android 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | // IsTerminal return true if the file descriptor is terminal. 13 | func IsTerminal(fd uintptr) bool { 14 | var termios syscall.Termios 15 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 16 | return err == 0 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | 20 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 21 | // terminal. This is also always false on this environment. 22 | func IsCygwinTerminal(fd uintptr) bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | // +build plan9 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // IsTerminal returns true if the given file descriptor is a terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | path, err := syscall.Fd2path(fd) 12 | if err != nil { 13 | return false 14 | } 15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | // +build !android 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/copystructure/README.md: -------------------------------------------------------------------------------- 1 | # copystructure 2 | 3 | copystructure is a Go library for deep copying values in Go. 4 | 5 | This allows you to copy Go values that may contain reference values 6 | such as maps, slices, or pointers, and copy their data as well instead 7 | of just their references. 8 | 9 | ## Installation 10 | 11 | Standard `go get`: 12 | 13 | ``` 14 | $ go get github.com/mitchellh/copystructure 15 | ``` 16 | 17 | ## Usage & Example 18 | 19 | For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/copystructure). 20 | 21 | The `Copy` function has examples associated with it there. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/copystructure/copier_time.go: -------------------------------------------------------------------------------- 1 | package copystructure 2 | 3 | import ( 4 | "reflect" 5 | "time" 6 | ) 7 | 8 | func init() { 9 | Copiers[reflect.TypeOf(time.Time{})] = timeCopier 10 | } 11 | 12 | func timeCopier(v interface{}) (interface{}, error) { 13 | // Just... copy it. 14 | return v.(time.Time), nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-testing-interface/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | script: 8 | - go test 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/reflectwalk/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/reflectwalk/README.md: -------------------------------------------------------------------------------- 1 | # reflectwalk 2 | 3 | reflectwalk is a Go library for "walking" a value in Go using reflection, 4 | in the same way a directory tree can be "walked" on the filesystem. Walking 5 | a complex structure can allow you to do manipulations on unknown structures 6 | such as those decoded from JSON. 7 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/reflectwalk/location.go: -------------------------------------------------------------------------------- 1 | package reflectwalk 2 | 3 | //go:generate stringer -type=Location location.go 4 | 5 | type Location uint 6 | 7 | const ( 8 | None Location = iota 9 | Map 10 | MapKey 11 | MapValue 12 | Slice 13 | SliceElem 14 | Array 15 | ArrayElem 16 | Struct 17 | StructField 18 | WalkLoc 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/reflectwalk/location_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Location location.go"; DO NOT EDIT. 2 | 3 | package reflectwalk 4 | 5 | import "fmt" 6 | 7 | const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemArrayArrayElemStructStructFieldWalkLoc" 8 | 9 | var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 40, 49, 55, 66, 73} 10 | 11 | func (i Location) String() string { 12 | if i >= Location(len(_Location_index)-1) { 13 | return fmt.Sprintf("Location(%d)", i) 14 | } 15 | return _Location_name[_Location_index[i]:_Location_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/run/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | 13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 14 | .glide/ 15 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/run/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.x 5 | - tip 6 | install: 7 | - go get -v github.com/golang/lint/golint 8 | - go build ./... 9 | script: 10 | - go vet ./... 11 | - $HOME/gopath/bin/golint . 12 | - go test -v -race ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go: -------------------------------------------------------------------------------- 1 | //go:build go1.17 2 | // +build go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_legacy.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Wrapper around reflect.Value.CanConvert, for compatability 13 | // reasons. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return value.CanConvert(to) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.17 2 | // +build !go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_can_convert.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Older versions of Go does not have the reflect.Value.CanConvert 13 | // method. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.7.x 6 | - 1.8.x 7 | - 1.9.x 8 | - 1.10.x 9 | - 1.11.x 10 | - 1.12.x 11 | - tip 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | 17 | install: 18 | - go get gopkg.in/check.v1 19 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | go test ./... 3 | env GOOS=linux GOARCH=386 go test ./... 4 | go test ./... -short -race 5 | go test ./... -run=nothing -bench=. -benchmem 6 | go vet 7 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/msgpack.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | type Marshaler interface { 4 | MarshalMsgpack() ([]byte, error) 5 | } 6 | 7 | type Unmarshaler interface { 8 | UnmarshalMsgpack([]byte) error 9 | } 10 | 11 | type CustomEncoder interface { 12 | EncodeMsgpack(*Encoder) error 13 | } 14 | 15 | type CustomDecoder interface { 16 | DecodeMsgpack(*Decoder) error 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | concurrency: 8 3 | deadline: 5m 4 | tests: false 5 | linters: 6 | enable-all: true 7 | disable: 8 | - gochecknoglobals 9 | - gocognit 10 | - godox 11 | - wsl 12 | - funlen 13 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.11.x 6 | - 1.12.x 7 | - 1.13.x 8 | - 1.14.x 9 | - tip 10 | 11 | matrix: 12 | allow_failures: 13 | - go: tip 14 | 15 | env: 16 | - GO111MODULE=on 17 | 18 | go_import_path: github.com/vmihailenco/msgpack 19 | 20 | before_install: 21 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 22 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | go test ./... 3 | go test ./... -short -race 4 | go test ./... -run=NONE -bench=. -benchmem 5 | env GOOS=linux GOARCH=386 go test ./... 6 | golangci-lint run 7 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/msgpack.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | type Marshaler interface { 4 | MarshalMsgpack() ([]byte, error) 5 | } 6 | 7 | type Unmarshaler interface { 8 | UnmarshalMsgpack([]byte) error 9 | } 10 | 11 | type CustomEncoder interface { 12 | EncodeMsgpack(*Encoder) error 13 | } 14 | 15 | type CustomDecoder interface { 16 | DecodeMsgpack(*Decoder) error 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package msgpack 4 | 5 | // bytesToString converts byte slice to string. 6 | func bytesToString(b []byte) string { 7 | return string(b) 8 | } 9 | 10 | // stringToBytes converts string to byte slice. 11 | func stringToBytes(s string) []byte { 12 | return []byte(s) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/msgpack/v4/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package msgpack 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // bytesToString converts byte slice to string. 10 | func bytesToString(b []byte) string { //nolint:deadcode,unused 11 | return *(*string)(unsafe.Pointer(&b)) 12 | } 13 | 14 | // stringToBytes converts string to byte slice. 15 | func stringToBytes(s string) []byte { 16 | return *(*[]byte)(unsafe.Pointer( 17 | &struct { 18 | string 19 | Cap int 20 | }{s, len(s)}, 21 | )) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/tagparser/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: xenial 2 | sudo: false 3 | language: go 4 | 5 | go: 6 | - 1.11.x 7 | - 1.12.x 8 | - tip 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | 14 | env: 15 | - GO111MODULE=on 16 | 17 | go_import_path: github.com/vmihailenco/tagparser 18 | 19 | before_install: 20 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 21 | 22 | script: 23 | - make 24 | - golangci-lint run 25 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/tagparser/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | go test ./... 3 | go test ./... -short -race 4 | go test ./... -run=NONE -bench=. -benchmem 5 | env GOOS=linux GOARCH=386 go test ./... 6 | go vet ./... 7 | go get github.com/gordonklaus/ineffassign 8 | ineffassign . 9 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/tagparser/README.md: -------------------------------------------------------------------------------- 1 | # Opinionated Golang tag parser 2 | 3 | [![Build Status](https://travis-ci.org/vmihailenco/tagparser.png?branch=master)](https://travis-ci.org/vmihailenco/tagparser) 4 | [![GoDoc](https://godoc.org/github.com/vmihailenco/tagparser?status.svg)](https://godoc.org/github.com/vmihailenco/tagparser) 5 | 6 | ## Installation 7 | 8 | Install: 9 | 10 | ```shell 11 | go get -u github.com/vmihailenco/tagparser 12 | ``` 13 | 14 | ## Quickstart 15 | 16 | ```go 17 | func ExampleParse() { 18 | tag := tagparser.Parse("some_name,key:value,key2:'complex value'") 19 | fmt.Println(tag.Name) 20 | fmt.Println(tag.Options) 21 | // Output: some_name 22 | // map[key:value key2:'complex value'] 23 | } 24 | ``` 25 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/tagparser/internal/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package internal 4 | 5 | func BytesToString(b []byte) string { 6 | return string(b) 7 | } 8 | 9 | func StringToBytes(s string) []byte { 10 | return []byte(s) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/vmihailenco/tagparser/internal/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package internal 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // BytesToString converts byte slice to string. 10 | func BytesToString(b []byte) string { 11 | return *(*string)(unsafe.Pointer(&b)) 12 | } 13 | 14 | // StringToBytes converts string to byte slice. 15 | func StringToBytes(s string) []byte { 16 | return *(*[]byte)(unsafe.Pointer( 17 | &struct { 18 | string 19 | Cap int 20 | }{s, len(s)}, 21 | )) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/convert/conversion_capsule.go: -------------------------------------------------------------------------------- 1 | package convert 2 | 3 | import ( 4 | "github.com/zclconf/go-cty/cty" 5 | ) 6 | 7 | func conversionToCapsule(inTy, outTy cty.Type, fn func(inTy cty.Type) func(cty.Value, cty.Path) (interface{}, error)) conversion { 8 | rawConv := fn(inTy) 9 | if rawConv == nil { 10 | return nil 11 | } 12 | 13 | return func(in cty.Value, path cty.Path) (cty.Value, error) { 14 | rawV, err := rawConv(in, path) 15 | if err != nil { 16 | return cty.NilVal, err 17 | } 18 | return cty.CapsuleVal(outTy, rawV), nil 19 | } 20 | } 21 | 22 | func conversionFromCapsule(inTy, outTy cty.Type, fn func(outTy cty.Type) func(interface{}, cty.Path) (cty.Value, error)) conversion { 23 | rawConv := fn(outTy) 24 | if rawConv == nil { 25 | return nil 26 | } 27 | 28 | return func(in cty.Value, path cty.Path) (cty.Value, error) { 29 | return rawConv(in.EncapsulatedValue(), path) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/function/doc.go: -------------------------------------------------------------------------------- 1 | // Package function builds on the functionality of cty by modeling functions 2 | // that operate on cty Values. 3 | // 4 | // Functions are, at their core, Go anonymous functions. However, this package 5 | // wraps around them utility functions for parameter type checking, etc. 6 | package function 7 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/function/stdlib/doc.go: -------------------------------------------------------------------------------- 1 | // Package stdlib is a collection of cty functions that are expected to be 2 | // generally useful, and are thus factored out into this shared library in 3 | // the hope that cty-using applications will have consistent behavior when 4 | // using these functions. 5 | // 6 | // See the parent package "function" for more information on the purpose 7 | // and usage of cty functions. 8 | // 9 | // This package contains both Go functions, which provide convenient access 10 | // to call the functions from Go code, and the Function objects themselves. 11 | // The latter follow the naming scheme of appending "Func" to the end of 12 | // the function name. 13 | package stdlib 14 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/gocty/doc.go: -------------------------------------------------------------------------------- 1 | // Package gocty deals with converting between cty Values and native go 2 | // values. 3 | // 4 | // It operates under a similar principle to the encoding/json and 5 | // encoding/xml packages in the standard library, using reflection to 6 | // populate native Go data structures from cty values and vice-versa. 7 | package gocty 8 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/json/doc.go: -------------------------------------------------------------------------------- 1 | // Package json provides functions for serializing cty types and values in 2 | // JSON format, and for decoding them again. 3 | // 4 | // Since the cty type system is a superset of the JSON type system, 5 | // round-tripping through JSON is lossy unless type information is provided 6 | // both at encoding time and decoding time. Callers of this package are 7 | // therefore suggested to define their expected structure as a cty.Type 8 | // and pass it in consistently both when encoding and when decoding, though 9 | // default (type-lossy) behavior is provided for situations where the precise 10 | // representation of the data is not significant. 11 | package json 12 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/json/type.go: -------------------------------------------------------------------------------- 1 | package json 2 | 3 | import ( 4 | "github.com/zclconf/go-cty/cty" 5 | ) 6 | 7 | // MarshalType returns a JSON serialization of the given type. 8 | // 9 | // This is just a thin wrapper around t.MarshalJSON, for symmetry with 10 | // UnmarshalType. 11 | func MarshalType(t cty.Type) ([]byte, error) { 12 | return t.MarshalJSON() 13 | } 14 | 15 | // UnmarshalType decodes a JSON serialization of the given type as produced 16 | // by either Type.MarshalJSON or MarshalType. 17 | // 18 | // This is a convenience wrapper around Type.UnmarshalJSON. 19 | func UnmarshalType(buf []byte) (cty.Type, error) { 20 | var t cty.Type 21 | err := t.UnmarshalJSON(buf) 22 | return t, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/null.go: -------------------------------------------------------------------------------- 1 | package cty 2 | 3 | // NullVal returns a null value of the given type. A null can be created of any 4 | // type, but operations on such values will always panic. Calling applications 5 | // are encouraged to use nulls only sparingly, particularly when user-provided 6 | // expressions are to be evaluated, since the precence of nulls creates a 7 | // much higher chance of evaluation errors that can't be caught by a type 8 | // checker. 9 | func NullVal(t Type) Value { 10 | return Value{ 11 | ty: t, 12 | v: nil, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/zclconf/go-cty/cty/set/iterator.go: -------------------------------------------------------------------------------- 1 | package set 2 | 3 | type Iterator struct { 4 | vals []interface{} 5 | idx int 6 | } 7 | 8 | func (it *Iterator) Value() interface{} { 9 | return it.vals[it.idx] 10 | } 11 | 12 | func (it *Iterator) Next() bool { 13 | it.idx++ 14 | return it.idx < len(it.vals) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.7 && amd64 && gc && !purego 6 | // +build !go1.7,amd64,gc,!purego 7 | 8 | package blake2b 9 | 10 | import "golang.org/x/sys/cpu" 11 | 12 | func init() { 13 | useSSE4 = cpu.X86.HasSSE41 14 | } 15 | 16 | //go:noescape 17 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 18 | 19 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 20 | if useSSE4 { 21 | hashBlocksSSE4(h, c, flag, blocks) 22 | } else { 23 | hashBlocksGeneric(h, c, flag, blocks) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !amd64 || purego || !gc 6 | // +build !amd64 purego !gc 7 | 8 | package blake2b 9 | 10 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 11 | hashBlocksGeneric(h, c, flag, blocks) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.9 6 | // +build go1.9 7 | 8 | package blake2b 9 | 10 | import ( 11 | "crypto" 12 | "hash" 13 | ) 14 | 15 | func init() { 16 | newHash256 := func() hash.Hash { 17 | h, _ := New256(nil) 18 | return h 19 | } 20 | newHash384 := func() hash.Hash { 21 | h, _ := New384(nil) 22 | return h 23 | } 24 | 25 | newHash512 := func() hash.Hash { 26 | h, _ := New512(nil) 27 | return h 28 | } 29 | 30 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) 31 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) 32 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package poly1305 9 | 10 | import "math/bits" 11 | 12 | func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { 13 | return bits.Add64(x, y, carry) 14 | } 15 | 16 | func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { 17 | return bits.Sub64(x, y, borrow) 18 | } 19 | 20 | func bitsMul64(x, y uint64) (hi, lo uint64) { 21 | return bits.Mul64(x, y) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!amd64 && !ppc64le && !s390x) || !gc || purego 6 | // +build !amd64,!ppc64le,!s390x !gc purego 7 | 8 | package poly1305 9 | 10 | type mac struct{ macGeneric } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && !purego && gc 6 | // +build amd64,!purego,gc 7 | 8 | package salsa 9 | 10 | //go:noescape 11 | 12 | // salsa2020XORKeyStream is implemented in salsa20_amd64.s. 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out must overlap entirely or not at all. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | _ = out[len(in)-1] 23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !amd64 || purego || !gc 6 | // +build !amd64 purego !gc 7 | 8 | package salsa 9 | 10 | // XORKeyStream crypts bytes from in to out using the given key and counters. 11 | // In and out must overlap entirely or not at all. Counter 12 | // contains the raw salsa20 counter bytes (both nonce and block counter). 13 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 14 | genericXORKeyStream(out, in, counter, key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.9 6 | // +build go1.9 7 | 8 | package context 9 | 10 | import "context" // standard library's context, as of Go 1.7 11 | 12 | // A Context carries a deadline, a cancelation signal, and other values across 13 | // API boundaries. 14 | // 15 | // Context's methods may be called by multiple goroutines simultaneously. 16 | type Context = context.Context 17 | 18 | // A CancelFunc tells an operation to abandon its work. 19 | // A CancelFunc does not wait for the work to stop. 20 | // After the first call, subsequent calls to a CancelFunc do nothing. 21 | type CancelFunc = context.CancelFunc 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | h2i/h2i 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.11 6 | // +build go1.11 7 | 8 | package http2 9 | 10 | import ( 11 | "net/http/httptrace" 12 | "net/textproto" 13 | ) 14 | 15 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { 16 | return trace != nil && trace.WroteHeaderField != nil 17 | } 18 | 19 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) { 20 | if trace != nil && trace.WroteHeaderField != nil { 21 | trace.WroteHeaderField(k, []string{v}) 22 | } 23 | } 24 | 25 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 26 | if trace != nil { 27 | return trace.Got1xxResponse 28 | } 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go115.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.15 6 | // +build go1.15 7 | 8 | package http2 9 | 10 | import ( 11 | "context" 12 | "crypto/tls" 13 | ) 14 | 15 | // dialTLSWithContext uses tls.Dialer, added in Go 1.15, to open a TLS 16 | // connection. 17 | func (t *Transport) dialTLSWithContext(ctx context.Context, network, addr string, cfg *tls.Config) (*tls.Conn, error) { 18 | dialer := &tls.Dialer{ 19 | Config: cfg, 20 | } 21 | cn, err := dialer.DialContext(ctx, network, addr) 22 | if err != nil { 23 | return nil, err 24 | } 25 | tlsCn := cn.(*tls.Conn) // DialContext comment promises this will always succeed 26 | return tlsCn, nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.11 6 | // +build !go1.11 7 | 8 | package http2 9 | 10 | import ( 11 | "net/http/httptrace" 12 | "net/textproto" 13 | ) 14 | 15 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return false } 16 | 17 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {} 18 | 19 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go115.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.15 6 | // +build !go1.15 7 | 8 | package http2 9 | 10 | import ( 11 | "context" 12 | "crypto/tls" 13 | ) 14 | 15 | // dialTLSWithContext opens a TLS connection. 16 | func (t *Transport) dialTLSWithContext(ctx context.Context, network, addr string, cfg *tls.Config) (*tls.Conn, error) { 17 | cn, err := tls.Dial(network, addr, cfg) 18 | if err != nil { 19 | return nil, err 20 | } 21 | if err := cn.Handshake(); err != nil { 22 | return nil, err 23 | } 24 | if cfg.InsecureSkipVerify { 25 | return cn, nil 26 | } 27 | if err := cn.VerifyHostname(cfg.ServerName); err != nil { 28 | return nil, err 29 | } 30 | return cn, nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | //go:build go1.18 8 | // +build go1.18 9 | 10 | package idna 11 | 12 | // Transitional processing is disabled by default in Go 1.18. 13 | // https://golang.org/issue/47510 14 | const transitionalLookup = false 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/pre_go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | //go:build !go1.18 8 | // +build !go1.18 9 | 10 | package idna 11 | 12 | const transitionalLookup = true 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix 6 | // +build aix 7 | 8 | package cpu 9 | 10 | const ( 11 | // getsystemcfg constants 12 | _SC_IMPL = 2 13 | _IMPL_POWER8 = 0x10000 14 | _IMPL_POWER9 = 0x20000 15 | ) 16 | 17 | func archInit() { 18 | impl := getsystemcfg(_SC_IMPL) 19 | if impl&_IMPL_POWER8 != 0 { 20 | PPC64.IsPOWER8 = true 21 | } 22 | if impl&_IMPL_POWER9 != 0 { 23 | PPC64.IsPOWER8 = true 24 | PPC64.IsPOWER9 = true 25 | } 26 | 27 | Initialized = true 28 | } 29 | 30 | func getsystemcfg(label int) (n uint64) { 31 | r0, _ := callgetsystemcfg(label) 32 | n = uint64(r0) 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // func getisar0() uint64 11 | TEXT ·getisar0(SB),NOSPLIT,$0-8 12 | // get Instruction Set Attributes 0 into x0 13 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600 14 | WORD $0xd5380600 15 | MOVD R0, ret+0(FP) 16 | RET 17 | 18 | // func getisar1() uint64 19 | TEXT ·getisar1(SB),NOSPLIT,$0-8 20 | // get Instruction Set Attributes 1 into x0 21 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620 22 | WORD $0xd5380620 23 | MOVD R0, ret+0(FP) 24 | RET 25 | 26 | // func getpfr0() uint64 27 | TEXT ·getpfr0(SB),NOSPLIT,$0-8 28 | // get Processor Feature Register 0 into x0 29 | // mrs x0, ID_AA64PFR0_EL1 = d5380400 30 | WORD $0xd5380400 31 | MOVD R0, ret+0(FP) 32 | RET 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | package cpu 9 | 10 | func getisar0() uint64 11 | func getisar1() uint64 12 | func getpfr0() uint64 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | package cpu 9 | 10 | // haveAsmFunctions reports whether the other functions in this file can 11 | // be safely called. 12 | func haveAsmFunctions() bool { return true } 13 | 14 | // The following feature detection functions are defined in cpu_s390x.s. 15 | // They are likely to be expensive to call so the results should be cached. 16 | func stfle() facilityList 17 | func kmQuery() queryResult 18 | func kmcQuery() queryResult 19 | func kmctrQuery() queryResult 20 | func kmaQuery() queryResult 21 | func kimdQuery() queryResult 22 | func klmdQuery() queryResult 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | // +build 386 amd64 amd64p32 7 | // +build gc 8 | 9 | package cpu 10 | 11 | // cpuid is implemented in cpu_x86.s for gc compiler 12 | // and in cpu_gccgo.c for gccgo. 13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 14 | 15 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 16 | // and in cpu_gccgo.c for gccgo. 17 | func xgetbv() (eax, edx uint32) 18 | 19 | // darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler 20 | // and in cpu_gccgo_x86.go for gccgo. 21 | func darwinSupportsAVX512() bool 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo 6 | // +build gccgo 7 | 8 | package cpu 9 | 10 | func getisar0() uint64 { return 0 } 11 | func getisar1() uint64 { return 0 } 12 | func getpfr0() uint64 { return 0 } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !386 && !amd64 && !amd64p32 && !arm64 6 | // +build !386,!amd64,!amd64p32,!arm64 7 | 8 | package cpu 9 | 10 | func archInit() { 11 | if err := readHWCAP(); err != nil { 12 | return 13 | } 14 | doinit() 15 | Initialized = true 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips64 || mips64le) 6 | // +build linux 7 | // +build mips64 mips64le 8 | 9 | package cpu 10 | 11 | // HWCAP bits. These are exposed by the Linux kernel 5.4. 12 | const ( 13 | // CPU features 14 | hwcap_MIPS_MSA = 1 << 1 15 | ) 16 | 17 | func doinit() { 18 | // HWCAP feature bits 19 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) 20 | } 21 | 22 | func isSet(hwc uint, value uint) bool { 23 | return hwc&value != 0 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x 6 | // +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x 7 | 8 | package cpu 9 | 10 | func doinit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips64 || mips64le 6 | // +build mips64 mips64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() { 13 | options = []option{ 14 | {Name: "msa", Feature: &MIPS64X.HasMSA}, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips || mipsle 6 | // +build mips mipsle 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() {} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && arm 6 | // +build !linux,arm 7 | 8 | package cpu 9 | 10 | func archInit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && !netbsd && arm64 6 | // +build !linux,!netbsd,arm64 7 | 8 | package cpu 9 | 10 | func doinit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && (mips64 || mips64le) 6 | // +build !linux 7 | // +build mips64 mips64le 8 | 9 | package cpu 10 | 11 | func archInit() { 12 | Initialized = true 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 || ppc64le 6 | // +build ppc64 ppc64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 128 11 | 12 | func initOptions() { 13 | options = []option{ 14 | {Name: "darn", Feature: &PPC64.HasDARN}, 15 | {Name: "scv", Feature: &PPC64.HasSCV}, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 6 | // +build riscv64 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() {} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build wasm 6 | // +build wasm 7 | 8 | package cpu 9 | 10 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 11 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 12 | // rules are good enough. 13 | 14 | const cacheLineSize = 0 15 | 16 | func initOptions() {} 17 | 18 | func archInit() {} 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func archInit() { 8 | doinit() 9 | Initialized = true 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func initS390Xbase() { 8 | // get the facilities list 9 | facilities := stfle() 10 | 11 | // mandatory 12 | S390X.HasZARCH = facilities.Has(zarch) 13 | S390X.HasSTFLE = facilities.Has(stflef) 14 | S390X.HasLDISP = facilities.Has(ldisp) 15 | S390X.HasEIMM = facilities.Has(eimm) 16 | 17 | // optional 18 | S390X.HasETF3EH = facilities.Has(etf3eh) 19 | S390X.HasDFP = facilities.Has(dfp) 20 | S390X.HasMSA = facilities.Has(msa) 21 | S390X.HasVX = facilities.Has(vx) 22 | if S390X.HasVX { 23 | S390X.HasVXE = facilities.Has(vxe) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Recreate a getsystemcfg syscall handler instead of 6 | // using the one provided by x/sys/unix to avoid having 7 | // the dependency between them. (See golang.org/issue/32102) 8 | // Morever, this file will be used during the building of 9 | // gccgo's libgo and thus must not used a CGo method. 10 | 11 | //go:build aix && gccgo 12 | // +build aix,gccgo 13 | 14 | package cpu 15 | 16 | import ( 17 | "syscall" 18 | ) 19 | 20 | //extern getsystemcfg 21 | func gccgoGetsystemcfg(label uint32) (r uint64) 22 | 23 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { 24 | r1 = uintptr(gccgoGetsystemcfg(uint32(label))) 25 | e1 = syscall.GetErrno() 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | // +build go1.9 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | type Signal = syscall.Signal 14 | type Errno = syscall.Errno 15 | type SysProcAttr = syscall.SysProcAttr 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for 386 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for AMD64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for mips64, OpenBSD 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | JMP syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | JMP syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | JMP syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 12 | // 13 | 14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 15 | JMP syscall·sysvicall6(SB) 16 | 17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSysvicall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | const ( 11 | R_OK = 0x4 12 | W_OK = 0x2 13 | X_OK = 0x1 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 7 | 8 | package unix 9 | 10 | const isBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 7 | 8 | package unix 9 | 10 | const isBigEndian = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | // Unix environment variables. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | func Unsetenv(key string) error { 31 | return syscall.Unsetenv(key) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Constants that were deprecated or moved to enums in the FreeBSD headers. Keep 6 | // them here for backwards compatibility. 7 | 8 | package unix 9 | 10 | const ( 11 | DLT_HHDLC = 0x79 12 | IPV6_MIN_MEMBERSHIPS = 0x1f 13 | IP_MAX_SOURCE_FILTER = 0x400 14 | IP_MIN_MEMBERSHIPS = 0x1f 15 | RT_CACHING_CONTEXT = 0x1 16 | RT_NORTREF = 0x2 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc 7 | 8 | package unix 9 | 10 | func init() { 11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 13 | fcntl64Syscall = SYS_FCNTL64 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | // +build gccgo,linux,amd64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //extern gettimeofday 13 | func realGettimeofday(*Timeval, *byte) int32 14 | 15 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 16 | r := realGettimeofday(tv, nil) 17 | if r < 0 { 18 | return syscall.GetErrno() 19 | } 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | // For Unix, get the pagesize from the runtime. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getpagesize() int { 15 | return syscall.Getpagesize() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | // +build ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | // +build darwin,race linux,race freebsd,race 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build aix dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | // ReadDirent reads directory entries from fd and writes them into buf. 11 | func ReadDirent(fd int, buf []byte) (n int, err error) { 12 | return Getdents(fd, buf) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | // +build darwin 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // ReadDirent reads directory entries from fd and writes them into buf. 13 | func ReadDirent(fd int, buf []byte) (n int, err error) { 14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 16 | // actual system call is getdirentries64, 64 is a good guess. 17 | // TODO(rsc): Can we use a single global basep for all calls? 18 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 19 | return Getdirentries(fd, buf, base) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package unix 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + uitoa(uint(-val)) 13 | } 14 | return uitoa(uint(val)) 15 | } 16 | 17 | func uitoa(val uint) string { 18 | var buf [32]byte // big enough for int64 19 | i := len(buf) - 1 20 | for val >= 10 { 21 | buf[i] = byte(val%10 + '0') 22 | i-- 23 | val /= 10 24 | } 25 | buf[i] = byte(val + '0') 26 | return string(buf[i:]) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | // +build amd64,linux,gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | // +build linux,gc 7 | 8 | package unix 9 | 10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 12 | 13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 14 | // fail. 15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | // +build linux,gc,386 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | 16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | // +build arm,gc,linux 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | // +build linux,gccgo,arm 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func (iov *Iovec) SetLen(length int) { 19 | iov.Len = uint64(length) 20 | } 21 | 22 | func (msghdr *Msghdr) SetIovlen(length int) { 23 | msghdr.Iovlen = int32(length) 24 | } 25 | 26 | func (cmsg *Cmsghdr) SetLen(length int) { 27 | cmsg.Len = uint32(length) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | // +build gc 8 | // +build !ppc64le 9 | // +build !ppc64 10 | 11 | package unix 12 | 13 | import "syscall" 14 | 15 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 18 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go: -------------------------------------------------------------------------------- 1 | // cgo -godefs types_illumos.go | go run mkpost.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | //go:build amd64 && illumos 5 | // +build amd64,illumos 6 | 7 | package unix 8 | 9 | const ( 10 | TUNNEWPPA = 0x540001 11 | TUNSETPPA = 0x540002 12 | 13 | I_STR = 0x5308 14 | I_POP = 0x5303 15 | I_PUSH = 0x5302 16 | I_PLINK = 0x5316 17 | I_PUNLINK = 0x5317 18 | 19 | IF_UNITSEL = -0x7ffb8cca 20 | ) 21 | 22 | type strbuf struct { 23 | Maxlen int32 24 | Len int32 25 | Buf *int8 26 | } 27 | 28 | type Strioctl struct { 29 | Cmd int32 30 | Timout int32 31 | Len int32 32 | Dp *int8 33 | } 34 | 35 | type Lifreq struct { 36 | Name [32]int8 37 | Lifru1 [4]byte 38 | Type uint32 39 | Lifru [336]byte 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/empty.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.12 6 | // +build !go1.12 7 | 8 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 9 | // and earlier (see https://golang.org/issue/23311). 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.10 6 | // +build go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.10 6 | // +build !go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | if !t.isRTL() { 12 | return true 13 | } 14 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 15 | } 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go_import_path: google.golang.org/appengine 4 | 5 | install: 6 | - ./travis_install.sh 7 | 8 | script: 9 | - ./travis_test.sh 10 | 11 | matrix: 12 | include: 13 | - go: 1.9.x 14 | env: GOAPP=true 15 | - go: 1.10.x 16 | env: GOAPP=false 17 | - go: 1.11.x 18 | env: GO111MODULE=on 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/appengine_vm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | 7 | package appengine 8 | 9 | import ( 10 | "golang.org/x/net/context" 11 | 12 | "google.golang.org/appengine/internal" 13 | ) 14 | 15 | // BackgroundContext returns a context not associated with a request. 16 | // This should only be used when not servicing a request. 17 | // This only works in App Engine "flexible environment". 18 | func BackgroundContext() context.Context { 19 | return internal.BackgroundContext() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/app_id.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | func parseFullAppID(appid string) (partition, domain, displayID string) { 12 | if i := strings.Index(appid, "~"); i != -1 { 13 | partition, appid = appid[:i], appid[i+1:] 14 | } 15 | if i := strings.Index(appid, ":"); i != -1 { 16 | domain, appid = appid[:i], appid[i+1:] 17 | } 18 | return partition, domain, appid 19 | } 20 | 21 | // appID returns "appid" or "domain.com:appid". 22 | func appID(fullAppID string) string { 23 | _, dom, dis := parseFullAppID(fullAppID) 24 | if dom != "" { 25 | return dom + ":" + dis 26 | } 27 | return dis 28 | } 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/base/api_base.proto: -------------------------------------------------------------------------------- 1 | // Built-in base types for API calls. Primarily useful as return types. 2 | 3 | syntax = "proto2"; 4 | option go_package = "base"; 5 | 6 | package appengine.base; 7 | 8 | message StringProto { 9 | required string value = 1; 10 | } 11 | 12 | message Integer32Proto { 13 | required int32 value = 1; 14 | } 15 | 16 | message Integer64Proto { 17 | required int64 value = 1; 18 | } 19 | 20 | message BoolProto { 21 | required bool value = 1; 22 | } 23 | 24 | message DoubleProto { 25 | required double value = 1; 26 | } 27 | 28 | message BytesProto { 29 | required bytes value = 1 [ctype=CORD]; 30 | } 31 | 32 | message VoidProto { 33 | } 34 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/identity_flex.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appenginevm 6 | 7 | package internal 8 | 9 | func init() { 10 | appengineFlex = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package internal 8 | 9 | import ( 10 | "appengine_internal" 11 | ) 12 | 13 | func Main() { 14 | MainPath = "" 15 | appengine_internal.Main() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/main_common.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | // MainPath stores the file path of the main package. On App Engine Standard 4 | // using Go version 1.9 and below, this will be unset. On App Engine Flex and 5 | // App Engine Standard second-gen (Go 1.11 and above), this will be the 6 | // filepath to package main. 7 | var MainPath string 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/namespace.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package appengine 6 | 7 | import ( 8 | "fmt" 9 | "regexp" 10 | 11 | "golang.org/x/net/context" 12 | 13 | "google.golang.org/appengine/internal" 14 | ) 15 | 16 | // Namespace returns a replacement context that operates within the given namespace. 17 | func Namespace(c context.Context, namespace string) (context.Context, error) { 18 | if !validNamespace.MatchString(namespace) { 19 | return nil, fmt.Errorf("appengine: namespace %q does not match /%s/", namespace, validNamespace) 20 | } 21 | return internal.NamespacedContext(c, namespace), nil 22 | } 23 | 24 | // validNamespace matches valid namespace names. 25 | var validNamespace = regexp.MustCompile(`^[0-9A-Za-z._-]{0,100}$`) 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/timeout.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package appengine 6 | 7 | import "golang.org/x/net/context" 8 | 9 | // IsTimeoutError reports whether err is a timeout error. 10 | func IsTimeoutError(err error) bool { 11 | if err == context.DeadlineExceeded { 12 | return true 13 | } 14 | if t, ok := err.(interface { 15 | IsTimeout() bool 16 | }); ok { 17 | return t.IsTimeout() 18 | } 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/travis_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ $GO111MODULE == "on" ]]; then 5 | go get . 6 | else 7 | go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v appengine) 8 | fi 9 | 10 | if [[ $GOAPP == "true" ]]; then 11 | mkdir /tmp/sdk 12 | curl -o /tmp/sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip" 13 | unzip -q /tmp/sdk.zip -d /tmp/sdk 14 | # NOTE: Set the following env vars in the test script: 15 | # export PATH="$PATH:/tmp/sdk/go_appengine" 16 | # export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/travis_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | go version 5 | go test -v google.golang.org/appengine/... 6 | go test -v -race google.golang.org/appengine/... 7 | if [[ $GOAPP == "true" ]]; then 8 | export PATH="$PATH:/tmp/sdk/go_appengine" 9 | export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py 10 | goapp version 11 | goapp test -v google.golang.org/appengine/... 12 | fi 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Community Code of Conduct 2 | 3 | gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). 2 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 gRPC authors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | For information on gRPC Security Policy and reporting potentional security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md). 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script serves as an example to demonstrate how to generate the gRPC-Go 4 | # interface and the related messages from .proto file. 5 | # 6 | # It assumes the installation of i) Google proto buffer compiler at 7 | # https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen 8 | # plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have 9 | # not, please install them first. 10 | # 11 | # We recommend running this script at $GOPATH/src. 12 | # 13 | # If this is not what you need, feel free to make your own scripts. Again, this 14 | # script is for demonstration purpose. 15 | # 16 | proto=$1 17 | protoc --go_out=plugins=grpc:. $proto 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | //go:generate ./regenerate.sh 20 | 21 | /* 22 | Package grpc implements an RPC system called gRPC. 23 | 24 | See grpc.io for more information about gRPC. 25 | */ 26 | package grpc // import "google.golang.org/grpc" 27 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/health/logging.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2020 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package health 20 | 21 | import "google.golang.org/grpc/grpclog" 22 | 23 | var logger = grpclog.Component("health_service") 24 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | /* 5 | * 6 | * Copyright 2018 gRPC authors. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * 20 | */ 21 | 22 | package channelz 23 | 24 | // GetSocketOption gets the socket option info of the conn. 25 | func GetSocketOption(c interface{}) *SocketOptionData { 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2021 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package grpcutil provides utility functions used across the gRPC codebase. 20 | package grpcutil 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/README.md: -------------------------------------------------------------------------------- 1 | # Reflection 2 | 3 | Package reflection implements server reflection service. 4 | 5 | The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. 6 | 7 | To register server reflection on a gRPC server: 8 | ```go 9 | import "google.golang.org/grpc/reflection" 10 | 11 | s := grpc.NewServer() 12 | pb.RegisterYourOwnServer(s, &server{}) 13 | 14 | // Register reflection service on gRPC server. 15 | reflection.Register(s) 16 | 17 | s.Serve(lis) 18 | ``` 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package grpc 20 | 21 | // Version is the current grpc version. 22 | const Version = "1.45.0" 23 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go113.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package errors 9 | 10 | import "errors" 11 | 12 | // Is is errors.Is. 13 | func Is(err, target error) bool { return errors.Is(err, target) } 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | WeakFields_goname = "weakFields" 15 | WeakFieldsA_goname = "XXX_weak" 16 | 17 | UnknownFields_goname = "unknownFields" 18 | UnknownFieldsA_goname = "XXX_unrecognized" 19 | 20 | ExtensionFields_goname = "extensionFields" 21 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 22 | ExtensionFieldsB_goname = "XXX_extensions" 23 | 24 | WeakFieldPrefix_goname = "XXX_weak_" 25 | ) 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !purego && !appengine 6 | // +build !purego,!appengine 7 | 8 | package impl 9 | 10 | // When using unsafe pointers, we can just treat enum values as int32s. 11 | 12 | var ( 13 | coderEnumNoZero = coderInt32NoZero 14 | coderEnum = coderInt32 15 | coderEnumPtr = coderInt32Ptr 16 | coderEnumSlice = coderInt32Slice 17 | coderEnumPackedSlice = coderInt32PackedSlice 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | pref "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc pref.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n pref.EnumNumber) pref.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(pref.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() pref.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/strs/strings_pure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego || appengine 6 | // +build purego appengine 7 | 8 | package strs 9 | 10 | import pref "google.golang.org/protobuf/reflect/protoreflect" 11 | 12 | func UnsafeString(b []byte) string { 13 | return string(b) 14 | } 15 | 16 | func UnsafeBytes(s string) []byte { 17 | return []byte(s) 18 | } 19 | 20 | type Builder struct{} 21 | 22 | func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { 23 | return prefix.Append(name) 24 | } 25 | 26 | func (*Builder) MakeString(b []byte) string { 27 | return string(b) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | --------------------------------------------------------------------------------