├── .gitignore ├── .travis.yml ├── Dockerfile ├── Dockerfile.test ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── Makefile ├── README.md ├── VERSION ├── hack ├── .integration-daemon-start ├── .integration-daemon-stop ├── .onion-start ├── .onion-stop ├── main.bats └── test.sh ├── main.go ├── tor ├── bridge.go ├── driver.go ├── errors.go ├── portmapping.go ├── setup_ip_forwarding.go ├── setup_ip_forwarding_test.go ├── setup_ip_tables.go └── utils.go ├── vendor ├── github.com │ ├── Microsoft │ │ └── go-winio │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backup.go │ │ │ ├── backup_test.go │ │ │ ├── ea.go │ │ │ ├── ea_test.go │ │ │ ├── file.go │ │ │ ├── fileinfo.go │ │ │ ├── pipe.go │ │ │ ├── pipe_test.go │ │ │ ├── privilege.go │ │ │ ├── privileges_test.go │ │ │ ├── reparse.go │ │ │ ├── sd.go │ │ │ ├── sd_test.go │ │ │ ├── syscall.go │ │ │ └── zsyscall_windows.go │ ├── containerd │ │ └── continuity │ │ │ ├── .gitignore │ │ │ ├── .mailmap │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── context.go │ │ │ ├── digests.go │ │ │ ├── digests_test.go │ │ │ ├── groups_unix.go │ │ │ ├── hardlinks.go │ │ │ ├── hardlinks_unix.go │ │ │ ├── hardlinks_windows.go │ │ │ ├── ioutils.go │ │ │ ├── manifest.go │ │ │ ├── manifest_test.go │ │ │ ├── manifest_test_darwin.go │ │ │ ├── pathdriver │ │ │ └── path_driver.go │ │ │ ├── resource.go │ │ │ ├── resource_test.go │ │ │ ├── resource_unix.go │ │ │ ├── resource_windows.go │ │ │ ├── testutil_test.go │ │ │ └── vendor.conf │ ├── coreos │ │ └── go-systemd │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── DCO │ │ │ ├── Jenkinsfile │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── activation │ │ │ ├── files.go │ │ │ ├── files_test.go │ │ │ ├── listeners.go │ │ │ ├── listeners_test.go │ │ │ ├── packetconns.go │ │ │ └── packetconns_test.go │ │ │ └── test │ ├── docker │ │ ├── distribution │ │ │ ├── .gitignore │ │ │ ├── .mailmap │ │ │ ├── AUTHORS │ │ │ ├── BUILDING.md │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Dockerfile │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── RELEASE-CHECKLIST.md │ │ │ ├── ROADMAP.md │ │ │ ├── blobs.go │ │ │ ├── circle.yml │ │ │ ├── coverpkg.sh │ │ │ ├── digestset │ │ │ │ ├── set.go │ │ │ │ └── set_test.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── manifests.go │ │ │ ├── reference │ │ │ │ ├── helpers.go │ │ │ │ ├── normalize.go │ │ │ │ ├── normalize_test.go │ │ │ │ ├── reference.go │ │ │ │ ├── reference_test.go │ │ │ │ ├── regexp.go │ │ │ │ └── regexp_test.go │ │ │ ├── registry.go │ │ │ ├── tags.go │ │ │ └── vendor.conf │ │ ├── docker │ │ │ ├── .DEREK.yml │ │ │ ├── .dockerignore │ │ │ ├── .gitignore │ │ │ ├── .mailmap │ │ │ ├── AUTHORS │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.aarch64 │ │ │ ├── Dockerfile.armhf │ │ │ ├── Dockerfile.e2e │ │ │ ├── Dockerfile.ppc64le │ │ │ ├── Dockerfile.s390x │ │ │ ├── Dockerfile.simple │ │ │ ├── Dockerfile.windows │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── ROADMAP.md │ │ │ ├── TESTING.md │ │ │ ├── VENDORING.md │ │ │ ├── api │ │ │ │ ├── README.md │ │ │ │ ├── common.go │ │ │ │ ├── common_unix.go │ │ │ │ ├── common_windows.go │ │ │ │ ├── swagger-gen.yaml │ │ │ │ ├── swagger.yaml │ │ │ │ └── types │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── blkiodev │ │ │ │ │ └── blkio.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── configs.go │ │ │ │ │ ├── container │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container_changes.go │ │ │ │ │ ├── container_create.go │ │ │ │ │ ├── container_top.go │ │ │ │ │ ├── container_update.go │ │ │ │ │ ├── container_wait.go │ │ │ │ │ ├── host_config.go │ │ │ │ │ ├── hostconfig_unix.go │ │ │ │ │ ├── hostconfig_windows.go │ │ │ │ │ └── waitcondition.go │ │ │ │ │ ├── error_response.go │ │ │ │ │ ├── events │ │ │ │ │ └── events.go │ │ │ │ │ ├── filters │ │ │ │ │ ├── example_test.go │ │ │ │ │ ├── parse.go │ │ │ │ │ └── parse_test.go │ │ │ │ │ ├── graph_driver_data.go │ │ │ │ │ ├── id_response.go │ │ │ │ │ ├── image │ │ │ │ │ └── image_history.go │ │ │ │ │ ├── image_delete_response_item.go │ │ │ │ │ ├── image_summary.go │ │ │ │ │ ├── mount │ │ │ │ │ └── mount.go │ │ │ │ │ ├── network │ │ │ │ │ └── network.go │ │ │ │ │ ├── plugin.go │ │ │ │ │ ├── plugin_device.go │ │ │ │ │ ├── plugin_env.go │ │ │ │ │ ├── plugin_interface_type.go │ │ │ │ │ ├── plugin_mount.go │ │ │ │ │ ├── plugin_responses.go │ │ │ │ │ ├── port.go │ │ │ │ │ ├── registry │ │ │ │ │ ├── authenticate.go │ │ │ │ │ └── registry.go │ │ │ │ │ ├── seccomp.go │ │ │ │ │ ├── service_update_response.go │ │ │ │ │ ├── stats.go │ │ │ │ │ ├── strslice │ │ │ │ │ ├── strslice.go │ │ │ │ │ └── strslice_test.go │ │ │ │ │ ├── swarm │ │ │ │ │ ├── common.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container.go │ │ │ │ │ ├── network.go │ │ │ │ │ ├── node.go │ │ │ │ │ ├── runtime.go │ │ │ │ │ ├── runtime │ │ │ │ │ │ ├── gen.go │ │ │ │ │ │ ├── plugin.pb.go │ │ │ │ │ │ └── plugin.proto │ │ │ │ │ ├── secret.go │ │ │ │ │ ├── service.go │ │ │ │ │ ├── swarm.go │ │ │ │ │ └── task.go │ │ │ │ │ ├── time │ │ │ │ │ ├── duration_convert.go │ │ │ │ │ ├── duration_convert_test.go │ │ │ │ │ ├── timestamp.go │ │ │ │ │ └── timestamp_test.go │ │ │ │ │ ├── types.go │ │ │ │ │ ├── versions │ │ │ │ │ ├── README.md │ │ │ │ │ ├── compare.go │ │ │ │ │ └── compare_test.go │ │ │ │ │ ├── volume.go │ │ │ │ │ └── volume │ │ │ │ │ ├── volumes_create.go │ │ │ │ │ └── volumes_list.go │ │ │ ├── cli │ │ │ │ ├── cobra.go │ │ │ │ ├── error.go │ │ │ │ └── required.go │ │ │ ├── client │ │ │ │ ├── README.md │ │ │ │ ├── build_prune.go │ │ │ │ ├── checkpoint_create.go │ │ │ │ ├── checkpoint_create_test.go │ │ │ │ ├── checkpoint_delete.go │ │ │ │ ├── checkpoint_delete_test.go │ │ │ │ ├── checkpoint_list.go │ │ │ │ ├── checkpoint_list_test.go │ │ │ │ ├── client.go │ │ │ │ ├── client_mock_test.go │ │ │ │ ├── client_test.go │ │ │ │ ├── client_unix.go │ │ │ │ ├── client_windows.go │ │ │ │ ├── config_create.go │ │ │ │ ├── config_create_test.go │ │ │ │ ├── config_inspect.go │ │ │ │ ├── config_inspect_test.go │ │ │ │ ├── config_list.go │ │ │ │ ├── config_list_test.go │ │ │ │ ├── config_remove.go │ │ │ │ ├── config_remove_test.go │ │ │ │ ├── config_update.go │ │ │ │ ├── config_update_test.go │ │ │ │ ├── container_attach.go │ │ │ │ ├── container_commit.go │ │ │ │ ├── container_commit_test.go │ │ │ │ ├── container_copy.go │ │ │ │ ├── container_copy_test.go │ │ │ │ ├── container_create.go │ │ │ │ ├── container_create_test.go │ │ │ │ ├── container_diff.go │ │ │ │ ├── container_diff_test.go │ │ │ │ ├── container_exec.go │ │ │ │ ├── container_exec_test.go │ │ │ │ ├── container_export.go │ │ │ │ ├── container_export_test.go │ │ │ │ ├── container_inspect.go │ │ │ │ ├── container_inspect_test.go │ │ │ │ ├── container_kill.go │ │ │ │ ├── container_kill_test.go │ │ │ │ ├── container_list.go │ │ │ │ ├── container_list_test.go │ │ │ │ ├── container_logs.go │ │ │ │ ├── container_logs_test.go │ │ │ │ ├── container_pause.go │ │ │ │ ├── container_pause_test.go │ │ │ │ ├── container_prune.go │ │ │ │ ├── container_prune_test.go │ │ │ │ ├── container_remove.go │ │ │ │ ├── container_remove_test.go │ │ │ │ ├── container_rename.go │ │ │ │ ├── container_rename_test.go │ │ │ │ ├── container_resize.go │ │ │ │ ├── container_resize_test.go │ │ │ │ ├── container_restart.go │ │ │ │ ├── container_restart_test.go │ │ │ │ ├── container_start.go │ │ │ │ ├── container_start_test.go │ │ │ │ ├── container_stats.go │ │ │ │ ├── container_stats_test.go │ │ │ │ ├── container_stop.go │ │ │ │ ├── container_stop_test.go │ │ │ │ ├── container_top.go │ │ │ │ ├── container_top_test.go │ │ │ │ ├── container_unpause.go │ │ │ │ ├── container_unpause_test.go │ │ │ │ ├── container_update.go │ │ │ │ ├── container_update_test.go │ │ │ │ ├── container_wait.go │ │ │ │ ├── container_wait_test.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── disk_usage_test.go │ │ │ │ ├── distribution_inspect.go │ │ │ │ ├── distribution_inspect_test.go │ │ │ │ ├── errors.go │ │ │ │ ├── events.go │ │ │ │ ├── events_test.go │ │ │ │ ├── hijack.go │ │ │ │ ├── image_build.go │ │ │ │ ├── image_build_test.go │ │ │ │ ├── image_create.go │ │ │ │ ├── image_create_test.go │ │ │ │ ├── image_history.go │ │ │ │ ├── image_history_test.go │ │ │ │ ├── image_import.go │ │ │ │ ├── image_import_test.go │ │ │ │ ├── image_inspect.go │ │ │ │ ├── image_inspect_test.go │ │ │ │ ├── image_list.go │ │ │ │ ├── image_list_test.go │ │ │ │ ├── image_load.go │ │ │ │ ├── image_load_test.go │ │ │ │ ├── image_prune.go │ │ │ │ ├── image_prune_test.go │ │ │ │ ├── image_pull.go │ │ │ │ ├── image_pull_test.go │ │ │ │ ├── image_push.go │ │ │ │ ├── image_push_test.go │ │ │ │ ├── image_remove.go │ │ │ │ ├── image_remove_test.go │ │ │ │ ├── image_save.go │ │ │ │ ├── image_save_test.go │ │ │ │ ├── image_search.go │ │ │ │ ├── image_search_test.go │ │ │ │ ├── image_tag.go │ │ │ │ ├── image_tag_test.go │ │ │ │ ├── info.go │ │ │ │ ├── info_test.go │ │ │ │ ├── interface.go │ │ │ │ ├── interface_experimental.go │ │ │ │ ├── interface_stable.go │ │ │ │ ├── login.go │ │ │ │ ├── network_connect.go │ │ │ │ ├── network_connect_test.go │ │ │ │ ├── network_create.go │ │ │ │ ├── network_create_test.go │ │ │ │ ├── network_disconnect.go │ │ │ │ ├── network_disconnect_test.go │ │ │ │ ├── network_inspect.go │ │ │ │ ├── network_inspect_test.go │ │ │ │ ├── network_list.go │ │ │ │ ├── network_list_test.go │ │ │ │ ├── network_prune.go │ │ │ │ ├── network_prune_test.go │ │ │ │ ├── network_remove.go │ │ │ │ ├── network_remove_test.go │ │ │ │ ├── node_inspect.go │ │ │ │ ├── node_inspect_test.go │ │ │ │ ├── node_list.go │ │ │ │ ├── node_list_test.go │ │ │ │ ├── node_remove.go │ │ │ │ ├── node_remove_test.go │ │ │ │ ├── node_update.go │ │ │ │ ├── node_update_test.go │ │ │ │ ├── ping.go │ │ │ │ ├── ping_test.go │ │ │ │ ├── plugin_create.go │ │ │ │ ├── plugin_disable.go │ │ │ │ ├── plugin_disable_test.go │ │ │ │ ├── plugin_enable.go │ │ │ │ ├── plugin_enable_test.go │ │ │ │ ├── plugin_inspect.go │ │ │ │ ├── plugin_inspect_test.go │ │ │ │ ├── plugin_install.go │ │ │ │ ├── plugin_list.go │ │ │ │ ├── plugin_list_test.go │ │ │ │ ├── plugin_push.go │ │ │ │ ├── plugin_push_test.go │ │ │ │ ├── plugin_remove.go │ │ │ │ ├── plugin_remove_test.go │ │ │ │ ├── plugin_set.go │ │ │ │ ├── plugin_set_test.go │ │ │ │ ├── plugin_upgrade.go │ │ │ │ ├── request.go │ │ │ │ ├── request_test.go │ │ │ │ ├── secret_create.go │ │ │ │ ├── secret_create_test.go │ │ │ │ ├── secret_inspect.go │ │ │ │ ├── secret_inspect_test.go │ │ │ │ ├── secret_list.go │ │ │ │ ├── secret_list_test.go │ │ │ │ ├── secret_remove.go │ │ │ │ ├── secret_remove_test.go │ │ │ │ ├── secret_update.go │ │ │ │ ├── secret_update_test.go │ │ │ │ ├── service_create.go │ │ │ │ ├── service_create_test.go │ │ │ │ ├── service_inspect.go │ │ │ │ ├── service_inspect_test.go │ │ │ │ ├── service_list.go │ │ │ │ ├── service_list_test.go │ │ │ │ ├── service_logs.go │ │ │ │ ├── service_logs_test.go │ │ │ │ ├── service_remove.go │ │ │ │ ├── service_remove_test.go │ │ │ │ ├── service_update.go │ │ │ │ ├── service_update_test.go │ │ │ │ ├── session.go │ │ │ │ ├── swarm_get_unlock_key.go │ │ │ │ ├── swarm_get_unlock_key_test.go │ │ │ │ ├── swarm_init.go │ │ │ │ ├── swarm_init_test.go │ │ │ │ ├── swarm_inspect.go │ │ │ │ ├── swarm_inspect_test.go │ │ │ │ ├── swarm_join.go │ │ │ │ ├── swarm_join_test.go │ │ │ │ ├── swarm_leave.go │ │ │ │ ├── swarm_leave_test.go │ │ │ │ ├── swarm_unlock.go │ │ │ │ ├── swarm_unlock_test.go │ │ │ │ ├── swarm_update.go │ │ │ │ ├── swarm_update_test.go │ │ │ │ ├── task_inspect.go │ │ │ │ ├── task_inspect_test.go │ │ │ │ ├── task_list.go │ │ │ │ ├── task_list_test.go │ │ │ │ ├── task_logs.go │ │ │ │ ├── tlsconfig_clone.go │ │ │ │ ├── tlsconfig_clone_go17.go │ │ │ │ ├── transport.go │ │ │ │ ├── utils.go │ │ │ │ ├── version.go │ │ │ │ ├── volume_create.go │ │ │ │ ├── volume_create_test.go │ │ │ │ ├── volume_inspect.go │ │ │ │ ├── volume_inspect_test.go │ │ │ │ ├── volume_list.go │ │ │ │ ├── volume_list_test.go │ │ │ │ ├── volume_prune.go │ │ │ │ ├── volume_remove.go │ │ │ │ └── volume_remove_test.go │ │ │ ├── pkg │ │ │ │ ├── README.md │ │ │ │ ├── ioutils │ │ │ │ │ ├── buffer.go │ │ │ │ │ ├── buffer_test.go │ │ │ │ │ ├── bytespipe.go │ │ │ │ │ ├── bytespipe_test.go │ │ │ │ │ ├── fswriters.go │ │ │ │ │ ├── fswriters_test.go │ │ │ │ │ ├── readers.go │ │ │ │ │ ├── readers_test.go │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ ├── temp_windows.go │ │ │ │ │ ├── writeflusher.go │ │ │ │ │ ├── writers.go │ │ │ │ │ └── writers_test.go │ │ │ │ ├── longpath │ │ │ │ │ ├── longpath.go │ │ │ │ │ └── longpath_test.go │ │ │ │ ├── mount │ │ │ │ │ ├── flags.go │ │ │ │ │ ├── flags_freebsd.go │ │ │ │ │ ├── flags_linux.go │ │ │ │ │ ├── flags_unsupported.go │ │ │ │ │ ├── mount.go │ │ │ │ │ ├── mount_unix_test.go │ │ │ │ │ ├── mounter_freebsd.go │ │ │ │ │ ├── mounter_linux.go │ │ │ │ │ ├── mounter_linux_test.go │ │ │ │ │ ├── mounter_unsupported.go │ │ │ │ │ ├── mountinfo.go │ │ │ │ │ ├── mountinfo_freebsd.go │ │ │ │ │ ├── mountinfo_linux.go │ │ │ │ │ ├── mountinfo_linux_test.go │ │ │ │ │ ├── mountinfo_unsupported.go │ │ │ │ │ ├── mountinfo_windows.go │ │ │ │ │ ├── sharedsubtree_linux.go │ │ │ │ │ └── sharedsubtree_linux_test.go │ │ │ │ ├── pidfile │ │ │ │ │ ├── pidfile.go │ │ │ │ │ ├── pidfile_darwin.go │ │ │ │ │ ├── pidfile_test.go │ │ │ │ │ ├── pidfile_unix.go │ │ │ │ │ └── pidfile_windows.go │ │ │ │ ├── plugingetter │ │ │ │ │ └── getter.go │ │ │ │ ├── plugins │ │ │ │ │ ├── client.go │ │ │ │ │ ├── client_test.go │ │ │ │ │ ├── discovery.go │ │ │ │ │ ├── discovery_test.go │ │ │ │ │ ├── discovery_unix.go │ │ │ │ │ ├── discovery_unix_test.go │ │ │ │ │ ├── discovery_windows.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── plugin_test.go │ │ │ │ │ ├── plugins.go │ │ │ │ │ ├── plugins_unix.go │ │ │ │ │ ├── plugins_windows.go │ │ │ │ │ └── transport │ │ │ │ │ │ ├── http.go │ │ │ │ │ │ ├── http_test.go │ │ │ │ │ │ └── transport.go │ │ │ │ ├── reexec │ │ │ │ │ ├── README.md │ │ │ │ │ ├── command_linux.go │ │ │ │ │ ├── command_unix.go │ │ │ │ │ ├── command_unsupported.go │ │ │ │ │ ├── command_windows.go │ │ │ │ │ ├── reexec.go │ │ │ │ │ └── reexec_test.go │ │ │ │ └── system │ │ │ │ │ ├── chtimes.go │ │ │ │ │ ├── chtimes_test.go │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ ├── chtimes_unix_test.go │ │ │ │ │ ├── chtimes_windows.go │ │ │ │ │ ├── chtimes_windows_test.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── exitcode.go │ │ │ │ │ ├── filesys.go │ │ │ │ │ ├── filesys_windows.go │ │ │ │ │ ├── init.go │ │ │ │ │ ├── init_unix.go │ │ │ │ │ ├── init_windows.go │ │ │ │ │ ├── lcow.go │ │ │ │ │ ├── lcow_unix.go │ │ │ │ │ ├── lcow_windows.go │ │ │ │ │ ├── lstat_unix.go │ │ │ │ │ ├── lstat_unix_test.go │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ ├── meminfo.go │ │ │ │ │ ├── meminfo_linux.go │ │ │ │ │ ├── meminfo_unix_test.go │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ ├── meminfo_windows.go │ │ │ │ │ ├── mknod.go │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ ├── path.go │ │ │ │ │ ├── path_windows_test.go │ │ │ │ │ ├── process_unix.go │ │ │ │ │ ├── process_windows.go │ │ │ │ │ ├── rm.go │ │ │ │ │ ├── rm_test.go │ │ │ │ │ ├── stat_darwin.go │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ ├── stat_linux.go │ │ │ │ │ ├── stat_openbsd.go │ │ │ │ │ ├── stat_solaris.go │ │ │ │ │ ├── stat_unix.go │ │ │ │ │ ├── stat_unix_test.go │ │ │ │ │ ├── stat_windows.go │ │ │ │ │ ├── syscall_unix.go │ │ │ │ │ ├── syscall_windows.go │ │ │ │ │ ├── syscall_windows_test.go │ │ │ │ │ ├── umask.go │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ ├── utimes_linux.go │ │ │ │ │ ├── utimes_unix_test.go │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ ├── xattrs_linux.go │ │ │ │ │ └── xattrs_unsupported.go │ │ │ ├── poule.yml │ │ │ └── vendor.conf │ │ ├── go-connections │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── circle.yml │ │ │ ├── doc.go │ │ │ ├── nat │ │ │ │ ├── nat.go │ │ │ │ ├── nat_test.go │ │ │ │ ├── parse.go │ │ │ │ ├── parse_test.go │ │ │ │ ├── sort.go │ │ │ │ └── sort_test.go │ │ │ ├── sockets │ │ │ │ ├── README.md │ │ │ │ ├── inmem_socket.go │ │ │ │ ├── inmem_socket_test.go │ │ │ │ ├── proxy.go │ │ │ │ ├── sockets.go │ │ │ │ ├── sockets_unix.go │ │ │ │ ├── sockets_windows.go │ │ │ │ ├── tcp_socket.go │ │ │ │ └── unix_socket.go │ │ │ └── tlsconfig │ │ │ │ ├── certpool_go17.go │ │ │ │ ├── certpool_other.go │ │ │ │ ├── config.go │ │ │ │ ├── config_client_ciphers.go │ │ │ │ ├── config_legacy_client_ciphers.go │ │ │ │ └── config_test.go │ │ ├── go-plugins-helpers │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── network │ │ │ │ ├── README.md │ │ │ │ ├── api.go │ │ │ │ └── api_test.go │ │ │ └── sdk │ │ │ │ ├── encoder.go │ │ │ │ ├── handler.go │ │ │ │ ├── pool.go │ │ │ │ ├── sdk_test.go │ │ │ │ ├── spec_file_generator.go │ │ │ │ ├── tcp_listener.go │ │ │ │ ├── unix_listener.go │ │ │ │ ├── unix_listener_nosystemd.go │ │ │ │ ├── unix_listener_systemd.go │ │ │ │ ├── unix_listener_unsupported.go │ │ │ │ ├── windows_listener.go │ │ │ │ ├── windows_listener_unsupported.go │ │ │ │ └── windows_pipe_config.go │ │ ├── go-units │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── circle.yml │ │ │ ├── duration.go │ │ │ ├── duration_test.go │ │ │ ├── size.go │ │ │ ├── size_test.go │ │ │ ├── ulimit.go │ │ │ └── ulimit_test.go │ │ └── libnetwork │ │ │ ├── .dockerignore │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── Dockerfile.build │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── ROADMAP.md │ │ │ ├── Vagrantfile │ │ │ ├── agent.go │ │ │ ├── agent.pb.go │ │ │ ├── agent.proto │ │ │ ├── circle.yml │ │ │ ├── controller.go │ │ │ ├── default_gateway.go │ │ │ ├── default_gateway_freebsd.go │ │ │ ├── default_gateway_linux.go │ │ │ ├── default_gateway_windows.go │ │ │ ├── discoverapi │ │ │ └── discoverapi.go │ │ │ ├── driverapi │ │ │ ├── driverapi.go │ │ │ ├── driverapi_test.go │ │ │ ├── errors.go │ │ │ └── ipamdata.go │ │ │ ├── drivers_experimental_linux.go │ │ │ ├── drivers_freebsd.go │ │ │ ├── drivers_ipam.go │ │ │ ├── drivers_linux.go │ │ │ ├── drivers_windows.go │ │ │ ├── endpoint.go │ │ │ ├── endpoint_cnt.go │ │ │ ├── endpoint_info.go │ │ │ ├── endpoint_info_unix.go │ │ │ ├── endpoint_info_windows.go │ │ │ ├── error.go │ │ │ ├── errors_test.go │ │ │ ├── firewall_linux.go │ │ │ ├── firewall_others.go │ │ │ ├── ipam │ │ │ ├── allocator.go │ │ │ ├── allocator_test.go │ │ │ ├── store.go │ │ │ ├── structures.go │ │ │ └── utils.go │ │ │ ├── ipamutils │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ │ ├── iptables │ │ │ ├── conntrack.go │ │ │ ├── firewalld.go │ │ │ ├── firewalld_test.go │ │ │ ├── iptables.go │ │ │ └── iptables_test.go │ │ │ ├── libnetwork_internal_test.go │ │ │ ├── libnetwork_linux_test.go │ │ │ ├── libnetwork_test.go │ │ │ ├── machines │ │ │ ├── netlabel │ │ │ ├── labels.go │ │ │ └── labels_test.go │ │ │ ├── netutils │ │ │ ├── utils.go │ │ │ ├── utils_freebsd.go │ │ │ ├── utils_linux.go │ │ │ ├── utils_test.go │ │ │ └── utils_windows.go │ │ │ ├── network.go │ │ │ ├── network_unix.go │ │ │ ├── network_windows.go │ │ │ ├── ns │ │ │ └── init_linux.go │ │ │ ├── osl │ │ │ ├── interface_freebsd.go │ │ │ ├── interface_linux.go │ │ │ ├── interface_windows.go │ │ │ ├── namespace_linux.go │ │ │ ├── namespace_unsupported.go │ │ │ ├── namespace_windows.go │ │ │ ├── neigh_freebsd.go │ │ │ ├── neigh_linux.go │ │ │ ├── neigh_windows.go │ │ │ ├── options_linux.go │ │ │ ├── route_linux.go │ │ │ ├── sandbox.go │ │ │ ├── sandbox_freebsd.go │ │ │ ├── sandbox_linux_test.go │ │ │ ├── sandbox_test.go │ │ │ ├── sandbox_unsupported.go │ │ │ └── sandbox_unsupported_test.go │ │ │ ├── portallocator │ │ │ ├── portallocator.go │ │ │ ├── portallocator_freebsd.go │ │ │ ├── portallocator_linux.go │ │ │ └── portallocator_test.go │ │ │ ├── portmapper │ │ │ ├── mapper.go │ │ │ ├── mapper_test.go │ │ │ ├── mock_proxy.go │ │ │ ├── proxy.go │ │ │ └── proxy_linux.go │ │ │ ├── resolvconf │ │ │ ├── README.md │ │ │ ├── dns │ │ │ │ └── resolvconf.go │ │ │ ├── resolvconf.go │ │ │ └── resolvconf_test.go │ │ │ ├── resolver.go │ │ │ ├── resolver_unix.go │ │ │ ├── resolver_windows.go │ │ │ ├── sandbox.go │ │ │ ├── sandbox_dns_unix.go │ │ │ ├── sandbox_dns_windows.go │ │ │ ├── sandbox_externalkey.go │ │ │ ├── sandbox_externalkey_unix.go │ │ │ ├── sandbox_externalkey_windows.go │ │ │ ├── sandbox_store.go │ │ │ ├── sandbox_test.go │ │ │ ├── service.go │ │ │ ├── service_common.go │ │ │ ├── service_common_test.go │ │ │ ├── service_linux.go │ │ │ ├── service_unsupported.go │ │ │ ├── service_windows.go │ │ │ ├── store.go │ │ │ ├── store_linux_test.go │ │ │ ├── store_test.go │ │ │ ├── support.sh │ │ │ ├── types │ │ │ ├── types.go │ │ │ └── types_test.go │ │ │ ├── vendor.conf │ │ │ └── wrapmake.sh │ ├── godbus │ │ └── dbus │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.markdown │ │ │ ├── auth.go │ │ │ ├── auth_external.go │ │ │ ├── auth_sha1.go │ │ │ ├── call.go │ │ │ ├── conn.go │ │ │ ├── conn_darwin.go │ │ │ ├── conn_other.go │ │ │ ├── conn_test.go │ │ │ ├── dbus.go │ │ │ ├── decoder.go │ │ │ ├── default_handler.go │ │ │ ├── doc.go │ │ │ ├── encoder.go │ │ │ ├── encoder_test.go │ │ │ ├── examples_test.go │ │ │ ├── export.go │ │ │ ├── export_test.go │ │ │ ├── homedir.go │ │ │ ├── homedir_dynamic.go │ │ │ ├── homedir_static.go │ │ │ ├── message.go │ │ │ ├── object.go │ │ │ ├── proto_test.go │ │ │ ├── server_interfaces.go │ │ │ ├── server_interfaces_test.go │ │ │ ├── sig.go │ │ │ ├── sig_test.go │ │ │ ├── store_test.go │ │ │ ├── transport_darwin.go │ │ │ ├── transport_generic.go │ │ │ ├── transport_tcp.go │ │ │ ├── transport_tcp_test.go │ │ │ ├── transport_unix.go │ │ │ ├── transport_unix_test.go │ │ │ ├── transport_unixcred_dragonfly.go │ │ │ ├── transport_unixcred_freebsd.go │ │ │ ├── transport_unixcred_linux.go │ │ │ ├── transport_unixcred_openbsd.go │ │ │ ├── variant.go │ │ │ ├── variant_lexer.go │ │ │ ├── variant_parser.go │ │ │ └── variant_test.go │ ├── gogo │ │ └── protobuf │ │ │ ├── .gitignore │ │ │ ├── .mailmap │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── GOLANG_CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── Readme.md │ │ │ ├── bench.md │ │ │ ├── custom_types.md │ │ │ ├── extensions.md │ │ │ ├── install-protobuf.sh │ │ │ └── proto │ │ │ ├── Makefile │ │ │ ├── all_test.go │ │ │ ├── any_test.go │ │ │ ├── clone.go │ │ │ ├── clone_test.go │ │ │ ├── decode.go │ │ │ ├── decode_gogo.go │ │ │ ├── decode_test.go │ │ │ ├── duration.go │ │ │ ├── duration_gogo.go │ │ │ ├── encode.go │ │ │ ├── encode_gogo.go │ │ │ ├── encode_test.go │ │ │ ├── equal.go │ │ │ ├── equal_test.go │ │ │ ├── extensions.go │ │ │ ├── extensions_gogo.go │ │ │ ├── extensions_test.go │ │ │ ├── lib.go │ │ │ ├── lib_gogo.go │ │ │ ├── map_test.go │ │ │ ├── message_set.go │ │ │ ├── message_set_test.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_reflect_gogo.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── pointer_unsafe_gogo.go │ │ │ ├── properties.go │ │ │ ├── properties_gogo.go │ │ │ ├── proto3_test.go │ │ │ ├── size2_test.go │ │ │ ├── size_test.go │ │ │ ├── skip_gogo.go │ │ │ ├── text.go │ │ │ ├── text_gogo.go │ │ │ ├── text_parser.go │ │ │ ├── text_parser_test.go │ │ │ ├── text_test.go │ │ │ ├── timestamp.go │ │ │ └── timestamp_gogo.go │ ├── opencontainers │ │ ├── go-digest │ │ │ ├── .mailmap │ │ │ ├── .pullapprove.yml │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.code │ │ │ ├── LICENSE.docs │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── algorithm.go │ │ │ ├── algorithm_test.go │ │ │ ├── digest.go │ │ │ ├── digest_test.go │ │ │ ├── digester.go │ │ │ ├── doc.go │ │ │ ├── verifiers.go │ │ │ └── verifiers_test.go │ │ └── image-spec │ │ │ ├── .gitignore │ │ │ ├── .header │ │ │ ├── .pullapprove.yml │ │ │ ├── .travis.yml │ │ │ ├── GOVERNANCE.md │ │ │ ├── HACKING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── RELEASES.md │ │ │ ├── annotations.md │ │ │ ├── config.md │ │ │ ├── considerations.md │ │ │ ├── conversion.md │ │ │ ├── descriptor.md │ │ │ ├── image-index.md │ │ │ ├── image-layout.md │ │ │ ├── implementations.md │ │ │ ├── layer.md │ │ │ ├── manifest.md │ │ │ ├── media-types.md │ │ │ ├── project.md │ │ │ ├── spec.md │ │ │ └── specs-go │ │ │ ├── v1 │ │ │ ├── annotations.go │ │ │ ├── config.go │ │ │ ├── descriptor.go │ │ │ ├── index.go │ │ │ ├── layout.go │ │ │ ├── manifest.go │ │ │ └── mediatype.go │ │ │ ├── version.go │ │ │ └── versioned.go │ ├── pkg │ │ └── errors │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── bench_test.go │ │ │ ├── errors.go │ │ │ ├── errors_test.go │ │ │ ├── example_test.go │ │ │ ├── format_test.go │ │ │ ├── stack.go │ │ │ └── stack_test.go │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── alt_exit.go │ │ │ ├── alt_exit_test.go │ │ │ ├── appveyor.yml │ │ │ ├── doc.go │ │ │ ├── entry.go │ │ │ ├── entry_test.go │ │ │ ├── example_basic_test.go │ │ │ ├── example_hook_test.go │ │ │ ├── exported.go │ │ │ ├── formatter.go │ │ │ ├── formatter_bench_test.go │ │ │ ├── hook_test.go │ │ │ ├── hooks.go │ │ │ ├── json_formatter.go │ │ │ ├── json_formatter_test.go │ │ │ ├── logger.go │ │ │ ├── logger_bench_test.go │ │ │ ├── logrus.go │ │ │ ├── logrus_test.go │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── terminal_linux.go │ │ │ ├── text_formatter.go │ │ │ ├── text_formatter_test.go │ │ │ └── writer.go │ └── vishvananda │ │ ├── netlink │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── addr.go │ │ ├── addr_linux.go │ │ ├── addr_test.go │ │ ├── bpf_linux.go │ │ ├── bridge_linux.go │ │ ├── bridge_linux_test.go │ │ ├── class.go │ │ ├── class_linux.go │ │ ├── class_test.go │ │ ├── conntrack_linux.go │ │ ├── conntrack_test.go │ │ ├── conntrack_unspecified.go │ │ ├── filter.go │ │ ├── filter_linux.go │ │ ├── filter_test.go │ │ ├── fou.go │ │ ├── fou_linux.go │ │ ├── fou_test.go │ │ ├── fou_unspecified.go │ │ ├── genetlink_linux.go │ │ ├── genetlink_unspecified.go │ │ ├── gtp_linux.go │ │ ├── gtp_test.go │ │ ├── handle_linux.go │ │ ├── handle_test.go │ │ ├── handle_unspecified.go │ │ ├── ioctl_linux.go │ │ ├── link.go │ │ ├── link_linux.go │ │ ├── link_test.go │ │ ├── link_tuntap_linux.go │ │ ├── neigh.go │ │ ├── neigh_linux.go │ │ ├── neigh_test.go │ │ ├── netlink.go │ │ ├── netlink_linux.go │ │ ├── netlink_test.go │ │ ├── netlink_unspecified.go │ │ ├── nl │ │ │ ├── addr_linux.go │ │ │ ├── addr_linux_test.go │ │ │ ├── bridge_linux.go │ │ │ ├── bridge_linux_test.go │ │ │ ├── conntrack_linux.go │ │ │ ├── genetlink_linux.go │ │ │ ├── link_linux.go │ │ │ ├── link_linux_test.go │ │ │ ├── mpls_linux.go │ │ │ ├── nl_linux.go │ │ │ ├── nl_linux_test.go │ │ │ ├── nl_unspecified.go │ │ │ ├── route_linux.go │ │ │ ├── route_linux_test.go │ │ │ ├── seg6_linux.go │ │ │ ├── syscall.go │ │ │ ├── tc_linux.go │ │ │ ├── tc_linux_test.go │ │ │ ├── xfrm_linux.go │ │ │ ├── xfrm_linux_test.go │ │ │ ├── xfrm_monitor_linux.go │ │ │ ├── xfrm_monitor_linux_test.go │ │ │ ├── xfrm_policy_linux.go │ │ │ ├── xfrm_policy_linux_test.go │ │ │ ├── xfrm_state_linux.go │ │ │ └── xfrm_state_linux_test.go │ │ ├── order.go │ │ ├── protinfo.go │ │ ├── protinfo_linux.go │ │ ├── protinfo_test.go │ │ ├── qdisc.go │ │ ├── qdisc_linux.go │ │ ├── qdisc_test.go │ │ ├── route.go │ │ ├── route_linux.go │ │ ├── route_test.go │ │ ├── route_unspecified.go │ │ ├── rule.go │ │ ├── rule_linux.go │ │ ├── rule_test.go │ │ ├── socket.go │ │ ├── socket_linux.go │ │ ├── socket_test.go │ │ ├── xfrm.go │ │ ├── xfrm_monitor_linux.go │ │ ├── xfrm_monitor_test.go │ │ ├── xfrm_policy.go │ │ ├── xfrm_policy_linux.go │ │ ├── xfrm_policy_test.go │ │ ├── xfrm_state.go │ │ ├── xfrm_state_linux.go │ │ └── xfrm_state_test.go │ │ └── netns │ │ ├── LICENSE │ │ ├── README.md │ │ ├── netns.go │ │ ├── netns_linux.go │ │ ├── netns_test.go │ │ └── netns_unspecified.go └── golang.org │ └── x │ ├── crypto │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ └── ssh │ │ ├── benchmark_test.go │ │ ├── buffer.go │ │ ├── buffer_test.go │ │ ├── certs.go │ │ ├── certs_test.go │ │ ├── channel.go │ │ ├── cipher.go │ │ ├── cipher_test.go │ │ ├── client.go │ │ ├── client_auth.go │ │ ├── client_auth_test.go │ │ ├── client_test.go │ │ ├── common.go │ │ ├── connection.go │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── handshake.go │ │ ├── handshake_test.go │ │ ├── kex.go │ │ ├── kex_test.go │ │ ├── keys.go │ │ ├── keys_test.go │ │ ├── mac.go │ │ ├── mempipe_test.go │ │ ├── messages.go │ │ ├── messages_test.go │ │ ├── mux.go │ │ ├── mux_test.go │ │ ├── server.go │ │ ├── session.go │ │ ├── session_test.go │ │ ├── streamlocal.go │ │ ├── tcpip.go │ │ ├── tcpip_test.go │ │ ├── terminal │ │ ├── terminal.go │ │ ├── terminal_test.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ │ ├── testdata_test.go │ │ ├── transport.go │ │ └── transport_test.go │ ├── net │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── context │ │ ├── context.go │ │ ├── context_test.go │ │ ├── ctxhttp │ │ │ ├── ctxhttp.go │ │ │ ├── ctxhttp_17_test.go │ │ │ ├── ctxhttp_pre17.go │ │ │ ├── ctxhttp_pre17_test.go │ │ │ └── ctxhttp_test.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ ├── pre_go19.go │ │ └── withtimeout_test.go │ └── proxy │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── per_host_test.go │ │ ├── proxy.go │ │ ├── proxy_test.go │ │ └── socks5.go │ └── sys │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── unix │ ├── .gitignore │ ├── 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 │ ├── creds_test.go │ ├── dev_darwin.go │ ├── dev_darwin_test.go │ ├── dev_dragonfly.go │ ├── dev_dragonfly_test.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_linux_test.go │ ├── dev_netbsd.go │ ├── dev_netbsd_test.go │ ├── dev_openbsd.go │ ├── dev_openbsd_test.go │ ├── dev_solaris_test.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 │ ├── export_test.go │ ├── flock.go │ ├── flock_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.pl │ ├── mksyscall_solaris.pl │ ├── mksysctl_openbsd.pl │ ├── mksysnum_darwin.pl │ ├── mksysnum_dragonfly.pl │ ├── mksysnum_freebsd.pl │ ├── mksysnum_netbsd.pl │ ├── mksysnum_openbsd.pl │ ├── mmap_unix_test.go │ ├── openbsd_pledge.go │ ├── openbsd_test.go │ ├── pagesize_unix.go │ ├── race.go │ ├── race0.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_bsd.go │ ├── syscall_bsd_test.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_freebsd_test.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_linux_test.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_solaris_test.go │ ├── syscall_test.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_test.go │ ├── timestruct.go │ ├── timestruct_test.go │ ├── types_darwin.go │ ├── types_dragonfly.go │ ├── types_freebsd.go │ ├── types_netbsd.go │ ├── types_openbsd.go │ ├── types_solaris.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 │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.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_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.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 │ ├── 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 │ └── windows │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── dll_windows.go │ ├── env_unset.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── syscall.go │ ├── syscall_test.go │ ├── syscall_windows.go │ ├── syscall_windows_test.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ └── zsyscall_windows.go └── version └── version.go /.gitignore: -------------------------------------------------------------------------------- 1 | ###Go### 2 | 3 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 4 | *.o 5 | *.a 6 | *.so 7 | 8 | # Folders 9 | _obj 10 | _test 11 | 12 | # Architecture specific extensions/prefixes 13 | *.[568vq] 14 | [568vq].out 15 | 16 | *.cgo1.go 17 | *.cgo2.c 18 | _cgo_defun.c 19 | _cgo_gotypes.go 20 | _cgo_export.* 21 | 22 | _testmain.go 23 | 24 | *.exe 25 | *.test 26 | 27 | 28 | ###OSX### 29 | 30 | .DS_Store 31 | .AppleDouble 32 | .LSOverride 33 | 34 | # Icon must ends with two \r. 35 | Icon 36 | 37 | 38 | # Thumbnails 39 | ._* 40 | 41 | # Files that might appear on external disk 42 | .Spotlight-V100 43 | .Trashes 44 | 45 | onion 46 | cross/ 47 | logs/ 48 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | MAINTAINER Jessica Frazelle 3 | 4 | ENV PATH /go/bin:/usr/local/go/bin:$PATH 5 | ENV GOPATH /go 6 | 7 | RUN apk add --no-cache \ 8 | ca-certificates \ 9 | iptables 10 | 11 | COPY . /go/src/github.com/jessfraz/onion 12 | 13 | RUN set -x \ 14 | && apk add --no-cache --virtual .build-deps \ 15 | go \ 16 | git \ 17 | gcc \ 18 | libc-dev \ 19 | libgcc \ 20 | && cd /go/src/github.com/jessfraz/onion \ 21 | && go build -o /usr/bin/onion . \ 22 | && apk del .build-deps \ 23 | && rm -rf /go \ 24 | && echo "Build complete." 25 | 26 | 27 | ENTRYPOINT [ "onion" ] 28 | -------------------------------------------------------------------------------- /Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM docker:1.12-dind 2 | 3 | ENV PATH /go/bin:$PATH 4 | ENV GOPATH /go 5 | ENV GO15VENDOREXPERIMENT 1 6 | 7 | RUN apk add --update \ 8 | bash \ 9 | curl \ 10 | go \ 11 | git \ 12 | gcc \ 13 | jq \ 14 | libc-dev \ 15 | libgcc \ 16 | make \ 17 | --repository https://dl-3.alpinelinux.org/alpine/edge/community/ \ 18 | && rm -rf /var/cache/apk/* 19 | 20 | # install bats 21 | RUN cd /tmp \ 22 | && git clone https://github.com/sstephenson/bats.git \ 23 | && ./bats/install.sh /usr/local \ 24 | && rm -rf /tmp/bats 25 | 26 | # install golint 27 | RUN go get github.com/golang/lint/golint \ 28 | && go install cmd/vet 29 | 30 | COPY . /go/src/github.com/jessfraz/onion 31 | 32 | WORKDIR /go/src/github.com/jessfraz/onion 33 | 34 | RUN go build -o /usr/bin/onion . 35 | 36 | ENTRYPOINT [ "dind" ] 37 | CMD [ "hack/test.sh" ] 38 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | v0.1.0 2 | -------------------------------------------------------------------------------- /hack/.integration-daemon-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | trap - EXIT # reset EXIT trap applied in .integration-daemon-start 4 | 5 | for pidFile in $(find "/var/run" -name docker.pid); do 6 | pid=$(set -x; cat "$pidFile") 7 | ( set -x; kill "$pid" ) 8 | if ! wait "$pid"; then 9 | echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /hack/.onion-start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ( set -x; exec \ 4 | onion -d \ 5 | --pidfile "/var/run/onion.pid" \ 6 | &> "/var/log/onion/onion.log" 7 | ) & 8 | 9 | # make sure that if the script exits unexpectedly, we stop this daemon we just started 10 | trap "source ${DIR}/.onion-stop" EXIT 11 | 12 | # give it a little time to come up so it's "ready" 13 | tries=60 14 | echo "INFO: Waiting for onion to start..." 15 | while ! [ ! -f /var/run/docker/plugins/tor.sock ] &> /dev/null; do 16 | (( tries-- )) 17 | if [ $tries -le 0 ]; then 18 | printf "\n" 19 | echo >&2 "error: onion failed to start" 20 | echo >&2 " check /var/log/onion/onion.log for details" 21 | false 22 | fi 23 | printf "." 24 | sleep 2 25 | done 26 | printf "\n" 27 | -------------------------------------------------------------------------------- /hack/.onion-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | trap - EXIT # reset EXIT trap applied in .onion-start 4 | 5 | for pidFile in $(find "/var/run" -name onion.pid); do 6 | pid=$(set -x; cat "$pidFile") 7 | ( set -x; kill "$pid" ) 8 | if ! wait "$pid"; then 9 | echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /tor/setup_ip_forwarding.go: -------------------------------------------------------------------------------- 1 | package tor 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | ) 7 | 8 | const ( 9 | ipv4ForwardConf = "/proc/sys/net/ipv4/ip_forward" 10 | ipv4ForwardConfPerm = 0644 11 | ) 12 | 13 | func setupIPForwarding() error { 14 | // Get current IPv4 forward setup 15 | ipv4ForwardData, err := ioutil.ReadFile(ipv4ForwardConf) 16 | if err != nil { 17 | return fmt.Errorf("Cannot read IP forwarding setup: %v", err) 18 | } 19 | 20 | // Enable IPv4 forwarding only if it is not already enabled 21 | if ipv4ForwardData[0] != '1' { 22 | // Enable IPv4 forwarding 23 | if err := ioutil.WriteFile(ipv4ForwardConf, []byte{'1', '\n'}, ipv4ForwardConfPerm); err != nil { 24 | return fmt.Errorf("Setup IP forwarding failed: %v", err) 25 | } 26 | } 27 | 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/privileges_test.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | import "testing" 4 | 5 | func TestRunWithUnavailablePrivilege(t *testing.T) { 6 | err := RunWithPrivilege("SeCreateTokenPrivilege", func() error { return nil }) 7 | if _, ok := err.(*PrivilegeError); err == nil || !ok { 8 | t.Fatal("expected PrivilegeError") 9 | } 10 | } 11 | 12 | func TestRunWithPrivileges(t *testing.T) { 13 | err := RunWithPrivilege("SeShutdownPrivilege", func() error { return nil }) 14 | if err != nil { 15 | t.Fatal(err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/sd_test.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | import "testing" 4 | 5 | func TestLookupInvalidSid(t *testing.T) { 6 | _, err := LookupSidByName(".\\weoifjdsklfj") 7 | aerr, ok := err.(*AccountLookupError) 8 | if !ok || aerr.Err != cERROR_NONE_MAPPED { 9 | t.Fatalf("expected AccountLookupError with ERROR_NONE_MAPPED, got %s", err) 10 | } 11 | } 12 | 13 | func TestLookupValidSid(t *testing.T) { 14 | sid, err := LookupSidByName("Everyone") 15 | if err != nil || sid != "S-1-1-0" { 16 | t.Fatal("expected S-1-1-0, got %s, %s", sid, err) 17 | } 18 | } 19 | 20 | func TestLookupEmptyNameFails(t *testing.T) { 21 | _, err := LookupSidByName(".\\weoifjdsklfj") 22 | aerr, ok := err.(*AccountLookupError) 23 | if !ok || aerr.Err != cERROR_NONE_MAPPED { 24 | t.Fatalf("expected AccountLookupError with ERROR_NONE_MAPPED, got %s", err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go 4 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | bin 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/.mailmap: -------------------------------------------------------------------------------- 1 | Stephen J Day Stephen Day 2 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.9.x 6 | - tip 7 | 8 | go_import_path: github.com/containerd/continuity 9 | 10 | env: 11 | # NOTE: we cannot set GOOS directly (because gimme overrides the value) 12 | - TRAVIS_GOOS=windows 13 | - TRAVIS_GOOS=linux 14 | - TRAVIS_GOOS=darwin 15 | - TRAVIS_GOOS=solaris 16 | 17 | script: 18 | - export GOOS=${TRAVIS_GOOS} 19 | - make build binaries 20 | - if [ "$GOOS" = "linux" ]; then make vet test; fi 21 | - if [ "$GOOS" != "linux" ]; then make test-compile; fi 22 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/AUTHORS: -------------------------------------------------------------------------------- 1 | Aaron Lehmann 2 | Akash Gupta 3 | Akihiro Suda 4 | Andrew Pennebaker 5 | Brandon Philips 6 | Christopher Jones 7 | Daniel, Dao Quang Minh 8 | Derek McGowan 9 | Edward Pilatowicz 10 | Ian Campbell 11 | Justin Cormack 12 | Justin Cummins 13 | Phil Estes 14 | Stephen J Day 15 | Tobias Klauser 16 | Tonis Tiigi 17 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/hardlinks_windows.go: -------------------------------------------------------------------------------- 1 | package continuity 2 | 3 | import "os" 4 | 5 | type hardlinkKey struct{} 6 | 7 | func newHardlinkKey(fi os.FileInfo) (hardlinkKey, error) { 8 | // NOTE(stevvooe): Obviously, this is not yet implemented. However, the 9 | // makings of an implementation are available in src/os/types_windows.go. More 10 | // investigation needs to be done to figure out exactly how to do this. 11 | return hardlinkKey{}, errNotAHardLink 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/manifest_test_darwin.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package continuity 4 | 5 | import "os" 6 | 7 | var ( 8 | devNullResource = resource{ 9 | kind: chardev, 10 | path: "/dev/null", 11 | major: 3, 12 | minor: 2, 13 | mode: 0666 | os.ModeDevice | os.ModeCharDevice, 14 | } 15 | 16 | devZeroResource = resource{ 17 | kind: chardev, 18 | path: "/dev/zero", 19 | major: 3, 20 | minor: 3, 21 | mode: 0666 | os.ModeDevice | os.ModeCharDevice, 22 | } 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/resource_windows.go: -------------------------------------------------------------------------------- 1 | package continuity 2 | 3 | import "os" 4 | 5 | // newBaseResource returns a *resource, populated with data from p and fi, 6 | // where p will be populated directly. 7 | func newBaseResource(p string, fi os.FileInfo) (*resource, error) { 8 | return &resource{ 9 | paths: []string{p}, 10 | mode: fi.Mode(), 11 | }, nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/vendor.conf: -------------------------------------------------------------------------------- 1 | bazil.org/fuse 371fbbdaa8987b715bdd21d6adc4c9b20155f748 2 | github.com/dustin/go-humanize bb3d318650d48840a39aa21a027c6630e198e626 3 | github.com/golang/protobuf 1e59b77b52bf8e4b449a57e6f79f21226d571845 4 | github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 5 | github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf 6 | github.com/pkg/errors f15c970de5b76fac0b59abb32d62c17cc7bed265 7 | github.com/sirupsen/logrus 89742aefa4b206dcf400792f3bd35b542998eb3b 8 | github.com/spf13/cobra 2da4a54c5ceefcee7ca5dd0eea1e18a3b6366489 9 | github.com/spf13/pflag 4c012f6dcd9546820e378d0bdda4d8fc772cdfea 10 | golang.org/x/crypto 9f005a07e0d31d45e6656d241bb5c0f2efd4bc94 11 | golang.org/x/net a337091b0525af65de94df2eb7e98bd9962dcbe2 12 | golang.org/x/sys 665f6529cca930e27b831a0d1dafffbe1c172924 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | # never checkin from the bin file (for now) 27 | bin/* 28 | 29 | # Test key files 30 | *.pem 31 | 32 | # Cover profiles 33 | *.out 34 | 35 | # Editor/IDE specific files. 36 | *.sublime-project 37 | *.sublime-workspace 38 | .idea/* 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.8-alpine 2 | 3 | ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution 4 | ENV DOCKER_BUILDTAGS include_oss include_gcs 5 | 6 | ARG GOOS=linux 7 | ARG GOARCH=amd64 8 | 9 | RUN set -ex \ 10 | && apk add --no-cache make git 11 | 12 | WORKDIR $DISTRIBUTION_DIR 13 | COPY . $DISTRIBUTION_DIR 14 | COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml 15 | 16 | RUN make PREFIX=/go clean binaries 17 | 18 | VOLUME ["/var/lib/registry"] 19 | EXPOSE 5000 20 | ENTRYPOINT ["registry"] 21 | CMD ["serve", "/etc/docker/registry/config.yml"] 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/coverpkg.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Given a subpackage and the containing package, figures out which packages 3 | # need to be passed to `go test -coverpkg`: this includes all of the 4 | # subpackage's dependencies within the containing package, as well as the 5 | # subpackage itself. 6 | DEPENDENCIES="$(go list -f $'{{range $f := .Deps}}{{$f}}\n{{end}}' ${1} | grep ${2} | grep -v github.com/docker/distribution/vendor)" 7 | echo "${1} ${DEPENDENCIES}" | xargs echo -n | tr ' ' ',' 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/doc.go: -------------------------------------------------------------------------------- 1 | // Package distribution will define the interfaces for the components of 2 | // docker distribution. The goal is to allow users to reliably package, ship 3 | // and store content related to docker images. 4 | // 5 | // This is currently a work in progress. More details are available in the 6 | // README.md. 7 | package distribution 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/.DEREK.yml: -------------------------------------------------------------------------------- 1 | curators: 2 | - aboch 3 | - alexellis 4 | - andrewhsu 5 | - anonymuse 6 | - chanwit 7 | - ehazlett 8 | - fntlnz 9 | - gianarb 10 | - mgoelzer 11 | - programmerq 12 | - rheinwein 13 | - ripcurld0 14 | - thajeztah 15 | 16 | features: 17 | - comments 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | bundles 2 | .gopath 3 | vendor/pkg 4 | .go-pkg-cache 5 | .git 6 | hack/integration-cli-on-swarm/integration-cli-on-swarm 7 | 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/.gitignore: -------------------------------------------------------------------------------- 1 | # Docker project generated files to ignore 2 | # if you want to ignore files created by your editor/tools, 3 | # please consider a global .gitignore https://help.github.com/articles/ignoring-files 4 | *.exe 5 | *.exe~ 6 | *.orig 7 | test.main 8 | .*.swp 9 | .DS_Store 10 | # a .bashrc may be added to customize the build environment 11 | .bashrc 12 | .editorconfig 13 | .gopath/ 14 | .go-pkg-cache/ 15 | autogen/ 16 | bundles/ 17 | cmd/dockerd/dockerd 18 | contrib/builder/rpm/*/changelog 19 | dockerversion/version_autogen.go 20 | dockerversion/version_autogen_unix.go 21 | vendor/pkg/ 22 | hack/integration-cli-on-swarm/integration-cli-on-swarm 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/common.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // Common constants for daemon and client. 4 | const ( 5 | // DefaultVersion of Current REST API 6 | DefaultVersion string = "1.36" 7 | 8 | // NoBaseImageSpecifier is the symbol used by the FROM 9 | // command to specify that no base image is to be used. 10 | NoBaseImageSpecifier string = "scratch" 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/common_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package api 4 | 5 | // MinVersion represents Minimum REST API version supported 6 | const MinVersion string = "1.12" 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/common_windows.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // MinVersion represents Minimum REST API version supported 4 | // Technically the first daemon API version released on Windows is v1.25 in 5 | // engine version 1.13. However, some clients are explicitly using downlevel 6 | // APIs (e.g. docker-compose v2.1 file format) and that is just too restrictive. 7 | // Hence also allowing 1.24 on Windows. 8 | const MinVersion string = "1.24" 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/swagger-gen.yaml: -------------------------------------------------------------------------------- 1 | 2 | layout: 3 | models: 4 | - name: definition 5 | source: asset:model 6 | target: "{{ joinFilePath .Target .ModelPackage }}" 7 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 8 | operations: 9 | - name: handler 10 | source: asset:serverOperation 11 | target: "{{ joinFilePath .Target .APIPackage .Package }}" 12 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/blkiodev/blkio.go: -------------------------------------------------------------------------------- 1 | package blkiodev 2 | 3 | import "fmt" 4 | 5 | // WeightDevice is a structure that holds device:weight pair 6 | type WeightDevice struct { 7 | Path string 8 | Weight uint16 9 | } 10 | 11 | func (w *WeightDevice) String() string { 12 | return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 | } 14 | 15 | // ThrottleDevice is a structure that holds device:rate_per_second pair 16 | type ThrottleDevice struct { 17 | Path string 18 | Rate uint64 19 | } 20 | 21 | func (t *ThrottleDevice) String() string { 22 | return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_changes.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerChangeResponseItem container change response item 11 | // swagger:model ContainerChangeResponseItem 12 | type ContainerChangeResponseItem struct { 13 | 14 | // Kind of change 15 | // Required: true 16 | Kind uint8 `json:"Kind"` 17 | 18 | // Path to file that has changed 19 | // Required: true 20 | Path string `json:"Path"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_create.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerCreateCreatedBody container create created body 11 | // swagger:model ContainerCreateCreatedBody 12 | type ContainerCreateCreatedBody struct { 13 | 14 | // The ID of the created container 15 | // Required: true 16 | ID string `json:"Id"` 17 | 18 | // Warnings encountered when creating the container 19 | // Required: true 20 | Warnings []string `json:"Warnings"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_top.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerTopOKBody container top o k body 11 | // swagger:model ContainerTopOKBody 12 | type ContainerTopOKBody struct { 13 | 14 | // Each process running in the container, where each is process is an array of values corresponding to the titles 15 | // Required: true 16 | Processes [][]string `json:"Processes"` 17 | 18 | // The ps column titles 19 | // Required: true 20 | Titles []string `json:"Titles"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_update.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerUpdateOKBody container update o k body 11 | // swagger:model ContainerUpdateOKBody 12 | type ContainerUpdateOKBody struct { 13 | 14 | // warnings 15 | // Required: true 16 | Warnings []string `json:"Warnings"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/error_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ErrorResponse Represents an error. 7 | // swagger:model ErrorResponse 8 | type ErrorResponse struct { 9 | 10 | // The error message. 11 | // Required: true 12 | Message string `json:"message"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/filters/example_test.go: -------------------------------------------------------------------------------- 1 | package filters 2 | 3 | func ExampleArgs_MatchKVList() { 4 | args := NewArgs( 5 | Arg("label", "image=foo"), 6 | Arg("label", "state=running")) 7 | 8 | // returns true because there are no values for bogus 9 | args.MatchKVList("bogus", nil) 10 | 11 | // returns false because there are no sources 12 | args.MatchKVList("label", nil) 13 | 14 | // returns true because all sources are matched 15 | args.MatchKVList("label", map[string]string{ 16 | "image": "foo", 17 | "state": "running", 18 | }) 19 | 20 | // returns false because the values do not match 21 | args.MatchKVList("label", map[string]string{ 22 | "image": "other", 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/graph_driver_data.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // GraphDriverData Information about a container's graph driver. 7 | // swagger:model GraphDriverData 8 | type GraphDriverData struct { 9 | 10 | // data 11 | // Required: true 12 | Data map[string]string `json:"Data"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/id_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // IDResponse Response to an API call that returns just an Id 7 | // swagger:model IdResponse 8 | type IDResponse struct { 9 | 10 | // The id of the newly created object. 11 | // Required: true 12 | ID string `json:"Id"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/image_delete_response_item.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ImageDeleteResponseItem image delete response item 7 | // swagger:model ImageDeleteResponseItem 8 | type ImageDeleteResponseItem struct { 9 | 10 | // The image ID of an image that was deleted 11 | Deleted string `json:"Deleted,omitempty"` 12 | 13 | // The image ID of an image that was untagged 14 | Untagged string `json:"Untagged,omitempty"` 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_device.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginDevice plugin device 7 | // swagger:model PluginDevice 8 | type PluginDevice struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // path 19 | // Required: true 20 | Path *string `json:"Path"` 21 | 22 | // settable 23 | // Required: true 24 | Settable []string `json:"Settable"` 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_env.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginEnv plugin env 7 | // swagger:model PluginEnv 8 | type PluginEnv struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // settable 19 | // Required: true 20 | Settable []string `json:"Settable"` 21 | 22 | // value 23 | // Required: true 24 | Value *string `json:"Value"` 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_interface_type.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginInterfaceType plugin interface type 7 | // swagger:model PluginInterfaceType 8 | type PluginInterfaceType struct { 9 | 10 | // capability 11 | // Required: true 12 | Capability string `json:"Capability"` 13 | 14 | // prefix 15 | // Required: true 16 | Prefix string `json:"Prefix"` 17 | 18 | // version 19 | // Required: true 20 | Version string `json:"Version"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/port.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // Port An open port on a container 7 | // swagger:model Port 8 | type Port struct { 9 | 10 | // IP 11 | IP string `json:"IP,omitempty"` 12 | 13 | // Port on the container 14 | // Required: true 15 | PrivatePort uint16 `json:"PrivatePort"` 16 | 17 | // Port exposed on the host 18 | PublicPort uint16 `json:"PublicPort,omitempty"` 19 | 20 | // type 21 | // Required: true 22 | Type string `json:"Type"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/registry/authenticate.go: -------------------------------------------------------------------------------- 1 | package registry 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // AuthenticateOKBody authenticate o k body 11 | // swagger:model AuthenticateOKBody 12 | type AuthenticateOKBody struct { 13 | 14 | // An opaque token used to authenticate a user after a successful login 15 | // Required: true 16 | IdentityToken string `json:"IdentityToken"` 17 | 18 | // The status of the authentication 19 | // Required: true 20 | Status string `json:"Status"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/service_update_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ServiceUpdateResponse service update response 7 | // swagger:model ServiceUpdateResponse 8 | type ServiceUpdateResponse struct { 9 | 10 | // Optional warning messages 11 | Warnings []string `json:"Warnings"` 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/config.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import "os" 4 | 5 | // Config represents a config. 6 | type Config struct { 7 | ID string 8 | Meta 9 | Spec ConfigSpec 10 | } 11 | 12 | // ConfigSpec represents a config specification from a config in swarm 13 | type ConfigSpec struct { 14 | Annotations 15 | Data []byte `json:",omitempty"` 16 | } 17 | 18 | // ConfigReferenceFileTarget is a file target in a config reference 19 | type ConfigReferenceFileTarget struct { 20 | Name string 21 | UID string 22 | GID string 23 | Mode os.FileMode 24 | } 25 | 26 | // ConfigReference is a reference to a config in swarm 27 | type ConfigReference struct { 28 | File *ConfigReferenceFileTarget 29 | ConfigID string 30 | ConfigName string 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | // RuntimeType is the type of runtime used for the TaskSpec 4 | type RuntimeType string 5 | 6 | // RuntimeURL is the proto type url 7 | type RuntimeURL string 8 | 9 | const ( 10 | // RuntimeContainer is the container based runtime 11 | RuntimeContainer RuntimeType = "container" 12 | // RuntimePlugin is the plugin based runtime 13 | RuntimePlugin RuntimeType = "plugin" 14 | 15 | // RuntimeURLContainer is the proto url for the container type 16 | RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" 17 | // RuntimeURLPlugin is the proto url for the plugin type 18 | RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc -I . --gogofast_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto 2 | 3 | package runtime 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/docker/docker/api/types/swarm/runtime;runtime"; 4 | 5 | // PluginSpec defines the base payload which clients can specify for creating 6 | // a service with the plugin runtime. 7 | message PluginSpec { 8 | string name = 1; 9 | string remote = 2; 10 | repeated PluginPrivilege privileges = 3; 11 | bool disabled = 4; 12 | } 13 | 14 | // PluginPrivilege describes a permission the user has to accept 15 | // upon installing a plugin. 16 | message PluginPrivilege { 17 | string name = 1; 18 | string description = 2; 19 | repeated string value = 3; 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/time/duration_convert.go: -------------------------------------------------------------------------------- 1 | package time 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // DurationToSecondsString converts the specified duration to the number 9 | // seconds it represents, formatted as a string. 10 | func DurationToSecondsString(duration time.Duration) string { 11 | return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/time/duration_convert_test.go: -------------------------------------------------------------------------------- 1 | package time 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | ) 7 | 8 | func TestDurationToSecondsString(t *testing.T) { 9 | cases := []struct { 10 | in time.Duration 11 | expected string 12 | }{ 13 | {0 * time.Second, "0"}, 14 | {1 * time.Second, "1"}, 15 | {1 * time.Minute, "60"}, 16 | {24 * time.Hour, "86400"}, 17 | } 18 | 19 | for _, c := range cases { 20 | s := DurationToSecondsString(c.in) 21 | if s != c.expected { 22 | t.Errorf("wrong value for input `%v`: expected `%s`, got `%s`", c.in, c.expected, s) 23 | t.Fail() 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/volume/volumes_list.go: -------------------------------------------------------------------------------- 1 | package volume 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | import "github.com/docker/docker/api/types" 11 | 12 | // VolumesListOKBody volumes list o k body 13 | // swagger:model VolumesListOKBody 14 | type VolumesListOKBody struct { 15 | 16 | // List of volumes 17 | // Required: true 18 | Volumes []*types.Volume `json:"Volumes"` 19 | 20 | // Warnings that occurred when fetching the list of volumes 21 | // Required: true 22 | Warnings []string `json:"Warnings"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/cli/error.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // Errors is a list of errors. 9 | // Useful in a loop if you don't want to return the error right away and you want to display after the loop, 10 | // all the errors that happened during the loop. 11 | type Errors []error 12 | 13 | func (errList Errors) Error() string { 14 | if len(errList) < 1 { 15 | return "" 16 | } 17 | 18 | out := make([]string, len(errList)) 19 | for i := range errList { 20 | out[i] = errList[i].Error() 21 | } 22 | return strings.Join(out, ", ") 23 | } 24 | 25 | // StatusError reports an unsuccessful exit by a command. 26 | type StatusError struct { 27 | Status string 28 | StatusCode int 29 | } 30 | 31 | func (e StatusError) Error() string { 32 | return fmt.Sprintf("Status: %s, Code: %d", e.Status, e.StatusCode) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/cli/required.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/pkg/errors" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | // NoArgs validates args and returns an error if there are any args 11 | func NoArgs(cmd *cobra.Command, args []string) error { 12 | if len(args) == 0 { 13 | return nil 14 | } 15 | 16 | if cmd.HasSubCommands() { 17 | return errors.Errorf("\n" + strings.TrimRight(cmd.UsageString(), "\n")) 18 | } 19 | 20 | return errors.Errorf( 21 | "\"%s\" accepts no argument(s).\nSee '%s --help'.\n\nUsage: %s\n\n%s", 22 | cmd.CommandPath(), 23 | cmd.CommandPath(), 24 | cmd.UseLine(), 25 | cmd.Short, 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // CheckpointCreate creates a checkpoint from the given container with the given name 9 | func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error { 10 | resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_delete.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // CheckpointDelete deletes the checkpoint with the given name from the given container 11 | func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error { 12 | query := url.Values{} 13 | if options.CheckpointDir != "" { 14 | query.Set("dir", options.CheckpointDir) 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) 18 | ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd openbsd darwin 2 | 3 | package client 4 | 5 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 6 | const DefaultDockerHost = "unix:///var/run/docker.sock" 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 4 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ConfigCreate creates a new Config. 12 | func (cli *Client) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) { 13 | var response types.ConfigCreateResponse 14 | if err := cli.NewVersionError("1.30", "config create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/configs/create", nil, config, nil) 18 | if err != nil { 19 | return response, err 20 | } 21 | 22 | err = json.NewDecoder(resp.body).Decode(&response) 23 | ensureReaderClosed(resp) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ConfigRemove removes a Config. 6 | func (cli *Client) ConfigRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError("1.30", "config remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) 11 | ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "config", id) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ConfigUpdate attempts to update a Config 12 | func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { 13 | if err := cli.NewVersionError("1.30", "config update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_diff.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerDiff shows differences in a container filesystem since it was started. 12 | func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]container.ContainerChangeResponseItem, error) { 13 | var changes []container.ContainerChangeResponseItem 14 | 15 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) 16 | if err != nil { 17 | return changes, err 18 | } 19 | 20 | err = json.NewDecoder(serverResp.body).Decode(&changes) 21 | ensureReaderClosed(serverResp) 22 | return changes, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_export.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerExport retrieves the raw contents of a container 11 | // and returns them as an io.ReadCloser. It's up to the caller 12 | // to close the stream. 13 | func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { 14 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return serverResp.body, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_kill.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerKill terminates the container process but does not remove the container from the docker host. 10 | func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { 11 | query := url.Values{} 12 | query.Set("signal", signal) 13 | 14 | resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerPause pauses the main process of a given container without terminating it. 6 | func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerRemove kills and removes a container from the docker host. 11 | func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { 12 | query := url.Values{} 13 | if options.RemoveVolumes { 14 | query.Set("v", "1") 15 | } 16 | if options.RemoveLinks { 17 | query.Set("link", "1") 18 | } 19 | 20 | if options.Force { 21 | query.Set("force", "1") 22 | } 23 | 24 | resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil) 25 | ensureReaderClosed(resp) 26 | return wrapResponseError(err, resp, "container", containerID) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_rename.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerRename changes the name of a given container. 10 | func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { 11 | query := url.Values{} 12 | query.Set("name", newContainerName) 13 | resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) 14 | ensureReaderClosed(resp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_restart.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerRestart stops and starts a container again. 12 | // It makes the daemon to wait for the container to be up again for 13 | // a specific amount of time, given the timeout. 14 | func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error { 15 | query := url.Values{} 16 | if timeout != nil { 17 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 18 | } 19 | resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_start.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ContainerStart sends a request to the docker daemon to start a container. 12 | func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 13 | query := url.Values{} 14 | if len(options.CheckpointID) != 0 { 15 | query.Set("checkpoint", options.CheckpointID) 16 | } 17 | if len(options.CheckpointDir) != 0 { 18 | query.Set("checkpoint-dir", options.CheckpointDir) 19 | } 20 | 21 | resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) 22 | ensureReaderClosed(resp) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_stats.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerStats returns near realtime stats for a given container. 11 | // It's up to the caller to close the io.ReadCloser returned. 12 | func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (types.ContainerStats, error) { 13 | query := url.Values{} 14 | query.Set("stream", "0") 15 | if stream { 16 | query.Set("stream", "1") 17 | } 18 | 19 | resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) 20 | if err != nil { 21 | return types.ContainerStats{}, err 22 | } 23 | 24 | osType := getDockerOS(resp.header.Get("Server")) 25 | return types.ContainerStats{Body: resp.body, OSType: osType}, err 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_stop.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerStop stops a container without terminating the process. 12 | // The process is blocked until the container stops or the timeout expires. 13 | func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error { 14 | query := url.Values{} 15 | if timeout != nil { 16 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 17 | } 18 | resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_top.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | "strings" 7 | 8 | "github.com/docker/docker/api/types/container" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // ContainerTop shows process information from within a container. 13 | func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (container.ContainerTopOKBody, error) { 14 | var response container.ContainerTopOKBody 15 | query := url.Values{} 16 | if len(arguments) > 0 { 17 | query.Set("ps_args", strings.Join(arguments, " ")) 18 | } 19 | 20 | resp, err := cli.get(ctx, "/containers/"+containerID+"/top", query, nil) 21 | if err != nil { 22 | return response, err 23 | } 24 | 25 | err = json.NewDecoder(resp.body).Decode(&response) 26 | ensureReaderClosed(resp) 27 | return response, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerUnpause resumes the process execution within a container 6 | func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/container" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerUpdate updates resources of a container 11 | func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { 12 | var response container.ContainerUpdateOKBody 13 | serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) 14 | if err != nil { 15 | return response, err 16 | } 17 | 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | 20 | ensureReaderClosed(serverResp) 21 | return response, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/disk_usage.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // DiskUsage requests the current data usage from the daemon 12 | func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) { 13 | var du types.DiskUsage 14 | 15 | serverResp, err := cli.get(ctx, "/system/df", nil, nil) 16 | if err != nil { 17 | return du, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { 22 | return du, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return du, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/distribution_inspect_test.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | func TestDistributionInspectUnsupported(t *testing.T) { 12 | client := &Client{ 13 | version: "1.29", 14 | client: &http.Client{}, 15 | } 16 | _, err := client.DistributionInspect(context.Background(), "foobar:1.0", "") 17 | assert.EqualError(t, err, `"distribution inspect" requires API version 1.30, but the Docker daemon API version is 1.29`) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_history.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/image" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ImageHistory returns the changes in an image in history format. 12 | func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error) { 13 | var history []image.HistoryResponseItem 14 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil) 15 | if err != nil { 16 | return history, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&history) 20 | ensureReaderClosed(serverResp) 21 | return history, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_save.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. 11 | // It's up to the caller to store the images and close the stream. 12 | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { 13 | query := url.Values{ 14 | "names": imageIDs, 15 | } 16 | 17 | resp, err := cli.get(ctx, "/images/get", query, nil) 18 | if err != nil { 19 | return nil, err 20 | } 21 | return resp.body, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/info.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // Info returns information about the docker server. 13 | func (cli *Client) Info(ctx context.Context) (types.Info, error) { 14 | var info types.Info 15 | serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) 16 | if err != nil { 17 | return info, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&info); err != nil { 22 | return info, fmt.Errorf("Error reading remote info: %v", err) 23 | } 24 | 25 | return info, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_experimental.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | type apiClientExperimental interface { 9 | CheckpointAPIClient 10 | } 11 | 12 | // CheckpointAPIClient defines API client methods for the checkpoints 13 | type CheckpointAPIClient interface { 14 | CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error 15 | CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error 16 | CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_stable.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // APIClient is an interface that clients that talk with a docker server must implement. 4 | type APIClient interface { 5 | CommonAPIClient 6 | apiClientExperimental 7 | } 8 | 9 | // Ensure that Client always implements APIClient. 10 | var _ APIClient = &Client{} 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_connect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/docker/docker/api/types/network" 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // NetworkConnect connects a container to an existent network in the docker host. 10 | func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { 11 | nc := types.NetworkConnect{ 12 | Container: containerID, 13 | EndpointConfig: config, 14 | } 15 | resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // NetworkCreate creates a new network in the docker host. 11 | func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { 12 | networkCreateRequest := types.NetworkCreateRequest{ 13 | NetworkCreate: options, 14 | Name: name, 15 | } 16 | var response types.NetworkCreateResponse 17 | serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) 18 | if err != nil { 19 | return response, err 20 | } 21 | 22 | json.NewDecoder(serverResp.body).Decode(&response) 23 | ensureReaderClosed(serverResp) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_disconnect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // NetworkDisconnect disconnects a container from an existent network in the docker host. 9 | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { 10 | nd := types.NetworkDisconnect{Container: containerID, Force: force} 11 | resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // NetworkRemove removes an existent network from the docker host. 6 | func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { 7 | resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return wrapResponseError(err, resp, "network", networkID) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeRemove removes a Node. 12 | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 13 | query := url.Values{} 14 | if options.Force { 15 | query.Set("force", "1") 16 | } 17 | 18 | resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) 19 | ensureReaderClosed(resp) 20 | return wrapResponseError(err, resp, "node", nodeID) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeUpdate updates a Node. 12 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 13 | query := url.Values{} 14 | query.Set("version", strconv.FormatUint(version.Index, 10)) 15 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // PluginCreate creates a plugin 13 | func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error { 14 | headers := http.Header(make(map[string][]string)) 15 | headers.Set("Content-Type", "application/x-tar") 16 | 17 | query := url.Values{} 18 | query.Set("name", createOptions.RepoName) 19 | 20 | resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers) 21 | if err != nil { 22 | return err 23 | } 24 | ensureReaderClosed(resp) 25 | return err 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_disable.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // PluginDisable disables a plugin 11 | func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_enable.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // PluginEnable enables a plugin 12 | func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { 13 | query := url.Values{} 14 | query.Set("timeout", strconv.Itoa(options.Timeout)) 15 | 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // PluginInspectWithRaw inspects an existing plugin 13 | func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { 14 | resp, err := cli.get(ctx, "/plugins/"+name+"/json", nil, nil) 15 | if err != nil { 16 | return nil, nil, wrapResponseError(err, resp, "plugin", name) 17 | } 18 | 19 | defer ensureReaderClosed(resp) 20 | body, err := ioutil.ReadAll(resp.body) 21 | if err != nil { 22 | return nil, nil, err 23 | } 24 | var p types.Plugin 25 | rdr := bytes.NewReader(body) 26 | err = json.NewDecoder(rdr).Decode(&p) 27 | return &p, body, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_push.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginPush pushes a plugin to a registry 10 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 11 | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} 12 | resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) 13 | if err != nil { 14 | return nil, err 15 | } 16 | return resp.body, nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // PluginRemove removes a plugin 11 | func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) 18 | ensureReaderClosed(resp) 19 | return wrapResponseError(err, resp, "plugin", name) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_set.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | ) 6 | 7 | // PluginSet modifies settings for an existing plugin 8 | func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { 9 | resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) 10 | ensureReaderClosed(resp) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // SecretCreate creates a new Secret. 12 | func (cli *Client) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { 13 | var response types.SecretCreateResponse 14 | if err := cli.NewVersionError("1.25", "secret create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/secrets/create", nil, secret, nil) 18 | if err != nil { 19 | return response, err 20 | } 21 | 22 | err = json.NewDecoder(resp.body).Decode(&response) 23 | ensureReaderClosed(resp) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // SecretRemove removes a Secret. 6 | func (cli *Client) SecretRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError("1.25", "secret remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) 11 | ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "secret", id) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // SecretUpdate attempts to update a Secret 12 | func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { 13 | if err := cli.NewVersionError("1.25", "secret update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ServiceRemove kills and removes a service. 6 | func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { 7 | resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return wrapResponseError(err, resp, "service", serviceID) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/session.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // DialSession returns a connection that can be used communication with daemon 11 | func (cli *Client) DialSession(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) { 12 | req, err := http.NewRequest("POST", "/session", nil) 13 | if err != nil { 14 | return nil, err 15 | } 16 | req = cli.addHeaders(req, meta) 17 | 18 | return cli.setupHijackConn(req, proto) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_get_unlock_key.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmGetUnlockKey retrieves the swarm's unlock key. 11 | func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) { 12 | serverResp, err := cli.get(ctx, "/swarm/unlockkey", nil, nil) 13 | if err != nil { 14 | return types.SwarmUnlockKeyResponse{}, err 15 | } 16 | 17 | var response types.SwarmUnlockKeyResponse 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_init.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInit initializes the swarm. 11 | func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { 12 | serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) 13 | if err != nil { 14 | return "", err 15 | } 16 | 17 | var response string 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInspect inspects the swarm. 11 | func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { 12 | serverResp, err := cli.get(ctx, "/swarm", nil, nil) 13 | if err != nil { 14 | return swarm.Swarm{}, err 15 | } 16 | 17 | var response swarm.Swarm 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/swarm" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // SwarmJoin joins the swarm. 9 | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 10 | resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // SwarmLeave leaves the swarm. 10 | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { 11 | query := url.Values{} 12 | if force { 13 | query.Set("force", "1") 14 | } 15 | resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_unlock.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/swarm" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // SwarmUnlock unlocks locked swarm. 9 | func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { 10 | serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) 11 | ensureReaderClosed(serverResp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // SwarmUpdate updates the swarm. 13 | func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { 14 | query := url.Values{} 15 | query.Set("version", strconv.FormatUint(version.Index, 10)) 16 | query.Set("rotateWorkerToken", fmt.Sprintf("%v", flags.RotateWorkerToken)) 17 | query.Set("rotateManagerToken", fmt.Sprintf("%v", flags.RotateManagerToken)) 18 | query.Set("rotateManagerUnlockKey", fmt.Sprintf("%v", flags.RotateManagerUnlockKey)) 19 | resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/tlsconfig_clone.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package client 4 | 5 | import "crypto/tls" 6 | 7 | // tlsConfigClone returns a clone of tls.Config. This function is provided for 8 | // compatibility for go1.7 that doesn't include this method in stdlib. 9 | func tlsConfigClone(c *tls.Config) *tls.Config { 10 | return c.Clone() 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/transport.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "crypto/tls" 5 | "net/http" 6 | ) 7 | 8 | // resolveTLSConfig attempts to resolve the TLS configuration from the 9 | // RoundTripper. 10 | func resolveTLSConfig(transport http.RoundTripper) *tls.Config { 11 | switch tr := transport.(type) { 12 | case *http.Transport: 13 | return tr.TLSClientConfig 14 | default: 15 | return nil 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/version.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ServerVersion returns information of the docker client and server host. 11 | func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { 12 | resp, err := cli.get(ctx, "/version", nil, nil) 13 | if err != nil { 14 | return types.Version{}, err 15 | } 16 | 17 | var server types.Version 18 | err = json.NewDecoder(resp.body).Decode(&server) 19 | ensureReaderClosed(resp) 20 | return server, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | volumetypes "github.com/docker/docker/api/types/volume" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // VolumeCreate creates a volume in the docker host. 12 | func (cli *Client) VolumeCreate(ctx context.Context, options volumetypes.VolumesCreateBody) (types.Volume, error) { 13 | var volume types.Volume 14 | resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) 15 | if err != nil { 16 | return volume, err 17 | } 18 | err = json.NewDecoder(resp.body).Decode(&volume) 19 | ensureReaderClosed(resp) 20 | return volume, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types/versions" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // VolumeRemove removes a volume from the docker host. 11 | func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { 12 | query := url.Values{} 13 | if versions.GreaterThanOrEqualTo(cli.version, "1.25") { 14 | if force { 15 | query.Set("force", "1") 16 | } 17 | } 18 | resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) 19 | ensureReaderClosed(resp) 20 | return wrapResponseError(err, resp, "volume", volumeID) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils 4 | 5 | import "io/ioutil" 6 | 7 | // TempDir on Unix systems is equivalent to ioutil.TempDir. 8 | func TempDir(dir, prefix string) (string, error) { 9 | return ioutil.TempDir(dir, prefix) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | "github.com/docker/docker/pkg/longpath" 7 | ) 8 | 9 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 10 | func TempDir(dir, prefix string) (string, error) { 11 | tempDir, err := ioutil.TempDir(dir, prefix) 12 | if err != nil { 13 | return "", err 14 | } 15 | return longpath.AddPrefix(tempDir), nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/longpath/longpath_test.go: -------------------------------------------------------------------------------- 1 | package longpath 2 | 3 | import ( 4 | "strings" 5 | "testing" 6 | ) 7 | 8 | func TestStandardLongPath(t *testing.T) { 9 | c := `C:\simple\path` 10 | longC := AddPrefix(c) 11 | if !strings.EqualFold(longC, `\\?\C:\simple\path`) { 12 | t.Errorf("Wrong long path returned. Original = %s ; Long = %s", c, longC) 13 | } 14 | } 15 | 16 | func TestUNCLongPath(t *testing.T) { 17 | c := `\\server\share\path` 18 | longC := AddPrefix(c) 19 | if !strings.EqualFold(longC, `\\?\UNC\server\share\path`) { 20 | t.Errorf("Wrong UNC long path returned. Original = %s ; Long = %s", c, longC) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | // These flags are unsupported. 6 | const ( 7 | BIND = 0 8 | DIRSYNC = 0 9 | MANDLOCK = 0 10 | NOATIME = 0 11 | NODEV = 0 12 | NODIRATIME = 0 13 | NOEXEC = 0 14 | NOSUID = 0 15 | UNBINDABLE = 0 16 | RUNBINDABLE = 0 17 | PRIVATE = 0 18 | RPRIVATE = 0 19 | SHARED = 0 20 | RSHARED = 0 21 | SLAVE = 0 22 | RSLAVE = 0 23 | RBIND = 0 24 | RELATIME = 0 25 | RELATIVE = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | SYNCHRONOUS = 0 29 | RDONLY = 0 30 | mntDetach = 0 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | func mount(device, target, mType string, flag uintptr, data string) error { 6 | panic("Not implemented") 7 | } 8 | 9 | func unmount(target string, flag int) error { 10 | panic("Not implemented") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | ) 9 | 10 | func parseMountTable() ([]*Info, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mountinfo_windows.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | func parseMountTable() ([]*Info, error) { 4 | // Do NOT return an error! 5 | return nil, nil 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/pidfile/pidfile_darwin.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | 3 | package pidfile 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func processExists(pid int) bool { 10 | // OS X does not have a proc filesystem. 11 | // Use kill -0 pid to judge if the process exists. 12 | err := unix.Kill(pid, 0) 13 | return err == nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/pidfile/pidfile_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!darwin 2 | 3 | package pidfile 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | "strconv" 9 | ) 10 | 11 | func processExists(pid int) bool { 12 | if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil { 13 | return true 14 | } 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/pidfile/pidfile_windows.go: -------------------------------------------------------------------------------- 1 | package pidfile 2 | 3 | import ( 4 | "golang.org/x/sys/windows" 5 | ) 6 | 7 | const ( 8 | processQueryLimitedInformation = 0x1000 9 | 10 | stillActive = 259 11 | ) 12 | 13 | func processExists(pid int) bool { 14 | h, err := windows.OpenProcess(processQueryLimitedInformation, false, uint32(pid)) 15 | if err != nil { 16 | return false 17 | } 18 | var c uint32 19 | err = windows.GetExitCodeProcess(h, &c) 20 | windows.Close(h) 21 | if err != nil { 22 | return c == stillActive 23 | } 24 | return true 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/discovery_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package plugins 4 | 5 | var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"} 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/discovery_windows.go: -------------------------------------------------------------------------------- 1 | package plugins 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | ) 7 | 8 | var specsPaths = []string{filepath.Join(os.Getenv("programdata"), "docker", "plugins")} 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/errors.go: -------------------------------------------------------------------------------- 1 | package plugins 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | type statusError struct { 9 | status int 10 | method string 11 | err string 12 | } 13 | 14 | // Error returns a formatted string for this error type 15 | func (e *statusError) Error() string { 16 | return fmt.Sprintf("%s: %v", e.method, e.err) 17 | } 18 | 19 | // IsNotFound indicates if the passed in error is from an http.StatusNotFound from the plugin 20 | func IsNotFound(err error) bool { 21 | return isStatusError(err, http.StatusNotFound) 22 | } 23 | 24 | func isStatusError(err error, status int) bool { 25 | if err == nil { 26 | return false 27 | } 28 | e, ok := err.(*statusError) 29 | if !ok { 30 | return false 31 | } 32 | return e.status == status 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/plugins_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package plugins 4 | 5 | // BasePath returns the path to which all paths returned by the plugin are relative to. 6 | // For v1 plugins, this always returns the host's root directory. 7 | func (p *Plugin) BasePath() string { 8 | return "/" 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/plugins_windows.go: -------------------------------------------------------------------------------- 1 | package plugins 2 | 3 | // BasePath returns the path to which all paths returned by the plugin are relative to. 4 | // For Windows v1 plugins, this returns an empty string, since the plugin is already aware 5 | // of the absolute path of the mount. 6 | func (p *Plugin) BasePath() string { 7 | return "" 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/plugins/transport/http_test.go: -------------------------------------------------------------------------------- 1 | package transport 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "testing" 7 | 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestHTTPTransport(t *testing.T) { 12 | var r io.Reader 13 | roundTripper := &http.Transport{} 14 | newTransport := NewHTTPTransport(roundTripper, "http", "0.0.0.0") 15 | request, err := newTransport.NewRequest("", r) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | assert.Equal(t, "POST", request.Method) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/reexec/README.md: -------------------------------------------------------------------------------- 1 | # reexec 2 | 3 | The `reexec` package facilitates the busybox style reexec of the docker binary that we require because 4 | of the forking limitations of using Go. Handlers can be registered with a name and the argv 0 of 5 | the exec of the binary will be used to find and execute custom init paths. 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/reexec/command_linux.go: -------------------------------------------------------------------------------- 1 | package reexec 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // Self returns the path to the current process's binary. 11 | // Returns "/proc/self/exe". 12 | func Self() string { 13 | return "/proc/self/exe" 14 | } 15 | 16 | // Command returns *exec.Cmd which has Path as current binary. Also it setting 17 | // SysProcAttr.Pdeathsig to SIGTERM. 18 | // This will use the in-memory version (/proc/self/exe) of the current binary, 19 | // it is thus safe to delete or replace the on-disk binary (os.Args[0]). 20 | func Command(args ...string) *exec.Cmd { 21 | return &exec.Cmd{ 22 | Path: Self(), 23 | Args: args, 24 | SysProcAttr: &syscall.SysProcAttr{ 25 | Pdeathsig: unix.SIGTERM, 26 | }, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/reexec/command_unix.go: -------------------------------------------------------------------------------- 1 | // +build freebsd darwin 2 | 3 | package reexec 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | // Self returns the path to the current process's binary. 10 | // Uses os.Args[0]. 11 | func Self() string { 12 | return naiveSelf() 13 | } 14 | 15 | // Command returns *exec.Cmd which has Path as current binary. 16 | // For example if current binary is "docker" at "/usr/bin/", then cmd.Path will 17 | // be set to "/usr/bin/docker". 18 | func Command(args ...string) *exec.Cmd { 19 | return &exec.Cmd{ 20 | Path: Self(), 21 | Args: args, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/reexec/command_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd,!darwin 2 | 3 | package reexec 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | // Command is unsupported on operating systems apart from Linux, Windows, and Darwin. 10 | func Command(args ...string) *exec.Cmd { 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/reexec/command_windows.go: -------------------------------------------------------------------------------- 1 | package reexec 2 | 3 | import ( 4 | "os/exec" 5 | ) 6 | 7 | // Self returns the path to the current process's binary. 8 | // Uses os.Args[0]. 9 | func Self() string { 10 | return naiveSelf() 11 | } 12 | 13 | // Command returns *exec.Cmd which has Path as current binary. 14 | // For example if current binary is "docker.exe" at "C:\", then cmd.Path will 15 | // be set to "C:\docker.exe". 16 | func Command(args ...string) *exec.Cmd { 17 | return &exec.Cmd{ 18 | Path: Self(), 19 | Args: args, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/chtimes_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "time" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Unix, the create 10 | //time is updated as a side effect of setting the modified time, so 11 | //no action is required. 12 | func setCTime(path string, ctime time.Time) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/chtimes_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "time" 5 | 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Windows, this requires 10 | //calling SetFileTime and explicitly including the create time. 11 | func setCTime(path string, ctime time.Time) error { 12 | ctimespec := windows.NsecToTimespec(ctime.UnixNano()) 13 | pathp, e := windows.UTF16PtrFromString(path) 14 | if e != nil { 15 | return e 16 | } 17 | h, e := windows.CreateFile(pathp, 18 | windows.FILE_WRITE_ATTRIBUTES, windows.FILE_SHARE_WRITE, nil, 19 | windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0) 20 | if e != nil { 21 | return e 22 | } 23 | defer windows.Close(h) 24 | c := windows.NsecToFiletime(windows.TimespecToNsec(ctimespec)) 25 | return windows.SetFileTime(h, &c, nil, nil) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrNotSupportedPlatform means the platform is not supported. 9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/exitcode.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "syscall" 7 | ) 8 | 9 | // GetExitCode returns the ExitStatus of the specified error if its type is 10 | // exec.ExitError, returns 0 and an error otherwise. 11 | func GetExitCode(err error) (int, error) { 12 | exitCode := 0 13 | if exiterr, ok := err.(*exec.ExitError); ok { 14 | if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok { 15 | return procExit.ExitStatus(), nil 16 | } 17 | } 18 | return exitCode, fmt.Errorf("failed to get exit code") 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | "unsafe" 7 | ) 8 | 9 | // Used by chtimes 10 | var maxTime time.Time 11 | 12 | func init() { 13 | // chtimes initialization 14 | if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 { 15 | // This is a 64 bit timespec 16 | // os.Chtimes limits time to the following 17 | maxTime = time.Unix(0, 1<<63-1) 18 | } else { 19 | // This is a 32 bit timespec 20 | maxTime = time.Unix(1<<31-1, 0) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | // InitLCOW does nothing since LCOW is a windows only feature 6 | func InitLCOW(experimental bool) { 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "os" 4 | 5 | // lcowSupported determines if Linux Containers on Windows are supported. 6 | var lcowSupported = false 7 | 8 | // InitLCOW sets whether LCOW is supported or not 9 | // TODO @jhowardmsft. 10 | // 1. Replace with RS3 RTM build number. 11 | // 2. Remove the getenv check when image-store is coalesced as shouldn't be needed anymore. 12 | func InitLCOW(experimental bool) { 13 | v := GetOSVersion() 14 | if experimental && v.Build > 16270 && os.Getenv("LCOW_SUPPORTED") != "" { 15 | lcowSupported = true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lcow_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | // LCOWSupported returns true if Linux containers on Windows are supported. 6 | func LCOWSupported() bool { 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lcow_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // LCOWSupported returns true if Linux containers on Windows are supported. 4 | func LCOWSupported() bool { 5 | return lcowSupported 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lstat_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Lstat takes a path to a file and returns 10 | // a system.StatT type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*StatT, error) { 14 | s := &syscall.Stat_t{} 15 | if err := syscall.Lstat(path, s); err != nil { 16 | return nil, err 17 | } 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lstat_unix_test.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | "testing" 8 | ) 9 | 10 | // TestLstat tests Lstat for existing and non existing files 11 | func TestLstat(t *testing.T) { 12 | file, invalid, _, dir := prepareFiles(t) 13 | defer os.RemoveAll(dir) 14 | 15 | statFile, err := Lstat(file) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | if statFile == nil { 20 | t.Fatal("returned empty stat for existing file") 21 | } 22 | 23 | statInvalid, err := Lstat(invalid) 24 | if err == nil { 25 | t.Fatal("did not return error for non-existing file") 26 | } 27 | if statInvalid != nil { 28 | t.Fatal("returned non-nil stat for non-existing file") 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "os" 4 | 5 | // Lstat calls os.Lstat to get a fileinfo interface back. 6 | // This is then copied into our own locally defined structure. 7 | func Lstat(path string) (*StatT, error) { 8 | fi, err := os.Lstat(path) 9 | if err != nil { 10 | return nil, err 11 | } 12 | 13 | return fromStatT(&fi) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // MemInfo contains memory statistics of the host system. 4 | type MemInfo struct { 5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the 6 | // kernel binary code). 7 | MemTotal int64 8 | 9 | // Amount of free memory. 10 | MemFree int64 11 | 12 | // Total amount of swap space available. 13 | SwapTotal int64 14 | 15 | // Amount of swap space that is currently unused. 16 | SwapFree int64 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | // ReadMemInfo is not supported on platforms other than linux and windows. 6 | func ReadMemInfo() (*MemInfo, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // Mknod is not implemented on Windows. 4 | func Mknod(path string, mode uint32, dev int) error { 5 | return ErrNotSupportedPlatform 6 | } 7 | 8 | // Mkdev is not implemented on Windows. 9 | func Mkdev(major int64, minor int64) uint32 { 10 | panic("Mkdev not implemented on Windows.") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/process_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd darwin 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsProcessAlive returns true if process with a given pid is running. 12 | func IsProcessAlive(pid int) bool { 13 | err := unix.Kill(pid, syscall.Signal(0)) 14 | if err == nil || err == unix.EPERM { 15 | return true 16 | } 17 | 18 | return false 19 | } 20 | 21 | // KillProcess force-stops a process. 22 | func KillProcess(pid int) { 23 | unix.Kill(pid, unix.SIGKILL) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/process_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "os" 4 | 5 | // IsProcessAlive returns true if process with a given pid is running. 6 | func IsProcessAlive(pid int) bool { 7 | _, err := os.FindProcess(pid) 8 | 9 | return err == nil 10 | } 11 | 12 | // KillProcess force-stops a process. 13 | func KillProcess(pid int) { 14 | p, err := os.FindProcess(pid) 15 | if err == nil { 16 | p.Kill() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: s.Mode, 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: s.Rdev, 12 | mtim: s.Mtim}, nil 13 | } 14 | 15 | // FromStatT converts a syscall.Stat_t type to a system.Stat_t type 16 | // This is exposed on Linux as pkg/archive/changes uses it. 17 | func FromStatT(s *syscall.Stat_t) (*StatT, error) { 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_openbsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_solaris.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/syscall_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package system 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | // Unmount is a platform-specific helper function to call 8 | // the unmount syscall. 9 | func Unmount(dest string) error { 10 | return unix.Unmount(dest, 0) 11 | } 12 | 13 | // CommandLineToArgv should not be used on Unix. 14 | // It simply returns commandLine in the only element in the returned array. 15 | func CommandLineToArgv(commandLine string) ([]string, error) { 16 | return []string{commandLine}, nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/syscall_windows_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "testing" 4 | 5 | func TestHasWin32KSupport(t *testing.T) { 6 | s := HasWin32KSupport() // make sure this doesn't panic 7 | 8 | t.Logf("win32k: %v", s) // will be different on different platforms -- informative only 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // Umask sets current process's file mode creation mask to newmask 10 | // and returns oldmask. 11 | func Umask(newmask int) (oldmask int, err error) { 12 | return unix.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // Umask is not supported on the windows platform. 4 | func Umask(newmask int) (oldmask int, err error) { 5 | // should not be called on cli code path 6 | return 0, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // LUtimesNano is used to change access and modification time of the specified path. 11 | // It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm. 12 | func LUtimesNano(path string, ts []syscall.Timespec) error { 13 | var _path *byte 14 | _path, err := unix.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := unix.Syscall(unix.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != unix.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // LUtimesNano is used to change access and modification time of the specified path. 11 | // It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm. 12 | func LUtimesNano(path string, ts []syscall.Timespec) error { 13 | atFdCwd := unix.AT_FDCWD 14 | 15 | var _path *byte 16 | _path, err := unix.BytePtrFromString(path) 17 | if err != nil { 18 | return err 19 | } 20 | if _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), unix.AT_SYMLINK_NOFOLLOW, 0, 0); err != 0 && err != unix.ENOSYS { 21 | return err 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // LUtimesNano is only supported on linux and freebsd. 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | return ErrNotSupportedPlatform 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | // Lgetxattr is not supported on platforms other than linux. 6 | func Lgetxattr(path string, attr string) ([]byte, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | 10 | // Lsetxattr is not supported on platforms other than linux. 11 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-connections?status.svg)](https://godoc.org/github.com/docker/go-connections) 2 | 3 | # Introduction 4 | 5 | go-connections provides common package to work with network connections. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-connections) for examples and documentation. 10 | 11 | ## License 12 | 13 | go-connections is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | pre: 3 | # setup ipv6 4 | - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 5 | post: 6 | # install golint 7 | - go get github.com/golang/lint/golint 8 | 9 | test: 10 | pre: 11 | # run analysis before tests 12 | - go vet ./... 13 | - test -z "$(golint ./... | tee /dev/stderr)" 14 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/doc.go: -------------------------------------------------------------------------------- 1 | // Package connections provides libraries to work with network connections. 2 | // This library is divided in several components for specific usage. 3 | package connections 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/onion/8ad6491f17e7e93843618725b7d7b593967ec856/vendor/github.com/docker/go-connections/sockets/README.md -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/inmem_socket_test.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import "testing" 4 | 5 | func TestInmemSocket(t *testing.T) { 6 | l := NewInmemSocket("test", 0) 7 | defer l.Close() 8 | go func() { 9 | for { 10 | conn, err := l.Accept() 11 | if err != nil { 12 | return 13 | } 14 | conn.Write([]byte("hello")) 15 | conn.Close() 16 | } 17 | }() 18 | 19 | conn, err := l.Dial("test", "test") 20 | if err != nil { 21 | t.Fatal(err) 22 | } 23 | 24 | buf := make([]byte, 5) 25 | _, err = conn.Read(buf) 26 | if err != nil { 27 | t.Fatal(err) 28 | } 29 | 30 | if string(buf) != "hello" { 31 | t.Fatalf("expected `hello`, got %s", string(buf)) 32 | } 33 | 34 | l.Close() 35 | conn, err = l.Dial("test", "test") 36 | if err != errClosed { 37 | t.Fatalf("expected `errClosed` error, got %v", err) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets_windows.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/Microsoft/go-winio" 9 | ) 10 | 11 | func configureUnixTransport(tr *http.Transport, proto, addr string) error { 12 | return ErrProtocolNotAvailable 13 | } 14 | 15 | func configureNpipeTransport(tr *http.Transport, proto, addr string) error { 16 | // No need for compression in local communications. 17 | tr.DisableCompression = true 18 | tr.Dial = func(_, _ string) (net.Conn, error) { 19 | return DialPipe(addr, defaultTimeout) 20 | } 21 | return nil 22 | } 23 | 24 | // DialPipe connects to a Windows named pipe. 25 | func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { 26 | return winio.DialPipe(addr, &timeout) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/tcp_socket.go: -------------------------------------------------------------------------------- 1 | // Package sockets provides helper functions to create and configure Unix or TCP sockets. 2 | package sockets 3 | 4 | import ( 5 | "crypto/tls" 6 | "net" 7 | ) 8 | 9 | // NewTCPSocket creates a TCP socket listener with the specified address and 10 | // the specified tls configuration. If TLSConfig is set, will encapsulate the 11 | // TCP listener inside a TLS one. 12 | func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { 13 | l, err := net.Listen("tcp", addr) 14 | if err != nil { 15 | return nil, err 16 | } 17 | if tlsConfig != nil { 18 | tlsConfig.NextProtos = []string{"http/1.1"} 19 | l = tls.NewListener(l, tlsConfig) 20 | } 21 | return l, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/unix_socket.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "net" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | // NewUnixSocket creates a unix socket with the specified path and group. 12 | func NewUnixSocket(path string, gid int) (net.Listener, error) { 13 | if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { 14 | return nil, err 15 | } 16 | mask := syscall.Umask(0777) 17 | defer syscall.Umask(mask) 18 | 19 | l, err := net.Listen("unix", path) 20 | if err != nil { 21 | return nil, err 22 | } 23 | if err := os.Chown(path, 0, gid); err != nil { 24 | l.Close() 25 | return nil, err 26 | } 27 | if err := os.Chmod(path, 0660); err != nil { 28 | l.Close() 29 | return nil, err 30 | } 31 | return l, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/certpool_go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | "runtime" 8 | ) 9 | 10 | // SystemCertPool returns a copy of the system cert pool, 11 | // returns an error if failed to load or empty pool on windows. 12 | func SystemCertPool() (*x509.CertPool, error) { 13 | certpool, err := x509.SystemCertPool() 14 | if err != nil && runtime.GOOS == "windows" { 15 | return x509.NewCertPool(), nil 16 | } 17 | return certpool, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | 8 | ) 9 | 10 | // SystemCertPool returns an new empty cert pool, 11 | // accessing system cert pool is supported in go 1.7 12 | func SystemCertPool() (*x509.CertPool, error) { 13 | return x509.NewCertPool(), nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 14 | tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 15 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 16 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 14 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | sudo: required 3 | services: 4 | - docker 5 | notifications: 6 | email: false 7 | script: 8 | - make test 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all test test-local install-deps lint fmt vet 2 | 3 | REPO_NAME = go-plugins-helpers 4 | REPO_OWNER = docker 5 | PKG_NAME = github.com/${REPO_OWNER}/${REPO_NAME} 6 | IMAGE = golang:1.7 7 | 8 | all: test 9 | 10 | test-local: install-deps fmt lint vet 11 | @echo "+ $@" 12 | @go test -v ./... 13 | 14 | test: 15 | @docker run -v ${shell pwd}:/go/src/${PKG_NAME} -w /go/src/${PKG_NAME} ${IMAGE} make test-local 16 | 17 | install-deps: 18 | @echo "+ $@" 19 | @go get -u github.com/golang/lint/golint 20 | @go get -d -t ./... 21 | 22 | lint: 23 | @echo "+ $@" 24 | @test -z "$$(golint ./... | tee /dev/stderr)" 25 | 26 | fmt: 27 | @echo "+ $@" 28 | @test -z "$$(gofmt -s -l . | tee /dev/stderr)" 29 | 30 | vet: 31 | @echo "+ $@" 32 | @go vet ./... 33 | 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2015 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/pool.go: -------------------------------------------------------------------------------- 1 | package sdk 2 | 3 | import ( 4 | "io" 5 | "sync" 6 | ) 7 | 8 | const buffer32K = 32 * 1024 9 | 10 | var buffer32KPool = &sync.Pool{New: func() interface{} { return make([]byte, buffer32K) }} 11 | 12 | // copyBuf uses a shared buffer pool with io.CopyBuffer 13 | func copyBuf(w io.Writer, r io.Reader) (int64, error) { 14 | buf := buffer32KPool.Get().([]byte) 15 | written, err := io.CopyBuffer(w, r, buf) 16 | buffer32KPool.Put(buf) 17 | return written, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/sdk_test.go: -------------------------------------------------------------------------------- 1 | package sdk 2 | 3 | import "testing" 4 | 5 | func TestTrue(t *testing.T) { 6 | // FIXME: Add tests 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_nosystemd.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | // +build nosystemd 3 | 4 | package sdk 5 | 6 | import "net" 7 | 8 | func setupSocketActivation() (net.Listener, error) { 9 | return nil, nil 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package sdk 4 | 5 | import ( 6 | "errors" 7 | "net" 8 | ) 9 | 10 | var ( 11 | errOnlySupportedOnLinuxAndFreeBSD = errors.New("unix socket creation is only supported on Linux and FreeBSD") 12 | ) 13 | 14 | func newUnixListener(pluginName string, gid int) (net.Listener, string, error) { 15 | return nil, "", errOnlySupportedOnLinuxAndFreeBSD 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sdk 4 | 5 | import ( 6 | "errors" 7 | "net" 8 | ) 9 | 10 | var ( 11 | errOnlySupportedOnWindows = errors.New("named pipe creation is only supported on Windows") 12 | ) 13 | 14 | func newWindowsListener(address, pluginName, daemonRoot string, pipeConfig *WindowsPipeConfig) (net.Listener, string, error) { 15 | return nil, "", errOnlySupportedOnWindows 16 | } 17 | 18 | func windowsCreateDirectoryWithACL(name string) error { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-plugins-helpers/sdk/windows_pipe_config.go: -------------------------------------------------------------------------------- 1 | package sdk 2 | 3 | // WindowsPipeConfig is a helper structure for configuring named pipe parameters on Windows. 4 | type WindowsPipeConfig struct { 5 | // SecurityDescriptor contains a Windows security descriptor in SDDL format. 6 | SecurityDescriptor string 7 | 8 | // InBufferSize in bytes. 9 | InBufferSize int32 10 | 11 | // OutBufferSize in bytes. 12 | OutBufferSize int32 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get github.com/golang/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | bin/ 6 | 7 | # Folders 8 | integration-tmp/ 9 | _obj 10 | _test 11 | .vagrant 12 | 13 | 14 | # Architecture specific extensions/prefixes 15 | *.[568vq] 16 | [568vq].out 17 | 18 | *.cgo1.go 19 | *.cgo2.c 20 | _cgo_defun.c 21 | _cgo_gotypes.go 22 | _cgo_export.* 23 | 24 | _testmain.go 25 | 26 | *.exe 27 | *.test 28 | *.prof 29 | cmd/dnet/dnet 30 | 31 | # Coverage 32 | *.tmp 33 | *.coverprofile 34 | 35 | # IDE files and folders 36 | .project 37 | .settings/ 38 | 39 | libnetworkbuild.created 40 | test/networkDb/testMain 41 | test/networkDb/gossipdb 42 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/Dockerfile.build: -------------------------------------------------------------------------------- 1 | FROM golang:1.8.5 2 | RUN apt-get update && apt-get -y install iptables 3 | 4 | RUN go get github.com/tools/godep \ 5 | github.com/golang/lint/golint \ 6 | golang.org/x/tools/cmd/cover \ 7 | github.com/mattn/goveralls \ 8 | github.com/gordonklaus/ineffassign \ 9 | github.com/client9/misspell/cmd/misspell \ 10 | honnef.co/go/tools/cmd/gosimple 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | environment: 3 | GODIST: "go1.7.1.linux-amd64.tar.gz" 4 | services: 5 | - docker 6 | 7 | dependencies: 8 | override: 9 | - sudo apt-get update; sudo apt-get install -y iptables zookeeperd 10 | - go get golang.org/x/tools/cmd/goimports 11 | 12 | test: 13 | override: 14 | - make circle-ci 15 | post: 16 | - bash <(curl -s https://codecov.io/bash) -C "$(git log --format="%H" -n 1)" 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/default_gateway_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/libnetwork/types" 4 | 5 | const libnGWNetwork = "docker_gwbridge" 6 | 7 | func getPlatformOption() EndpointOption { 8 | return nil 9 | } 10 | 11 | func (c *controller) createGWNetwork() (Network, error) { 12 | return nil, types.NotImplementedErrorf("default gateway functionality is not implemented in freebsd") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/default_gateway_linux.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | 7 | "github.com/docker/libnetwork/drivers/bridge" 8 | ) 9 | 10 | const libnGWNetwork = "docker_gwbridge" 11 | 12 | func getPlatformOption() EndpointOption { 13 | return nil 14 | } 15 | 16 | func (c *controller) createGWNetwork() (Network, error) { 17 | netOption := map[string]string{ 18 | bridge.BridgeName: libnGWNetwork, 19 | bridge.EnableICC: strconv.FormatBool(false), 20 | bridge.EnableIPMasquerade: strconv.FormatBool(true), 21 | } 22 | 23 | n, err := c.NewNetwork("bridge", libnGWNetwork, "", 24 | NetworkOptionDriverOpts(netOption), 25 | NetworkOptionEnableIPv6(false), 26 | ) 27 | 28 | if err != nil { 29 | return nil, fmt.Errorf("error creating external connectivity network: %v", err) 30 | } 31 | return n, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/default_gateway_windows.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | windriver "github.com/docker/libnetwork/drivers/windows" 5 | "github.com/docker/libnetwork/options" 6 | "github.com/docker/libnetwork/types" 7 | ) 8 | 9 | const libnGWNetwork = "nat" 10 | 11 | func getPlatformOption() EndpointOption { 12 | 13 | epOption := options.Generic{ 14 | windriver.DisableICC: true, 15 | windriver.DisableDNS: true, 16 | } 17 | return EndpointOptionGeneric(epOption) 18 | } 19 | 20 | func (c *controller) createGWNetwork() (Network, error) { 21 | return nil, types.NotImplementedErrorf("default gateway functionality is not implemented in windows") 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_experimental_linux.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/libnetwork/drivers/ipvlan" 4 | 5 | func additionalDrivers() []initializer { 6 | return []initializer{ 7 | {ipvlan.Init, "ipvlan"}, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/null" 5 | "github.com/docker/libnetwork/drivers/remote" 6 | ) 7 | 8 | func getInitializers(experimental bool) []initializer { 9 | return []initializer{ 10 | {null.Init, "null"}, 11 | {remote.Init, "remote"}, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_ipam.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drvregistry" 5 | "github.com/docker/libnetwork/ipamapi" 6 | builtinIpam "github.com/docker/libnetwork/ipams/builtin" 7 | nullIpam "github.com/docker/libnetwork/ipams/null" 8 | remoteIpam "github.com/docker/libnetwork/ipams/remote" 9 | ) 10 | 11 | func initIPAMDrivers(r *drvregistry.DrvRegistry, lDs, gDs interface{}) error { 12 | for _, fn := range [](func(ipamapi.Callback, interface{}, interface{}) error){ 13 | builtinIpam.Init, 14 | remoteIpam.Init, 15 | nullIpam.Init, 16 | } { 17 | if err := fn(r, lDs, gDs); err != nil { 18 | return err 19 | } 20 | } 21 | 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_linux.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/bridge" 5 | "github.com/docker/libnetwork/drivers/host" 6 | "github.com/docker/libnetwork/drivers/macvlan" 7 | "github.com/docker/libnetwork/drivers/null" 8 | "github.com/docker/libnetwork/drivers/overlay" 9 | "github.com/docker/libnetwork/drivers/remote" 10 | ) 11 | 12 | func getInitializers(experimental bool) []initializer { 13 | in := []initializer{ 14 | {bridge.Init, "bridge"}, 15 | {host.Init, "host"}, 16 | {macvlan.Init, "macvlan"}, 17 | {null.Init, "null"}, 18 | {remote.Init, "remote"}, 19 | {overlay.Init, "overlay"}, 20 | } 21 | 22 | if experimental { 23 | in = append(in, additionalDrivers()...) 24 | } 25 | return in 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_windows.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/null" 5 | "github.com/docker/libnetwork/drivers/remote" 6 | "github.com/docker/libnetwork/drivers/windows" 7 | "github.com/docker/libnetwork/drivers/windows/overlay" 8 | ) 9 | 10 | func getInitializers(experimental bool) []initializer { 11 | return []initializer{ 12 | {null.Init, "null"}, 13 | {overlay.Init, "overlay"}, 14 | {remote.Init, "remote"}, 15 | {windows.GetInit("transparent"), "transparent"}, 16 | {windows.GetInit("l2bridge"), "l2bridge"}, 17 | {windows.GetInit("l2tunnel"), "l2tunnel"}, 18 | {windows.GetInit("nat"), "nat"}, 19 | {windows.GetInit("ics"), "ics"}, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/endpoint_info_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package libnetwork 4 | 5 | import "fmt" 6 | 7 | func (ep *endpoint) DriverInfo() (map[string]interface{}, error) { 8 | ep, err := ep.retrieveFromStore() 9 | if err != nil { 10 | return nil, err 11 | } 12 | 13 | if sb, ok := ep.getSandbox(); ok { 14 | if gwep := sb.getEndpointInGWNetwork(); gwep != nil && gwep.ID() != ep.ID() { 15 | return gwep.DriverInfo() 16 | } 17 | } 18 | 19 | n, err := ep.getNetworkFromStore() 20 | if err != nil { 21 | return nil, fmt.Errorf("could not find network in store for driver info: %v", err) 22 | } 23 | 24 | driver, err := n.driver(true) 25 | if err != nil { 26 | return nil, fmt.Errorf("failed to get driver info: %v", err) 27 | } 28 | 29 | return driver.EndpointOperInfo(n.ID(), ep.ID()) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/firewall_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package libnetwork 4 | 5 | func arrangeUserFilterRule() { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/ipamutils/utils_test.go: -------------------------------------------------------------------------------- 1 | package ipamutils 2 | 3 | import ( 4 | "testing" 5 | 6 | _ "github.com/docker/libnetwork/testutils" 7 | ) 8 | 9 | func init() { 10 | InitNetworks() 11 | } 12 | 13 | func TestGranularPredefined(t *testing.T) { 14 | for _, nw := range PredefinedGranularNetworks { 15 | if ones, bits := nw.Mask.Size(); bits != 32 || ones != 24 { 16 | t.Fatalf("Unexpected size for network in granular list: %v", nw) 17 | } 18 | } 19 | 20 | for _, nw := range PredefinedBroadNetworks { 21 | if ones, bits := nw.Mask.Size(); bits != 32 || (ones != 20 && ones != 16) { 22 | t.Fatalf("Unexpected size for network in broad list: %v", nw) 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/network_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package libnetwork 4 | 5 | import "github.com/docker/libnetwork/ipamapi" 6 | 7 | // Stub implementations for DNS related functions 8 | 9 | func (n *network) startResolver() { 10 | } 11 | 12 | func defaultIpamForNetworkType(networkType string) string { 13 | return ipamapi.DefaultIPAM 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/interface_freebsd.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/interface_windows.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/namespace_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 2 | 3 | package osl 4 | 5 | // GC triggers garbage collection of namespace path right away 6 | // and waits for it. 7 | func GC() { 8 | } 9 | 10 | // GetSandboxForExternalKey returns sandbox object for the supplied path 11 | func GetSandboxForExternalKey(path string, key string) (Sandbox, error) { 12 | return nil, nil 13 | } 14 | 15 | // SetBasePath sets the base url prefix for the ns path 16 | func SetBasePath(path string) { 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/neigh_freebsd.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/neigh_windows.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/sandbox_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 2 | 3 | package osl 4 | 5 | import "errors" 6 | 7 | var ( 8 | // ErrNotImplemented is for platforms which don't implement sandbox 9 | ErrNotImplemented = errors.New("not implemented") 10 | ) 11 | 12 | // NewSandbox provides a new sandbox instance created in an os specific way 13 | // provided a key which uniquely identifies the sandbox 14 | func NewSandbox(key string, osCreate, isRestore bool) (Sandbox, error) { 15 | return nil, ErrNotImplemented 16 | } 17 | 18 | // GenerateKey generates a sandbox key based on the passed 19 | // container id. 20 | func GenerateKey(containerID string) string { 21 | return "" 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/sandbox_unsupported_test.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package osl 4 | 5 | import ( 6 | "errors" 7 | "testing" 8 | ) 9 | 10 | var ErrNotImplemented = errors.New("not implemented") 11 | 12 | func newKey(t *testing.T) (string, error) { 13 | return nil, ErrNotImplemented 14 | } 15 | 16 | func verifySandbox(t *testing.T, s Sandbox) { 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/portmapper/mock_proxy.go: -------------------------------------------------------------------------------- 1 | package portmapper 2 | 3 | import "net" 4 | 5 | func newMockProxyCommand(proto string, hostIP net.IP, hostPort int, containerIP net.IP, containerPort int, userlandProxyPath string) (userlandProxy, error) { 6 | return &mockProxyCommand{}, nil 7 | } 8 | 9 | type mockProxyCommand struct { 10 | } 11 | 12 | func (p *mockProxyCommand) Start() error { 13 | return nil 14 | } 15 | 16 | func (p *mockProxyCommand) Stop() error { 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/resolvconf/README.md: -------------------------------------------------------------------------------- 1 | Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/resolver_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package libnetwork 4 | 5 | func (r *resolver) setupIPTable() error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/sandbox_dns_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package libnetwork 4 | 5 | import ( 6 | "github.com/docker/libnetwork/etchosts" 7 | ) 8 | 9 | // Stub implementations for DNS related functions 10 | 11 | func (sb *sandbox) startResolver(bool) { 12 | } 13 | 14 | func (sb *sandbox) setupResolutionFiles() error { 15 | return nil 16 | } 17 | 18 | func (sb *sandbox) restorePath() { 19 | } 20 | 21 | func (sb *sandbox) updateHostsFile(ifaceIP string) error { 22 | return nil 23 | } 24 | 25 | func (sb *sandbox) addHostsEntries(recs []etchosts.Record) { 26 | 27 | } 28 | 29 | func (sb *sandbox) deleteHostsEntries(recs []etchosts.Record) { 30 | 31 | } 32 | 33 | func (sb *sandbox) updateDNS(ipv6Enabled bool) error { 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/sandbox_externalkey.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/docker/pkg/reexec" 4 | 5 | type setKeyData struct { 6 | ContainerID string 7 | Key string 8 | } 9 | 10 | func init() { 11 | reexec.Register("libnetwork-setkey", processSetKeyReexec) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/service_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package libnetwork 4 | 5 | import ( 6 | "fmt" 7 | "net" 8 | ) 9 | 10 | func (c *controller) cleanupServiceBindings(nid string) { 11 | } 12 | 13 | func (c *controller) addServiceBinding(name, sid, nid, eid string, vip net.IP, ingressPorts []*PortConfig, aliases []string, ip net.IP) error { 14 | return fmt.Errorf("not supported") 15 | } 16 | 17 | func (c *controller) rmServiceBinding(name, sid, nid, eid string, vip net.IP, ingressPorts []*PortConfig, aliases []string, ip net.IP) error { 18 | return fmt.Errorf("not supported") 19 | } 20 | 21 | func (sb *sandbox) populateLoadbalancers(ep *endpoint) { 22 | } 23 | 24 | func arrangeIngressFilterRule() { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/wrapmake.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | function raise() 6 | { 7 | kill -$1 0 8 | } 9 | 10 | trap "raise SIGINT" SIGINT 11 | make $1 12 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: precise 2 | language: go 3 | go_import_path: github.com/godbus/dbus 4 | sudo: true 5 | 6 | go: 7 | - 1.6.3 8 | - 1.7.3 9 | - tip 10 | 11 | env: 12 | global: 13 | matrix: 14 | - TARGET=amd64 15 | - TARGET=arm64 16 | - TARGET=arm 17 | - TARGET=386 18 | - TARGET=ppc64le 19 | 20 | matrix: 21 | fast_finish: true 22 | allow_failures: 23 | - go: tip 24 | exclude: 25 | - go: tip 26 | env: TARGET=arm 27 | - go: tip 28 | env: TARGET=arm64 29 | - go: tip 30 | env: TARGET=386 31 | - go: tip 32 | env: TARGET=ppc64le 33 | 34 | addons: 35 | apt: 36 | packages: 37 | - dbus 38 | - dbus-x11 39 | 40 | before_install: 41 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brian Waldon (@bcwaldon) 3 | John Southworth (@jsouthworth) 4 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/auth_external.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // AuthExternal returns an Auth that authenticates as the given user with the 8 | // EXTERNAL mechanism. 9 | func AuthExternal(user string) Auth { 10 | return authExternal{user} 11 | } 12 | 13 | // AuthExternal implements the EXTERNAL authentication mechanism. 14 | type authExternal struct { 15 | user string 16 | } 17 | 18 | func (a authExternal) FirstData() ([]byte, []byte, AuthStatus) { 19 | b := make([]byte, 2*len(a.user)) 20 | hex.Encode(b, []byte(a.user)) 21 | return []byte("EXTERNAL"), b, AuthOk 22 | } 23 | 24 | func (a authExternal) HandleData(b []byte) ([]byte, AuthStatus) { 25 | return nil, AuthError 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/conn_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | ) 9 | 10 | const defaultSystemBusAddress = "unix:path=/opt/local/var/run/dbus/system_bus_socket" 11 | 12 | func getSessionBusPlatformAddress() (string, error) { 13 | cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET") 14 | b, err := cmd.CombinedOutput() 15 | 16 | if err != nil { 17 | return "", err 18 | } 19 | 20 | if len(b) == 0 { 21 | return "", errors.New("dbus: couldn't determine address of session bus") 22 | } 23 | 24 | return "unix:path=" + string(b[:len(b)-1]), nil 25 | } 26 | 27 | func getSystemBusPlatformAddress() string { 28 | address := os.Getenv("DBUS_LAUNCHD_SESSION_BUS_SOCKET") 29 | if address != "" { 30 | return fmt.Sprintf("unix:path=%s", address) 31 | } 32 | return defaultSystemBusAddress 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/homedir.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "os" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | homeDir string 10 | homeDirLock sync.Mutex 11 | ) 12 | 13 | func getHomeDir() string { 14 | homeDirLock.Lock() 15 | defer homeDirLock.Unlock() 16 | 17 | if homeDir != "" { 18 | return homeDir 19 | } 20 | 21 | homeDir = os.Getenv("HOME") 22 | if homeDir != "" { 23 | return homeDir 24 | } 25 | 26 | homeDir = lookupHomeDir() 27 | return homeDir 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/homedir_dynamic.go: -------------------------------------------------------------------------------- 1 | // +build !static_build 2 | 3 | package dbus 4 | 5 | import ( 6 | "os/user" 7 | ) 8 | 9 | func lookupHomeDir() string { 10 | u, err := user.Current() 11 | if err != nil { 12 | return "/" 13 | } 14 | return u.HomeDir 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/homedir_static.go: -------------------------------------------------------------------------------- 1 | // +build static_build 2 | 3 | package dbus 4 | 5 | import ( 6 | "bufio" 7 | "os" 8 | "strconv" 9 | "strings" 10 | ) 11 | 12 | func lookupHomeDir() string { 13 | myUid := os.Getuid() 14 | 15 | f, err := os.Open("/etc/passwd") 16 | if err != nil { 17 | return "/" 18 | } 19 | defer f.Close() 20 | 21 | s := bufio.NewScanner(f) 22 | 23 | for s.Scan() { 24 | if err := s.Err(); err != nil { 25 | break 26 | } 27 | 28 | line := strings.TrimSpace(s.Text()) 29 | if line == "" { 30 | continue 31 | } 32 | 33 | parts := strings.Split(line, ":") 34 | 35 | if len(parts) >= 6 { 36 | uid, err := strconv.Atoi(parts[2]) 37 | if err == nil && uid == myUid { 38 | return parts[5] 39 | } 40 | } 41 | } 42 | 43 | // Default to / if we can't get a better value 44 | return "/" 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/transport_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/transport_tcp_test.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | "testing" 7 | ) 8 | 9 | func TestTcpConnection(t *testing.T) { 10 | listener, err := net.Listen("tcp", "127.0.0.1:0") 11 | if err != nil { 12 | t.Fatal("Failed to create listener") 13 | } 14 | host, port, err := net.SplitHostPort(listener.Addr().String()) 15 | if err != nil { 16 | t.Fatal("Failed to parse host/port") 17 | } 18 | 19 | conn, err := Dial(fmt.Sprintf("tcp:host=%s,port=%s", host, port)) 20 | if err != nil { 21 | t.Error("Expected no error, got", err) 22 | } 23 | if conn == nil { 24 | t.Error("Expected connection, got nil") 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/transport_unixcred_linux.go: -------------------------------------------------------------------------------- 1 | // The UnixCredentials system call is currently only implemented on Linux 2 | // http://golang.org/src/pkg/syscall/sockcmsg_linux.go 3 | // https://golang.org/s/go1.4-syscall 4 | // http://code.google.com/p/go/source/browse/unix/sockcmsg_linux.go?repo=sys 5 | 6 | package dbus 7 | 8 | import ( 9 | "io" 10 | "os" 11 | "syscall" 12 | ) 13 | 14 | func (t *unixTransport) SendNullByte() error { 15 | ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())} 16 | b := syscall.UnixCredentials(ucred) 17 | _, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil) 18 | if err != nil { 19 | return err 20 | } 21 | if oobn != len(b) { 22 | return io.ErrShortWrite 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/transport_unixcred_openbsd.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import "io" 4 | 5 | func (t *unixTransport) SendNullByte() error { 6 | n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) 7 | if err != nil { 8 | return err 9 | } 10 | if n != 1 { 11 | return io.ErrShortWrite 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/.gitignore: -------------------------------------------------------------------------------- 1 | ._* 2 | *.js 3 | *.js.map 4 | -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/.mailmap: -------------------------------------------------------------------------------- 1 | Walter Schulze Walter Schulze 2 | Walter Schulze 3 | Walter Schulze awalterschulze 4 | Walter Schulze awalterschulze@gmail.com 5 | John Tuley 6 | Anton Povarov 7 | Denis Smirnov dennwc 8 | DongYun Kang -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/.travis.yml: -------------------------------------------------------------------------------- 1 | env: 2 | - PROTOBUF_VERSION=2.6.1 3 | - PROTOBUF_VERSION=3.0.2 4 | - PROTOBUF_VERSION=3.4.0 5 | 6 | before_install: 7 | - ./install-protobuf.sh 8 | - PATH=/home/travis/bin:$PATH protoc --version 9 | 10 | script: 11 | - PATH=/home/travis/bin:$PATH make buildserverall 12 | - echo $TRAVIS_GO_VERSION 13 | - if [ "$TRAVIS_GO_VERSION" == 1.9 ] && [[ "$PROTOBUF_VERSION" == 3.4.0 ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi 14 | 15 | language: go 16 | 17 | go: 18 | - 1.8.3 19 | - 1.9 20 | 21 | -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of GoGo authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS file, which 3 | # lists people. For example, employees are listed in CONTRIBUTORS, 4 | # but not in AUTHORS, because the employer holds the copyright. 5 | 6 | # Names should be added to this file as one of 7 | # Organization's name 8 | # Individual's name 9 | # Individual's name 10 | 11 | # Please keep the list sorted. 12 | 13 | Sendgrid, Inc 14 | Vastech SA (PTY) LTD 15 | Walter Schulze 16 | -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | The contributors to the Go protobuf repository: 2 | 3 | # This source code was written by the Go contributors. 4 | # The master list of contributors is in the main Go distribution, 5 | # visible at http://tip.golang.org/CONTRIBUTORS. -------------------------------------------------------------------------------- /vendor/github.com/gogo/protobuf/install-protobuf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | die() { 6 | echo "$@" >&2 7 | exit 1 8 | } 9 | 10 | cd /home/travis 11 | 12 | case "$PROTOBUF_VERSION" in 13 | 2*) 14 | basename=protobuf-$PROTOBUF_VERSION 15 | wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz 16 | tar xzf $basename.tar.gz 17 | cd protobuf-$PROTOBUF_VERSION 18 | ./configure --prefix=/home/travis && make -j2 && make install 19 | ;; 20 | 3*) 21 | basename=protoc-$PROTOBUF_VERSION-linux-x86_64 22 | wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip 23 | unzip $basename.zip 24 | ;; 25 | *) 26 | die "unknown protobuf version: $PROTOBUF_VERSION" 27 | ;; 28 | esac 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.mailmap: -------------------------------------------------------------------------------- 1 | Stephen J Day 2 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | approve_by_comment: true 2 | approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' 3 | reject_regex: ^Rejected 4 | reset_on_push: true 5 | author_approval: ignored 6 | signed_off_by: 7 | required: true 8 | reviewers: 9 | teams: 10 | - go-digest-maintainers 11 | name: default 12 | required: 2 13 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | - master 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Aaron Lehmann (@aaronlehmann) 2 | Brandon Philips (@philips) 3 | Brendan Burns (@brendandburns) 4 | Derek McGowan (@dmcgowan) 5 | Jason Bouzane (@jbouzane) 6 | John Starks (@jstarks) 7 | Jonathan Boulle (@jonboulle) 8 | Stephen Day (@stevvooe) 9 | Vincent Batts (@vbatts) 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/.gitignore: -------------------------------------------------------------------------------- 1 | /oci-validate-examples 2 | output 3 | header.html 4 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/.header: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Linux Foundation 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 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | requirements: 4 | signed_off_by: 5 | required: true 6 | 7 | group_defaults: 8 | required: 2 9 | approve_by_comment: 10 | enabled: true 11 | approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' 12 | reject_regex: ^Rejected 13 | reset_on_push: 14 | enabled: true 15 | author_approval: 16 | ignored: true 17 | always_pending: 18 | title_regex: ^WIP 19 | explanation: 'Work in progress...' 20 | conditions: 21 | branches: 22 | - master 23 | 24 | groups: 25 | image-spec: 26 | teams: 27 | - image-spec-maintainers 28 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | 5 | sudo: required 6 | 7 | services: 8 | - docker 9 | 10 | before_script: 11 | - export PATH=$HOME/gopath/bin:$PATH 12 | 13 | before_install: 14 | - docker pull vbatts/pandoc 15 | - make install.tools 16 | - go get -u github.com/alecthomas/gometalinter 17 | - gometalinter --install 18 | - go get -t -d ./... 19 | 20 | install: true 21 | 22 | script: 23 | - env | grep TRAVIS_ 24 | - make .gitvalidation 25 | - make lint 26 | - make check-license 27 | - make test 28 | - make docs 29 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brendan Burns (@brendandburns) 3 | Jason Bouzane (@jbouzane) 4 | John Starks (@jstarks) 5 | Jonathan Boulle (@jonboulle) 6 | Stephen Day (@stevvooe) 7 | Vincent Batts (@vbatts) 8 | Aleksa Sarai (@cyphar) 9 | Keyang Xie (@xiekeyang) 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/project.md: -------------------------------------------------------------------------------- 1 | # Project docs 2 | 3 | ## Release Process 4 | 5 | * `git tag` the prior commit (preferably signed tag) 6 | * Make a release on [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec/releases) for the version. Attach the produced docs. 7 | 8 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.3 5 | - 1.5.4 6 | - 1.6.2 7 | - 1.7.1 8 | - tip 9 | 10 | script: 11 | - go test -v ./... 12 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.6.x 4 | - 1.7.x 5 | - 1.8.x 6 | - tip 7 | env: 8 | - GOMAXPROCS=4 GORACE=halt_on_error=1 9 | install: 10 | - go get github.com/stretchr/testify/assert 11 | - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2 12 | - go get golang.org/x/sys/unix 13 | - go get golang.org/x/sys/windows 14 | script: 15 | - go test -race -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 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 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | before_script: 3 | # make sure we keep path in tact when we sudo 4 | - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers 5 | # modprobe ip_gre or else the first gre device can't be deleted 6 | - sudo modprobe ip_gre 7 | # modprobe nf_conntrack for the conntrack testing 8 | - sudo modprobe nf_conntrack 9 | - sudo modprobe nf_conntrack_netlink 10 | - sudo modprobe nf_conntrack_ipv4 11 | - sudo modprobe nf_conntrack_ipv6 12 | install: 13 | - go get github.com/vishvananda/netns 14 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/fou.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrAttrHeaderTruncated is returned when a netlink attribute's header is 9 | // truncated. 10 | ErrAttrHeaderTruncated = errors.New("attribute header truncated") 11 | // ErrAttrBodyTruncated is returned when a netlink attribute's body is 12 | // truncated. 13 | ErrAttrBodyTruncated = errors.New("attribute body truncated") 14 | ) 15 | 16 | type Fou struct { 17 | Family int 18 | Port int 19 | Protocol int 20 | EncapType int 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/fou_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | func FouAdd(f Fou) error { 6 | return ErrNotImplemented 7 | } 8 | 9 | func FouDel(f Fou) error { 10 | return ErrNotImplemented 11 | } 12 | 13 | func FouList(fam int) ([]Fou, error) { 14 | return nil, ErrNotImplemented 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/genetlink_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | type GenlOp struct{} 6 | 7 | type GenlMulticastGroup struct{} 8 | 9 | type GenlFamily struct{} 10 | 11 | func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) { 12 | return nil, ErrNotImplemented 13 | } 14 | 15 | func GenlFamilyList() ([]*GenlFamily, error) { 16 | return nil, ErrNotImplemented 17 | } 18 | 19 | func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) { 20 | return nil, ErrNotImplemented 21 | } 22 | 23 | func GenlFamilyGet(name string) (*GenlFamily, error) { 24 | return nil, ErrNotImplemented 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/link_tuntap_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | // ideally golang.org/x/sys/unix would define IfReq but it only has 4 | // IFNAMSIZ, hence this minimalistic implementation 5 | const ( 6 | SizeOfIfReq = 40 7 | IFNAMSIZ = 16 8 | ) 9 | 10 | type ifReq struct { 11 | Name [IFNAMSIZ]byte 12 | Flags uint16 13 | pad [SizeOfIfReq - IFNAMSIZ - 2]byte 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/neigh.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | // Neigh represents a link layer neighbor from netlink. 9 | type Neigh struct { 10 | LinkIndex int 11 | Family int 12 | State int 13 | Type int 14 | Flags int 15 | IP net.IP 16 | HardwareAddr net.HardwareAddr 17 | LLIPAddr net.IP //Used in the case of NHRP 18 | Vlan int 19 | VNI int 20 | } 21 | 22 | // String returns $ip/$hwaddr $label 23 | func (neigh *Neigh) String() string { 24 | return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/netlink_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "github.com/vishvananda/netlink/nl" 4 | 5 | // Family type definitions 6 | const ( 7 | FAMILY_ALL = nl.FAMILY_ALL 8 | FAMILY_V4 = nl.FAMILY_V4 9 | FAMILY_V6 = nl.FAMILY_V6 10 | FAMILY_MPLS = nl.FAMILY_MPLS 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package nl 4 | 5 | import "encoding/binary" 6 | 7 | var SupportedNlFamilies = []int{} 8 | 9 | func NativeEndian() binary.ByteOrder { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/xfrm_monitor_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | const ( 8 | SizeofXfrmUserExpire = 0xe8 9 | ) 10 | 11 | // struct xfrm_user_expire { 12 | // struct xfrm_usersa_info state; 13 | // __u8 hard; 14 | // }; 15 | 16 | type XfrmUserExpire struct { 17 | XfrmUsersaInfo XfrmUsersaInfo 18 | Hard uint8 19 | Pad [7]byte 20 | } 21 | 22 | func (msg *XfrmUserExpire) Len() int { 23 | return SizeofXfrmUserExpire 24 | } 25 | 26 | func DeserializeXfrmUserExpire(b []byte) *XfrmUserExpire { 27 | return (*XfrmUserExpire)(unsafe.Pointer(&b[0:SizeofXfrmUserExpire][0])) 28 | } 29 | 30 | func (msg *XfrmUserExpire) Serialize() []byte { 31 | return (*(*[SizeofXfrmUserExpire]byte)(unsafe.Pointer(msg)))[:] 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/order.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "encoding/binary" 5 | 6 | "github.com/vishvananda/netlink/nl" 7 | ) 8 | 9 | var ( 10 | native = nl.NativeEndian() 11 | networkOrder = binary.BigEndian 12 | ) 13 | 14 | func htonl(val uint32) []byte { 15 | bytes := make([]byte, 4) 16 | binary.BigEndian.PutUint32(bytes, val) 17 | return bytes 18 | } 19 | 20 | func htons(val uint16) []byte { 21 | bytes := make([]byte, 2) 22 | binary.BigEndian.PutUint16(bytes, val) 23 | return bytes 24 | } 25 | 26 | func ntohl(buf []byte) uint32 { 27 | return binary.BigEndian.Uint32(buf) 28 | } 29 | 30 | func ntohs(buf []byte) uint16 { 31 | return binary.BigEndian.Uint16(buf) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/route_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | func (r *Route) ListFlags() []string { 6 | return []string{} 7 | } 8 | 9 | func (n *NexthopInfo) ListFlags() []string { 10 | return []string{} 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/socket.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "net" 4 | 5 | // SocketID identifies a single socket. 6 | type SocketID struct { 7 | SourcePort uint16 8 | DestinationPort uint16 9 | Source net.IP 10 | Destination net.IP 11 | Interface uint32 12 | Cookie [2]uint32 13 | } 14 | 15 | // Socket represents a netlink socket. 16 | type Socket struct { 17 | Family uint8 18 | State uint8 19 | Timer uint8 20 | Retrans uint8 21 | ID SocketID 22 | Expires uint32 23 | RQueue uint32 24 | WQueue uint32 25 | UID uint32 26 | INode uint32 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/tcpip_test.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 | package ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.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 darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.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 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README.md: -------------------------------------------------------------------------------- 1 | # Go Networking 2 | 3 | This repository holds supplementary Go networking libraries. 4 | 5 | ## Download/Install 6 | 7 | The easiest way to install is to run `go get -u golang.org/x/net`. You can 8 | also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. 9 | 10 | ## Report Issues / Send Patches 11 | 12 | This repository uses Gerrit for code changes. To learn how to submit 13 | changes to this repository, see https://golang.org/doc/contribute.html. 14 | The main issue tracker for the net repository is located at 15 | https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the 16 | subject line, so it is easy to find. 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.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 !plan9,go1.7 6 | 7 | package ctxhttp 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | "net/http/httptest" 13 | "testing" 14 | 15 | "context" 16 | ) 17 | 18 | func TestGo17Context(t *testing.T) { 19 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 20 | io.WriteString(w, "ok") 21 | })) 22 | defer ts.Close() 23 | ctx := context.Background() 24 | resp, err := Get(ctx, http.DefaultClient, ts.URL) 25 | if resp == nil || err != nil { 26 | t.Fatalf("error received from client: %v %v", err, resp) 27 | } 28 | resp.Body.Close() 29 | } 30 | -------------------------------------------------------------------------------- /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/proxy/direct.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 proxy 6 | 7 | import ( 8 | "net" 9 | ) 10 | 11 | type direct struct{} 12 | 13 | // Direct is a direct proxy: one that makes network connections directly. 14 | var Direct = direct{} 15 | 16 | func (direct) Dial(network, addr string) (net.Conn, error) { 17 | return net.Dial(network, addr) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /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_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/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/export_test.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 | var Itoa = itoa 10 | -------------------------------------------------------------------------------- /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/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 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_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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | 25 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 26 | // TODO(aram): implement this, see issue 5847. 27 | panic("unimplemented") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +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/windows/asm_windows_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 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.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 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.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 windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | // VERSION indicates which version of the binary is running. 4 | var VERSION string 5 | 6 | // GITCOMMIT indicates which git hash the binary was built off of 7 | var GITCOMMIT string 8 | --------------------------------------------------------------------------------