├── .github ├── ISSUE_TEMPLATE │ └── hub-mirror.md └── workflows │ ├── close-issues.yml │ └── hub-mirror.yml ├── .gitignore ├── LICENSE ├── README.md ├── go.mod ├── go.sum ├── main.go ├── output.tmpl ├── pkg ├── cli.go └── cli_test.go └── vendor ├── github.com ├── Microsoft │ └── go-winio │ │ ├── .gitignore │ │ ├── CODEOWNERS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── backup.go │ │ ├── ea.go │ │ ├── file.go │ │ ├── fileinfo.go │ │ ├── hvsock.go │ │ ├── pipe.go │ │ ├── pkg │ │ └── guid │ │ │ ├── guid.go │ │ │ ├── guid_nonwindows.go │ │ │ └── guid_windows.go │ │ ├── privilege.go │ │ ├── reparse.go │ │ ├── sd.go │ │ ├── syscall.go │ │ └── zsyscall_windows.go ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go ├── distribution │ └── reference │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CODE-OF-CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── GOVERNANCE.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── distribution-logo.svg │ │ ├── helpers.go │ │ ├── normalize.go │ │ ├── reference.go │ │ ├── regexp.go │ │ └── sort.go ├── docker │ ├── docker │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── api │ │ │ ├── README.md │ │ │ ├── common.go │ │ │ ├── swagger-gen.yaml │ │ │ ├── swagger.yaml │ │ │ └── types │ │ │ │ ├── blkiodev │ │ │ │ └── blkio.go │ │ │ │ ├── checkpoint │ │ │ │ ├── list.go │ │ │ │ └── options.go │ │ │ │ ├── client.go │ │ │ │ ├── configs.go │ │ │ │ ├── container │ │ │ │ ├── change_type.go │ │ │ │ ├── change_types.go │ │ │ │ ├── config.go │ │ │ │ ├── container_top.go │ │ │ │ ├── container_update.go │ │ │ │ ├── create_response.go │ │ │ │ ├── errors.go │ │ │ │ ├── filesystem_change.go │ │ │ │ ├── hostconfig.go │ │ │ │ ├── hostconfig_unix.go │ │ │ │ ├── hostconfig_windows.go │ │ │ │ ├── options.go │ │ │ │ ├── wait_exit_error.go │ │ │ │ ├── wait_response.go │ │ │ │ └── waitcondition.go │ │ │ │ ├── error_response.go │ │ │ │ ├── error_response_ext.go │ │ │ │ ├── events │ │ │ │ └── events.go │ │ │ │ ├── filters │ │ │ │ ├── errors.go │ │ │ │ └── parse.go │ │ │ │ ├── graph_driver_data.go │ │ │ │ ├── id_response.go │ │ │ │ ├── image │ │ │ │ ├── delete_response.go │ │ │ │ ├── image.go │ │ │ │ ├── image_history.go │ │ │ │ ├── opts.go │ │ │ │ └── summary.go │ │ │ │ ├── mount │ │ │ │ └── mount.go │ │ │ │ ├── network │ │ │ │ ├── endpoint.go │ │ │ │ ├── ipam.go │ │ │ │ └── network.go │ │ │ │ ├── plugin.go │ │ │ │ ├── plugin_device.go │ │ │ │ ├── plugin_env.go │ │ │ │ ├── plugin_interface_type.go │ │ │ │ ├── plugin_mount.go │ │ │ │ ├── plugin_responses.go │ │ │ │ ├── port.go │ │ │ │ ├── registry │ │ │ │ ├── authconfig.go │ │ │ │ ├── authenticate.go │ │ │ │ └── registry.go │ │ │ │ ├── stats.go │ │ │ │ ├── strslice │ │ │ │ └── strslice.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 │ │ │ │ ├── service_create_response.go │ │ │ │ ├── service_update_response.go │ │ │ │ ├── swarm.go │ │ │ │ └── task.go │ │ │ │ ├── system │ │ │ │ ├── info.go │ │ │ │ ├── runtime.go │ │ │ │ └── security_opts.go │ │ │ │ ├── time │ │ │ │ └── timestamp.go │ │ │ │ ├── types.go │ │ │ │ ├── types_deprecated.go │ │ │ │ ├── versions │ │ │ │ ├── README.md │ │ │ │ └── compare.go │ │ │ │ └── volume │ │ │ │ ├── cluster_volume.go │ │ │ │ ├── create_options.go │ │ │ │ ├── list_response.go │ │ │ │ ├── options.go │ │ │ │ ├── volume.go │ │ │ │ └── volume_update.go │ │ ├── client │ │ │ ├── README.md │ │ │ ├── build_cancel.go │ │ │ ├── build_prune.go │ │ │ ├── checkpoint_create.go │ │ │ ├── checkpoint_delete.go │ │ │ ├── checkpoint_list.go │ │ │ ├── client.go │ │ │ ├── client_deprecated.go │ │ │ ├── client_unix.go │ │ │ ├── client_windows.go │ │ │ ├── config_create.go │ │ │ ├── config_inspect.go │ │ │ ├── config_list.go │ │ │ ├── config_remove.go │ │ │ ├── config_update.go │ │ │ ├── container_attach.go │ │ │ ├── container_commit.go │ │ │ ├── container_copy.go │ │ │ ├── container_create.go │ │ │ ├── container_diff.go │ │ │ ├── container_exec.go │ │ │ ├── container_export.go │ │ │ ├── container_inspect.go │ │ │ ├── container_kill.go │ │ │ ├── container_list.go │ │ │ ├── container_logs.go │ │ │ ├── container_pause.go │ │ │ ├── container_prune.go │ │ │ ├── container_remove.go │ │ │ ├── container_rename.go │ │ │ ├── container_resize.go │ │ │ ├── container_restart.go │ │ │ ├── container_start.go │ │ │ ├── container_stats.go │ │ │ ├── container_stop.go │ │ │ ├── container_top.go │ │ │ ├── container_unpause.go │ │ │ ├── container_update.go │ │ │ ├── container_wait.go │ │ │ ├── disk_usage.go │ │ │ ├── distribution_inspect.go │ │ │ ├── envvars.go │ │ │ ├── errors.go │ │ │ ├── events.go │ │ │ ├── hijack.go │ │ │ ├── image_build.go │ │ │ ├── image_create.go │ │ │ ├── image_history.go │ │ │ ├── image_import.go │ │ │ ├── image_inspect.go │ │ │ ├── image_list.go │ │ │ ├── image_load.go │ │ │ ├── image_prune.go │ │ │ ├── image_pull.go │ │ │ ├── image_push.go │ │ │ ├── image_remove.go │ │ │ ├── image_save.go │ │ │ ├── image_search.go │ │ │ ├── image_tag.go │ │ │ ├── info.go │ │ │ ├── interface.go │ │ │ ├── interface_experimental.go │ │ │ ├── interface_stable.go │ │ │ ├── login.go │ │ │ ├── network_connect.go │ │ │ ├── network_create.go │ │ │ ├── network_disconnect.go │ │ │ ├── network_inspect.go │ │ │ ├── network_list.go │ │ │ ├── network_prune.go │ │ │ ├── network_remove.go │ │ │ ├── node_inspect.go │ │ │ ├── node_list.go │ │ │ ├── node_remove.go │ │ │ ├── node_update.go │ │ │ ├── options.go │ │ │ ├── ping.go │ │ │ ├── plugin_create.go │ │ │ ├── plugin_disable.go │ │ │ ├── plugin_enable.go │ │ │ ├── plugin_inspect.go │ │ │ ├── plugin_install.go │ │ │ ├── plugin_list.go │ │ │ ├── plugin_push.go │ │ │ ├── plugin_remove.go │ │ │ ├── plugin_set.go │ │ │ ├── plugin_upgrade.go │ │ │ ├── request.go │ │ │ ├── secret_create.go │ │ │ ├── secret_inspect.go │ │ │ ├── secret_list.go │ │ │ ├── secret_remove.go │ │ │ ├── secret_update.go │ │ │ ├── service_create.go │ │ │ ├── service_inspect.go │ │ │ ├── service_list.go │ │ │ ├── service_logs.go │ │ │ ├── service_remove.go │ │ │ ├── service_update.go │ │ │ ├── swarm_get_unlock_key.go │ │ │ ├── swarm_init.go │ │ │ ├── swarm_inspect.go │ │ │ ├── swarm_join.go │ │ │ ├── swarm_leave.go │ │ │ ├── swarm_unlock.go │ │ │ ├── swarm_update.go │ │ │ ├── task_inspect.go │ │ │ ├── task_list.go │ │ │ ├── task_logs.go │ │ │ ├── utils.go │ │ │ ├── version.go │ │ │ ├── volume_create.go │ │ │ ├── volume_inspect.go │ │ │ ├── volume_list.go │ │ │ ├── volume_prune.go │ │ │ ├── volume_remove.go │ │ │ └── volume_update.go │ │ ├── errdefs │ │ │ ├── defs.go │ │ │ ├── doc.go │ │ │ ├── helpers.go │ │ │ ├── http_helpers.go │ │ │ └── is.go │ │ ├── image │ │ │ └── spec │ │ │ │ └── specs-go │ │ │ │ └── v1 │ │ │ │ └── image.go │ │ └── internal │ │ │ └── multierror │ │ │ └── multierror.go │ ├── go-connections │ │ ├── LICENSE │ │ ├── nat │ │ │ ├── nat.go │ │ │ ├── parse.go │ │ │ └── sort.go │ │ ├── sockets │ │ │ ├── README.md │ │ │ ├── inmem_socket.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 │ └── go-units │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── circle.yml │ │ ├── duration.go │ │ ├── size.go │ │ └── ulimit.go ├── felixge │ └── httpsnoop │ │ ├── .gitignore │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── capture_metrics.go │ │ ├── docs.go │ │ ├── wrap_generated_gteq_1.8.go │ │ └── wrap_generated_lt_1.8.go ├── go-logr │ ├── logr │ │ ├── .golangci.yaml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── context.go │ │ ├── context_noslog.go │ │ ├── context_slog.go │ │ ├── discard.go │ │ ├── funcr │ │ │ ├── funcr.go │ │ │ └── slogsink.go │ │ ├── logr.go │ │ ├── sloghandler.go │ │ ├── slogr.go │ │ └── slogsink.go │ └── stdr │ │ ├── LICENSE │ │ ├── README.md │ │ └── stdr.go ├── gogo │ └── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── proto │ │ ├── Makefile │ │ ├── clone.go │ │ ├── custom_gogo.go │ │ ├── decode.go │ │ ├── deprecated.go │ │ ├── discard.go │ │ ├── duration.go │ │ ├── duration_gogo.go │ │ ├── encode.go │ │ ├── encode_gogo.go │ │ ├── equal.go │ │ ├── extensions.go │ │ ├── extensions_gogo.go │ │ ├── lib.go │ │ ├── lib_gogo.go │ │ ├── message_set.go │ │ ├── pointer_reflect.go │ │ ├── pointer_reflect_gogo.go │ │ ├── pointer_unsafe.go │ │ ├── pointer_unsafe_gogo.go │ │ ├── properties.go │ │ ├── properties_gogo.go │ │ ├── skip_gogo.go │ │ ├── table_marshal.go │ │ ├── table_marshal_gogo.go │ │ ├── table_merge.go │ │ ├── table_unmarshal.go │ │ ├── table_unmarshal_gogo.go │ │ ├── text.go │ │ ├── text_gogo.go │ │ ├── text_parser.go │ │ ├── timestamp.go │ │ ├── timestamp_gogo.go │ │ ├── wrappers.go │ │ └── wrappers_gogo.go ├── opencontainers │ ├── go-digest │ │ ├── .mailmap │ │ ├── .pullapprove.yml │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── LICENSE.docs │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── algorithm.go │ │ ├── digest.go │ │ ├── digester.go │ │ ├── doc.go │ │ └── verifiers.go │ └── image-spec │ │ ├── LICENSE │ │ └── 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 │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go ├── pmezard │ └── go-difflib │ │ ├── LICENSE │ │ └── difflib │ │ └── difflib.go ├── spf13 │ └── pflag │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bool.go │ │ ├── bool_slice.go │ │ ├── bytes.go │ │ ├── count.go │ │ ├── duration.go │ │ ├── duration_slice.go │ │ ├── flag.go │ │ ├── float32.go │ │ ├── float32_slice.go │ │ ├── float64.go │ │ ├── float64_slice.go │ │ ├── golangflag.go │ │ ├── int.go │ │ ├── int16.go │ │ ├── int32.go │ │ ├── int32_slice.go │ │ ├── int64.go │ │ ├── int64_slice.go │ │ ├── int8.go │ │ ├── int_slice.go │ │ ├── ip.go │ │ ├── ip_slice.go │ │ ├── ipmask.go │ │ ├── ipnet.go │ │ ├── string.go │ │ ├── string_array.go │ │ ├── string_slice.go │ │ ├── string_to_int.go │ │ ├── string_to_int64.go │ │ ├── string_to_string.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── uint_slice.go └── stretchr │ └── testify │ ├── LICENSE │ └── assert │ ├── assertion_compare.go │ ├── assertion_compare_can_convert.go │ ├── assertion_compare_legacy.go │ ├── assertion_format.go │ ├── assertion_format.go.tmpl │ ├── assertion_forward.go │ ├── assertion_forward.go.tmpl │ ├── assertion_order.go │ ├── assertions.go │ ├── doc.go │ ├── errors.go │ ├── forward_assertions.go │ └── http_assertions.go ├── go.opentelemetry.io ├── contrib │ └── instrumentation │ │ └── net │ │ └── http │ │ └── otelhttp │ │ ├── LICENSE │ │ ├── client.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── handler.go │ │ ├── internal │ │ └── semconvutil │ │ │ ├── gen.go │ │ │ ├── httpconv.go │ │ │ └── netconv.go │ │ ├── labeler.go │ │ ├── transport.go │ │ ├── version.go │ │ └── wrap.go └── otel │ ├── .codespellignore │ ├── .codespellrc │ ├── .gitattributes │ ├── .gitignore │ ├── .gitmodules │ ├── .golangci.yml │ ├── .lycheeignore │ ├── .markdownlint.yaml │ ├── CHANGELOG.md │ ├── CODEOWNERS │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RELEASING.md │ ├── VERSIONING.md │ ├── attribute │ ├── doc.go │ ├── encoder.go │ ├── filter.go │ ├── iterator.go │ ├── key.go │ ├── kv.go │ ├── set.go │ ├── type_string.go │ └── value.go │ ├── baggage │ ├── baggage.go │ ├── context.go │ └── doc.go │ ├── codes │ ├── codes.go │ └── doc.go │ ├── doc.go │ ├── error_handler.go │ ├── get_main_pkgs.sh │ ├── handler.go │ ├── internal │ ├── attribute │ │ └── attribute.go │ ├── baggage │ │ ├── baggage.go │ │ └── context.go │ ├── gen.go │ ├── global │ │ ├── handler.go │ │ ├── instruments.go │ │ ├── internal_logging.go │ │ ├── meter.go │ │ ├── propagator.go │ │ ├── state.go │ │ └── trace.go │ └── rawhelpers.go │ ├── internal_logging.go │ ├── metric.go │ ├── metric │ ├── LICENSE │ ├── asyncfloat64.go │ ├── asyncint64.go │ ├── config.go │ ├── doc.go │ ├── embedded │ │ └── embedded.go │ ├── instrument.go │ ├── meter.go │ ├── syncfloat64.go │ └── syncint64.go │ ├── propagation.go │ ├── propagation │ ├── baggage.go │ ├── doc.go │ ├── propagation.go │ └── trace_context.go │ ├── requirements.txt │ ├── semconv │ └── v1.20.0 │ │ ├── attribute_group.go │ │ ├── doc.go │ │ ├── event.go │ │ ├── exception.go │ │ ├── http.go │ │ ├── resource.go │ │ ├── schema.go │ │ └── trace.go │ ├── trace.go │ ├── trace │ ├── LICENSE │ ├── config.go │ ├── context.go │ ├── doc.go │ ├── embedded │ │ └── embedded.go │ ├── nonrecording.go │ ├── noop.go │ ├── trace.go │ └── tracestate.go │ ├── verify_examples.sh │ ├── version.go │ └── versions.yaml ├── golang.org └── x │ ├── net │ ├── LICENSE │ ├── PATENTS │ ├── internal │ │ └── socks │ │ │ ├── client.go │ │ │ └── socks.go │ └── proxy │ │ ├── dial.go │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── proxy.go │ │ └── socks5.go │ └── sys │ ├── LICENSE │ ├── PATENTS │ └── windows │ ├── aliases.go │ ├── dll_windows.go │ ├── empty.s │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mkerrors.bash │ ├── mkknownfolderids.bash │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── setupapi_windows.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ ├── types_windows_arm.go │ ├── types_windows_arm64.go │ ├── zerrors_windows.go │ ├── zknownfolderids_windows.go │ └── zsyscall_windows.go ├── gopkg.in └── yaml.v3 │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.github/ISSUE_TEMPLATE/hub-mirror.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: hub-mirror issue template 3 | about: 用于执行 hub-mirror workflow 的 issue 模板 4 | title: "[hub-mirror] 请求执行任务" 5 | labels: ["hub-mirror"] 6 | --- 7 | 8 | { 9 | "platform":"", 10 | "hub-mirror": [ 11 | "若对OS/ARCH无要求,platform请留空,不要加任何值,默认就是linux/amd64", 12 | "如需切换arm架构,请修改platform为arm64或linux/arm64/v8", 13 | "格式:你需要转换的原始镜像$自定义镜像名:自定义标签名 (其中 $自定义镜像名:自定义标签名 是可选的)", 14 | "以下是三个正确示例", 15 | "registry.k8s.io/kube-apiserver:v1.27.4", 16 | "registry.k8s.io/kube-apiserver:v1.27.4$my-kube-apiserver", 17 | "registry.k8s.io/kube-apiserver:v1.27.4$my-kube-apiserver:mytag", 18 | "要求:hub-mirror 标签是必选的,标题随意,内容严格按照该 json 格式,每次最多支持转换 11 个镜像", 19 | "错误的镜像都会被跳过", 20 | "请确保 json 格式是正确的,比如下面这个是最后一个,后面是没有逗号的", 21 | "好了,改成你想要转换的镜像吧" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /.github/workflows/close-issues.yml: -------------------------------------------------------------------------------- 1 | name: 'close stale issues' 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '00 10 * * *' 6 | 7 | jobs: 8 | stale: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/stale@v8 12 | with: 13 | stale-issue-message: 'This issue is stale' 14 | days-before-stale: 7 15 | days-before-close: 0 16 | days-before-pr-stale: -1 17 | days-before-pr-close: -1 18 | operations-per-run: 1000 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 togettoyou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /output.tmpl: -------------------------------------------------------------------------------- 1 | ### docker 版本 2 | 3 | ```shell 4 | {{- range .Outputs }} 5 | docker pull {{ .Target }} && docker tag {{ .Target }} {{ .Source }}{{ end }} 6 | ``` 7 | 8 | ### containerd 版本(以 k8s.io namespaces 为例) 9 | 10 | ```shell 11 | {{- range .Outputs }} 12 | ctr -n k8s.io image pull {{ .Target }} && ctr -n k8s.io image tag {{ .Target }} {{ .Source }}{{ end }} 13 | ``` 14 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @microsoft/containerplat 2 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Microsoft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package guid 4 | 5 | // GUID represents a GUID/UUID. It has the same structure as 6 | // golang.org/x/sys/windows.GUID so that it can be used with functions expecting 7 | // that type. It is defined as its own type as that is only available to builds 8 | // targeted at `windows`. The representation matches that used by native Windows 9 | // code. 10 | type GUID struct { 11 | Data1 uint32 12 | Data2 uint16 13 | Data3 uint16 14 | Data4 [8]byte 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go: -------------------------------------------------------------------------------- 1 | package guid 2 | 3 | import "golang.org/x/sys/windows" 4 | 5 | // GUID represents a GUID/UUID. It has the same structure as 6 | // golang.org/x/sys/windows.GUID so that it can be used with functions expecting 7 | // that type. It is defined as its own type so that stringification and 8 | // marshaling can be supported. The representation matches that used by native 9 | // Windows code. 10 | type GUID windows.GUID 11 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go hvsock.go 4 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/.gitattributes: -------------------------------------------------------------------------------- 1 | *.go text eol=lf 2 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/.gitignore: -------------------------------------------------------------------------------- 1 | # Cover profiles 2 | *.out 3 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - bodyclose 4 | - dupword # Checks for duplicate words in the source code 5 | - gofmt 6 | - goimports 7 | - ineffassign 8 | - misspell 9 | - revive 10 | - staticcheck 11 | - unconvert 12 | - unused 13 | - vet 14 | disable: 15 | - errcheck 16 | 17 | run: 18 | deadline: 2m 19 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | 5 | Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct. 6 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # Distribution project maintainers & reviewers 2 | # 3 | # See GOVERNANCE.md for maintainer versus reviewer roles 4 | # 5 | # MAINTAINERS (cncf-distribution-maintainers@lists.cncf.io) 6 | # GitHub ID, Name, Email address 7 | "chrispat","Chris Patterson","chrispat@github.com" 8 | "clarkbw","Bryan Clark","clarkbw@github.com" 9 | "corhere","Cory Snider","csnider@mirantis.com" 10 | "deleteriousEffect","Hayley Swimelar","hswimelar@gitlab.com" 11 | "heww","He Weiwei","hweiwei@vmware.com" 12 | "joaodrp","João Pereira","jpereira@gitlab.com" 13 | "justincormack","Justin Cormack","justin.cormack@docker.com" 14 | "squizzi","Kyle Squizzato","ksquizzato@mirantis.com" 15 | "milosgajdos","Milos Gajdos","milosthegajdos@gmail.com" 16 | "sargun","Sargun Dhillon","sargun@sargun.me" 17 | "wy65701436","Wang Yan","wangyan@vmware.com" 18 | "stevelasker","Steve Lasker","steve.lasker@microsoft.com" 19 | # 20 | # REVIEWERS 21 | # GitHub ID, Name, Email address 22 | "dmcgowan","Derek McGowan","derek@mcgstyle.net" 23 | "stevvooe","Stephen Day","stevvooe@gmail.com" 24 | "thajeztah","Sebastiaan van Stijn","github@gone.nl" 25 | "DavidSpek", "David van der Spek", "vanderspek.david@gmail.com" 26 | "Jamstah", "James Hewitt", "james.hewitt@gmail.com" 27 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/Makefile: -------------------------------------------------------------------------------- 1 | # Project packages. 2 | PACKAGES=$(shell go list ./...) 3 | 4 | # Flags passed to `go test` 5 | BUILDFLAGS ?= 6 | TESTFLAGS ?= 7 | 8 | .PHONY: all build test coverage 9 | .DEFAULT: all 10 | 11 | all: build 12 | 13 | build: ## no binaries to build, so just check compilation suceeds 14 | go build ${BUILDFLAGS} ./... 15 | 16 | test: ## run tests 17 | go test ${TESTFLAGS} ./... 18 | 19 | coverage: ## generate coverprofiles from the unit tests 20 | rm -f coverage.txt 21 | go test ${TESTFLAGS} -cover -coverprofile=cover.out ./... 22 | 23 | .PHONY: help 24 | help: 25 | @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_\/%-]+:.*?##/ { printf " \033[36m%-27s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) 26 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away! 6 | 7 | Please DO NOT file a public issue, instead send your report privately to cncf-distribution-security@lists.cncf.io. 8 | -------------------------------------------------------------------------------- /vendor/github.com/distribution/reference/helpers.go: -------------------------------------------------------------------------------- 1 | package reference 2 | 3 | import "path" 4 | 5 | // IsNameOnly returns true if reference only contains a repo name. 6 | func IsNameOnly(ref Named) bool { 7 | if _, ok := ref.(NamedTagged); ok { 8 | return false 9 | } 10 | if _, ok := ref.(Canonical); ok { 11 | return false 12 | } 13 | return true 14 | } 15 | 16 | // FamiliarName returns the familiar name string 17 | // for the given named, familiarizing if needed. 18 | func FamiliarName(ref Named) string { 19 | if nn, ok := ref.(normalizedNamed); ok { 20 | return nn.Familiar().Name() 21 | } 22 | return ref.Name() 23 | } 24 | 25 | // FamiliarString returns the familiar string representation 26 | // for the given reference, familiarizing if needed. 27 | func FamiliarString(ref Reference) string { 28 | if nn, ok := ref.(normalizedNamed); ok { 29 | return nn.Familiar().String() 30 | } 31 | return ref.String() 32 | } 33 | 34 | // FamiliarMatch reports whether ref matches the specified pattern. 35 | // See [path.Match] for supported patterns. 36 | func FamiliarMatch(pattern string, ref Reference) (bool, error) { 37 | matched, err := path.Match(pattern, FamiliarString(ref)) 38 | if namedRef, isNamed := ref.(Named); isNamed && !matched { 39 | matched, _ = path.Match(pattern, FamiliarName(namedRef)) 40 | } 41 | return matched, err 42 | } 43 | -------------------------------------------------------------------------------- /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/creack/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 // import "github.com/docker/docker/api" 2 | 3 | // Common constants for daemon and client. 4 | const ( 5 | // DefaultVersion of Current REST API 6 | DefaultVersion = "1.44" 7 | 8 | // NoBaseImageSpecifier is the symbol used by the FROM 9 | // command to specify that no base image is to be used. 10 | NoBaseImageSpecifier = "scratch" 11 | ) 12 | -------------------------------------------------------------------------------- /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 // import "github.com/docker/docker/api/types/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/checkpoint/list.go: -------------------------------------------------------------------------------- 1 | package checkpoint 2 | 3 | // Summary represents the details of a checkpoint when listing endpoints. 4 | type Summary struct { 5 | // Name is the name of the checkpoint. 6 | Name string 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/checkpoint/options.go: -------------------------------------------------------------------------------- 1 | package checkpoint 2 | 3 | // CreateOptions holds parameters to create a checkpoint from a container. 4 | type CreateOptions struct { 5 | CheckpointID string 6 | CheckpointDir string 7 | Exit bool 8 | } 9 | 10 | // ListOptions holds parameters to list checkpoints for a container. 11 | type ListOptions struct { 12 | CheckpointDir string 13 | } 14 | 15 | // DeleteOptions holds parameters to delete a checkpoint from a container. 16 | type DeleteOptions struct { 17 | CheckpointID string 18 | CheckpointDir string 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/configs.go: -------------------------------------------------------------------------------- 1 | package types // import "github.com/docker/docker/api/types" 2 | 3 | // ExecConfig is a small subset of the Config struct that holds the configuration 4 | // for the exec feature of docker. 5 | type ExecConfig struct { 6 | User string // User that will run the command 7 | Privileged bool // Is the container in privileged mode 8 | Tty bool // Attach standard streams to a tty. 9 | ConsoleSize *[2]uint `json:",omitempty"` // Initial console size [height, width] 10 | AttachStdin bool // Attach the standard input, makes possible user interaction 11 | AttachStderr bool // Attach the standard error 12 | AttachStdout bool // Attach the standard output 13 | Detach bool // Execute in detach mode 14 | DetachKeys string // Escape keys for detach 15 | Env []string // Environment variables 16 | WorkingDir string // Working directory 17 | Cmd []string // Execution commands and args 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/change_type.go: -------------------------------------------------------------------------------- 1 | package container 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 | // ChangeType Kind of change 7 | // 8 | // Can be one of: 9 | // 10 | // - `0`: Modified ("C") 11 | // - `1`: Added ("A") 12 | // - `2`: Deleted ("D") 13 | // 14 | // swagger:model ChangeType 15 | type ChangeType uint8 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/change_types.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | const ( 4 | // ChangeModify represents the modify operation. 5 | ChangeModify ChangeType = 0 6 | // ChangeAdd represents the add operation. 7 | ChangeAdd ChangeType = 1 8 | // ChangeDelete represents the delete operation. 9 | ChangeDelete ChangeType = 2 10 | ) 11 | 12 | func (ct ChangeType) String() string { 13 | switch ct { 14 | case ChangeModify: 15 | return "C" 16 | case ChangeAdd: 17 | return "A" 18 | case ChangeDelete: 19 | return "D" 20 | default: 21 | return "" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_top.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // Code generated by `swagger generate operation`. DO NOT EDIT. 5 | // 6 | // See hack/generate-swagger-api.sh 7 | // ---------------------------------------------------------------------------- 8 | 9 | // ContainerTopOKBody OK response to ContainerTop operation 10 | // swagger:model ContainerTopOKBody 11 | type ContainerTopOKBody struct { 12 | 13 | // Each process running in the container, where each is process 14 | // is an array of values corresponding to the titles. 15 | // 16 | // Required: true 17 | Processes [][]string `json:"Processes"` 18 | 19 | // The ps column titles 20 | // Required: true 21 | Titles []string `json:"Titles"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_update.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // Code generated by `swagger generate operation`. DO NOT EDIT. 5 | // 6 | // See hack/generate-swagger-api.sh 7 | // ---------------------------------------------------------------------------- 8 | 9 | // ContainerUpdateOKBody OK response to ContainerUpdate operation 10 | // swagger:model ContainerUpdateOKBody 11 | type ContainerUpdateOKBody struct { 12 | 13 | // warnings 14 | // Required: true 15 | Warnings []string `json:"Warnings"` 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/create_response.go: -------------------------------------------------------------------------------- 1 | package container 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 | // CreateResponse ContainerCreateResponse 7 | // 8 | // OK response to ContainerCreate operation 9 | // swagger:model CreateResponse 10 | type CreateResponse struct { 11 | 12 | // The ID of the created container 13 | // Required: true 14 | ID string `json:"Id"` 15 | 16 | // Warnings encountered when creating the container 17 | // Required: true 18 | Warnings []string `json:"Warnings"` 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/errors.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | type errInvalidParameter struct{ error } 4 | 5 | func (e *errInvalidParameter) InvalidParameter() {} 6 | 7 | func (e *errInvalidParameter) Unwrap() error { 8 | return e.error 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/filesystem_change.go: -------------------------------------------------------------------------------- 1 | package container 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 | // FilesystemChange Change in the container's filesystem. 7 | // 8 | // swagger:model FilesystemChange 9 | type FilesystemChange struct { 10 | 11 | // kind 12 | // Required: true 13 | Kind ChangeType `json:"Kind"` 14 | 15 | // Path to file or directory that has changed. 16 | // 17 | // Required: true 18 | Path string `json:"Path"` 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | 3 | package container // import "github.com/docker/docker/api/types/container" 4 | 5 | import "github.com/docker/docker/api/types/network" 6 | 7 | // IsValid indicates if an isolation technology is valid 8 | func (i Isolation) IsValid() bool { 9 | return i.IsDefault() 10 | } 11 | 12 | // NetworkName returns the name of the network stack. 13 | func (n NetworkMode) NetworkName() string { 14 | if n.IsBridge() { 15 | return network.NetworkBridge 16 | } else if n.IsHost() { 17 | return network.NetworkHost 18 | } else if n.IsContainer() { 19 | return "container" 20 | } else if n.IsNone() { 21 | return network.NetworkNone 22 | } else if n.IsDefault() { 23 | return network.NetworkDefault 24 | } else if n.IsUserDefined() { 25 | return n.UserDefined() 26 | } 27 | return "" 28 | } 29 | 30 | // IsBridge indicates whether container uses the bridge network stack 31 | func (n NetworkMode) IsBridge() bool { 32 | return n == network.NetworkBridge 33 | } 34 | 35 | // IsHost indicates whether container uses the host network stack. 36 | func (n NetworkMode) IsHost() bool { 37 | return n == network.NetworkHost 38 | } 39 | 40 | // IsUserDefined indicates user-created network 41 | func (n NetworkMode) IsUserDefined() bool { 42 | return !n.IsDefault() && !n.IsBridge() && !n.IsHost() && !n.IsNone() && !n.IsContainer() 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | import "github.com/docker/docker/api/types/network" 4 | 5 | // IsBridge indicates whether container uses the bridge network stack 6 | // in windows it is given the name NAT 7 | func (n NetworkMode) IsBridge() bool { 8 | return n == network.NetworkNat 9 | } 10 | 11 | // IsHost indicates whether container uses the host network stack. 12 | // returns false as this is not supported by windows 13 | func (n NetworkMode) IsHost() bool { 14 | return false 15 | } 16 | 17 | // IsUserDefined indicates user-created network 18 | func (n NetworkMode) IsUserDefined() bool { 19 | return !n.IsDefault() && !n.IsNone() && !n.IsBridge() && !n.IsContainer() 20 | } 21 | 22 | // IsValid indicates if an isolation technology is valid 23 | func (i Isolation) IsValid() bool { 24 | return i.IsDefault() || i.IsHyperV() || i.IsProcess() 25 | } 26 | 27 | // NetworkName returns the name of the network stack. 28 | func (n NetworkMode) NetworkName() string { 29 | if n.IsDefault() { 30 | return network.NetworkDefault 31 | } else if n.IsBridge() { 32 | return network.NetworkNat 33 | } else if n.IsNone() { 34 | return network.NetworkNone 35 | } else if n.IsContainer() { 36 | return "container" 37 | } else if n.IsUserDefined() { 38 | return n.UserDefined() 39 | } 40 | 41 | return "" 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/wait_exit_error.go: -------------------------------------------------------------------------------- 1 | package container 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 | // WaitExitError container waiting error, if any 7 | // swagger:model WaitExitError 8 | type WaitExitError struct { 9 | 10 | // Details of an error 11 | Message string `json:"Message,omitempty"` 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/wait_response.go: -------------------------------------------------------------------------------- 1 | package container 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 | // WaitResponse ContainerWaitResponse 7 | // 8 | // OK response to ContainerWait operation 9 | // swagger:model WaitResponse 10 | type WaitResponse struct { 11 | 12 | // error 13 | Error *WaitExitError `json:"Error,omitempty"` 14 | 15 | // Exit code of the container 16 | // Required: true 17 | StatusCode int64 `json:"StatusCode"` 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/waitcondition.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // WaitCondition is a type used to specify a container state for which 4 | // to wait. 5 | type WaitCondition string 6 | 7 | // Possible WaitCondition Values. 8 | // 9 | // WaitConditionNotRunning (default) is used to wait for any of the non-running 10 | // states: "created", "exited", "dead", "removing", or "removed". 11 | // 12 | // WaitConditionNextExit is used to wait for the next time the state changes 13 | // to a non-running state. If the state is currently "created" or "exited", 14 | // this would cause Wait() to block until either the container runs and exits 15 | // or is removed. 16 | // 17 | // WaitConditionRemoved is used to wait for the container to be removed. 18 | const ( 19 | WaitConditionNotRunning WaitCondition = "not-running" 20 | WaitConditionNextExit WaitCondition = "next-exit" 21 | WaitConditionRemoved WaitCondition = "removed" 22 | ) 23 | -------------------------------------------------------------------------------- /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/error_response_ext.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // Error returns the error message 4 | func (e ErrorResponse) Error() string { 5 | return e.Message 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/filters/errors.go: -------------------------------------------------------------------------------- 1 | package filters 2 | 3 | import "fmt" 4 | 5 | // invalidFilter indicates that the provided filter or its value is invalid 6 | type invalidFilter struct { 7 | Filter string 8 | Value []string 9 | } 10 | 11 | func (e invalidFilter) Error() string { 12 | msg := "invalid filter" 13 | if e.Filter != "" { 14 | msg += " '" + e.Filter 15 | if e.Value != nil { 16 | msg = fmt.Sprintf("%s=%s", msg, e.Value) 17 | } 18 | msg += "'" 19 | } 20 | return msg 21 | } 22 | 23 | // InvalidParameter marks this error as ErrInvalidParameter 24 | func (e invalidFilter) InvalidParameter() {} 25 | 26 | // unreachableCode is an error indicating that the code path was not expected to be reached. 27 | type unreachableCode struct { 28 | Filter string 29 | Value []string 30 | } 31 | 32 | // System marks this error as ErrSystem 33 | func (e unreachableCode) System() {} 34 | 35 | func (e unreachableCode) Error() string { 36 | return fmt.Sprintf("unreachable code reached for filter: %q with values: %s", e.Filter, e.Value) 37 | } 38 | -------------------------------------------------------------------------------- /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 the storage driver used to store the container's and 7 | // image's filesystem. 8 | // 9 | // swagger:model GraphDriverData 10 | type GraphDriverData struct { 11 | 12 | // Low-level storage metadata, provided as key/value pairs. 13 | // 14 | // This information is driver-specific, and depends on the storage-driver 15 | // in use, and should be used for informational purposes only. 16 | // 17 | // Required: true 18 | Data map[string]string `json:"Data"` 19 | 20 | // Name of the storage driver. 21 | // Required: true 22 | Name string `json:"Name"` 23 | } 24 | -------------------------------------------------------------------------------- /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.go: -------------------------------------------------------------------------------- 1 | package image 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 | // DeleteResponse delete response 7 | // swagger:model DeleteResponse 8 | type DeleteResponse 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/image/image.go: -------------------------------------------------------------------------------- 1 | package image 2 | 3 | import "time" 4 | 5 | // Metadata contains engine-local data about the image. 6 | type Metadata struct { 7 | // LastTagTime is the date and time at which the image was last tagged. 8 | LastTagTime time.Time `json:",omitempty"` 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/image/image_history.go: -------------------------------------------------------------------------------- 1 | package image // import "github.com/docker/docker/api/types/image" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // Code generated by `swagger generate operation`. DO NOT EDIT. 5 | // 6 | // See hack/generate-swagger-api.sh 7 | // ---------------------------------------------------------------------------- 8 | 9 | // HistoryResponseItem individual image layer information in response to ImageHistory operation 10 | // swagger:model HistoryResponseItem 11 | type HistoryResponseItem struct { 12 | 13 | // comment 14 | // Required: true 15 | Comment string `json:"Comment"` 16 | 17 | // created 18 | // Required: true 19 | Created int64 `json:"Created"` 20 | 21 | // created by 22 | // Required: true 23 | CreatedBy string `json:"CreatedBy"` 24 | 25 | // Id 26 | // Required: true 27 | ID string `json:"Id"` 28 | 29 | // size 30 | // Required: true 31 | Size int64 `json:"Size"` 32 | 33 | // tags 34 | // Required: true 35 | Tags []string `json:"Tags"` 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/image/opts.go: -------------------------------------------------------------------------------- 1 | package image 2 | 3 | import ocispec "github.com/opencontainers/image-spec/specs-go/v1" 4 | 5 | // GetImageOpts holds parameters to inspect an image. 6 | type GetImageOpts struct { 7 | Platform *ocispec.Platform 8 | Details bool 9 | } 10 | -------------------------------------------------------------------------------- /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/plugin_mount.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 | // PluginMount plugin mount 7 | // swagger:model PluginMount 8 | type PluginMount struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // destination 15 | // Required: true 16 | Destination string `json:"Destination"` 17 | 18 | // name 19 | // Required: true 20 | Name string `json:"Name"` 21 | 22 | // options 23 | // Required: true 24 | Options []string `json:"Options"` 25 | 26 | // settable 27 | // Required: true 28 | Settable []string `json:"Settable"` 29 | 30 | // source 31 | // Required: true 32 | Source *string `json:"Source"` 33 | 34 | // type 35 | // Required: true 36 | Type string `json:"Type"` 37 | } 38 | -------------------------------------------------------------------------------- /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 | // Host IP address that the container's port is mapped to 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 // import "github.com/docker/docker/api/types/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/strslice/strslice.go: -------------------------------------------------------------------------------- 1 | package strslice // import "github.com/docker/docker/api/types/strslice" 2 | 3 | import "encoding/json" 4 | 5 | // StrSlice represents a string or an array of strings. 6 | // We need to override the json decoder to accept both options. 7 | type StrSlice []string 8 | 9 | // UnmarshalJSON decodes the byte slice whether it's a string or an array of 10 | // strings. This method is needed to implement json.Unmarshaler. 11 | func (e *StrSlice) UnmarshalJSON(b []byte) error { 12 | if len(b) == 0 { 13 | // With no input, we preserve the existing value by returning nil and 14 | // leaving the target alone. This allows defining default values for 15 | // the type. 16 | return nil 17 | } 18 | 19 | p := make([]string, 0, 1) 20 | if err := json.Unmarshal(b, &p); err != nil { 21 | var s string 22 | if err := json.Unmarshal(b, &s); err != nil { 23 | return err 24 | } 25 | p = append(p, s) 26 | } 27 | 28 | *e = p 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/config.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/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 | // Templating controls whether and how to evaluate the config payload as 18 | // a template. If it is not set, no templating is used. 19 | Templating *Driver `json:",omitempty"` 20 | } 21 | 22 | // ConfigReferenceFileTarget is a file target in a config reference 23 | type ConfigReferenceFileTarget struct { 24 | Name string 25 | UID string 26 | GID string 27 | Mode os.FileMode 28 | } 29 | 30 | // ConfigReferenceRuntimeTarget is a target for a config specifying that it 31 | // isn't mounted into the container but instead has some other purpose. 32 | type ConfigReferenceRuntimeTarget struct{} 33 | 34 | // ConfigReference is a reference to a config in swarm 35 | type ConfigReference struct { 36 | File *ConfigReferenceFileTarget `json:",omitempty"` 37 | Runtime *ConfigReferenceRuntimeTarget `json:",omitempty"` 38 | ConfigID string 39 | ConfigName string 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/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 | // RuntimeNetworkAttachment is the network attachment runtime 15 | RuntimeNetworkAttachment RuntimeType = "attachment" 16 | 17 | // RuntimeURLContainer is the proto url for the container type 18 | RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" 19 | // RuntimeURLPlugin is the proto url for the plugin type 20 | RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" 21 | ) 22 | 23 | // NetworkAttachmentSpec represents the runtime spec type for network 24 | // attachment tasks 25 | type NetworkAttachmentSpec struct { 26 | ContainerID string 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc --gogofaster_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto 2 | 3 | package runtime // import "github.com/docker/docker/api/types/swarm/runtime" 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | // PluginSpec defines the base payload which clients can specify for creating 4 | // a service with the plugin runtime. 5 | message PluginSpec { 6 | string name = 1; 7 | string remote = 2; 8 | repeated PluginPrivilege privileges = 3; 9 | bool disabled = 4; 10 | repeated string env = 5; 11 | } 12 | 13 | // PluginPrivilege describes a permission the user has to accept 14 | // upon installing a plugin. 15 | message PluginPrivilege { 16 | string name = 1; 17 | string description = 2; 18 | repeated string value = 3; 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/secret.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/swarm" 2 | 3 | import "os" 4 | 5 | // Secret represents a secret. 6 | type Secret struct { 7 | ID string 8 | Meta 9 | Spec SecretSpec 10 | } 11 | 12 | // SecretSpec represents a secret specification from a secret in swarm 13 | type SecretSpec struct { 14 | Annotations 15 | Data []byte `json:",omitempty"` 16 | Driver *Driver `json:",omitempty"` // name of the secrets driver used to fetch the secret's value from an external secret store 17 | 18 | // Templating controls whether and how to evaluate the secret payload as 19 | // a template. If it is not set, no templating is used. 20 | Templating *Driver `json:",omitempty"` 21 | } 22 | 23 | // SecretReferenceFileTarget is a file target in a secret reference 24 | type SecretReferenceFileTarget struct { 25 | Name string 26 | UID string 27 | GID string 28 | Mode os.FileMode 29 | } 30 | 31 | // SecretReference is a reference to a secret in swarm 32 | type SecretReference struct { 33 | File *SecretReferenceFileTarget 34 | SecretID string 35 | SecretName string 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/service_create_response.go: -------------------------------------------------------------------------------- 1 | package swarm 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 | // ServiceCreateResponse contains the information returned to a client on the 7 | // creation of a new service. 8 | // 9 | // swagger:model ServiceCreateResponse 10 | type ServiceCreateResponse struct { 11 | 12 | // The ID of the created service. 13 | ID string `json:"ID,omitempty"` 14 | 15 | // Optional warning message. 16 | // 17 | // FIXME(thaJeztah): this should have "omitempty" in the generated type. 18 | // 19 | Warnings []string `json:"Warnings"` 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/service_update_response.go: -------------------------------------------------------------------------------- 1 | package swarm 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/system/runtime.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // Runtime describes an OCI runtime 4 | type Runtime struct { 5 | // "Legacy" runtime configuration for runc-compatible runtimes. 6 | 7 | Path string `json:"path,omitempty"` 8 | Args []string `json:"runtimeArgs,omitempty"` 9 | 10 | // Shimv2 runtime configuration. Mutually exclusive with the legacy config above. 11 | 12 | Type string `json:"runtimeType,omitempty"` 13 | Options map[string]interface{} `json:"options,omitempty"` 14 | } 15 | 16 | // RuntimeWithStatus extends [Runtime] to hold [RuntimeStatus]. 17 | type RuntimeWithStatus struct { 18 | Runtime 19 | Status map[string]string `json:"status,omitempty"` 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/system/security_opts.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "strings" 7 | ) 8 | 9 | // SecurityOpt contains the name and options of a security option 10 | type SecurityOpt struct { 11 | Name string 12 | Options []KeyValue 13 | } 14 | 15 | // DecodeSecurityOptions decodes a security options string slice to a 16 | // type-safe [SecurityOpt]. 17 | func DecodeSecurityOptions(opts []string) ([]SecurityOpt, error) { 18 | so := []SecurityOpt{} 19 | for _, opt := range opts { 20 | // support output from a < 1.13 docker daemon 21 | if !strings.Contains(opt, "=") { 22 | so = append(so, SecurityOpt{Name: opt}) 23 | continue 24 | } 25 | secopt := SecurityOpt{} 26 | for _, s := range strings.Split(opt, ",") { 27 | k, v, ok := strings.Cut(s, "=") 28 | if !ok { 29 | return nil, fmt.Errorf("invalid security option %q", s) 30 | } 31 | if k == "" || v == "" { 32 | return nil, errors.New("invalid empty security option") 33 | } 34 | if k == "name" { 35 | secopt.Name = v 36 | continue 37 | } 38 | secopt.Options = append(secopt.Options, KeyValue{Key: k, Value: v}) 39 | } 40 | so = append(so, secopt) 41 | } 42 | return so, nil 43 | } 44 | 45 | // KeyValue holds a key/value pair. 46 | type KeyValue struct { 47 | Key, Value string 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/versions/README.md: -------------------------------------------------------------------------------- 1 | # Legacy API type versions 2 | 3 | This package includes types for legacy API versions. The stable version of the API types live in `api/types/*.go`. 4 | 5 | Consider moving a type here when you need to keep backwards compatibility in the API. This legacy types are organized by the latest API version they appear in. For instance, types in the `v1p19` package are valid for API versions below or equal `1.19`. Types in the `v1p20` package are valid for the API version `1.20`, since the versions below that will use the legacy types in `v1p19`. 6 | 7 | ## Package name conventions 8 | 9 | The package name convention is to use `v` as a prefix for the version number and `p`(patch) as a separator. We use this nomenclature due to a few restrictions in the Go package name convention: 10 | 11 | 1. We cannot use `.` because it's interpreted by the language, think of `v1.20.CallFunction`. 12 | 2. We cannot use `_` because golint complains about it. The code is actually valid, but it looks probably more weird: `v1_20.CallFunction`. 13 | 14 | For instance, if you want to modify a type that was available in the version `1.21` of the API but it will have different fields in the version `1.22`, you want to create a new package under `api/types/versions/v1p21`. 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/volume/create_options.go: -------------------------------------------------------------------------------- 1 | package volume 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 | // CreateOptions VolumeConfig 7 | // 8 | // Volume configuration 9 | // swagger:model CreateOptions 10 | type CreateOptions struct { 11 | 12 | // cluster volume spec 13 | ClusterVolumeSpec *ClusterVolumeSpec `json:"ClusterVolumeSpec,omitempty"` 14 | 15 | // Name of the volume driver to use. 16 | Driver string `json:"Driver,omitempty"` 17 | 18 | // A mapping of driver options and values. These options are 19 | // passed directly to the driver and are driver specific. 20 | // 21 | DriverOpts map[string]string `json:"DriverOpts,omitempty"` 22 | 23 | // User-defined key/value metadata. 24 | Labels map[string]string `json:"Labels,omitempty"` 25 | 26 | // The new volume's name. If not specified, Docker generates a name. 27 | // 28 | Name string `json:"Name,omitempty"` 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/volume/list_response.go: -------------------------------------------------------------------------------- 1 | package volume 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 | // ListResponse VolumeListResponse 7 | // 8 | // Volume list response 9 | // swagger:model ListResponse 10 | type ListResponse struct { 11 | 12 | // List of volumes 13 | Volumes []*Volume `json:"Volumes"` 14 | 15 | // Warnings that occurred when fetching the list of volumes. 16 | // 17 | Warnings []string `json:"Warnings"` 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/volume/options.go: -------------------------------------------------------------------------------- 1 | package volume // import "github.com/docker/docker/api/types/volume" 2 | 3 | import "github.com/docker/docker/api/types/filters" 4 | 5 | // ListOptions holds parameters to list volumes. 6 | type ListOptions struct { 7 | Filters filters.Args 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/volume/volume_update.go: -------------------------------------------------------------------------------- 1 | package volume // import "github.com/docker/docker/api/types/volume" 2 | 3 | // UpdateOptions is configuration to update a Volume with. 4 | type UpdateOptions struct { 5 | // Spec is the ClusterVolumeSpec to update the volume to. 6 | Spec *ClusterVolumeSpec `json:"Spec,omitempty"` 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/README.md: -------------------------------------------------------------------------------- 1 | # Go client for the Docker Engine API 2 | 3 | The `docker` command uses this package to communicate with the daemon. It can 4 | also be used by your own Go applications to do anything the command-line 5 | interface does – running containers, pulling images, managing swarms, etc. 6 | 7 | For example, to list all containers (the equivalent of `docker ps --all`): 8 | 9 | ```go 10 | package main 11 | 12 | import ( 13 | "context" 14 | "fmt" 15 | 16 | "github.com/docker/docker/api/types/container" 17 | "github.com/docker/docker/client" 18 | ) 19 | 20 | func main() { 21 | apiClient, err := client.NewClientWithOpts(client.FromEnv) 22 | if err != nil { 23 | panic(err) 24 | } 25 | defer apiClient.Close() 26 | 27 | containers, err := apiClient.ContainerList(context.Background(), container.ListOptions{All: true}) 28 | if err != nil { 29 | panic(err) 30 | } 31 | 32 | for _, ctr := range containers { 33 | fmt.Printf("%s %s (status: %s)\n", ctr.ID, ctr.Image, ctr.Status) 34 | } 35 | } 36 | ``` 37 | 38 | [Full documentation is available on pkg.go.dev.](https://pkg.go.dev/github.com/docker/docker/client) 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/build_cancel.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // BuildCancel requests the daemon to cancel the ongoing build request. 9 | func (cli *Client) BuildCancel(ctx context.Context, id string) error { 10 | query := url.Values{} 11 | query.Set("id", id) 12 | 13 | serverResp, err := cli.post(ctx, "/build/cancel", query, nil, nil) 14 | ensureReaderClosed(serverResp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/build_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | "strconv" 8 | 9 | "github.com/docker/docker/api/types" 10 | "github.com/docker/docker/api/types/filters" 11 | "github.com/pkg/errors" 12 | ) 13 | 14 | // BuildCachePrune requests the daemon to delete unused cache data 15 | func (cli *Client) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) { 16 | if err := cli.NewVersionError(ctx, "1.31", "build prune"); err != nil { 17 | return nil, err 18 | } 19 | 20 | report := types.BuildCachePruneReport{} 21 | 22 | query := url.Values{} 23 | if opts.All { 24 | query.Set("all", "1") 25 | } 26 | query.Set("keep-storage", strconv.Itoa(int(opts.KeepStorage))) 27 | f, err := filters.ToJSON(opts.Filters) 28 | if err != nil { 29 | return nil, errors.Wrap(err, "prune could not marshal filters option") 30 | } 31 | query.Set("filters", f) 32 | 33 | serverResp, err := cli.post(ctx, "/build/prune", query, nil, nil) 34 | defer ensureReaderClosed(serverResp) 35 | 36 | if err != nil { 37 | return nil, err 38 | } 39 | 40 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 41 | return nil, errors.Wrap(err, "error retrieving disk usage") 42 | } 43 | 44 | return &report, nil 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/checkpoint" 7 | ) 8 | 9 | // CheckpointCreate creates a checkpoint from the given container with the given name 10 | func (cli *Client) CheckpointCreate(ctx context.Context, container string, options checkpoint.CreateOptions) error { 11 | resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_delete.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/checkpoint" 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 checkpoint.DeleteOptions) 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/checkpoint_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/checkpoint" 9 | ) 10 | 11 | // CheckpointList returns the checkpoints of the given container in the docker host 12 | func (cli *Client) CheckpointList(ctx context.Context, container string, options checkpoint.ListOptions) ([]checkpoint.Summary, error) { 13 | var checkpoints []checkpoint.Summary 14 | 15 | query := url.Values{} 16 | if options.CheckpointDir != "" { 17 | query.Set("dir", options.CheckpointDir) 18 | } 19 | 20 | resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", query, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return checkpoints, err 24 | } 25 | 26 | err = json.NewDecoder(resp.body).Decode(&checkpoints) 27 | return checkpoints, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_deprecated.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "net/http" 4 | 5 | // NewClient initializes a new API client for the given host and API version. 6 | // It uses the given http client as transport. 7 | // It also initializes the custom http headers to add to each request. 8 | // 9 | // It won't send any version information if the version number is empty. It is 10 | // highly recommended that you set a version or your client may break if the 11 | // server is upgraded. 12 | // 13 | // Deprecated: use [NewClientWithOpts] passing the [WithHost], [WithVersion], 14 | // [WithHTTPClient] and [WithHTTPHeaders] options. We recommend enabling API 15 | // version negotiation by passing the [WithAPIVersionNegotiation] option instead 16 | // of WithVersion. 17 | func NewClient(host string, version string, client *http.Client, httpHeaders map[string]string) (*Client, error) { 18 | return NewClientWithOpts(WithHost(host), WithVersion(version), WithHTTPClient(client), WithHTTPHeaders(httpHeaders)) 19 | } 20 | 21 | // NewEnvClient initializes a new API client based on environment variables. 22 | // See FromEnv for a list of support environment variables. 23 | // 24 | // Deprecated: use [NewClientWithOpts] passing the [FromEnv] option. 25 | func NewEnvClient() (*Client, error) { 26 | return NewClientWithOpts(FromEnv) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | 3 | package client // import "github.com/docker/docker/client" 4 | 5 | // DefaultDockerHost defines OS-specific default host if the DOCKER_HOST 6 | // (EnvOverrideHost) environment variable is unset or empty. 7 | const DefaultDockerHost = "unix:///var/run/docker.sock" 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | // DefaultDockerHost defines OS-specific default host if the DOCKER_HOST 4 | // (EnvOverrideHost) environment variable is unset or empty. 5 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/swarm" 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(ctx, "1.30", "config create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/configs/create", nil, config, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return response, err 21 | } 22 | 23 | err = json.NewDecoder(resp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // ConfigInspectWithRaw returns the config information with raw data 13 | func (cli *Client) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) { 14 | if id == "" { 15 | return swarm.Config{}, nil, objectNotFoundError{object: "config", id: id} 16 | } 17 | if err := cli.NewVersionError(ctx, "1.30", "config inspect"); err != nil { 18 | return swarm.Config{}, nil, err 19 | } 20 | resp, err := cli.get(ctx, "/configs/"+id, nil, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return swarm.Config{}, nil, err 24 | } 25 | 26 | body, err := io.ReadAll(resp.body) 27 | if err != nil { 28 | return swarm.Config{}, nil, err 29 | } 30 | 31 | var config swarm.Config 32 | rdr := bytes.NewReader(body) 33 | err = json.NewDecoder(rdr).Decode(&config) 34 | 35 | return config, body, err 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // ConfigList returns the list of configs. 14 | func (cli *Client) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) { 15 | if err := cli.NewVersionError(ctx, "1.30", "config list"); err != nil { 16 | return nil, err 17 | } 18 | query := url.Values{} 19 | 20 | if options.Filters.Len() > 0 { 21 | filterJSON, err := filters.ToJSON(options.Filters) 22 | if err != nil { 23 | return nil, err 24 | } 25 | 26 | query.Set("filters", filterJSON) 27 | } 28 | 29 | resp, err := cli.get(ctx, "/configs", query, nil) 30 | defer ensureReaderClosed(resp) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | var configs []swarm.Config 36 | err = json.NewDecoder(resp.body).Decode(&configs) 37 | return configs, err 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // ConfigRemove removes a config. 6 | func (cli *Client) ConfigRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError(ctx, "1.30", "config remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) 11 | defer ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | ) 9 | 10 | // ConfigUpdate attempts to update a config 11 | func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { 12 | if err := cli.NewVersionError(ctx, "1.30", "config update"); err != nil { 13 | return err 14 | } 15 | query := url.Values{} 16 | query.Set("version", version.String()) 17 | resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) 18 | ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_diff.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/container" 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.FilesystemChange, error) { 13 | var changes []container.FilesystemChange 14 | 15 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) 16 | defer ensureReaderClosed(serverResp) 17 | if err != nil { 18 | return changes, err 19 | } 20 | 21 | err = json.NewDecoder(serverResp.body).Decode(&changes) 22 | return changes, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_export.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | ) 8 | 9 | // ContainerExport retrieves the raw contents of a container 10 | // and returns them as an io.ReadCloser. It's up to the caller 11 | // to close the stream. 12 | func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { 13 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | return serverResp.body, nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_kill.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // ContainerKill terminates the container process but does not remove the container from the docker host. 9 | func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { 10 | query := url.Values{} 11 | if signal != "" { 12 | query.Set("signal", signal) 13 | } 14 | 15 | resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "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_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // ContainersPrune requests the daemon to delete unused data 13 | func (cli *Client) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) { 14 | var report types.ContainersPruneReport 15 | 16 | if err := cli.NewVersionError(ctx, "1.25", "container prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/containers/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | ) 9 | 10 | // ContainerRemove kills and removes a container from the docker host. 11 | func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) 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 | defer ensureReaderClosed(resp) 26 | return err 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_rename.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // ContainerRename changes the name of a given container. 9 | func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { 10 | query := url.Values{} 11 | query.Set("name", newContainerName) 12 | resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) 13 | ensureReaderClosed(resp) 14 | return err 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_resize.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/container" 9 | ) 10 | 11 | // ContainerResize changes the size of the tty for a container. 12 | func (cli *Client) ContainerResize(ctx context.Context, containerID string, options container.ResizeOptions) error { 13 | return cli.resize(ctx, "/containers/"+containerID, options.Height, options.Width) 14 | } 15 | 16 | // ContainerExecResize changes the size of the tty for an exec process running inside a container. 17 | func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options container.ResizeOptions) error { 18 | return cli.resize(ctx, "/exec/"+execID, options.Height, options.Width) 19 | } 20 | 21 | func (cli *Client) resize(ctx context.Context, basePath string, height, width uint) error { 22 | query := url.Values{} 23 | query.Set("h", strconv.Itoa(int(height))) 24 | query.Set("w", strconv.Itoa(int(width))) 25 | 26 | resp, err := cli.post(ctx, basePath+"/resize", query, nil, nil) 27 | ensureReaderClosed(resp) 28 | return err 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_restart.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/container" 9 | "github.com/docker/docker/api/types/versions" 10 | ) 11 | 12 | // ContainerRestart stops and starts a container again. 13 | // It makes the daemon wait for the container to be up again for 14 | // a specific amount of time, given the timeout. 15 | func (cli *Client) ContainerRestart(ctx context.Context, containerID string, options container.StopOptions) error { 16 | query := url.Values{} 17 | if options.Timeout != nil { 18 | query.Set("t", strconv.Itoa(*options.Timeout)) 19 | } 20 | if options.Signal != "" { 21 | // Make sure we negotiated (if the client is configured to do so), 22 | // as code below contains API-version specific handling of options. 23 | // 24 | // Normally, version-negotiation (if enabled) would not happen until 25 | // the API request is made. 26 | cli.checkVersion(ctx) 27 | if versions.GreaterThanOrEqualTo(cli.version, "1.42") { 28 | query.Set("signal", options.Signal) 29 | } 30 | } 31 | resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) 32 | ensureReaderClosed(resp) 33 | return err 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_start.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | ) 9 | 10 | // ContainerStart sends a request to the docker daemon to start a container. 11 | func (cli *Client) ContainerStart(ctx context.Context, containerID string, options container.StartOptions) error { 12 | query := url.Values{} 13 | if len(options.CheckpointID) != 0 { 14 | query.Set("checkpoint", options.CheckpointID) 15 | } 16 | if len(options.CheckpointDir) != 0 { 17 | query.Set("checkpoint-dir", options.CheckpointDir) 18 | } 19 | 20 | resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) 21 | ensureReaderClosed(resp) 22 | return err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_top.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | "strings" 8 | 9 | "github.com/docker/docker/api/types/container" 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 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return response, err 24 | } 25 | 26 | err = json.NewDecoder(resp.body).Decode(&response) 27 | return response, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "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 // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | ) 9 | 10 | // ContainerUpdate updates the 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 | defer ensureReaderClosed(serverResp) 15 | if err != nil { 16 | return response, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/disk_usage.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // DiskUsage requests the current data usage from the daemon 13 | func (cli *Client) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) { 14 | var query url.Values 15 | if len(options.Types) > 0 { 16 | query = url.Values{} 17 | for _, t := range options.Types { 18 | query.Add("type", string(t)) 19 | } 20 | } 21 | 22 | serverResp, err := cli.get(ctx, "/system/df", query, nil) 23 | defer ensureReaderClosed(serverResp) 24 | if err != nil { 25 | return types.DiskUsage{}, err 26 | } 27 | 28 | var du types.DiskUsage 29 | if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { 30 | return types.DiskUsage{}, fmt.Errorf("Error retrieving disk usage: %v", err) 31 | } 32 | return du, nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/distribution_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types/registry" 10 | ) 11 | 12 | // DistributionInspect returns the image digest with the full manifest. 13 | func (cli *Client) DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registry.DistributionInspect, error) { 14 | // Contact the registry to retrieve digest and platform information 15 | var distributionInspect registry.DistributionInspect 16 | if image == "" { 17 | return distributionInspect, objectNotFoundError{object: "distribution", id: image} 18 | } 19 | 20 | if err := cli.NewVersionError(ctx, "1.30", "distribution inspect"); err != nil { 21 | return distributionInspect, err 22 | } 23 | 24 | var headers http.Header 25 | if encodedRegistryAuth != "" { 26 | headers = http.Header{ 27 | registry.AuthHeader: {encodedRegistryAuth}, 28 | } 29 | } 30 | 31 | resp, err := cli.get(ctx, "/distribution/"+image+"/json", url.Values{}, headers) 32 | defer ensureReaderClosed(resp) 33 | if err != nil { 34 | return distributionInspect, err 35 | } 36 | 37 | err = json.NewDecoder(resp.body).Decode(&distributionInspect) 38 | return distributionInspect, err 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | "net/url" 8 | "strings" 9 | 10 | "github.com/distribution/reference" 11 | "github.com/docker/docker/api/types" 12 | "github.com/docker/docker/api/types/registry" 13 | ) 14 | 15 | // ImageCreate creates a new image based on the parent options. 16 | // It returns the JSON content in the response body. 17 | func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) { 18 | ref, err := reference.ParseNormalizedNamed(parentReference) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query := url.Values{} 24 | query.Set("fromImage", reference.FamiliarName(ref)) 25 | query.Set("tag", getAPITagFromNamedRef(ref)) 26 | if options.Platform != "" { 27 | query.Set("platform", strings.ToLower(options.Platform)) 28 | } 29 | resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) 30 | if err != nil { 31 | return nil, err 32 | } 33 | return resp.body, nil 34 | } 35 | 36 | func (cli *Client) tryImageCreate(ctx context.Context, query url.Values, registryAuth string) (serverResponse, error) { 37 | return cli.post(ctx, "/images/create", query, nil, http.Header{ 38 | registry.AuthHeader: {registryAuth}, 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_history.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/image" 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 | defer ensureReaderClosed(serverResp) 16 | if err != nil { 17 | return history, err 18 | } 19 | 20 | err = json.NewDecoder(serverResp.body).Decode(&history) 21 | return history, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_import.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | "strings" 8 | 9 | "github.com/distribution/reference" 10 | "github.com/docker/docker/api/types" 11 | ) 12 | 13 | // ImageImport creates a new image based on the source options. 14 | // It returns the JSON content in the response body. 15 | func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) { 16 | if ref != "" { 17 | // Check if the given image name can be resolved 18 | if _, err := reference.ParseNormalizedNamed(ref); err != nil { 19 | return nil, err 20 | } 21 | } 22 | 23 | query := url.Values{} 24 | query.Set("fromSrc", source.SourceName) 25 | query.Set("repo", ref) 26 | query.Set("tag", options.Tag) 27 | query.Set("message", options.Message) 28 | if options.Platform != "" { 29 | query.Set("platform", strings.ToLower(options.Platform)) 30 | } 31 | for _, change := range options.Changes { 32 | query.Add("changes", change) 33 | } 34 | 35 | resp, err := cli.postRaw(ctx, "/images/create", query, source.Source, nil) 36 | if err != nil { 37 | return nil, err 38 | } 39 | return resp.body, nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // ImageInspectWithRaw returns the image information and its raw representation. 13 | func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { 14 | if imageID == "" { 15 | return types.ImageInspect{}, nil, objectNotFoundError{object: "image", id: imageID} 16 | } 17 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/json", nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return types.ImageInspect{}, nil, err 21 | } 22 | 23 | body, err := io.ReadAll(serverResp.body) 24 | if err != nil { 25 | return types.ImageInspect{}, nil, err 26 | } 27 | 28 | var response types.ImageInspect 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_load.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // ImageLoad loads an image in the docker host from the client host. 13 | // It's up to the caller to close the io.ReadCloser in the 14 | // ImageLoadResponse returned by this function. 15 | func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) { 16 | v := url.Values{} 17 | v.Set("quiet", "0") 18 | if quiet { 19 | v.Set("quiet", "1") 20 | } 21 | resp, err := cli.postRaw(ctx, "/images/load", v, input, http.Header{ 22 | "Content-Type": {"application/x-tar"}, 23 | }) 24 | if err != nil { 25 | return types.ImageLoadResponse{}, err 26 | } 27 | return types.ImageLoadResponse{ 28 | Body: resp.body, 29 | JSON: resp.header.Get("Content-Type") == "application/json", 30 | }, nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // ImagesPrune requests the daemon to delete unused data 13 | func (cli *Client) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (types.ImagesPruneReport, error) { 14 | var report types.ImagesPruneReport 15 | 16 | if err := cli.NewVersionError(ctx, "1.25", "image prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/images/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/image" 10 | ) 11 | 12 | // ImageRemove removes an image from the docker host. 13 | func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]image.DeleteResponse, error) { 14 | query := url.Values{} 15 | 16 | if options.Force { 17 | query.Set("force", "1") 18 | } 19 | if !options.PruneChildren { 20 | query.Set("noprune", "1") 21 | } 22 | 23 | var dels []image.DeleteResponse 24 | resp, err := cli.delete(ctx, "/images/"+imageID, query, nil) 25 | defer ensureReaderClosed(resp) 26 | if err != nil { 27 | return dels, err 28 | } 29 | 30 | err = json.NewDecoder(resp.body).Decode(&dels) 31 | return dels, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_save.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | ) 8 | 9 | // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. 10 | // It's up to the caller to store the images and close the stream. 11 | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { 12 | query := url.Values{ 13 | "names": imageIDs, 14 | } 15 | 16 | resp, err := cli.get(ctx, "/images/get", query, nil) 17 | if err != nil { 18 | return nil, err 19 | } 20 | return resp.body, nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_tag.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/distribution/reference" 8 | "github.com/pkg/errors" 9 | ) 10 | 11 | // ImageTag tags an image in the docker host 12 | func (cli *Client) ImageTag(ctx context.Context, source, target string) error { 13 | if _, err := reference.ParseAnyReference(source); err != nil { 14 | return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", source) 15 | } 16 | 17 | ref, err := reference.ParseNormalizedNamed(target) 18 | if err != nil { 19 | return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", target) 20 | } 21 | 22 | if _, isCanonical := ref.(reference.Canonical); isCanonical { 23 | return errors.New("refusing to create a tag with a digest reference") 24 | } 25 | 26 | ref = reference.TagNameOnly(ref) 27 | 28 | query := url.Values{} 29 | query.Set("repo", reference.FamiliarName(ref)) 30 | if tagged, ok := ref.(reference.Tagged); ok { 31 | query.Set("tag", tagged.Tag()) 32 | } 33 | 34 | resp, err := cli.post(ctx, "/images/"+source+"/tag", query, nil, nil) 35 | ensureReaderClosed(resp) 36 | return err 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/info.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types/system" 10 | ) 11 | 12 | // Info returns information about the docker server. 13 | func (cli *Client) Info(ctx context.Context) (system.Info, error) { 14 | var info system.Info 15 | serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) 16 | defer ensureReaderClosed(serverResp) 17 | if err != nil { 18 | return info, err 19 | } 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 // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/checkpoint" 7 | ) 8 | 9 | type apiClientExperimental interface { 10 | CheckpointAPIClient 11 | } 12 | 13 | // CheckpointAPIClient defines API client methods for the checkpoints 14 | type CheckpointAPIClient interface { 15 | CheckpointCreate(ctx context.Context, container string, options checkpoint.CreateOptions) error 16 | CheckpointDelete(ctx context.Context, container string, options checkpoint.DeleteOptions) error 17 | CheckpointList(ctx context.Context, container string, options checkpoint.ListOptions) ([]checkpoint.Summary, error) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_stable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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/login.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/registry" 9 | ) 10 | 11 | // RegistryLogin authenticates the docker server with a given docker registry. 12 | // It returns unauthorizedError when the authentication fails. 13 | func (cli *Client) RegistryLogin(ctx context.Context, auth registry.AuthConfig) (registry.AuthenticateOKBody, error) { 14 | resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil) 15 | defer ensureReaderClosed(resp) 16 | 17 | if err != nil { 18 | return registry.AuthenticateOKBody{}, err 19 | } 20 | 21 | var response registry.AuthenticateOKBody 22 | err = json.NewDecoder(resp.body).Decode(&response) 23 | return response, err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_connect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/network" 8 | ) 9 | 10 | // NetworkConnect connects a container to an existent network in the docker host. 11 | func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { 12 | nc := types.NetworkConnect{ 13 | Container: containerID, 14 | EndpointConfig: config, 15 | } 16 | resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/versions" 9 | ) 10 | 11 | // NetworkCreate creates a new network in the docker host. 12 | func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { 13 | // Make sure we negotiated (if the client is configured to do so), 14 | // as code below contains API-version specific handling of options. 15 | // 16 | // Normally, version-negotiation (if enabled) would not happen until 17 | // the API request is made. 18 | cli.checkVersion(ctx) 19 | 20 | networkCreateRequest := types.NetworkCreateRequest{ 21 | NetworkCreate: options, 22 | Name: name, 23 | } 24 | if versions.LessThan(cli.version, "1.44") { 25 | networkCreateRequest.CheckDuplicate = true //nolint:staticcheck // ignore SA1019: CheckDuplicate is deprecated since API v1.44. 26 | } 27 | 28 | var response types.NetworkCreateResponse 29 | serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) 30 | defer ensureReaderClosed(serverResp) 31 | if err != nil { 32 | return response, err 33 | } 34 | 35 | err = json.NewDecoder(serverResp.body).Decode(&response) 36 | return response, err 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_disconnect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | ) 8 | 9 | // NetworkDisconnect disconnects a container from an existent network in the docker host. 10 | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { 11 | nd := types.NetworkDisconnect{Container: containerID, Force: force} 12 | resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) 13 | ensureReaderClosed(resp) 14 | return err 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // NetworkList returns the list of networks configured in the docker host. 13 | func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 14 | query := url.Values{} 15 | if options.Filters.Len() > 0 { 16 | //nolint:staticcheck // ignore SA1019 for old code 17 | filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) 18 | if err != nil { 19 | return nil, err 20 | } 21 | 22 | query.Set("filters", filterJSON) 23 | } 24 | var networkResources []types.NetworkResource 25 | resp, err := cli.get(ctx, "/networks", query, nil) 26 | defer ensureReaderClosed(resp) 27 | if err != nil { 28 | return networkResources, err 29 | } 30 | err = json.NewDecoder(resp.body).Decode(&networkResources) 31 | return networkResources, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // NetworksPrune requests the daemon to delete unused networks 13 | func (cli *Client) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (types.NetworksPruneReport, error) { 14 | var report types.NetworksPruneReport 15 | 16 | if err := cli.NewVersionError(ctx, "1.25", "network prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/networks/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving network prune report: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "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 | defer ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // NodeInspectWithRaw returns the node information. 13 | func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { 14 | if nodeID == "" { 15 | return swarm.Node{}, nil, objectNotFoundError{object: "node", id: nodeID} 16 | } 17 | serverResp, err := cli.get(ctx, "/nodes/"+nodeID, nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return swarm.Node{}, nil, err 21 | } 22 | 23 | body, err := io.ReadAll(serverResp.body) 24 | if err != nil { 25 | return swarm.Node{}, nil, err 26 | } 27 | 28 | var response swarm.Node 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // NodeList returns the list of nodes. 14 | func (cli *Client) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/nodes", query, nil) 27 | defer ensureReaderClosed(resp) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | var nodes []swarm.Node 33 | err = json.NewDecoder(resp.body).Decode(&nodes) 34 | return nodes, err 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // NodeRemove removes a Node. 11 | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) 18 | defer ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | ) 9 | 10 | // NodeUpdate updates a Node. 11 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 12 | query := url.Values{} 13 | query.Set("version", version.String()) 14 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types" 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 | ensureReaderClosed(resp) 22 | return err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_disable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 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 // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types" 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 // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // PluginInspectWithRaw inspects an existing plugin 13 | func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { 14 | if name == "" { 15 | return nil, nil, objectNotFoundError{object: "plugin", id: name} 16 | } 17 | resp, err := cli.get(ctx, "/plugins/"+name+"/json", nil, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return nil, nil, err 21 | } 22 | 23 | body, err := io.ReadAll(resp.body) 24 | if err != nil { 25 | return nil, nil, err 26 | } 27 | var p types.Plugin 28 | rdr := bytes.NewReader(body) 29 | err = json.NewDecoder(rdr).Decode(&p) 30 | return &p, body, err 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // PluginList returns the installed plugins 13 | func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) { 14 | var plugins types.PluginsListResponse 15 | query := url.Values{} 16 | 17 | if filter.Len() > 0 { 18 | //nolint:staticcheck // ignore SA1019 for old code 19 | filterJSON, err := filters.ToParamWithVersion(cli.version, filter) 20 | if err != nil { 21 | return plugins, err 22 | } 23 | query.Set("filters", filterJSON) 24 | } 25 | resp, err := cli.get(ctx, "/plugins", query, nil) 26 | defer ensureReaderClosed(resp) 27 | if err != nil { 28 | return plugins, err 29 | } 30 | 31 | err = json.NewDecoder(resp.body).Decode(&plugins) 32 | return plugins, err 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_push.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | 8 | "github.com/docker/docker/api/types/registry" 9 | ) 10 | 11 | // PluginPush pushes a plugin to a registry 12 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 13 | resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, http.Header{ 14 | registry.AuthHeader: {registryAuth}, 15 | }) 16 | if err != nil { 17 | return nil, err 18 | } 19 | return resp.body, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 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 | defer ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_set.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "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/plugin_upgrade.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/distribution/reference" 10 | "github.com/docker/docker/api/types" 11 | "github.com/docker/docker/api/types/registry" 12 | "github.com/pkg/errors" 13 | ) 14 | 15 | // PluginUpgrade upgrades a plugin 16 | func (cli *Client) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (rc io.ReadCloser, err error) { 17 | if err := cli.NewVersionError(ctx, "1.26", "plugin upgrade"); err != nil { 18 | return nil, err 19 | } 20 | query := url.Values{} 21 | if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil { 22 | return nil, errors.Wrap(err, "invalid remote reference") 23 | } 24 | query.Set("remote", options.RemoteRef) 25 | 26 | privileges, err := cli.checkPluginPermissions(ctx, query, options) 27 | if err != nil { 28 | return nil, err 29 | } 30 | 31 | resp, err := cli.tryPluginUpgrade(ctx, query, privileges, name, options.RegistryAuth) 32 | if err != nil { 33 | return nil, err 34 | } 35 | return resp.body, nil 36 | } 37 | 38 | func (cli *Client) tryPluginUpgrade(ctx context.Context, query url.Values, privileges types.PluginPrivileges, name, registryAuth string) (serverResponse, error) { 39 | return cli.post(ctx, "/plugins/"+name+"/upgrade", query, privileges, http.Header{ 40 | registry.AuthHeader: {registryAuth}, 41 | }) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/swarm" 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(ctx, "1.25", "secret create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/secrets/create", nil, secret, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return response, err 21 | } 22 | 23 | err = json.NewDecoder(resp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // SecretInspectWithRaw returns the secret information with raw data 13 | func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) (swarm.Secret, []byte, error) { 14 | if err := cli.NewVersionError(ctx, "1.25", "secret inspect"); err != nil { 15 | return swarm.Secret{}, nil, err 16 | } 17 | if id == "" { 18 | return swarm.Secret{}, nil, objectNotFoundError{object: "secret", id: id} 19 | } 20 | resp, err := cli.get(ctx, "/secrets/"+id, nil, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return swarm.Secret{}, nil, err 24 | } 25 | 26 | body, err := io.ReadAll(resp.body) 27 | if err != nil { 28 | return swarm.Secret{}, nil, err 29 | } 30 | 31 | var secret swarm.Secret 32 | rdr := bytes.NewReader(body) 33 | err = json.NewDecoder(rdr).Decode(&secret) 34 | 35 | return secret, body, err 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // SecretList returns the list of secrets. 14 | func (cli *Client) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { 15 | if err := cli.NewVersionError(ctx, "1.25", "secret list"); err != nil { 16 | return nil, err 17 | } 18 | query := url.Values{} 19 | 20 | if options.Filters.Len() > 0 { 21 | filterJSON, err := filters.ToJSON(options.Filters) 22 | if err != nil { 23 | return nil, err 24 | } 25 | 26 | query.Set("filters", filterJSON) 27 | } 28 | 29 | resp, err := cli.get(ctx, "/secrets", query, nil) 30 | defer ensureReaderClosed(resp) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | var secrets []swarm.Secret 36 | err = json.NewDecoder(resp.body).Decode(&secrets) 37 | return secrets, err 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // SecretRemove removes a secret. 6 | func (cli *Client) SecretRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError(ctx, "1.25", "secret remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) 11 | defer ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | ) 9 | 10 | // SecretUpdate attempts to update a secret. 11 | func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { 12 | if err := cli.NewVersionError(ctx, "1.25", "secret update"); err != nil { 13 | return err 14 | } 15 | query := url.Values{} 16 | query.Set("version", version.String()) 17 | resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) 18 | ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "fmt" 8 | "io" 9 | "net/url" 10 | 11 | "github.com/docker/docker/api/types" 12 | "github.com/docker/docker/api/types/swarm" 13 | ) 14 | 15 | // ServiceInspectWithRaw returns the service information and the raw data. 16 | func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error) { 17 | if serviceID == "" { 18 | return swarm.Service{}, nil, objectNotFoundError{object: "service", id: serviceID} 19 | } 20 | query := url.Values{} 21 | query.Set("insertDefaults", fmt.Sprintf("%v", opts.InsertDefaults)) 22 | serverResp, err := cli.get(ctx, "/services/"+serviceID, query, nil) 23 | defer ensureReaderClosed(serverResp) 24 | if err != nil { 25 | return swarm.Service{}, nil, err 26 | } 27 | 28 | body, err := io.ReadAll(serverResp.body) 29 | if err != nil { 30 | return swarm.Service{}, nil, err 31 | } 32 | 33 | var response swarm.Service 34 | rdr := bytes.NewReader(body) 35 | err = json.NewDecoder(rdr).Decode(&response) 36 | return response, body, err 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // ServiceList returns the list of services. 14 | func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | if options.Status { 27 | query.Set("status", "true") 28 | } 29 | 30 | resp, err := cli.get(ctx, "/services", query, nil) 31 | defer ensureReaderClosed(resp) 32 | if err != nil { 33 | return nil, err 34 | } 35 | 36 | var services []swarm.Service 37 | err = json.NewDecoder(resp.body).Decode(&services) 38 | return services, err 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_logs.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | "time" 8 | 9 | "github.com/docker/docker/api/types/container" 10 | timetypes "github.com/docker/docker/api/types/time" 11 | "github.com/pkg/errors" 12 | ) 13 | 14 | // ServiceLogs returns the logs generated by a service in an io.ReadCloser. 15 | // It's up to the caller to close the stream. 16 | func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options container.LogsOptions) (io.ReadCloser, error) { 17 | query := url.Values{} 18 | if options.ShowStdout { 19 | query.Set("stdout", "1") 20 | } 21 | 22 | if options.ShowStderr { 23 | query.Set("stderr", "1") 24 | } 25 | 26 | if options.Since != "" { 27 | ts, err := timetypes.GetTimestamp(options.Since, time.Now()) 28 | if err != nil { 29 | return nil, errors.Wrap(err, `invalid value for "since"`) 30 | } 31 | query.Set("since", ts) 32 | } 33 | 34 | if options.Timestamps { 35 | query.Set("timestamps", "1") 36 | } 37 | 38 | if options.Details { 39 | query.Set("details", "1") 40 | } 41 | 42 | if options.Follow { 43 | query.Set("follow", "1") 44 | } 45 | query.Set("tail", options.Tail) 46 | 47 | resp, err := cli.get(ctx, "/services/"+serviceID+"/logs", query, nil) 48 | if err != nil { 49 | return nil, err 50 | } 51 | return resp.body, nil 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "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 | defer ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_get_unlock_key.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 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 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return types.SwarmUnlockKeyResponse{}, err 16 | } 17 | 18 | var response types.SwarmUnlockKeyResponse 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_init.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/swarm" 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 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return "", err 16 | } 17 | 18 | var response string 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/swarm" 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 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return swarm.Swarm{}, err 16 | } 17 | 18 | var response swarm.Swarm 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | ) 8 | 9 | // SwarmJoin joins the swarm. 10 | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 11 | resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // SwarmLeave leaves the swarm. 9 | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { 10 | query := url.Values{} 11 | if force { 12 | query.Set("force", "1") 13 | } 14 | resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_unlock.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | ) 8 | 9 | // SwarmUnlock unlocks locked swarm. 10 | func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { 11 | serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) 12 | ensureReaderClosed(serverResp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // SwarmUpdate updates the swarm. 12 | func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { 13 | query := url.Values{} 14 | query.Set("version", version.String()) 15 | query.Set("rotateWorkerToken", strconv.FormatBool(flags.RotateWorkerToken)) 16 | query.Set("rotateManagerToken", strconv.FormatBool(flags.RotateManagerToken)) 17 | query.Set("rotateManagerUnlockKey", strconv.FormatBool(flags.RotateManagerUnlockKey)) 18 | resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/task_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // TaskInspectWithRaw returns the task information and its raw representation. 13 | func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { 14 | if taskID == "" { 15 | return swarm.Task{}, nil, objectNotFoundError{object: "task", id: taskID} 16 | } 17 | serverResp, err := cli.get(ctx, "/tasks/"+taskID, nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return swarm.Task{}, nil, err 21 | } 22 | 23 | body, err := io.ReadAll(serverResp.body) 24 | if err != nil { 25 | return swarm.Task{}, nil, err 26 | } 27 | 28 | var response swarm.Task 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/task_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // TaskList returns the list of tasks. 14 | func (cli *Client) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/tasks", query, nil) 27 | defer ensureReaderClosed(resp) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | var tasks []swarm.Task 33 | err = json.NewDecoder(resp.body).Decode(&tasks) 34 | return tasks, err 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/task_logs.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | "time" 8 | 9 | "github.com/docker/docker/api/types/container" 10 | timetypes "github.com/docker/docker/api/types/time" 11 | ) 12 | 13 | // TaskLogs returns the logs generated by a task in an io.ReadCloser. 14 | // It's up to the caller to close the stream. 15 | func (cli *Client) TaskLogs(ctx context.Context, taskID string, options container.LogsOptions) (io.ReadCloser, error) { 16 | query := url.Values{} 17 | if options.ShowStdout { 18 | query.Set("stdout", "1") 19 | } 20 | 21 | if options.ShowStderr { 22 | query.Set("stderr", "1") 23 | } 24 | 25 | if options.Since != "" { 26 | ts, err := timetypes.GetTimestamp(options.Since, time.Now()) 27 | if err != nil { 28 | return nil, err 29 | } 30 | query.Set("since", ts) 31 | } 32 | 33 | if options.Timestamps { 34 | query.Set("timestamps", "1") 35 | } 36 | 37 | if options.Details { 38 | query.Set("details", "1") 39 | } 40 | 41 | if options.Follow { 42 | query.Set("follow", "1") 43 | } 44 | query.Set("tail", options.Tail) 45 | 46 | resp, err := cli.get(ctx, "/tasks/"+taskID+"/logs", query, nil) 47 | if err != nil { 48 | return nil, err 49 | } 50 | return resp.body, nil 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/utils.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "regexp" 6 | 7 | "github.com/docker/docker/api/types/filters" 8 | ) 9 | 10 | var headerRegexp = regexp.MustCompile(`\ADocker/.+\s\((.+)\)\z`) 11 | 12 | // getDockerOS returns the operating system based on the server header from the daemon. 13 | func getDockerOS(serverHeader string) string { 14 | var osType string 15 | matches := headerRegexp.FindStringSubmatch(serverHeader) 16 | if len(matches) > 0 { 17 | osType = matches[1] 18 | } 19 | return osType 20 | } 21 | 22 | // getFiltersQuery returns a url query with "filters" query term, based on the 23 | // filters provided. 24 | func getFiltersQuery(f filters.Args) (url.Values, error) { 25 | query := url.Values{} 26 | if f.Len() > 0 { 27 | filterJSON, err := filters.ToJSON(f) 28 | if err != nil { 29 | return query, err 30 | } 31 | query.Set("filters", filterJSON) 32 | } 33 | return query, nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/version.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 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 | defer ensureReaderClosed(resp) 14 | if err != nil { 15 | return types.Version{}, err 16 | } 17 | 18 | var server types.Version 19 | err = json.NewDecoder(resp.body).Decode(&server) 20 | return server, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/volume" 8 | ) 9 | 10 | // VolumeCreate creates a volume in the docker host. 11 | func (cli *Client) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) { 12 | var vol volume.Volume 13 | resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) 14 | defer ensureReaderClosed(resp) 15 | if err != nil { 16 | return vol, err 17 | } 18 | err = json.NewDecoder(resp.body).Decode(&vol) 19 | return vol, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | 9 | "github.com/docker/docker/api/types/volume" 10 | ) 11 | 12 | // VolumeInspect returns the information about a specific volume in the docker host. 13 | func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) { 14 | vol, _, err := cli.VolumeInspectWithRaw(ctx, volumeID) 15 | return vol, err 16 | } 17 | 18 | // VolumeInspectWithRaw returns the information about a specific volume in the docker host and its raw representation 19 | func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (volume.Volume, []byte, error) { 20 | if volumeID == "" { 21 | return volume.Volume{}, nil, objectNotFoundError{object: "volume", id: volumeID} 22 | } 23 | 24 | var vol volume.Volume 25 | resp, err := cli.get(ctx, "/volumes/"+volumeID, nil, nil) 26 | defer ensureReaderClosed(resp) 27 | if err != nil { 28 | return vol, nil, err 29 | } 30 | 31 | body, err := io.ReadAll(resp.body) 32 | if err != nil { 33 | return vol, nil, err 34 | } 35 | rdr := bytes.NewReader(body) 36 | err = json.NewDecoder(rdr).Decode(&vol) 37 | return vol, body, err 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/filters" 9 | "github.com/docker/docker/api/types/volume" 10 | ) 11 | 12 | // VolumeList returns the volumes configured in the docker host. 13 | func (cli *Client) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error) { 14 | var volumes volume.ListResponse 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | //nolint:staticcheck // ignore SA1019 for old code 19 | filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) 20 | if err != nil { 21 | return volumes, err 22 | } 23 | query.Set("filters", filterJSON) 24 | } 25 | resp, err := cli.get(ctx, "/volumes", query, nil) 26 | defer ensureReaderClosed(resp) 27 | if err != nil { 28 | return volumes, err 29 | } 30 | 31 | err = json.NewDecoder(resp.body).Decode(&volumes) 32 | return volumes, err 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // VolumesPrune requests the daemon to delete unused data 13 | func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (types.VolumesPruneReport, error) { 14 | var report types.VolumesPruneReport 15 | 16 | if err := cli.NewVersionError(ctx, "1.25", "volume prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/volumes/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving volume prune report: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/versions" 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 force { 14 | // Make sure we negotiated (if the client is configured to do so), 15 | // as code below contains API-version specific handling of options. 16 | // 17 | // Normally, version-negotiation (if enabled) would not happen until 18 | // the API request is made. 19 | cli.checkVersion(ctx) 20 | if versions.GreaterThanOrEqualTo(cli.version, "1.25") { 21 | query.Set("force", "1") 22 | } 23 | } 24 | resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) 25 | defer ensureReaderClosed(resp) 26 | return err 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "github.com/docker/docker/api/types/volume" 9 | ) 10 | 11 | // VolumeUpdate updates a volume. This only works for Cluster Volumes, and 12 | // only some fields can be updated. 13 | func (cli *Client) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error { 14 | if err := cli.NewVersionError(ctx, "1.42", "volume update"); err != nil { 15 | return err 16 | } 17 | 18 | query := url.Values{} 19 | query.Set("version", version.String()) 20 | 21 | resp, err := cli.put(ctx, "/volumes/"+volumeID, query, options, nil) 22 | ensureReaderClosed(resp) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/errdefs/doc.go: -------------------------------------------------------------------------------- 1 | // Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. 2 | // Errors that cross the package boundary should implement one (and only one) of these interfaces. 3 | // 4 | // Packages should not reference these interfaces directly, only implement them. 5 | // To check if a particular error implements one of these interfaces, there are helper 6 | // functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. 7 | // If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). 8 | package errdefs // import "github.com/docker/docker/errdefs" 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/errdefs/http_helpers.go: -------------------------------------------------------------------------------- 1 | package errdefs 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | // FromStatusCode creates an errdef error, based on the provided HTTP status-code 8 | func FromStatusCode(err error, statusCode int) error { 9 | if err == nil { 10 | return nil 11 | } 12 | switch statusCode { 13 | case http.StatusNotFound: 14 | err = NotFound(err) 15 | case http.StatusBadRequest: 16 | err = InvalidParameter(err) 17 | case http.StatusConflict: 18 | err = Conflict(err) 19 | case http.StatusUnauthorized: 20 | err = Unauthorized(err) 21 | case http.StatusServiceUnavailable: 22 | err = Unavailable(err) 23 | case http.StatusForbidden: 24 | err = Forbidden(err) 25 | case http.StatusNotModified: 26 | err = NotModified(err) 27 | case http.StatusNotImplemented: 28 | err = NotImplemented(err) 29 | case http.StatusInternalServerError: 30 | if !IsSystem(err) && !IsUnknown(err) && !IsDataLoss(err) && !IsDeadline(err) && !IsCancelled(err) { 31 | err = System(err) 32 | } 33 | default: 34 | switch { 35 | case statusCode >= 200 && statusCode < 400: 36 | // it's a client error 37 | case statusCode >= 400 && statusCode < 500: 38 | err = InvalidParameter(err) 39 | case statusCode >= 500 && statusCode < 600: 40 | err = System(err) 41 | default: 42 | err = Unknown(err) 43 | } 44 | } 45 | return err 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/internal/multierror/multierror.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // Join is a drop-in replacement for errors.Join with better formatting. 8 | func Join(errs ...error) error { 9 | n := 0 10 | for _, err := range errs { 11 | if err != nil { 12 | n++ 13 | } 14 | } 15 | if n == 0 { 16 | return nil 17 | } 18 | e := &joinError{ 19 | errs: make([]error, 0, n), 20 | } 21 | for _, err := range errs { 22 | if err != nil { 23 | e.errs = append(e.errs, err) 24 | } 25 | } 26 | return e 27 | } 28 | 29 | type joinError struct { 30 | errs []error 31 | } 32 | 33 | func (e *joinError) Error() string { 34 | if len(e.errs) == 1 { 35 | return strings.TrimSpace(e.errs[0].Error()) 36 | } 37 | stringErrs := make([]string, 0, len(e.errs)) 38 | for _, subErr := range e.errs { 39 | stringErrs = append(stringErrs, strings.Replace(subErr.Error(), "\n", "\n\t", -1)) 40 | } 41 | return "* " + strings.Join(stringErrs, "\n* ") 42 | } 43 | 44 | func (e *joinError) Unwrap() []error { 45 | return e.errs 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/togettoyou/hub-mirror/0a3cd37378e049a51b02edca7092fc6c670fff26/vendor/github.com/docker/go-connections/sockets/README.md -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/proxy.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import ( 4 | "net" 5 | "net/url" 6 | "os" 7 | "strings" 8 | 9 | "golang.org/x/net/proxy" 10 | ) 11 | 12 | // GetProxyEnv allows access to the uppercase and the lowercase forms of 13 | // proxy-related variables. See the Go specification for details on these 14 | // variables. https://golang.org/pkg/net/http/ 15 | func GetProxyEnv(key string) string { 16 | proxyValue := os.Getenv(strings.ToUpper(key)) 17 | if proxyValue == "" { 18 | return os.Getenv(strings.ToLower(key)) 19 | } 20 | return proxyValue 21 | } 22 | 23 | // DialerFromEnvironment takes in a "direct" *net.Dialer and returns a 24 | // proxy.Dialer which will route the connections through the proxy using the 25 | // given dialer. 26 | func DialerFromEnvironment(direct *net.Dialer) (proxy.Dialer, error) { 27 | allProxy := GetProxyEnv("all_proxy") 28 | if len(allProxy) == 0 { 29 | return direct, nil 30 | } 31 | 32 | proxyURL, err := url.Parse(allProxy) 33 | if err != nil { 34 | return direct, err 35 | } 36 | 37 | proxyFromURL, err := proxy.FromURL(proxyURL, direct) 38 | if err != nil { 39 | return direct, err 40 | } 41 | 42 | noProxy := GetProxyEnv("no_proxy") 43 | if len(noProxy) == 0 { 44 | return proxyFromURL, nil 45 | } 46 | 47 | perHost := proxy.NewPerHost(proxyFromURL, direct) 48 | perHost.AddFromString(noProxy) 49 | 50 | return perHost, nil 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets.go: -------------------------------------------------------------------------------- 1 | // Package sockets provides helper functions to create and configure Unix or TCP sockets. 2 | package sockets 3 | 4 | import ( 5 | "errors" 6 | "net" 7 | "net/http" 8 | "time" 9 | ) 10 | 11 | // Why 32? See https://github.com/docker/docker/pull/8035. 12 | const defaultTimeout = 32 * time.Second 13 | 14 | // ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system. 15 | var ErrProtocolNotAvailable = errors.New("protocol not available") 16 | 17 | // ConfigureTransport configures the specified Transport according to the 18 | // specified proto and addr. 19 | // If the proto is unix (using a unix socket to communicate) or npipe the 20 | // compression is disabled. 21 | func ConfigureTransport(tr *http.Transport, proto, addr string) error { 22 | switch proto { 23 | case "unix": 24 | return configureUnixTransport(tr, proto, addr) 25 | case "npipe": 26 | return configureNpipeTransport(tr, proto, addr) 27 | default: 28 | tr.Proxy = http.ProxyFromEnvironment 29 | dialer, err := DialerFromEnvironment(&net.Dialer{ 30 | Timeout: defaultTimeout, 31 | }) 32 | if err != nil { 33 | return err 34 | } 35 | tr.Dial = dialer.Dial 36 | } 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "fmt" 7 | "net" 8 | "net/http" 9 | "syscall" 10 | "time" 11 | ) 12 | 13 | const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path) 14 | 15 | func configureUnixTransport(tr *http.Transport, proto, addr string) error { 16 | if len(addr) > maxUnixSocketPathSize { 17 | return fmt.Errorf("Unix socket path %q is too long", addr) 18 | } 19 | // No need for compression in local communications. 20 | tr.DisableCompression = true 21 | tr.Dial = func(_, _ string) (net.Conn, error) { 22 | return net.DialTimeout(proto, addr, defaultTimeout) 23 | } 24 | return nil 25 | } 26 | 27 | func configureNpipeTransport(tr *http.Transport, proto, addr string) error { 28 | return ErrProtocolNotAvailable 29 | } 30 | 31 | // DialPipe connects to a Windows named pipe. 32 | // This is not supported on other OSes. 33 | func DialPipe(_ string, _ time.Duration) (net.Conn, error) { 34 | return nil, syscall.EAFNOSUPPORT 35 | } 36 | -------------------------------------------------------------------------------- /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 | // SystemCertPool returns an new empty cert pool, 10 | // accessing system cert pool is supported in go 1.7 11 | func SystemCertPool() (*x509.CertPool, error) { 12 | return x509.NewCertPool(), nil 13 | } 14 | -------------------------------------------------------------------------------- /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-units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # go-units maintainers file 2 | # 3 | # This file describes who runs the docker/go-units project and how. 4 | # This is a living document - if you see something out of date or missing, speak up! 5 | # 6 | # It is structured to be consumable by both humans and programs. 7 | # To extract its contents programmatically, use any TOML-compliant parser. 8 | # 9 | # This file is compiled into the MAINTAINERS file in docker/opensource. 10 | # 11 | [Org] 12 | [Org."Core maintainers"] 13 | people = [ 14 | "akihirosuda", 15 | "dnephin", 16 | "thajeztah", 17 | "vdemeester", 18 | ] 19 | 20 | [people] 21 | 22 | # A reference list of all people associated with the project. 23 | # All other sections should refer to people by their canonical key 24 | # in the people section. 25 | 26 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER 27 | 28 | [people.akihirosuda] 29 | Name = "Akihiro Suda" 30 | Email = "akihiro.suda.cz@hco.ntt.co.jp" 31 | GitHub = "AkihiroSuda" 32 | 33 | [people.dnephin] 34 | Name = "Daniel Nephin" 35 | Email = "dnephin@gmail.com" 36 | GitHub = "dnephin" 37 | 38 | [people.thajeztah] 39 | Name = "Sebastiaan van Stijn" 40 | Email = "github@gone.nl" 41 | GitHub = "thaJeztah" 42 | 43 | [people.vdemeester] 44 | Name = "Vincent Demeester" 45 | Email = "vincent@sbr.pm" 46 | GitHub = "vdemeester" -------------------------------------------------------------------------------- /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 golang.org/x/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/go-units/duration.go: -------------------------------------------------------------------------------- 1 | // Package units provides helper function to parse and print size and time units 2 | // in human-readable format. 3 | package units 4 | 5 | import ( 6 | "fmt" 7 | "time" 8 | ) 9 | 10 | // HumanDuration returns a human-readable approximation of a duration 11 | // (eg. "About a minute", "4 hours ago", etc.). 12 | func HumanDuration(d time.Duration) string { 13 | if seconds := int(d.Seconds()); seconds < 1 { 14 | return "Less than a second" 15 | } else if seconds == 1 { 16 | return "1 second" 17 | } else if seconds < 60 { 18 | return fmt.Sprintf("%d seconds", seconds) 19 | } else if minutes := int(d.Minutes()); minutes == 1 { 20 | return "About a minute" 21 | } else if minutes < 60 { 22 | return fmt.Sprintf("%d minutes", minutes) 23 | } else if hours := int(d.Hours() + 0.5); hours == 1 { 24 | return "About an hour" 25 | } else if hours < 48 { 26 | return fmt.Sprintf("%d hours", hours) 27 | } else if hours < 24*7*2 { 28 | return fmt.Sprintf("%d days", hours/24) 29 | } else if hours < 24*30*2 { 30 | return fmt.Sprintf("%d weeks", hours/24/7) 31 | } else if hours < 24*365*2 { 32 | return fmt.Sprintf("%d months", hours/24/30) 33 | } 34 | return fmt.Sprintf("%d years", int(d.Hours())/24/365) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/felixge/httpsnoop/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/togettoyou/hub-mirror/0a3cd37378e049a51b02edca7092fc6c670fff26/vendor/github.com/felixge/httpsnoop/.gitignore -------------------------------------------------------------------------------- /vendor/github.com/felixge/httpsnoop/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/felixge/httpsnoop/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: ci generate clean 2 | 3 | ci: clean generate 4 | go test -race -v ./... 5 | 6 | generate: 7 | go generate . 8 | 9 | clean: 10 | rm -rf *_generated*.go 11 | -------------------------------------------------------------------------------- /vendor/github.com/felixge/httpsnoop/docs.go: -------------------------------------------------------------------------------- 1 | // Package httpsnoop provides an easy way to capture http related metrics (i.e. 2 | // response time, bytes written, and http status code) from your application's 3 | // http.Handlers. 4 | // 5 | // Doing this requires non-trivial wrapping of the http.ResponseWriter 6 | // interface, which is also exposed for users interested in a more low-level 7 | // API. 8 | package httpsnoop 9 | 10 | //go:generate go run codegen/main.go 11 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/.golangci.yaml: -------------------------------------------------------------------------------- 1 | run: 2 | timeout: 1m 3 | tests: true 4 | 5 | linters: 6 | disable-all: true 7 | enable: 8 | - asciicheck 9 | - errcheck 10 | - forcetypeassert 11 | - gocritic 12 | - gofmt 13 | - goimports 14 | - gosimple 15 | - govet 16 | - ineffassign 17 | - misspell 18 | - revive 19 | - staticcheck 20 | - typecheck 21 | - unused 22 | 23 | issues: 24 | exclude-use-default: false 25 | max-issues-per-linter: 0 26 | max-same-issues: 10 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ## v1.0.0-rc1 4 | 5 | This is the first logged release. Major changes (including breaking changes) 6 | have occurred since earlier tags. 7 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Logr is open to pull-requests, provided they fit within the intended scope of 4 | the project. Specifically, this library aims to be VERY small and minimalist, 5 | with no external dependencies. 6 | 7 | ## Compatibility 8 | 9 | This project intends to follow [semantic versioning](http://semver.org) and 10 | is very strict about compatibility. Any proposed changes MUST follow those 11 | rules. 12 | 13 | ## Performance 14 | 15 | As a logging library, logr must be as light-weight as possible. Any proposed 16 | code change must include results of running the [benchmark](./benchmark) 17 | before and after the change. 18 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you have discovered a security vulnerability in this project, please report it 4 | privately. **Do not disclose it as a public issue.** This gives us time to work with you 5 | to fix the issue before public exposure, reducing the chance that the exploit will be 6 | used before a patch is released. 7 | 8 | You may submit the report in the following ways: 9 | 10 | - send an email to go-logr-security@googlegroups.com 11 | - send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new) 12 | 13 | Please provide the following information in your report: 14 | 15 | - A description of the vulnerability and its impact 16 | - How to reproduce the issue 17 | 18 | We ask that you give us 90 days to work on a fix before public exposure. 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/context.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The logr Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package logr 18 | 19 | // contextKey is how we find Loggers in a context.Context. With Go < 1.21, 20 | // the value is always a Logger value. With Go >= 1.21, the value can be a 21 | // Logger value or a slog.Logger pointer. 22 | type contextKey struct{} 23 | 24 | // notFoundError exists to carry an IsNotFound method. 25 | type notFoundError struct{} 26 | 27 | func (notFoundError) Error() string { 28 | return "no logr.Logger was present" 29 | } 30 | 31 | func (notFoundError) IsNotFound() bool { 32 | return true 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/discard.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 The logr Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package logr 18 | 19 | // Discard returns a Logger that discards all messages logged to it. It can be 20 | // used whenever the caller is not interested in the logs. Logger instances 21 | // produced by this function always compare as equal. 22 | func Discard() Logger { 23 | return New(nil) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/stdr/README.md: -------------------------------------------------------------------------------- 1 | # Minimal Go logging using logr and Go's standard library 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr) 4 | 5 | This package implements the [logr interface](https://github.com/go-logr/logr) 6 | in terms of Go's standard log package(https://pkg.go.dev/log). 7 | -------------------------------------------------------------------------------- /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/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Anton Povarov 2 | Brian Goff 3 | Clayton Coleman 4 | Denis Smirnov 5 | DongYun Kang 6 | Dwayne Schultz 7 | Georg Apitz 8 | Gustav Paul 9 | Johan Brandhorst 10 | John Shahid 11 | John Tuley 12 | Laurent 13 | Patrick Lee 14 | Peter Edge 15 | Roger Johansson 16 | Sam Nguyen 17 | Sergio Arbeo 18 | Stephen J Day 19 | Tamir Duberstein 20 | Todd Eisenberger 21 | Tormod Erevik Lea 22 | Vyacheslav Kim 23 | Walter Schulze 24 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.mailmap: -------------------------------------------------------------------------------- 1 | Aaron Lehmann 2 | Derek McGowan 3 | Stephen J Day 4 | Haibing Zhou 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | requirements: 4 | signed_off_by: 5 | required: true 6 | 7 | always_pending: 8 | title_regex: '^WIP' 9 | explanation: 'Work in progress...' 10 | 11 | group_defaults: 12 | required: 2 13 | approve_by_comment: 14 | enabled: true 15 | approve_regex: '^LGTM' 16 | reject_regex: '^Rejected' 17 | reset_on_push: 18 | enabled: true 19 | author_approval: 20 | ignored: true 21 | conditions: 22 | branches: 23 | - master 24 | 25 | groups: 26 | go-digest: 27 | teams: 28 | - go-digest-maintainers 29 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.12.x 4 | - 1.13.x 5 | - master 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Derek McGowan (@dmcgowan) 2 | Stephen Day (@stevvooe) 3 | Vincent Batts (@vbatts) 4 | Akihiro Suda (@AkihiroSuda) 5 | Sebastiaan van Stijn (@thaJeztah) 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/digester.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, 2020 OCI Contributors 2 | // Copyright 2017 Docker, Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | package digest 17 | 18 | import "hash" 19 | 20 | // Digester calculates the digest of written data. Writes should go directly 21 | // to the return value of Hash, while calling Digest will return the current 22 | // value of the digest. 23 | type Digester interface { 24 | Hash() hash.Hash // provides direct access to underlying hash instance. 25 | Digest() Digest 26 | } 27 | 28 | // digester provides a simple digester definition that embeds a hasher. 29 | type digester struct { 30 | alg Algorithm 31 | hash hash.Hash 32 | } 33 | 34 | func (d *digester) Hash() hash.Hash { 35 | return d.hash 36 | } 37 | 38 | func (d *digester) Digest() Digest { 39 | return NewDigest(d.alg, d.hash) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go: -------------------------------------------------------------------------------- 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 | package v1 16 | 17 | import "github.com/opencontainers/image-spec/specs-go" 18 | 19 | // Index references manifests for various platforms. 20 | // This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. 21 | type Index struct { 22 | specs.Versioned 23 | 24 | // MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` 25 | MediaType string `json:"mediaType,omitempty"` 26 | 27 | // Manifests references platform specific manifests. 28 | Manifests []Descriptor `json:"manifests"` 29 | 30 | // Annotations contains arbitrary metadata for the image index. 31 | Annotations map[string]string `json:"annotations,omitempty"` 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go: -------------------------------------------------------------------------------- 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 | package v1 16 | 17 | const ( 18 | // ImageLayoutFile is the file name of oci image layout file 19 | ImageLayoutFile = "oci-layout" 20 | // ImageLayoutVersion is the version of ImageLayout 21 | ImageLayoutVersion = "1.0.0" 22 | ) 23 | 24 | // ImageLayout is the structure in the "oci-layout" file, found in the root 25 | // of an OCI Image-layout directory. 26 | type ImageLayout struct { 27 | Version string `json:"imageLayoutVersion"` 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/version.go: -------------------------------------------------------------------------------- 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 | package specs 16 | 17 | import "fmt" 18 | 19 | const ( 20 | // VersionMajor is for an API incompatible changes 21 | VersionMajor = 1 22 | // VersionMinor is for functionality in a backwards-compatible manner 23 | VersionMinor = 0 24 | // VersionPatch is for backwards-compatible bug fixes 25 | VersionPatch = 2 26 | 27 | // VersionDev indicates development branch. Releases will be empty string. 28 | VersionDev = "" 29 | ) 30 | 31 | // Version is the specification version that the package types support. 32 | var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) 33 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/versioned.go: -------------------------------------------------------------------------------- 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 | package specs 16 | 17 | // Versioned provides a struct with the manifest schemaVersion and mediaType. 18 | // Incoming content with unknown schema version can be decoded against this 19 | // struct to check the version. 20 | type Versioned struct { 21 | // SchemaVersion is the image manifest schema that this image follows 22 | SchemaVersion int `json:"schemaVersion"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Cheney 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /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/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | matrix: 12 | allow_failures: 13 | - go: tip 14 | 15 | install: 16 | - go get golang.org/x/lint/golint 17 | - export PATH=$GOPATH/bin:$PATH 18 | - go install ./... 19 | 20 | script: 21 | - verify/all.sh -v 22 | - go test ./... 23 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go: -------------------------------------------------------------------------------- 1 | //go:build go1.17 2 | // +build go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_legacy.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Wrapper around reflect.Value.CanConvert, for compatibility 13 | // reasons. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return value.CanConvert(to) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.17 2 | // +build !go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_can_convert.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Older versions of Go does not have the reflect.Value.CanConvert 13 | // method. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package otelhttp provides an http.Handler and functions that are intended 16 | // to be used to add tracing by wrapping existing handlers (with Handler) and 17 | // routes WithRouteTag. 18 | package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" 19 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" 16 | 17 | // Generate semconvutil package: 18 | //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go 19 | //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go 20 | //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go 21 | //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go 22 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" 16 | 17 | // Version is the current release version of the otelhttp instrumentation. 18 | func Version() string { 19 | return "0.47.0" 20 | // This string is updated by the pre_release.sh script during release 21 | } 22 | 23 | // SemVersion is the semantic version to be supplied to tracer/meter creation. 24 | // 25 | // Deprecated: Use [Version] instead. 26 | func SemVersion() string { 27 | return Version() 28 | } 29 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.codespellignore: -------------------------------------------------------------------------------- 1 | ot 2 | fo 3 | te 4 | collison 5 | consequentially 6 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.codespellrc: -------------------------------------------------------------------------------- 1 | # https://github.com/codespell-project/codespell 2 | [codespell] 3 | builtin = clear,rare,informal 4 | check-filenames = 5 | check-hidden = 6 | ignore-words = .codespellignore 7 | interactive = 1 8 | skip = .git,go.mod,go.sum,semconv,venv,.tools 9 | uri-ignore-words-list = * 10 | write = 11 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.{cmd,[cC][mM][dD]} text eol=crlf 3 | *.{bat,[bB][aA][tT]} text eol=crlf 4 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | 4 | .tools/ 5 | venv/ 6 | .idea/ 7 | .vscode/ 8 | *.iml 9 | *.so 10 | coverage.* 11 | go.work 12 | go.work.sum 13 | 14 | gen/ 15 | 16 | /example/dice/dice 17 | /example/namedtracer/namedtracer 18 | /example/otel-collector/otel-collector 19 | /example/opencensus/opencensus 20 | /example/passthrough/passthrough 21 | /example/prometheus/prometheus 22 | /example/zipkin/zipkin 23 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "opentelemetry-proto"] 2 | path = exporters/otlp/internal/opentelemetry-proto 3 | url = https://github.com/open-telemetry/opentelemetry-proto 4 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.lycheeignore: -------------------------------------------------------------------------------- 1 | http://localhost 2 | http://jaeger-collector 3 | https://github.com/open-telemetry/opentelemetry-go/milestone/ 4 | https://github.com/open-telemetry/opentelemetry-go/projects 5 | file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries 6 | file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual 7 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | # Default state for all rules 2 | default: true 3 | 4 | # ul-style 5 | MD004: false 6 | 7 | # hard-tabs 8 | MD010: false 9 | 10 | # line-length 11 | MD013: false 12 | 13 | # no-duplicate-header 14 | MD024: 15 | siblings_only: true 16 | 17 | #single-title 18 | MD025: false 19 | 20 | # ol-prefix 21 | MD029: 22 | style: ordered 23 | 24 | # no-inline-html 25 | MD033: false 26 | 27 | # fenced-code-language 28 | MD040: false 29 | 30 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/CODEOWNERS: -------------------------------------------------------------------------------- 1 | ##################################################### 2 | # 3 | # List of approvers for this repository 4 | # 5 | ##################################################### 6 | # 7 | # Learn about membership in OpenTelemetry community: 8 | # https://github.com/open-telemetry/community/blob/main/community-membership.md 9 | # 10 | # 11 | # Learn about CODEOWNERS file format: 12 | # https://help.github.com/en/articles/about-code-owners 13 | # 14 | 15 | * @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu 16 | 17 | CODEOWNERS @MrAlias @MadVikingGod @pellared -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/attribute/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package attribute provides key and value attributes. 16 | package attribute // import "go.opentelemetry.io/otel/attribute" 17 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/attribute/type_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Type"; DO NOT EDIT. 2 | 3 | package attribute 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[INVALID-0] 12 | _ = x[BOOL-1] 13 | _ = x[INT64-2] 14 | _ = x[FLOAT64-3] 15 | _ = x[STRING-4] 16 | _ = x[BOOLSLICE-5] 17 | _ = x[INT64SLICE-6] 18 | _ = x[FLOAT64SLICE-7] 19 | _ = x[STRINGSLICE-8] 20 | } 21 | 22 | const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" 23 | 24 | var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} 25 | 26 | func (i Type) String() string { 27 | if i < 0 || i >= Type(len(_Type_index)-1) { 28 | return "Type(" + strconv.FormatInt(int64(i), 10) + ")" 29 | } 30 | return _Type_name[_Type_index[i]:_Type_index[i+1]] 31 | } 32 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/baggage/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /* 16 | Package baggage provides functionality for storing and retrieving 17 | baggage items in Go context. For propagating the baggage, see the 18 | go.opentelemetry.io/otel/propagation package. 19 | */ 20 | package baggage // import "go.opentelemetry.io/otel/baggage" 21 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/codes/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /* 16 | Package codes defines the canonical error codes used by OpenTelemetry. 17 | 18 | It conforms to [the OpenTelemetry 19 | specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status). 20 | */ 21 | package codes // import "go.opentelemetry.io/otel/codes" 22 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/get_main_pkgs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright The OpenTelemetry Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -euo pipefail 18 | 19 | top_dir='.' 20 | if [[ $# -gt 0 ]]; then 21 | top_dir="${1}" 22 | fi 23 | 24 | p=$(pwd) 25 | mod_dirs=() 26 | 27 | # Note `mapfile` does not exist in older bash versions: 28 | # https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash 29 | 30 | while IFS= read -r line; do 31 | mod_dirs+=("$line") 32 | done < <(find "${top_dir}" -type f -name 'go.mod' -exec dirname {} \; | sort) 33 | 34 | for mod_dir in "${mod_dirs[@]}"; do 35 | cd "${mod_dir}" 36 | 37 | while IFS= read -r line; do 38 | echo ".${line#${p}}" 39 | done < <(go list --find -f '{{.Name}}|{{.Dir}}' ./... | grep '^main|' | cut -f 2- -d '|') 40 | cd "${p}" 41 | done 42 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/internal_logging.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package otel // import "go.opentelemetry.io/otel" 16 | 17 | import ( 18 | "github.com/go-logr/logr" 19 | 20 | "go.opentelemetry.io/otel/internal/global" 21 | ) 22 | 23 | // SetLogger configures the logger used internally to opentelemetry. 24 | func SetLogger(logger logr.Logger) { 25 | global.SetLogger(logger) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/propagation.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package otel // import "go.opentelemetry.io/otel" 16 | 17 | import ( 18 | "go.opentelemetry.io/otel/internal/global" 19 | "go.opentelemetry.io/otel/propagation" 20 | ) 21 | 22 | // GetTextMapPropagator returns the global TextMapPropagator. If none has been 23 | // set, a No-Op TextMapPropagator is returned. 24 | func GetTextMapPropagator() propagation.TextMapPropagator { 25 | return global.TextMapPropagator() 26 | } 27 | 28 | // SetTextMapPropagator sets propagator as the global TextMapPropagator. 29 | func SetTextMapPropagator(propagator propagation.TextMapPropagator) { 30 | global.SetTextMapPropagator(propagator) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/propagation/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /* 16 | Package propagation contains OpenTelemetry context propagators. 17 | 18 | OpenTelemetry propagators are used to extract and inject context data from and 19 | into messages exchanged by applications. The propagator supported by this 20 | package is the W3C Trace Context encoding 21 | (https://www.w3.org/TR/trace-context/), and W3C Baggage 22 | (https://www.w3.org/TR/baggage/). 23 | */ 24 | package propagation // import "go.opentelemetry.io/otel/propagation" 25 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/requirements.txt: -------------------------------------------------------------------------------- 1 | codespell==2.2.6 2 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package semconv implements OpenTelemetry semantic conventions. 16 | // 17 | // OpenTelemetry semantic conventions are agreed standardized naming 18 | // patterns for OpenTelemetry things. This package represents the conventions 19 | // as of the v1.20.0 version of the OpenTelemetry specification. 20 | package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" 21 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" 16 | 17 | const ( 18 | // ExceptionEventName is the name of the Span event representing an exception. 19 | ExceptionEventName = "exception" 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" 16 | 17 | // HTTP scheme attributes. 18 | var ( 19 | HTTPSchemeHTTP = HTTPSchemeKey.String("http") 20 | HTTPSchemeHTTPS = HTTPSchemeKey.String("https") 21 | ) 22 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" 16 | 17 | // SchemaURL is the schema URL that matches the version of the semantic conventions 18 | // that this package defines. Semconv packages starting from v1.4.0 must declare 19 | // non-empty schema URL in the form https://opentelemetry.io/schemas/ 20 | const SchemaURL = "https://opentelemetry.io/schemas/1.20.0" 21 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/trace/nonrecording.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package trace // import "go.opentelemetry.io/otel/trace" 16 | 17 | // nonRecordingSpan is a minimal implementation of a Span that wraps a 18 | // SpanContext. It performs no operations other than to return the wrapped 19 | // SpanContext. 20 | type nonRecordingSpan struct { 21 | noopSpan 22 | 23 | sc SpanContext 24 | } 25 | 26 | // SpanContext returns the wrapped SpanContext. 27 | func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } 28 | -------------------------------------------------------------------------------- /vendor/go.opentelemetry.io/otel/version.go: -------------------------------------------------------------------------------- 1 | // Copyright The OpenTelemetry Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package otel // import "go.opentelemetry.io/otel" 16 | 17 | // Version is the current release version of OpenTelemetry in use. 18 | func Version() string { 19 | return "1.22.0" 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /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 | "context" 9 | "net" 10 | ) 11 | 12 | type direct struct{} 13 | 14 | // Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. 15 | var Direct = direct{} 16 | 17 | var ( 18 | _ Dialer = Direct 19 | _ ContextDialer = Direct 20 | ) 21 | 22 | // Dial directly invokes net.Dial with the supplied parameters. 23 | func (direct) Dial(network, addr string) (net.Conn, error) { 24 | return net.Dial(network, addr) 25 | } 26 | 27 | // DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. 28 | func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { 29 | var d net.Dialer 30 | return d.DialContext(ctx, network, addr) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/socks5.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 | "context" 9 | "net" 10 | 11 | "golang.org/x/net/internal/socks" 12 | ) 13 | 14 | // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given 15 | // address with an optional username and password. 16 | // See RFC 1928 and RFC 1929. 17 | func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) { 18 | d := socks.NewDialer(network, address) 19 | if forward != nil { 20 | if f, ok := forward.(ContextDialer); ok { 21 | d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { 22 | return f.DialContext(ctx, network, address) 23 | } 24 | } else { 25 | d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { 26 | return dialContext(ctx, forward, network, address) 27 | } 28 | } 29 | } 30 | if auth != nil { 31 | up := socks.UsernamePassword{ 32 | Username: auth.User, 33 | Password: auth.Password, 34 | } 35 | d.AuthMethods = []socks.AuthMethod{ 36 | socks.AuthMethodNotRequired, 37 | socks.AuthMethodUsernamePassword, 38 | } 39 | d.Authenticate = up.Authenticate 40 | } 41 | return d, nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && go1.9 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/empty.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.12 6 | 7 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 8 | // and earlier (see https://golang.org/issue/23311). 9 | -------------------------------------------------------------------------------- /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 ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | // Returns a default environment associated with the token, rather than the current 31 | // process. If inheritExisting is true, then this environment also inherits the 32 | // environment of the current process. 33 | func (token Token) Environ(inheritExisting bool) (env []string, err error) { 34 | var block *uint16 35 | err = CreateEnvironmentBlock(&block, token, inheritExisting) 36 | if err != nil { 37 | return nil, err 38 | } 39 | defer DestroyEnvironmentBlock(block) 40 | blockp := unsafe.Pointer(block) 41 | for { 42 | entry := UTF16PtrToString((*uint16)(blockp)) 43 | if len(entry) == 0 { 44 | break 45 | } 46 | env = append(env, entry) 47 | blockp = unsafe.Add(blockp, 2*(len(entry)+1)) 48 | } 49 | return env, nil 50 | } 51 | 52 | func Unsetenv(key string) error { 53 | return syscall.Unsetenv(key) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go: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 | //go: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 | //go: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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | 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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | --------------------------------------------------------------------------------