├── .circleci └── config.yml ├── .gitignore ├── GNUmakefile ├── LICENSE ├── README.md ├── artifactory ├── import_resource_group_test.go ├── import_resource_local_repository_test.go ├── import_resource_remote_repository_test.go ├── import_resource_user_test.go ├── import_resource_virtual_repository_test.go ├── provider.go ├── provider_test.go ├── resource_group.go ├── resource_group_test.go ├── resource_local_repository.go ├── resource_local_repository_test.go ├── resource_remote_repository.go ├── resource_remote_repository_test.go ├── resource_repository.go ├── resource_user.go ├── resource_user_test.go ├── resource_virtual_repository.go └── resource_virtual_repository_test.go ├── examples └── npm │ └── npm.tf ├── main.go ├── scripts ├── changelog-links.sh ├── errcheck.sh ├── gofmtcheck.sh └── gogetcookie.sh ├── vendor ├── github.com │ ├── apparentlymart │ │ └── go-cidr │ │ │ ├── LICENSE │ │ │ └── cidr │ │ │ ├── cidr.go │ │ │ └── wrangling.go │ ├── armon │ │ └── go-radix │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── radix.go │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ ├── aws │ │ │ ├── awserr │ │ │ │ ├── error.go │ │ │ │ └── types.go │ │ │ ├── awsutil │ │ │ │ ├── copy.go │ │ │ │ ├── equal.go │ │ │ │ ├── path_value.go │ │ │ │ ├── prettify.go │ │ │ │ └── string_value.go │ │ │ ├── client │ │ │ │ ├── client.go │ │ │ │ ├── default_retryer.go │ │ │ │ ├── logger.go │ │ │ │ └── metadata │ │ │ │ │ └── client_info.go │ │ │ ├── config.go │ │ │ ├── context.go │ │ │ ├── context_1_6.go │ │ │ ├── context_1_7.go │ │ │ ├── convert_types.go │ │ │ ├── corehandlers │ │ │ │ ├── handlers.go │ │ │ │ └── param_validator.go │ │ │ ├── credentials │ │ │ │ ├── chain_provider.go │ │ │ │ ├── credentials.go │ │ │ │ ├── ec2rolecreds │ │ │ │ │ └── ec2_role_provider.go │ │ │ │ ├── endpointcreds │ │ │ │ │ └── provider.go │ │ │ │ ├── env_provider.go │ │ │ │ ├── example.ini │ │ │ │ ├── shared_credentials_provider.go │ │ │ │ ├── static_provider.go │ │ │ │ └── stscreds │ │ │ │ │ └── assume_role_provider.go │ │ │ ├── defaults │ │ │ │ ├── defaults.go │ │ │ │ └── shared_config.go │ │ │ ├── doc.go │ │ │ ├── ec2metadata │ │ │ │ ├── api.go │ │ │ │ └── service.go │ │ │ ├── endpoints │ │ │ │ ├── decode.go │ │ │ │ ├── defaults.go │ │ │ │ ├── doc.go │ │ │ │ ├── endpoints.go │ │ │ │ ├── v3model.go │ │ │ │ └── v3model_codegen.go │ │ │ ├── errors.go │ │ │ ├── jsonvalue.go │ │ │ ├── logger.go │ │ │ ├── request │ │ │ │ ├── connection_reset_error.go │ │ │ │ ├── connection_reset_error_other.go │ │ │ │ ├── handlers.go │ │ │ │ ├── http_request.go │ │ │ │ ├── offset_reader.go │ │ │ │ ├── request.go │ │ │ │ ├── request_1_7.go │ │ │ │ ├── request_1_8.go │ │ │ │ ├── request_context.go │ │ │ │ ├── request_context_1_6.go │ │ │ │ ├── request_pagination.go │ │ │ │ ├── retryer.go │ │ │ │ ├── timeout_read_closer.go │ │ │ │ ├── validation.go │ │ │ │ └── waiter.go │ │ │ ├── session │ │ │ │ ├── doc.go │ │ │ │ ├── env_config.go │ │ │ │ ├── session.go │ │ │ │ └── shared_config.go │ │ │ ├── signer │ │ │ │ └── v4 │ │ │ │ │ ├── header_rules.go │ │ │ │ │ ├── options.go │ │ │ │ │ ├── uri_path.go │ │ │ │ │ └── v4.go │ │ │ ├── types.go │ │ │ ├── url.go │ │ │ ├── url_1_7.go │ │ │ └── version.go │ │ │ ├── internal │ │ │ └── shareddefaults │ │ │ │ └── shared_config.go │ │ │ ├── private │ │ │ └── protocol │ │ │ │ ├── decode.go │ │ │ │ ├── encode.go │ │ │ │ ├── fields.go │ │ │ │ ├── header_encoder.go │ │ │ │ ├── idempotency.go │ │ │ │ ├── metadata.go │ │ │ │ ├── path_replace.go │ │ │ │ ├── query │ │ │ │ ├── build.go │ │ │ │ ├── queryutil │ │ │ │ │ └── queryutil.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── unmarshal_error.go │ │ │ │ ├── query_encoder.go │ │ │ │ ├── rest │ │ │ │ ├── build.go │ │ │ │ ├── encode.go │ │ │ │ ├── payload.go │ │ │ │ └── unmarshal.go │ │ │ │ ├── restxml │ │ │ │ ├── encode.go │ │ │ │ └── restxml.go │ │ │ │ ├── target.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── xml │ │ │ │ ├── encode.go │ │ │ │ └── xmlutil │ │ │ │ ├── build.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── xml_to_struct.go │ │ │ └── service │ │ │ ├── s3 │ │ │ ├── api.go │ │ │ ├── bucket_location.go │ │ │ ├── content_md5.go │ │ │ ├── customizations.go │ │ │ ├── doc.go │ │ │ ├── doc_custom.go │ │ │ ├── errors.go │ │ │ ├── host_style_bucket.go │ │ │ ├── platform_handlers.go │ │ │ ├── platform_handlers_go1.6.go │ │ │ ├── service.go │ │ │ ├── sse.go │ │ │ ├── statusok_error.go │ │ │ ├── unmarshal_error.go │ │ │ └── waiters.go │ │ │ └── sts │ │ │ ├── api.go │ │ │ ├── customizations.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ └── service.go │ ├── bgentry │ │ ├── go-netrc │ │ │ ├── LICENSE │ │ │ └── netrc │ │ │ │ └── netrc.go │ │ └── speakeasy │ │ │ ├── LICENSE │ │ │ ├── LICENSE_WINDOWS │ │ │ ├── Readme.md │ │ │ ├── speakeasy.go │ │ │ ├── speakeasy_unix.go │ │ │ └── speakeasy_windows.go │ ├── blang │ │ └── semver │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── json.go │ │ │ ├── package.json │ │ │ ├── range.go │ │ │ ├── semver.go │ │ │ ├── sort.go │ │ │ └── sql.go │ ├── davecgh │ │ └── go-spew │ │ │ ├── LICENSE │ │ │ └── spew │ │ │ ├── bypass.go │ │ │ ├── bypasssafe.go │ │ │ ├── common.go │ │ │ ├── config.go │ │ │ ├── doc.go │ │ │ ├── dump.go │ │ │ ├── format.go │ │ │ └── spew.go │ ├── go-ini │ │ └── ini │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── README_ZH.md │ │ │ ├── error.go │ │ │ ├── ini.go │ │ │ ├── key.go │ │ │ ├── parser.go │ │ │ ├── section.go │ │ │ └── struct.go │ ├── golang │ │ └── protobuf │ │ │ ├── LICENSE │ │ │ ├── proto │ │ │ ├── Makefile │ │ │ ├── clone.go │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ ├── equal.go │ │ │ ├── extensions.go │ │ │ ├── lib.go │ │ │ ├── message_set.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── properties.go │ │ │ ├── text.go │ │ │ └── text_parser.go │ │ │ └── ptypes │ │ │ ├── any.go │ │ │ ├── any │ │ │ ├── any.pb.go │ │ │ └── any.proto │ │ │ ├── doc.go │ │ │ ├── duration.go │ │ │ ├── duration │ │ │ ├── duration.pb.go │ │ │ └── duration.proto │ │ │ ├── regen.sh │ │ │ ├── timestamp.go │ │ │ └── timestamp │ │ │ ├── timestamp.pb.go │ │ │ └── timestamp.proto │ ├── hashicorp │ │ ├── errwrap │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── errwrap.go │ │ ├── go-cleanhttp │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cleanhttp.go │ │ │ └── doc.go │ │ ├── go-getter │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── client.go │ │ │ ├── client_mode.go │ │ │ ├── copy_dir.go │ │ │ ├── decompress.go │ │ │ ├── decompress_bzip2.go │ │ │ ├── decompress_gzip.go │ │ │ ├── decompress_tar.go │ │ │ ├── decompress_tbz2.go │ │ │ ├── decompress_testing.go │ │ │ ├── decompress_tgz.go │ │ │ ├── decompress_txz.go │ │ │ ├── decompress_xz.go │ │ │ ├── decompress_zip.go │ │ │ ├── detect.go │ │ │ ├── detect_bitbucket.go │ │ │ ├── detect_file.go │ │ │ ├── detect_github.go │ │ │ ├── detect_s3.go │ │ │ ├── folder_storage.go │ │ │ ├── get.go │ │ │ ├── get_file.go │ │ │ ├── get_file_unix.go │ │ │ ├── get_file_windows.go │ │ │ ├── get_git.go │ │ │ ├── get_hg.go │ │ │ ├── get_http.go │ │ │ ├── get_mock.go │ │ │ ├── get_s3.go │ │ │ ├── helper │ │ │ │ └── url │ │ │ │ │ ├── url.go │ │ │ │ │ ├── url_unix.go │ │ │ │ │ └── url_windows.go │ │ │ ├── netrc.go │ │ │ ├── source.go │ │ │ └── storage.go │ │ ├── go-hclog │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── global.go │ │ │ ├── int.go │ │ │ ├── log.go │ │ │ ├── stacktrace.go │ │ │ └── stdlog.go │ │ ├── go-multierror │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── append.go │ │ │ ├── flatten.go │ │ │ ├── format.go │ │ │ ├── multierror.go │ │ │ └── prefix.go │ │ ├── go-plugin │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ ├── discover.go │ │ │ ├── error.go │ │ │ ├── grpc_client.go │ │ │ ├── grpc_server.go │ │ │ ├── log_entry.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 │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── uuid.go │ │ ├── go-version │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── constraint.go │ │ │ ├── version.go │ │ │ └── version_collection.go │ │ ├── hcl │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── decoder.go │ │ │ ├── hcl.go │ │ │ ├── hcl │ │ │ │ ├── ast │ │ │ │ │ ├── ast.go │ │ │ │ │ └── walk.go │ │ │ │ ├── parser │ │ │ │ │ ├── error.go │ │ │ │ │ └── parser.go │ │ │ │ ├── scanner │ │ │ │ │ └── scanner.go │ │ │ │ ├── strconv │ │ │ │ │ └── quote.go │ │ │ │ └── token │ │ │ │ │ ├── position.go │ │ │ │ │ └── token.go │ │ │ ├── json │ │ │ │ ├── parser │ │ │ │ │ ├── flatten.go │ │ │ │ │ └── parser.go │ │ │ │ ├── scanner │ │ │ │ │ └── scanner.go │ │ │ │ └── token │ │ │ │ │ ├── position.go │ │ │ │ │ └── token.go │ │ │ ├── lex.go │ │ │ └── parse.go │ │ ├── hil │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── ast │ │ │ │ ├── arithmetic.go │ │ │ │ ├── arithmetic_op.go │ │ │ │ ├── ast.go │ │ │ │ ├── call.go │ │ │ │ ├── conditional.go │ │ │ │ ├── index.go │ │ │ │ ├── literal.go │ │ │ │ ├── output.go │ │ │ │ ├── scope.go │ │ │ │ ├── stack.go │ │ │ │ ├── type_string.go │ │ │ │ ├── unknown.go │ │ │ │ ├── variable_access.go │ │ │ │ └── variables_helper.go │ │ │ ├── builtins.go │ │ │ ├── check_identifier.go │ │ │ ├── check_types.go │ │ │ ├── convert.go │ │ │ ├── eval.go │ │ │ ├── eval_type.go │ │ │ ├── evaltype_string.go │ │ │ ├── parse.go │ │ │ ├── parser │ │ │ │ ├── binary_op.go │ │ │ │ ├── error.go │ │ │ │ ├── fuzz.go │ │ │ │ └── parser.go │ │ │ ├── scanner │ │ │ │ ├── peeker.go │ │ │ │ ├── scanner.go │ │ │ │ ├── token.go │ │ │ │ └── tokentype_string.go │ │ │ ├── transform_fixed.go │ │ │ └── walk.go │ │ ├── logutils │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── level.go │ │ ├── terraform │ │ │ ├── LICENSE │ │ │ ├── config │ │ │ │ ├── append.go │ │ │ │ ├── config.go │ │ │ │ ├── config_string.go │ │ │ │ ├── config_terraform.go │ │ │ │ ├── config_tree.go │ │ │ │ ├── import_tree.go │ │ │ │ ├── interpolate.go │ │ │ │ ├── interpolate_funcs.go │ │ │ │ ├── interpolate_walk.go │ │ │ │ ├── lang.go │ │ │ │ ├── loader.go │ │ │ │ ├── loader_hcl.go │ │ │ │ ├── merge.go │ │ │ │ ├── module │ │ │ │ │ ├── copy_dir.go │ │ │ │ │ ├── get.go │ │ │ │ │ ├── inode.go │ │ │ │ │ ├── inode_freebsd.go │ │ │ │ │ ├── inode_windows.go │ │ │ │ │ ├── module.go │ │ │ │ │ ├── testing.go │ │ │ │ │ ├── tree.go │ │ │ │ │ ├── tree_gob.go │ │ │ │ │ └── validate_provider_alias.go │ │ │ │ ├── providers.go │ │ │ │ ├── provisioner_enums.go │ │ │ │ ├── raw_config.go │ │ │ │ ├── resource_mode.go │ │ │ │ ├── resource_mode_string.go │ │ │ │ └── testing.go │ │ │ ├── dag │ │ │ │ ├── dag.go │ │ │ │ ├── dot.go │ │ │ │ ├── edge.go │ │ │ │ ├── graph.go │ │ │ │ ├── marshal.go │ │ │ │ ├── set.go │ │ │ │ ├── tarjan.go │ │ │ │ └── walk.go │ │ │ ├── flatmap │ │ │ │ ├── expand.go │ │ │ │ ├── flatten.go │ │ │ │ └── map.go │ │ │ ├── helper │ │ │ │ ├── config │ │ │ │ │ ├── decode.go │ │ │ │ │ └── validator.go │ │ │ │ ├── experiment │ │ │ │ │ ├── experiment.go │ │ │ │ │ └── id.go │ │ │ │ ├── hashcode │ │ │ │ │ └── hashcode.go │ │ │ │ ├── hilmapstructure │ │ │ │ │ └── hilmapstructure.go │ │ │ │ ├── logging │ │ │ │ │ ├── logging.go │ │ │ │ │ └── transport.go │ │ │ │ ├── resource │ │ │ │ │ ├── error.go │ │ │ │ │ ├── id.go │ │ │ │ │ ├── map.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── state.go │ │ │ │ │ ├── testing.go │ │ │ │ │ ├── testing_config.go │ │ │ │ │ ├── testing_import_state.go │ │ │ │ │ └── wait.go │ │ │ │ ├── schema │ │ │ │ │ ├── README.md │ │ │ │ │ ├── backend.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 │ │ │ │ │ ├── provider.go │ │ │ │ │ ├── provisioner.go │ │ │ │ │ ├── resource.go │ │ │ │ │ ├── resource_data.go │ │ │ │ │ ├── resource_data_get_source.go │ │ │ │ │ ├── resource_importer.go │ │ │ │ │ ├── resource_timeout.go │ │ │ │ │ ├── schema.go │ │ │ │ │ ├── serialize.go │ │ │ │ │ ├── set.go │ │ │ │ │ ├── testing.go │ │ │ │ │ ├── valuetype.go │ │ │ │ │ └── valuetype_string.go │ │ │ │ ├── shadow │ │ │ │ │ ├── closer.go │ │ │ │ │ ├── compared_value.go │ │ │ │ │ ├── keyed_value.go │ │ │ │ │ ├── ordered_value.go │ │ │ │ │ └── value.go │ │ │ │ ├── structure │ │ │ │ │ ├── expand_json.go │ │ │ │ │ ├── flatten_json.go │ │ │ │ │ ├── normalize_json.go │ │ │ │ │ └── suppress_json_diff.go │ │ │ │ └── validation │ │ │ │ │ └── validation.go │ │ │ ├── moduledeps │ │ │ │ ├── dependencies.go │ │ │ │ ├── doc.go │ │ │ │ ├── module.go │ │ │ │ └── provider.go │ │ │ ├── plugin │ │ │ │ ├── client.go │ │ │ │ ├── discovery │ │ │ │ │ ├── error.go │ │ │ │ │ ├── find.go │ │ │ │ │ ├── get.go │ │ │ │ │ ├── meta.go │ │ │ │ │ ├── meta_set.go │ │ │ │ │ ├── requirements.go │ │ │ │ │ ├── signature.go │ │ │ │ │ ├── version.go │ │ │ │ │ └── version_set.go │ │ │ │ ├── plugin.go │ │ │ │ ├── resource_provider.go │ │ │ │ ├── resource_provisioner.go │ │ │ │ ├── serve.go │ │ │ │ ├── ui_input.go │ │ │ │ └── ui_output.go │ │ │ └── terraform │ │ │ │ ├── context.go │ │ │ │ ├── context_components.go │ │ │ │ ├── context_graph_type.go │ │ │ │ ├── context_import.go │ │ │ │ ├── debug.go │ │ │ │ ├── diff.go │ │ │ │ ├── edge_destroy.go │ │ │ │ ├── eval.go │ │ │ │ ├── eval_apply.go │ │ │ │ ├── eval_check_prevent_destroy.go │ │ │ │ ├── eval_context.go │ │ │ │ ├── eval_context_builtin.go │ │ │ │ ├── eval_context_mock.go │ │ │ │ ├── eval_count.go │ │ │ │ ├── eval_count_boundary.go │ │ │ │ ├── eval_count_computed.go │ │ │ │ ├── eval_diff.go │ │ │ │ ├── eval_error.go │ │ │ │ ├── eval_filter.go │ │ │ │ ├── eval_filter_operation.go │ │ │ │ ├── eval_if.go │ │ │ │ ├── eval_import_state.go │ │ │ │ ├── eval_interpolate.go │ │ │ │ ├── eval_local.go │ │ │ │ ├── eval_noop.go │ │ │ │ ├── eval_output.go │ │ │ │ ├── eval_provider.go │ │ │ │ ├── eval_provisioner.go │ │ │ │ ├── eval_read_data.go │ │ │ │ ├── eval_refresh.go │ │ │ │ ├── eval_resource.go │ │ │ │ ├── eval_sequence.go │ │ │ │ ├── eval_state.go │ │ │ │ ├── eval_validate.go │ │ │ │ ├── eval_validate_selfref.go │ │ │ │ ├── eval_variable.go │ │ │ │ ├── evaltree_provider.go │ │ │ │ ├── graph.go │ │ │ │ ├── graph_builder.go │ │ │ │ ├── graph_builder_apply.go │ │ │ │ ├── graph_builder_destroy_plan.go │ │ │ │ ├── graph_builder_import.go │ │ │ │ ├── graph_builder_input.go │ │ │ │ ├── graph_builder_plan.go │ │ │ │ ├── graph_builder_refresh.go │ │ │ │ ├── graph_builder_validate.go │ │ │ │ ├── graph_dot.go │ │ │ │ ├── graph_interface_subgraph.go │ │ │ │ ├── graph_walk.go │ │ │ │ ├── graph_walk_context.go │ │ │ │ ├── graph_walk_operation.go │ │ │ │ ├── graphtype_string.go │ │ │ │ ├── hook.go │ │ │ │ ├── hook_mock.go │ │ │ │ ├── hook_stop.go │ │ │ │ ├── instancetype.go │ │ │ │ ├── instancetype_string.go │ │ │ │ ├── interpolate.go │ │ │ │ ├── module_dependencies.go │ │ │ │ ├── node_count_boundary.go │ │ │ │ ├── node_data_destroy.go │ │ │ │ ├── node_data_refresh.go │ │ │ │ ├── node_local.go │ │ │ │ ├── node_module_destroy.go │ │ │ │ ├── node_module_variable.go │ │ │ │ ├── node_output.go │ │ │ │ ├── node_output_orphan.go │ │ │ │ ├── node_provider.go │ │ │ │ ├── node_provider_abstract.go │ │ │ │ ├── node_provider_disabled.go │ │ │ │ ├── node_provisioner.go │ │ │ │ ├── node_resource_abstract.go │ │ │ │ ├── node_resource_abstract_count.go │ │ │ │ ├── node_resource_apply.go │ │ │ │ ├── node_resource_destroy.go │ │ │ │ ├── node_resource_plan.go │ │ │ │ ├── node_resource_plan_destroy.go │ │ │ │ ├── node_resource_plan_instance.go │ │ │ │ ├── node_resource_plan_orphan.go │ │ │ │ ├── node_resource_refresh.go │ │ │ │ ├── node_resource_validate.go │ │ │ │ ├── node_root_variable.go │ │ │ │ ├── path.go │ │ │ │ ├── plan.go │ │ │ │ ├── resource.go │ │ │ │ ├── resource_address.go │ │ │ │ ├── resource_provider.go │ │ │ │ ├── resource_provider_mock.go │ │ │ │ ├── resource_provisioner.go │ │ │ │ ├── resource_provisioner_mock.go │ │ │ │ ├── semantics.go │ │ │ │ ├── state.go │ │ │ │ ├── state_add.go │ │ │ │ ├── state_filter.go │ │ │ │ ├── state_upgrade_v1_to_v2.go │ │ │ │ ├── state_upgrade_v2_to_v3.go │ │ │ │ ├── state_v1.go │ │ │ │ ├── test_failure │ │ │ │ ├── testing.go │ │ │ │ ├── transform.go │ │ │ │ ├── transform_attach_config_provider.go │ │ │ │ ├── transform_attach_config_resource.go │ │ │ │ ├── transform_attach_state.go │ │ │ │ ├── transform_config.go │ │ │ │ ├── transform_config_flat.go │ │ │ │ ├── transform_config_old.go │ │ │ │ ├── transform_count_boundary.go │ │ │ │ ├── transform_deposed.go │ │ │ │ ├── transform_destroy_cbd.go │ │ │ │ ├── transform_destroy_edge.go │ │ │ │ ├── transform_diff.go │ │ │ │ ├── transform_expand.go │ │ │ │ ├── transform_import_provider.go │ │ │ │ ├── transform_import_state.go │ │ │ │ ├── transform_local.go │ │ │ │ ├── transform_module_variable.go │ │ │ │ ├── transform_orphan_count.go │ │ │ │ ├── transform_orphan_output.go │ │ │ │ ├── transform_orphan_resource.go │ │ │ │ ├── transform_output.go │ │ │ │ ├── transform_provider.go │ │ │ │ ├── transform_provider_disable.go │ │ │ │ ├── transform_provisioner.go │ │ │ │ ├── transform_reference.go │ │ │ │ ├── transform_resource_count.go │ │ │ │ ├── transform_root.go │ │ │ │ ├── transform_state.go │ │ │ │ ├── transform_targets.go │ │ │ │ ├── transform_transitive_reduction.go │ │ │ │ ├── transform_variable.go │ │ │ │ ├── transform_vertex.go │ │ │ │ ├── ui_input.go │ │ │ │ ├── ui_input_mock.go │ │ │ │ ├── ui_input_prefix.go │ │ │ │ ├── ui_output.go │ │ │ │ ├── ui_output_callback.go │ │ │ │ ├── ui_output_mock.go │ │ │ │ ├── ui_output_provisioner.go │ │ │ │ ├── user_agent.go │ │ │ │ ├── util.go │ │ │ │ ├── variables.go │ │ │ │ ├── version.go │ │ │ │ ├── version_required.go │ │ │ │ └── walkoperation_string.go │ │ └── yamux │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── addr.go │ │ │ ├── const.go │ │ │ ├── mux.go │ │ │ ├── session.go │ │ │ ├── spec.md │ │ │ ├── stream.go │ │ │ └── util.go │ ├── jmespath │ │ └── go-jmespath │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── api.go │ │ │ ├── astnodetype_string.go │ │ │ ├── functions.go │ │ │ ├── interpreter.go │ │ │ ├── lexer.go │ │ │ ├── parser.go │ │ │ ├── toktype_string.go │ │ │ └── util.go │ ├── mattn │ │ └── go-isatty │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── isatty_appengine.go │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_linux.go │ │ │ ├── isatty_linux_ppc64x.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_solaris.go │ │ │ └── isatty_windows.go │ ├── mitchellh │ │ ├── cli │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── autocomplete.go │ │ │ ├── cli.go │ │ │ ├── command.go │ │ │ ├── command_mock.go │ │ │ ├── help.go │ │ │ ├── ui.go │ │ │ ├── ui_colored.go │ │ │ ├── ui_concurrent.go │ │ │ ├── ui_mock.go │ │ │ └── ui_writer.go │ │ ├── copystructure │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── copier_time.go │ │ │ └── copystructure.go │ │ ├── go-homedir │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── homedir.go │ │ ├── go-testing-interface │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── testing.go │ │ │ └── testing_go19.go │ │ ├── hashstructure │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── hashstructure.go │ │ │ └── include.go │ │ ├── mapstructure │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── decode_hooks.go │ │ │ ├── error.go │ │ │ └── mapstructure.go │ │ └── reflectwalk │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── location.go │ │ │ ├── location_string.go │ │ │ └── reflectwalk.go │ ├── posener │ │ └── complete │ │ │ ├── LICENSE.txt │ │ │ ├── args.go │ │ │ ├── cmd │ │ │ ├── cmd.go │ │ │ └── install │ │ │ │ ├── bash.go │ │ │ │ ├── install.go │ │ │ │ ├── utils.go │ │ │ │ └── zsh.go │ │ │ ├── command.go │ │ │ ├── complete.go │ │ │ ├── log.go │ │ │ ├── match │ │ │ ├── file.go │ │ │ ├── match.go │ │ │ └── prefix.go │ │ │ ├── metalinter.json │ │ │ ├── predict.go │ │ │ ├── predict_files.go │ │ │ ├── predict_set.go │ │ │ ├── readme.md │ │ │ ├── test.sh │ │ │ └── utils.go │ ├── satori │ │ └── go.uuid │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── uuid.go │ ├── ulikunitz │ │ └── xz │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── TODO.md │ │ │ ├── bits.go │ │ │ ├── crc.go │ │ │ ├── format.go │ │ │ ├── fox.xz │ │ │ ├── internal │ │ │ ├── hash │ │ │ │ ├── cyclic_poly.go │ │ │ │ ├── doc.go │ │ │ │ ├── rabin_karp.go │ │ │ │ └── roller.go │ │ │ └── xlog │ │ │ │ └── xlog.go │ │ │ ├── lzma │ │ │ ├── bintree.go │ │ │ ├── bitops.go │ │ │ ├── breader.go │ │ │ ├── buffer.go │ │ │ ├── bytewriter.go │ │ │ ├── decoder.go │ │ │ ├── decoderdict.go │ │ │ ├── directcodec.go │ │ │ ├── distcodec.go │ │ │ ├── encoder.go │ │ │ ├── encoderdict.go │ │ │ ├── fox.lzma │ │ │ ├── hashtable.go │ │ │ ├── header.go │ │ │ ├── header2.go │ │ │ ├── lengthcodec.go │ │ │ ├── literalcodec.go │ │ │ ├── matchalgorithm.go │ │ │ ├── operation.go │ │ │ ├── prob.go │ │ │ ├── properties.go │ │ │ ├── rangecodec.go │ │ │ ├── reader.go │ │ │ ├── reader2.go │ │ │ ├── state.go │ │ │ ├── treecodecs.go │ │ │ ├── writer.go │ │ │ └── writer2.go │ │ │ ├── lzmafilter.go │ │ │ ├── make-docs │ │ │ ├── reader.go │ │ │ └── writer.go │ └── webdevwilson │ │ └── go-artifactory │ │ └── artifactory │ │ ├── client.go │ │ ├── group.go │ │ ├── repository.go │ │ └── user.go ├── golang.org │ └── x │ │ ├── crypto │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── bcrypt │ │ │ ├── base64.go │ │ │ └── bcrypt.go │ │ ├── blowfish │ │ │ ├── block.go │ │ │ ├── cipher.go │ │ │ └── const.go │ │ ├── cast5 │ │ │ └── cast5.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 │ │ ├── net │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── context │ │ │ ├── context.go │ │ │ ├── go17.go │ │ │ ├── go19.go │ │ │ ├── pre_go17.go │ │ │ └── pre_go19.go │ │ ├── html │ │ │ ├── atom │ │ │ │ ├── atom.go │ │ │ │ └── table.go │ │ │ ├── const.go │ │ │ ├── doc.go │ │ │ ├── doctype.go │ │ │ ├── entity.go │ │ │ ├── escape.go │ │ │ ├── foreign.go │ │ │ ├── node.go │ │ │ ├── parse.go │ │ │ ├── render.go │ │ │ └── token.go │ │ ├── http2 │ │ │ ├── Dockerfile │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── ciphers.go │ │ │ ├── client_conn_pool.go │ │ │ ├── configure_transport.go │ │ │ ├── databuffer.go │ │ │ ├── errors.go │ │ │ ├── flow.go │ │ │ ├── frame.go │ │ │ ├── go16.go │ │ │ ├── go17.go │ │ │ ├── go17_not18.go │ │ │ ├── go18.go │ │ │ ├── go19.go │ │ │ ├── gotrack.go │ │ │ ├── headermap.go │ │ │ ├── hpack │ │ │ │ ├── encode.go │ │ │ │ ├── hpack.go │ │ │ │ ├── huffman.go │ │ │ │ └── tables.go │ │ │ ├── http2.go │ │ │ ├── not_go16.go │ │ │ ├── not_go17.go │ │ │ ├── not_go18.go │ │ │ ├── not_go19.go │ │ │ ├── pipe.go │ │ │ ├── server.go │ │ │ ├── transport.go │ │ │ ├── write.go │ │ │ ├── writesched.go │ │ │ ├── writesched_priority.go │ │ │ └── writesched_random.go │ │ ├── idna │ │ │ ├── idna.go │ │ │ ├── punycode.go │ │ │ ├── tables.go │ │ │ ├── trie.go │ │ │ └── trieval.go │ │ ├── internal │ │ │ └── timeseries │ │ │ │ └── timeseries.go │ │ ├── lex │ │ │ └── httplex │ │ │ │ └── httplex.go │ │ └── trace │ │ │ ├── events.go │ │ │ ├── histogram.go │ │ │ ├── trace.go │ │ │ ├── trace_go16.go │ │ │ └── trace_go17.go │ │ ├── sys │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── unix │ │ │ ├── README.md │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_freebsd_arm.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_s390x.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_openbsd_arm.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── env_unset.go │ │ │ ├── errors_freebsd_386.go │ │ │ ├── errors_freebsd_amd64.go │ │ │ ├── errors_freebsd_arm.go │ │ │ ├── file_unix.go │ │ │ ├── flock.go │ │ │ ├── flock_linux_32bit.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mksyscall.pl │ │ │ ├── mksyscall_solaris.pl │ │ │ ├── mksysctl_openbsd.pl │ │ │ ├── mksysnum_darwin.pl │ │ │ ├── mksysnum_dragonfly.pl │ │ │ ├── mksysnum_freebsd.pl │ │ │ ├── mksysnum_netbsd.pl │ │ │ ├── mksysnum_openbsd.pl │ │ │ ├── openbsd_pledge.go │ │ │ ├── pagesize_unix.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_386.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.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_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc64x.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_no_getwd.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── zerrors_darwin_386.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.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_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zsyscall_darwin_386.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_arm.go │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.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_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsysctl_openbsd.go │ │ │ ├── zsysnum_darwin_386.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.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_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ ├── ztypes_darwin_386.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.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_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ └── ztypes_solaris_amd64.go │ │ └── text │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── secure │ │ └── bidirule │ │ │ └── bidirule.go │ │ ├── transform │ │ └── transform.go │ │ └── unicode │ │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── prop.go │ │ ├── tables.go │ │ └── trieval.go │ │ └── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables.go │ │ ├── transform.go │ │ └── trie.go ├── google.golang.org │ ├── genproto │ │ ├── LICENSE │ │ └── googleapis │ │ │ └── rpc │ │ │ └── status │ │ │ └── status.pb.go │ └── grpc │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── backoff.go │ │ ├── balancer.go │ │ ├── balancer │ │ └── balancer.go │ │ ├── balancer_conn_wrappers.go │ │ ├── balancer_v1_wrapper.go │ │ ├── call.go │ │ ├── clientconn.go │ │ ├── codec.go │ │ ├── codegen.sh │ │ ├── codes │ │ ├── code_string.go │ │ └── codes.go │ │ ├── connectivity │ │ └── connectivity.go │ │ ├── credentials │ │ ├── credentials.go │ │ ├── credentials_util_go17.go │ │ ├── credentials_util_go18.go │ │ └── credentials_util_pre_go17.go │ │ ├── doc.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── grpclb.go │ │ ├── grpclb │ │ └── grpc_lb_v1 │ │ │ └── messages │ │ │ ├── messages.pb.go │ │ │ └── messages.proto │ │ ├── grpclog │ │ ├── grpclog.go │ │ ├── logger.go │ │ └── loggerv2.go │ │ ├── health │ │ ├── grpc_health_v1 │ │ │ ├── health.pb.go │ │ │ └── health.proto │ │ └── health.go │ │ ├── interceptor.go │ │ ├── internal │ │ └── internal.go │ │ ├── keepalive │ │ └── keepalive.go │ │ ├── metadata │ │ └── metadata.go │ │ ├── naming │ │ ├── dns_resolver.go │ │ ├── go17.go │ │ ├── go18.go │ │ └── naming.go │ │ ├── peer │ │ └── peer.go │ │ ├── proxy.go │ │ ├── resolver │ │ └── resolver.go │ │ ├── rpc_util.go │ │ ├── server.go │ │ ├── stats │ │ ├── handlers.go │ │ └── stats.go │ │ ├── status │ │ └── status.go │ │ ├── stream.go │ │ ├── tap │ │ └── tap.go │ │ ├── trace.go │ │ ├── transport │ │ ├── bdp_estimator.go │ │ ├── control.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── handler_server.go │ │ ├── http2_client.go │ │ ├── http2_server.go │ │ ├── http_util.go │ │ ├── log.go │ │ └── transport.go │ │ └── vet.sh └── vendor.json └── website ├── artifactory.erb └── docs ├── index.html.markdown └── r ├── artifactory_group.markdown ├── artifactory_local_repository.markdown ├── artifactory_remote_repository.markdown ├── artifactory_user.markdown └── artifactory_virtual_repository.markdown /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Golang CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-go/ for more details 4 | version: 2 5 | jobs: 6 | build: 7 | docker: 8 | - image: circleci/golang:1.9 9 | working_directory: /go/src/github.com/webdevwilson/terraform-provider-artifactory 10 | steps: 11 | - checkout 12 | - run: make test build 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | terraform-provider-artifactory 3 | acctest.env 4 | .terraform 5 | terraform.tfstate* 6 | -------------------------------------------------------------------------------- /artifactory/import_resource_group_test.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/helper/resource" 5 | "testing" 6 | ) 7 | 8 | func IgnoreTestAccGroup_import(t *testing.T) { 9 | resource.Test(t, resource.TestCase{ 10 | PreCheck: func() { testAccPreCheck(t) }, 11 | CheckDestroy: testAccCheckGroupDestroy("artifactory_group.foobar"), 12 | Providers: testAccProviders, 13 | Steps: []resource.TestStep{ 14 | resource.TestStep{ 15 | Config: testAccGroup_full, 16 | }, 17 | resource.TestStep{ 18 | ResourceName: "artifactory_group.foobar", 19 | ImportState: true, 20 | ImportStateVerify: true, 21 | }, 22 | }, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /artifactory/import_resource_local_repository_test.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/helper/resource" 5 | "testing" 6 | ) 7 | 8 | func IgnoreTestAccLocalRepository_import(t *testing.T) { 9 | resource.Test(t, resource.TestCase{ 10 | PreCheck: func() { testAccPreCheck(t) }, 11 | Providers: testAccProviders, 12 | CheckDestroy: testAccCheckRepositoryDestroy("artifactory_local_repository.foobar"), 13 | Steps: []resource.TestStep{ 14 | resource.TestStep{ 15 | Config: testAccLocalRepository_basic, 16 | }, 17 | resource.TestStep{ 18 | ResourceName: "artifactory_local_repository.foobar", 19 | ImportState: true, 20 | ImportStateVerify: true, 21 | }, 22 | }, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /artifactory/import_resource_remote_repository_test.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/helper/resource" 5 | "testing" 6 | ) 7 | 8 | func IgnoreTestAccRemoteRepository_import(t *testing.T) { 9 | resource.Test(t, resource.TestCase{ 10 | PreCheck: func() { testAccPreCheck(t) }, 11 | Providers: testAccProviders, 12 | CheckDestroy: testAccCheckRepositoryDestroy("artifactory_remote_repository.foobar"), 13 | Steps: []resource.TestStep{ 14 | resource.TestStep{ 15 | Config: testAccRemoteRepository_basic, 16 | }, 17 | resource.TestStep{ 18 | ResourceName: "artifactory_remote_repository.foobar", 19 | ImportState: true, 20 | ImportStateVerify: true, 21 | }, 22 | }, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /artifactory/import_resource_user_test.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/helper/resource" 5 | "testing" 6 | ) 7 | 8 | func IgnoreTestAccUser_import(t *testing.T) { 9 | resource.Test(t, resource.TestCase{ 10 | PreCheck: func() { testAccPreCheck(t) }, 11 | CheckDestroy: testAccCheckUserDestroy("artifactory_user.foobar"), 12 | Providers: testAccProviders, 13 | Steps: []resource.TestStep{ 14 | resource.TestStep{ 15 | Config: testAccUser_full, 16 | }, 17 | resource.TestStep{ 18 | ResourceName: "artifactory_user.foobar", 19 | ImportState: true, 20 | ImportStateVerify: true, 21 | }, 22 | }, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /artifactory/import_resource_virtual_repository_test.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/helper/resource" 5 | "testing" 6 | ) 7 | 8 | func IgnoreTestAccVirtualRepository_import(t *testing.T) { 9 | resource.Test(t, resource.TestCase{ 10 | PreCheck: func() { testAccPreCheck(t) }, 11 | Providers: testAccProviders, 12 | CheckDestroy: testAccCheckRepositoryDestroy("artifactory_virtual_repository.foobar"), 13 | Steps: []resource.TestStep{ 14 | resource.TestStep{ 15 | Config: testAccVirtualRepository_full, 16 | }, 17 | resource.TestStep{ 18 | ResourceName: "artifactory_virtual_repository.foobar", 19 | ImportState: true, 20 | ImportStateVerify: true, 21 | }, 22 | }, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /artifactory/resource_repository.go: -------------------------------------------------------------------------------- 1 | package artifactory 2 | 3 | import "strings" 4 | 5 | var types, 6 | packageTypes, 7 | checksumPolicyTypes, 8 | snapshotVersionBehaviors, 9 | remoteRepoChecksumPolicyTypes, 10 | vcsGitProviders, 11 | vcsType, 12 | pomRepositoryReferencesCleanupPolicy []string 13 | 14 | func init() { 15 | types = []string{"local", "remote", "virtual"} 16 | packageTypes = strings.Split("maven|gradle|ivy|sbt|nuget|gems|npm|bower|debian|composer|pypi|docker|vagrant|gitlfs|conan|generic|rpm", "|") 17 | checksumPolicyTypes = []string{"client-checksums", "server-generated-checksums"} 18 | snapshotVersionBehaviors = []string{"unique", "non-unique", "deployer"} 19 | remoteRepoChecksumPolicyTypes = []string{"", "generate-if-absent", "fail", "ignore-and-generate", "pass-thru"} 20 | vcsType = []string{"", "git"} 21 | vcsGitProviders = []string{"", "github", "bitbucket", "stash", "artifactory", "custom"} 22 | pomRepositoryReferencesCleanupPolicy = []string{"discard_active_reference", "discard_any_reference", "nothing"} 23 | } 24 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/plugin" 5 | "github.com/webdevwilson/terraform-provider-artifactory/artifactory" 6 | ) 7 | 8 | func main() { 9 | opts := plugin.ServeOpts{ 10 | ProviderFunc: artifactory.Provider, 11 | } 12 | plugin.Serve(&opts) 13 | } 14 | -------------------------------------------------------------------------------- /scripts/changelog-links.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to 4 | # be Markdown links to the given github issues. 5 | # 6 | # This is run during releases so that the issue references in all of the 7 | # released items are presented as clickable links, but we can just use the 8 | # easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section 9 | # while merging things between releases. 10 | 11 | set -e 12 | 13 | if [[ ! -f CHANGELOG.md ]]; then 14 | echo "ERROR: CHANGELOG.md not found in pwd." 15 | echo "Please run this from the root of the terraform provider repository" 16 | exit 1 17 | fi 18 | 19 | if [[ `uname` == "Darwin" ]]; then 20 | echo "Using BSD sed" 21 | SED="sed -i.bak -E -e" 22 | else 23 | echo "Using GNU sed" 24 | SED="sed -i.bak -r -e" 25 | fi 26 | 27 | PROVIDER_URL="https:\/\/git.edgecastcdn.net\/artifactory/terraform-provider-artifactory\/issues" 28 | 29 | $SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md 30 | 31 | rm CHANGELOG.md.bak 32 | -------------------------------------------------------------------------------- /scripts/errcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Check gofmt 4 | echo "==> Checking for unchecked errors..." 5 | 6 | if ! which errcheck > /dev/null; then 7 | echo "==> Installing errcheck..." 8 | go get -u github.com/kisielk/errcheck 9 | fi 10 | 11 | err_files=$(errcheck -ignoretests \ 12 | -ignore 'github.com/hashicorp/terraform/helper/schema:Set' \ 13 | -ignore 'bytes:.*' \ 14 | -ignore 'io:Close|Write' \ 15 | $(go list ./...| grep -v /vendor/)) 16 | 17 | if [[ -n ${err_files} ]]; then 18 | echo 'Unchecked errors found in the following places:' 19 | echo "${err_files}" 20 | echo "Please handle returned errors. You can check directly with \`make errcheck\`" 21 | exit 1 22 | fi 23 | 24 | exit 0 25 | -------------------------------------------------------------------------------- /scripts/gofmtcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Check gofmt 4 | echo "==> Checking that code complies with gofmt requirements..." 5 | gofmt_files=$(gofmt -l $(find . -name '*.go' | grep -v vendor)) 6 | if [[ -n ${gofmt_files} ]]; then 7 | echo 'gofmt needs running on the following files:' 8 | echo "${gofmt_files}" 9 | echo "You can use the command: \`make fmt\` to reformat code." 10 | exit 1 11 | fi 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /scripts/gogetcookie.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | touch ~/.gitcookies 4 | chmod 0600 ~/.gitcookies 5 | 6 | git config --global http.cookiefile ~/.gitcookies 7 | 8 | tr , \\t <<\__END__ >>~/.gitcookies 9 | .googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE 10 | __END__ 11 | -------------------------------------------------------------------------------- /vendor/github.com/apparentlymart/go-cidr/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Martin Atkins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/apparentlymart/go-cidr/cidr/wrangling.go: -------------------------------------------------------------------------------- 1 | package cidr 2 | 3 | import ( 4 | "fmt" 5 | "math/big" 6 | "net" 7 | ) 8 | 9 | func ipToInt(ip net.IP) (*big.Int, int) { 10 | val := &big.Int{} 11 | val.SetBytes([]byte(ip)) 12 | if len(ip) == net.IPv4len { 13 | return val, 32 14 | } else if len(ip) == net.IPv6len { 15 | return val, 128 16 | } else { 17 | panic(fmt.Errorf("Unsupported address length %d", len(ip))) 18 | } 19 | } 20 | 21 | func intToIP(ipInt *big.Int, bits int) net.IP { 22 | ipBytes := ipInt.Bytes() 23 | ret := make([]byte, bits/8) 24 | // Pack our IP bytes into the end of the return array, 25 | // since big.Int.Bytes() removes front zero padding. 26 | for i := 1; i <= len(ipBytes); i++ { 27 | ret[len(ret)-i] = ipBytes[len(ipBytes)-i] 28 | } 29 | return net.IP(ret) 30 | } 31 | 32 | func insertNumIntoIP(ip net.IP, num int, prefixLen int) net.IP { 33 | ipInt, totalBits := ipToInt(ip) 34 | bigNum := big.NewInt(int64(num)) 35 | bigNum.Lsh(bigNum, uint(totalBits-prefixLen)) 36 | ipInt.Or(ipInt, bigNum) 37 | return intToIP(ipInt, totalBits) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go: -------------------------------------------------------------------------------- 1 | package awsutil 2 | 3 | import ( 4 | "reflect" 5 | ) 6 | 7 | // DeepEqual returns if the two values are deeply equal like reflect.DeepEqual. 8 | // In addition to this, this method will also dereference the input values if 9 | // possible so the DeepEqual performed will not fail if one parameter is a 10 | // pointer and the other is not. 11 | // 12 | // DeepEqual will not perform indirection of nested values of the input parameters. 13 | func DeepEqual(a, b interface{}) bool { 14 | ra := reflect.Indirect(reflect.ValueOf(a)) 15 | rb := reflect.Indirect(reflect.ValueOf(b)) 16 | 17 | if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid { 18 | // If the elements are both nil, and of the same type the are equal 19 | // If they are of different types they are not equal 20 | return reflect.TypeOf(a) == reflect.TypeOf(b) 21 | } else if raValid != rbValid { 22 | // Both values must be valid to be equal 23 | return false 24 | } 25 | 26 | return reflect.DeepEqual(ra.Interface(), rb.Interface()) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // ClientInfo wraps immutable data from the client.Client structure. 4 | type ClientInfo struct { 5 | ServiceName string 6 | APIVersion string 7 | Endpoint string 8 | SigningName string 9 | SigningRegion string 10 | JSONVersion string 11 | TargetPrefix string 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package aws 4 | 5 | import "time" 6 | 7 | // An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to 8 | // provide a 1.6 and 1.5 safe version of context that is compatible with Go 9 | // 1.7's Context. 10 | // 11 | // An emptyCtx is never canceled, has no values, and has no deadline. It is not 12 | // struct{}, since vars of this type must have distinct addresses. 13 | type emptyCtx int 14 | 15 | func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { 16 | return 17 | } 18 | 19 | func (*emptyCtx) Done() <-chan struct{} { 20 | return nil 21 | } 22 | 23 | func (*emptyCtx) Err() error { 24 | return nil 25 | } 26 | 27 | func (*emptyCtx) Value(key interface{}) interface{} { 28 | return nil 29 | } 30 | 31 | func (e *emptyCtx) String() string { 32 | switch e { 33 | case backgroundCtx: 34 | return "aws.BackgroundContext" 35 | } 36 | return "unknown empty Context" 37 | } 38 | 39 | var ( 40 | backgroundCtx = new(emptyCtx) 41 | ) 42 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package aws 4 | 5 | import "context" 6 | 7 | var ( 8 | backgroundCtx = context.Background() 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go: -------------------------------------------------------------------------------- 1 | package corehandlers 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | // ValidateParametersHandler is a request handler to validate the input parameters. 6 | // Validating parameters only has meaning if done prior to the request being sent. 7 | var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { 8 | if !r.ParamsFilled() { 9 | return 10 | } 11 | 12 | if v, ok := r.Params.(request.Validator); ok { 13 | if err := v.Validate(); err != nil { 14 | r.Error = err 15 | } 16 | } 17 | }} 18 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey 3 | aws_secret_access_key = secret 4 | aws_session_token = token 5 | 6 | [no_token] 7 | aws_access_key_id = accessKey 8 | aws_secret_access_key = secret 9 | 10 | [with_colon] 11 | aws_access_key_id: accessKey 12 | aws_secret_access_key: secret 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go: -------------------------------------------------------------------------------- 1 | package defaults 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go/internal/shareddefaults" 5 | ) 6 | 7 | // SharedCredentialsFilename returns the SDK's default file path 8 | // for the shared credentials file. 9 | // 10 | // Builds the shared config file path based on the OS's platform. 11 | // 12 | // - Linux/Unix: $HOME/.aws/credentials 13 | // - Windows: %USERPROFILE%\.aws\credentials 14 | func SharedCredentialsFilename() string { 15 | return shareddefaults.SharedCredentialsFilename() 16 | } 17 | 18 | // SharedConfigFilename returns the SDK's default file path for 19 | // the shared config file. 20 | // 21 | // Builds the shared config file path based on the OS's platform. 22 | // 23 | // - Linux/Unix: $HOME/.aws/config 24 | // - Windows: %USERPROFILE%\.aws\config 25 | func SharedConfigFilename() string { 26 | return shareddefaults.SharedConfigFilename() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/errors.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import "github.com/aws/aws-sdk-go/aws/awserr" 4 | 5 | var ( 6 | // ErrMissingRegion is an error that is returned if region configuration is 7 | // not found. 8 | // 9 | // @readonly 10 | ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil) 11 | 12 | // ErrMissingEndpoint is an error that is returned if an endpoint cannot be 13 | // resolved for a service. 14 | // 15 | // @readonly 16 | ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // JSONValue is a representation of a grab bag type that will be marshaled 4 | // into a json string. This type can be used just like any other map. 5 | // 6 | // Example: 7 | // 8 | // values := aws.JSONValue{ 9 | // "Foo": "Bar", 10 | // } 11 | // values["Baz"] = "Qux" 12 | type JSONValue map[string]interface{} 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!plan9 2 | 3 | package request 4 | 5 | import ( 6 | "net" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func isErrConnectionReset(err error) bool { 12 | if opErr, ok := err.(*net.OpError); ok { 13 | if sysErr, ok := opErr.Err.(*os.SyscallError); ok { 14 | return sysErr.Err == syscall.ECONNRESET 15 | } 16 | } 17 | 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go: -------------------------------------------------------------------------------- 1 | // +build appengine plan9 2 | 3 | package request 4 | 5 | import ( 6 | "strings" 7 | ) 8 | 9 | func isErrConnectionReset(err error) bool { 10 | return strings.Contains(err.Error(), "connection reset") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | ) 8 | 9 | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { 10 | req := new(http.Request) 11 | *req = *r 12 | req.URL = &url.URL{} 13 | *req.URL = *r.URL 14 | req.Body = body 15 | 16 | req.Header = http.Header{} 17 | for k, v := range r.Header { 18 | for _, vv := range v { 19 | req.Header.Add(k, vv) 20 | } 21 | } 22 | 23 | return req 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package request 4 | 5 | import ( 6 | "net/http" 7 | ) 8 | 9 | // NoBody is a http.NoBody reader instructing Go HTTP client to not include 10 | // and body in the HTTP request. 11 | var NoBody = http.NoBody 12 | 13 | // ResetBody rewinds the request body back to its starting position, and 14 | // set's the HTTP Request body reference. When the body is read prior 15 | // to being sent in the HTTP request it will need to be rewound. 16 | // 17 | // ResetBody will automatically be called by the SDK's build handler, but if 18 | // the request is being used directly ResetBody must be called before the request 19 | // is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically 20 | // call ResetBody. 21 | // 22 | // Will also set the Go 1.8's http.Request.GetBody member to allow retrying 23 | // PUT/POST redirects. 24 | func (r *Request) ResetBody() { 25 | body, err := r.getNextRequestBody() 26 | if err != nil { 27 | r.Error = err 28 | return 29 | } 30 | 31 | r.HTTPRequest.Body = body 32 | r.HTTPRequest.GetBody = r.getNextRequestBody 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package request 4 | 5 | import "github.com/aws/aws-sdk-go/aws" 6 | 7 | // setContext updates the Request to use the passed in context for cancellation. 8 | // Context will also be used for request retry delay. 9 | // 10 | // Creates shallow copy of the http.Request with the WithContext method. 11 | func setRequestContext(r *Request, ctx aws.Context) { 12 | r.context = ctx 13 | r.HTTPRequest = r.HTTPRequest.WithContext(ctx) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package request 4 | 5 | import "github.com/aws/aws-sdk-go/aws" 6 | 7 | // setContext updates the Request to use the passed in context for cancellation. 8 | // Context will also be used for request retry delay. 9 | // 10 | // Creates shallow copy of the http.Request with the WithContext method. 11 | func setRequestContext(r *Request, ctx aws.Context) { 12 | r.context = ctx 13 | r.HTTPRequest.Cancel = ctx.Done() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | // WithUnsignedPayload will enable and set the UnsignedPayload field to 4 | // true of the signer. 5 | func WithUnsignedPayload(v4 *Signer) { 6 | v4.UnsignedPayload = true 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package v4 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | func getURIPath(u *url.URL) string { 11 | var uri string 12 | 13 | if len(u.Opaque) > 0 { 14 | uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") 15 | } else { 16 | uri = u.EscapedPath() 17 | } 18 | 19 | if len(uri) == 0 { 20 | uri = "/" 21 | } 22 | 23 | return uri 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/url.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package aws 4 | 5 | import "net/url" 6 | 7 | // URLHostname will extract the Hostname without port from the URL value. 8 | // 9 | // Wrapper of net/url#URL.Hostname for backwards Go version compatibility. 10 | func URLHostname(url *url.URL) string { 11 | return url.Hostname() 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package aws 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | // URLHostname will extract the Hostname without port from the URL value. 11 | // 12 | // Copy of Go 1.8's net/url#URL.Hostname functionality. 13 | func URLHostname(url *url.URL) string { 14 | return stripPort(url.Host) 15 | 16 | } 17 | 18 | // stripPort is copy of Go 1.8 url#URL.Hostname functionality. 19 | // https://golang.org/src/net/url/url.go 20 | func stripPort(hostport string) string { 21 | colon := strings.IndexByte(hostport, ':') 22 | if colon == -1 { 23 | return hostport 24 | } 25 | if i := strings.IndexByte(hostport, ']'); i != -1 { 26 | return strings.TrimPrefix(hostport[:i], "[") 27 | } 28 | return hostport[:colon] 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.10.51" 9 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/metadata.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | // An Attribute is a FieldValue that resides within the imediant context of 4 | // another field. Such as XML attribute for tags. 5 | type Attribute struct { 6 | Name string 7 | Value ValueMarshaler 8 | Meta Metadata 9 | } 10 | 11 | // Metadata is a collection of configuration flags for encoders to render the 12 | // output. 13 | type Metadata struct { 14 | Attributes []Attribute 15 | 16 | Flatten bool 17 | 18 | ListLocationName string 19 | MapLocationNameKey string 20 | MapLocationNameValue string 21 | 22 | XMLNamespacePrefix string 23 | XMLNamespaceURI string 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/target.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | import "fmt" 4 | 5 | // Target is the encode and decode targets of protocol marshaling. 6 | type Target int 7 | 8 | // The protocol marshaling targets. 9 | const ( 10 | PathTarget Target = iota 11 | QueryTarget 12 | HeaderTarget 13 | HeadersTarget 14 | StatusCodeTarget 15 | BodyTarget 16 | PayloadTarget 17 | ) 18 | 19 | func (e Target) String() string { 20 | switch e { 21 | case PathTarget: 22 | return "Path" 23 | case QueryTarget: 24 | return "Query" 25 | case HeaderTarget: 26 | return "Header" 27 | case HeadersTarget: 28 | return "Headers" 29 | case StatusCodeTarget: 30 | return "StatusCode" 31 | case BodyTarget: 32 | return "Body" 33 | case PayloadTarget: 34 | return "Payload" 35 | default: 36 | panic(fmt.Sprintf("// unknown encoding target, %d", e)) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body 11 | var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} 12 | 13 | // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. 14 | func UnmarshalDiscardBody(r *request.Request) { 15 | if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { 16 | return 17 | } 18 | 19 | io.Copy(ioutil.Discard, r.HTTPResponse.Body) 20 | r.HTTPResponse.Body.Close() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/base64" 6 | "io" 7 | 8 | "github.com/aws/aws-sdk-go/aws/awserr" 9 | "github.com/aws/aws-sdk-go/aws/request" 10 | ) 11 | 12 | // contentMD5 computes and sets the HTTP Content-MD5 header for requests that 13 | // require it. 14 | func contentMD5(r *request.Request) { 15 | h := md5.New() 16 | 17 | // hash the body. seek back to the first position after reading to reset 18 | // the body for transmission. copy errors may be assumed to be from the 19 | // body. 20 | _, err := io.Copy(h, r.Body) 21 | if err != nil { 22 | r.Error = awserr.New("ContentMD5", "failed to read body", err) 23 | return 24 | } 25 | _, err = r.Body.Seek(0, 0) 26 | if err != nil { 27 | r.Error = awserr.New("ContentMD5", "failed to seek body", err) 28 | return 29 | } 30 | 31 | // encode the md5 checksum in base64 and set the request header. 32 | sum := h.Sum(nil) 33 | sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) 34 | base64.StdEncoding.Encode(sum64, sum) 35 | r.HTTPRequest.Header.Set("Content-MD5", string(sum64)) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.6 2 | 3 | package s3 4 | 5 | import "github.com/aws/aws-sdk-go/aws/request" 6 | 7 | func platformRequestHandlers(r *request.Request) { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package s3 4 | 5 | import ( 6 | "github.com/aws/aws-sdk-go/aws" 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | func platformRequestHandlers(r *request.Request) { 11 | if r.Operation.HTTPMethod == "PUT" { 12 | // 100-Continue should only be used on put requests. 13 | r.Handlers.Sign.PushBack(add100Continue) 14 | } 15 | } 16 | 17 | func add100Continue(r *request.Request) { 18 | if aws.BoolValue(r.Config.S3Disable100Continue) { 19 | return 20 | } 21 | if r.HTTPRequest.ContentLength < 1024*1024*2 { 22 | // Ignore requests smaller than 2MB. This helps prevent delaying 23 | // requests unnecessarily. 24 | return 25 | } 26 | 27 | r.HTTPRequest.Header.Set("Expect", "100-Continue") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "net/http" 7 | 8 | "github.com/aws/aws-sdk-go/aws/awserr" 9 | "github.com/aws/aws-sdk-go/aws/request" 10 | ) 11 | 12 | func copyMultipartStatusOKUnmarhsalError(r *request.Request) { 13 | b, err := ioutil.ReadAll(r.HTTPResponse.Body) 14 | if err != nil { 15 | r.Error = awserr.New("SerializationError", "unable to read response body", err) 16 | return 17 | } 18 | body := bytes.NewReader(b) 19 | r.HTTPResponse.Body = ioutil.NopCloser(body) 20 | defer body.Seek(0, 0) 21 | 22 | if body.Len() == 0 { 23 | // If there is no body don't attempt to parse the body. 24 | return 25 | } 26 | 27 | unmarshalError(r) 28 | if err, ok := r.Error.(awserr.Error); ok && err != nil { 29 | if err.Code() == "SerializationError" { 30 | r.Error = nil 31 | return 32 | } 33 | r.HTTPResponse.StatusCode = http.StatusServiceUnavailable 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | func init() { 6 | initRequest = func(r *request.Request) { 7 | switch r.Operation.Name { 8 | case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity: 9 | r.Handlers.Sign.Clear() // these operations are unsigned 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/bgentry/speakeasy/speakeasy_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package speakeasy 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // SetConsoleMode function can be used to change value of ENABLE_ECHO_INPUT: 10 | // http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx 11 | const ENABLE_ECHO_INPUT = 0x0004 12 | 13 | func getPassword() (password string, err error) { 14 | var oldMode uint32 15 | 16 | err = syscall.GetConsoleMode(syscall.Stdin, &oldMode) 17 | if err != nil { 18 | return 19 | } 20 | 21 | var newMode uint32 = (oldMode &^ ENABLE_ECHO_INPUT) 22 | 23 | err = setConsoleMode(syscall.Stdin, newMode) 24 | defer setConsoleMode(syscall.Stdin, oldMode) 25 | if err != nil { 26 | return 27 | } 28 | 29 | return readline() 30 | } 31 | 32 | func setConsoleMode(console syscall.Handle, mode uint32) (err error) { 33 | dll := syscall.MustLoadDLL("kernel32") 34 | proc := dll.MustFindProc("SetConsoleMode") 35 | r, _, err := proc.Call(uintptr(console), uintptr(mode)) 36 | 37 | if r == 0 { 38 | return err 39 | } 40 | return nil 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/json.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | // MarshalJSON implements the encoding/json.Marshaler interface. 8 | func (v Version) MarshalJSON() ([]byte, error) { 9 | return json.Marshal(v.String()) 10 | } 11 | 12 | // UnmarshalJSON implements the encoding/json.Unmarshaler interface. 13 | func (v *Version) UnmarshalJSON(data []byte) (err error) { 14 | var versionString string 15 | 16 | if err = json.Unmarshal(data, &versionString); err != nil { 17 | return 18 | } 19 | 20 | *v, err = Parse(versionString) 21 | 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "blang", 3 | "bugs": { 4 | "URL": "https://github.com/blang/semver/issues", 5 | "url": "https://github.com/blang/semver/issues" 6 | }, 7 | "gx": { 8 | "dvcsimport": "github.com/blang/semver" 9 | }, 10 | "gxVersion": "0.10.0", 11 | "language": "go", 12 | "license": "MIT", 13 | "name": "semver", 14 | "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", 15 | "version": "3.5.1" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sort.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // Versions represents multiple versions. 8 | type Versions []Version 9 | 10 | // Len returns length of version collection 11 | func (s Versions) Len() int { 12 | return len(s) 13 | } 14 | 15 | // Swap swaps two versions inside the collection by its indices 16 | func (s Versions) Swap(i, j int) { 17 | s[i], s[j] = s[j], s[i] 18 | } 19 | 20 | // Less checks if version at index i is less than version at index j 21 | func (s Versions) Less(i, j int) bool { 22 | return s[i].LT(s[j]) 23 | } 24 | 25 | // Sort sorts a slice of versions 26 | func Sort(versions []Version) { 27 | sort.Sort(Versions(versions)) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sql.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "database/sql/driver" 5 | "fmt" 6 | ) 7 | 8 | // Scan implements the database/sql.Scanner interface. 9 | func (v *Version) Scan(src interface{}) (err error) { 10 | var str string 11 | switch src := src.(type) { 12 | case string: 13 | str = src 14 | case []byte: 15 | str = string(src) 16 | default: 17 | return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) 18 | } 19 | 20 | if t, err := Parse(str); err == nil { 21 | *v = t 22 | } 23 | 24 | return 25 | } 26 | 27 | // Value implements the database/sql/driver.Valuer interface. 28 | func (v Version) Value() (driver.Value, error) { 29 | return v.String(), nil 30 | } 31 | -------------------------------------------------------------------------------- /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/go-ini/ini/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build test bench vet 2 | 3 | build: vet bench 4 | 5 | test: 6 | go test -v -cover -race 7 | 8 | bench: 9 | go test -v -cover -race -test.bench=. -test.benchmem 10 | 11 | vet: 12 | go vet 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ini/ini/error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Unknwon 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // 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, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package ini 16 | 17 | import ( 18 | "fmt" 19 | ) 20 | 21 | type ErrDelimiterNotFound struct { 22 | Line string 23 | } 24 | 25 | func IsErrDelimiterNotFound(err error) bool { 26 | _, ok := err.(ErrDelimiterNotFound) 27 | return ok 28 | } 29 | 30 | func (err ErrDelimiterNotFound) Error() string { 31 | return fmt.Sprintf("key-value delimiter not found: %s", err.Line) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2017 3 | clone_folder: c:\gopath\github.com\hashicorp\go-getter 4 | environment: 5 | GOPATH: c:\gopath 6 | install: 7 | - cmd: >- 8 | echo %Path% 9 | 10 | go version 11 | 12 | go env 13 | 14 | go get -d -v -t ./... 15 | build_script: 16 | - cmd: go test -v ./... 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/client_mode.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | // ClientMode is the mode that the client operates in. 4 | type ClientMode uint 5 | 6 | const ( 7 | ClientModeInvalid ClientMode = iota 8 | 9 | // ClientModeAny downloads anything it can. In this mode, dst must 10 | // be a directory. If src is a file, it is saved into the directory 11 | // with the basename of the URL. If src is a directory or archive, 12 | // it is unpacked directly into dst. 13 | ClientModeAny 14 | 15 | // ClientModeFile downloads a single file. In this mode, dst must 16 | // be a file path (doesn't have to exist). src must point to a single 17 | // file. It is saved as dst. 18 | ClientModeFile 19 | 20 | // ClientModeDir downloads a directory. In this mode, dst must be 21 | // a directory path (doesn't have to exist). src must point to an 22 | // archive or directory (such as in s3). 23 | ClientModeDir 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_bzip2.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "compress/bzip2" 5 | "fmt" 6 | "io" 7 | "os" 8 | "path/filepath" 9 | ) 10 | 11 | // Bzip2Decompressor is an implementation of Decompressor that can 12 | // decompress bz2 files. 13 | type Bzip2Decompressor struct{} 14 | 15 | func (d *Bzip2Decompressor) Decompress(dst, src string, dir bool) error { 16 | // Directory isn't supported at all 17 | if dir { 18 | return fmt.Errorf("bzip2-compressed files can only unarchive to a single file") 19 | } 20 | 21 | // If we're going into a directory we should make that first 22 | if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil { 23 | return err 24 | } 25 | 26 | // File first 27 | f, err := os.Open(src) 28 | if err != nil { 29 | return err 30 | } 31 | defer f.Close() 32 | 33 | // Bzip2 compression is second 34 | bzipR := bzip2.NewReader(f) 35 | 36 | // Copy it out 37 | dstF, err := os.Create(dst) 38 | if err != nil { 39 | return err 40 | } 41 | defer dstF.Close() 42 | 43 | _, err = io.Copy(dstF, bzipR) 44 | return err 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_gzip.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "compress/gzip" 5 | "fmt" 6 | "io" 7 | "os" 8 | "path/filepath" 9 | ) 10 | 11 | // GzipDecompressor is an implementation of Decompressor that can 12 | // decompress gzip files. 13 | type GzipDecompressor struct{} 14 | 15 | func (d *GzipDecompressor) Decompress(dst, src string, dir bool) error { 16 | // Directory isn't supported at all 17 | if dir { 18 | return fmt.Errorf("gzip-compressed files can only unarchive to a single file") 19 | } 20 | 21 | // If we're going into a directory we should make that first 22 | if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil { 23 | return err 24 | } 25 | 26 | // File first 27 | f, err := os.Open(src) 28 | if err != nil { 29 | return err 30 | } 31 | defer f.Close() 32 | 33 | // gzip compression is second 34 | gzipR, err := gzip.NewReader(f) 35 | if err != nil { 36 | return err 37 | } 38 | defer gzipR.Close() 39 | 40 | // Copy it out 41 | dstF, err := os.Create(dst) 42 | if err != nil { 43 | return err 44 | } 45 | defer dstF.Close() 46 | 47 | _, err = io.Copy(dstF, gzipR) 48 | return err 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_tbz2.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "compress/bzip2" 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | // TarBzip2Decompressor is an implementation of Decompressor that can 10 | // decompress tar.bz2 files. 11 | type TarBzip2Decompressor struct{} 12 | 13 | func (d *TarBzip2Decompressor) Decompress(dst, src string, dir bool) error { 14 | // If we're going into a directory we should make that first 15 | mkdir := dst 16 | if !dir { 17 | mkdir = filepath.Dir(dst) 18 | } 19 | if err := os.MkdirAll(mkdir, 0755); err != nil { 20 | return err 21 | } 22 | 23 | // File first 24 | f, err := os.Open(src) 25 | if err != nil { 26 | return err 27 | } 28 | defer f.Close() 29 | 30 | // Bzip2 compression is second 31 | bzipR := bzip2.NewReader(f) 32 | return untar(bzipR, dst, src, dir) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_tgz.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "compress/gzip" 5 | "fmt" 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | // TarGzipDecompressor is an implementation of Decompressor that can 11 | // decompress tar.gzip files. 12 | type TarGzipDecompressor struct{} 13 | 14 | func (d *TarGzipDecompressor) Decompress(dst, src string, dir bool) error { 15 | // If we're going into a directory we should make that first 16 | mkdir := dst 17 | if !dir { 18 | mkdir = filepath.Dir(dst) 19 | } 20 | if err := os.MkdirAll(mkdir, 0755); err != nil { 21 | return err 22 | } 23 | 24 | // File first 25 | f, err := os.Open(src) 26 | if err != nil { 27 | return err 28 | } 29 | defer f.Close() 30 | 31 | // Gzip compression is second 32 | gzipR, err := gzip.NewReader(f) 33 | if err != nil { 34 | return fmt.Errorf("Error opening a gzip reader for %s: %s", src, err) 35 | } 36 | defer gzipR.Close() 37 | 38 | return untar(gzipR, dst, src, dir) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_txz.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | 8 | "github.com/ulikunitz/xz" 9 | ) 10 | 11 | // TarXzDecompressor is an implementation of Decompressor that can 12 | // decompress tar.xz files. 13 | type TarXzDecompressor struct{} 14 | 15 | func (d *TarXzDecompressor) Decompress(dst, src string, dir bool) error { 16 | // If we're going into a directory we should make that first 17 | mkdir := dst 18 | if !dir { 19 | mkdir = filepath.Dir(dst) 20 | } 21 | if err := os.MkdirAll(mkdir, 0755); err != nil { 22 | return err 23 | } 24 | 25 | // File first 26 | f, err := os.Open(src) 27 | if err != nil { 28 | return err 29 | } 30 | defer f.Close() 31 | 32 | // xz compression is second 33 | txzR, err := xz.NewReader(f) 34 | if err != nil { 35 | return fmt.Errorf("Error opening an xz reader for %s: %s", src, err) 36 | } 37 | 38 | return untar(txzR, dst, src, dir) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/decompress_xz.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "path/filepath" 8 | 9 | "github.com/ulikunitz/xz" 10 | ) 11 | 12 | // XzDecompressor is an implementation of Decompressor that can 13 | // decompress xz files. 14 | type XzDecompressor struct{} 15 | 16 | func (d *XzDecompressor) Decompress(dst, src string, dir bool) error { 17 | // Directory isn't supported at all 18 | if dir { 19 | return fmt.Errorf("xz-compressed files can only unarchive to a single file") 20 | } 21 | 22 | // If we're going into a directory we should make that first 23 | if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil { 24 | return err 25 | } 26 | 27 | // File first 28 | f, err := os.Open(src) 29 | if err != nil { 30 | return err 31 | } 32 | defer f.Close() 33 | 34 | // xz compression is second 35 | xzR, err := xz.NewReader(f) 36 | if err != nil { 37 | return err 38 | } 39 | 40 | // Copy it out 41 | dstF, err := os.Create(dst) 42 | if err != nil { 43 | return err 44 | } 45 | defer dstF.Close() 46 | 47 | _, err = io.Copy(dstF, xzR) 48 | return err 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/get_file.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | import ( 4 | "net/url" 5 | "os" 6 | ) 7 | 8 | // FileGetter is a Getter implementation that will download a module from 9 | // a file scheme. 10 | type FileGetter struct { 11 | // Copy, if set to true, will copy data instead of using a symlink 12 | Copy bool 13 | } 14 | 15 | func (g *FileGetter) ClientMode(u *url.URL) (ClientMode, error) { 16 | path := u.Path 17 | if u.RawPath != "" { 18 | path = u.RawPath 19 | } 20 | 21 | fi, err := os.Stat(path) 22 | if err != nil { 23 | return 0, err 24 | } 25 | 26 | // Check if the source is a directory. 27 | if fi.IsDir() { 28 | return ClientModeDir, nil 29 | } 30 | 31 | return ClientModeFile, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/helper/url/url.go: -------------------------------------------------------------------------------- 1 | package url 2 | 3 | import ( 4 | "net/url" 5 | ) 6 | 7 | // Parse parses rawURL into a URL structure. 8 | // The rawURL may be relative or absolute. 9 | // 10 | // Parse is a wrapper for the Go stdlib net/url Parse function, but returns 11 | // Windows "safe" URLs on Windows platforms. 12 | func Parse(rawURL string) (*url.URL, error) { 13 | return parse(rawURL) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/helper/url/url_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package url 4 | 5 | import ( 6 | "net/url" 7 | ) 8 | 9 | func parse(rawURL string) (*url.URL, error) { 10 | return url.Parse(rawURL) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-getter/storage.go: -------------------------------------------------------------------------------- 1 | package getter 2 | 3 | // Storage is an interface that knows how to lookup downloaded directories 4 | // as well as download and update directories from their sources into the 5 | // proper location. 6 | type Storage interface { 7 | // Dir returns the directory on local disk where the directory source 8 | // can be loaded from. 9 | Dir(string) (string, bool, error) 10 | 11 | // Get will download and optionally update the given directory. 12 | Get(string, string, bool) error 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-hclog/global.go: -------------------------------------------------------------------------------- 1 | package hclog 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | protect sync.Once 9 | def Logger 10 | 11 | // The options used to create the Default logger. These are 12 | // read only when the Default logger is created, so set them 13 | // as soon as the process starts. 14 | DefaultOptions = &LoggerOptions{ 15 | Level: DefaultLevel, 16 | Output: DefaultOutput, 17 | } 18 | ) 19 | 20 | // Return a logger that is held globally. This can be a good starting 21 | // place, and then you can use .With() and .Name() to create sub-loggers 22 | // to be used in more specific contexts. 23 | func Default() Logger { 24 | protect.Do(func() { 25 | def = New(DefaultOptions) 26 | }) 27 | 28 | return def 29 | } 30 | 31 | // A short alias for Default() 32 | func L() Logger { 33 | return Default() 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | # test runs the test suite and vets the code. 6 | test: generate 7 | @echo "==> Running tests..." 8 | @go list $(TEST) \ 9 | | grep -v "/vendor/" \ 10 | | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} 11 | 12 | # testrace runs the race checker 13 | testrace: generate 14 | @echo "==> Running tests (race)..." 15 | @go list $(TEST) \ 16 | | grep -v "/vendor/" \ 17 | | xargs -n1 go test -timeout=60s -race ${TESTARGS} 18 | 19 | # updatedeps installs all the dependencies needed to run and build. 20 | updatedeps: 21 | @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" 22 | 23 | # generate runs `go generate` to build the dynamically generated source files. 24 | generate: 25 | @echo "==> Generating..." 26 | @find . -type f -name '.DS_Store' -delete 27 | @go list ./... \ 28 | | grep -v "/vendor/" \ 29 | | xargs -n1 go generate 30 | 31 | .PHONY: default test testrace updatedeps generate 32 | -------------------------------------------------------------------------------- /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\n* %s", 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\n%s", 26 | len(es), strings.Join(points, "\n")) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/prefix.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/errwrap" 7 | ) 8 | 9 | // Prefix is a helper function that will prefix some text 10 | // to the given error. If the error is a multierror.Error, then 11 | // it will be prefixed to each wrapped error. 12 | // 13 | // This is useful to use when appending multiple multierrors 14 | // together in order to give better scoping. 15 | func Prefix(err error, prefix string) error { 16 | if err == nil { 17 | return nil 18 | } 19 | 20 | format := fmt.Sprintf("%s {{err}}", prefix) 21 | switch err := err.(type) { 22 | case *Error: 23 | // Typed nils can reach here, so initialize if we are nil 24 | if err == nil { 25 | err = new(Error) 26 | } 27 | 28 | // Wrap each of the errors 29 | for i, e := range err.Errors { 30 | err.Errors[i] = errwrap.Wrapf(format, e) 31 | } 32 | 33 | return err 34 | default: 35 | return errwrap.Wrapf(format, err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /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/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 | 23 | var ec uint32 24 | if e := syscall.GetExitCodeProcess(h, &ec); e != nil { 25 | return false 26 | } 27 | 28 | return ec == exit_STILL_ACTIVE 29 | } 30 | -------------------------------------------------------------------------------- /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/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 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/hcl/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | fmt: generate 6 | go fmt ./... 7 | 8 | test: generate 9 | go get -t ./... 10 | go test $(TEST) $(TESTARGS) 11 | 12 | generate: 13 | go generate ./... 14 | 15 | updatedeps: 16 | go get -u golang.org/x/tools/cmd/stringer 17 | 18 | .PHONY: default generate test updatedeps 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf false 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -t ./... 17 | 18 | build_script: 19 | - cmd: go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/token" 7 | ) 8 | 9 | // PosError is a parse error that contains a position. 10 | type PosError struct { 11 | Pos token.Pos 12 | Err error 13 | } 14 | 15 | func (e *PosError) Error() string { 16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/lex.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "unicode" 5 | "unicode/utf8" 6 | ) 7 | 8 | type lexModeValue byte 9 | 10 | const ( 11 | lexModeUnknown lexModeValue = iota 12 | lexModeHcl 13 | lexModeJson 14 | ) 15 | 16 | // lexMode returns whether we're going to be parsing in JSON 17 | // mode or HCL mode. 18 | func lexMode(v []byte) lexModeValue { 19 | var ( 20 | r rune 21 | w int 22 | offset int 23 | ) 24 | 25 | for { 26 | r, w = utf8.DecodeRune(v[offset:]) 27 | offset += w 28 | if unicode.IsSpace(r) { 29 | continue 30 | } 31 | if r == '{' { 32 | return lexModeJson 33 | } 34 | break 35 | } 36 | 37 | return lexModeHcl 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/parse.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/ast" 7 | hclParser "github.com/hashicorp/hcl/hcl/parser" 8 | jsonParser "github.com/hashicorp/hcl/json/parser" 9 | ) 10 | 11 | // ParseBytes accepts as input byte slice and returns ast tree. 12 | // 13 | // Input can be either JSON or HCL 14 | func ParseBytes(in []byte) (*ast.File, error) { 15 | return parse(in) 16 | } 17 | 18 | // ParseString accepts input as a string and returns ast tree. 19 | func ParseString(input string) (*ast.File, error) { 20 | return parse([]byte(input)) 21 | } 22 | 23 | func parse(in []byte) (*ast.File, error) { 24 | switch lexMode(in) { 25 | case lexModeHcl: 26 | return hclParser.Parse(in) 27 | case lexModeJson: 28 | return jsonParser.Parse(in) 29 | } 30 | 31 | return nil, fmt.Errorf("unknown config format") 32 | } 33 | 34 | // Parse parses the given input and returns the root object. 35 | // 36 | // The input format can be either HCL or JSON. 37 | func Parse(input string) (*ast.File, error) { 38 | return parse([]byte(input)) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hil 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf true 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -d -v -t ./... 17 | build_script: 18 | - cmd: go test -v ./... 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/arithmetic.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | ) 7 | 8 | // Arithmetic represents a node where the result is arithmetic of 9 | // two or more operands in the order given. 10 | type Arithmetic struct { 11 | Op ArithmeticOp 12 | Exprs []Node 13 | Posx Pos 14 | } 15 | 16 | func (n *Arithmetic) Accept(v Visitor) Node { 17 | for i, expr := range n.Exprs { 18 | n.Exprs[i] = expr.Accept(v) 19 | } 20 | 21 | return v(n) 22 | } 23 | 24 | func (n *Arithmetic) Pos() Pos { 25 | return n.Posx 26 | } 27 | 28 | func (n *Arithmetic) GoString() string { 29 | return fmt.Sprintf("*%#v", *n) 30 | } 31 | 32 | func (n *Arithmetic) String() string { 33 | var b bytes.Buffer 34 | for _, expr := range n.Exprs { 35 | b.WriteString(fmt.Sprintf("%s", expr)) 36 | } 37 | 38 | return b.String() 39 | } 40 | 41 | func (n *Arithmetic) Type(Scope) (Type, error) { 42 | return TypeInt, nil 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/arithmetic_op.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | // ArithmeticOp is the operation to use for the math. 4 | type ArithmeticOp int 5 | 6 | const ( 7 | ArithmeticOpInvalid ArithmeticOp = 0 8 | 9 | ArithmeticOpAdd ArithmeticOp = iota 10 | ArithmeticOpSub 11 | ArithmeticOpMul 12 | ArithmeticOpDiv 13 | ArithmeticOpMod 14 | 15 | ArithmeticOpLogicalAnd 16 | ArithmeticOpLogicalOr 17 | 18 | ArithmeticOpEqual 19 | ArithmeticOpNotEqual 20 | ArithmeticOpLessThan 21 | ArithmeticOpLessThanOrEqual 22 | ArithmeticOpGreaterThan 23 | ArithmeticOpGreaterThanOrEqual 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/call.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // Call represents a function call. 9 | type Call struct { 10 | Func string 11 | Args []Node 12 | Posx Pos 13 | } 14 | 15 | func (n *Call) Accept(v Visitor) Node { 16 | for i, a := range n.Args { 17 | n.Args[i] = a.Accept(v) 18 | } 19 | 20 | return v(n) 21 | } 22 | 23 | func (n *Call) Pos() Pos { 24 | return n.Posx 25 | } 26 | 27 | func (n *Call) String() string { 28 | args := make([]string, len(n.Args)) 29 | for i, arg := range n.Args { 30 | args[i] = fmt.Sprintf("%s", arg) 31 | } 32 | 33 | return fmt.Sprintf("Call(%s, %s)", n.Func, strings.Join(args, ", ")) 34 | } 35 | 36 | func (n *Call) Type(s Scope) (Type, error) { 37 | f, ok := s.LookupFunc(n.Func) 38 | if !ok { 39 | return TypeInvalid, fmt.Errorf("unknown function: %s", n.Func) 40 | } 41 | 42 | return f.ReturnType, nil 43 | } 44 | 45 | func (n *Call) GoString() string { 46 | return fmt.Sprintf("*%#v", *n) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/conditional.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type Conditional struct { 8 | CondExpr Node 9 | TrueExpr Node 10 | FalseExpr Node 11 | Posx Pos 12 | } 13 | 14 | // Accept passes the given visitor to the child nodes in this order: 15 | // CondExpr, TrueExpr, FalseExpr. It then finally passes itself to the visitor. 16 | func (n *Conditional) Accept(v Visitor) Node { 17 | n.CondExpr = n.CondExpr.Accept(v) 18 | n.TrueExpr = n.TrueExpr.Accept(v) 19 | n.FalseExpr = n.FalseExpr.Accept(v) 20 | 21 | return v(n) 22 | } 23 | 24 | func (n *Conditional) Pos() Pos { 25 | return n.Posx 26 | } 27 | 28 | func (n *Conditional) Type(Scope) (Type, error) { 29 | // This is not actually a useful value; the type checker ignores 30 | // this function when analyzing conditionals, just as with Arithmetic. 31 | return TypeInt, nil 32 | } 33 | 34 | func (n *Conditional) GoString() string { 35 | return fmt.Sprintf("*%#v", *n) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/stack.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | // Stack is a stack of Node. 4 | type Stack struct { 5 | stack []Node 6 | } 7 | 8 | func (s *Stack) Len() int { 9 | return len(s.stack) 10 | } 11 | 12 | func (s *Stack) Push(n Node) { 13 | s.stack = append(s.stack, n) 14 | } 15 | 16 | func (s *Stack) Pop() Node { 17 | x := s.stack[len(s.stack)-1] 18 | s.stack[len(s.stack)-1] = nil 19 | s.stack = s.stack[:len(s.stack)-1] 20 | return x 21 | } 22 | 23 | func (s *Stack) Reset() { 24 | s.stack = nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/unknown.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | // IsUnknown reports whether a variable is unknown or contains any value 4 | // that is unknown. This will recurse into lists and maps and so on. 5 | func IsUnknown(v Variable) bool { 6 | // If it is unknown itself, return true 7 | if v.Type == TypeUnknown { 8 | return true 9 | } 10 | 11 | // If it is a container type, check the values 12 | switch v.Type { 13 | case TypeList: 14 | for _, el := range v.Value.([]Variable) { 15 | if IsUnknown(el) { 16 | return true 17 | } 18 | } 19 | case TypeMap: 20 | for _, el := range v.Value.(map[string]Variable) { 21 | if IsUnknown(el) { 22 | return true 23 | } 24 | } 25 | default: 26 | } 27 | 28 | // Not a container type or survive the above checks 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/ast/variable_access.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // VariableAccess represents a variable access. 8 | type VariableAccess struct { 9 | Name string 10 | Posx Pos 11 | } 12 | 13 | func (n *VariableAccess) Accept(v Visitor) Node { 14 | return v(n) 15 | } 16 | 17 | func (n *VariableAccess) Pos() Pos { 18 | return n.Posx 19 | } 20 | 21 | func (n *VariableAccess) GoString() string { 22 | return fmt.Sprintf("*%#v", *n) 23 | } 24 | 25 | func (n *VariableAccess) String() string { 26 | return fmt.Sprintf("Variable(%s)", n.Name) 27 | } 28 | 29 | func (n *VariableAccess) Type(s Scope) (Type, error) { 30 | v, ok := s.LookupVar(n.Name) 31 | if !ok { 32 | return TypeInvalid, fmt.Errorf("unknown variable: %s", n.Name) 33 | } 34 | 35 | return v.Type, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/eval_type.go: -------------------------------------------------------------------------------- 1 | package hil 2 | 3 | //go:generate stringer -type=EvalType eval_type.go 4 | 5 | // EvalType represents the type of the output returned from a HIL 6 | // evaluation. 7 | type EvalType uint32 8 | 9 | const ( 10 | TypeInvalid EvalType = 0 11 | TypeString EvalType = 1 << iota 12 | TypeBool 13 | TypeList 14 | TypeMap 15 | TypeUnknown 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/evaltype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=EvalType eval_type.go"; DO NOT EDIT 2 | 3 | package hil 4 | 5 | import "fmt" 6 | 7 | const ( 8 | _EvalType_name_0 = "TypeInvalid" 9 | _EvalType_name_1 = "TypeString" 10 | _EvalType_name_2 = "TypeBool" 11 | _EvalType_name_3 = "TypeList" 12 | _EvalType_name_4 = "TypeMap" 13 | _EvalType_name_5 = "TypeUnknown" 14 | ) 15 | 16 | var ( 17 | _EvalType_index_0 = [...]uint8{0, 11} 18 | _EvalType_index_1 = [...]uint8{0, 10} 19 | _EvalType_index_2 = [...]uint8{0, 8} 20 | _EvalType_index_3 = [...]uint8{0, 8} 21 | _EvalType_index_4 = [...]uint8{0, 7} 22 | _EvalType_index_5 = [...]uint8{0, 11} 23 | ) 24 | 25 | func (i EvalType) String() string { 26 | switch { 27 | case i == 0: 28 | return _EvalType_name_0 29 | case i == 2: 30 | return _EvalType_name_1 31 | case i == 4: 32 | return _EvalType_name_2 33 | case i == 8: 34 | return _EvalType_name_3 35 | case i == 16: 36 | return _EvalType_name_4 37 | case i == 32: 38 | return _EvalType_name_5 39 | default: 40 | return fmt.Sprintf("EvalType(%d)", i) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hil/ast" 7 | "github.com/hashicorp/hil/scanner" 8 | ) 9 | 10 | type ParseError struct { 11 | Message string 12 | Pos ast.Pos 13 | } 14 | 15 | func Errorf(pos ast.Pos, format string, args ...interface{}) error { 16 | return &ParseError{ 17 | Message: fmt.Sprintf(format, args...), 18 | Pos: pos, 19 | } 20 | } 21 | 22 | // TokenErrorf is a convenient wrapper around Errorf that uses the 23 | // position of the given token. 24 | func TokenErrorf(token *scanner.Token, format string, args ...interface{}) error { 25 | return Errorf(token.Pos, format, args...) 26 | } 27 | 28 | func ExpectationError(wanted string, got *scanner.Token) error { 29 | return TokenErrorf(got, "expected %s but found %s", wanted, got) 30 | } 31 | 32 | func (e *ParseError) Error() string { 33 | return fmt.Sprintf("parse error at %s: %s", e.Pos, e.Message) 34 | } 35 | 36 | func (e *ParseError) String() string { 37 | return e.Error() 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/parser/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package parser 4 | 5 | import ( 6 | "github.com/hashicorp/hil/ast" 7 | "github.com/hashicorp/hil/scanner" 8 | ) 9 | 10 | // This is a fuzz testing function designed to be used with go-fuzz: 11 | // https://github.com/dvyukov/go-fuzz 12 | // 13 | // It's not included in a normal build due to the gofuzz build tag above. 14 | // 15 | // There are some input files that you can use as a seed corpus for go-fuzz 16 | // in the directory ./fuzz-corpus . 17 | 18 | func Fuzz(data []byte) int { 19 | str := string(data) 20 | 21 | ch := scanner.Scan(str, ast.Pos{Line: 1, Column: 1}) 22 | _, err := Parse(ch) 23 | if err != nil { 24 | return 0 25 | } 26 | 27 | return 1 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hil/transform_fixed.go: -------------------------------------------------------------------------------- 1 | package hil 2 | 3 | import ( 4 | "github.com/hashicorp/hil/ast" 5 | ) 6 | 7 | // FixedValueTransform transforms an AST to return a fixed value for 8 | // all interpolations. i.e. you can make "hi ${anything}" always 9 | // turn into "hi foo". 10 | // 11 | // The primary use case for this is for config validations where you can 12 | // verify that interpolations result in a certain type of string. 13 | func FixedValueTransform(root ast.Node, Value *ast.LiteralNode) ast.Node { 14 | // We visit the nodes in top-down order 15 | result := root 16 | switch n := result.(type) { 17 | case *ast.Output: 18 | for i, v := range n.Exprs { 19 | n.Exprs[i] = FixedValueTransform(v, Value) 20 | } 21 | case *ast.LiteralNode: 22 | // We keep it as-is 23 | default: 24 | // Anything else we replace 25 | result = Value 26 | } 27 | 28 | return result 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/lang.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "github.com/hashicorp/hil/ast" 5 | ) 6 | 7 | type noopNode struct{} 8 | 9 | func (n *noopNode) Accept(ast.Visitor) ast.Node { return n } 10 | func (n *noopNode) Pos() ast.Pos { return ast.Pos{} } 11 | func (n *noopNode) Type(ast.Scope) (ast.Type, error) { return ast.TypeString, nil } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/module/inode.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin openbsd netbsd solaris 2 | 3 | package module 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | // lookup the inode of a file on posix systems 12 | func inode(path string) (uint64, error) { 13 | stat, err := os.Stat(path) 14 | if err != nil { 15 | return 0, err 16 | } 17 | if st, ok := stat.Sys().(*syscall.Stat_t); ok { 18 | return st.Ino, nil 19 | } 20 | return 0, fmt.Errorf("could not determine file inode") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/module/inode_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd 2 | 3 | package module 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | // lookup the inode of a file on posix systems 12 | func inode(path string) (uint64, error) { 13 | stat, err := os.Stat(path) 14 | if err != nil { 15 | return 0, err 16 | } 17 | if st, ok := stat.Sys().(*syscall.Stat_t); ok { 18 | return uint64(st.Ino), nil 19 | } 20 | return 0, fmt.Errorf("could not determine file inode") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/module/inode_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package module 4 | 5 | // no syscall.Stat_t on windows, return 0 for inodes 6 | func inode(path string) (uint64, error) { 7 | return 0, nil 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/module/module.go: -------------------------------------------------------------------------------- 1 | package module 2 | 3 | // Module represents the metadata for a single module. 4 | type Module struct { 5 | Name string 6 | Source string 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/module/testing.go: -------------------------------------------------------------------------------- 1 | package module 2 | 3 | import ( 4 | "io/ioutil" 5 | "os" 6 | "testing" 7 | 8 | "github.com/hashicorp/go-getter" 9 | ) 10 | 11 | // TestTree loads a module at the given path and returns the tree as well 12 | // as a function that should be deferred to clean up resources. 13 | func TestTree(t *testing.T, path string) (*Tree, func()) { 14 | // Create a temporary directory for module storage 15 | dir, err := ioutil.TempDir("", "tf") 16 | if err != nil { 17 | t.Fatalf("err: %s", err) 18 | return nil, nil 19 | } 20 | 21 | // Load the module 22 | mod, err := NewTreeModule("", path) 23 | if err != nil { 24 | t.Fatalf("err: %s", err) 25 | return nil, nil 26 | } 27 | 28 | // Get the child modules 29 | s := &getter.FolderStorage{StorageDir: dir} 30 | if err := mod.Load(s, GetModeGet); err != nil { 31 | t.Fatalf("err: %s", err) 32 | return nil, nil 33 | } 34 | 35 | return mod, func() { 36 | os.RemoveAll(dir) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/resource_mode.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | //go:generate stringer -type=ResourceMode -output=resource_mode_string.go resource_mode.go 4 | type ResourceMode int 5 | 6 | const ( 7 | ManagedResourceMode ResourceMode = iota 8 | DataResourceMode 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/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 config 4 | 5 | import "fmt" 6 | 7 | const _ResourceMode_name = "ManagedResourceModeDataResourceMode" 8 | 9 | var _ResourceMode_index = [...]uint8{0, 19, 35} 10 | 11 | func (i ResourceMode) String() string { 12 | if i < 0 || i >= ResourceMode(len(_ResourceMode_index)-1) { 13 | return fmt.Sprintf("ResourceMode(%d)", i) 14 | } 15 | return _ResourceMode_name[_ResourceMode_index[i]:_ResourceMode_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/config/testing.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | // TestRawConfig is used to create a RawConfig for testing. 8 | func TestRawConfig(t *testing.T, c map[string]interface{}) *RawConfig { 9 | t.Helper() 10 | 11 | cfg, err := NewRawConfig(c) 12 | if err != nil { 13 | t.Fatalf("err: %s", err) 14 | } 15 | 16 | return cfg 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/dag/edge.go: -------------------------------------------------------------------------------- 1 | package dag 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Edge represents an edge in the graph, with a source and target vertex. 8 | type Edge interface { 9 | Source() Vertex 10 | Target() Vertex 11 | 12 | Hashable 13 | } 14 | 15 | // BasicEdge returns an Edge implementation that simply tracks the source 16 | // and target given as-is. 17 | func BasicEdge(source, target Vertex) Edge { 18 | return &basicEdge{S: source, T: target} 19 | } 20 | 21 | // basicEdge is a basic implementation of Edge that has the source and 22 | // target vertex. 23 | type basicEdge struct { 24 | S, T Vertex 25 | } 26 | 27 | func (e *basicEdge) Hashcode() interface{} { 28 | return fmt.Sprintf("%p-%p", e.S, e.T) 29 | } 30 | 31 | func (e *basicEdge) Source() Vertex { 32 | return e.S 33 | } 34 | 35 | func (e *basicEdge) Target() Vertex { 36 | return e.T 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/config/decode.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "github.com/mitchellh/mapstructure" 5 | ) 6 | 7 | func Decode(target interface{}, raws ...interface{}) (*mapstructure.Metadata, error) { 8 | var md mapstructure.Metadata 9 | decoderConfig := &mapstructure.DecoderConfig{ 10 | Metadata: &md, 11 | Result: target, 12 | WeaklyTypedInput: true, 13 | } 14 | 15 | decoder, err := mapstructure.NewDecoder(decoderConfig) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | for _, raw := range raws { 21 | err := decoder.Decode(raw) 22 | if err != nil { 23 | return nil, err 24 | } 25 | } 26 | 27 | return &md, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/experiment/id.go: -------------------------------------------------------------------------------- 1 | package experiment 2 | 3 | // ID represents an experimental feature. 4 | // 5 | // The global vars defined on this package should be used as ID values. 6 | // This interface is purposely not implement-able outside of this package 7 | // so that we can rely on the Go compiler to enforce all experiment references. 8 | type ID interface { 9 | Env() string 10 | Flag() string 11 | Default() bool 12 | 13 | unexported() // So the ID can't be implemented externally. 14 | } 15 | 16 | // basicID implements ID. 17 | type basicID struct { 18 | EnvValue string 19 | FlagValue string 20 | DefaultValue bool 21 | } 22 | 23 | func newBasicID(flag, env string, def bool) ID { 24 | return &basicID{ 25 | EnvValue: env, 26 | FlagValue: flag, 27 | DefaultValue: def, 28 | } 29 | } 30 | 31 | func (id *basicID) Env() string { return id.EnvValue } 32 | func (id *basicID) Flag() string { return id.FlagValue } 33 | func (id *basicID) Default() bool { return id.DefaultValue } 34 | func (id *basicID) unexported() {} 35 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/hashcode/hashcode.go: -------------------------------------------------------------------------------- 1 | package hashcode 2 | 3 | import ( 4 | "hash/crc32" 5 | ) 6 | 7 | // String hashes a string to a unique hashcode. 8 | // 9 | // crc32 returns a uint32, but for our use we need 10 | // and non negative integer. Here we cast to an integer 11 | // and invert it if the result is negative. 12 | func String(s string) int { 13 | v := int(crc32.ChecksumIEEE([]byte(s))) 14 | if v >= 0 { 15 | return v 16 | } 17 | if -v >= 0 { 18 | return -v 19 | } 20 | // v == MinInt 21 | return 0 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/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/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/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/helper/schema/getsource_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=getSource resource_data_get_source.go"; DO NOT EDIT. 2 | 3 | package schema 4 | 5 | import "fmt" 6 | 7 | const ( 8 | _getSource_name_0 = "getSourceStategetSourceConfig" 9 | _getSource_name_1 = "getSourceDiff" 10 | _getSource_name_2 = "getSourceSet" 11 | _getSource_name_3 = "getSourceLevelMaskgetSourceExact" 12 | ) 13 | 14 | var ( 15 | _getSource_index_0 = [...]uint8{0, 14, 29} 16 | _getSource_index_1 = [...]uint8{0, 13} 17 | _getSource_index_2 = [...]uint8{0, 12} 18 | _getSource_index_3 = [...]uint8{0, 18, 32} 19 | ) 20 | 21 | func (i getSource) String() string { 22 | switch { 23 | case 1 <= i && i <= 2: 24 | i -= 1 25 | return _getSource_name_0[_getSource_index_0[i]:_getSource_index_0[i+1]] 26 | case i == 4: 27 | return _getSource_name_1 28 | case i == 8: 29 | return _getSource_name_2 30 | case 15 <= i && i <= 16: 31 | i -= 15 32 | return _getSource_name_3[_getSource_index_3[i]:_getSource_index_3[i+1]] 33 | default: 34 | return fmt.Sprintf("getSource(%d)", i) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/schema/resource_data_get_source.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | //go:generate 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/helper/schema/testing.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/hashicorp/terraform/config" 7 | "github.com/hashicorp/terraform/terraform" 8 | ) 9 | 10 | // TestResourceDataRaw creates a ResourceData from a raw configuration map. 11 | func TestResourceDataRaw( 12 | t *testing.T, schema map[string]*Schema, raw map[string]interface{}) *ResourceData { 13 | t.Helper() 14 | 15 | c, err := config.NewRawConfig(raw) 16 | if err != nil { 17 | t.Fatalf("err: %s", err) 18 | } 19 | 20 | sm := schemaMap(schema) 21 | diff, err := sm.Diff(nil, terraform.NewResourceConfig(c)) 22 | if err != nil { 23 | t.Fatalf("err: %s", err) 24 | } 25 | 26 | result, err := sm.Data(nil, diff) 27 | if err != nil { 28 | t.Fatalf("err: %s", err) 29 | } 30 | 31 | return result 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/schema/valuetype.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | //go:generate 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/helper/schema/valuetype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=ValueType valuetype.go"; DO NOT EDIT. 2 | 3 | package schema 4 | 5 | import "fmt" 6 | 7 | const _ValueType_name = "TypeInvalidTypeBoolTypeIntTypeFloatTypeStringTypeListTypeMapTypeSettypeObject" 8 | 9 | var _ValueType_index = [...]uint8{0, 11, 19, 26, 35, 45, 53, 60, 67, 77} 10 | 11 | func (i ValueType) String() string { 12 | if i < 0 || i >= ValueType(len(_ValueType_index)-1) { 13 | return fmt.Sprintf("ValueType(%d)", i) 14 | } 15 | return _ValueType_name[_ValueType_index[i]:_ValueType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/structure/expand_json.go: -------------------------------------------------------------------------------- 1 | package structure 2 | 3 | import "encoding/json" 4 | 5 | func ExpandJsonFromString(jsonString string) (map[string]interface{}, error) { 6 | var result map[string]interface{} 7 | 8 | err := json.Unmarshal([]byte(jsonString), &result) 9 | 10 | return result, err 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/structure/flatten_json.go: -------------------------------------------------------------------------------- 1 | package structure 2 | 3 | import "encoding/json" 4 | 5 | func FlattenJsonToString(input map[string]interface{}) (string, error) { 6 | if len(input) == 0 { 7 | return "", nil 8 | } 9 | 10 | result, err := json.Marshal(input) 11 | if err != nil { 12 | return "", err 13 | } 14 | 15 | return string(result), nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go: -------------------------------------------------------------------------------- 1 | package structure 2 | 3 | import "encoding/json" 4 | 5 | // Takes a value containing JSON string and passes it through 6 | // the JSON parser to normalize it, returns either a parsing 7 | // error or normalized JSON string. 8 | func NormalizeJsonString(jsonString interface{}) (string, error) { 9 | var j interface{} 10 | 11 | if jsonString == nil || jsonString.(string) == "" { 12 | return "", nil 13 | } 14 | 15 | s := jsonString.(string) 16 | 17 | err := json.Unmarshal([]byte(s), &j) 18 | if err != nil { 19 | return s, err 20 | } 21 | 22 | bytes, _ := json.Marshal(j) 23 | return string(bytes[:]), nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/helper/structure/suppress_json_diff.go: -------------------------------------------------------------------------------- 1 | package structure 2 | 3 | import ( 4 | "reflect" 5 | 6 | "github.com/hashicorp/terraform/helper/schema" 7 | ) 8 | 9 | func SuppressJsonDiff(k, old, new string, d *schema.ResourceData) bool { 10 | oldMap, err := ExpandJsonFromString(old) 11 | if err != nil { 12 | return false 13 | } 14 | 15 | newMap, err := ExpandJsonFromString(new) 16 | if err != nil { 17 | return false 18 | } 19 | 20 | return reflect.DeepEqual(oldMap, newMap) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/moduledeps/doc.go: -------------------------------------------------------------------------------- 1 | // Package moduledeps contains types that can be used to describe the 2 | // providers required for all of the modules in a module tree. 3 | // 4 | // It does not itself contain the functionality for populating such 5 | // data structures; that's in Terraform core, since this package intentionally 6 | // does not depend on terraform core to avoid package dependency cycles. 7 | package moduledeps 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/moduledeps/provider.go: -------------------------------------------------------------------------------- 1 | package moduledeps 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // ProviderInstance describes a particular provider instance by its full name, 8 | // like "null" or "aws.foo". 9 | type ProviderInstance string 10 | 11 | // Type returns the provider type of this instance. For example, for an instance 12 | // named "aws.foo" the type is "aws". 13 | func (p ProviderInstance) Type() string { 14 | t := string(p) 15 | if dotPos := strings.Index(t, "."); dotPos != -1 { 16 | t = t[:dotPos] 17 | } 18 | return t 19 | } 20 | 21 | // Alias returns the alias of this provider, if any. An instance named "aws.foo" 22 | // has the alias "foo", while an instance named just "docker" has no alias, 23 | // so the empty string would be returned. 24 | func (p ProviderInstance) Alias() string { 25 | t := string(p) 26 | if dotPos := strings.Index(t, "."); dotPos != -1 { 27 | return t[dotPos+1:] 28 | } 29 | return "" 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/plugin/client.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | 7 | hclog "github.com/hashicorp/go-hclog" 8 | plugin "github.com/hashicorp/go-plugin" 9 | "github.com/hashicorp/terraform/plugin/discovery" 10 | ) 11 | 12 | // ClientConfig returns a configuration object that can be used to instantiate 13 | // a client for the plugin described by the given metadata. 14 | func ClientConfig(m discovery.PluginMeta) *plugin.ClientConfig { 15 | logger := hclog.New(&hclog.LoggerOptions{ 16 | Name: "plugin", 17 | Level: hclog.Trace, 18 | Output: os.Stderr, 19 | }) 20 | 21 | return &plugin.ClientConfig{ 22 | Cmd: exec.Command(m.Path), 23 | HandshakeConfig: Handshake, 24 | Managed: true, 25 | Plugins: PluginMap, 26 | Logger: logger, 27 | } 28 | } 29 | 30 | // Client returns a plugin client for the plugin described by the given metadata. 31 | func Client(m discovery.PluginMeta) *plugin.Client { 32 | return plugin.NewClient(ClientConfig(m)) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/plugin/plugin.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "github.com/hashicorp/go-plugin" 5 | ) 6 | 7 | // See serve.go for serving plugins 8 | 9 | // PluginMap should be used by clients for the map of plugins. 10 | var PluginMap = map[string]plugin.Plugin{ 11 | "provider": &ResourceProviderPlugin{}, 12 | "provisioner": &ResourceProvisionerPlugin{}, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/plugin/ui_output.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "net/rpc" 5 | 6 | "github.com/hashicorp/terraform/terraform" 7 | ) 8 | 9 | // UIOutput is an implementatin of terraform.UIOutput that communicates 10 | // over RPC. 11 | type UIOutput struct { 12 | Client *rpc.Client 13 | } 14 | 15 | func (o *UIOutput) Output(v string) { 16 | o.Client.Call("Plugin.Output", v, new(interface{})) 17 | } 18 | 19 | // UIOutputServer is the RPC server for serving UIOutput. 20 | type UIOutputServer struct { 21 | UIOutput terraform.UIOutput 22 | } 23 | 24 | func (s *UIOutputServer) Output( 25 | v string, 26 | reply *interface{}) error { 27 | s.UIOutput.Output(v) 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/context_graph_type.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | //go:generate stringer -type=GraphType context_graph_type.go 4 | 5 | // GraphType is an enum of the type of graph to create with a Context. 6 | // The values of the constants may change so they shouldn't be depended on; 7 | // always use the constant name. 8 | type GraphType byte 9 | 10 | const ( 11 | GraphTypeInvalid GraphType = 0 12 | GraphTypeLegacy GraphType = iota 13 | GraphTypeRefresh 14 | GraphTypePlan 15 | GraphTypePlanDestroy 16 | GraphTypeApply 17 | GraphTypeInput 18 | GraphTypeValidate 19 | ) 20 | 21 | // GraphTypeMap is a mapping of human-readable string to GraphType. This 22 | // is useful to use as the mechanism for human input for configurable 23 | // graph types. 24 | var GraphTypeMap = map[string]GraphType{ 25 | "apply": GraphTypeApply, 26 | "input": GraphTypeInput, 27 | "plan": GraphTypePlan, 28 | "plan-destroy": GraphTypePlanDestroy, 29 | "refresh": GraphTypeRefresh, 30 | "legacy": GraphTypeLegacy, 31 | "validate": GraphTypeValidate, 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/edge_destroy.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/terraform/dag" 7 | ) 8 | 9 | // DestroyEdge is an edge that represents a standard "destroy" relationship: 10 | // Target depends on Source because Source is destroying. 11 | type DestroyEdge struct { 12 | S, T dag.Vertex 13 | } 14 | 15 | func (e *DestroyEdge) Hashcode() interface{} { return fmt.Sprintf("%p-%p", e.S, e.T) } 16 | func (e *DestroyEdge) Source() dag.Vertex { return e.S } 17 | func (e *DestroyEdge) Target() dag.Vertex { return e.T } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_count_computed.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/terraform/config" 7 | ) 8 | 9 | // EvalCountCheckComputed is an EvalNode that checks if a resource count 10 | // is computed and errors if so. This can possibly happen across a 11 | // module boundary and we don't yet support this. 12 | type EvalCountCheckComputed struct { 13 | Resource *config.Resource 14 | } 15 | 16 | // TODO: test 17 | func (n *EvalCountCheckComputed) Eval(ctx EvalContext) (interface{}, error) { 18 | if n.Resource.RawCount.Value() == unknownValue() { 19 | return nil, fmt.Errorf( 20 | "%s: value of 'count' cannot be computed", 21 | n.Resource.Id()) 22 | } 23 | 24 | return nil, nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_error.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalReturnError is an EvalNode implementation that returns an 4 | // error if it is present. 5 | // 6 | // This is useful for scenarios where an error has been captured by 7 | // another EvalNode (like EvalApply) for special EvalTree-based error 8 | // handling, and that handling has completed, so the error should be 9 | // returned normally. 10 | type EvalReturnError struct { 11 | Error *error 12 | } 13 | 14 | func (n *EvalReturnError) Eval(ctx EvalContext) (interface{}, error) { 15 | if n.Error == nil { 16 | return nil, nil 17 | } 18 | 19 | return nil, *n.Error 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_filter.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalNodeFilterFunc is the callback used to replace a node with 4 | // another to node. To not do the replacement, just return the input node. 5 | type EvalNodeFilterFunc func(EvalNode) EvalNode 6 | 7 | // EvalNodeFilterable is an interface that can be implemented by 8 | // EvalNodes to allow filtering of sub-elements. Note that this isn't 9 | // a common thing to implement and you probably don't need it. 10 | type EvalNodeFilterable interface { 11 | EvalNode 12 | Filter(EvalNodeFilterFunc) 13 | } 14 | 15 | // EvalFilter runs the filter on the given node and returns the 16 | // final filtered value. This should be called rather than checking 17 | // the EvalNode directly since this will properly handle EvalNodeFilterables. 18 | func EvalFilter(node EvalNode, fn EvalNodeFilterFunc) EvalNode { 19 | if f, ok := node.(EvalNodeFilterable); ok { 20 | f.Filter(fn) 21 | return node 22 | } 23 | 24 | return fn(node) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_if.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalIf is an EvalNode that is a conditional. 4 | type EvalIf struct { 5 | If func(EvalContext) (bool, error) 6 | Then EvalNode 7 | Else EvalNode 8 | } 9 | 10 | // TODO: test 11 | func (n *EvalIf) Eval(ctx EvalContext) (interface{}, error) { 12 | yes, err := n.If(ctx) 13 | if err != nil { 14 | return nil, err 15 | } 16 | 17 | if yes { 18 | return EvalRaw(n.Then, ctx) 19 | } else { 20 | if n.Else != nil { 21 | return EvalRaw(n.Else, ctx) 22 | } 23 | } 24 | 25 | return nil, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_noop.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalNoop is an EvalNode that does nothing. 4 | type EvalNoop struct{} 5 | 6 | func (EvalNoop) Eval(EvalContext) (interface{}, error) { 7 | return nil, nil 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_resource.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalInstanceInfo is an EvalNode implementation that fills in the 4 | // InstanceInfo as much as it can. 5 | type EvalInstanceInfo struct { 6 | Info *InstanceInfo 7 | } 8 | 9 | // TODO: test 10 | func (n *EvalInstanceInfo) Eval(ctx EvalContext) (interface{}, error) { 11 | n.Info.ModulePath = ctx.Path() 12 | return nil, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/eval_sequence.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // EvalSequence is an EvalNode that evaluates in sequence. 4 | type EvalSequence struct { 5 | Nodes []EvalNode 6 | } 7 | 8 | func (n *EvalSequence) Eval(ctx EvalContext) (interface{}, error) { 9 | for _, n := range n.Nodes { 10 | if n == nil { 11 | continue 12 | } 13 | 14 | if _, err := EvalRaw(n, ctx); err != nil { 15 | return nil, err 16 | } 17 | } 18 | 19 | return nil, nil 20 | } 21 | 22 | // EvalNodeFilterable impl. 23 | func (n *EvalSequence) Filter(fn EvalNodeFilterFunc) { 24 | for i, node := range n.Nodes { 25 | n.Nodes[i] = fn(node) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/graph_builder_input.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/dag" 5 | ) 6 | 7 | // InputGraphBuilder creates the graph for the input operation. 8 | // 9 | // Unlike other graph builders, this is a function since it currently modifies 10 | // and is based on the PlanGraphBuilder. The PlanGraphBuilder passed in will be 11 | // modified and should not be used for any other operations. 12 | func InputGraphBuilder(p *PlanGraphBuilder) GraphBuilder { 13 | // convert this to an InputPlan 14 | p.Input = true 15 | 16 | // We're going to customize the concrete functions 17 | p.CustomConcrete = true 18 | 19 | // Set the provider to the normal provider. This will ask for input. 20 | p.ConcreteProvider = func(a *NodeAbstractProvider) dag.Vertex { 21 | return &NodeApplyableProvider{ 22 | NodeAbstractProvider: a, 23 | } 24 | } 25 | 26 | // We purposely don't set any more concrete fields since the remainder 27 | // should be no-ops. 28 | 29 | return p 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/graph_dot.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import "github.com/hashicorp/terraform/dag" 4 | 5 | // GraphDot returns the dot formatting of a visual representation of 6 | // the given Terraform graph. 7 | func GraphDot(g *Graph, opts *dag.DotOpts) (string, error) { 8 | return string(g.Dot(opts)), nil 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/graph_interface_subgraph.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // GraphNodeSubPath says that a node is part of a graph with a 4 | // different path, and the context should be adjusted accordingly. 5 | type GraphNodeSubPath interface { 6 | Path() []string 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/graph_walk_operation.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | //go:generate stringer -type=walkOperation graph_walk_operation.go 4 | 5 | // walkOperation is an enum which tells the walkContext what to do. 6 | type walkOperation byte 7 | 8 | const ( 9 | walkInvalid walkOperation = iota 10 | walkInput 11 | walkApply 12 | walkPlan 13 | walkPlanDestroy 14 | walkRefresh 15 | walkValidate 16 | walkDestroy 17 | walkImport 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/graphtype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=GraphType context_graph_type.go"; DO NOT EDIT. 2 | 3 | package terraform 4 | 5 | import "fmt" 6 | 7 | const _GraphType_name = "GraphTypeInvalidGraphTypeLegacyGraphTypeRefreshGraphTypePlanGraphTypePlanDestroyGraphTypeApplyGraphTypeInputGraphTypeValidate" 8 | 9 | var _GraphType_index = [...]uint8{0, 16, 31, 47, 60, 80, 94, 108, 125} 10 | 11 | func (i GraphType) String() string { 12 | if i >= GraphType(len(_GraphType_index)-1) { 13 | return fmt.Sprintf("GraphType(%d)", i) 14 | } 15 | return _GraphType_name[_GraphType_index[i]:_GraphType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/instancetype.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | //go:generate 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/terraform/instancetype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=InstanceType instancetype.go"; DO NOT EDIT. 2 | 3 | package terraform 4 | 5 | import "fmt" 6 | 7 | const _InstanceType_name = "TypeInvalidTypePrimaryTypeTaintedTypeDeposed" 8 | 9 | var _InstanceType_index = [...]uint8{0, 11, 22, 33, 44} 10 | 11 | func (i InstanceType) String() string { 12 | if i < 0 || i >= InstanceType(len(_InstanceType_index)-1) { 13 | return fmt.Sprintf("InstanceType(%d)", i) 14 | } 15 | return _InstanceType_name[_InstanceType_index[i]:_InstanceType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_count_boundary.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // NodeCountBoundary fixes any "count boundarie" in the state: resources 4 | // that are named "foo.0" when they should be named "foo" 5 | type NodeCountBoundary struct{} 6 | 7 | func (n *NodeCountBoundary) Name() string { 8 | return "meta.count-boundary (count boundary fixup)" 9 | } 10 | 11 | // GraphNodeEvalable 12 | func (n *NodeCountBoundary) EvalTree() EvalNode { 13 | return &EvalCountFixZeroOneBoundaryGlobal{} 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_data_destroy.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // NodeDestroyableDataResource represents a resource that is "plannable": 4 | // it is ready to be planned in order to create a diff. 5 | type NodeDestroyableDataResource struct { 6 | *NodeAbstractResource 7 | } 8 | 9 | // GraphNodeEvalable 10 | func (n *NodeDestroyableDataResource) EvalTree() EvalNode { 11 | addr := n.NodeAbstractResource.Addr 12 | 13 | // stateId is the ID to put into the state 14 | stateId := addr.stateId() 15 | 16 | // Just destroy it. 17 | var state *InstanceState 18 | return &EvalWriteState{ 19 | Name: stateId, 20 | State: &state, // state is nil here 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_module_destroy.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // NodeDestroyableModule represents a module destruction. 8 | type NodeDestroyableModuleVariable struct { 9 | PathValue []string 10 | } 11 | 12 | func (n *NodeDestroyableModuleVariable) Name() string { 13 | result := "plan-destroy" 14 | if len(n.PathValue) > 1 { 15 | result = fmt.Sprintf("%s.%s", modulePrefixStr(n.PathValue), result) 16 | } 17 | 18 | return result 19 | } 20 | 21 | // GraphNodeSubPath 22 | func (n *NodeDestroyableModuleVariable) Path() []string { 23 | return n.PathValue 24 | } 25 | 26 | // GraphNodeEvalable 27 | func (n *NodeDestroyableModuleVariable) EvalTree() EvalNode { 28 | return &EvalDiffDestroyModule{Path: n.PathValue} 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_output_orphan.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // NodeOutputOrphan represents an output that is an orphan. 8 | type NodeOutputOrphan struct { 9 | OutputName string 10 | PathValue []string 11 | } 12 | 13 | func (n *NodeOutputOrphan) Name() string { 14 | result := fmt.Sprintf("output.%s (orphan)", n.OutputName) 15 | if len(n.PathValue) > 1 { 16 | result = fmt.Sprintf("%s.%s", modulePrefixStr(n.PathValue), result) 17 | } 18 | 19 | return result 20 | } 21 | 22 | // GraphNodeSubPath 23 | func (n *NodeOutputOrphan) Path() []string { 24 | return n.PathValue 25 | } 26 | 27 | // GraphNodeEvalable 28 | func (n *NodeOutputOrphan) EvalTree() EvalNode { 29 | return &EvalOpFilter{ 30 | Ops: []walkOperation{walkRefresh, walkApply, walkDestroy}, 31 | Node: &EvalDeleteOutput{ 32 | Name: n.OutputName, 33 | }, 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_provider.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // NodeApplyableProvider represents a provider during an apply. 4 | type NodeApplyableProvider struct { 5 | *NodeAbstractProvider 6 | } 7 | 8 | // GraphNodeEvalable 9 | func (n *NodeApplyableProvider) EvalTree() EvalNode { 10 | return ProviderEvalTree(n.NameValue, n.ProviderConfig()) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_provider_disabled.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // NodeDisabledProvider represents a provider that is disabled. A disabled 8 | // provider does nothing. It exists to properly set inheritance information 9 | // for child providers. 10 | type NodeDisabledProvider struct { 11 | *NodeAbstractProvider 12 | } 13 | 14 | func (n *NodeDisabledProvider) Name() string { 15 | return fmt.Sprintf("%s (disabled)", n.NodeAbstractProvider.Name()) 16 | } 17 | 18 | // GraphNodeEvalable 19 | func (n *NodeDisabledProvider) EvalTree() EvalNode { 20 | var resourceConfig *ResourceConfig 21 | return &EvalSequence{ 22 | Nodes: []EvalNode{ 23 | &EvalInterpolate{ 24 | Config: n.ProviderConfig(), 25 | Output: &resourceConfig, 26 | }, 27 | &EvalBuildProviderConfig{ 28 | Provider: n.ProviderName(), 29 | Config: &resourceConfig, 30 | Output: &resourceConfig, 31 | }, 32 | &EvalSetProviderConfig{ 33 | Provider: n.ProviderName(), 34 | Config: &resourceConfig, 35 | }, 36 | }, 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/node_root_variable.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/terraform/config" 7 | ) 8 | 9 | // NodeRootVariable represents a root variable input. 10 | type NodeRootVariable struct { 11 | Config *config.Variable 12 | } 13 | 14 | func (n *NodeRootVariable) Name() string { 15 | result := fmt.Sprintf("var.%s", n.Config.Name) 16 | return result 17 | } 18 | 19 | // GraphNodeReferenceable 20 | func (n *NodeRootVariable) ReferenceableName() []string { 21 | return []string{n.Name()} 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/path.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/hex" 6 | ) 7 | 8 | // PathCacheKey returns a cache key for a module path. 9 | // 10 | // TODO: test 11 | func PathCacheKey(path []string) string { 12 | // There is probably a better way to do this, but this is working for now. 13 | // We just create an MD5 hash of all the MD5 hashes of all the path 14 | // elements. This gets us the property that it is unique per ordering. 15 | hash := md5.New() 16 | for _, p := range path { 17 | single := md5.Sum([]byte(p)) 18 | if _, err := hash.Write(single[:]); err != nil { 19 | panic(err) 20 | } 21 | } 22 | 23 | return hex.EncodeToString(hash.Sum(nil)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/test_failure: -------------------------------------------------------------------------------- 1 | --- FAIL: TestContext2Plan_moduleProviderInherit (0.01s) 2 | context_plan_test.go:552: bad: []string{"child"} 3 | map[string]dag.Vertex{} 4 | "module.middle.null" 5 | map[string]dag.Vertex{} 6 | "module.middle.module.inner.null" 7 | map[string]dag.Vertex{} 8 | "aws" 9 | FAIL 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/testing.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | ) 7 | 8 | // TestStateFile writes the given state to the path. 9 | func TestStateFile(t *testing.T, path string, state *State) { 10 | f, err := os.Create(path) 11 | if err != nil { 12 | t.Fatalf("err: %s", err) 13 | } 14 | defer f.Close() 15 | 16 | if err := WriteState(state, f); err != nil { 17 | t.Fatalf("err: %s", err) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_config_old.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/terraform/config" 7 | ) 8 | 9 | // varNameForVar returns the VarName value for an interpolated variable. 10 | // This value is compared to the VarName() value for the nodes within the 11 | // graph to build the graph edges. 12 | func varNameForVar(raw config.InterpolatedVariable) string { 13 | switch v := raw.(type) { 14 | case *config.ModuleVariable: 15 | return fmt.Sprintf("module.%s.output.%s", v.Name, v.Field) 16 | case *config.ResourceVariable: 17 | return v.ResourceId() 18 | case *config.UserVariable: 19 | return fmt.Sprintf("var.%s", v.Name) 20 | default: 21 | return "" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_count_boundary.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/dag" 5 | ) 6 | 7 | // CountBoundaryTransformer adds a node that depends on everything else 8 | // so that it runs last in order to clean up the state for nodes that 9 | // are on the "count boundary": "foo.0" when only one exists becomes "foo" 10 | type CountBoundaryTransformer struct{} 11 | 12 | func (t *CountBoundaryTransformer) Transform(g *Graph) error { 13 | node := &NodeCountBoundary{} 14 | g.Add(node) 15 | 16 | // Depends on everything 17 | for _, v := range g.Vertices() { 18 | // Don't connect to ourselves 19 | if v == node { 20 | continue 21 | } 22 | 23 | // Connect! 24 | g.Connect(dag.BasicEdge(node, v)) 25 | } 26 | 27 | return nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_local.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/config/module" 5 | ) 6 | 7 | // LocalTransformer is a GraphTransformer that adds all the local values 8 | // from the configuration to the graph. 9 | type LocalTransformer struct { 10 | Module *module.Tree 11 | } 12 | 13 | func (t *LocalTransformer) Transform(g *Graph) error { 14 | return t.transformModule(g, t.Module) 15 | } 16 | 17 | func (t *LocalTransformer) transformModule(g *Graph, m *module.Tree) error { 18 | if m == nil { 19 | // Can't have any locals if there's no config 20 | return nil 21 | } 22 | 23 | for _, local := range m.Config().Locals { 24 | node := &NodeLocal{ 25 | PathValue: normalizeModulePath(m.Path()), 26 | Config: local, 27 | } 28 | 29 | g.Add(node) 30 | } 31 | 32 | // Also populate locals for child modules 33 | for _, c := range m.Children() { 34 | if err := t.transformModule(g, c); err != nil { 35 | return err 36 | } 37 | } 38 | 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_root.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import "github.com/hashicorp/terraform/dag" 4 | 5 | const rootNodeName = "root" 6 | 7 | // RootTransformer is a GraphTransformer that adds a root to the graph. 8 | type RootTransformer struct{} 9 | 10 | func (t *RootTransformer) Transform(g *Graph) error { 11 | // If we already have a good root, we're done 12 | if _, err := g.Root(); err == nil { 13 | return nil 14 | } 15 | 16 | // Add a root 17 | var root graphNodeRoot 18 | g.Add(root) 19 | 20 | // Connect the root to all the edges that need it 21 | for _, v := range g.Vertices() { 22 | if v == root { 23 | continue 24 | } 25 | 26 | if g.UpEdges(v).Len() == 0 { 27 | g.Connect(dag.BasicEdge(root, v)) 28 | } 29 | } 30 | 31 | return nil 32 | } 33 | 34 | type graphNodeRoot struct{} 35 | 36 | func (n graphNodeRoot) Name() string { 37 | return rootNodeName 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_transitive_reduction.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // TransitiveReductionTransformer is a GraphTransformer that performs 4 | // finds the transitive reduction of the graph. For a definition of 5 | // transitive reduction, see Wikipedia. 6 | type TransitiveReductionTransformer struct{} 7 | 8 | func (t *TransitiveReductionTransformer) Transform(g *Graph) error { 9 | // If the graph isn't valid, skip the transitive reduction. 10 | // We don't error here because Terraform itself handles graph 11 | // validation in a better way, or we assume it does. 12 | if err := g.Validate(); err != nil { 13 | return nil 14 | } 15 | 16 | // Do it 17 | g.TransitiveReduction() 18 | 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/transform_variable.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "github.com/hashicorp/terraform/config/module" 5 | ) 6 | 7 | // RootVariableTransformer is a GraphTransformer that adds all the root 8 | // variables to the graph. 9 | // 10 | // Root variables are currently no-ops but they must be added to the 11 | // graph since downstream things that depend on them must be able to 12 | // reach them. 13 | type RootVariableTransformer struct { 14 | Module *module.Tree 15 | } 16 | 17 | func (t *RootVariableTransformer) Transform(g *Graph) error { 18 | // If no config, no variables 19 | if t.Module == nil { 20 | return nil 21 | } 22 | 23 | // If we have no vars, we're done! 24 | vars := t.Module.Config().Variables 25 | if len(vars) == 0 { 26 | return nil 27 | } 28 | 29 | // Add all variables here 30 | for _, v := range vars { 31 | node := &NodeRootVariable{ 32 | Config: v, 33 | } 34 | 35 | // Add it! 36 | g.Add(node) 37 | } 38 | 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_input.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // UIInput is the interface that must be implemented to ask for input 4 | // from this user. This should forward the request to wherever the user 5 | // inputs things to ask for values. 6 | type UIInput interface { 7 | Input(*InputOpts) (string, error) 8 | } 9 | 10 | // InputOpts are options for asking for input. 11 | type InputOpts struct { 12 | // Id is a unique ID for the question being asked that might be 13 | // used for logging or to look up a prior answered question. 14 | Id string 15 | 16 | // Query is a human-friendly question for inputting this value. 17 | Query string 18 | 19 | // Description is a description about what this option is. Be wary 20 | // that this will probably be in a terminal so split lines as you see 21 | // necessary. 22 | Description string 23 | 24 | // Default will be the value returned if no data is entered. 25 | Default string 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_input_mock.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // MockUIInput is an implementation of UIInput that can be used for tests. 4 | type MockUIInput struct { 5 | InputCalled bool 6 | InputOpts *InputOpts 7 | InputReturnMap map[string]string 8 | InputReturnString string 9 | InputReturnError error 10 | InputFn func(*InputOpts) (string, error) 11 | } 12 | 13 | func (i *MockUIInput) Input(opts *InputOpts) (string, error) { 14 | i.InputCalled = true 15 | i.InputOpts = opts 16 | if i.InputFn != nil { 17 | return i.InputFn(opts) 18 | } 19 | if i.InputReturnMap != nil { 20 | return i.InputReturnMap[opts.Id], i.InputReturnError 21 | } 22 | return i.InputReturnString, i.InputReturnError 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_input_prefix.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // PrefixUIInput is an implementation of UIInput that prefixes the ID 8 | // with a string, allowing queries to be namespaced. 9 | type PrefixUIInput struct { 10 | IdPrefix string 11 | QueryPrefix string 12 | UIInput UIInput 13 | } 14 | 15 | func (i *PrefixUIInput) Input(opts *InputOpts) (string, error) { 16 | opts.Id = fmt.Sprintf("%s.%s", i.IdPrefix, opts.Id) 17 | opts.Query = fmt.Sprintf("%s%s", i.QueryPrefix, opts.Query) 18 | return i.UIInput.Input(opts) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_output.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // UIOutput is the interface that must be implemented to output 4 | // data to the end user. 5 | type UIOutput interface { 6 | Output(string) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_output_callback.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | type CallbackUIOutput struct { 4 | OutputFn func(string) 5 | } 6 | 7 | func (o *CallbackUIOutput) Output(v string) { 8 | o.OutputFn(v) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // MockUIOutput is an implementation of UIOutput that can be used for tests. 4 | type MockUIOutput struct { 5 | OutputCalled bool 6 | OutputMessage string 7 | OutputFn func(string) 8 | } 9 | 10 | func (o *MockUIOutput) Output(v string) { 11 | o.OutputCalled = true 12 | o.OutputMessage = v 13 | if o.OutputFn != nil { 14 | o.OutputFn(v) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/ui_output_provisioner.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | // ProvisionerUIOutput is an implementation of UIOutput that calls a hook 4 | // for the output so that the hooks can handle it. 5 | type ProvisionerUIOutput struct { 6 | Info *InstanceInfo 7 | Type string 8 | Hooks []Hook 9 | } 10 | 11 | func (o *ProvisionerUIOutput) Output(msg string) { 12 | for _, h := range o.Hooks { 13 | h.ProvisionOutput(o.Info, o.Type, msg) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/user_agent.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | "runtime" 6 | ) 7 | 8 | // The standard Terraform User-Agent format 9 | const UserAgent = "Terraform %s (%s)" 10 | 11 | // Generate a UserAgent string 12 | func UserAgentString() string { 13 | return fmt.Sprintf(UserAgent, VersionString(), runtime.Version()) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/version.go: -------------------------------------------------------------------------------- 1 | package terraform 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/go-version" 7 | ) 8 | 9 | // The main version number that is being run at the moment. 10 | const Version = "0.10.6" 11 | 12 | // A pre-release marker for the version. If this is "" (empty string) 13 | // then it means that it is a final release. Otherwise, this is a pre-release 14 | // such as "dev" (in development), "beta", "rc1", etc. 15 | var VersionPrerelease = "" 16 | 17 | // SemVersion is an instance of version.Version. This has the secondary 18 | // benefit of verifying during tests and init time that our version is a 19 | // proper semantic version, which should always be the case. 20 | var SemVersion = version.Must(version.NewVersion(Version)) 21 | 22 | // VersionHeader is the header name used to send the current terraform version 23 | // in http requests. 24 | const VersionHeader = "Terraform-Version" 25 | 26 | func VersionString() string { 27 | if VersionPrerelease != "" { 28 | return fmt.Sprintf("%s-%s", Version, VersionPrerelease) 29 | } 30 | return Version 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/terraform/terraform/walkoperation_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=walkOperation graph_walk_operation.go"; DO NOT EDIT. 2 | 3 | package terraform 4 | 5 | import "fmt" 6 | 7 | const _walkOperation_name = "walkInvalidwalkInputwalkApplywalkPlanwalkPlanDestroywalkRefreshwalkValidatewalkDestroywalkImport" 8 | 9 | var _walkOperation_index = [...]uint8{0, 11, 20, 29, 37, 52, 63, 75, 86, 96} 10 | 11 | func (i walkOperation) String() string { 12 | if i >= walkOperation(len(_walkOperation_index)-1) { 13 | return fmt.Sprintf("walkOperation(%d)", i) 14 | } 15 | return _walkOperation_name[_walkOperation_index[i]:_walkOperation_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/yamux/util.go: -------------------------------------------------------------------------------- 1 | package yamux 2 | 3 | // asyncSendErr is used to try an async send of an error 4 | func asyncSendErr(ch chan error, err error) { 5 | if ch == nil { 6 | return 7 | } 8 | select { 9 | case ch <- err: 10 | default: 11 | } 12 | } 13 | 14 | // asyncNotify is used to signal a waiting goroutine 15 | func asyncNotify(ch chan struct{}) { 16 | select { 17 | case ch <- struct{}{}: 18 | default: 19 | } 20 | } 21 | 22 | // min computes the minimum of two values 23 | func min(a, b uint32) uint32 { 24 | if a < b { 25 | return a 26 | } 27 | return b 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 James Saryerwinnie 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/github.com/jmespath/go-jmespath/README.md: -------------------------------------------------------------------------------- 1 | # go-jmespath - A JMESPath implementation in Go 2 | 3 | [![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) 4 | 5 | 6 | 7 | See http://jmespath.org for more info. 8 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/astnodetype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type astNodeType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" 8 | 9 | var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} 10 | 11 | func (i astNodeType) String() string { 12 | if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { 13 | return fmt.Sprintf("astNodeType(%d)", i) 14 | } 15 | return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/toktype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=tokType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" 8 | 9 | var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} 10 | 11 | func (i tokType) String() string { 12 | if i < 0 || i >= tokType(len(_tokType_index)-1) { 13 | return fmt.Sprintf("tokType(%d)", i) 14 | } 15 | return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /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_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on on 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_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 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build !appengine,!ppc64,!ppc64le 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TCGETS 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 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build ppc64 ppc64le 3 | 4 | package isatty 5 | 6 | import ( 7 | "unsafe" 8 | 9 | syscall "golang.org/x/sys/unix" 10 | ) 11 | 12 | const ioctlReadTermios = syscall.TCGETS 13 | 14 | // IsTerminal return true if the file descriptor is terminal. 15 | func IsTerminal(fd uintptr) bool { 16 | var termios syscall.Termios 17 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 18 | return err == 0 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 7 | // terminal. This is also always false on this environment. 8 | func IsCygwinTerminal(fd uintptr) bool { 9 | return false 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/cli/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | # test runs the test suite and vets the code 6 | test: 7 | go list $(TEST) | xargs -n1 go test -timeout=60s -parallel=10 $(TESTARGS) 8 | 9 | # testrace runs the race checker 10 | testrace: 11 | go list $(TEST) | xargs -n1 go test -race $(TESTARGS) 12 | 13 | # updatedeps installs all the dependencies to run and build 14 | updatedeps: 15 | go list ./... \ 16 | | xargs go list -f '{{ join .Deps "\n" }}{{ printf "\n" }}{{ join .TestImports "\n" }}' \ 17 | | grep -v github.com/mitchellh/cli \ 18 | | xargs go get -f -u -v 19 | 20 | .PHONY: test testrace updatedeps 21 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/cli/ui_concurrent.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | // ConcurrentUi is a wrapper around a Ui interface (and implements that 8 | // interface) making the underlying Ui concurrency safe. 9 | type ConcurrentUi struct { 10 | Ui Ui 11 | l sync.Mutex 12 | } 13 | 14 | func (u *ConcurrentUi) Ask(query string) (string, error) { 15 | u.l.Lock() 16 | defer u.l.Unlock() 17 | 18 | return u.Ui.Ask(query) 19 | } 20 | 21 | func (u *ConcurrentUi) AskSecret(query string) (string, error) { 22 | u.l.Lock() 23 | defer u.l.Unlock() 24 | 25 | return u.Ui.AskSecret(query) 26 | } 27 | 28 | func (u *ConcurrentUi) Error(message string) { 29 | u.l.Lock() 30 | defer u.l.Unlock() 31 | 32 | u.Ui.Error(message) 33 | } 34 | 35 | func (u *ConcurrentUi) Info(message string) { 36 | u.l.Lock() 37 | defer u.l.Unlock() 38 | 39 | u.Ui.Info(message) 40 | } 41 | 42 | func (u *ConcurrentUi) Output(message string) { 43 | u.l.Lock() 44 | defer u.l.Unlock() 45 | 46 | u.Ui.Output(message) 47 | } 48 | 49 | func (u *ConcurrentUi) Warn(message string) { 50 | u.l.Lock() 51 | defer u.l.Unlock() 52 | 53 | u.Ui.Warn(message) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/cli/ui_writer.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | // UiWriter is an io.Writer implementation that can be used with 4 | // loggers that writes every line of log output data to a Ui at the 5 | // Info level. 6 | type UiWriter struct { 7 | Ui Ui 8 | } 9 | 10 | func (w *UiWriter) Write(p []byte) (n int, err error) { 11 | n = len(p) 12 | if n > 0 && p[n-1] == '\n' { 13 | p = p[:n-1] 14 | } 15 | 16 | w.Ui.Info(string(p)) 17 | return n, nil 18 | } 19 | -------------------------------------------------------------------------------- /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-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/hashstructure/include.go: -------------------------------------------------------------------------------- 1 | package hashstructure 2 | 3 | // Includable is an interface that can optionally be implemented by 4 | // a struct. It will be called for each field in the struct to check whether 5 | // it should be included in the hash. 6 | type Includable interface { 7 | HashInclude(field string, v interface{}) (bool, error) 8 | } 9 | 10 | // IncludableMap is an interface that can optionally be implemented by 11 | // a struct. It will be called when a map-type field is found to ask the 12 | // struct if the map item should be included in the hash. 13 | type IncludableMap interface { 14 | HashIncludeMap(field string, k, v interface{}) (bool, error) 15 | } 16 | -------------------------------------------------------------------------------- /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/posener/complete/cmd/install/bash.go: -------------------------------------------------------------------------------- 1 | package install 2 | 3 | import "fmt" 4 | 5 | // (un)install in bash 6 | // basically adds/remove from .bashrc: 7 | // 8 | // complete -C 9 | type bash struct { 10 | rc string 11 | } 12 | 13 | func (b bash) Install(cmd, bin string) error { 14 | completeCmd := b.cmd(cmd, bin) 15 | if lineInFile(b.rc, completeCmd) { 16 | return fmt.Errorf("already installed in %s", b.rc) 17 | } 18 | return appendToFile(b.rc, completeCmd) 19 | } 20 | 21 | func (b bash) Uninstall(cmd, bin string) error { 22 | completeCmd := b.cmd(cmd, bin) 23 | if !lineInFile(b.rc, completeCmd) { 24 | return fmt.Errorf("does not installed in %s", b.rc) 25 | } 26 | 27 | return removeFromFile(b.rc, completeCmd) 28 | } 29 | 30 | func (bash) cmd(cmd, bin string) string { 31 | return fmt.Sprintf("complete -C %s %s", bin, cmd) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/cmd/install/zsh.go: -------------------------------------------------------------------------------- 1 | package install 2 | 3 | import "fmt" 4 | 5 | // (un)install in zsh 6 | // basically adds/remove from .zshrc: 7 | // 8 | // autoload -U +X bashcompinit && bashcompinit" 9 | // complete -C 10 | type zsh struct { 11 | rc string 12 | } 13 | 14 | func (z zsh) Install(cmd, bin string) error { 15 | completeCmd := z.cmd(cmd, bin) 16 | if lineInFile(z.rc, completeCmd) { 17 | return fmt.Errorf("already installed in %s", z.rc) 18 | } 19 | 20 | bashCompInit := "autoload -U +X bashcompinit && bashcompinit" 21 | if !lineInFile(z.rc, bashCompInit) { 22 | completeCmd = bashCompInit + "\n" + completeCmd 23 | } 24 | 25 | return appendToFile(z.rc, completeCmd) 26 | } 27 | 28 | func (z zsh) Uninstall(cmd, bin string) error { 29 | completeCmd := z.cmd(cmd, bin) 30 | if !lineInFile(z.rc, completeCmd) { 31 | return fmt.Errorf("does not installed in %s", z.rc) 32 | } 33 | 34 | return removeFromFile(z.rc, completeCmd) 35 | } 36 | 37 | func (zsh) cmd(cmd, bin string) string { 38 | return fmt.Sprintf("complete -o nospace -C %s %s", bin, cmd) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/log.go: -------------------------------------------------------------------------------- 1 | package complete 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | ) 9 | 10 | // Log is used for debugging purposes 11 | // since complete is running on tab completion, it is nice to 12 | // have logs to the stderr (when writing your own completer) 13 | // to write logs, set the COMP_DEBUG environment variable and 14 | // use complete.Log in the complete program 15 | var Log = getLogger() 16 | 17 | func getLogger() func(format string, args ...interface{}) { 18 | var logfile io.Writer = ioutil.Discard 19 | if os.Getenv(envDebug) != "" { 20 | logfile = os.Stderr 21 | } 22 | return log.New(logfile, "complete ", log.Flags()).Printf 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/match/file.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | import "strings" 4 | 5 | // File returns true if prefix can match the file 6 | func File(file, prefix string) bool { 7 | // special case for current directory completion 8 | if file == "./" && (prefix == "." || prefix == "") { 9 | return true 10 | } 11 | if prefix == "." && strings.HasPrefix(file, ".") { 12 | return true 13 | } 14 | 15 | file = strings.TrimPrefix(file, "./") 16 | prefix = strings.TrimPrefix(prefix, "./") 17 | 18 | return strings.HasPrefix(file, prefix) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/match/match.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | // Match matches two strings 4 | // it is used for comparing a term to the last typed 5 | // word, the prefix, and see if it is a possible auto complete option. 6 | type Match func(term, prefix string) bool 7 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/match/prefix.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | import "strings" 4 | 5 | // Prefix is a simple Matcher, if the word is it's prefix, there is a match 6 | // Match returns true if a has the prefix as prefix 7 | func Prefix(long, prefix string) bool { 8 | return strings.HasPrefix(long, prefix) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/metalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Vendor": true, 3 | "DisableAll": true, 4 | "Enable": [ 5 | "gofmt", 6 | "goimports", 7 | "interfacer", 8 | "goconst", 9 | "misspell", 10 | "unconvert", 11 | "gosimple", 12 | "golint", 13 | "structcheck", 14 | "deadcode", 15 | "vet" 16 | ], 17 | "Exclude": [ 18 | "initTests is unused" 19 | ], 20 | "Deadline": "2m" 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/predict_set.go: -------------------------------------------------------------------------------- 1 | package complete 2 | 3 | import "github.com/posener/complete/match" 4 | 5 | // PredictSet expects specific set of terms, given in the options argument. 6 | func PredictSet(options ...string) Predictor { 7 | return predictSet(options) 8 | } 9 | 10 | type predictSet []string 11 | 12 | func (p predictSet) Predict(a Args) (prediction []string) { 13 | for _, m := range p { 14 | if match.Prefix(m, a.Last) { 15 | prediction = append(prediction, m) 16 | } 17 | } 18 | return 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -v -race -coverprofile=profile.out -covermode=atomic $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done -------------------------------------------------------------------------------- /vendor/github.com/posener/complete/utils.go: -------------------------------------------------------------------------------- 1 | package complete 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "strings" 7 | ) 8 | 9 | // fixPathForm changes a file name to a relative name 10 | func fixPathForm(last string, file string) string { 11 | // get wording directory for relative name 12 | workDir, err := os.Getwd() 13 | if err != nil { 14 | return file 15 | } 16 | 17 | abs, err := filepath.Abs(file) 18 | if err != nil { 19 | return file 20 | } 21 | 22 | // if last is absolute, return path as absolute 23 | if filepath.IsAbs(last) { 24 | return fixDirPath(abs) 25 | } 26 | 27 | rel, err := filepath.Rel(workDir, abs) 28 | if err != nil { 29 | return file 30 | } 31 | 32 | // fix ./ prefix of path 33 | if rel != "." && strings.HasPrefix(last, ".") { 34 | rel = "./" + rel 35 | } 36 | 37 | return fixDirPath(rel) 38 | } 39 | 40 | func fixDirPath(path string) string { 41 | info, err := os.Stat(path) 42 | if err == nil && info.IsDir() && !strings.HasSuffix(path, "/") { 43 | path += "/" 44 | } 45 | return path 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/fox.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webdevwilson/terraform-provider-artifactory/4e94bc932c8cafc233c67984172f9b8f6f0f53c8/vendor/github.com/ulikunitz/xz/fox.xz -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/internal/hash/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Ulrich Kunitz. 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 | /* 6 | Package hash provides rolling hashes. 7 | 8 | Rolling hashes have to be used for maintaining the positions of n-byte 9 | sequences in the dictionary buffer. 10 | 11 | The package provides currently the Rabin-Karp rolling hash and a Cyclic 12 | Polynomial hash. Both support the Hashes method to be used with an interface. 13 | */ 14 | package hash 15 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/internal/hash/roller.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Ulrich Kunitz. 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 hash 6 | 7 | // Roller provides an interface for rolling hashes. The hash value will become 8 | // valid after hash has been called Len times. 9 | type Roller interface { 10 | Len() int 11 | RollByte(x byte) uint64 12 | } 13 | 14 | // Hashes computes all hash values for the array p. Note that the state of the 15 | // roller is changed. 16 | func Hashes(r Roller, p []byte) []uint64 { 17 | n := r.Len() 18 | if len(p) < n { 19 | return nil 20 | } 21 | h := make([]uint64, len(p)-n+1) 22 | for i := 0; i < n-1; i++ { 23 | r.RollByte(p[i]) 24 | } 25 | for i := range h { 26 | h[i] = r.RollByte(p[i+n-1]) 27 | } 28 | return h 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/breader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Ulrich Kunitz. 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 lzma 6 | 7 | import ( 8 | "errors" 9 | "io" 10 | ) 11 | 12 | // breader provides the ReadByte function for a Reader. It doesn't read 13 | // more data from the reader than absolutely necessary. 14 | type breader struct { 15 | io.Reader 16 | // helper slice to save allocations 17 | p []byte 18 | } 19 | 20 | // ByteReader converts an io.Reader into an io.ByteReader. 21 | func ByteReader(r io.Reader) io.ByteReader { 22 | br, ok := r.(io.ByteReader) 23 | if !ok { 24 | return &breader{r, make([]byte, 1)} 25 | } 26 | return br 27 | } 28 | 29 | // ReadByte read byte function. 30 | func (r *breader) ReadByte() (c byte, err error) { 31 | n, err := r.Reader.Read(r.p) 32 | if n < 1 { 33 | if err == nil { 34 | err = errors.New("breader.ReadByte: no data") 35 | } 36 | return 0, err 37 | } 38 | return r.p[0], nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/bytewriter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Ulrich Kunitz. 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 lzma 6 | 7 | import ( 8 | "errors" 9 | "io" 10 | ) 11 | 12 | // ErrLimit indicates that the limit of the LimitedByteWriter has been 13 | // reached. 14 | var ErrLimit = errors.New("limit reached") 15 | 16 | // LimitedByteWriter provides a byte writer that can be written until a 17 | // limit is reached. The field N provides the number of remaining 18 | // bytes. 19 | type LimitedByteWriter struct { 20 | BW io.ByteWriter 21 | N int64 22 | } 23 | 24 | // WriteByte writes a single byte to the limited byte writer. It returns 25 | // ErrLimit if the limit has been reached. If the byte is successfully 26 | // written the field N of the LimitedByteWriter will be decremented by 27 | // one. 28 | func (l *LimitedByteWriter) WriteByte(c byte) error { 29 | if l.N <= 0 { 30 | return ErrLimit 31 | } 32 | if err := l.BW.WriteByte(c); err != nil { 33 | return err 34 | } 35 | l.N-- 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/fox.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webdevwilson/terraform-provider-artifactory/4e94bc932c8cafc233c67984172f9b8f6f0f53c8/vendor/github.com/ulikunitz/xz/lzma/fox.lzma -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/make-docs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | pandoc -t html5 -f markdown -s --css=doc/md.css -o README.html README.md 5 | pandoc -t html5 -f markdown -s --css=doc/md.css -o TODO.html TODO.md 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 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 bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /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 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/README: -------------------------------------------------------------------------------- 1 | This is a work-in-progress HTTP/2 implementation for Go. 2 | 3 | It will eventually live in the Go standard library and won't require 4 | any changes to your code to use. It will just be automatic. 5 | 6 | Status: 7 | 8 | * The server support is pretty good. A few things are missing 9 | but are being worked on. 10 | * The client work has just started but shares a lot of code 11 | is coming along much quicker. 12 | 13 | Docs are at https://godoc.org/golang.org/x/net/http2 14 | 15 | Demo test server at https://http2.golang.org/ 16 | 17 | Help & bug reports welcome! 18 | 19 | Contributing: https://golang.org/doc/contribute.html 20 | Bugs: https://golang.org/issue/new?title=x/net/http2:+ 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go16.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 | // +build go1.6 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | "time" 12 | ) 13 | 14 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { 15 | return t1.ExpectContinueTimeout 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go19.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 | // +build go1.9 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | ) 12 | 13 | func configureServer19(s *http.Server, conf *Server) error { 14 | s.RegisterOnShutdown(conf.state.startGracefulShutdown) 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go16.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 | // +build !go1.6 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | "time" 12 | ) 13 | 14 | func configureTransport(t1 *http.Transport) (*Transport, error) { 15 | return nil, errTransportVersion 16 | } 17 | 18 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { 19 | return 0 20 | 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go18.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 | // +build !go1.8 6 | 7 | package http2 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | ) 13 | 14 | func configureServer18(h1 *http.Server, h2 *Server) error { 15 | // No IdleTimeout to sync prior to Go 1.8. 16 | return nil 17 | } 18 | 19 | func shouldLogPanic(panicValue interface{}) bool { 20 | return panicValue != nil 21 | } 22 | 23 | func reqGetBody(req *http.Request) func() (io.ReadCloser, error) { 24 | return nil 25 | } 26 | 27 | func reqBodyIsNoBody(io.ReadCloser) bool { return false } 28 | 29 | func go18httpNoBody() io.ReadCloser { return nil } // for tests only 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go19.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 | // +build !go1.9 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | ) 12 | 13 | func configureServer19(s *http.Server, conf *Server) error { 14 | // not supported prior to go1.9 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/trace/trace_go16.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 | // +build !go1.7 6 | 7 | package trace 8 | 9 | import "golang.org/x/net/context" 10 | 11 | // NewContext returns a copy of the parent context 12 | // and associates it with a Trace. 13 | func NewContext(ctx context.Context, tr Trace) context.Context { 14 | return context.WithValue(ctx, contextKey, tr) 15 | } 16 | 17 | // FromContext returns the Trace bound to the context, if any. 18 | func FromContext(ctx context.Context) (tr Trace, ok bool) { 19 | tr, ok = ctx.Value(contextKey).(Trace) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/trace/trace_go17.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 | // +build go1.7 6 | 7 | package trace 8 | 9 | import "context" 10 | 11 | // NewContext returns a copy of the parent context 12 | // and associates it with a Trace. 13 | func NewContext(ctx context.Context, tr Trace) context.Context { 14 | return context.WithValue(ctx, contextKey, tr) 15 | } 16 | 17 | // FromContext returns the Trace bound to the context, if any. 18 | func FromContext(ctx context.Context) (tr Trace, ok bool) { 19 | tr, ok = ctx.Value(contextKey).(Trace) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 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_darwin_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 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_darwin_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 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-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 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 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 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-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 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_freebsd_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 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_freebsd_arm.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 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_linux_386.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 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 ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 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 ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 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 ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 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 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 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 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 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 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.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 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 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 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 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_netbsd_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 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_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 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_openbsd_386.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 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_openbsd_amd64.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 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_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 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_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /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 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /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/dev_freebsd.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 FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.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 NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.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 OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /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 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /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 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.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 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/file_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 | package unix 6 | 7 | import ( 8 | "os" 9 | "syscall" 10 | ) 11 | 12 | // FIXME: unexported function from os 13 | // syscallMode returns the syscall-specific mode bits from Go's portable mode bits. 14 | func syscallMode(i os.FileMode) (o uint32) { 15 | o |= uint32(i.Perm()) 16 | if i&os.ModeSetuid != 0 { 17 | o |= syscall.S_ISUID 18 | } 19 | if i&os.ModeSetgid != 0 { 20 | o |= syscall.S_ISGID 21 | } 22 | if i&os.ModeSticky != 0 { 23 | o |= syscall.S_ISVTX 24 | } 25 | // No mapping for Go's ModeTemporary (plan9 only). 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.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 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 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 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /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 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /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 | // +build amd64,linux 6 | // +build !gccgo 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_netbsd_386.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 386,netbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = int64(nsec / 1e9) 13 | ts.Nsec = int32(nsec % 1e9) 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = int32(nsec % 1e9 / 1e3) 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint32(fd) 26 | k.Filter = uint32(mode) 27 | k.Flags = uint32(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_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 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = int64(nsec / 1e9) 13 | ts.Nsec = int64(nsec % 1e9) 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = int32(nsec % 1e9 / 1e3) 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint64(fd) 26 | k.Filter = uint32(mode) 27 | k.Flags = uint32(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint64(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 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 arm,netbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = int64(nsec / 1e9) 13 | ts.Nsec = int32(nsec % 1e9) 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = int32(nsec % 1e9 / 1e3) 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint32(fd) 26 | k.Filter = uint32(mode) 27 | k.Flags = uint32(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 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 dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.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 386,openbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = int64(nsec / 1e9) 13 | ts.Nsec = int32(nsec % 1e9) 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = int32(nsec % 1e9 / 1e3) 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint32(fd) 26 | k.Filter = int16(mode) 27 | k.Flags = uint16(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = nsec % 1e9 / 1e3 20 | tv.Sec = nsec / 1e9 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint64(fd) 26 | k.Filter = int16(mode) 27 | k.Flags = uint16(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint64(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.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 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = int64(nsec / 1e9) 13 | ts.Nsec = int32(nsec % 1e9) 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = int32(nsec % 1e9 / 1e3) 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 25 | k.Ident = uint32(fd) 26 | k.Filter = int16(mode) 27 | k.Flags = uint16(flags) 28 | } 29 | 30 | func (iov *Iovec) SetLen(length int) { 31 | iov.Len = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetControllen(length int) { 35 | msghdr.Controllen = uint32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | -------------------------------------------------------------------------------- /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 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = nsec % 1e9 / 1e3 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (cmsg *Cmsghdr) SetLen(length int) { 29 | cmsg.Len = uint32(length) 30 | } 31 | 32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 33 | // TODO(aram): implement this, see issue 5847. 34 | panic("unimplemented") 35 | } 36 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.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 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/Makefile: -------------------------------------------------------------------------------- 1 | all: test testrace 2 | 3 | deps: 4 | go get -d -v google.golang.org/grpc/... 5 | 6 | updatedeps: 7 | go get -d -v -u -f google.golang.org/grpc/... 8 | 9 | testdeps: 10 | go get -d -v -t google.golang.org/grpc/... 11 | 12 | updatetestdeps: 13 | go get -d -v -t -u -f google.golang.org/grpc/... 14 | 15 | build: deps 16 | go build google.golang.org/grpc/... 17 | 18 | proto: 19 | @ if ! which protoc > /dev/null; then \ 20 | echo "error: protoc not installed" >&2; \ 21 | exit 1; \ 22 | fi 23 | go generate google.golang.org/grpc/... 24 | 25 | test: testdeps 26 | go test -v -cpu 1,4 google.golang.org/grpc/... 27 | 28 | testrace: testdeps 29 | go test -v -race -cpu 1,4 google.golang.org/grpc/... 30 | 31 | clean: 32 | go clean -i google.golang.org/grpc/... 33 | 34 | .PHONY: \ 35 | all \ 36 | deps \ 37 | updatedeps \ 38 | testdeps \ 39 | updatetestdeps \ 40 | build \ 41 | proto \ 42 | test \ 43 | testrace \ 44 | clean \ 45 | coverage 46 | -------------------------------------------------------------------------------- /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/codes/code_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Code"; DO NOT EDIT. 2 | 3 | package codes 4 | 5 | import "fmt" 6 | 7 | const _Code_name = "OKCanceledUnknownInvalidArgumentDeadlineExceededNotFoundAlreadyExistsPermissionDeniedResourceExhaustedFailedPreconditionAbortedOutOfRangeUnimplementedInternalUnavailableDataLossUnauthenticated" 8 | 9 | var _Code_index = [...]uint8{0, 2, 10, 17, 32, 48, 56, 69, 85, 102, 120, 127, 137, 150, 158, 169, 177, 192} 10 | 11 | func (i Code) String() string { 12 | if i >= Code(len(_Code_index)-1) { 13 | return fmt.Sprintf("Code(%d)", i) 14 | } 15 | return _Code_name[_Code_index[i]:_Code_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /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 | /* 20 | Package grpc implements an RPC system called gRPC. 21 | 22 | See grpc.io for more information about gRPC. 23 | */ 24 | package grpc // import "google.golang.org/grpc" 25 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/health/grpc_health_v1/health.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.health.v1; 18 | 19 | message HealthCheckRequest { 20 | string service = 1; 21 | } 22 | 23 | message HealthCheckResponse { 24 | enum ServingStatus { 25 | UNKNOWN = 0; 26 | SERVING = 1; 27 | NOT_SERVING = 2; 28 | } 29 | ServingStatus status = 1; 30 | } 31 | 32 | service Health{ 33 | rpc Check(HealthCheckRequest) returns (HealthCheckResponse); 34 | } 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.6, !go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import ( 24 | "net" 25 | 26 | "golang.org/x/net/context" 27 | ) 28 | 29 | var ( 30 | lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) } 31 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 32 | return net.LookupSRV(service, proto, name) 33 | } 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import "net" 24 | 25 | var ( 26 | lookupHost = net.DefaultResolver.LookupHost 27 | lookupSRV = net.DefaultResolver.LookupSRV 28 | ) 29 | -------------------------------------------------------------------------------- /website/docs/r/artifactory_group.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: "artifactory" 3 | page_title: "Artifactory: artifactory_group" 4 | sidebar_current: "docs-artifactory-group" 5 | description: |- 6 | Provides support for creating groups in Artifactory 7 | --- 8 | 9 | # artifactory\_group 10 | 11 | Provides support for creating groups in Artifactory. 12 | 13 | **This resource requires Artifactory Pro v2.4.0 or later**. 14 | 15 | ## Example Usage 16 | 17 | ``` 18 | resource "artifact_group" "developers" { 19 | name = "developers" 20 | auto_join = true 21 | } 22 | ``` 23 | 24 | ## Argument Reference 25 | 26 | The following arguments are supported: 27 | 28 | * `name` - (Required) The name of the group. 29 | * `auto_join` - (Optional) Should new user's be automatically added to this group? Default `false`. 30 | * `realm` - (Optional) The name of the realm associated with this group (e.g. ARTIFACTORY, CROWD). 31 | * `realm_attributes` - (Optional) Realm attributes for use by LDAP. --------------------------------------------------------------------------------