Showing preview only (5,396K chars total). Download the full file or copy to clipboard to get everything.
Repository: docker-archive-public/docker.dockercraft
Branch: master
Commit: 4be6b595d2b9
Files: 605
Total size: 5.0 MB
Directory structure:
gitextract_fhojboh4/
├── .dockerignore
├── .gitignore
├── CONTRIBUTING.md
├── Docker/
│ ├── config.lua
│ ├── container.lua
│ ├── docker.lua
│ ├── error.lua
│ ├── json.lua
│ ├── log.lua
│ ├── tcpclient.lua
│ └── update.lua
├── Dockerfile
├── LICENSE
├── MAINTAINERS
├── Makefile
├── README.md
├── circle.yml
├── config/
│ ├── motd.txt
│ ├── settings.ini
│ ├── start.sh
│ └── world/
│ └── world.ini
├── daemon.go
├── docker-compose.yml
├── docs/
│ └── magicavoxel/
│ ├── docker-container-blue.vox
│ ├── docker-container-orange.vox
│ ├── docker-image.vox
│ └── dockercraft.vox
├── main.go
├── setup.go
├── vendor/
│ ├── github.com/
│ │ ├── Microsoft/
│ │ │ └── go-winio/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── backup.go
│ │ │ ├── file.go
│ │ │ ├── fileinfo.go
│ │ │ ├── pipe.go
│ │ │ ├── privilege.go
│ │ │ ├── reparse.go
│ │ │ ├── sd.go
│ │ │ ├── syscall.go
│ │ │ └── zsyscall_windows.go
│ │ ├── Sirupsen/
│ │ │ └── logrus/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── alt_exit.go
│ │ │ ├── doc.go
│ │ │ ├── entry.go
│ │ │ ├── exported.go
│ │ │ ├── formatter.go
│ │ │ ├── hooks.go
│ │ │ ├── json_formatter.go
│ │ │ ├── logger.go
│ │ │ ├── logrus.go
│ │ │ ├── terminal_appengine.go
│ │ │ ├── terminal_bsd.go
│ │ │ ├── terminal_linux.go
│ │ │ ├── terminal_notwindows.go
│ │ │ ├── terminal_solaris.go
│ │ │ ├── terminal_windows.go
│ │ │ ├── text_formatter.go
│ │ │ └── writer.go
│ │ ├── docker/
│ │ │ ├── distribution/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── digestset/
│ │ │ │ │ └── set.go
│ │ │ │ └── reference/
│ │ │ │ ├── helpers.go
│ │ │ │ ├── normalize.go
│ │ │ │ ├── reference.go
│ │ │ │ └── regexp.go
│ │ │ ├── docker/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── NOTICE
│ │ │ │ ├── README.md
│ │ │ │ ├── api/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── common.go
│ │ │ │ │ ├── common_unix.go
│ │ │ │ │ ├── common_windows.go
│ │ │ │ │ ├── names.go
│ │ │ │ │ └── types/
│ │ │ │ │ ├── auth.go
│ │ │ │ │ ├── blkiodev/
│ │ │ │ │ │ └── blkio.go
│ │ │ │ │ ├── client.go
│ │ │ │ │ ├── configs.go
│ │ │ │ │ ├── container/
│ │ │ │ │ │ ├── config.go
│ │ │ │ │ │ ├── container_changes.go
│ │ │ │ │ │ ├── container_create.go
│ │ │ │ │ │ ├── container_top.go
│ │ │ │ │ │ ├── container_update.go
│ │ │ │ │ │ ├── container_wait.go
│ │ │ │ │ │ ├── host_config.go
│ │ │ │ │ │ ├── hostconfig_unix.go
│ │ │ │ │ │ └── hostconfig_windows.go
│ │ │ │ │ ├── error_response.go
│ │ │ │ │ ├── events/
│ │ │ │ │ │ └── events.go
│ │ │ │ │ ├── filters/
│ │ │ │ │ │ └── parse.go
│ │ │ │ │ ├── graph_driver_data.go
│ │ │ │ │ ├── id_response.go
│ │ │ │ │ ├── image/
│ │ │ │ │ │ └── image_history.go
│ │ │ │ │ ├── image_delete_response_item.go
│ │ │ │ │ ├── image_summary.go
│ │ │ │ │ ├── mount/
│ │ │ │ │ │ └── mount.go
│ │ │ │ │ ├── network/
│ │ │ │ │ │ └── network.go
│ │ │ │ │ ├── plugin.go
│ │ │ │ │ ├── plugin_device.go
│ │ │ │ │ ├── plugin_env.go
│ │ │ │ │ ├── plugin_interface_type.go
│ │ │ │ │ ├── plugin_mount.go
│ │ │ │ │ ├── plugin_responses.go
│ │ │ │ │ ├── port.go
│ │ │ │ │ ├── registry/
│ │ │ │ │ │ ├── authenticate.go
│ │ │ │ │ │ └── registry.go
│ │ │ │ │ ├── seccomp.go
│ │ │ │ │ ├── service_update_response.go
│ │ │ │ │ ├── stats.go
│ │ │ │ │ ├── strslice/
│ │ │ │ │ │ └── strslice.go
│ │ │ │ │ ├── swarm/
│ │ │ │ │ │ ├── common.go
│ │ │ │ │ │ ├── container.go
│ │ │ │ │ │ ├── network.go
│ │ │ │ │ │ ├── node.go
│ │ │ │ │ │ ├── runtime.go
│ │ │ │ │ │ ├── secret.go
│ │ │ │ │ │ ├── service.go
│ │ │ │ │ │ ├── swarm.go
│ │ │ │ │ │ └── task.go
│ │ │ │ │ ├── time/
│ │ │ │ │ │ ├── duration_convert.go
│ │ │ │ │ │ └── timestamp.go
│ │ │ │ │ ├── types.go
│ │ │ │ │ ├── versions/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ └── compare.go
│ │ │ │ │ ├── volume/
│ │ │ │ │ │ ├── volumes_create.go
│ │ │ │ │ │ └── volumes_list.go
│ │ │ │ │ └── volume.go
│ │ │ │ ├── client/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── checkpoint_create.go
│ │ │ │ │ ├── checkpoint_delete.go
│ │ │ │ │ ├── checkpoint_list.go
│ │ │ │ │ ├── client.go
│ │ │ │ │ ├── client_unix.go
│ │ │ │ │ ├── client_windows.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
│ │ │ │ │ ├── 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
│ │ │ │ │ ├── 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
│ │ │ │ │ ├── transport.go
│ │ │ │ │ ├── utils.go
│ │ │ │ │ ├── version.go
│ │ │ │ │ ├── volume_create.go
│ │ │ │ │ ├── volume_inspect.go
│ │ │ │ │ ├── volume_list.go
│ │ │ │ │ ├── volume_prune.go
│ │ │ │ │ └── volume_remove.go
│ │ │ │ ├── pkg/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── ioutils/
│ │ │ │ │ │ ├── buffer.go
│ │ │ │ │ │ ├── bytespipe.go
│ │ │ │ │ │ ├── fmt.go
│ │ │ │ │ │ ├── fswriters.go
│ │ │ │ │ │ ├── multireader.go
│ │ │ │ │ │ ├── readers.go
│ │ │ │ │ │ ├── temp_unix.go
│ │ │ │ │ │ ├── temp_windows.go
│ │ │ │ │ │ ├── writeflusher.go
│ │ │ │ │ │ └── writers.go
│ │ │ │ │ ├── longpath/
│ │ │ │ │ │ └── longpath.go
│ │ │ │ │ ├── system/
│ │ │ │ │ │ ├── chtimes.go
│ │ │ │ │ │ ├── chtimes_unix.go
│ │ │ │ │ │ ├── chtimes_windows.go
│ │ │ │ │ │ ├── errors.go
│ │ │ │ │ │ ├── events_windows.go
│ │ │ │ │ │ ├── exitcode.go
│ │ │ │ │ │ ├── filesys.go
│ │ │ │ │ │ ├── filesys_windows.go
│ │ │ │ │ │ ├── lstat_unix.go
│ │ │ │ │ │ ├── lstat_windows.go
│ │ │ │ │ │ ├── meminfo.go
│ │ │ │ │ │ ├── meminfo_linux.go
│ │ │ │ │ │ ├── meminfo_solaris.go
│ │ │ │ │ │ ├── meminfo_unsupported.go
│ │ │ │ │ │ ├── meminfo_windows.go
│ │ │ │ │ │ ├── mknod.go
│ │ │ │ │ │ ├── mknod_windows.go
│ │ │ │ │ │ ├── path_unix.go
│ │ │ │ │ │ ├── path_windows.go
│ │ │ │ │ │ ├── process_unix.go
│ │ │ │ │ │ ├── stat_darwin.go
│ │ │ │ │ │ ├── stat_freebsd.go
│ │ │ │ │ │ ├── stat_linux.go
│ │ │ │ │ │ ├── stat_openbsd.go
│ │ │ │ │ │ ├── stat_solaris.go
│ │ │ │ │ │ ├── stat_unix.go
│ │ │ │ │ │ ├── stat_windows.go
│ │ │ │ │ │ ├── syscall_unix.go
│ │ │ │ │ │ ├── syscall_windows.go
│ │ │ │ │ │ ├── umask.go
│ │ │ │ │ │ ├── umask_windows.go
│ │ │ │ │ │ ├── utimes_freebsd.go
│ │ │ │ │ │ ├── utimes_linux.go
│ │ │ │ │ │ ├── utimes_unsupported.go
│ │ │ │ │ │ ├── xattrs_linux.go
│ │ │ │ │ │ └── xattrs_unsupported.go
│ │ │ │ │ └── tlsconfig/
│ │ │ │ │ ├── tlsconfig_clone.go
│ │ │ │ │ ├── tlsconfig_clone_go16.go
│ │ │ │ │ └── tlsconfig_clone_go17.go
│ │ │ │ └── vendor/
│ │ │ │ └── github.com/
│ │ │ │ ├── docker/
│ │ │ │ │ └── docker-credential-helpers/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── osxkeychain/
│ │ │ │ │ │ ├── osxkeychain_darwin.c
│ │ │ │ │ │ ├── osxkeychain_darwin.go
│ │ │ │ │ │ └── osxkeychain_darwin.h
│ │ │ │ │ └── secretservice/
│ │ │ │ │ ├── secretservice_linux.c
│ │ │ │ │ ├── secretservice_linux.go
│ │ │ │ │ └── secretservice_linux.h
│ │ │ │ ├── gogo/
│ │ │ │ │ └── protobuf/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ └── protobuf/
│ │ │ │ │ └── google/
│ │ │ │ │ └── protobuf/
│ │ │ │ │ ├── any.proto
│ │ │ │ │ ├── compiler/
│ │ │ │ │ │ └── plugin.proto
│ │ │ │ │ ├── descriptor.proto
│ │ │ │ │ ├── duration.proto
│ │ │ │ │ ├── empty.proto
│ │ │ │ │ ├── field_mask.proto
│ │ │ │ │ ├── struct.proto
│ │ │ │ │ ├── timestamp.proto
│ │ │ │ │ └── wrappers.proto
│ │ │ │ ├── google/
│ │ │ │ │ └── certificate-transparency/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README-MacOS.md
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── cpp/
│ │ │ │ │ │ ├── third_party/
│ │ │ │ │ │ │ ├── curl/
│ │ │ │ │ │ │ │ ├── hostcheck.c
│ │ │ │ │ │ │ │ └── hostcheck.h
│ │ │ │ │ │ │ └── isec_partners/
│ │ │ │ │ │ │ ├── openssl_hostname_validation.c
│ │ │ │ │ │ │ └── openssl_hostname_validation.h
│ │ │ │ │ │ └── version.h
│ │ │ │ │ └── proto/
│ │ │ │ │ └── ct.proto
│ │ │ │ ├── miekg/
│ │ │ │ │ └── pkcs11/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── const.go
│ │ │ │ │ ├── error.go
│ │ │ │ │ ├── pkcs11.go
│ │ │ │ │ ├── pkcs11.h
│ │ │ │ │ ├── pkcs11f.h
│ │ │ │ │ ├── pkcs11t.h
│ │ │ │ │ └── types.go
│ │ │ │ └── opencontainers/
│ │ │ │ └── runc/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── NOTICE
│ │ │ │ ├── README.md
│ │ │ │ └── libcontainer/
│ │ │ │ ├── README.md
│ │ │ │ └── nsenter/
│ │ │ │ ├── README.md
│ │ │ │ ├── namespace.h
│ │ │ │ ├── nsenter.go
│ │ │ │ ├── nsenter_gccgo.go
│ │ │ │ ├── nsenter_unsupported.go
│ │ │ │ └── nsexec.c
│ │ │ ├── go-connections/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── 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/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── duration.go
│ │ │ │ ├── size.go
│ │ │ │ └── ulimit.go
│ │ │ └── libtrust/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── certificates.go
│ │ │ ├── doc.go
│ │ │ ├── ec_key.go
│ │ │ ├── filter.go
│ │ │ ├── hash.go
│ │ │ ├── jsonsign.go
│ │ │ ├── key.go
│ │ │ ├── key_files.go
│ │ │ ├── key_manager.go
│ │ │ ├── rsa_key.go
│ │ │ └── util.go
│ │ ├── opencontainers/
│ │ │ └── go-digest/
│ │ │ ├── LICENSE.code
│ │ │ ├── LICENSE.docs
│ │ │ ├── README.md
│ │ │ ├── algorithm.go
│ │ │ ├── digest.go
│ │ │ ├── digester.go
│ │ │ ├── doc.go
│ │ │ └── verifiers.go
│ │ └── pkg/
│ │ └── errors/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── errors.go
│ │ └── stack.go
│ └── golang.org/
│ └── x/
│ ├── net/
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── README
│ │ ├── context/
│ │ │ ├── context.go
│ │ │ ├── ctxhttp/
│ │ │ │ ├── ctxhttp.go
│ │ │ │ └── ctxhttp_pre17.go
│ │ │ ├── go17.go
│ │ │ └── pre_go17.go
│ │ └── proxy/
│ │ ├── direct.go
│ │ ├── per_host.go
│ │ ├── proxy.go
│ │ └── socks5.go
│ └── sys/
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── unix/
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── constants.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── env_unset.go
│ │ ├── flock.go
│ │ ├── flock_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── gccgo_linux_sparc64.go
│ │ ├── mkpost.go
│ │ ├── openbsd_pledge.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_no_getwd.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_linux.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_solaris_amd64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ └── ztypes_solaris_amd64.go
│ └── windows/
│ ├── asm_windows_386.s
│ ├── asm_windows_amd64.s
│ ├── dll_windows.go
│ ├── env_unset.go
│ ├── env_windows.go
│ ├── eventlog.go
│ ├── exec_windows.go
│ ├── mksyscall.go
│ ├── race.go
│ ├── race0.go
│ ├── security_windows.go
│ ├── service.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_windows.go
│ ├── zsyscall_windows.go
│ ├── ztypes_windows.go
│ ├── ztypes_windows_386.go
│ └── ztypes_windows_amd64.go
└── vendor.conf
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
.git
docs/*
!docs/img/logo64x64.png
LICENSE
MAINTAINERS
README.md
================================================
FILE: .gitignore
================================================
.DS_Store
world/banlist.sqlite
world/itemblacklist
world/logs/*
world/players
world/whitelist.sqlite
world/world/stats/Pixowl.json
goproxy/goproxy
dockercraft
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Dockercraft
Want to hack on Dockercraft? Awesome! Here are instructions to get you
started.
Dockercraft is part of the [Docker](https://www.docker.com) project, and
follows the same rules and principles. If you're already familiar with
the way Docker does things, you'll feel right at home.
Otherwise, go read Docker's
[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md),
[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md),
[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and
[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md).
Happy hacking!
================================================
FILE: Docker/config.lua
================================================
-- config sets all configuration variables
-- for the Docker plugin.
-- X,Z positions to draw first container
CONTAINER_START_X = -3
CONTAINER_START_Z = 2
-- offset to draw next container
CONTAINER_OFFSET_X = -6
-- the generated Minecraft world is just
-- a white horizontal plane generated at
-- this specific level
GROUND_LEVEL = 63
-- defines minimum surface to place one container
GROUND_MIN_X = CONTAINER_START_X - 2
GROUND_MAX_X = CONTAINER_START_X + 5
GROUND_MIN_Z = -4
GROUND_MAX_Z = CONTAINER_START_Z + 6
-- block updates are queued, this defines the
-- maximum of block updates that can be handled
-- in one single tick, for performance issues.
MAX_BLOCK_UPDATE_PER_TICK = 50
================================================
FILE: Docker/container.lua
================================================
-- Container object is the representation of a Docker
-- container in the Minecraft world
-- constant variables
CONTAINER_CREATED = 0
CONTAINER_RUNNING = 1
CONTAINER_STOPPED = 2
-- NewContainer returns a Container object,
-- representation of a Docker container in
-- the Minecraft world
function NewContainer()
c = {
displayed = false,
x = 0,
z = 0,
name="",
id="",
imageRepo="",
imageTag="",
running=false,
init=Container.init,
setInfos=Container.setInfos,
destroy=Container.destroy,
display=Container.display,
updateMemSign=Container.updateMemSign,
updateCPUSign=Container.updateCPUSign,
addGround=Container.addGround
}
return c
end
Container = {displayed = false, x = 0, z = 0, name="",id="",imageRepo="",imageTag="",running=false}
-- Container:init sets Container's position
function Container:init(x,z)
self.x = x
self.z = z
self.displayed = false
end
-- Container:setInfos sets Container's id, name, imageRepo,
-- image tag and running state
function Container:setInfos(id,name,imageRepo,imageTag,running)
self.id = id
self.name = name
self.imageRepo = imageRepo
self.imageTag = imageTag
self.running = running
end
-- Container:destroy removes all blocks of the
-- container, it won't be visible on the map anymore
function Container:destroy(running)
local X = self.x+2
local Y = GROUND_LEVEL+2
local Z = self.z+2
LOG("Exploding at X:" .. X .. " Y:" .. Y .. " Z:" .. Z)
local World = cRoot:Get():GetDefaultWorld()
World:BroadcastSoundEffect("random.explode", X, Y, Z, 1, 1)
World:BroadcastParticleEffect("hugeexplosion",X, Y, Z, 0, 0, 0, 1, 1)
-- if a block is removed before it's button/lever/sign, that object will drop
-- and the player can collect it. Remove these first
-- lever
digBlock(UpdateQueue,self.x+1,GROUND_LEVEL+3,self.z+1)
-- signs
digBlock(UpdateQueue,self.x+3,GROUND_LEVEL+2,self.z-1)
digBlock(UpdateQueue,self.x,GROUND_LEVEL+2,self.z-1)
digBlock(UpdateQueue,self.x+1,GROUND_LEVEL+2,self.z-1)
-- torch
digBlock(UpdateQueue,self.x+1,GROUND_LEVEL+3,self.z+1)
--button
digBlock(UpdateQueue,self.x+2,GROUND_LEVEL+3,self.z+2)
-- rest of the blocks
for py = GROUND_LEVEL+1, GROUND_LEVEL+4
do
for px=self.x-1, self.x+4
do
for pz=self.z-1, self.z+5
do
digBlock(UpdateQueue,px,py,pz)
end
end
end
end
-- Container:display displays all Container's blocks
-- Blocks will be blue if the container is running,
-- orange otherwise.
function Container:display(running)
local metaPrimaryColor = E_META_WOOL_LIGHTBLUE
local metaSecondaryColor = E_META_WOOL_BLUE
if running == false
then
metaPrimaryColor = E_META_WOOL_ORANGE
metaSecondaryColor = E_META_WOOL_RED
end
self.displayed = true
for px=self.x, self.x+3
do
for pz=self.z, self.z+4
do
setBlock(UpdateQueue,px,GROUND_LEVEL + 1,pz,E_BLOCK_WOOL,metaPrimaryColor)
end
end
for py = GROUND_LEVEL+2, GROUND_LEVEL+3
do
setBlock(UpdateQueue,self.x+1,py,self.z,E_BLOCK_WOOL,metaPrimaryColor)
-- leave empty space for the door
-- setBlock(UpdateQueue,self.x+2,py,self.z,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x,py,self.z,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x+3,py,self.z,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x,py,self.z+1,E_BLOCK_WOOL,metaSecondaryColor)
setBlock(UpdateQueue,self.x+3,py,self.z+1,E_BLOCK_WOOL,metaSecondaryColor)
setBlock(UpdateQueue,self.x,py,self.z+2,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x+3,py,self.z+2,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x,py,self.z+3,E_BLOCK_WOOL,metaSecondaryColor)
setBlock(UpdateQueue,self.x+3,py,self.z+3,E_BLOCK_WOOL,metaSecondaryColor)
setBlock(UpdateQueue,self.x,py,self.z+4,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x+3,py,self.z+4,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x+1,py,self.z+4,E_BLOCK_WOOL,metaPrimaryColor)
setBlock(UpdateQueue,self.x+2,py,self.z+4,E_BLOCK_WOOL,metaPrimaryColor)
end
-- torch
setBlock(UpdateQueue,self.x+1,GROUND_LEVEL+3,self.z+3,E_BLOCK_TORCH,E_META_TORCH_ZP)
-- start / stop lever
setBlock(UpdateQueue,self.x+1,GROUND_LEVEL + 3,self.z + 2,E_BLOCK_WALLSIGN,E_META_CHEST_FACING_XP)
updateSign(UpdateQueue,self.x+1,GROUND_LEVEL + 3,self.z + 2,"","START/STOP","---->","",2)
if running
then
setBlock(UpdateQueue,self.x+1,GROUND_LEVEL+3,self.z+1,E_BLOCK_LEVER,1)
else
setBlock(UpdateQueue,self.x+1,GROUND_LEVEL+3,self.z+1,E_BLOCK_LEVER,9)
end
-- remove button
setBlock(UpdateQueue,self.x+2,GROUND_LEVEL + 3,self.z + 2,E_BLOCK_WALLSIGN,E_META_CHEST_FACING_XM)
updateSign(UpdateQueue,self.x+2,GROUND_LEVEL + 3,self.z + 2,"","REMOVE","---->","",2)
setBlock(UpdateQueue,self.x+2,GROUND_LEVEL+3,self.z+3,E_BLOCK_STONE_BUTTON,E_BLOCK_BUTTON_XM)
-- door
-- Cuberite bug with Minecraft 1.8 apparently, doors are not displayed correctly
-- setBlock(UpdateQueue,self.x+2,GROUND_LEVEL+2,self.z,E_BLOCK_WOODEN_DOOR,E_META_CHEST_FACING_ZM)
for px=self.x, self.x+3
do
for pz=self.z, self.z+4
do
setBlock(UpdateQueue,px,GROUND_LEVEL + 4,pz,E_BLOCK_WOOL,metaPrimaryColor)
end
end
setBlock(UpdateQueue,self.x+3,GROUND_LEVEL + 2,self.z - 1,E_BLOCK_WALLSIGN,E_META_CHEST_FACING_ZM)
updateSign(UpdateQueue,self.x+3,GROUND_LEVEL + 2,self.z - 1,string.sub(self.id,1,8),self.name,self.imageRepo,self.imageTag,2)
-- Mem sign
setBlock(UpdateQueue,self.x,GROUND_LEVEL + 2,self.z - 1,E_BLOCK_WALLSIGN,E_META_CHEST_FACING_ZM)
-- CPU sign
setBlock(UpdateQueue,self.x+1,GROUND_LEVEL + 2,self.z - 1,E_BLOCK_WALLSIGN,E_META_CHEST_FACING_ZM)
end
-- Container:updateMemSign updates the mem usage
-- value displayed on Container's sign
function Container:updateMemSign(s)
updateSign(UpdateQueue,self.x,GROUND_LEVEL + 2,self.z - 1,"Mem usage","",s,"")
end
-- Container:updateCPUSign updates the mem usage
-- value displayed on Container's sign
function Container:updateCPUSign(s)
updateSign(UpdateQueue,self.x+1,GROUND_LEVEL + 2,self.z - 1,"CPU usage","",s,"")
end
-- Container:addGround creates ground blocks
-- necessary to display the container
function Container:addGround()
local y = GROUND_LEVEL
local max_x = GROUND_MAX_X
if GROUND_MIN_X > self.x - 2
then
max_x = GROUND_MIN_X
GROUND_MIN_X = self.x - 2
min_x = GROUND_MIN_X
end
local min_x = GROUND_MIN_X
for x= min_x, max_x
do
for z=GROUND_MIN_Z,GROUND_MAX_Z
do
setBlock(UpdateQueue,x,y,z,E_BLOCK_WOOL,E_META_WOOL_WHITE)
for sky=y+1,y+6
do
setBlock(UpdateQueue,x,sky,z,E_BLOCK_AIR,0)
end
end
end
end
================================================
FILE: Docker/docker.lua
================================================
----------------------------------------
-- GLOBALS
----------------------------------------
-- queue containing the updates that need to be applied to the minecraft world
UpdateQueue = nil
-- array of container objects
Containers = {}
--
SignsToUpdate = {}
-- as a lua array cannot contain nil values, we store references to this object
-- in the "Containers" array to indicate that there is no container at an index
EmptyContainerSpace = {}
----------------------------------------
-- FUNCTIONS
----------------------------------------
-- Tick is triggered by cPluginManager.HOOK_TICK
function Tick(TimeDelta)
UpdateQueue:update(MAX_BLOCK_UPDATE_PER_TICK)
end
-- Plugin initialization
function Initialize(Plugin)
Plugin:SetName("Docker")
Plugin:SetVersion(1)
UpdateQueue = NewUpdateQueue()
-- Hooks
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_JOINED, PlayerJoined);
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_USING_BLOCK, PlayerUsingBlock);
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_FOOD_LEVEL_CHANGE, OnPlayerFoodLevelChange);
cPluginManager:AddHook(cPluginManager.HOOK_TAKE_DAMAGE, OnTakeDamage);
cPluginManager:AddHook(cPluginManager.HOOK_WEATHER_CHANGING, OnWeatherChanging);
cPluginManager:AddHook(cPluginManager.HOOK_SERVER_PING, OnServerPing);
cPluginManager:AddHook(cPluginManager.HOOK_TICK, Tick);
-- Command Bindings
cPluginManager.BindCommand("/docker", "*", DockerCommand, " - docker CLI commands")
-- make all players admin
cRankManager:SetDefaultRank("Admin")
cNetwork:Connect("127.0.0.1",25566,TCP_CLIENT)
LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
return true
end
-- updateStats update CPU and memory usage displayed
-- on container sign (container identified by id)
function updateStats(id, mem, cpu)
for i=1, table.getn(Containers)
do
if Containers[i] ~= EmptyContainerSpace and Containers[i].id == id
then
Containers[i]:updateMemSign(mem)
Containers[i]:updateCPUSign(cpu)
break
end
end
end
-- getStartStopLeverContainer returns the container
-- id that corresponds to lever at x,y coordinates
function getStartStopLeverContainer(x, z)
for i=1, table.getn(Containers)
do
if Containers[i] ~= EmptyContainerSpace and x == Containers[i].x + 1 and z == Containers[i].z + 1
then
return Containers[i].id
end
end
return ""
end
-- getRemoveButtonContainer returns the container
-- id and state for the button at x,y coordinates
function getRemoveButtonContainer(x, z)
for i=1, table.getn(Containers)
do
if Containers[i] ~= EmptyContainerSpace and x == Containers[i].x + 2 and z == Containers[i].z + 3
then
return Containers[i].id, Containers[i].running
end
end
return "", true
end
-- destroyContainer looks for the first container having the given id,
-- removes it from the Minecraft world and from the 'Containers' array
function destroyContainer(id)
LOG("destroyContainer: " .. id)
-- loop over the containers and remove the first having the given id
for i=1, table.getn(Containers)
do
if Containers[i] ~= EmptyContainerSpace and Containers[i].id == id
then
-- remove the container from the world
Containers[i]:destroy()
-- if the container being removed is the last element of the array
-- we reduce the size of the "Container" array, but if it is not,
-- we store a reference to the "EmptyContainerSpace" object at the
-- same index to indicate this is a free space now.
-- We use a reference to this object because it is not possible to
-- have 'nil' values in the middle of a lua array.
if i == table.getn(Containers)
then
table.remove(Containers, i)
-- we have removed the last element of the array. If the array
-- has tailing empty container spaces, we remove them as well.
while Containers[table.getn(Containers)] == EmptyContainerSpace
do
table.remove(Containers, table.getn(Containers))
end
else
Containers[i] = EmptyContainerSpace
end
-- we removed the container, we can exit the loop
break
end
end
end
-- updateContainer accepts 3 different states: running, stopped, created
-- sometimes "start" events arrive before "create" ones
-- in this case, we just ignore the update
function updateContainer(id,name,imageRepo,imageTag,state)
LOG("Update container with ID: " .. id .. " state: " .. state)
-- first pass, to see if the container is
-- already displayed (maybe with another state)
for i=1, table.getn(Containers)
do
-- if container found with same ID, we update it
if Containers[i] ~= EmptyContainerSpace and Containers[i].id == id
then
Containers[i]:setInfos(id,name,imageRepo,imageTag,state == CONTAINER_RUNNING)
Containers[i]:display(state == CONTAINER_RUNNING)
LOG("found. updated. now return")
return
end
end
-- if container isn't already displayed, we see if there's an empty space
-- in the world to display the container
local x = CONTAINER_START_X
local index = -1
for i=1, table.getn(Containers)
do
-- use first empty location
if Containers[i] == EmptyContainerSpace
then
LOG("Found empty location: Containers[" .. tostring(i) .. "]")
index = i
break
end
x = x + CONTAINER_OFFSET_X
end
local container = NewContainer()
container:init(x,CONTAINER_START_Z)
container:setInfos(id,name,imageRepo,imageTag,state == CONTAINER_RUNNING)
container:addGround()
container:display(state == CONTAINER_RUNNING)
if index == -1
then
table.insert(Containers, container)
else
Containers[index] = container
end
-- update hack
-- when new containers are started, all old containers dissappear
-- they're still running, but for some reason stop being displayed until they're updated
-- this forces them to re-render in world
LOG("New container detected: Refreshing all...")
for i=1, table.getn(Containers)
do
LOG("Refreshing container '" .. Containers[i].name .. "'")
-- Display
Containers[i]:display(Containers[i].running)
-- YES WE NEED TO DO IT TWICE
-- The signs don't display correctly on first re-render
-- Do it again to make signs work
-- Look don't ask me why, but it works so ¯\_(ツ)_/¯
Containers[i]:display(Containers[i].running)
end
end
--
function PlayerJoined(Player)
-- enable flying
Player:SetCanFly(true)
LOG("player joined")
end
--
function PlayerUsingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType, BlockMeta)
LOG("Using block: " .. tostring(BlockX) .. "," .. tostring(BlockY) .. "," .. tostring(BlockZ) .. " - " .. tostring(BlockType) .. " - " .. tostring(BlockMeta))
-- lever: 1->OFF 9->ON (in that orientation)
-- lever
if BlockType == 69
then
local containerID = getStartStopLeverContainer(BlockX,BlockZ)
LOG("Using lever associated with container ID: " .. containerID)
if containerID ~= ""
then
-- stop
if BlockMeta == 1
then
Player:SendMessage("docker stop " .. string.sub(containerID,1,8))
SendTCPMessage("docker",{"stop",containerID},0)
-- start
else
Player:SendMessage("docker start " .. string.sub(containerID,1,8))
SendTCPMessage("docker",{"start",containerID},0)
end
else
LOG("WARNING: no docker container ID attached to this lever")
end
end
-- stone button
if BlockType == 77
then
local containerID, running = getRemoveButtonContainer(BlockX,BlockZ)
if running
then
Player:SendMessage("A running container can't be removed.")
else
Player:SendMessage("docker rm " .. string.sub(containerID,1,8))
SendTCPMessage("docker",{"rm",containerID},0)
end
end
end
function DockerCommand(Split, Player)
if table.getn(Split) > 0
then
LOG("Split[1]: " .. Split[1])
if Split[1] == "/docker"
then
if table.getn(Split) > 1
then
if Split[2] == "pull" or Split[2] == "create" or Split[2] == "run" or Split[2] == "stop" or Split[2] == "rm" or Split[2] == "rmi" or Split[2] == "start" or Split[2] == "kill"
then
-- force detach when running a container
if Split[2] == "run"
then
table.insert(Split,3,"-d")
end
table.remove(Split,1)
SendTCPMessage("docker",Split,0)
end
end
end
end
return true
end
function OnPlayerFoodLevelChange(Player, NewFoodLevel)
-- Don't allow the player to get hungry
return true, Player, NewFoodLevel
end
function OnTakeDamage(Receiver, TDI)
-- Don't allow the player to take falling or explosion damage
if Receiver:GetClass() == 'cPlayer'
then
if TDI.DamageType == dtFall or TDI.DamageType == dtExplosion then
return true, Receiver, TDI
end
end
return false, Receiver, TDI
end
function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers, Favicon)
-- Change Server Description
local serverDescription = "A Docker client for Minecraft"
-- Change favicon
if cFile:IsFile("/srv/logo.png") then
local FaviconData = cFile:ReadWholeFile("/srv/logo.png")
if (FaviconData ~= "") and (FaviconData ~= nil) then
Favicon = Base64Encode(FaviconData)
end
end
return false, serverDescription, OnlinePlayers, MaxPlayers, Favicon
end
-- Make it sunny all the time!
function OnWeatherChanging(World, Weather)
return true, wSunny
end
================================================
FILE: Docker/error.lua
================================================
-- NewError returns an error object.
-- An error has a code and a message
function NewError(code, message)
err = {code=code, message=message}
return err
end
================================================
FILE: Docker/json.lua
================================================
-- from https://gist.github.com/tylerneylon/59f4bcf316be525b30ab
-- by @tylerneylon
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
* They are not recursive. Such a structure cannot be specified in json.
A Lua table is considered to be an array if and only if its set of keys is a
consecutive sequence of positive integers starting at 1. Arrays are encoded like
so: `[2, 3, false, "hi"]`. Any other type of Lua table is encoded as a json
object, encoded like so: `{"key1": 2, "key2": false}`.
Because the Lua nil value cannot be a key, and as a table value is considered
equivalent to a missing key, there is no way to express the json "null" value in
a Lua table. The only way this will output "null" is if your entire input obj is
nil itself.
An empty Lua table, {}, could be considered either a json object or array -
it's an ambiguous edge case. We choose to treat this as an object as it is the
more general type.
To be clear, none of the above considerations is a limitation of this code.
Rather, it is what we get when we completely observe the json specification for
as arbitrary a Lua object as json is capable of expressing.
## json.parse:
This function parses json, with the exception that it does not pay attention to
\u-escaped unicode code points in strings.
It is difficult for Lua to return null as a value. In order to prevent the loss
of keys with a null value in a json string, this function uses the one-off
table value json.null (which is just an empty table) to indicate null values.
This way you can check if a value is null with the conditional
`val == json.null`.
If you have control over the data and are using Lua, I would recommend just
avoiding null values in your data to begin with.
--]]
local json = {}
-- Internal functions.
local function kind_of(obj)
if type(obj) ~= 'table' then return type(obj) end
local i = 1
for _ in pairs(obj) do
if obj[i] ~= nil then i = i + 1 else return 'table' end
end
if i == 1 then return 'table' else return 'array' end
end
local function escape_str(s)
local in_char = {'\\', '"', '/', '\b', '\f', '\n', '\r', '\t'}
local out_char = {'\\', '"', '/', 'b', 'f', 'n', 'r', 't'}
for i, c in ipairs(in_char) do
s = s:gsub(c, '\\' .. out_char[i])
end
return s
end
-- Returns pos, did_find; there are two cases:
-- 1. Delimiter found: pos = pos after leading space + delim; did_find = true.
-- 2. Delimiter not found: pos = pos after leading space; did_find = false.
-- This throws an error if err_if_missing is true and the delim is not found.
local function skip_delim(str, pos, delim, err_if_missing)
pos = pos + #str:match('^%s*', pos)
if str:sub(pos, pos) ~= delim then
if err_if_missing then
error('Expected ' .. delim .. ' near position ' .. pos)
end
return pos, false
end
return pos + 1, true
end
-- Expects the given pos to be the first character after the opening quote.
-- Returns val, pos; the returned pos is after the closing quote character.
local function parse_str_val(str, pos, val)
val = val or ''
local early_end_error = 'End of input found while parsing string.'
if pos > #str then error(early_end_error) end
local c = str:sub(pos, pos)
if c == '"' then return val, pos + 1 end
if c ~= '\\' then return parse_str_val(str, pos + 1, val .. c) end
-- We must have a \ character.
local esc_map = {b = '\b', f = '\f', n = '\n', r = '\r', t = '\t'}
local nextc = str:sub(pos + 1, pos + 1)
if not nextc then error(early_end_error) end
return parse_str_val(str, pos + 2, val .. (esc_map[nextc] or nextc))
end
-- Returns val, pos; the returned pos is after the number's final character.
local function parse_num_val(str, pos)
local num_str = str:match('^-?%d+%.?%d*[eE]?[+-]?%d*', pos)
local val = tonumber(num_str)
if not val then error('Error parsing number at position ' .. pos .. '.') end
return val, pos + #num_str
end
-- Public values and functions.
function json.stringify(obj, as_key)
local s = {} -- We'll build the string as an array of strings to be concatenated.
local kind = kind_of(obj) -- This is 'array' if it's an array or type(obj) otherwise.
if kind == 'array' then
if as_key then error('Can\'t encode array as key.') end
s[#s + 1] = '['
for i, val in ipairs(obj) do
if i > 1 then s[#s + 1] = ', ' end
s[#s + 1] = json.stringify(val)
end
s[#s + 1] = ']'
elseif kind == 'table' then
if as_key then error('Can\'t encode table as key.') end
s[#s + 1] = '{'
for k, v in pairs(obj) do
if #s > 1 then s[#s + 1] = ', ' end
s[#s + 1] = json.stringify(k, true)
s[#s + 1] = ':'
s[#s + 1] = json.stringify(v)
end
s[#s + 1] = '}'
elseif kind == 'string' then
return '"' .. escape_str(obj) .. '"'
elseif kind == 'number' then
if as_key then return '"' .. tostring(obj) .. '"' end
return tostring(obj)
elseif kind == 'boolean' then
return tostring(obj)
elseif kind == 'nil' then
return 'null'
else
error('Unjsonifiable type: ' .. kind .. '.')
end
return table.concat(s)
end
json.null = {} -- This is a one-off table to represent the null value.
function json.parse(str, pos, end_delim)
pos = pos or 1
if pos > #str then error('Reached unexpected end of input.') end
local pos = pos + #str:match('^%s*', pos) -- Skip whitespace.
local first = str:sub(pos, pos)
if first == '{' then -- Parse an object.
local obj, key, delim_found = {}, true, true
pos = pos + 1
while true do
key, pos = json.parse(str, pos, '}')
if key == nil then return obj, pos end
if not delim_found then error('Comma missing between object items.') end
pos = skip_delim(str, pos, ':', true) -- true -> error if missing.
obj[key], pos = json.parse(str, pos)
pos, delim_found = skip_delim(str, pos, ',')
end
elseif first == '[' then -- Parse an array.
local arr, val, delim_found = {}, true, true
pos = pos + 1
while true do
val, pos = json.parse(str, pos, ']')
if val == nil then return arr, pos end
if not delim_found then error('Comma missing between array items.') end
arr[#arr + 1] = val
pos, delim_found = skip_delim(str, pos, ',')
end
elseif first == '"' then -- Parse a string.
return parse_str_val(str, pos + 1)
elseif first == '-' or first:match('%d') then -- Parse a number.
return parse_num_val(str, pos)
elseif first == end_delim then -- End of an object or array.
return nil, pos + 1
else -- Parse true, false, or null.
local literals = {['true'] = true, ['false'] = false, ['null'] = json.null}
for lit_str, lit_val in pairs(literals) do
local lit_end = pos + #lit_str - 1
if str:sub(pos, lit_end) == lit_str then return lit_val, lit_end + 1 end
end
local pos_info_str = 'position ' .. pos .. ': ' .. str:sub(pos, pos + 10)
error('Invalid json syntax starting at ' .. pos_info_str)
end
end
return json
================================================
FILE: Docker/log.lua
================================================
-- Print contents of `tbl`, with indentation.
-- `indent` sets the initial level of indentation.
function logTable (tbl, indent)
if not indent then indent = 0 end
for k, v in pairs(tbl) do
formatting = string.rep(" ", indent) .. k .. ": "
if type(v) == "table" then
print(formatting)
logTable(v, indent+1)
elseif type(v) == 'boolean' then
print(formatting .. tostring(v))
elseif type(v) == 'function' then
print(formatting .. '<function>') -- TODO: display the function's name
else
print(formatting .. v)
end
end
end
================================================
FILE: Docker/tcpclient.lua
================================================
json = require "json"
TCP_CONN = nil
TCP_DATA = ""
TCP_CLIENT = {
OnConnected = function (TCPConn)
-- The specified link has succeeded in connecting to the remote server.
-- Only called if the link is being connected as a client (using cNetwork:Connect() )
-- Not used for incoming server links
-- All returned values are ignored
LOG("tcp client connected")
TCP_CONN = TCPConn
-- list containers
LOG("listing containers...")
SendTCPMessage("info",{"containers"},0)
end,
OnError = function (TCPConn, ErrorCode, ErrorMsg)
-- The specified error has occurred on the link
-- No other callback will be called for this link from now on
-- For a client link being connected, this reports a connection error (destination unreachable etc.)
-- It is an Undefined Behavior to send data to a_TCPLink in or after this callback
-- All returned values are ignored
LOG("tcp client OnError: " .. ErrorCode .. ": " .. ErrorMsg)
-- retry to establish connection
LOG("retry cNetwork:Connect")
cNetwork:Connect("127.0.0.1",25566,TCP_CLIENT)
end,
OnReceivedData = function (TCPConn, Data)
-- Data has been received on the link
-- Will get called whenever there's new data on the link
-- a_Data contains the raw received data, as a string
-- All returned values are ignored
-- LOG("TCP_CLIENT OnReceivedData")
TCP_DATA = TCP_DATA .. Data
local shiftLen = 0
for message in string.gmatch(TCP_DATA, '([^\n]+\n)') do
shiftLen = shiftLen + string.len(message)
-- remove \n at the end
message = string.sub(message,1,string.len(message)-1)
ParseTCPMessage(message)
end
TCP_DATA = string.sub(TCP_DATA,shiftLen+1)
end,
OnRemoteClosed = function (TCPConn)
-- The remote peer has closed the link
-- The link is already closed, any data sent to it now will be lost
-- No other callback will be called for this link from now on
-- All returned values are ignored
LOG("tcp client OnRemoteClosed")
-- retry to establish connection
LOG("retry cNetwork:Connect")
cNetwork:Connect("127.0.0.1",25566,TCP_CLIENT)
end,
}
-- SendTCPMessage sends a message over global
-- tcp connection TCP_CONN. args and id are optional
-- id stands for the request id.
function SendTCPMessage(cmd, args, id)
if TCP_CONN == nil
then
LOG("can't send TCP message, TCP_CLIENT not connected")
return
end
local v = {cmd=cmd, args=args, id=id}
local msg = json.stringify(v) .. "\n"
TCP_CONN:Send(msg)
end
-- ParseTCPMessage parses a message received from
-- global tcp connection TCP_CONN
function ParseTCPMessage(message)
local m = json.parse(message)
if m.cmd == "event" and table.getn(m.args) > 0 and m.args[1] == "containers"
then
handleContainerEvent(m.data)
end
end
-- handleContainerEvent handles a container
-- event TCP message.
function handleContainerEvent(event)
event.imageTag = event.imageTag or ""
event.imageRepo = event.imageRepo or ""
event.name = event.name or ""
if event.action == "containerInfos"
then
local state = CONTAINER_STOPPED
if event.running then
state = CONTAINER_RUNNING
end
updateContainer(event.id,event.name,event.imageRepo,event.imageTag,state)
end
if event.action == "startContainer"
then
updateContainer(event.id,event.name,event.imageRepo,event.imageTag,CONTAINER_RUNNING)
end
if event.action == "createContainer"
then
updateContainer(event.id,event.name,event.imageRepo,event.imageTag,CONTAINER_CREATED)
end
if event.action == "stopContainer"
then
updateContainer(event.id,event.name,event.imageRepo,event.imageTag,CONTAINER_STOPPED)
end
if event.action == "destroyContainer"
then
destroyContainer(event.id)
end
if event.action == "stats"
then
updateStats(event.id,event.ram,event.cpu)
end
end
================================================
FILE: Docker/update.lua
================================================
-- UPDATE OPERATIONS
-- The following functions can be used to update blocks in the map.
-- There are 3 update types:
-- UPDATE_SET: set a block
-- UPDATE_DIG: remove a block
-- UPDATE_SIGN: update a sign
-- Update operations are queued.
-- An new update queue can be created using NewUpdateQueue()
UPDATE_SET = 0
UPDATE_DIG = 1
UPDATE_SIGN = 2
function NewUpdateQueue()
queue = {first=0, last=-1, current=nil}
-- queue.newUpdate creates an update operation and
-- inserts it in the queue or returns an error
-- in case of UPDATE_SIGN, line 1 to 4 should
-- be present in meta parameter.
-- the delay is optional and will make sure that
-- the update is not triggered before given amount
-- of ticks (0 by default)
function queue:newUpdate(updateType, x, y, z, blockID, meta, delay)
if updateType ~= UPDATE_SET and updateType ~= UPDATE_DIG and updateType ~= UPDATE_SIGN
then
return NewError(1,"NewUpdate: wrong update type")
end
if delay == nil
then
delay = 0
end
update = {op=updateType,x=x,y=y,z=z,blockID=blockID,meta=meta,delay=delay}
-- update.exec executes update operation
-- and returns an error if it fails
function update:exec()
if self.op == UPDATE_SET
then
cRoot:Get():GetDefaultWorld():SetBlock(self.x,self.y,self.z,self.blockID,self.meta)
elseif self.op == UPDATE_DIG
then
cRoot:Get():GetDefaultWorld():DigBlock(self.x,self.y,self.z)
elseif self.op == UPDATE_SIGN
then
cRoot:Get():GetDefaultWorld():SetSignLines(self.x,self.y,self.z,self.meta.line1,self.meta.line2,self.meta.line3,self.meta.line4)
else
return NewError(1,"update:exec: unknown update type: " .. tostring(self.op))
end
end
self:push(update)
end -- ends queue.newUpdate
-- update triggers updates starting from
-- the first one. It stops when the limit
-- is reached, of if there are no more
-- operations in the queue. It returns
-- the amount of updates executed.
-- When an update has a delay > 0, the delay
-- is decremented, and the number of updates
-- executed is not incremented.
function queue:update(limit)
local n = 0
if self.current == nil
then
self.current = self:pop()
end
while n < limit and self.current ~= nil
do
if self.current.delay == 0
then
err = self.current:exec()
if err ~= nil
then
break
end
n = n + 1
self.current = self:pop()
else
self.current.delay = self.current.delay - 1
end
end
return n
end
function queue:push(value)
local last = self.last + 1
self.last = last
self[last] = value
end
function queue:pop()
local first = self.first
if first > self.last then return nil end
local value = self[first]
self[first] = nil -- to allow garbage collection
self.first = first + 1
return value
end
return queue
end
-- setBlock adds an update in given queue to
-- set a block at x,y,z coordinates
function setBlock(queue,x,y,z,blockID,meta)
queue:newUpdate(UPDATE_SET, x, y, z, blockID, meta)
end
-- setBlock adds an update in given queue to
-- remove a block at x,y,z coordinates
function digBlock(queue,x,y,z)
queue:newUpdate(UPDATE_DIG, x, y, z)
end
-- setBlock adds an update in given queue to
-- update a sign at x,y,z coordinates with
-- 4 lines of text
function updateSign(queue,x,y,z,line1,line2,line3,line4,delay)
meta = {line1=line1,line2=line2,line3=line3,line4=line4}
queue:newUpdate(UPDATE_SIGN, x, y, z, nil, meta, delay)
end
================================================
FILE: Dockerfile
================================================
FROM alpine:3.6 AS wget
RUN apk add --no-cache ca-certificates wget tar
FROM wget AS docker
ARG DOCKER_VERSION=17.09.0-ce
RUN wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | \
tar -xvz --strip-components=1 -C /bin
FROM wget AS cuberite
ARG CUBERITE_BUILD=905
WORKDIR /srv
RUN wget -qO- "https://builds.cuberite.org/job/Cuberite Linux x64 Master/${CUBERITE_BUILD}/artifact/Cuberite.tar.gz" |\
tar -xzf -
FROM golang:1.9 AS dockercraft
WORKDIR /go/src/github.com/docker/dockercraft
COPY . .
RUN go install
FROM debian:jessie
RUN apt-get update; apt-get install -y ca-certificates
COPY --from=dockercraft /go/bin/dockercraft /bin
COPY --from=docker /bin/docker /bin
COPY --from=cuberite /srv /srv
# Copy Dockercraft config and plugin
COPY ./config /srv/Server
COPY ./docs/img/logo64x64.png /srv/Server/favicon.png
COPY ./Docker /srv/Server/Plugins/Docker
EXPOSE 25565
ENTRYPOINT ["/srv/Server/start.sh"]
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2013-2015 Docker, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: MAINTAINERS
================================================
# Dockercraft maintainers file
#
# This file describes who runs the docker/dockercraft project and how.
# This is a living document - if you see something out of date or missing, speak up!
#
# It is structured to be consumable by both humans and programs.
# To extract its contents programmatically, use any TOML-compliant parser.
#
# This file is compiled into the MAINTAINERS file in docker/opensource.
#
[Org]
[Org."Core maintainers"]
people = [
"aduermael",
"dave-tucker",
"gdevillele",
]
[people]
# A reference list of all people associated with the project.
# All other sections should refer to people by their canonical key
# in the people section.
# ADD YOURSELF HERE IN ALPHABETICAL ORDER
[people.aduermael]
Name = "Adrien Duermael"
Email = "adrien@docker.com"
GitHub = "aduermael"
[people.dave-tucker]
Name = "Dave Tucker"
Email = "dt@docker.com"
GitHub = "dave-tucker"
[people.gdevillele]
Name = "Gaetan de Villele"
Email = "gaetan@docker.com"
GitHub = "gdevillele"
================================================
FILE: Makefile
================================================
.PHONY: all test test-local install-deps lint fmt vet build serve
REPO_NAME = dockercraft
REPO_OWNER = docker
PKG_NAME = github.com/${REPO_OWNER}/${REPO_NAME}
IMAGE = golang:1.8
IMAGE_NAME = dockercraft-dev
CONTAINER_NAME = dockercraft-dev-container
PACKAGES=$(shell go list ./... | grep -v vendor)
all: test
test-local: install-deps fmt lint vet
@echo "+ $@"
@go test -v .
test:
@docker run -v ${shell pwd}:/go/src/${PKG_NAME} -w /go/src/${PKG_NAME} ${IMAGE} make test-local
install-deps:
@echo "+ $@"
@go get -u github.com/golang/lint/golint
lint:
@echo "+ $@"
@test -z "$$(golint $(PACKAGES) | tee /dev/stderr)"
fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l *.go | tee /dev/stderr)"
vet:
@echo "+ $@"
go vet $(PACKAGES)
build:
@echo "+ $@"
@docker build -t ${IMAGE_NAME} .
serve:
@docker run -it --rm \
--name ${CONTAINER_NAME} \
-p 25565:25565 \
-v /var/run/docker.sock:/var/run/docker.sock \
${IMAGE_NAME}
================================================
FILE: README.md
================================================
# Dockercraft

A simple Minecraft Docker client, to visualize and manage Docker containers.

[YouTube video](http://www.youtube.com/watch?v=eZDlJgJf55o)
> WARNING: Please use Dockercraft on your local machine only.
> It currently doesn't support authentication.
> Every player should be considered a root user!
## How to run Dockercraft
1. **Install Minecraft: [minecraft.net](https://minecraft.net)**
The Minecraft client hasn't been modified, just get the official release.
2. **Pull or build Dockercraft image:** (an official image will be available soon)
```
docker pull gaetan/dockercraft
```
or
```
git clone git@github.com:docker/dockercraft.git
docker build -t gaetan/dockercraft dockercraft
```
3. **Run Dockercraft container:**
```
docker run -t -i -d -p 25565:25565 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name dockercraft \
gaetan/dockercraft
```
Mounting `/var/run/docker.sock` inside the container is necessary to send requests to the Docker remote API.
The default port for a Minecraft server is *25565*, if you prefer a different one: `-p <port>:25565`
4. **Open Minecraft > Multiplayer > Add Server**
The server address is the IP of Docker host. No need to specify a port if you used the default one.
If you're using [Docker Machine](https://docs.docker.com/machine/install-machine/): `docker-machine ip <machine_name>`
5. **Join Server!**
You should see at least one container in your world, which is the one hosting your Dockercraft server.
You can start, stop and remove containers interacting with levers and buttons. Some Docker commands are also supported directly via Minecraft's chat window, which is displayed by pressing the `T` key (default) or `/` key.
> A command always starts with a `/`.
>
> If you open the prompt using the `/` key, it will be prefilled with a `/` character, but if you open it with the `T` key, it will not be prefilled and you will have to type a `/` yourself before typing your docker command.
>
> example: `/docker run redis`.

## Customizing Dockercraft
Do you find the plains too plain?
If so, you are in luck!
Dockercraft can be customised to use any of the [Biomes](https://github.com/cuberite/cuberite/blob/7f8a4eb7264a12ca2035b4e4d412485e01f309d4/src/BiomeDef.cpp#L17) and [Finishers](https://github.com/cuberite/cuberite/blob/7f8a4eb7264a12ca2035b4e4d412485e01f309d4/src/Generating/ComposableGenerator.cpp#L299) supported by Cuberite!
You can pass these additional arguments to your `docker run` command:
```
docker run -t -i -d -p 25565:25565 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name dockercraft \
gaetan/dockercraft <biome> <groundlevel> <sealevel> <finishers>
```
Here are some examples:
**Do you long for the calm of the oceans?**

Try `Ocean 50 63`, or for a more frozen alternative, `FrozenOcean 50 63 Ice`
**Or perhaps the heat of the desert?**

Then `Desert 63 0 DeadBushes` is what you need
**Are you pining for the... Pines?**

We have you covered. Try `Forest 63 0 Trees`
**Or maybe you are looking for fun and games?**

If so, Welcome to the Jungle. `Jungle 63 0 Trees`
## Upcoming features
This is just the beginning for Dockercraft! We should be able to support a lot more Docker features like:
- List [Docker Machines](https://docs.docker.com/machine/) and use portals to see what's inside
- Support more Docker commands
- Display [logs](https://docs.docker.com/v1.8/reference/commandline/logs/) (for each container, pushing a simple button)
- Represent links
- Docker networking
- Docker volumes
- ...
If you're interested about Dockercraft's design, discussions happen in [that issue](https://github.com/docker/dockercraft/issues/19).
Also, we're using [Magicavoxel](https://ephtracy.github.io/) to do these nice prototypes:

You can find our Magicavoxel patterns in [that folder]().
To get fresh news, follow our Twitter account: [@dockercraft](https://twitter.com/dockercraft).
## How it works
The Minecraft client itself remains unmodified. All operations are done server side.
The Minecraft server we use is [http://cuberite.org](http://cuberite.org). A custom Minecraft compatible game server written in C++. [github repo](https://github.com/cuberite/cuberite)
This server accepts plugins, scripts written in Lua. So we did one for Docker. (world/Plugins/Docker)
Unfortunately, there's no nice API to communicate with these plugins. But there's a webadmin, and plugins can be responsible for "webtabs".
```lua
Plugin:AddWebTab("Docker",HandleRequest_Docker)
```
Basically it means the plugin can catch POST requests sent to `http://127.0.0.1:8080/webadmin/Docker/Docker`.
### Goproxy
Events from the Docker remote API are transmitted to the Lua plugin by a small daemon (written in Go). (go/src/goproxy)
```go
func MCServerRequest(data url.Values, client *http.Client) {
req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/webadmin/Docker/Docker", strings.NewReader(data.Encode()))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.SetBasicAuth("admin", "admin")
client.Do(req)
}
```
The goproxy binary can also be executed with parameters from the Lua plugin, to send requests to the daemon:
```lua
function PlayerJoined(Player)
-- refresh containers
r = os.execute("goproxy containers")
end
```
## Contributing
Want to hack on Dockercraft? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply.

================================================
FILE: circle.yml
================================================
---
machine:
services:
- docker
dependencies:
override:
- echo "Nothing to see here.."
test:
override:
- make test
================================================
FILE: config/motd.txt
================================================
@9Welcome to Dockercraft!
@9https://github.com/docker/dockercraft
@cWarning: Use on your local machine only
@cDockercraft is not safe for use on production servers
@9Type /docker to use docker CLI commands!
================================================
FILE: config/settings.ini
================================================
; This is the main server configuration
; Most of the settings here can be configured using the webadmin interface, if enabled in webadmin.ini
; See: http://wiki.mc-server.org/doku.php?id=configure:settings.ini for further configuration help
[Authentication]
Authenticate=1
AllowBungeeCord=0
Server=sessionserver.mojang.com
Address=/session/minecraft/hasJoined?username=%USERNAME%&serverId=%SERVERID%
[MojangAPI]
NameToUUIDServer=api.mojang.com
NameToUUIDAddress=/profiles/minecraft
UUIDToProfileServer=sessionserver.mojang.com
UUIDToProfileAddress=/session/minecraft/profile/%UUID%?unsigned=false
[Server]
Description=Dockercraft!
MaxPlayers=100
HardcoreEnabled=0
AllowMultiLogin=0
Ports=25565
DefaultViewDistance=10
[RCON]
Enabled=0
[PlayerData]
LoadOfflinePlayerData=0
LoadNamedPlayerData=1
[Worlds]
DefaultWorld=world
[Plugins]
; Plugin=Debuggers
; Plugin=HookNotify
; Plugin=ChunkWorx
; Plugin=APIDump
Plugin=Core
Plugin=TransAPI
Plugin=ChatLog
Plugin=Docker
[DeadlockDetect]
Enabled=1
IntervalSec=20
================================================
FILE: config/start.sh
================================================
#!/bin/sh
set -e
biome="Plains"
groundlevel="62"
sealevel="0"
finishers=""
if [ -n "$1" ]; then
biome="$1"
fi
if [ -n "$2" ]; then
groundlevel="$2"
fi
if [ -n "$3" ]; then
sealevel="$3"
fi
if [ -n "$4" ]; then
finishers="$4"
fi
sed -i "s/@BIOME@/${biome}/g;s/@GROUNDLEVEL@/${groundlevel}/g;s/@SEALEVEL@/${sealevel}/g;s/@FINISHERS@/${finishers}/g" /srv/Server/world/world.ini
echo Starting Dockercraft
cd /srv/Server
dockercraft &
sleep 5
./Cuberite
================================================
FILE: config/world/world.ini
================================================
; This is the per-world configuration file, managing settings such as generators, simulators, and spawn points
[General]
Dimension=Overworld
IsDaylightCycleEnabled=0
Gamemode=2
Weather=0
TimeInTicks=0
[Broadcasting]
BroadcastDeathMessages=1
BroadcastAchievementMessages=1
[SpawnPosition]
MaxViewDistance=12
X=0.000000
Y=65.0
Z=0.000000
PregenerateDistance=20
[Storage]
Schema=Default
CompressionFactor=6
[Mechanics]
CommandBlocksEnabled=0
[Generator]
Generator=Composable
; Generate constant plains biome:
BiomeGen=Constant
ConstantBiome=@BIOME@
SeaLevel=@SEALEVEL@
; Generate the same height everywhere, 3 blocks:
ShapeGen=HeightMap
HeightGen=Flat
FlatHeight=@GROUNDLEVEL@
CompositionGen=Biomal
Finishers=@FINISHERS@
; Do not generate any structures:
Structures=
[Monsters]
AnimalsOn=0
[SpawnProtect]
ProtectRadius=10
[WorldLimit]
LimitRadius=0
[Difficulty]
WorldDifficulty=1
================================================
FILE: daemon.go
================================================
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"io"
"net"
"os/exec"
"strconv"
"strings"
"sync"
"time"
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
)
// TCPMessage defines what a message that can be
// sent or received to/from LUA scripts
type TCPMessage struct {
Cmd string `json:"cmd,omitempty"`
Args []string `json:"args,omitempty"`
// Id is used to associate requests & responses
ID int `json:"id,omitempty"`
Data interface{} `json:"data,omitempty"`
}
// StatsOptionsEntry is used to collect stats from
// the Docker daemon
type StatsOptionsEntry struct {
statsChan chan *types.StatsJSON
doneChan chan bool
}
// ContainerEvent is one kind of Data that can
// be transported by a TCPMessage in the Data field.
// It describes a Docker container event. (start, stop, destroy...)
type ContainerEvent struct {
Action string `json:"action,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ImageRepo string `json:"imageRepo,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
CPU string `json:"cpu,omitempty"`
RAM string `json:"ram,omitempty"`
Running bool `json:"running,omitempty"`
}
// Daemon maintains state when the dockercraft daemon is running
type Daemon struct {
// Client is an instance of the DockerClient
Client *client.Client
// Version is the version of the Docker Daemon
Version string
// BinaryName is the name of the Docker Binary
BinaryName string
// previouscpustats is a map containing the previous cpu stats we got from the
// docker daemon through the docker remote api
previousCPUStats map[string]*CPUStats
// tcpMessages can be used to send bytes to the Lua
// plugin from any go routine.
tcpMessages chan []byte
// statsOptionsStore references docker.StatsOptions
// of monitored containers.
statsOptionsStore map[string]StatsOptionsEntry
sync.Mutex
}
// NewDaemon returns a new instance of Daemon
func NewDaemon() *Daemon {
return &Daemon{
previousCPUStats: make(map[string]*CPUStats),
}
}
// CPUStats contains the Total and System CPU stats
type CPUStats struct {
TotalUsage uint64
SystemUsage uint64
}
// Init initializes a Daemon
func (d *Daemon) Init() error {
var err error
d.Client, err = client.NewEnvClient()
if err != nil {
return err
}
// get the version of the remote docker
info, err := d.Client.Info(context.Background())
if err != nil {
log.Fatal(err.Error())
}
d.Version = info.ServerVersion
d.statsOptionsStore = make(map[string]StatsOptionsEntry)
d.tcpMessages = make(chan []byte)
return nil
}
// Serve exposes a TCP server on port 25566 to handle
// connections from the LUA scripts
func (d *Daemon) Serve() {
tcpAddr, err := net.ResolveTCPAddr("tcp", ":25566")
ln, err := net.ListenTCP("tcp", tcpAddr)
if err != nil {
log.Fatalln("listen tcp error:", err)
}
for {
conn, err := ln.Accept()
if err != nil {
log.Fatalln("tcp conn accept error:", err)
}
// no need to handle connection in a go routine
// goproxy is used as support for one single Lua plugin.
d.handleConn(conn)
}
}
// StartMonitoringEvents listens for events from the
// Docker daemon and uses callback to transmit them
// to LUA scripts.
func (d *Daemon) StartMonitoringEvents() {
log.Info("Monitoring Docker Events")
filters := filters.NewArgs()
filters.Add("type", events.ContainerEventType)
opts := types.EventsOptions{
Filters: filters,
}
//context.TODO, cancel := context.WithCancel(d.context.TODO)
//defer cancel()
events, errs := d.Client.Events(context.Background(), opts)
for {
select {
case event := <-events:
log.Info("New Event Received")
d.eventCallback(event)
case err := <-errs:
log.Fatal(err.Error())
}
}
}
// handleConn handles a TCP connection
// with a Dockercraft Lua plugin.
func (d *Daemon) handleConn(conn net.Conn) {
go func() {
separator := []byte(string('\n'))
buf := make([]byte, 256)
cursor := 0
for {
// resize buf if needed
if len(buf)-cursor < 256 {
buf = append(buf, make([]byte, 256-(len(buf)-cursor))...)
}
n, err := conn.Read(buf[cursor:])
if err != nil && err != io.EOF {
log.Fatalln("conn read error: ", err)
}
cursor += n
// TODO(aduermael): check cNetwork plugin implementation
// conn.Read doesn't seem to be blocking if there's nothing
// to read. Maybe the broken pipe is due to an implementation
// problem on cNetwork plugin side
if cursor == 0 {
<-time.After(500 * time.Millisecond)
continue
}
// log.Println("TCP data read:", string(buf[:cursor]), "cursor:", cursor)
// see if there's a complete json message in buf.
// messages are separated with \n characters
messages := bytes.Split(buf[:cursor], separator)
// if one complete message and seperator is found
// then we should have len(messages) > 1, the
// last entry being an incomplete message or empty array.
if len(messages) > 1 {
shiftLen := 0
for i := 0; i < len(messages)-1; i++ {
// log.Println(string(messages[i]))
msgCopy := make([]byte, len(messages[i]))
copy(msgCopy, messages[i])
go d.handleMessage(msgCopy)
shiftLen += len(messages[i]) + 1
}
copy(buf, buf[shiftLen:])
cursor -= shiftLen
}
}
}()
for {
tcpMessage := <-d.tcpMessages
log.Debug("tcpMessage:", string(tcpMessage))
_, err := conn.Write(tcpMessage)
if err != nil {
log.Fatal("conn write error:", err)
}
}
}
// handleMessage handles a message read
// from TCP connection
func (d *Daemon) handleMessage(message []byte) {
var tcpMsg TCPMessage
err := json.Unmarshal(message, &tcpMsg)
if err != nil {
log.Println("json unmarshal error:", err)
return
}
log.Debugf("handleMessage: %#v \n", tcpMsg)
switch tcpMsg.Cmd {
case "docker":
d.execDockerCmd(tcpMsg.Args)
case "info":
if len(tcpMsg.Args) > 0 {
switch tcpMsg.Args[0] {
case "containers":
d.listContainers()
}
}
}
}
// eventCallback receives and handles the docker events
func (d *Daemon) eventCallback(event events.Message) {
containerEvent, err := d.apiEventToContainerEvent(event)
if err != nil {
log.Println("apiEventToContainerEvent error:", err)
return
}
switch event.Status {
case "create":
log.Infof("Container Create Event received for %s", containerEvent.ID)
containerEvent.Action = "createContainer"
data, err := containerEventToTCPMsg(containerEvent)
if err != nil {
log.Println(err)
return
}
d.tcpMessages <- append(data, '\n')
log.Info("DONE")
case "start":
log.Infof("Container Start Event received for %s", containerEvent.ID)
containerEvent.Action = "startContainer"
data, err := containerEventToTCPMsg(containerEvent)
if err != nil {
log.Println(err)
return
}
d.tcpMessages <- append(data, '\n')
d.startStatsMonitoring(containerEvent.ID)
log.Info("DONE")
case "die":
log.Infof("Container Die Event received for %s", containerEvent.ID)
containerEvent.Action = "stopContainer"
data, err := containerEventToTCPMsg(containerEvent)
if err != nil {
log.Println(err)
return
}
d.tcpMessages <- append(data, '\n')
d.Lock()
log.Info("Removing Container")
statsOptionsEntry, found := d.statsOptionsStore[containerEvent.ID]
if found {
log.Info("Sending Done on channel")
close(statsOptionsEntry.doneChan)
log.Info("Deleting the entry from the list")
delete(d.statsOptionsStore, containerEvent.ID)
}
d.Unlock()
// enforce 0% display (Cpu & Ram)
d.statCallback(containerEvent.ID, nil)
log.Info("DONE")
case "destroy":
log.Infof("Container Destroy Event received for %s", containerEvent.ID)
containerEvent.Action = "destroyContainer"
data, err := containerEventToTCPMsg(containerEvent)
if err != nil {
log.Println(err)
return
}
d.tcpMessages <- append(data, '\n')
log.Info("DONE")
default:
// Ignoring
log.Debug("Ignoring event: %s", event.Status)
}
}
// statCallback receives the stats (cpu & ram) from containers and send them to
// the cuberite server
func (d *Daemon) statCallback(id string, stats *types.StatsJSON, args ...interface{}) {
containerEvent := ContainerEvent{}
containerEvent.ID = id
containerEvent.Action = "stats"
if stats != nil {
memPercent := float64(stats.MemoryStats.Usage) / float64(stats.MemoryStats.Limit) * 100.0
var cpuPercent float64
if preCPUStats, exists := d.previousCPUStats[id]; exists {
cpuPercent = calculateCPUPercent(preCPUStats, &stats.CPUStats)
}
d.previousCPUStats[id] = &CPUStats{TotalUsage: stats.CPUStats.CPUUsage.TotalUsage, SystemUsage: stats.CPUStats.SystemUsage}
containerEvent.CPU = strconv.FormatFloat(cpuPercent, 'f', 2, 64) + "%"
containerEvent.RAM = strconv.FormatFloat(memPercent, 'f', 2, 64) + "%"
} else {
// if stats == nil set Cpu and Ram to 0%
// it's a way to enforce these values
// when stopping a container
containerEvent.CPU = "0.00%"
containerEvent.RAM = "0.00%"
}
tcpMsg := TCPMessage{}
tcpMsg.Cmd = "event"
tcpMsg.Args = []string{"containers"}
tcpMsg.ID = 0
tcpMsg.Data = &containerEvent
data, err := json.Marshal(&tcpMsg)
if err != nil {
log.Println("statCallback error:", err)
return
}
separator := []byte(string('\n'))
d.tcpMessages <- append(data, separator...)
}
// execDockerCmd handles Docker commands
func (d *Daemon) execDockerCmd(args []string) {
if len(args) > 0 {
log.Debugln("execDockerCmd:", d.BinaryName, args)
cmd := exec.Command(d.BinaryName, args...)
err := cmd.Run() // will wait for command to return
if err != nil {
log.Println("Error:", err.Error())
}
}
}
// listContainers handles and reply to http requests having the path "/containers"
func (d *Daemon) listContainers() {
go func() {
containers, err := d.Client.ContainerList(context.Background(), types.ContainerListOptions{All: true})
if err != nil {
log.Println(err.Error())
return
}
for _, container := range containers {
id := container.ID
// get container name:
// use first name in array
// and remove leading '/'
// if necessary
name := ""
if len(container.Names) > 0 {
name = container.Names[0]
if len(name) > 0 && name[0] == '/' {
name = name[1:]
}
}
imageRepo, imageTag := splitRepoAndTag(container.Image)
if imageTag == "" {
imageTag = "latest"
}
containerEvent := ContainerEvent{}
containerEvent.ID = id
containerEvent.Action = "containerInfos"
containerEvent.ImageRepo = imageRepo
containerEvent.ImageTag = imageTag
containerEvent.Name = name
containerEvent.Running = container.State == "running"
data, err := containerEventToTCPMsg(containerEvent)
if err != nil {
log.Println(err)
return
}
d.tcpMessages <- append(data, '\n')
if containerEvent.Running {
// Monitor stats
d.startStatsMonitoring(containerEvent.ID)
} else {
// enforce 0% display (Cpu & Ram)
d.statCallback(containerEvent.ID, nil)
}
}
}()
}
func (d *Daemon) startStatsMonitoring(containerID string) {
d.Lock()
statsOptionsEntry, found := d.statsOptionsStore[containerID]
if !found {
statsOptionsEntry = StatsOptionsEntry{
make(chan *types.StatsJSON),
make(chan bool, 1),
}
d.statsOptionsStore[containerID] = statsOptionsEntry
}
d.Unlock()
go func() {
log.Infof("Start monitoring stats: %s", containerID)
resp, err := d.Client.ContainerStats(context.Background(), containerID, true)
if err != nil {
log.Printf("dClient.Stats err: %#v", err)
}
defer resp.Body.Close()
dec := json.NewDecoder(resp.Body)
for {
select {
case <-statsOptionsEntry.doneChan:
log.Infof("Stopping collecting stats for %s", containerID)
return
default:
v := types.StatsJSON{}
if err := dec.Decode(&v); err != nil {
dec = json.NewDecoder(io.MultiReader(dec.Buffered(), resp.Body))
if err != io.EOF {
break
}
time.Sleep(100 * time.Millisecond)
continue
}
statsOptionsEntry.statsChan <- &v
}
}
}()
go func() {
for {
select {
case stats := <-statsOptionsEntry.statsChan:
if stats != nil {
d.statCallback(containerID, stats)
}
case <-statsOptionsEntry.doneChan:
log.Println("Go routine END")
return
}
}
}()
}
// Utility functions
func calculateCPUPercent(previousCPUStats *CPUStats, newCPUStats *types.CPUStats) float64 {
var (
cpuPercent = 0.0
// calculate the change for the cpu usage of the container in between readings
cpuDelta = float64(newCPUStats.CPUUsage.TotalUsage - previousCPUStats.TotalUsage)
// calculate the change for the entire system between readings
systemDelta = float64(newCPUStats.SystemUsage - previousCPUStats.SystemUsage)
)
if systemDelta > 0.0 && cpuDelta > 0.0 {
cpuPercent = (cpuDelta / systemDelta) * float64(len(newCPUStats.CPUUsage.PercpuUsage)) * 100.0
}
return cpuPercent
}
func splitRepoAndTag(repoTag string) (string, string) {
repo := ""
tag := ""
repoAndTag := strings.Split(repoTag, ":")
if len(repoAndTag) > 0 {
repo = repoAndTag[0]
}
if len(repoAndTag) > 1 {
tag = repoAndTag[1]
}
return repo, tag
}
func containerEventToTCPMsg(containerEvent ContainerEvent) ([]byte, error) {
tcpMsg := TCPMessage{}
tcpMsg.Cmd = "event"
tcpMsg.Args = []string{"containers"}
tcpMsg.ID = 0
tcpMsg.Data = &containerEvent
data, err := json.Marshal(&tcpMsg)
if err != nil {
return nil, errors.New("containerEventToTCPMsg error: " + err.Error())
}
return data, nil
}
func (d *Daemon) apiEventToContainerEvent(event events.Message) (ContainerEvent, error) {
containerEvent := ContainerEvent{}
containerEvent.ID = event.Actor.ID
// don't try to inspect container in that case, it's already gone!
if event.Action == "destroy" {
return containerEvent, nil
}
log.Debugf("apiEventToContainerEvent: %#v\n", event)
container, err := d.Client.ContainerInspect(context.Background(), containerEvent.ID)
if err != nil {
return containerEvent, err
}
containerEvent.ImageRepo, containerEvent.ImageTag = splitRepoAndTag(event.From)
if containerEvent.ImageTag == "" {
containerEvent.ImageTag = "latest"
}
containerEvent.Name = container.Name
return containerEvent, nil
}
================================================
FILE: docker-compose.yml
================================================
dockercraft:
container_name: dockercraft
build: .
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- "25565:25565"
tty: true
================================================
FILE: main.go
================================================
package main
import (
"flag"
log "github.com/Sirupsen/logrus"
"os"
)
// The main purpose of this application is to connect the docker daemon
// (remote API) and the custom Minecraft server (cubrite using lua scripts).
// Docker daemons events are transmitted to the LUA script as JSON messages
// over TCP transport. The cuberite LUA scripts can also contact this
// application over the same TCP connection.
var debugFlag = flag.Bool("debug", false, "enable debug logging")
func main() {
flag.Parse()
if *debugFlag {
log.SetLevel(log.DebugLevel)
}
daemon := NewDaemon()
if err := daemon.Init(); err != nil {
log.Fatal(err.Error())
os.Exit(1)
}
if err := daemon.GetDockerBinary(); err != nil {
log.Fatal(err.Error())
os.Exit(1)
}
go daemon.StartMonitoringEvents()
daemon.Serve()
}
================================================
FILE: setup.go
================================================
package main
import (
"archive/tar"
"compress/gzip"
"io"
"net/http"
"os"
"path"
"strconv"
"strings"
log "github.com/Sirupsen/logrus"
)
const (
downloadURL = "https://download.docker.com/linux/static/stable/x86_64/docker-"
rcDownloadURL = "https://test.docker.com/builds/Linux/x86_64/docker-"
)
// GetDockerBinary ensures that we have the right version docker client
// for communicating with the Docker Daemon
func (d *Daemon) GetDockerBinary() error {
// name of docker binary that is needed
d.BinaryName = "docker-" + d.Version
log.Infof("looking for docker binary named: %s", d.BinaryName)
filename := path.Join("/bin", d.BinaryName)
if _, err := os.Stat(filename); os.IsNotExist(err) {
log.Infof("docker binary (version %s) not found.", d.Version)
log.Infof("downloading %s...", d.BinaryName)
out, err := os.Create(filename)
if err != nil {
return err
}
defer out.Close()
// determine if we're using an RC build of docker
url := downloadURL
if strings.Contains(d.Version, "rc") {
url = rcDownloadURL
}
// the method of downloading it is different for version >= 1.11.0
// (in which case it is an archive containing multiple binaries)
versionComp, err := compareVersions(d.Version, "1.11.0")
if err != nil {
return err
}
if versionComp >= 0 {
err = getClient(out, url+d.Version+".tgz", extractClient)
if err != nil {
return err
}
} else {
err = getClient(out, url+d.Version, copyClient)
if err != nil {
return err
}
}
err = os.Chmod(filename, 0700)
if err != nil {
return err
}
} else {
log.Infof("docker binary (version %s) found!", d.Version)
}
return nil
}
// Utility functions
type copier func(out *os.File, resp *http.Response) error
func compareVersions(v1 string, v2 string) (comp int, err error) {
v1Parts := strings.Split(v1, ".")
v2Parts := strings.Split(v2, ".")
for i := 0; i < len(v1Parts) && i < len(v2Parts); i++ {
v1int, err := strconv.Atoi(v1Parts[i])
if err != nil {
return -2, err
}
v2int, err := strconv.Atoi(v2Parts[i])
if err != nil {
return -2, err
}
if v1int < v2int {
return -1, nil
} else if v1int > v2int {
return 1, nil
}
}
if len(v1Parts) < len(v2Parts) {
return -1, nil
} else if len(v1Parts) > len(v2Parts) {
return 1, nil
}
return 0, nil
}
func getClient(out *os.File, URL string, cp copier) error {
resp, err := http.Get(URL)
if err != nil {
return err
}
defer resp.Body.Close()
err = cp(out, resp)
return err
}
func copyClient(out *os.File, resp *http.Response) error {
_, err := io.Copy(out, resp.Body)
return err
}
func extractClient(out *os.File, resp *http.Response) error {
gr, err := gzip.NewReader(resp.Body)
defer gr.Close()
if err != nil {
return err
}
tr := tar.NewReader(gr)
for {
hdr, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
return err
}
if hdr.Typeflag == tar.TypeReg && hdr.Name == "docker/docker" {
_, err = io.Copy(out, tr)
if err != nil {
return err
}
break
}
// logrus.Println("not yet")
}
return nil
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: vendor/github.com/Microsoft/go-winio/README.md
================================================
# go-winio
This repository contains utilities for efficiently performing Win32 IO operations in
Go. Currently, this is focused on accessing named pipes and other file handles, and
for using named pipes as a net transport.
This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go
to reuse the thread to schedule another goroutine. This limits support to Windows Vista and
newer operating systems. This is similar to the implementation of network sockets in Go's net
package.
Please see the LICENSE file for licensing information.
This project has adopted the [Microsoft Open Source Code of
Conduct](https://opensource.microsoft.com/codeofconduct/). For more information
see the [Code of Conduct
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
questions or comments.
Thanks to natefinch for the inspiration for this library. See https://github.com/natefinch/npipe
for another named pipe implementation.
================================================
FILE: vendor/github.com/Microsoft/go-winio/backup.go
================================================
// +build windows
package winio
import (
"encoding/binary"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"runtime"
"syscall"
"unicode/utf16"
)
//sys backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead
//sys backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite
const (
BackupData = uint32(iota + 1)
BackupEaData
BackupSecurity
BackupAlternateData
BackupLink
BackupPropertyData
BackupObjectId
BackupReparseData
BackupSparseBlock
BackupTxfsData
)
const (
StreamSparseAttributes = uint32(8)
)
const (
WRITE_DAC = 0x40000
WRITE_OWNER = 0x80000
ACCESS_SYSTEM_SECURITY = 0x1000000
)
// BackupHeader represents a backup stream of a file.
type BackupHeader struct {
Id uint32 // The backup stream ID
Attributes uint32 // Stream attributes
Size int64 // The size of the stream in bytes
Name string // The name of the stream (for BackupAlternateData only).
Offset int64 // The offset of the stream in the file (for BackupSparseBlock only).
}
type win32StreamId struct {
StreamId uint32
Attributes uint32
Size uint64
NameSize uint32
}
// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series
// of BackupHeader values.
type BackupStreamReader struct {
r io.Reader
bytesLeft int64
}
// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.
func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
return &BackupStreamReader{r, 0}
}
// Next returns the next backup stream and prepares for calls to Write(). It skips the remainder of the current stream if
// it was not completely read.
func (r *BackupStreamReader) Next() (*BackupHeader, error) {
if r.bytesLeft > 0 {
if _, err := io.Copy(ioutil.Discard, r); err != nil {
return nil, err
}
}
var wsi win32StreamId
if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {
return nil, err
}
hdr := &BackupHeader{
Id: wsi.StreamId,
Attributes: wsi.Attributes,
Size: int64(wsi.Size),
}
if wsi.NameSize != 0 {
name := make([]uint16, int(wsi.NameSize/2))
if err := binary.Read(r.r, binary.LittleEndian, name); err != nil {
return nil, err
}
hdr.Name = syscall.UTF16ToString(name)
}
if wsi.StreamId == BackupSparseBlock {
if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {
return nil, err
}
hdr.Size -= 8
}
r.bytesLeft = hdr.Size
return hdr, nil
}
// Read reads from the current backup stream.
func (r *BackupStreamReader) Read(b []byte) (int, error) {
if r.bytesLeft == 0 {
return 0, io.EOF
}
if int64(len(b)) > r.bytesLeft {
b = b[:r.bytesLeft]
}
n, err := r.r.Read(b)
r.bytesLeft -= int64(n)
if err == io.EOF {
err = io.ErrUnexpectedEOF
} else if r.bytesLeft == 0 && err == nil {
err = io.EOF
}
return n, err
}
// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.
type BackupStreamWriter struct {
w io.Writer
bytesLeft int64
}
// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.
func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
return &BackupStreamWriter{w, 0}
}
// WriteHeader writes the next backup stream header and prepares for calls to Write().
func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
if w.bytesLeft != 0 {
return fmt.Errorf("missing %d bytes", w.bytesLeft)
}
name := utf16.Encode([]rune(hdr.Name))
wsi := win32StreamId{
StreamId: hdr.Id,
Attributes: hdr.Attributes,
Size: uint64(hdr.Size),
NameSize: uint32(len(name) * 2),
}
if hdr.Id == BackupSparseBlock {
// Include space for the int64 block offset
wsi.Size += 8
}
if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {
return err
}
if len(name) != 0 {
if err := binary.Write(w.w, binary.LittleEndian, name); err != nil {
return err
}
}
if hdr.Id == BackupSparseBlock {
if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {
return err
}
}
w.bytesLeft = hdr.Size
return nil
}
// Write writes to the current backup stream.
func (w *BackupStreamWriter) Write(b []byte) (int, error) {
if w.bytesLeft < int64(len(b)) {
return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft)
}
n, err := w.w.Write(b)
w.bytesLeft -= int64(n)
return n, err
}
// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.
type BackupFileReader struct {
f *os.File
includeSecurity bool
ctx uintptr
}
// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,
// Read will attempt to read the security descriptor of the file.
func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {
r := &BackupFileReader{f, includeSecurity, 0}
runtime.SetFinalizer(r, func(r *BackupFileReader) { r.Close() })
return r
}
// Read reads a backup stream from the file by calling the Win32 API BackupRead().
func (r *BackupFileReader) Read(b []byte) (int, error) {
var bytesRead uint32
err := backupRead(syscall.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)
if err != nil {
return 0, &os.PathError{"BackupRead", r.f.Name(), err}
}
if bytesRead == 0 {
return 0, io.EOF
}
return int(bytesRead), nil
}
// Close frees Win32 resources associated with the BackupFileReader. It does not close
// the underlying file.
func (r *BackupFileReader) Close() error {
if r.ctx != 0 {
backupRead(syscall.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)
r.ctx = 0
}
return nil
}
// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.
type BackupFileWriter struct {
f *os.File
includeSecurity bool
ctx uintptr
}
// NewBackupFileWrtier returns a new BackupFileWriter from a file handle. If includeSecurity is true,
// Write() will attempt to restore the security descriptor from the stream.
func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {
w := &BackupFileWriter{f, includeSecurity, 0}
runtime.SetFinalizer(w, func(w *BackupFileWriter) { w.Close() })
return w
}
// Write restores a portion of the file using the provided backup stream.
func (w *BackupFileWriter) Write(b []byte) (int, error) {
var bytesWritten uint32
err := backupWrite(syscall.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)
if err != nil {
return 0, &os.PathError{"BackupWrite", w.f.Name(), err}
}
if int(bytesWritten) != len(b) {
return int(bytesWritten), errors.New("not all bytes could be written")
}
return len(b), nil
}
// Close frees Win32 resources associated with the BackupFileWriter. It does not
// close the underlying file.
func (w *BackupFileWriter) Close() error {
if w.ctx != 0 {
backupWrite(syscall.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)
w.ctx = 0
}
return nil
}
// OpenForBackup opens a file or directory, potentially skipping access checks if the backup
// or restore privileges have been acquired.
//
// If the file opened was a directory, it cannot be used with Readdir().
func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {
winPath, err := syscall.UTF16FromString(path)
if err != nil {
return nil, err
}
h, err := syscall.CreateFile(&winPath[0], access, share, nil, createmode, syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OPEN_REPARSE_POINT, 0)
if err != nil {
err = &os.PathError{Op: "open", Path: path, Err: err}
return nil, err
}
return os.NewFile(uintptr(h), path), nil
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/file.go
================================================
// +build windows
package winio
import (
"errors"
"io"
"runtime"
"sync"
"syscall"
"time"
)
//sys cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) = CancelIoEx
//sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort
//sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus
//sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes
//sys timeBeginPeriod(period uint32) (n int32) = winmm.timeBeginPeriod
const (
cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
cFILE_SKIP_SET_EVENT_ON_HANDLE = 2
)
var (
ErrFileClosed = errors.New("file has already been closed")
ErrTimeout = &timeoutError{}
)
type timeoutError struct{}
func (e *timeoutError) Error() string { return "i/o timeout" }
func (e *timeoutError) Timeout() bool { return true }
func (e *timeoutError) Temporary() bool { return true }
var ioInitOnce sync.Once
var ioCompletionPort syscall.Handle
// ioResult contains the result of an asynchronous IO operation
type ioResult struct {
bytes uint32
err error
}
// ioOperation represents an outstanding asynchronous Win32 IO
type ioOperation struct {
o syscall.Overlapped
ch chan ioResult
}
func initIo() {
h, err := createIoCompletionPort(syscall.InvalidHandle, 0, 0, 0xffffffff)
if err != nil {
panic(err)
}
ioCompletionPort = h
go ioCompletionProcessor(h)
}
// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.
// It takes ownership of this handle and will close it if it is garbage collected.
type win32File struct {
handle syscall.Handle
wg sync.WaitGroup
closing bool
readDeadline time.Time
writeDeadline time.Time
}
// makeWin32File makes a new win32File from an existing file handle
func makeWin32File(h syscall.Handle) (*win32File, error) {
f := &win32File{handle: h}
ioInitOnce.Do(initIo)
_, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)
if err != nil {
return nil, err
}
err = setFileCompletionNotificationModes(h, cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS|cFILE_SKIP_SET_EVENT_ON_HANDLE)
if err != nil {
return nil, err
}
runtime.SetFinalizer(f, (*win32File).closeHandle)
return f, nil
}
func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
return makeWin32File(h)
}
// closeHandle closes the resources associated with a Win32 handle
func (f *win32File) closeHandle() {
if !f.closing {
// cancel all IO and wait for it to complete
f.closing = true
cancelIoEx(f.handle, nil)
f.wg.Wait()
// at this point, no new IO can start
syscall.Close(f.handle)
f.handle = 0
}
}
// Close closes a win32File.
func (f *win32File) Close() error {
f.closeHandle()
runtime.SetFinalizer(f, nil)
return nil
}
// prepareIo prepares for a new IO operation
func (f *win32File) prepareIo() (*ioOperation, error) {
f.wg.Add(1)
if f.closing {
return nil, ErrFileClosed
}
c := &ioOperation{}
c.ch = make(chan ioResult)
return c, nil
}
// ioCompletionProcessor processes completed async IOs forever
func ioCompletionProcessor(h syscall.Handle) {
// Set the timer resolution to 1. This fixes a performance regression in golang 1.6.
timeBeginPeriod(1)
for {
var bytes uint32
var key uintptr
var op *ioOperation
err := getQueuedCompletionStatus(h, &bytes, &key, &op, syscall.INFINITE)
if op == nil {
panic(err)
}
op.ch <- ioResult{bytes, err}
}
}
// asyncIo processes the return value from ReadFile or WriteFile, blocking until
// the operation has actually completed.
func (f *win32File) asyncIo(c *ioOperation, deadline time.Time, bytes uint32, err error) (int, error) {
if err != syscall.ERROR_IO_PENDING {
f.wg.Done()
return int(bytes), err
} else {
var r ioResult
wait := true
timedout := false
if f.closing {
cancelIoEx(f.handle, &c.o)
} else if !deadline.IsZero() {
now := time.Now()
if !deadline.After(now) {
timedout = true
} else {
timeout := time.After(deadline.Sub(now))
select {
case r = <-c.ch:
wait = false
case <-timeout:
timedout = true
}
}
}
if timedout {
cancelIoEx(f.handle, &c.o)
}
if wait {
r = <-c.ch
}
err = r.err
if err == syscall.ERROR_OPERATION_ABORTED {
if f.closing {
err = ErrFileClosed
} else if timedout {
err = ErrTimeout
}
}
f.wg.Done()
return int(r.bytes), err
}
}
// Read reads from a file handle.
func (f *win32File) Read(b []byte) (int, error) {
c, err := f.prepareIo()
if err != nil {
return 0, err
}
var bytes uint32
err = syscall.ReadFile(f.handle, b, &bytes, &c.o)
n, err := f.asyncIo(c, f.readDeadline, bytes, err)
// Handle EOF conditions.
if err == nil && n == 0 && len(b) != 0 {
return 0, io.EOF
} else if err == syscall.ERROR_BROKEN_PIPE {
return 0, io.EOF
} else {
return n, err
}
}
// Write writes to a file handle.
func (f *win32File) Write(b []byte) (int, error) {
c, err := f.prepareIo()
if err != nil {
return 0, err
}
var bytes uint32
err = syscall.WriteFile(f.handle, b, &bytes, &c.o)
return f.asyncIo(c, f.writeDeadline, bytes, err)
}
func (f *win32File) SetReadDeadline(t time.Time) error {
f.readDeadline = t
return nil
}
func (f *win32File) SetWriteDeadline(t time.Time) error {
f.writeDeadline = t
return nil
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/fileinfo.go
================================================
// +build windows
package winio
import (
"os"
"syscall"
"unsafe"
)
//sys getFileInformationByHandleEx(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) = GetFileInformationByHandleEx
//sys setFileInformationByHandle(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) = SetFileInformationByHandle
const (
fileBasicInfo = 0
fileIDInfo = 0x12
)
// FileBasicInfo contains file access time and file attributes information.
type FileBasicInfo struct {
CreationTime, LastAccessTime, LastWriteTime, ChangeTime syscall.Filetime
FileAttributes uintptr // includes padding
}
// GetFileBasicInfo retrieves times and attributes for a file.
func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
bi := &FileBasicInfo{}
if err := getFileInformationByHandleEx(syscall.Handle(f.Fd()), fileBasicInfo, (*byte)(unsafe.Pointer(bi)), uint32(unsafe.Sizeof(*bi))); err != nil {
return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
}
return bi, nil
}
// SetFileBasicInfo sets times and attributes for a file.
func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
if err := setFileInformationByHandle(syscall.Handle(f.Fd()), fileBasicInfo, (*byte)(unsafe.Pointer(bi)), uint32(unsafe.Sizeof(*bi))); err != nil {
return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err}
}
return nil
}
// FileIDInfo contains the volume serial number and file ID for a file. This pair should be
// unique on a system.
type FileIDInfo struct {
VolumeSerialNumber uint64
FileID [16]byte
}
// GetFileID retrieves the unique (volume, file ID) pair for a file.
func GetFileID(f *os.File) (*FileIDInfo, error) {
fileID := &FileIDInfo{}
if err := getFileInformationByHandleEx(syscall.Handle(f.Fd()), fileIDInfo, (*byte)(unsafe.Pointer(fileID)), uint32(unsafe.Sizeof(*fileID))); err != nil {
return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
}
return fileID, nil
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/pipe.go
================================================
// +build windows
package winio
import (
"errors"
"io"
"net"
"os"
"syscall"
"time"
"unsafe"
)
//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *securityAttributes) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateNamedPipeW
//sys createFile(name string, access uint32, mode uint32, sa *securityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateFileW
//sys waitNamedPipe(name string, timeout uint32) (err error) = WaitNamedPipeW
//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
type securityAttributes struct {
Length uint32
SecurityDescriptor *byte
InheritHandle uint32
}
const (
cERROR_PIPE_BUSY = syscall.Errno(231)
cERROR_PIPE_CONNECTED = syscall.Errno(535)
cERROR_SEM_TIMEOUT = syscall.Errno(121)
cPIPE_ACCESS_DUPLEX = 0x3
cFILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000
cSECURITY_SQOS_PRESENT = 0x100000
cSECURITY_ANONYMOUS = 0
cPIPE_REJECT_REMOTE_CLIENTS = 0x8
cPIPE_UNLIMITED_INSTANCES = 255
cNMPWAIT_USE_DEFAULT_WAIT = 0
cNMPWAIT_NOWAIT = 1
cPIPE_TYPE_MESSAGE = 4
cPIPE_READMODE_MESSAGE = 2
)
var (
// ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed.
// This error should match net.errClosing since docker takes a dependency on its text.
ErrPipeListenerClosed = errors.New("use of closed network connection")
errPipeWriteClosed = errors.New("pipe has been closed for write")
)
type win32Pipe struct {
*win32File
path string
}
type win32MessageBytePipe struct {
win32Pipe
writeClosed bool
readEOF bool
}
type pipeAddress string
func (f *win32Pipe) LocalAddr() net.Addr {
return pipeAddress(f.path)
}
func (f *win32Pipe) RemoteAddr() net.Addr {
return pipeAddress(f.path)
}
func (f *win32Pipe) SetDeadline(t time.Time) error {
f.SetReadDeadline(t)
f.SetWriteDeadline(t)
return nil
}
// CloseWrite closes the write side of a message pipe in byte mode.
func (f *win32MessageBytePipe) CloseWrite() error {
if f.writeClosed {
return errPipeWriteClosed
}
_, err := f.win32File.Write(nil)
if err != nil {
return err
}
f.writeClosed = true
return nil
}
// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since
// they are used to implement CloseWrite().
func (f *win32MessageBytePipe) Write(b []byte) (int, error) {
if f.writeClosed {
return 0, errPipeWriteClosed
}
if len(b) == 0 {
return 0, nil
}
return f.win32File.Write(b)
}
// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message
// mode pipe will return io.EOF, as will all subsequent reads.
func (f *win32MessageBytePipe) Read(b []byte) (int, error) {
if f.readEOF {
return 0, io.EOF
}
n, err := f.win32File.Read(b)
if err == io.EOF {
// If this was the result of a zero-byte read, then
// it is possible that the read was due to a zero-size
// message. Since we are simulating CloseWrite with a
// zero-byte message, ensure that all future Read() calls
// also return EOF.
f.readEOF = true
}
return n, err
}
func (s pipeAddress) Network() string {
return "pipe"
}
func (s pipeAddress) String() string {
return string(s)
}
// DialPipe connects to a named pipe by path, timing out if the connection
// takes longer than the specified duration. If timeout is nil, then the timeout
// is the default timeout established by the pipe server.
func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
var absTimeout time.Time
if timeout != nil {
absTimeout = time.Now().Add(*timeout)
}
var err error
var h syscall.Handle
for {
h, err = createFile(path, syscall.GENERIC_READ|syscall.GENERIC_WRITE, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0)
if err != cERROR_PIPE_BUSY {
break
}
now := time.Now()
var ms uint32
if absTimeout.IsZero() {
ms = cNMPWAIT_USE_DEFAULT_WAIT
} else if now.After(absTimeout) {
ms = cNMPWAIT_NOWAIT
} else {
ms = uint32(absTimeout.Sub(now).Nanoseconds() / 1000 / 1000)
}
err = waitNamedPipe(path, ms)
if err != nil {
if err == cERROR_SEM_TIMEOUT {
return nil, ErrTimeout
}
break
}
}
if err != nil {
return nil, &os.PathError{Op: "open", Path: path, Err: err}
}
var flags uint32
err = getNamedPipeInfo(h, &flags, nil, nil, nil)
if err != nil {
return nil, err
}
var state uint32
err = getNamedPipeHandleState(h, &state, nil, nil, nil, nil, 0)
if err != nil {
return nil, err
}
if state&cPIPE_READMODE_MESSAGE != 0 {
return nil, &os.PathError{Op: "open", Path: path, Err: errors.New("message readmode pipes not supported")}
}
f, err := makeWin32File(h)
if err != nil {
syscall.Close(h)
return nil, err
}
// If the pipe is in message mode, return a message byte pipe, which
// supports CloseWrite().
if flags&cPIPE_TYPE_MESSAGE != 0 {
return &win32MessageBytePipe{
win32Pipe: win32Pipe{win32File: f, path: path},
}, nil
}
return &win32Pipe{win32File: f, path: path}, nil
}
type acceptResponse struct {
f *win32File
err error
}
type win32PipeListener struct {
firstHandle syscall.Handle
path string
securityDescriptor []byte
config PipeConfig
acceptCh chan (chan acceptResponse)
closeCh chan int
doneCh chan int
}
func makeServerPipeHandle(path string, securityDescriptor []byte, c *PipeConfig, first bool) (syscall.Handle, error) {
var flags uint32 = cPIPE_ACCESS_DUPLEX | syscall.FILE_FLAG_OVERLAPPED
if first {
flags |= cFILE_FLAG_FIRST_PIPE_INSTANCE
}
var mode uint32 = cPIPE_REJECT_REMOTE_CLIENTS
if c.MessageMode {
mode |= cPIPE_TYPE_MESSAGE
}
var sa securityAttributes
sa.Length = uint32(unsafe.Sizeof(sa))
if securityDescriptor != nil {
sa.SecurityDescriptor = &securityDescriptor[0]
}
h, err := createNamedPipe(path, flags, mode, cPIPE_UNLIMITED_INSTANCES, uint32(c.OutputBufferSize), uint32(c.InputBufferSize), 0, &sa)
if err != nil {
return 0, &os.PathError{Op: "open", Path: path, Err: err}
}
return h, nil
}
func (l *win32PipeListener) makeServerPipe() (*win32File, error) {
h, err := makeServerPipeHandle(l.path, l.securityDescriptor, &l.config, false)
if err != nil {
return nil, err
}
f, err := makeWin32File(h)
if err != nil {
syscall.Close(h)
return nil, err
}
return f, nil
}
func (l *win32PipeListener) listenerRoutine() {
closed := false
for !closed {
select {
case <-l.closeCh:
closed = true
case responseCh := <-l.acceptCh:
p, err := l.makeServerPipe()
if err == nil {
// Wait for the client to connect.
ch := make(chan error)
go func() {
ch <- connectPipe(p)
}()
select {
case err = <-ch:
if err != nil {
p.Close()
p = nil
}
case <-l.closeCh:
// Abort the connect request by closing the handle.
p.Close()
p = nil
err = <-ch
if err == nil || err == ErrFileClosed {
err = ErrPipeListenerClosed
}
closed = true
}
}
responseCh <- acceptResponse{p, err}
}
}
syscall.Close(l.firstHandle)
l.firstHandle = 0
// Notify Close() and Accept() callers that the handle has been closed.
close(l.doneCh)
}
// PipeConfig contain configuration for the pipe listener.
type PipeConfig struct {
// SecurityDescriptor contains a Windows security descriptor in SDDL format.
SecurityDescriptor string
// MessageMode determines whether the pipe is in byte or message mode. In either
// case the pipe is read in byte mode by default. The only practical difference in
// this implementation is that CloseWrite() is only supported for message mode pipes;
// CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only
// transferred to the reader (and returned as io.EOF in this implementation)
// when the pipe is in message mode.
MessageMode bool
// InputBufferSize specifies the size the input buffer, in bytes.
InputBufferSize int32
// OutputBufferSize specifies the size the input buffer, in bytes.
OutputBufferSize int32
}
// ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe.
// The pipe must not already exist.
func ListenPipe(path string, c *PipeConfig) (net.Listener, error) {
var (
sd []byte
err error
)
if c == nil {
c = &PipeConfig{}
}
if c.SecurityDescriptor != "" {
sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor)
if err != nil {
return nil, err
}
}
h, err := makeServerPipeHandle(path, sd, c, true)
if err != nil {
return nil, err
}
// Immediately open and then close a client handle so that the named pipe is
// created but not currently accepting connections.
h2, err := createFile(path, 0, 0, nil, syscall.OPEN_EXISTING, cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0)
if err != nil {
syscall.Close(h)
return nil, err
}
syscall.Close(h2)
l := &win32PipeListener{
firstHandle: h,
path: path,
securityDescriptor: sd,
config: *c,
acceptCh: make(chan (chan acceptResponse)),
closeCh: make(chan int),
doneCh: make(chan int),
}
go l.listenerRoutine()
return l, nil
}
func connectPipe(p *win32File) error {
c, err := p.prepareIo()
if err != nil {
return err
}
err = connectNamedPipe(p.handle, &c.o)
_, err = p.asyncIo(c, time.Time{}, 0, err)
if err != nil && err != cERROR_PIPE_CONNECTED {
return err
}
return nil
}
func (l *win32PipeListener) Accept() (net.Conn, error) {
ch := make(chan acceptResponse)
select {
case l.acceptCh <- ch:
response := <-ch
err := response.err
if err != nil {
return nil, err
}
if l.config.MessageMode {
return &win32MessageBytePipe{
win32Pipe: win32Pipe{win32File: response.f, path: l.path},
}, nil
}
return &win32Pipe{win32File: response.f, path: l.path}, nil
case <-l.doneCh:
return nil, ErrPipeListenerClosed
}
}
func (l *win32PipeListener) Close() error {
select {
case l.closeCh <- 1:
<-l.doneCh
case <-l.doneCh:
}
return nil
}
func (l *win32PipeListener) Addr() net.Addr {
return pipeAddress(l.path)
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/privilege.go
================================================
// +build windows
package winio
import (
"bytes"
"encoding/binary"
"fmt"
"runtime"
"sync"
"syscall"
"unicode/utf16"
"golang.org/x/sys/windows"
)
//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges
//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf
//sys revertToSelf() (err error) = advapi32.RevertToSelf
//sys openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken
//sys getCurrentThread() (h syscall.Handle) = GetCurrentThread
//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW
//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
const (
SE_PRIVILEGE_ENABLED = 2
ERROR_NOT_ALL_ASSIGNED syscall.Errno = 1300
SeBackupPrivilege = "SeBackupPrivilege"
SeRestorePrivilege = "SeRestorePrivilege"
)
const (
securityAnonymous = iota
securityIdentification
securityImpersonation
securityDelegation
)
var (
privNames = make(map[string]uint64)
privNameMutex sync.Mutex
)
// PrivilegeError represents an error enabling privileges.
type PrivilegeError struct {
privileges []uint64
}
func (e *PrivilegeError) Error() string {
s := ""
if len(e.privileges) > 1 {
s = "Could not enable privileges "
} else {
s = "Could not enable privilege "
}
for i, p := range e.privileges {
if i != 0 {
s += ", "
}
s += `"`
s += getPrivilegeName(p)
s += `"`
}
return s
}
// RunWithPrivilege enables a single privilege for a function call.
func RunWithPrivilege(name string, fn func() error) error {
return RunWithPrivileges([]string{name}, fn)
}
// RunWithPrivileges enables privileges for a function call.
func RunWithPrivileges(names []string, fn func() error) error {
privileges, err := mapPrivileges(names)
if err != nil {
return err
}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
token, err := newThreadToken()
if err != nil {
return err
}
defer releaseThreadToken(token)
err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)
if err != nil {
return err
}
return fn()
}
func mapPrivileges(names []string) ([]uint64, error) {
var privileges []uint64
privNameMutex.Lock()
defer privNameMutex.Unlock()
for _, name := range names {
p, ok := privNames[name]
if !ok {
err := lookupPrivilegeValue("", name, &p)
if err != nil {
return nil, err
}
privNames[name] = p
}
privileges = append(privileges, p)
}
return privileges, nil
}
// EnableProcessPrivileges enables privileges globally for the process.
func EnableProcessPrivileges(names []string) error {
return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)
}
// DisableProcessPrivileges disables privileges globally for the process.
func DisableProcessPrivileges(names []string) error {
return enableDisableProcessPrivilege(names, 0)
}
func enableDisableProcessPrivilege(names []string, action uint32) error {
privileges, err := mapPrivileges(names)
if err != nil {
return err
}
p, _ := windows.GetCurrentProcess()
var token windows.Token
err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)
if err != nil {
return err
}
defer token.Close()
return adjustPrivileges(token, privileges, action)
}
func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {
var b bytes.Buffer
binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))
for _, p := range privileges {
binary.Write(&b, binary.LittleEndian, p)
binary.Write(&b, binary.LittleEndian, action)
}
prevState := make([]byte, b.Len())
reqSize := uint32(0)
success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)
if !success {
return err
}
if err == ERROR_NOT_ALL_ASSIGNED {
return &PrivilegeError{privileges}
}
return nil
}
func getPrivilegeName(luid uint64) string {
var nameBuffer [256]uint16
bufSize := uint32(len(nameBuffer))
err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize)
if err != nil {
return fmt.Sprintf("<unknown privilege %d>", luid)
}
var displayNameBuffer [256]uint16
displayBufSize := uint32(len(displayNameBuffer))
var langID uint32
err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)
if err != nil {
return fmt.Sprintf("<unknown privilege %s>", string(utf16.Decode(nameBuffer[:bufSize])))
}
return string(utf16.Decode(displayNameBuffer[:displayBufSize]))
}
func newThreadToken() (windows.Token, error) {
err := impersonateSelf(securityImpersonation)
if err != nil {
return 0, err
}
var token windows.Token
err = openThreadToken(getCurrentThread(), syscall.TOKEN_ADJUST_PRIVILEGES|syscall.TOKEN_QUERY, false, &token)
if err != nil {
rerr := revertToSelf()
if rerr != nil {
panic(rerr)
}
return 0, err
}
return token, nil
}
func releaseThreadToken(h windows.Token) {
err := revertToSelf()
if err != nil {
panic(err)
}
h.Close()
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/reparse.go
================================================
package winio
import (
"bytes"
"encoding/binary"
"fmt"
"strings"
"unicode/utf16"
"unsafe"
)
const (
reparseTagMountPoint = 0xA0000003
reparseTagSymlink = 0xA000000C
)
type reparseDataBuffer struct {
ReparseTag uint32
ReparseDataLength uint16
Reserved uint16
SubstituteNameOffset uint16
SubstituteNameLength uint16
PrintNameOffset uint16
PrintNameLength uint16
}
// ReparsePoint describes a Win32 symlink or mount point.
type ReparsePoint struct {
Target string
IsMountPoint bool
}
// UnsupportedReparsePointError is returned when trying to decode a non-symlink or
// mount point reparse point.
type UnsupportedReparsePointError struct {
Tag uint32
}
func (e *UnsupportedReparsePointError) Error() string {
return fmt.Sprintf("unsupported reparse point %x", e.Tag)
}
// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink
// or a mount point.
func DecodeReparsePoint(b []byte) (*ReparsePoint, error) {
tag := binary.LittleEndian.Uint32(b[0:4])
return DecodeReparsePointData(tag, b[8:])
}
func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
isMountPoint := false
switch tag {
case reparseTagMountPoint:
isMountPoint = true
case reparseTagSymlink:
default:
return nil, &UnsupportedReparsePointError{tag}
}
nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6])
if !isMountPoint {
nameOffset += 4
}
nameLength := binary.LittleEndian.Uint16(b[6:8])
name := make([]uint16, nameLength/2)
err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name)
if err != nil {
return nil, err
}
return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil
}
func isDriveLetter(c byte) bool {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
}
// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or
// mount point.
func EncodeReparsePoint(rp *ReparsePoint) []byte {
// Generate an NT path and determine if this is a relative path.
var ntTarget string
relative := false
if strings.HasPrefix(rp.Target, `\\?\`) {
ntTarget = `\??\` + rp.Target[4:]
} else if strings.HasPrefix(rp.Target, `\\`) {
ntTarget = `\??\UNC\` + rp.Target[2:]
} else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {
ntTarget = `\??\` + rp.Target
} else {
ntTarget = rp.Target
relative = true
}
// The paths must be NUL-terminated even though they are counted strings.
target16 := utf16.Encode([]rune(rp.Target + "\x00"))
ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00"))
size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8
size += len(ntTarget16)*2 + len(target16)*2
tag := uint32(reparseTagMountPoint)
if !rp.IsMountPoint {
tag = reparseTagSymlink
size += 4 // Add room for symlink flags
}
data := reparseDataBuffer{
ReparseTag: tag,
ReparseDataLength: uint16(size),
SubstituteNameOffset: 0,
SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2),
PrintNameOffset: uint16(len(ntTarget16) * 2),
PrintNameLength: uint16((len(target16) - 1) * 2),
}
var b bytes.Buffer
binary.Write(&b, binary.LittleEndian, &data)
if !rp.IsMountPoint {
flags := uint32(0)
if relative {
flags |= 1
}
binary.Write(&b, binary.LittleEndian, flags)
}
binary.Write(&b, binary.LittleEndian, ntTarget16)
binary.Write(&b, binary.LittleEndian, target16)
return b.Bytes()
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/sd.go
================================================
// +build windows
package winio
import (
"syscall"
"unsafe"
)
//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW
//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW
//sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW
//sys convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW
//sys localFree(mem uintptr) = LocalFree
//sys getSecurityDescriptorLength(sd uintptr) (len uint32) = advapi32.GetSecurityDescriptorLength
const (
cERROR_NONE_MAPPED = syscall.Errno(1332)
)
type AccountLookupError struct {
Name string
Err error
}
func (e *AccountLookupError) Error() string {
if e.Name == "" {
return "lookup account: empty account name specified"
}
var s string
switch e.Err {
case cERROR_NONE_MAPPED:
s = "not found"
default:
s = e.Err.Error()
}
return "lookup account " + e.Name + ": " + s
}
type SddlConversionError struct {
Sddl string
Err error
}
func (e *SddlConversionError) Error() string {
return "convert " + e.Sddl + ": " + e.Err.Error()
}
// LookupSidByName looks up the SID of an account by name
func LookupSidByName(name string) (sid string, err error) {
if name == "" {
return "", &AccountLookupError{name, cERROR_NONE_MAPPED}
}
var sidSize, sidNameUse, refDomainSize uint32
err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse)
if err != nil && err != syscall.ERROR_INSUFFICIENT_BUFFER {
return "", &AccountLookupError{name, err}
}
sidBuffer := make([]byte, sidSize)
refDomainBuffer := make([]uint16, refDomainSize)
err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
if err != nil {
return "", &AccountLookupError{name, err}
}
var strBuffer *uint16
err = convertSidToStringSid(&sidBuffer[0], &strBuffer)
if err != nil {
return "", &AccountLookupError{name, err}
}
sid = syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:])
localFree(uintptr(unsafe.Pointer(strBuffer)))
return sid, nil
}
func SddlToSecurityDescriptor(sddl string) ([]byte, error) {
var sdBuffer uintptr
err := convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &sdBuffer, nil)
if err != nil {
return nil, &SddlConversionError{sddl, err}
}
defer localFree(sdBuffer)
sd := make([]byte, getSecurityDescriptorLength(sdBuffer))
copy(sd, (*[0xffff]byte)(unsafe.Pointer(sdBuffer))[:len(sd)])
return sd, nil
}
func SecurityDescriptorToSddl(sd []byte) (string, error) {
var sddl *uint16
// The returned string length seems to including an aribtrary number of terminating NULs.
// Don't use it.
err := convertSecurityDescriptorToStringSecurityDescriptor(&sd[0], 1, 0xff, &sddl, nil)
if err != nil {
return "", err
}
defer localFree(uintptr(unsafe.Pointer(sddl)))
return syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(sddl))[:]), nil
}
================================================
FILE: vendor/github.com/Microsoft/go-winio/syscall.go
================================================
package winio
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go
================================================
FILE: vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
================================================
// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
package winio
import (
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
var _ unsafe.Pointer
var (
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
modwinmm = windows.NewLazySystemDLL("winmm.dll")
modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
procCancelIoEx = modkernel32.NewProc("CancelIoEx")
procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
proctimeBeginPeriod = modwinmm.NewProc("timeBeginPeriod")
procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
procCreateFileW = modkernel32.NewProc("CreateFileW")
procWaitNamedPipeW = modkernel32.NewProc("WaitNamedPipeW")
procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
procLocalFree = modkernel32.NewProc("LocalFree")
procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
procSetFileInformationByHandle = modkernel32.NewProc("SetFileInformationByHandle")
procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW")
procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW")
procBackupRead = modkernel32.NewProc("BackupRead")
procBackupWrite = modkernel32.NewProc("BackupWrite")
)
func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) {
r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(file), uintptr(unsafe.Pointer(o)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
newport = syscall.Handle(r0)
if newport == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) {
r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(h), uintptr(flags), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func timeBeginPeriod(period uint32) (n int32) {
r0, _, _ := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0)
n = int32(r0)
return
}
func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) {
r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(o)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *securityAttributes) (handle syscall.Handle, err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(name)
if err != nil {
return
}
return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa)
}
func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *securityAttributes) (handle syscall.Handle, err error) {
r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
handle = syscall.Handle(r0)
if handle == syscall.InvalidHandle {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func createFile(name string, access uint32, mode uint32, sa *securityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(name)
if err != nil {
return
}
return _createFile(_p0, access, mode, sa, createmode, attrs, templatefile)
}
func _createFile(name *uint16, access uint32, mode uint32, sa *securityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
handle = syscall.Handle(r0)
if handle == syscall.InvalidHandle {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func waitNamedPipe(name string, timeout uint32) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(name)
if err != nil {
return
}
return _waitNamedPipe(_p0, timeout)
}
func _waitNamedPipe(name *uint16, timeout uint32) (err error) {
r1, _, e1 := syscall.Syscall(procWaitNamedPipeW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(timeout), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(accountName)
if err != nil {
return
}
return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse)
}
func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func convertSidToStringSid(sid *byte, str **uint16) (err error) {
r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(str)
if err != nil {
return
}
return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
}
func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd *uintptr, size *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(secInfo), uintptr(unsafe.Pointer(sddl)), uintptr(unsafe.Pointer(sddlSize)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func localFree(mem uintptr) {
syscall.Syscall(procLocalFree.Addr(), 1, uintptr(mem), 0, 0)
return
}
func getSecurityDescriptorLength(sd uintptr) (len uint32) {
r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(sd), 0, 0)
len = uint32(r0)
return
}
func getFileInformationByHandleEx(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(h), uintptr(class), uintptr(unsafe.Pointer(buffer)), uintptr(size), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func setFileInformationByHandle(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(h), uintptr(class), uintptr(unsafe.Pointer(buffer)), uintptr(size), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) {
var _p0 uint32
if releaseAll {
_p0 = 1
} else {
_p0 = 0
}
r0, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize)))
success = r0 != 0
if true {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func impersonateSelf(level uint32) (err error) {
r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(level), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func revertToSelf() (err error) {
r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) {
var _p0 uint32
if openAsSelf {
_p0 = 1
} else {
_p0 = 0
}
r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func getCurrentThread() (h syscall.Handle) {
r0, _, _ := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
h = syscall.Handle(r0)
return
}
func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(systemName)
if err != nil {
return
}
var _p1 *uint16
_p1, err = syscall.UTF16PtrFromString(name)
if err != nil {
return
}
return _lookupPrivilegeValue(_p0, _p1, luid)
}
func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) {
r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(systemName)
if err != nil {
return
}
return _lookupPrivilegeName(_p0, luid, buffer, size)
}
func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procLookupPrivilegeNameW.Addr(), 4, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
var _p0 *uint16
_p0, err = syscall.UTF16PtrFromString(systemName)
if err != nil {
return
}
return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId)
}
func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procLookupPrivilegeDisplayNameW.Addr(), 5, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
var _p0 *byte
if len(b) > 0 {
_p0 = &b[0]
}
var _p1 uint32
if abort {
_p1 = 1
} else {
_p1 = 0
}
var _p2 uint32
if processSecurity {
_p2 = 1
} else {
_p2 = 0
}
r1, _, e1 := syscall.Syscall9(procBackupRead.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
var _p0 *byte
if len(b) > 0 {
_p0 = &b[0]
}
var _p1 uint32
if abort {
_p1 = 1
} else {
_p1 = 0
}
var _p2 uint32
if processSecurity {
_p2 = 1
} else {
_p2 = 0
}
r1, _, e1 := syscall.Syscall9(procBackupWrite.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2014 Simon Eskildsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: vendor/github.com/Sirupsen/logrus/README.md
================================================
# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [](https://travis-ci.org/Sirupsen/logrus) [](https://godoc.org/github.com/Sirupsen/logrus)
**Seeing weird case-sensitive problems?** See [this
issue](https://github.com/sirupsen/logrus/issues/451#issuecomment-264332021).
This change has been reverted. I apologize for causing this. I greatly
underestimated the impact this would have. Logrus strives for stability and
backwards compatibility and failed to provide that.
Logrus is a structured logger for Go (golang), completely API compatible with
the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not
yet stable (pre 1.0). Logrus itself is completely stable and has been used in
many large deployments. The core API is unlikely to change much but please
version control your Logrus to make sure you aren't fetching latest `master` on
every build.**
Nicely color-coded in development (when a TTY is attached, otherwise just
plain text):

With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
or Splunk:
```json
{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
{"level":"warning","msg":"The group's number increased tremendously!",
"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
```
With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not
attached, the output is compatible with the
[logfmt](http://godoc.org/github.com/kr/logfmt) format:
```text
time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
exit status 1
```
#### Example
The simplest way to use Logrus is simply the package-level exported logger:
```go
package main
import (
log "github.com/Sirupsen/logrus"
)
func main() {
log.WithFields(log.Fields{
"animal": "walrus",
}).Info("A walrus appears")
}
```
Note that it's completely api-compatible with the stdlib logger, so you can
replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"`
and you'll now have the flexibility of Logrus. You can customize it all you
want:
```go
package main
import (
"os"
log "github.com/Sirupsen/logrus"
)
func init() {
// Log as JSON instead of the default ASCII formatter.
log.SetFormatter(&log.JSONFormatter{})
// Output to stdout instead of the default stderr
// Can be any io.Writer, see below for File example
log.SetOutput(os.Stdout)
// Only log the warning severity or above.
log.SetLevel(log.WarnLevel)
}
func main() {
log.WithFields(log.Fields{
"animal": "walrus",
"size": 10,
}).Info("A group of walrus emerges from the ocean")
log.WithFields(log.Fields{
"omg": true,
"number": 122,
}).Warn("The group's number increased tremendously!")
log.WithFields(log.Fields{
"omg": true,
"number": 100,
}).Fatal("The ice breaks!")
// A common pattern is to re-use fields between logging statements by re-using
// the logrus.Entry returned from WithFields()
contextLogger := log.WithFields(log.Fields{
"common": "this is a common field",
"other": "I also should be logged always",
})
contextLogger.Info("I'll be logged with common and other field")
contextLogger.Info("Me too")
}
```
For more advanced usage such as logging to multiple locations from the same
application, you can also create an instance of the `logrus` Logger:
```go
package main
import (
"os"
"github.com/Sirupsen/logrus"
)
// Create a new instance of the logger. You can have any number of instances.
var log = logrus.New()
func main() {
// The API for setting attributes is a little different than the package level
// exported logger. See Godoc.
log.Out = os.Stdout
// You could set this to any `io.Writer` such as a file
// file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
// if err == nil {
// log.Out = file
// } else {
// log.Info("Failed to log to file, using default stderr")
// }
log.WithFields(logrus.Fields{
"animal": "walrus",
"size": 10,
}).Info("A group of walrus emerges from the ocean")
}
```
#### Fields
Logrus encourages careful, structured logging though logging fields instead of
long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
to send event %s to topic %s with key %d")`, you should log the much more
discoverable:
```go
log.WithFields(log.Fields{
"event": event,
"topic": topic,
"key": key,
}).Fatal("Failed to send event")
```
We've found this API forces you to think about logging in a way that produces
much more useful logging messages. We've been in countless situations where just
a single added field to a log statement that was already there would've saved us
hours. The `WithFields` call is optional.
In general, with Logrus using any of the `printf`-family functions should be
seen as a hint you should add a field, however, you can still use the
`printf`-family functions with Logrus.
#### Default Fields
Often it's helpful to have fields _always_ attached to log statements in an
application or parts of one. For example, you may want to always log the
`request_id` and `user_ip` in the context of a request. Instead of writing
`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on
every line, you can create a `logrus.Entry` to pass around instead:
```go
requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})
requestLogger.Info("something happened on that request") # will log request_id and user_ip
requestLogger.Warn("something not great happened")
```
#### Hooks
You can add hooks for logging levels. For example to send errors to an exception
tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
multiple places simultaneously, e.g. syslog.
Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
`init`:
```go
import (
log "github.com/Sirupsen/logrus"
"gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake"
logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
"log/syslog"
)
func init() {
// Use the Airbrake hook to report errors that have Error severity or above to
// an exception tracker. You can create custom hooks, see the Hooks section.
log.AddHook(airbrake.NewHook(123, "xyz", "production"))
hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
if err != nil {
log.Error("Unable to connect to local syslog daemon")
} else {
log.AddHook(hook)
}
}
```
Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
| Hook | Description |
| ----- | ----------- |
| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) |
| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) |
| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic |
| [Discordrus](https://github.com/kz/discordrus) | Hook for logging to [Discord](https://discordapp.com/) |
| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch|
| [Firehose](https://github.com/beaubrewer/firehose) | Hook for logging to [Amazon Firehose](https://aws.amazon.com/kinesis/firehose/)
| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) |
| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) |
| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb |
| [Influxus] (http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB] (http://influxdata.com/) |
| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
| [KafkaLogrus](https://github.com/goibibo/KafkaLogrus) | Hook for logging to kafka |
| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) |
| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) |
| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) |
| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) |
| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) |
| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit |
| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. |
| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) |
| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) |
| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) |
| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)|
| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. |
| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) |
| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)|
| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) |
| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) |
| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash |
#### Level logging
Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
```go
log.Debug("Useful debugging information.")
log.Info("Something noteworthy happened!")
log.Warn("You should probably take a look at this.")
log.Error("Something failed but I'm not quitting.")
// Calls os.Exit(1) after logging
log.Fatal("Bye.")
// Calls panic() after logging
log.Panic("I'm bailing.")
```
You can set the logging level on a `Logger`, then it will only log entries with
that severity or anything above it:
```go
// Will log anything that is info or above (warn, error, fatal, panic). Default.
log.SetLevel(log.InfoLevel)
```
It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
environment if your application has that.
#### Entries
Besides the fields added with `WithField` or `WithFields` some fields are
automatically added to all logging events:
1. `time`. The timestamp when the entry was created.
2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
the `AddFields` call. E.g. `Failed to send event.`
3. `level`. The logging level. E.g. `info`.
#### Environments
Logrus has no notion of environment.
If you wish for hooks and formatters to only be used in specific environments,
you should handle that yourself. For example, if your application has a global
variable `Environment`, which is a string representation of the environment you
could do:
```go
import (
log "github.com/Sirupsen/logrus"
)
init() {
// do something here to set environment depending on an environment variable
// or command-line flag
if Environment == "production" {
log.SetFormatter(&log.JSONFormatter{})
} else {
// The TextFormatter is default, you don't actually have to do this.
log.SetFormatter(&log.TextFormatter{})
}
}
```
This configuration is how `logrus` was intended to be used, but JSON in
production is mostly only useful if you do log aggregation with tools like
Splunk or Logstash.
#### Formatters
The built-in logging formatters are:
* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
without colors.
* *Note:* to force colored output when there is no TTY, set the `ForceColors`
field to `true`. To force no colored output even if there is a TTY set the
`DisableColors` field to `true`. For Windows, see
[github.com/mattn/go-colorable](https://github.com/mattn/go-colorable).
* All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter).
* `logrus.JSONFormatter`. Logs fields as JSON.
* All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter).
Third party logging formatters:
* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
You can define your formatter by implementing the `Formatter` interface,
requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
`Fields` type (`map[string]interface{}`) with all your fields as well as the
default ones (see Entries section above):
```go
type MyJSONFormatter struct {
}
log.SetFormatter(new(MyJSONFormatter))
func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
// Note this doesn't include Time, Level and Message which are available on
// the Entry. Consult `godoc` on information about those fields or read the
// source of the official loggers.
serialized, err := json.Marshal(entry.Data)
if err != nil {
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
}
return append(serialized, '\n'), nil
}
```
#### Logger as an `io.Writer`
Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
```go
w := logger.Writer()
defer w.Close()
srv := http.Server{
// create a stdlib log.Logger that writes to
// logrus.Logger.
ErrorLog: log.New(w, "", 0),
}
```
Each line written to that writer will be printed the usual way, using formatters
and hooks. The level for those entries is `info`.
This means that we can override the standard library logger easily:
```go
logger := logrus.New()
logger.Formatter = &logrus.JSONFormatter{}
// Use logrus for standard log output
// Note that `log` here references stdlib's log
// Not logrus imported under the name `log`.
log.SetOutput(logger.Writer())
```
#### Rotation
Log rotation is not provided with Logrus. Log rotation should be done by an
external program (like `logrotate(8)`) that can compress and delete old log
entries. It should not be a feature of the application-level logger.
#### Tools
| Tool | Description |
| ---- | ----------- |
|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) |
#### Testing
Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides:
* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook
* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any):
```go
logger, hook := NewNullLogger()
logger.Error("Hello error")
assert.Equal(1, len(hook.Entries))
assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
assert.Equal("Hello error", hook.LastEntry().Message)
hook.Reset()
assert.Nil(hook.LastEntry())
```
#### Fatal handlers
Logrus can register one or more functions that will be called when any `fatal`
level message is logged. The registered handlers will be executed before
logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need
to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted.
```
...
handler := func() {
// gracefully shutdown something...
}
logrus.RegisterExitHandler(handler)
...
```
#### Thread safety
By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs.
If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking.
Situation when locking is not needed includes:
* You have no hooks registered, or hooks calling is already thread-safe.
* Writing to logger.Out is already thread-safe, for example:
1) logger.Out is protected by locks.
2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing)
(Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/)
================================================
FILE: vendor/github.com/Sirupsen/logrus/alt_exit.go
================================================
package logrus
// The following code was sourced and modified from the
// https://github.com/tebeka/atexit package governed by the following license:
//
// Copyright (c) 2012 Miki Tebeka <miki.tebeka@gmail.com>.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import (
"fmt"
"os"
)
var handlers = []func(){}
func runHandler(handler func()) {
defer func() {
if err := recover(); err != nil {
fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err)
}
}()
handler()
}
func runHandlers() {
for _, handler := range handlers {
runHandler(handler)
}
}
// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
func Exit(code int) {
runHandlers()
os.Exit(code)
}
// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
// all handlers. The handlers will also be invoked when any Fatal log entry is
// made.
//
// This method is useful when a caller wishes to use logrus to log a fatal
// message but also needs to gracefully shutdown. An example usecase could be
// closing database connections, or sending a alert that the application is
// closing.
func RegisterExitHandler(handler func()) {
handlers = append(handlers, handler)
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/doc.go
================================================
/*
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
The simplest way to use Logrus is simply the package-level exported logger:
package main
import (
log "github.com/Sirupsen/logrus"
)
func main() {
log.WithFields(log.Fields{
"animal": "walrus",
"number": 1,
"size": 10,
}).Info("A walrus appears")
}
Output:
time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
For a full guide visit https://github.com/Sirupsen/logrus
*/
package logrus
================================================
FILE: vendor/github.com/Sirupsen/logrus/entry.go
================================================
package logrus
import (
"bytes"
"fmt"
"os"
"sync"
"time"
)
var bufferPool *sync.Pool
func init() {
bufferPool = &sync.Pool{
New: func() interface{} {
return new(bytes.Buffer)
},
}
}
// Defines the key when adding errors using WithError.
var ErrorKey = "error"
// An entry is the final or intermediate Logrus logging entry. It contains all
// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
// passed around as much as you wish to avoid field duplication.
type Entry struct {
Logger *Logger
// Contains all the fields set by the user.
Data Fields
// Time at which the log entry was created
Time time.Time
// Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
Level Level
// Message passed to Debug, Info, Warn, Error, Fatal or Panic
Message string
// When formatter is called in entry.log(), an Buffer may be set to entry
Buffer *bytes.Buffer
}
func NewEntry(logger *Logger) *Entry {
return &Entry{
Logger: logger,
// Default is three fields, give a little extra room
Data: make(Fields, 5),
}
}
// Returns the string representation from the reader and ultimately the
// formatter.
func (entry *Entry) String() (string, error) {
serialized, err := entry.Logger.Formatter.Format(entry)
if err != nil {
return "", err
}
str := string(serialized)
return str, nil
}
// Add an error as single field (using the key defined in ErrorKey) to the Entry.
func (entry *Entry) WithError(err error) *Entry {
return entry.WithField(ErrorKey, err)
}
// Add a single field to the Entry.
func (entry *Entry) WithField(key string, value interface{}) *Entry {
return entry.WithFields(Fields{key: value})
}
// Add a map of fields to the Entry.
func (entry *Entry) WithFields(fields Fields) *Entry {
data := make(Fields, len(entry.Data)+len(fields))
for k, v := range entry.Data {
data[k] = v
}
for k, v := range fields {
data[k] = v
}
return &Entry{Logger: entry.Logger, Data: data}
}
// This function is not declared with a pointer value because otherwise
// race conditions will occur when using multiple goroutines
func (entry Entry) log(level Level, msg string) {
var buffer *bytes.Buffer
entry.Time = time.Now()
entry.Level = level
entry.Message = msg
if err := entry.Logger.Hooks.Fire(level, &entry); err != nil {
entry.Logger.mu.Lock()
fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
entry.Logger.mu.Unlock()
}
buffer = bufferPool.Get().(*bytes.Buffer)
buffer.Reset()
defer bufferPool.Put(buffer)
entry.Buffer = buffer
serialized, err := entry.Logger.Formatter.Format(&entry)
entry.Buffer = nil
if err != nil {
entry.Logger.mu.Lock()
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
entry.Logger.mu.Unlock()
} else {
entry.Logger.mu.Lock()
_, err = entry.Logger.Out.Write(serialized)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
}
entry.Logger.mu.Unlock()
}
// To avoid Entry#log() returning a value that only would make sense for
// panic() to use in Entry#Panic(), we avoid the allocation by checking
// directly here.
if level <= PanicLevel {
panic(&entry)
}
}
func (entry *Entry) Debug(args ...interface{}) {
if entry.Logger.Level >= DebugLevel {
entry.log(DebugLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Print(args ...interface{}) {
entry.Info(args...)
}
func (entry *Entry) Info(args ...interface{}) {
if entry.Logger.Level >= InfoLevel {
entry.log(InfoLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Warn(args ...interface{}) {
if entry.Logger.Level >= WarnLevel {
entry.log(WarnLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Warning(args ...interface{}) {
entry.Warn(args...)
}
func (entry *Entry) Error(args ...interface{}) {
if entry.Logger.Level >= ErrorLevel {
entry.log(ErrorLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Fatal(args ...interface{}) {
if entry.Logger.Level >= FatalLevel {
entry.log(FatalLevel, fmt.Sprint(args...))
}
Exit(1)
}
func (entry *Entry) Panic(args ...interface{}) {
if entry.Logger.Level >= PanicLevel {
entry.log(PanicLevel, fmt.Sprint(args...))
}
panic(fmt.Sprint(args...))
}
// Entry Printf family functions
func (entry *Entry) Debugf(format string, args ...interface{}) {
if entry.Logger.Level >= DebugLevel {
entry.Debug(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Infof(format string, args ...interface{}) {
if entry.Logger.Level >= InfoLevel {
entry.Info(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Printf(format string, args ...interface{}) {
entry.Infof(format, args...)
}
func (entry *Entry) Warnf(format string, args ...interface{}) {
if entry.Logger.Level >= WarnLevel {
entry.Warn(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Warningf(format string, args ...interface{}) {
entry.Warnf(format, args...)
}
func (entry *Entry) Errorf(format string, args ...interface{}) {
if entry.Logger.Level >= ErrorLevel {
entry.Error(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Fatalf(format string, args ...interface{}) {
if entry.Logger.Level >= FatalLevel {
entry.Fatal(fmt.Sprintf(format, args...))
}
Exit(1)
}
func (entry *Entry) Panicf(format string, args ...interface{}) {
if entry.Logger.Level >= PanicLevel {
entry.Panic(fmt.Sprintf(format, args...))
}
}
// Entry Println family functions
func (entry *Entry) Debugln(args ...interface{}) {
if entry.Logger.Level >= DebugLevel {
entry.Debug(entry.sprintlnn(args...))
}
}
func (entry *Entry) Infoln(args ...interface{}) {
if entry.Logger.Level >= InfoLevel {
entry.Info(entry.sprintlnn(args...))
}
}
func (entry *Entry) Println(args ...interface{}) {
entry.Infoln(args...)
}
func (entry *Entry) Warnln(args ...interface{}) {
if entry.Logger.Level >= WarnLevel {
entry.Warn(entry.sprintlnn(args...))
}
}
func (entry *Entry) Warningln(args ...interface{}) {
entry.Warnln(args...)
}
func (entry *Entry) Errorln(args ...interface{}) {
if entry.Logger.Level >= ErrorLevel {
entry.Error(entry.sprintlnn(args...))
}
}
func (entry *Entry) Fatalln(args ...interface{}) {
if entry.Logger.Level >= FatalLevel {
entry.Fatal(entry.sprintlnn(args...))
}
Exit(1)
}
func (entry *Entry) Panicln(args ...interface{}) {
if entry.Logger.Level >= PanicLevel {
entry.Panic(entry.sprintlnn(args...))
}
}
// Sprintlnn => Sprint no newline. This is to get the behavior of how
// fmt.Sprintln where spaces are always added between operands, regardless of
// their type. Instead of vendoring the Sprintln implementation to spare a
// string allocation, we do the simplest thing.
func (entry *Entry) sprintlnn(args ...interface{}) string {
msg := fmt.Sprintln(args...)
return msg[:len(msg)-1]
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/exported.go
================================================
package logrus
import (
"io"
)
var (
// std is the name of the standard logger in stdlib `log`
std = New()
)
func StandardLogger() *Logger {
return std
}
// SetOutput sets the standard logger output.
func SetOutput(out io.Writer) {
std.mu.Lock()
defer std.mu.Unlock()
std.Out = out
}
// SetFormatter sets the standard logger formatter.
func SetFormatter(formatter Formatter) {
std.mu.Lock()
defer std.mu.Unlock()
std.Formatter = formatter
}
// SetLevel sets the standard logger level.
func SetLevel(level Level) {
std.mu.Lock()
defer std.mu.Unlock()
std.Level = level
}
// GetLevel returns the standard logger level.
func GetLevel() Level {
std.mu.Lock()
defer std.mu.Unlock()
return std.Level
}
// AddHook adds a hook to the standard logger hooks.
func AddHook(hook Hook) {
std.mu.Lock()
defer std.mu.Unlock()
std.Hooks.Add(hook)
}
// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
func WithError(err error) *Entry {
return std.WithField(ErrorKey, err)
}
// WithField creates an entry from the standard logger and adds a field to
// it. If you want multiple fields, use `WithFields`.
//
// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
// or Panic on the Entry it returns.
func WithField(key string, value interface{}) *Entry {
return std.WithField(key, value)
}
// WithFields creates an entry from the standard logger and adds multiple
// fields to it. This is simply a helper for `WithField`, invoking it
// once for each field.
//
// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
// or Panic on the Entry it returns.
func WithFields(fields Fields) *Entry {
return std.WithFields(fields)
}
// Debug logs a message at level Debug on the standard logger.
func Debug(args ...interface{}) {
std.Debug(args...)
}
// Print logs a message at level Info on the standard logger.
func Print(args ...interface{}) {
std.Print(args...)
}
// Info logs a message at level Info on the standard logger.
func Info(args ...interface{}) {
std.Info(args...)
}
// Warn logs a message at level Warn on the standard logger.
func Warn(args ...interface{}) {
std.Warn(args...)
}
// Warning logs a message at level Warn on the standard logger.
func Warning(args ...interface{}) {
std.Warning(args...)
}
// Error logs a message at level Error on the standard logger.
func Error(args ...interface{}) {
std.Error(args...)
}
// Panic logs a message at level Panic on the standard logger.
func Panic(args ...interface{}) {
std.Panic(args...)
}
// Fatal logs a message at level Fatal on the standard logger.
func Fatal(args ...interface{}) {
std.Fatal(args...)
}
// Debugf logs a message at level Debug on the standard logger.
func Debugf(format string, args ...interface{}) {
std.Debugf(format, args...)
}
// Printf logs a message at level Info on the standard logger.
func Printf(format string, args ...interface{}) {
std.Printf(format, args...)
}
// Infof logs a message at level Info on the standard logger.
func Infof(format string, args ...interface{}) {
std.Infof(format, args...)
}
// Warnf logs a message at level Warn on the standard logger.
func Warnf(format string, args ...interface{}) {
std.Warnf(format, args...)
}
// Warningf logs a message at level Warn on the standard logger.
func Warningf(format string, args ...interface{}) {
std.Warningf(format, args...)
}
// Errorf logs a message at level Error on the standard logger.
func Errorf(format string, args ...interface{}) {
std.Errorf(format, args...)
}
// Panicf logs a message at level Panic on the standard logger.
func Panicf(format string, args ...interface{}) {
std.Panicf(format, args...)
}
// Fatalf logs a message at level Fatal on the standard logger.
func Fatalf(format string, args ...interface{}) {
std.Fatalf(format, args...)
}
// Debugln logs a message at level Debug on the standard logger.
func Debugln(args ...interface{}) {
std.Debugln(args...)
}
// Println logs a message at level Info on the standard logger.
func Println(args ...interface{}) {
std.Println(args...)
}
// Infoln logs a message at level Info on the standard logger.
func Infoln(args ...interface{}) {
std.Infoln(args...)
}
// Warnln logs a message at level Warn on the standard logger.
func Warnln(args ...interface{}) {
std.Warnln(args...)
}
// Warningln logs a message at level Warn on the standard logger.
func Warningln(args ...interface{}) {
std.Warningln(args...)
}
// Errorln logs a message at level Error on the standard logger.
func Errorln(args ...interface{}) {
std.Errorln(args...)
}
// Panicln logs a message at level Panic on the standard logger.
func Panicln(args ...interface{}) {
std.Panicln(args...)
}
// Fatalln logs a message at level Fatal on the standard logger.
func Fatalln(args ...interface{}) {
std.Fatalln(args...)
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/formatter.go
================================================
package logrus
import "time"
const DefaultTimestampFormat = time.RFC3339
// The Formatter interface is used to implement a custom Formatter. It takes an
// `Entry`. It exposes all the fields, including the default ones:
//
// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
// * `entry.Data["time"]`. The timestamp.
// * `entry.Data["level"]. The level the entry was logged at.
//
// Any additional fields added with `WithField` or `WithFields` are also in
// `entry.Data`. Format is expected to return an array of bytes which are then
// logged to `logger.Out`.
type Formatter interface {
Format(*Entry) ([]byte, error)
}
// This is to not silently overwrite `time`, `msg` and `level` fields when
// dumping it. If this code wasn't there doing:
//
// logrus.WithField("level", 1).Info("hello")
//
// Would just silently drop the user provided level. Instead with this code
// it'll logged as:
//
// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
//
// It's not exported because it's still using Data in an opinionated way. It's to
// avoid code duplication between the two default formatters.
func prefixFieldClashes(data Fields) {
if t, ok := data["time"]; ok {
data["fields.time"] = t
}
if m, ok := data["msg"]; ok {
data["fields.msg"] = m
}
if l, ok := data["level"]; ok {
data["fields.level"] = l
}
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/hooks.go
================================================
package logrus
// A hook to be fired when logging on the logging levels returned from
// `Levels()` on your implementation of the interface. Note that this is not
// fired in a goroutine or a channel with workers, you should handle such
// functionality yourself if your call is non-blocking and you don't wish for
// the logging calls for levels returned from `Levels()` to block.
type Hook interface {
Levels() []Level
Fire(*Entry) error
}
// Internal type for storing the hooks on a logger instance.
type LevelHooks map[Level][]Hook
// Add a hook to an instance of logger. This is called with
// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
func (hooks LevelHooks) Add(hook Hook) {
for _, level := range hook.Levels() {
hooks[level] = append(hooks[level], hook)
}
}
// Fire all the hooks for the passed level. Used by `entry.log` to fire
// appropriate hooks for a log entry.
func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
for _, hook := range hooks[level] {
if err := hook.Fire(entry); err != nil {
return err
}
}
return nil
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/json_formatter.go
================================================
package logrus
import (
"encoding/json"
"fmt"
)
type fieldKey string
type FieldMap map[fieldKey]string
const (
FieldKeyMsg = "msg"
FieldKeyLevel = "level"
FieldKeyTime = "time"
)
func (f FieldMap) resolve(key fieldKey) string {
if k, ok := f[key]; ok {
return k
}
return string(key)
}
type JSONFormatter struct {
// TimestampFormat sets the format used for marshaling timestamps.
TimestampFormat string
// DisableTimestamp allows disabling automatic timestamps in output
DisableTimestamp bool
// FieldMap allows users to customize the names of keys for various fields.
// As an example:
// formatter := &JSONFormatter{
// FieldMap: FieldMap{
// FieldKeyTime: "@timestamp",
// FieldKeyLevel: "@level",
// FieldKeyLevel: "@message",
// },
// }
FieldMap FieldMap
}
func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
data := make(Fields, len(entry.Data)+3)
for k, v := range entry.Data {
switch v := v.(type) {
case error:
// Otherwise errors are ignored by `encoding/json`
// https://github.com/Sirupsen/logrus/issues/137
data[k] = v.Error()
default:
data[k] = v
}
}
prefixFieldClashes(data)
timestampFormat := f.TimestampFormat
if timestampFormat == "" {
timestampFormat = DefaultTimestampFormat
}
if !f.DisableTimestamp {
data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
}
data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
serialized, err := json.Marshal(data)
if err != nil {
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
}
return append(serialized, '\n'), nil
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/logger.go
================================================
package logrus
import (
"io"
"os"
"sync"
)
type Logger struct {
// The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
// file, or leave it default which is `os.Stderr`. You can also set this to
// something more adventorous, such as logging to Kafka.
Out io.Writer
// Hooks for the logger instance. These allow firing events based on logging
// levels and log entries. For example, to send errors to an error tracking
// service, log to StatsD or dump the core on fatal errors.
Hooks LevelHooks
// All log entries pass through the formatter before logged to Out. The
// included formatters are `TextFormatter` and `JSONFormatter` for which
// TextFormatter is the default. In development (when a TTY is attached) it
// logs with colors, but to a file it wouldn't. You can easily implement your
// own that implements the `Formatter` interface, see the `README` or included
// formatters for examples.
Formatter Formatter
// The logging level the logger should log at. This is typically (and defaults
// to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
// logged. `logrus.Debug` is useful in
Level Level
// Used to sync writing to the log. Locking is enabled by Default
mu MutexWrap
// Reusable empty entry
entryPool sync.Pool
}
type MutexWrap struct {
lock sync.Mutex
disabled bool
}
func (mw *MutexWrap) Lock() {
if !mw.disabled {
mw.lock.Lock()
}
}
func (mw *MutexWrap) Unlock() {
if !mw.disabled {
mw.lock.Unlock()
}
}
func (mw *MutexWrap) Disable() {
mw.disabled = true
}
// Creates a new logger. Configuration should be set by changing `Formatter`,
// `Out` and `Hooks` directly on the default logger instance. You can also just
// instantiate your own:
//
// var log = &Logger{
// Out: os.Stderr,
// Formatter: new(JSONFormatter),
// Hooks: make(LevelHooks),
// Level: logrus.DebugLevel,
// }
//
// It's recommended to make this a global instance called `log`.
func New() *Logger {
return &Logger{
Out: os.Stderr,
Formatter: new(TextFormatter),
Hooks: make(LevelHooks),
Level: InfoLevel,
}
}
func (logger *Logger) newEntry() *Entry {
entry, ok := logger.entryPool.Get().(*Entry)
if ok {
return entry
}
return NewEntry(logger)
}
func (logger *Logger) releaseEntry(entry *Entry) {
logger.entryPool.Put(entry)
}
// Adds a field to the log entry, note that it doesn't log until you call
// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
// If you want multiple fields, use `WithFields`.
func (logger *Logger) WithField(key string, value interface{}) *Entry {
entry := logger.newEntry()
defer logger.releaseEntry(entry)
return entry.WithField(key, value)
}
// Adds a struct of fields to the log entry. All it does is call `WithField` for
// each `Field`.
func (logger *Logger) WithFields(fields Fields) *Entry {
entry := logger.newEntry()
defer logger.releaseEntry(entry)
return entry.WithFields(fields)
}
// Add an error as single field to the log entry. All it does is call
// `WithError` for the given `error`.
func (logger *Logger) WithError(err error) *Entry {
entry := logger.newEntry()
defer logger.releaseEntry(entry)
return entry.WithError(err)
}
func (logger *Logger) Debugf(format string, args ...interface{}) {
if logger.Level >= DebugLevel {
entry := logger.newEntry()
entry.Debugf(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Infof(format string, args ...interface{}) {
if logger.Level >= InfoLevel {
entry := logger.newEntry()
entry.Infof(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Printf(format string, args ...interface{}) {
entry := logger.newEntry()
entry.Printf(format, args...)
logger.releaseEntry(entry)
}
func (logger *Logger) Warnf(format string, args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warnf(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Warningf(format string, args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warnf(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Errorf(format string, args ...interface{}) {
if logger.Level >= ErrorLevel {
entry := logger.newEntry()
entry.Errorf(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Fatalf(format string, args ...interface{}) {
if logger.Level >= FatalLevel {
entry := logger.newEntry()
entry.Fatalf(format, args...)
logger.releaseEntry(entry)
}
Exit(1)
}
func (logger *Logger) Panicf(format string, args ...interface{}) {
if logger.Level >= PanicLevel {
entry := logger.newEntry()
entry.Panicf(format, args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Debug(args ...interface{}) {
if logger.Level >= DebugLevel {
entry := logger.newEntry()
entry.Debug(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Info(args ...interface{}) {
if logger.Level >= InfoLevel {
entry := logger.newEntry()
entry.Info(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Print(args ...interface{}) {
entry := logger.newEntry()
entry.Info(args...)
logger.releaseEntry(entry)
}
func (logger *Logger) Warn(args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warn(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Warning(args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warn(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Error(args ...interface{}) {
if logger.Level >= ErrorLevel {
entry := logger.newEntry()
entry.Error(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Fatal(args ...interface{}) {
if logger.Level >= FatalLevel {
entry := logger.newEntry()
entry.Fatal(args...)
logger.releaseEntry(entry)
}
Exit(1)
}
func (logger *Logger) Panic(args ...interface{}) {
if logger.Level >= PanicLevel {
entry := logger.newEntry()
entry.Panic(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Debugln(args ...interface{}) {
if logger.Level >= DebugLevel {
entry := logger.newEntry()
entry.Debugln(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Infoln(args ...interface{}) {
if logger.Level >= InfoLevel {
entry := logger.newEntry()
entry.Infoln(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Println(args ...interface{}) {
entry := logger.newEntry()
entry.Println(args...)
logger.releaseEntry(entry)
}
func (logger *Logger) Warnln(args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warnln(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Warningln(args ...interface{}) {
if logger.Level >= WarnLevel {
entry := logger.newEntry()
entry.Warnln(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Errorln(args ...interface{}) {
if logger.Level >= ErrorLevel {
entry := logger.newEntry()
entry.Errorln(args...)
logger.releaseEntry(entry)
}
}
func (logger *Logger) Fatalln(args ...interface{}) {
if logger.Level >= FatalLevel {
entry := logger.newEntry()
entry.Fatalln(args...)
logger.releaseEntry(entry)
}
Exit(1)
}
func (logger *Logger) Panicln(args ...interface{}) {
if logger.Level >= PanicLevel {
entry := logger.newEntry()
entry.Panicln(args...)
logger.releaseEntry(entry)
}
}
//When file is opened with appending mode, it's safe to
//write concurrently to a file (within 4k message on Linux).
//In these cases user can choose to disable the lock.
func (logger *Logger) SetNoLock() {
logger.mu.Disable()
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/logrus.go
================================================
package logrus
import (
"fmt"
"log"
"strings"
)
// Fields type, used to pass to `WithFields`.
type Fields map[string]interface{}
// Level type
type Level uint8
// Convert the Level to a string. E.g. PanicLevel becomes "panic".
func (level Level) String() string {
switch level {
case DebugLevel:
return "debug"
case InfoLevel:
return "info"
case WarnLevel:
return "warning"
case ErrorLevel:
return "error"
case FatalLevel:
return "fatal"
case PanicLevel:
return "panic"
}
return "unknown"
}
// ParseLevel takes a string level and returns the Logrus log level constant.
func ParseLevel(lvl string) (Level, error) {
switch strings.ToLower(lvl) {
case "panic":
return PanicLevel, nil
case "fatal":
return FatalLevel, nil
case "error":
return ErrorLevel, nil
case "warn", "warning":
return WarnLevel, nil
case "info":
return InfoLevel, nil
case "debug":
return DebugLevel, nil
}
var l Level
return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
}
// A constant exposing all logging levels
var AllLevels = []Level{
PanicLevel,
FatalLevel,
ErrorLevel,
WarnLevel,
InfoLevel,
DebugLevel,
}
// These are the different logging levels. You can set the logging level to log
// on your instance of logger, obtained with `logrus.New()`.
const (
// PanicLevel level, highest level of severity. Logs and then calls panic with the
// message passed to Debug, Info, ...
PanicLevel Level = iota
// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
// logging level is set to Panic.
FatalLevel
// ErrorLevel level. Logs. Used for errors that should definitely be noted.
// Commonly used for hooks to send errors to an error tracking service.
ErrorLevel
// WarnLevel level. Non-critical entries that deserve eyes.
WarnLevel
// InfoLevel level. General operational entries about what's going on inside the
// application.
InfoLevel
// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
DebugLevel
)
// Won't compile if StdLogger can't be realized by a log.Logger
var (
_ StdLogger = &log.Logger{}
_ StdLogger = &Entry{}
_ StdLogger = &Logger{}
)
// StdLogger is what your logrus-enabled library should take, that way
// it'll accept a stdlib logger and a logrus logger. There's no standard
// interface, this is the closest we get, unfortunately.
type StdLogger interface {
Print(...interface{})
Printf(string, ...interface{})
Println(...interface{})
Fatal(...interface{})
Fatalf(string, ...interface{})
Fatalln(...interface{})
Panic(...interface{})
Panicf(string, ...interface{})
Panicln(...interface{})
}
// The FieldLogger interface generalizes the Entry and Logger types
type FieldLogger interface {
WithField(key string, value interface{}) *Entry
WithFields(fields Fields) *Entry
WithError(err error) *Entry
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Printf(format string, args ...interface{})
Warnf(format string, args ...interface{})
Warningf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatalf(format string, args ...interface{})
Panicf(format string, args ...interface{})
Debug(args ...interface{})
Info(args ...interface{})
Print(args ...interface{})
Warn(args ...interface{})
Warning(args ...interface{})
Error(args ...interface{})
Fatal(args ...interface{})
Panic(args ...interface{})
Debugln(args ...interface{})
Infoln(args ...interface{})
Println(args ...interface{})
Warnln(args ...interface{})
Warningln(args ...interface{})
Errorln(args ...interface{})
Fatalln(args ...interface{})
Panicln(args ...interface{})
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_appengine.go
================================================
// +build appengine
package logrus
import "io"
// IsTerminal returns true if stderr's file descriptor is a terminal.
func IsTerminal(f io.Writer) bool {
return true
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_bsd.go
================================================
// +build darwin freebsd openbsd netbsd dragonfly
// +build !appengine
package logrus
import "syscall"
const ioctlReadTermios = syscall.TIOCGETA
type Termios syscall.Termios
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_linux.go
================================================
// Based on ssh/terminal:
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !appengine
package logrus
import "syscall"
const ioctlReadTermios = syscall.TCGETS
type Termios syscall.Termios
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
================================================
// Based on ssh/terminal:
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux darwin freebsd openbsd netbsd dragonfly
// +build !appengine
package logrus
import (
"io"
"os"
"syscall"
"unsafe"
)
// IsTerminal returns true if stderr's file descriptor is a terminal.
func IsTerminal(f io.Writer) bool {
var termios Termios
switch v := f.(type) {
case *os.File:
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(v.Fd()), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
return err == 0
default:
return false
}
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_solaris.go
================================================
// +build solaris,!appengine
package logrus
import (
"io"
"os"
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal(f io.Writer) bool {
switch v := f.(type) {
case *os.File:
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
return err == nil
default:
return false
}
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/terminal_windows.go
================================================
// Based on ssh/terminal:
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows,!appengine
package logrus
import (
"io"
"os"
"syscall"
"unsafe"
)
var kernel32 = syscall.NewLazyDLL("kernel32.dll")
var (
procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
)
// IsTerminal returns true if stderr's file descriptor is a terminal.
func IsTerminal(f io.Writer) bool {
switch v := f.(type) {
case *os.File:
var st uint32
r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(v.Fd()), uintptr(unsafe.Pointer(&st)), 0)
return r != 0 && e == 0
default:
return false
}
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/text_formatter.go
================================================
package logrus
import (
"bytes"
"fmt"
"sort"
"strings"
"sync"
"time"
)
const (
nocolor = 0
red = 31
green = 32
yellow = 33
blue = 34
gray = 37
)
var (
baseTimestamp time.Time
)
func init() {
baseTimestamp = time.Now()
}
type TextFormatter struct {
// Set to true to bypass checking for a TTY before outputting colors.
ForceColors bool
// Force disabling colors.
DisableColors bool
// Disable timestamp logging. useful when output is redirected to logging
// system that already adds timestamps.
DisableTimestamp bool
// Enable logging the full timestamp when a TTY is attached instead of just
// the time passed since beginning of execution.
FullTimestamp bool
// TimestampFormat to use for display when a full timestamp is printed
TimestampFormat string
// The fields are sorted by default for a consistent output. For applications
// that log extremely frequently and don't use the JSON formatter this may not
// be desired.
DisableSorting bool
// QuoteEmptyFields will wrap empty fields in quotes if true
QuoteEmptyFields bool
// QuoteCharacter can be set to the override the default quoting character "
// with something else. For example: ', or `.
QuoteCharacter string
// Whether the logger's out is to a terminal
isTerminal bool
sync.Once
}
func (f *TextFormatter) init(entry *Entry) {
if len(f.QuoteCharacter) == 0 {
f.QuoteCharacter = "\""
}
if entry.Logger != nil {
f.isTerminal = IsTerminal(entry.Logger.Out)
}
}
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
var b *bytes.Buffer
keys := make([]string, 0, len(entry.Data))
for k := range entry.Data {
keys = append(keys, k)
}
if !f.DisableSorting {
sort.Strings(keys)
}
if entry.Buffer != nil {
b = entry.Buffer
} else {
b = &bytes.Buffer{}
}
prefixFieldClashes(entry.Data)
f.Do(func() { f.init(entry) })
isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
timestampFormat := f.TimestampFormat
if timestampFormat == "" {
timestampFormat = DefaultTimestampFormat
}
if isColored {
f.printColored(b, entry, keys, timestampFormat)
} else {
if !f.DisableTimestamp {
f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
}
f.appendKeyValue(b, "level", entry.Level.String())
if entry.Message != "" {
f.appendKeyValue(b, "msg", entry.Message)
}
for _, key := range keys {
f.appendKeyValue(b, key, entry.Data[key])
}
}
b.WriteByte('\n')
return b.Bytes(), nil
}
func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
var levelColor int
switch entry.Level {
case DebugLevel:
levelColor = gray
case WarnLevel:
levelColor = yellow
case ErrorLevel, FatalLevel, PanicLevel:
levelColor = red
default:
levelColor = blue
}
levelText := strings.ToUpper(entry.Level.String())[0:4]
if f.DisableTimestamp {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
} else if !f.FullTimestamp {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message)
} else {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
}
for _, k := range keys {
v := entry.Data[k]
fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
f.appendValue(b, v)
}
}
func (f *TextFormatter) needsQuoting(text string) bool {
if f.QuoteEmptyFields && len(text) == 0 {
return true
}
for _, ch := range text {
if !((ch >= 'a' && ch <= 'z') ||
(ch >= 'A' && ch <= 'Z') ||
(ch >= '0' && ch <= '9') ||
ch == '-' || ch == '.') {
return true
}
}
return false
}
func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
b.WriteString(key)
b.WriteByte('=')
f.appendValue(b, value)
b.WriteByte(' ')
}
func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
switch value := value.(type) {
case string:
if !f.needsQuoting(value) {
b.WriteString(value)
} else {
fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, value, f.QuoteCharacter)
}
case error:
errmsg := value.Error()
if !f.needsQuoting(errmsg) {
b.WriteString(errmsg)
} else {
fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, errmsg, f.QuoteCharacter)
}
default:
fmt.Fprint(b, value)
}
}
================================================
FILE: vendor/github.com/Sirupsen/logrus/writer.go
================================================
package logrus
import (
"bufio"
"io"
"runtime"
)
func (logger *Logger) Writer() *io.PipeWriter {
return logger.WriterLevel(InfoLevel)
}
func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
return NewEntry(logger).WriterLevel(level)
}
func (entry *Entry) Writer() *io.PipeWriter {
return entry.WriterLevel(InfoLevel)
}
func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
reader, writer := io.Pipe()
var printFunc func(args ...interface{})
switch level {
case DebugLevel:
printFunc = entry.Debug
case InfoLevel:
printFunc = entry.Info
case WarnLevel:
printFunc = entry.Warn
case ErrorLevel:
printFunc = entry.Error
case FatalLevel:
printFunc = entry.Fatal
case PanicLevel:
printFunc = entry.Panic
default:
printFunc = entry.Print
}
go entry.writerScanner(reader, printFunc)
runtime.SetFinalizer(writer, writerFinalizer)
return writer
}
func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
printFunc(scanner.Text())
}
if err := scanner.Err(); err != nil {
entry.Errorf("Error while reading from Writer: %s", err)
}
reader.Close()
}
func writerFinalizer(writer *io.PipeWriter) {
writer.Close()
}
================================================
FILE: vendor/github.com/docker/distribution/LICENSE
================================================
Apache License
Ve
gitextract_fhojboh4/ ├── .dockerignore ├── .gitignore ├── CONTRIBUTING.md ├── Docker/ │ ├── config.lua │ ├── container.lua │ ├── docker.lua │ ├── error.lua │ ├── json.lua │ ├── log.lua │ ├── tcpclient.lua │ └── update.lua ├── Dockerfile ├── LICENSE ├── MAINTAINERS ├── Makefile ├── README.md ├── circle.yml ├── config/ │ ├── motd.txt │ ├── settings.ini │ ├── start.sh │ └── world/ │ └── world.ini ├── daemon.go ├── docker-compose.yml ├── docs/ │ └── magicavoxel/ │ ├── docker-container-blue.vox │ ├── docker-container-orange.vox │ ├── docker-image.vox │ └── dockercraft.vox ├── main.go ├── setup.go ├── vendor/ │ ├── github.com/ │ │ ├── Microsoft/ │ │ │ └── go-winio/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backup.go │ │ │ ├── file.go │ │ │ ├── fileinfo.go │ │ │ ├── pipe.go │ │ │ ├── privilege.go │ │ │ ├── reparse.go │ │ │ ├── sd.go │ │ │ ├── syscall.go │ │ │ └── zsyscall_windows.go │ │ ├── Sirupsen/ │ │ │ └── logrus/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── alt_exit.go │ │ │ ├── doc.go │ │ │ ├── entry.go │ │ │ ├── exported.go │ │ │ ├── formatter.go │ │ │ ├── hooks.go │ │ │ ├── json_formatter.go │ │ │ ├── logger.go │ │ │ ├── logrus.go │ │ │ ├── terminal_appengine.go │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_linux.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_windows.go │ │ │ ├── text_formatter.go │ │ │ └── writer.go │ │ ├── docker/ │ │ │ ├── distribution/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── digestset/ │ │ │ │ │ └── set.go │ │ │ │ └── reference/ │ │ │ │ ├── helpers.go │ │ │ │ ├── normalize.go │ │ │ │ ├── reference.go │ │ │ │ └── regexp.go │ │ │ ├── docker/ │ │ │ │ ├── LICENSE │ │ │ │ ├── NOTICE │ │ │ │ ├── README.md │ │ │ │ ├── api/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── common.go │ │ │ │ │ ├── common_unix.go │ │ │ │ │ ├── common_windows.go │ │ │ │ │ ├── names.go │ │ │ │ │ └── types/ │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── blkiodev/ │ │ │ │ │ │ └── blkio.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── configs.go │ │ │ │ │ ├── container/ │ │ │ │ │ │ ├── config.go │ │ │ │ │ │ ├── container_changes.go │ │ │ │ │ │ ├── container_create.go │ │ │ │ │ │ ├── container_top.go │ │ │ │ │ │ ├── container_update.go │ │ │ │ │ │ ├── container_wait.go │ │ │ │ │ │ ├── host_config.go │ │ │ │ │ │ ├── hostconfig_unix.go │ │ │ │ │ │ └── hostconfig_windows.go │ │ │ │ │ ├── error_response.go │ │ │ │ │ ├── events/ │ │ │ │ │ │ └── events.go │ │ │ │ │ ├── filters/ │ │ │ │ │ │ └── parse.go │ │ │ │ │ ├── graph_driver_data.go │ │ │ │ │ ├── id_response.go │ │ │ │ │ ├── image/ │ │ │ │ │ │ └── image_history.go │ │ │ │ │ ├── image_delete_response_item.go │ │ │ │ │ ├── image_summary.go │ │ │ │ │ ├── mount/ │ │ │ │ │ │ └── mount.go │ │ │ │ │ ├── network/ │ │ │ │ │ │ └── network.go │ │ │ │ │ ├── plugin.go │ │ │ │ │ ├── plugin_device.go │ │ │ │ │ ├── plugin_env.go │ │ │ │ │ ├── plugin_interface_type.go │ │ │ │ │ ├── plugin_mount.go │ │ │ │ │ ├── plugin_responses.go │ │ │ │ │ ├── port.go │ │ │ │ │ ├── registry/ │ │ │ │ │ │ ├── authenticate.go │ │ │ │ │ │ └── registry.go │ │ │ │ │ ├── seccomp.go │ │ │ │ │ ├── service_update_response.go │ │ │ │ │ ├── stats.go │ │ │ │ │ ├── strslice/ │ │ │ │ │ │ └── strslice.go │ │ │ │ │ ├── swarm/ │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── container.go │ │ │ │ │ │ ├── network.go │ │ │ │ │ │ ├── node.go │ │ │ │ │ │ ├── runtime.go │ │ │ │ │ │ ├── secret.go │ │ │ │ │ │ ├── service.go │ │ │ │ │ │ ├── swarm.go │ │ │ │ │ │ └── task.go │ │ │ │ │ ├── time/ │ │ │ │ │ │ ├── duration_convert.go │ │ │ │ │ │ └── timestamp.go │ │ │ │ │ ├── types.go │ │ │ │ │ ├── versions/ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── compare.go │ │ │ │ │ ├── volume/ │ │ │ │ │ │ ├── volumes_create.go │ │ │ │ │ │ └── volumes_list.go │ │ │ │ │ └── volume.go │ │ │ │ ├── client/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── checkpoint_create.go │ │ │ │ │ ├── checkpoint_delete.go │ │ │ │ │ ├── checkpoint_list.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── client_unix.go │ │ │ │ │ ├── client_windows.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 │ │ │ │ │ ├── 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 │ │ │ │ │ ├── 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 │ │ │ │ │ ├── transport.go │ │ │ │ │ ├── utils.go │ │ │ │ │ ├── version.go │ │ │ │ │ ├── volume_create.go │ │ │ │ │ ├── volume_inspect.go │ │ │ │ │ ├── volume_list.go │ │ │ │ │ ├── volume_prune.go │ │ │ │ │ └── volume_remove.go │ │ │ │ ├── pkg/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── ioutils/ │ │ │ │ │ │ ├── buffer.go │ │ │ │ │ │ ├── bytespipe.go │ │ │ │ │ │ ├── fmt.go │ │ │ │ │ │ ├── fswriters.go │ │ │ │ │ │ ├── multireader.go │ │ │ │ │ │ ├── readers.go │ │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ │ ├── temp_windows.go │ │ │ │ │ │ ├── writeflusher.go │ │ │ │ │ │ └── writers.go │ │ │ │ │ ├── longpath/ │ │ │ │ │ │ └── longpath.go │ │ │ │ │ ├── system/ │ │ │ │ │ │ ├── chtimes.go │ │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ │ ├── chtimes_windows.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── events_windows.go │ │ │ │ │ │ ├── exitcode.go │ │ │ │ │ │ ├── filesys.go │ │ │ │ │ │ ├── filesys_windows.go │ │ │ │ │ │ ├── lstat_unix.go │ │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ │ ├── meminfo.go │ │ │ │ │ │ ├── meminfo_linux.go │ │ │ │ │ │ ├── meminfo_solaris.go │ │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ │ ├── meminfo_windows.go │ │ │ │ │ │ ├── mknod.go │ │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ │ ├── path_unix.go │ │ │ │ │ │ ├── path_windows.go │ │ │ │ │ │ ├── process_unix.go │ │ │ │ │ │ ├── stat_darwin.go │ │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ │ ├── stat_linux.go │ │ │ │ │ │ ├── stat_openbsd.go │ │ │ │ │ │ ├── stat_solaris.go │ │ │ │ │ │ ├── stat_unix.go │ │ │ │ │ │ ├── stat_windows.go │ │ │ │ │ │ ├── syscall_unix.go │ │ │ │ │ │ ├── syscall_windows.go │ │ │ │ │ │ ├── umask.go │ │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ │ ├── utimes_linux.go │ │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ │ ├── xattrs_linux.go │ │ │ │ │ │ └── xattrs_unsupported.go │ │ │ │ │ └── tlsconfig/ │ │ │ │ │ ├── tlsconfig_clone.go │ │ │ │ │ ├── tlsconfig_clone_go16.go │ │ │ │ │ └── tlsconfig_clone_go17.go │ │ │ │ └── vendor/ │ │ │ │ └── github.com/ │ │ │ │ ├── docker/ │ │ │ │ │ └── docker-credential-helpers/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── osxkeychain/ │ │ │ │ │ │ ├── osxkeychain_darwin.c │ │ │ │ │ │ ├── osxkeychain_darwin.go │ │ │ │ │ │ └── osxkeychain_darwin.h │ │ │ │ │ └── secretservice/ │ │ │ │ │ ├── secretservice_linux.c │ │ │ │ │ ├── secretservice_linux.go │ │ │ │ │ └── secretservice_linux.h │ │ │ │ ├── gogo/ │ │ │ │ │ └── protobuf/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README │ │ │ │ │ ├── Readme.md │ │ │ │ │ └── protobuf/ │ │ │ │ │ └── google/ │ │ │ │ │ └── protobuf/ │ │ │ │ │ ├── any.proto │ │ │ │ │ ├── compiler/ │ │ │ │ │ │ └── plugin.proto │ │ │ │ │ ├── descriptor.proto │ │ │ │ │ ├── duration.proto │ │ │ │ │ ├── empty.proto │ │ │ │ │ ├── field_mask.proto │ │ │ │ │ ├── struct.proto │ │ │ │ │ ├── timestamp.proto │ │ │ │ │ └── wrappers.proto │ │ │ │ ├── google/ │ │ │ │ │ └── certificate-transparency/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README-MacOS.md │ │ │ │ │ ├── README.md │ │ │ │ │ ├── cpp/ │ │ │ │ │ │ ├── third_party/ │ │ │ │ │ │ │ ├── curl/ │ │ │ │ │ │ │ │ ├── hostcheck.c │ │ │ │ │ │ │ │ └── hostcheck.h │ │ │ │ │ │ │ └── isec_partners/ │ │ │ │ │ │ │ ├── openssl_hostname_validation.c │ │ │ │ │ │ │ └── openssl_hostname_validation.h │ │ │ │ │ │ └── version.h │ │ │ │ │ └── proto/ │ │ │ │ │ └── ct.proto │ │ │ │ ├── miekg/ │ │ │ │ │ └── pkcs11/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── const.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── pkcs11.go │ │ │ │ │ ├── pkcs11.h │ │ │ │ │ ├── pkcs11f.h │ │ │ │ │ ├── pkcs11t.h │ │ │ │ │ └── types.go │ │ │ │ └── opencontainers/ │ │ │ │ └── runc/ │ │ │ │ ├── LICENSE │ │ │ │ ├── NOTICE │ │ │ │ ├── README.md │ │ │ │ └── libcontainer/ │ │ │ │ ├── README.md │ │ │ │ └── nsenter/ │ │ │ │ ├── README.md │ │ │ │ ├── namespace.h │ │ │ │ ├── nsenter.go │ │ │ │ ├── nsenter_gccgo.go │ │ │ │ ├── nsenter_unsupported.go │ │ │ │ └── nsexec.c │ │ │ ├── go-connections/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── 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/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── duration.go │ │ │ │ ├── size.go │ │ │ │ └── ulimit.go │ │ │ └── libtrust/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── certificates.go │ │ │ ├── doc.go │ │ │ ├── ec_key.go │ │ │ ├── filter.go │ │ │ ├── hash.go │ │ │ ├── jsonsign.go │ │ │ ├── key.go │ │ │ ├── key_files.go │ │ │ ├── key_manager.go │ │ │ ├── rsa_key.go │ │ │ └── util.go │ │ ├── opencontainers/ │ │ │ └── go-digest/ │ │ │ ├── LICENSE.code │ │ │ ├── LICENSE.docs │ │ │ ├── README.md │ │ │ ├── algorithm.go │ │ │ ├── digest.go │ │ │ ├── digester.go │ │ │ ├── doc.go │ │ │ └── verifiers.go │ │ └── pkg/ │ │ └── errors/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── errors.go │ │ └── stack.go │ └── golang.org/ │ └── x/ │ ├── net/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README │ │ ├── context/ │ │ │ ├── context.go │ │ │ ├── ctxhttp/ │ │ │ │ ├── ctxhttp.go │ │ │ │ └── ctxhttp_pre17.go │ │ │ ├── go17.go │ │ │ └── pre_go17.go │ │ └── proxy/ │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── proxy.go │ │ └── socks5.go │ └── sys/ │ ├── LICENSE │ ├── PATENTS │ ├── README │ ├── unix/ │ │ ├── asm_darwin_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_darwin_arm.s │ │ ├── asm_darwin_arm64.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_freebsd_arm.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_solaris_amd64.s │ │ ├── bluetooth_linux.go │ │ ├── constants.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── env_unset.go │ │ ├── flock.go │ │ ├── flock_linux_32bit.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── gccgo_linux_sparc64.go │ │ ├── mkpost.go │ │ ├── openbsd_pledge.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_386.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_no_getwd.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── types_darwin.go │ │ ├── types_dragonfly.go │ │ ├── types_freebsd.go │ │ ├── types_linux.go │ │ ├── types_netbsd.go │ │ ├── types_openbsd.go │ │ ├── types_solaris.go │ │ ├── zerrors_darwin_386.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zsyscall_darwin_386.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_arm.go │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsysctl_openbsd.go │ │ ├── zsysnum_darwin_386.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_solaris_amd64.go │ │ ├── ztypes_darwin_386.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ └── ztypes_solaris_amd64.go │ └── windows/ │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── dll_windows.go │ ├── env_unset.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── zsyscall_windows.go │ ├── ztypes_windows.go │ ├── ztypes_windows_386.go │ └── ztypes_windows_amd64.go └── vendor.conf
Showing preview only (4,748K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (62150 symbols across 483 files)
FILE: daemon.go
type TCPMessage (line 25) | type TCPMessage struct
type StatsOptionsEntry (line 35) | type StatsOptionsEntry struct
type ContainerEvent (line 43) | type ContainerEvent struct
type Daemon (line 55) | type Daemon struct
method Init (line 91) | func (d *Daemon) Init() error {
method Serve (line 112) | func (d *Daemon) Serve() {
method StartMonitoringEvents (line 134) | func (d *Daemon) StartMonitoringEvents() {
method handleConn (line 158) | func (d *Daemon) handleConn(conn net.Conn) {
method handleMessage (line 221) | func (d *Daemon) handleMessage(message []byte) {
method eventCallback (line 247) | func (d *Daemon) eventCallback(event events.Message) {
method statCallback (line 331) | func (d *Daemon) statCallback(id string, stats *types.StatsJSON, args ...
method execDockerCmd (line 373) | func (d *Daemon) execDockerCmd(args []string) {
method listContainers (line 385) | func (d *Daemon) listContainers() {
method startStatsMonitoring (line 441) | func (d *Daemon) startStatsMonitoring(containerID string) {
method apiEventToContainerEvent (line 544) | func (d *Daemon) apiEventToContainerEvent(event events.Message) (Conta...
function NewDaemon (line 78) | func NewDaemon() *Daemon {
type CPUStats (line 85) | type CPUStats struct
function calculateCPUPercent (line 498) | func calculateCPUPercent(previousCPUStats *CPUStats, newCPUStats *types....
function splitRepoAndTag (line 513) | func splitRepoAndTag(repoTag string) (string, string) {
function containerEventToTCPMsg (line 531) | func containerEventToTCPMsg(containerEvent ContainerEvent) ([]byte, erro...
FILE: main.go
function main (line 17) | func main() {
FILE: setup.go
constant downloadURL (line 17) | downloadURL = "https://download.docker.com/linux/static/stable/x86_64/...
constant rcDownloadURL (line 18) | rcDownloadURL = "https://test.docker.com/builds/Linux/x86_64/docker-"
method GetDockerBinary (line 23) | func (d *Daemon) GetDockerBinary() error {
type copier (line 77) | type copier
function compareVersions (line 79) | func compareVersions(v1 string, v2 string) (comp int, err error) {
function getClient (line 109) | func getClient(out *os.File, URL string, cp copier) error {
function copyClient (line 119) | func copyClient(out *os.File, resp *http.Response) error {
function extractClient (line 124) | func extractClient(out *os.File, resp *http.Response) error {
FILE: vendor/github.com/Microsoft/go-winio/backup.go
constant BackupData (line 21) | BackupData = uint32(iota + 1)
constant BackupEaData (line 22) | BackupEaData
constant BackupSecurity (line 23) | BackupSecurity
constant BackupAlternateData (line 24) | BackupAlternateData
constant BackupLink (line 25) | BackupLink
constant BackupPropertyData (line 26) | BackupPropertyData
constant BackupObjectId (line 27) | BackupObjectId
constant BackupReparseData (line 28) | BackupReparseData
constant BackupSparseBlock (line 29) | BackupSparseBlock
constant BackupTxfsData (line 30) | BackupTxfsData
constant StreamSparseAttributes (line 34) | StreamSparseAttributes = uint32(8)
constant WRITE_DAC (line 38) | WRITE_DAC = 0x40000
constant WRITE_OWNER (line 39) | WRITE_OWNER = 0x80000
constant ACCESS_SYSTEM_SECURITY (line 40) | ACCESS_SYSTEM_SECURITY = 0x1000000
type BackupHeader (line 44) | type BackupHeader struct
type win32StreamId (line 52) | type win32StreamId struct
type BackupStreamReader (line 61) | type BackupStreamReader struct
method Next (line 73) | func (r *BackupStreamReader) Next() (*BackupHeader, error) {
method Read (line 106) | func (r *BackupStreamReader) Read(b []byte) (int, error) {
function NewBackupStreamReader (line 67) | func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
type BackupStreamWriter (line 124) | type BackupStreamWriter struct
method WriteHeader (line 135) | func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
method Write (line 168) | func (w *BackupStreamWriter) Write(b []byte) (int, error) {
function NewBackupStreamWriter (line 130) | func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
type BackupFileReader (line 178) | type BackupFileReader struct
method Read (line 193) | func (r *BackupFileReader) Read(b []byte) (int, error) {
method Close (line 207) | func (r *BackupFileReader) Close() error {
function NewBackupFileReader (line 186) | func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileRe...
type BackupFileWriter (line 216) | type BackupFileWriter struct
method Write (line 231) | func (w *BackupFileWriter) Write(b []byte) (int, error) {
method Close (line 245) | func (w *BackupFileWriter) Close() error {
function NewBackupFileWriter (line 224) | func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWr...
function OpenForBackup (line 257) | func OpenForBackup(path string, access uint32, share uint32, createmode ...
FILE: vendor/github.com/Microsoft/go-winio/file.go
constant cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS (line 21) | cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
constant cFILE_SKIP_SET_EVENT_ON_HANDLE (line 22) | cFILE_SKIP_SET_EVENT_ON_HANDLE = 2
type timeoutError (line 30) | type timeoutError struct
method Error (line 32) | func (e *timeoutError) Error() string { return "i/o timeout" }
method Timeout (line 33) | func (e *timeoutError) Timeout() bool { return true }
method Temporary (line 34) | func (e *timeoutError) Temporary() bool { return true }
type ioResult (line 40) | type ioResult struct
type ioOperation (line 46) | type ioOperation struct
function initIo (line 51) | func initIo() {
type win32File (line 62) | type win32File struct
method closeHandle (line 91) | func (f *win32File) closeHandle() {
method Close (line 104) | func (f *win32File) Close() error {
method prepareIo (line 111) | func (f *win32File) prepareIo() (*ioOperation, error) {
method asyncIo (line 139) | func (f *win32File) asyncIo(c *ioOperation, deadline time.Time, bytes ...
method Read (line 183) | func (f *win32File) Read(b []byte) (int, error) {
method Write (line 203) | func (f *win32File) Write(b []byte) (int, error) {
method SetReadDeadline (line 213) | func (f *win32File) SetReadDeadline(t time.Time) error {
method SetWriteDeadline (line 218) | func (f *win32File) SetWriteDeadline(t time.Time) error {
function makeWin32File (line 71) | func makeWin32File(h syscall.Handle) (*win32File, error) {
function MakeOpenFile (line 86) | func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
function ioCompletionProcessor (line 122) | func ioCompletionProcessor(h syscall.Handle) {
FILE: vendor/github.com/Microsoft/go-winio/fileinfo.go
constant fileBasicInfo (line 15) | fileBasicInfo = 0
constant fileIDInfo (line 16) | fileIDInfo = 0x12
type FileBasicInfo (line 20) | type FileBasicInfo struct
function GetFileBasicInfo (line 26) | func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
function SetFileBasicInfo (line 35) | func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
type FileIDInfo (line 44) | type FileIDInfo struct
function GetFileID (line 50) | func GetFileID(f *os.File) (*FileIDInfo, error) {
FILE: vendor/github.com/Microsoft/go-winio/pipe.go
type securityAttributes (line 22) | type securityAttributes struct
constant cERROR_PIPE_BUSY (line 29) | cERROR_PIPE_BUSY = syscall.Errno(231)
constant cERROR_PIPE_CONNECTED (line 30) | cERROR_PIPE_CONNECTED = syscall.Errno(535)
constant cERROR_SEM_TIMEOUT (line 31) | cERROR_SEM_TIMEOUT = syscall.Errno(121)
constant cPIPE_ACCESS_DUPLEX (line 33) | cPIPE_ACCESS_DUPLEX = 0x3
constant cFILE_FLAG_FIRST_PIPE_INSTANCE (line 34) | cFILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000
constant cSECURITY_SQOS_PRESENT (line 35) | cSECURITY_SQOS_PRESENT = 0x100000
constant cSECURITY_ANONYMOUS (line 36) | cSECURITY_ANONYMOUS = 0
constant cPIPE_REJECT_REMOTE_CLIENTS (line 38) | cPIPE_REJECT_REMOTE_CLIENTS = 0x8
constant cPIPE_UNLIMITED_INSTANCES (line 40) | cPIPE_UNLIMITED_INSTANCES = 255
constant cNMPWAIT_USE_DEFAULT_WAIT (line 42) | cNMPWAIT_USE_DEFAULT_WAIT = 0
constant cNMPWAIT_NOWAIT (line 43) | cNMPWAIT_NOWAIT = 1
constant cPIPE_TYPE_MESSAGE (line 45) | cPIPE_TYPE_MESSAGE = 4
constant cPIPE_READMODE_MESSAGE (line 47) | cPIPE_READMODE_MESSAGE = 2
type win32Pipe (line 58) | type win32Pipe struct
method LocalAddr (line 71) | func (f *win32Pipe) LocalAddr() net.Addr {
method RemoteAddr (line 75) | func (f *win32Pipe) RemoteAddr() net.Addr {
method SetDeadline (line 79) | func (f *win32Pipe) SetDeadline(t time.Time) error {
type win32MessageBytePipe (line 63) | type win32MessageBytePipe struct
method CloseWrite (line 86) | func (f *win32MessageBytePipe) CloseWrite() error {
method Write (line 100) | func (f *win32MessageBytePipe) Write(b []byte) (int, error) {
method Read (line 112) | func (f *win32MessageBytePipe) Read(b []byte) (int, error) {
type pipeAddress (line 69) | type pipeAddress
method Network (line 128) | func (s pipeAddress) Network() string {
method String (line 132) | func (s pipeAddress) String() string {
function DialPipe (line 139) | func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
type acceptResponse (line 204) | type acceptResponse struct
type win32PipeListener (line 209) | type win32PipeListener struct
method makeServerPipe (line 242) | func (l *win32PipeListener) makeServerPipe() (*win32File, error) {
method listenerRoutine (line 255) | func (l *win32PipeListener) listenerRoutine() {
method Accept (line 369) | func (l *win32PipeListener) Accept() (net.Conn, error) {
method Close (line 389) | func (l *win32PipeListener) Close() error {
method Addr (line 398) | func (l *win32PipeListener) Addr() net.Addr {
function makeServerPipeHandle (line 219) | func makeServerPipeHandle(path string, securityDescriptor []byte, c *Pip...
type PipeConfig (line 296) | type PipeConfig struct
function ListenPipe (line 317) | func ListenPipe(path string, c *PipeConfig) (net.Listener, error) {
function connectPipe (line 356) | func connectPipe(p *win32File) error {
FILE: vendor/github.com/Microsoft/go-winio/privilege.go
constant SE_PRIVILEGE_ENABLED (line 27) | SE_PRIVILEGE_ENABLED = 2
constant ERROR_NOT_ALL_ASSIGNED (line 29) | ERROR_NOT_ALL_ASSIGNED syscall.Errno = 1300
constant SeBackupPrivilege (line 31) | SeBackupPrivilege = "SeBackupPrivilege"
constant SeRestorePrivilege (line 32) | SeRestorePrivilege = "SeRestorePrivilege"
constant securityAnonymous (line 36) | securityAnonymous = iota
constant securityIdentification (line 37) | securityIdentification
constant securityImpersonation (line 38) | securityImpersonation
constant securityDelegation (line 39) | securityDelegation
type PrivilegeError (line 48) | type PrivilegeError struct
method Error (line 52) | func (e *PrivilegeError) Error() string {
function RunWithPrivilege (line 71) | func RunWithPrivilege(name string, fn func() error) error {
function RunWithPrivileges (line 76) | func RunWithPrivileges(names []string, fn func() error) error {
function mapPrivileges (line 95) | func mapPrivileges(names []string) ([]uint64, error) {
function EnableProcessPrivileges (line 114) | func EnableProcessPrivileges(names []string) error {
function DisableProcessPrivileges (line 119) | func DisableProcessPrivileges(names []string) error {
function enableDisableProcessPrivilege (line 123) | func enableDisableProcessPrivilege(names []string, action uint32) error {
function adjustPrivileges (line 140) | func adjustPrivileges(token windows.Token, privileges []uint64, action u...
function getPrivilegeName (line 159) | func getPrivilegeName(luid uint64) string {
function newThreadToken (line 178) | func newThreadToken() (windows.Token, error) {
function releaseThreadToken (line 196) | func releaseThreadToken(h windows.Token) {
FILE: vendor/github.com/Microsoft/go-winio/reparse.go
constant reparseTagMountPoint (line 13) | reparseTagMountPoint = 0xA0000003
constant reparseTagSymlink (line 14) | reparseTagSymlink = 0xA000000C
type reparseDataBuffer (line 17) | type reparseDataBuffer struct
type ReparsePoint (line 28) | type ReparsePoint struct
type UnsupportedReparsePointError (line 35) | type UnsupportedReparsePointError struct
method Error (line 39) | func (e *UnsupportedReparsePointError) Error() string {
function DecodeReparsePoint (line 45) | func DecodeReparsePoint(b []byte) (*ReparsePoint, error) {
function DecodeReparsePointData (line 50) | func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
function isDriveLetter (line 72) | func isDriveLetter(c byte) bool {
function EncodeReparsePoint (line 78) | func EncodeReparsePoint(rp *ReparsePoint) []byte {
FILE: vendor/github.com/Microsoft/go-winio/sd.go
constant cERROR_NONE_MAPPED (line 18) | cERROR_NONE_MAPPED = syscall.Errno(1332)
type AccountLookupError (line 21) | type AccountLookupError struct
method Error (line 26) | func (e *AccountLookupError) Error() string {
type SddlConversionError (line 40) | type SddlConversionError struct
method Error (line 45) | func (e *SddlConversionError) Error() string {
function LookupSidByName (line 50) | func LookupSidByName(name string) (sid string, err error) {
function SddlToSecurityDescriptor (line 76) | func SddlToSecurityDescriptor(sddl string) ([]byte, error) {
function SecurityDescriptorToSddl (line 88) | func SecurityDescriptorToSddl(sd []byte) (string, error) {
FILE: vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
function cancelIoEx (line 50) | func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) {
function createIoCompletionPort (line 62) | func createIoCompletionPort(file syscall.Handle, port syscall.Handle, ke...
function getQueuedCompletionStatus (line 75) | func getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *...
function setFileCompletionNotificationModes (line 87) | func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (...
function timeBeginPeriod (line 99) | func timeBeginPeriod(period uint32) (n int32) {
function connectNamedPipe (line 105) | func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err e...
function createNamedPipe (line 117) | func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInst...
function _createNamedPipe (line 126) | func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxIn...
function createFile (line 139) | func createFile(name string, access uint32, mode uint32, sa *securityAtt...
function _createFile (line 148) | func _createFile(name *uint16, access uint32, mode uint32, sa *securityA...
function waitNamedPipe (line 161) | func waitNamedPipe(name string, timeout uint32) (err error) {
function _waitNamedPipe (line 170) | func _waitNamedPipe(name *uint16, timeout uint32) (err error) {
function getNamedPipeInfo (line 182) | func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint3...
function getNamedPipeHandleState (line 194) | func getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInst...
function lookupAccountName (line 206) | func lookupAccountName(systemName *uint16, accountName string, sid *byte...
function _lookupAccountName (line 215) | func _lookupAccountName(systemName *uint16, accountName *uint16, sid *by...
function convertSidToStringSid (line 227) | func convertSidToStringSid(sid *byte, str **uint16) (err error) {
function convertStringSecurityDescriptorToSecurityDescriptor (line 239) | func convertStringSecurityDescriptorToSecurityDescriptor(str string, rev...
function _convertStringSecurityDescriptorToSecurityDescriptor (line 248) | func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, r...
function convertSecurityDescriptorToStringSecurityDescriptor (line 260) | func convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revis...
function localFree (line 272) | func localFree(mem uintptr) {
function getSecurityDescriptorLength (line 277) | func getSecurityDescriptorLength(sd uintptr) (len uint32) {
function getFileInformationByHandleEx (line 283) | func getFileInformationByHandleEx(h syscall.Handle, class uint32, buffer...
function setFileInformationByHandle (line 295) | func setFileInformationByHandle(h syscall.Handle, class uint32, buffer *...
function adjustTokenPrivileges (line 307) | func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *...
function impersonateSelf (line 326) | func impersonateSelf(level uint32) (err error) {
function revertToSelf (line 338) | func revertToSelf() (err error) {
function openThreadToken (line 350) | func openThreadToken(thread syscall.Handle, accessMask uint32, openAsSel...
function getCurrentThread (line 368) | func getCurrentThread() (h syscall.Handle) {
function lookupPrivilegeValue (line 374) | func lookupPrivilegeValue(systemName string, name string, luid *uint64) ...
function _lookupPrivilegeValue (line 388) | func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint6...
function lookupPrivilegeName (line 400) | func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16...
function _lookupPrivilegeName (line 409) | func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint...
function lookupPrivilegeDisplayName (line 421) | func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer ...
function _lookupPrivilegeDisplayName (line 430) | func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffe...
function backupRead (line 442) | func backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort boo...
function backupWrite (line 470) | func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort...
FILE: vendor/github.com/Sirupsen/logrus/alt_exit.go
function runHandler (line 32) | func runHandler(handler func()) {
function runHandlers (line 42) | func runHandlers() {
function Exit (line 49) | func Exit(code int) {
function RegisterExitHandler (line 62) | func RegisterExitHandler(handler func()) {
FILE: vendor/github.com/Sirupsen/logrus/entry.go
function init (line 13) | func init() {
type Entry (line 28) | type Entry struct
method String (line 57) | func (entry *Entry) String() (string, error) {
method WithError (line 67) | func (entry *Entry) WithError(err error) *Entry {
method WithField (line 72) | func (entry *Entry) WithField(key string, value interface{}) *Entry {
method WithFields (line 77) | func (entry *Entry) WithFields(fields Fields) *Entry {
method log (line 90) | func (entry Entry) log(level Level, msg string) {
method Debug (line 128) | func (entry *Entry) Debug(args ...interface{}) {
method Print (line 134) | func (entry *Entry) Print(args ...interface{}) {
method Info (line 138) | func (entry *Entry) Info(args ...interface{}) {
method Warn (line 144) | func (entry *Entry) Warn(args ...interface{}) {
method Warning (line 150) | func (entry *Entry) Warning(args ...interface{}) {
method Error (line 154) | func (entry *Entry) Error(args ...interface{}) {
method Fatal (line 160) | func (entry *Entry) Fatal(args ...interface{}) {
method Panic (line 167) | func (entry *Entry) Panic(args ...interface{}) {
method Debugf (line 176) | func (entry *Entry) Debugf(format string, args ...interface{}) {
method Infof (line 182) | func (entry *Entry) Infof(format string, args ...interface{}) {
method Printf (line 188) | func (entry *Entry) Printf(format string, args ...interface{}) {
method Warnf (line 192) | func (entry *Entry) Warnf(format string, args ...interface{}) {
method Warningf (line 198) | func (entry *Entry) Warningf(format string, args ...interface{}) {
method Errorf (line 202) | func (entry *Entry) Errorf(format string, args ...interface{}) {
method Fatalf (line 208) | func (entry *Entry) Fatalf(format string, args ...interface{}) {
method Panicf (line 215) | func (entry *Entry) Panicf(format string, args ...interface{}) {
method Debugln (line 223) | func (entry *Entry) Debugln(args ...interface{}) {
method Infoln (line 229) | func (entry *Entry) Infoln(args ...interface{}) {
method Println (line 235) | func (entry *Entry) Println(args ...interface{}) {
method Warnln (line 239) | func (entry *Entry) Warnln(args ...interface{}) {
method Warningln (line 245) | func (entry *Entry) Warningln(args ...interface{}) {
method Errorln (line 249) | func (entry *Entry) Errorln(args ...interface{}) {
method Fatalln (line 255) | func (entry *Entry) Fatalln(args ...interface{}) {
method Panicln (line 262) | func (entry *Entry) Panicln(args ...interface{}) {
method sprintlnn (line 272) | func (entry *Entry) sprintlnn(args ...interface{}) string {
function NewEntry (line 47) | func NewEntry(logger *Logger) *Entry {
FILE: vendor/github.com/Sirupsen/logrus/exported.go
function StandardLogger (line 12) | func StandardLogger() *Logger {
function SetOutput (line 17) | func SetOutput(out io.Writer) {
function SetFormatter (line 24) | func SetFormatter(formatter Formatter) {
function SetLevel (line 31) | func SetLevel(level Level) {
function GetLevel (line 38) | func GetLevel() Level {
function AddHook (line 45) | func AddHook(hook Hook) {
function WithError (line 52) | func WithError(err error) *Entry {
function WithField (line 61) | func WithField(key string, value interface{}) *Entry {
function WithFields (line 71) | func WithFields(fields Fields) *Entry {
function Debug (line 76) | func Debug(args ...interface{}) {
function Print (line 81) | func Print(args ...interface{}) {
function Info (line 86) | func Info(args ...interface{}) {
function Warn (line 91) | func Warn(args ...interface{}) {
function Warning (line 96) | func Warning(args ...interface{}) {
function Error (line 101) | func Error(args ...interface{}) {
function Panic (line 106) | func Panic(args ...interface{}) {
function Fatal (line 111) | func Fatal(args ...interface{}) {
function Debugf (line 116) | func Debugf(format string, args ...interface{}) {
function Printf (line 121) | func Printf(format string, args ...interface{}) {
function Infof (line 126) | func Infof(format string, args ...interface{}) {
function Warnf (line 131) | func Warnf(format string, args ...interface{}) {
function Warningf (line 136) | func Warningf(format string, args ...interface{}) {
function Errorf (line 141) | func Errorf(format string, args ...interface{}) {
function Panicf (line 146) | func Panicf(format string, args ...interface{}) {
function Fatalf (line 151) | func Fatalf(format string, args ...interface{}) {
function Debugln (line 156) | func Debugln(args ...interface{}) {
function Println (line 161) | func Println(args ...interface{}) {
function Infoln (line 166) | func Infoln(args ...interface{}) {
function Warnln (line 171) | func Warnln(args ...interface{}) {
function Warningln (line 176) | func Warningln(args ...interface{}) {
function Errorln (line 181) | func Errorln(args ...interface{}) {
function Panicln (line 186) | func Panicln(args ...interface{}) {
function Fatalln (line 191) | func Fatalln(args ...interface{}) {
FILE: vendor/github.com/Sirupsen/logrus/formatter.go
constant DefaultTimestampFormat (line 5) | DefaultTimestampFormat = time.RFC3339
type Formatter (line 17) | type Formatter interface
function prefixFieldClashes (line 33) | func prefixFieldClashes(data Fields) {
FILE: vendor/github.com/Sirupsen/logrus/hooks.go
type Hook (line 8) | type Hook interface
type LevelHooks (line 14) | type LevelHooks
method Add (line 18) | func (hooks LevelHooks) Add(hook Hook) {
method Fire (line 26) | func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
FILE: vendor/github.com/Sirupsen/logrus/json_formatter.go
type fieldKey (line 8) | type fieldKey
type FieldMap (line 9) | type FieldMap
method resolve (line 17) | func (f FieldMap) resolve(key fieldKey) string {
constant FieldKeyMsg (line 12) | FieldKeyMsg = "msg"
constant FieldKeyLevel (line 13) | FieldKeyLevel = "level"
constant FieldKeyTime (line 14) | FieldKeyTime = "time"
type JSONFormatter (line 25) | type JSONFormatter struct
method Format (line 44) | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
FILE: vendor/github.com/Sirupsen/logrus/logger.go
type Logger (line 9) | type Logger struct
method newEntry (line 77) | func (logger *Logger) newEntry() *Entry {
method releaseEntry (line 85) | func (logger *Logger) releaseEntry(entry *Entry) {
method WithField (line 92) | func (logger *Logger) WithField(key string, value interface{}) *Entry {
method WithFields (line 100) | func (logger *Logger) WithFields(fields Fields) *Entry {
method WithError (line 108) | func (logger *Logger) WithError(err error) *Entry {
method Debugf (line 114) | func (logger *Logger) Debugf(format string, args ...interface{}) {
method Infof (line 122) | func (logger *Logger) Infof(format string, args ...interface{}) {
method Printf (line 130) | func (logger *Logger) Printf(format string, args ...interface{}) {
method Warnf (line 136) | func (logger *Logger) Warnf(format string, args ...interface{}) {
method Warningf (line 144) | func (logger *Logger) Warningf(format string, args ...interface{}) {
method Errorf (line 152) | func (logger *Logger) Errorf(format string, args ...interface{}) {
method Fatalf (line 160) | func (logger *Logger) Fatalf(format string, args ...interface{}) {
method Panicf (line 169) | func (logger *Logger) Panicf(format string, args ...interface{}) {
method Debug (line 177) | func (logger *Logger) Debug(args ...interface{}) {
method Info (line 185) | func (logger *Logger) Info(args ...interface{}) {
method Print (line 193) | func (logger *Logger) Print(args ...interface{}) {
method Warn (line 199) | func (logger *Logger) Warn(args ...interface{}) {
method Warning (line 207) | func (logger *Logger) Warning(args ...interface{}) {
method Error (line 215) | func (logger *Logger) Error(args ...interface{}) {
method Fatal (line 223) | func (logger *Logger) Fatal(args ...interface{}) {
method Panic (line 232) | func (logger *Logger) Panic(args ...interface{}) {
method Debugln (line 240) | func (logger *Logger) Debugln(args ...interface{}) {
method Infoln (line 248) | func (logger *Logger) Infoln(args ...interface{}) {
method Println (line 256) | func (logger *Logger) Println(args ...interface{}) {
method Warnln (line 262) | func (logger *Logger) Warnln(args ...interface{}) {
method Warningln (line 270) | func (logger *Logger) Warningln(args ...interface{}) {
method Errorln (line 278) | func (logger *Logger) Errorln(args ...interface{}) {
method Fatalln (line 286) | func (logger *Logger) Fatalln(args ...interface{}) {
method Panicln (line 295) | func (logger *Logger) Panicln(args ...interface{}) {
method SetNoLock (line 306) | func (logger *Logger) SetNoLock() {
type MutexWrap (line 35) | type MutexWrap struct
method Lock (line 40) | func (mw *MutexWrap) Lock() {
method Unlock (line 46) | func (mw *MutexWrap) Unlock() {
method Disable (line 52) | func (mw *MutexWrap) Disable() {
function New (line 68) | func New() *Logger {
FILE: vendor/github.com/Sirupsen/logrus/logrus.go
type Fields (line 10) | type Fields
type Level (line 13) | type Level
method String (line 16) | func (level Level) String() string {
function ParseLevel (line 36) | func ParseLevel(lvl string) (Level, error) {
constant PanicLevel (line 71) | PanicLevel Level = iota
constant FatalLevel (line 74) | FatalLevel
constant ErrorLevel (line 77) | ErrorLevel
constant WarnLevel (line 79) | WarnLevel
constant InfoLevel (line 82) | InfoLevel
constant DebugLevel (line 84) | DebugLevel
type StdLogger (line 97) | type StdLogger interface
type FieldLogger (line 112) | type FieldLogger interface
FILE: vendor/github.com/Sirupsen/logrus/terminal_appengine.go
function IsTerminal (line 8) | func IsTerminal(f io.Writer) bool {
FILE: vendor/github.com/Sirupsen/logrus/terminal_bsd.go
constant ioctlReadTermios (line 8) | ioctlReadTermios = syscall.TIOCGETA
type Termios (line 10) | type Termios
FILE: vendor/github.com/Sirupsen/logrus/terminal_linux.go
constant ioctlReadTermios (line 12) | ioctlReadTermios = syscall.TCGETS
type Termios (line 14) | type Termios
FILE: vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
function IsTerminal (line 19) | func IsTerminal(f io.Writer) bool {
FILE: vendor/github.com/Sirupsen/logrus/terminal_solaris.go
function IsTerminal (line 13) | func IsTerminal(f io.Writer) bool {
FILE: vendor/github.com/Sirupsen/logrus/terminal_windows.go
function IsTerminal (line 24) | func IsTerminal(f io.Writer) bool {
FILE: vendor/github.com/Sirupsen/logrus/text_formatter.go
constant nocolor (line 13) | nocolor = 0
constant red (line 14) | red = 31
constant green (line 15) | green = 32
constant yellow (line 16) | yellow = 33
constant blue (line 17) | blue = 34
constant gray (line 18) | gray = 37
function init (line 25) | func init() {
type TextFormatter (line 29) | type TextFormatter struct
method init (line 65) | func (f *TextFormatter) init(entry *Entry) {
method Format (line 74) | func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
method printColored (line 119) | func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, ke...
method needsQuoting (line 148) | func (f *TextFormatter) needsQuoting(text string) bool {
method appendKeyValue (line 163) | func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, va...
method appendValue (line 171) | func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
FILE: vendor/github.com/Sirupsen/logrus/writer.go
method Writer (line 9) | func (logger *Logger) Writer() *io.PipeWriter {
method WriterLevel (line 13) | func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
method Writer (line 17) | func (entry *Entry) Writer() *io.PipeWriter {
method WriterLevel (line 21) | func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
method writerScanner (line 49) | func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(...
function writerFinalizer (line 60) | func writerFinalizer(writer *io.PipeWriter) {
FILE: vendor/github.com/docker/distribution/digestset/set.go
type Set (line 32) | type Set struct
method Lookup (line 69) | func (dst *Set) Lookup(d string) (digest.Digest, error) {
method Add (line 113) | func (dst *Set) Add(d digest.Digest) error {
method Remove (line 144) | func (dst *Set) Remove(d digest.Digest) error {
method All (line 172) | func (dst *Set) All() []digest.Digest {
function NewSet (line 39) | func NewSet() *Set {
function checkShortMatch (line 49) | func checkShortMatch(alg digest.Algorithm, hex, shortAlg, shortHex strin...
function ShortCodeTable (line 188) | func ShortCodeTable(dst *Set, length int) map[digest.Digest]string {
type digestEntry (line 226) | type digestEntry struct
type digestEntries (line 232) | type digestEntries
method Len (line 234) | func (d digestEntries) Len() int {
method Less (line 238) | func (d digestEntries) Less(i, j int) bool {
method Swap (line 245) | func (d digestEntries) Swap(i, j int) {
FILE: vendor/github.com/docker/distribution/reference/helpers.go
function IsNameOnly (line 6) | func IsNameOnly(ref Named) bool {
function FamiliarName (line 18) | func FamiliarName(ref Named) string {
function FamiliarString (line 27) | func FamiliarString(ref Reference) string {
function FamiliarMatch (line 36) | func FamiliarMatch(pattern string, ref Reference) (bool, error) {
FILE: vendor/github.com/docker/distribution/reference/normalize.go
type normalizedNamed (line 24) | type normalizedNamed interface
function ParseNormalizedNamed (line 33) | func ParseNormalizedNamed(s string) (Named, error) {
function splitDockerDomain (line 62) | func splitDockerDomain(name string) (domain, remainder string) {
function familiarizeName (line 84) | func familiarizeName(named namedRepository) repository {
method Familiar (line 100) | func (r reference) Familiar() Named {
method Familiar (line 108) | func (r repository) Familiar() Named {
method Familiar (line 112) | func (t taggedReference) Familiar() Named {
method Familiar (line 119) | func (c canonicalReference) Familiar() Named {
function TagNameOnly (line 128) | func TagNameOnly(ref Named) Named {
function ParseAnyReference (line 144) | func ParseAnyReference(ref string) (Reference, error) {
function ParseAnyReferenceWithSet (line 157) | func ParseAnyReferenceWithSet(ref string, ds *digestset.Set) (Reference,...
FILE: vendor/github.com/docker/distribution/reference/reference.go
constant NameTotalLengthMax (line 37) | NameTotalLengthMax = 255
type Reference (line 65) | type Reference interface
type Field (line 72) | type Field struct
method Reference (line 85) | func (f Field) Reference() Reference {
method MarshalText (line 91) | func (f Field) MarshalText() (p []byte, err error) {
method UnmarshalText (line 98) | func (f *Field) UnmarshalText(p []byte) error {
function AsField (line 77) | func AsField(reference Reference) Field {
type Named (line 109) | type Named interface
type Tagged (line 115) | type Tagged interface
type NamedTagged (line 121) | type NamedTagged interface
type Digested (line 128) | type Digested interface
type Canonical (line 135) | type Canonical interface
type namedRepository (line 142) | type namedRepository interface
function Domain (line 149) | func Domain(named Named) string {
function Path (line 158) | func Path(named Named) (name string) {
function splitDomain (line 166) | func splitDomain(name string) (string, string) {
function SplitHostname (line 179) | func SplitHostname(named Named) (string, string) {
function Parse (line 189) | func Parse(s string) (Reference, error) {
function ParseNamed (line 241) | func ParseNamed(s string) (Named, error) {
function WithName (line 254) | func WithName(name string) (Named, error) {
function WithTag (line 271) | func WithTag(name Named, tag string) (NamedTagged, error) {
function WithDigest (line 297) | func WithDigest(name Named, digest digest.Digest) (Canonical, error) {
function TrimNamed (line 322) | func TrimNamed(ref Named) Named {
function getBestReferenceType (line 330) | func getBestReferenceType(ref reference) Reference {
type reference (line 357) | type reference struct
method String (line 363) | func (r reference) String() string {
method Tag (line 367) | func (r reference) Tag() string {
method Digest (line 371) | func (r reference) Digest() digest.Digest {
type repository (line 375) | type repository struct
method String (line 380) | func (r repository) String() string {
method Name (line 384) | func (r repository) Name() string {
method Domain (line 391) | func (r repository) Domain() string {
method Path (line 395) | func (r repository) Path() string {
type digestReference (line 399) | type digestReference
method String (line 401) | func (d digestReference) String() string {
method Digest (line 405) | func (d digestReference) Digest() digest.Digest {
type taggedReference (line 409) | type taggedReference struct
method String (line 414) | func (t taggedReference) String() string {
method Tag (line 418) | func (t taggedReference) Tag() string {
type canonicalReference (line 422) | type canonicalReference struct
method String (line 427) | func (c canonicalReference) String() string {
method Digest (line 431) | func (c canonicalReference) Digest() digest.Digest {
FILE: vendor/github.com/docker/distribution/reference/regexp.go
function literal (line 97) | func literal(s string) *regexp.Regexp {
function expression (line 109) | func expression(res ...*regexp.Regexp) *regexp.Regexp {
function optional (line 120) | func optional(res ...*regexp.Regexp) *regexp.Regexp {
function repeated (line 126) | func repeated(res ...*regexp.Regexp) *regexp.Regexp {
function group (line 131) | func group(res ...*regexp.Regexp) *regexp.Regexp {
function capture (line 136) | func capture(res ...*regexp.Regexp) *regexp.Regexp {
function anchored (line 141) | func anchored(res ...*regexp.Regexp) *regexp.Regexp {
FILE: vendor/github.com/docker/docker/api/common.go
constant DefaultVersion (line 24) | DefaultVersion string = "1.30"
constant NoBaseImageSpecifier (line 28) | NoBaseImageSpecifier string = "scratch"
type byPortInfo (line 32) | type byPortInfo
method Len (line 34) | func (r byPortInfo) Len() int { return len(r) }
method Swap (line 35) | func (r byPortInfo) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
method Less (line 36) | func (r byPortInfo) Less(i, j int) bool {
function DisplayablePorts (line 55) | func DisplayablePorts(ports []types.Port) string {
function formGroup (line 99) | func formGroup(key string, start, last uint16) string {
function MatchesContentType (line 118) | func MatchesContentType(contentType, expectedType string) bool {
function LoadOrCreateTrustKey (line 128) | func LoadOrCreateTrustKey(trustKeyPath string) (libtrust.PrivateKey, err...
function serializePrivateKey (line 152) | func serializePrivateKey(key libtrust.PrivateKey, ext string) (encoded [...
FILE: vendor/github.com/docker/docker/api/common_unix.go
constant MinVersion (line 6) | MinVersion string = "1.12"
FILE: vendor/github.com/docker/docker/api/common_windows.go
constant MinVersion (line 8) | MinVersion string = "1.24"
FILE: vendor/github.com/docker/docker/api/names.go
constant RestrictedNameChars (line 6) | RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
FILE: vendor/github.com/docker/docker/api/types/auth.go
type AuthConfig (line 4) | type AuthConfig struct
FILE: vendor/github.com/docker/docker/api/types/blkiodev/blkio.go
type WeightDevice (line 6) | type WeightDevice struct
method String (line 11) | func (w *WeightDevice) String() string {
type ThrottleDevice (line 16) | type ThrottleDevice struct
method String (line 21) | func (t *ThrottleDevice) String() string {
FILE: vendor/github.com/docker/docker/api/types/client.go
type CheckpointCreateOptions (line 14) | type CheckpointCreateOptions struct
type CheckpointListOptions (line 21) | type CheckpointListOptions struct
type CheckpointDeleteOptions (line 26) | type CheckpointDeleteOptions struct
type ContainerAttachOptions (line 32) | type ContainerAttachOptions struct
type ContainerCommitOptions (line 42) | type ContainerCommitOptions struct
type ContainerExecInspect (line 52) | type ContainerExecInspect struct
type ContainerListOptions (line 61) | type ContainerListOptions struct
type ContainerLogsOptions (line 73) | type ContainerLogsOptions struct
type ContainerRemoveOptions (line 84) | type ContainerRemoveOptions struct
type ContainerStartOptions (line 91) | type ContainerStartOptions struct
type CopyToContainerOptions (line 98) | type CopyToContainerOptions struct
type EventsOptions (line 104) | type EventsOptions struct
type NetworkListOptions (line 111) | type NetworkListOptions struct
type HijackedResponse (line 116) | type HijackedResponse struct
method Close (line 122) | func (h *HijackedResponse) Close() {
method CloseWrite (line 133) | func (h *HijackedResponse) CloseWrite() error {
type CloseWriter (line 128) | type CloseWriter interface
type ImageBuildOptions (line 142) | type ImageBuildOptions struct
type ImageBuildResponse (line 186) | type ImageBuildResponse struct
type ImageCreateOptions (line 192) | type ImageCreateOptions struct
type ImageImportSource (line 197) | type ImageImportSource struct
type ImageImportOptions (line 203) | type ImageImportOptions struct
type ImageListOptions (line 210) | type ImageListOptions struct
type ImageLoadResponse (line 216) | type ImageLoadResponse struct
type ImagePullOptions (line 223) | type ImagePullOptions struct
type RequestPrivilegeFunc (line 235) | type RequestPrivilegeFunc
type ImagePushOptions (line 238) | type ImagePushOptions
type ImageRemoveOptions (line 241) | type ImageRemoveOptions struct
type ImageSearchOptions (line 247) | type ImageSearchOptions struct
type ResizeOptions (line 257) | type ResizeOptions struct
type NodeListOptions (line 263) | type NodeListOptions struct
type NodeRemoveOptions (line 268) | type NodeRemoveOptions struct
type ServiceCreateOptions (line 273) | type ServiceCreateOptions struct
type ServiceCreateResponse (line 283) | type ServiceCreateResponse struct
constant RegistryAuthFromSpec (line 292) | RegistryAuthFromSpec = "spec"
constant RegistryAuthFromPreviousSpec (line 293) | RegistryAuthFromPreviousSpec = "previous-spec"
type ServiceUpdateOptions (line 297) | type ServiceUpdateOptions struct
type ServiceListOptions (line 321) | type ServiceListOptions struct
type ServiceInspectOptions (line 327) | type ServiceInspectOptions struct
type TaskListOptions (line 332) | type TaskListOptions struct
type PluginRemoveOptions (line 337) | type PluginRemoveOptions struct
type PluginEnableOptions (line 342) | type PluginEnableOptions struct
type PluginDisableOptions (line 347) | type PluginDisableOptions struct
type PluginInstallOptions (line 352) | type PluginInstallOptions struct
type SwarmUnlockKeyResponse (line 364) | type SwarmUnlockKeyResponse struct
type PluginCreateOptions (line 370) | type PluginCreateOptions struct
FILE: vendor/github.com/docker/docker/api/types/configs.go
type ContainerCreateConfig (line 13) | type ContainerCreateConfig struct
type ContainerRmConfig (line 24) | type ContainerRmConfig struct
type ContainerCommitConfig (line 30) | type ContainerCommitConfig struct
type ExecConfig (line 43) | type ExecConfig struct
type PluginRmConfig (line 57) | type PluginRmConfig struct
type PluginEnableConfig (line 62) | type PluginEnableConfig struct
type PluginDisableConfig (line 67) | type PluginDisableConfig struct
FILE: vendor/github.com/docker/docker/api/types/container/config.go
type HealthConfig (line 11) | type HealthConfig struct
type Config (line 37) | type Config struct
FILE: vendor/github.com/docker/docker/api/types/container/container_changes.go
type ContainerChangeResponseItem (line 12) | type ContainerChangeResponseItem struct
FILE: vendor/github.com/docker/docker/api/types/container/container_create.go
type ContainerCreateCreatedBody (line 12) | type ContainerCreateCreatedBody struct
FILE: vendor/github.com/docker/docker/api/types/container/container_top.go
type ContainerTopOKBody (line 12) | type ContainerTopOKBody struct
FILE: vendor/github.com/docker/docker/api/types/container/container_update.go
type ContainerUpdateOKBody (line 12) | type ContainerUpdateOKBody struct
FILE: vendor/github.com/docker/docker/api/types/container/container_wait.go
type ContainerWaitOKBody (line 12) | type ContainerWaitOKBody struct
FILE: vendor/github.com/docker/docker/api/types/container/host_config.go
type Isolation (line 15) | type Isolation
method IsDefault (line 19) | func (i Isolation) IsDefault() bool {
type IpcMode (line 24) | type IpcMode
method IsPrivate (line 27) | func (n IpcMode) IsPrivate() bool {
method IsHost (line 32) | func (n IpcMode) IsHost() bool {
method IsContainer (line 37) | func (n IpcMode) IsContainer() bool {
method Valid (line 43) | func (n IpcMode) Valid() bool {
method Container (line 58) | func (n IpcMode) Container() string {
type NetworkMode (line 67) | type NetworkMode
method IsNone (line 70) | func (n NetworkMode) IsNone() bool {
method IsDefault (line 75) | func (n NetworkMode) IsDefault() bool {
method IsPrivate (line 80) | func (n NetworkMode) IsPrivate() bool {
method IsContainer (line 85) | func (n NetworkMode) IsContainer() bool {
method ConnectedContainer (line 91) | func (n NetworkMode) ConnectedContainer() string {
method UserDefined (line 100) | func (n NetworkMode) UserDefined() string {
type UsernsMode (line 108) | type UsernsMode
method IsHost (line 111) | func (n UsernsMode) IsHost() bool {
method IsPrivate (line 116) | func (n UsernsMode) IsPrivate() bool {
method Valid (line 121) | func (n UsernsMode) Valid() bool {
type CgroupSpec (line 132) | type CgroupSpec
method IsContainer (line 135) | func (c CgroupSpec) IsContainer() bool {
method Valid (line 141) | func (c CgroupSpec) Valid() bool {
method Container (line 146) | func (c CgroupSpec) Container() string {
type UTSMode (line 155) | type UTSMode
method IsPrivate (line 158) | func (n UTSMode) IsPrivate() bool {
method IsHost (line 163) | func (n UTSMode) IsHost() bool {
method Valid (line 168) | func (n UTSMode) Valid() bool {
type PidMode (line 179) | type PidMode
method IsPrivate (line 182) | func (n PidMode) IsPrivate() bool {
method IsHost (line 187) | func (n PidMode) IsHost() bool {
method IsContainer (line 192) | func (n PidMode) IsContainer() bool {
method Valid (line 198) | func (n PidMode) Valid() bool {
method Container (line 213) | func (n PidMode) Container() string {
type DeviceMapping (line 222) | type DeviceMapping struct
type RestartPolicy (line 229) | type RestartPolicy struct
method IsNone (line 236) | func (rp *RestartPolicy) IsNone() bool {
method IsAlways (line 242) | func (rp *RestartPolicy) IsAlways() bool {
method IsOnFailure (line 248) | func (rp *RestartPolicy) IsOnFailure() bool {
method IsUnlessStopped (line 255) | func (rp *RestartPolicy) IsUnlessStopped() bool {
method IsSame (line 260) | func (rp *RestartPolicy) IsSame(tp *RestartPolicy) bool {
type LogMode (line 266) | type LogMode
constant LogModeUnset (line 270) | LogModeUnset = ""
constant LogModeBlocking (line 271) | LogModeBlocking LogMode = "blocking"
constant LogModeNonBlock (line 272) | LogModeNonBlock LogMode = "non-blocking"
type LogConfig (line 276) | type LogConfig struct
type Resources (line 282) | type Resources struct
type UpdateConfig (line 322) | type UpdateConfig struct
type HostConfig (line 331) | type HostConfig struct
FILE: vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go
method IsValid (line 6) | func (i Isolation) IsValid() bool {
method NetworkName (line 11) | func (n NetworkMode) NetworkName() string {
method IsBridge (line 29) | func (n NetworkMode) IsBridge() bool {
method IsHost (line 34) | func (n NetworkMode) IsHost() bool {
method IsUserDefined (line 39) | func (n NetworkMode) IsUserDefined() bool {
FILE: vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go
method IsBridge (line 9) | func (n NetworkMode) IsBridge() bool {
method IsHost (line 15) | func (n NetworkMode) IsHost() bool {
method IsUserDefined (line 20) | func (n NetworkMode) IsUserDefined() bool {
method IsHyperV (line 25) | func (i Isolation) IsHyperV() bool {
method IsProcess (line 30) | func (i Isolation) IsProcess() bool {
method IsValid (line 35) | func (i Isolation) IsValid() bool {
method NetworkName (line 40) | func (n NetworkMode) NetworkName() string {
FILE: vendor/github.com/docker/docker/api/types/error_response.go
type ErrorResponse (line 8) | type ErrorResponse struct
FILE: vendor/github.com/docker/docker/api/types/events/events.go
constant ContainerEventType (line 5) | ContainerEventType = "container"
constant DaemonEventType (line 7) | DaemonEventType = "daemon"
constant ImageEventType (line 9) | ImageEventType = "image"
constant NetworkEventType (line 11) | NetworkEventType = "network"
constant PluginEventType (line 13) | PluginEventType = "plugin"
constant VolumeEventType (line 15) | VolumeEventType = "volume"
type Actor (line 23) | type Actor struct
type Message (line 29) | type Message struct
FILE: vendor/github.com/docker/docker/api/types/filters/parse.go
type Args (line 21) | type Args struct
method Get (line 122) | func (filters Args) Get(field string) []string {
method Add (line 135) | func (filters Args) Add(name, value string) {
method Del (line 144) | func (filters Args) Del(name, value string) {
method Len (line 154) | func (filters Args) Len() int {
method MatchKVList (line 163) | func (filters Args) MatchKVList(field string, sources map[string]strin...
method Match (line 194) | func (filters Args) Match(field, source string) bool {
method ExactMatch (line 213) | func (filters Args) ExactMatch(field, source string) bool {
method UniqueExactMatch (line 225) | func (filters Args) UniqueExactMatch(field, source string) bool {
method FuzzyMatch (line 241) | func (filters Args) FuzzyMatch(field, source string) bool {
method Include (line 256) | func (filters Args) Include(field string) bool {
method Validate (line 263) | func (filters Args) Validate(accepted map[string]bool) error {
method WalkValues (line 274) | func (filters Args) WalkValues(field string, op func(value string) err...
function NewArgs (line 26) | func NewArgs() Args {
function ParseFlag (line 36) | func ParseFlag(arg string, prev Args) (Args, error) {
function ToParam (line 60) | func ToParam(a Args) (string, error) {
function ToParamWithVersion (line 75) | func ToParamWithVersion(version string, a Args) (string, error) {
function FromParam (line 96) | func FromParam(p string) (Args, error) {
function deprecatedArgs (line 286) | func deprecatedArgs(d map[string][]string) map[string]map[string]bool {
function convertArgsToSlice (line 298) | func convertArgsToSlice(f map[string]map[string]bool) map[string][]string {
FILE: vendor/github.com/docker/docker/api/types/graph_driver_data.go
type GraphDriverData (line 8) | type GraphDriverData struct
FILE: vendor/github.com/docker/docker/api/types/id_response.go
type IDResponse (line 8) | type IDResponse struct
FILE: vendor/github.com/docker/docker/api/types/image/image_history.go
type HistoryResponseItem (line 12) | type HistoryResponseItem struct
FILE: vendor/github.com/docker/docker/api/types/image_delete_response_item.go
type ImageDeleteResponseItem (line 8) | type ImageDeleteResponseItem struct
FILE: vendor/github.com/docker/docker/api/types/image_summary.go
type ImageSummary (line 8) | type ImageSummary struct
FILE: vendor/github.com/docker/docker/api/types/mount/mount.go
type Type (line 8) | type Type
constant TypeBind (line 13) | TypeBind Type = "bind"
constant TypeVolume (line 15) | TypeVolume Type = "volume"
constant TypeTmpfs (line 17) | TypeTmpfs Type = "tmpfs"
type Mount (line 21) | type Mount struct
type Propagation (line 37) | type Propagation
constant PropagationRPrivate (line 41) | PropagationRPrivate Propagation = "rprivate"
constant PropagationPrivate (line 43) | PropagationPrivate Propagation = "private"
constant PropagationRShared (line 45) | PropagationRShared Propagation = "rshared"
constant PropagationShared (line 47) | PropagationShared Propagation = "shared"
constant PropagationRSlave (line 49) | PropagationRSlave Propagation = "rslave"
constant PropagationSlave (line 51) | PropagationSlave Propagation = "slave"
type Consistency (line 65) | type Consistency
constant ConsistencyFull (line 69) | ConsistencyFull Consistency = "consistent"
constant ConsistencyCached (line 71) | ConsistencyCached Consistency = "cached"
constant ConsistencyDelegated (line 73) | ConsistencyDelegated Consistency = "delegated"
constant ConsistencyDefault (line 75) | ConsistencyDefault Consistency = "default"
type BindOptions (line 79) | type BindOptions struct
type VolumeOptions (line 84) | type VolumeOptions struct
type Driver (line 91) | type Driver struct
type TmpfsOptions (line 97) | type TmpfsOptions struct
FILE: vendor/github.com/docker/docker/api/types/network/network.go
type Address (line 4) | type Address struct
type IPAM (line 10) | type IPAM struct
type IPAMConfig (line 17) | type IPAMConfig struct
type EndpointIPAMConfig (line 25) | type EndpointIPAMConfig struct
method Copy (line 32) | func (cfg *EndpointIPAMConfig) Copy() *EndpointIPAMConfig {
type PeerInfo (line 40) | type PeerInfo struct
type EndpointSettings (line 46) | type EndpointSettings struct
method Copy (line 80) | func (es *EndpointSettings) Copy() *EndpointSettings {
type Task (line 64) | type Task struct
type ServiceInfo (line 72) | type ServiceInfo struct
type NetworkingConfig (line 100) | type NetworkingConfig struct
FILE: vendor/github.com/docker/docker/api/types/plugin.go
type Plugin (line 8) | type Plugin struct
type PluginConfig (line 35) | type PluginConfig struct
type PluginConfigArgs (line 101) | type PluginConfigArgs struct
type PluginConfigInterface (line 122) | type PluginConfigInterface struct
type PluginConfigLinux (line 135) | type PluginConfigLinux struct
type PluginConfigNetwork (line 152) | type PluginConfigNetwork struct
type PluginConfigRootfs (line 161) | type PluginConfigRootfs struct
type PluginConfigUser (line 172) | type PluginConfigUser struct
type PluginSettings (line 183) | type PluginSettings struct
FILE: vendor/github.com/docker/docker/api/types/plugin_device.go
type PluginDevice (line 8) | type PluginDevice struct
FILE: vendor/github.com/docker/docker/api/types/plugin_env.go
type PluginEnv (line 8) | type PluginEnv struct
FILE: vendor/github.com/docker/docker/api/types/plugin_interface_type.go
type PluginInterfaceType (line 8) | type PluginInterfaceType struct
FILE: vendor/github.com/docker/docker/api/types/plugin_mount.go
type PluginMount (line 8) | type PluginMount struct
FILE: vendor/github.com/docker/docker/api/types/plugin_responses.go
type PluginsListResponse (line 10) | type PluginsListResponse
constant authzDriver (line 13) | authzDriver = "AuthzDriver"
constant graphDriver (line 14) | graphDriver = "GraphDriver"
constant ipamDriver (line 15) | ipamDriver = "IpamDriver"
constant networkDriver (line 16) | networkDriver = "NetworkDriver"
constant volumeDriver (line 17) | volumeDriver = "VolumeDriver"
method UnmarshalJSON (line 21) | func (t *PluginInterfaceType) UnmarshalJSON(p []byte) error {
method MarshalJSON (line 47) | func (t *PluginInterfaceType) MarshalJSON() ([]byte, error) {
method String (line 52) | func (t PluginInterfaceType) String() string {
type PluginPrivilege (line 58) | type PluginPrivilege struct
type PluginPrivileges (line 65) | type PluginPrivileges
method Len (line 67) | func (s PluginPrivileges) Len() int {
method Less (line 71) | func (s PluginPrivileges) Less(i, j int) bool {
method Swap (line 75) | func (s PluginPrivileges) Swap(i, j int) {
FILE: vendor/github.com/docker/docker/api/types/port.go
type Port (line 8) | type Port struct
FILE: vendor/github.com/docker/docker/api/types/registry/authenticate.go
type AuthenticateOKBody (line 12) | type AuthenticateOKBody struct
FILE: vendor/github.com/docker/docker/api/types/registry/registry.go
type ServiceConfig (line 9) | type ServiceConfig struct
type NetIPNet (line 17) | type NetIPNet
method String (line 20) | func (ipnet *NetIPNet) String() string {
method MarshalJSON (line 25) | func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 30) | func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
type IndexInfo (line 69) | type IndexInfo struct
type SearchResult (line 83) | type SearchResult struct
type SearchResults (line 97) | type SearchResults struct
FILE: vendor/github.com/docker/docker/api/types/seccomp.go
type Seccomp (line 4) | type Seccomp struct
type Architecture (line 15) | type Architecture struct
type Arch (line 21) | type Arch
constant ArchX86 (line 26) | ArchX86 Arch = "SCMP_ARCH_X86"
constant ArchX86_64 (line 27) | ArchX86_64 Arch = "SCMP_ARCH_X86_64"
constant ArchX32 (line 28) | ArchX32 Arch = "SCMP_ARCH_X32"
constant ArchARM (line 29) | ArchARM Arch = "SCMP_ARCH_ARM"
constant ArchAARCH64 (line 30) | ArchAARCH64 Arch = "SCMP_ARCH_AARCH64"
constant ArchMIPS (line 31) | ArchMIPS Arch = "SCMP_ARCH_MIPS"
constant ArchMIPS64 (line 32) | ArchMIPS64 Arch = "SCMP_ARCH_MIPS64"
constant ArchMIPS64N32 (line 33) | ArchMIPS64N32 Arch = "SCMP_ARCH_MIPS64N32"
constant ArchMIPSEL (line 34) | ArchMIPSEL Arch = "SCMP_ARCH_MIPSEL"
constant ArchMIPSEL64 (line 35) | ArchMIPSEL64 Arch = "SCMP_ARCH_MIPSEL64"
constant ArchMIPSEL64N32 (line 36) | ArchMIPSEL64N32 Arch = "SCMP_ARCH_MIPSEL64N32"
constant ArchPPC (line 37) | ArchPPC Arch = "SCMP_ARCH_PPC"
constant ArchPPC64 (line 38) | ArchPPC64 Arch = "SCMP_ARCH_PPC64"
constant ArchPPC64LE (line 39) | ArchPPC64LE Arch = "SCMP_ARCH_PPC64LE"
constant ArchS390 (line 40) | ArchS390 Arch = "SCMP_ARCH_S390"
constant ArchS390X (line 41) | ArchS390X Arch = "SCMP_ARCH_S390X"
type Action (line 45) | type Action
constant ActKill (line 49) | ActKill Action = "SCMP_ACT_KILL"
constant ActTrap (line 50) | ActTrap Action = "SCMP_ACT_TRAP"
constant ActErrno (line 51) | ActErrno Action = "SCMP_ACT_ERRNO"
constant ActTrace (line 52) | ActTrace Action = "SCMP_ACT_TRACE"
constant ActAllow (line 53) | ActAllow Action = "SCMP_ACT_ALLOW"
type Operator (line 57) | type Operator
constant OpNotEqual (line 61) | OpNotEqual Operator = "SCMP_CMP_NE"
constant OpLessThan (line 62) | OpLessThan Operator = "SCMP_CMP_LT"
constant OpLessEqual (line 63) | OpLessEqual Operator = "SCMP_CMP_LE"
constant OpEqualTo (line 64) | OpEqualTo Operator = "SCMP_CMP_EQ"
constant OpGreaterEqual (line 65) | OpGreaterEqual Operator = "SCMP_CMP_GE"
constant OpGreaterThan (line 66) | OpGreaterThan Operator = "SCMP_CMP_GT"
constant OpMaskedEqual (line 67) | OpMaskedEqual Operator = "SCMP_CMP_MASKED_EQ"
type Arg (line 71) | type Arg struct
type Filter (line 79) | type Filter struct
type Syscall (line 85) | type Syscall struct
FILE: vendor/github.com/docker/docker/api/types/service_update_response.go
type ServiceUpdateResponse (line 8) | type ServiceUpdateResponse struct
FILE: vendor/github.com/docker/docker/api/types/stats.go
type ThrottlingData (line 9) | type ThrottlingData struct
type CPUUsage (line 19) | type CPUUsage struct
type CPUStats (line 43) | type CPUStats struct
type MemoryStats (line 59) | type MemoryStats struct
type BlkioStatEntry (line 86) | type BlkioStatEntry struct
type BlkioStats (line 97) | type BlkioStats struct
type StorageStats (line 110) | type StorageStats struct
type NetworkStats (line 118) | type NetworkStats struct
type PidsStats (line 144) | type PidsStats struct
type Stats (line 153) | type Stats struct
type StatsJSON (line 173) | type StatsJSON struct
FILE: vendor/github.com/docker/docker/api/types/strslice/strslice.go
type StrSlice (line 7) | type StrSlice
method UnmarshalJSON (line 11) | func (e *StrSlice) UnmarshalJSON(b []byte) error {
FILE: vendor/github.com/docker/docker/api/types/swarm/common.go
type Version (line 6) | type Version struct
type Meta (line 11) | type Meta struct
type Annotations (line 18) | type Annotations struct
type Driver (line 24) | type Driver struct
FILE: vendor/github.com/docker/docker/api/types/swarm/container.go
type DNSConfig (line 15) | type DNSConfig struct
type SELinuxContext (line 25) | type SELinuxContext struct
type CredentialSpec (line 35) | type CredentialSpec struct
type Privileges (line 41) | type Privileges struct
type ContainerSpec (line 47) | type ContainerSpec struct
FILE: vendor/github.com/docker/docker/api/types/swarm/network.go
type Endpoint (line 4) | type Endpoint struct
type EndpointSpec (line 11) | type EndpointSpec struct
type ResolutionMode (line 17) | type ResolutionMode
constant ResolutionModeVIP (line 21) | ResolutionModeVIP ResolutionMode = "vip"
constant ResolutionModeDNSRR (line 23) | ResolutionModeDNSRR ResolutionMode = "dnsrr"
type PortConfig (line 27) | type PortConfig struct
type PortConfigPublishMode (line 40) | type PortConfigPublishMode
constant PortConfigPublishModeIngress (line 45) | PortConfigPublishModeIngress PortConfigPublishMode = "ingress"
constant PortConfigPublishModeHost (line 48) | PortConfigPublishModeHost PortConfigPublishMode = "host"
type PortConfigProtocol (line 52) | type PortConfigProtocol
constant PortConfigProtocolTCP (line 58) | PortConfigProtocolTCP PortConfigProtocol = "tcp"
constant PortConfigProtocolUDP (line 60) | PortConfigProtocolUDP PortConfigProtocol = "udp"
type EndpointVirtualIP (line 64) | type EndpointVirtualIP struct
type Network (line 70) | type Network struct
type NetworkSpec (line 79) | type NetworkSpec struct
type NetworkAttachmentConfig (line 90) | type NetworkAttachmentConfig struct
type NetworkAttachment (line 96) | type NetworkAttachment struct
type IPAMOptions (line 102) | type IPAMOptions struct
type IPAMConfig (line 108) | type IPAMConfig struct
FILE: vendor/github.com/docker/docker/api/types/swarm/node.go
type Node (line 4) | type Node struct
type NodeSpec (line 21) | type NodeSpec struct
type NodeRole (line 28) | type NodeRole
constant NodeRoleWorker (line 32) | NodeRoleWorker NodeRole = "worker"
constant NodeRoleManager (line 34) | NodeRoleManager NodeRole = "manager"
type NodeAvailability (line 38) | type NodeAvailability
constant NodeAvailabilityActive (line 42) | NodeAvailabilityActive NodeAvailability = "active"
constant NodeAvailabilityPause (line 44) | NodeAvailabilityPause NodeAvailability = "pause"
constant NodeAvailabilityDrain (line 46) | NodeAvailabilityDrain NodeAvailability = "drain"
type NodeDescription (line 50) | type NodeDescription struct
type Platform (line 58) | type Platform struct
type EngineDescription (line 64) | type EngineDescription struct
type PluginDescription (line 71) | type PluginDescription struct
type NodeStatus (line 77) | type NodeStatus struct
type Reachability (line 84) | type Reachability
constant ReachabilityUnknown (line 88) | ReachabilityUnknown Reachability = "unknown"
constant ReachabilityUnreachable (line 90) | ReachabilityUnreachable Reachability = "unreachable"
constant ReachabilityReachable (line 92) | ReachabilityReachable Reachability = "reachable"
type ManagerStatus (line 96) | type ManagerStatus struct
type NodeState (line 103) | type NodeState
constant NodeStateUnknown (line 107) | NodeStateUnknown NodeState = "unknown"
constant NodeStateDown (line 109) | NodeStateDown NodeState = "down"
constant NodeStateReady (line 111) | NodeStateReady NodeState = "ready"
constant NodeStateDisconnected (line 113) | NodeStateDisconnected NodeState = "disconnected"
FILE: vendor/github.com/docker/docker/api/types/swarm/runtime.go
type RuntimeType (line 4) | type RuntimeType
type RuntimeURL (line 7) | type RuntimeURL
constant RuntimeContainer (line 11) | RuntimeContainer RuntimeType = "container"
constant RuntimePlugin (line 13) | RuntimePlugin RuntimeType = "plugin"
constant RuntimeURLContainer (line 16) | RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer"
constant RuntimeURLPlugin (line 18) | RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin"
FILE: vendor/github.com/docker/docker/api/types/swarm/secret.go
type Secret (line 6) | type Secret struct
type SecretSpec (line 13) | type SecretSpec struct
type SecretReferenceFileTarget (line 19) | type SecretReferenceFileTarget struct
type SecretReference (line 27) | type SecretReference struct
FILE: vendor/github.com/docker/docker/api/types/swarm/service.go
type Service (line 6) | type Service struct
type ServiceSpec (line 16) | type ServiceSpec struct
type ServiceMode (line 34) | type ServiceMode struct
type UpdateState (line 40) | type UpdateState
constant UpdateStateUpdating (line 44) | UpdateStateUpdating UpdateState = "updating"
constant UpdateStatePaused (line 46) | UpdateStatePaused UpdateState = "paused"
constant UpdateStateCompleted (line 48) | UpdateStateCompleted UpdateState = "completed"
constant UpdateStateRollbackStarted (line 50) | UpdateStateRollbackStarted UpdateState = "rollback_started"
constant UpdateStateRollbackPaused (line 52) | UpdateStateRollbackPaused UpdateState = "rollback_paused"
constant UpdateStateRollbackCompleted (line 54) | UpdateStateRollbackCompleted UpdateState = "rollback_completed"
type UpdateStatus (line 58) | type UpdateStatus struct
type ReplicatedService (line 66) | type ReplicatedService struct
type GlobalService (line 71) | type GlobalService struct
constant UpdateFailureActionPause (line 75) | UpdateFailureActionPause = "pause"
constant UpdateFailureActionContinue (line 77) | UpdateFailureActionContinue = "continue"
constant UpdateFailureActionRollback (line 79) | UpdateFailureActionRollback = "rollback"
constant UpdateOrderStopFirst (line 82) | UpdateOrderStopFirst = "stop-first"
constant UpdateOrderStartFirst (line 84) | UpdateOrderStartFirst = "start-first"
type UpdateConfig (line 88) | type UpdateConfig struct
FILE: vendor/github.com/docker/docker/api/types/swarm/swarm.go
type ClusterInfo (line 7) | type ClusterInfo struct
type Swarm (line 14) | type Swarm struct
type JoinTokens (line 20) | type JoinTokens struct
type Spec (line 28) | type Spec struct
type OrchestrationConfig (line 40) | type OrchestrationConfig struct
type TaskDefaults (line 47) | type TaskDefaults struct
type EncryptionConfig (line 58) | type EncryptionConfig struct
type RaftConfig (line 66) | type RaftConfig struct
type DispatcherConfig (line 96) | type DispatcherConfig struct
type CAConfig (line 103) | type CAConfig struct
type ExternalCAProtocol (line 113) | type ExternalCAProtocol
constant ExternalCAProtocolCFSSL (line 116) | ExternalCAProtocolCFSSL ExternalCAProtocol = "cfssl"
type ExternalCA (line 119) | type ExternalCA struct
type InitRequest (line 132) | type InitRequest struct
type JoinRequest (line 142) | type JoinRequest struct
type UnlockRequest (line 151) | type UnlockRequest struct
type LocalNodeState (line 157) | type LocalNodeState
constant LocalNodeStateInactive (line 161) | LocalNodeStateInactive LocalNodeState = "inactive"
constant LocalNodeStatePending (line 163) | LocalNodeStatePending LocalNodeState = "pending"
constant LocalNodeStateActive (line 165) | LocalNodeStateActive LocalNodeState = "active"
constant LocalNodeStateError (line 167) | LocalNodeStateError LocalNodeState = "error"
constant LocalNodeStateLocked (line 169) | LocalNodeStateLocked LocalNodeState = "locked"
type Info (line 173) | type Info struct
type Peer (line 189) | type Peer struct
type UpdateFlags (line 195) | type UpdateFlags struct
FILE: vendor/github.com/docker/docker/api/types/swarm/task.go
type TaskState (line 6) | type TaskState
constant TaskStateNew (line 10) | TaskStateNew TaskState = "new"
constant TaskStateAllocated (line 12) | TaskStateAllocated TaskState = "allocated"
constant TaskStatePending (line 14) | TaskStatePending TaskState = "pending"
constant TaskStateAssigned (line 16) | TaskStateAssigned TaskState = "assigned"
constant TaskStateAccepted (line 18) | TaskStateAccepted TaskState = "accepted"
constant TaskStatePreparing (line 20) | TaskStatePreparing TaskState = "preparing"
constant TaskStateReady (line 22) | TaskStateReady TaskState = "ready"
constant TaskStateStarting (line 24) | TaskStateStarting TaskState = "starting"
constant TaskStateRunning (line 26) | TaskStateRunning TaskState = "running"
constant TaskStateComplete (line 28) | TaskStateComplete TaskState = "complete"
constant TaskStateShutdown (line 30) | TaskStateShutdown TaskState = "shutdown"
constant TaskStateFailed (line 32) | TaskStateFailed TaskState = "failed"
constant TaskStateRejected (line 34) | TaskStateRejected TaskState = "rejected"
type Task (line 38) | type Task struct
type TaskSpec (line 53) | type TaskSpec struct
type Resources (line 76) | type Resources struct
type ResourceRequirements (line 82) | type ResourceRequirements struct
type Placement (line 88) | type Placement struct
type PlacementPreference (line 95) | type PlacementPreference struct
type SpreadOver (line 101) | type SpreadOver struct
type RestartPolicy (line 107) | type RestartPolicy struct
type RestartPolicyCondition (line 115) | type RestartPolicyCondition
constant RestartPolicyConditionNone (line 119) | RestartPolicyConditionNone RestartPolicyCondition = "none"
constant RestartPolicyConditionOnFailure (line 121) | RestartPolicyConditionOnFailure RestartPolicyCondition = "on-failure"
constant RestartPolicyConditionAny (line 123) | RestartPolicyConditionAny RestartPolicyCondition = "any"
type TaskStatus (line 127) | type TaskStatus struct
type ContainerStatus (line 137) | type ContainerStatus struct
type PortStatus (line 145) | type PortStatus struct
FILE: vendor/github.com/docker/docker/api/types/time/duration_convert.go
function DurationToSecondsString (line 10) | func DurationToSecondsString(duration time.Duration) string {
FILE: vendor/github.com/docker/docker/api/types/time/timestamp.go
constant rFC3339Local (line 14) | rFC3339Local = "2006-01-02T15:04:05"
constant rFC3339NanoLocal (line 15) | rFC3339NanoLocal = "2006-01-02T15:04:05.999999999"
constant dateWithZone (line 16) | dateWithZone = "2006-01-02Z07:00"
constant dateLocal (line 17) | dateLocal = "2006-01-02"
function GetTimestamp (line 26) | func GetTimestamp(value string, reference time.Time) (string, error) {
function ParseTimestamps (line 105) | func ParseTimestamps(value string, def int64) (int64, int64, error) {
FILE: vendor/github.com/docker/docker/api/types/types.go
type RootFS (line 21) | type RootFS struct
type ImageInspect (line 29) | type ImageInspect struct
type Container (line 52) | type Container struct
type CopyConfig (line 74) | type CopyConfig struct
type ContainerPathStat (line 81) | type ContainerPathStat struct
type ContainerStats (line 91) | type ContainerStats struct
type Ping (line 98) | type Ping struct
type Version (line 106) | type Version struct
type Commit (line 121) | type Commit struct
type Info (line 128) | type Info struct
type KeyValue (line 191) | type KeyValue struct
type SecurityOpt (line 196) | type SecurityOpt struct
function DecodeSecurityOptions (line 203) | func DecodeSecurityOptions(opts []string) ([]SecurityOpt, error) {
type PluginsInfo (line 234) | type PluginsInfo struct
type ExecStartCheck (line 245) | type ExecStartCheck struct
type HealthcheckResult (line 253) | type HealthcheckResult struct
constant NoHealthcheck (line 262) | NoHealthcheck = "none"
constant Starting (line 263) | Starting = "starting"
constant Healthy (line 264) | Healthy = "healthy"
constant Unhealthy (line 265) | Unhealthy = "unhealthy"
type Health (line 269) | type Health struct
type ContainerState (line 277) | type ContainerState struct
type ContainerNode (line 294) | type ContainerNode struct
type ContainerJSONBase (line 306) | type ContainerJSONBase struct
type ContainerJSON (line 332) | type ContainerJSON struct
type NetworkSettings (line 340) | type NetworkSettings struct
type SummaryNetworkSettings (line 348) | type SummaryNetworkSettings struct
type NetworkSettingsBase (line 353) | type NetworkSettingsBase struct
type DefaultNetworkSettings (line 368) | type DefaultNetworkSettings struct
type MountPoint (line 381) | type MountPoint struct
type NetworkResource (line 393) | type NetworkResource struct
type EndpointResource (line 412) | type EndpointResource struct
type NetworkCreate (line 421) | type NetworkCreate struct
type NetworkCreateRequest (line 441) | type NetworkCreateRequest struct
type NetworkCreateResponse (line 447) | type NetworkCreateResponse struct
type NetworkConnect (line 453) | type NetworkConnect struct
type NetworkDisconnect (line 459) | type NetworkDisconnect struct
type Checkpoint (line 465) | type Checkpoint struct
type Runtime (line 470) | type Runtime struct
type DiskUsage (line 477) | type DiskUsage struct
type ContainersPruneReport (line 486) | type ContainersPruneReport struct
type VolumesPruneReport (line 493) | type VolumesPruneReport struct
type ImagesPruneReport (line 500) | type ImagesPruneReport struct
type NetworksPruneReport (line 507) | type NetworksPruneReport struct
type SecretCreateResponse (line 513) | type SecretCreateResponse struct
type SecretListOptions (line 519) | type SecretListOptions struct
type PushResult (line 526) | type PushResult struct
FILE: vendor/github.com/docker/docker/api/types/versions/compare.go
function compare (line 10) | func compare(v1, v2 string) int {
function LessThan (line 40) | func LessThan(v, other string) bool {
function LessThanOrEqualTo (line 45) | func LessThanOrEqualTo(v, other string) bool {
function GreaterThan (line 50) | func GreaterThan(v, other string) bool {
function GreaterThanOrEqualTo (line 55) | func GreaterThanOrEqualTo(v, other string) bool {
function Equal (line 60) | func Equal(v, other string) bool {
FILE: vendor/github.com/docker/docker/api/types/volume.go
type Volume (line 8) | type Volume struct
type VolumeUsageData (line 49) | type VolumeUsageData struct
FILE: vendor/github.com/docker/docker/api/types/volume/volumes_create.go
type VolumesCreateBody (line 12) | type VolumesCreateBody struct
FILE: vendor/github.com/docker/docker/api/types/volume/volumes_list.go
type VolumesListOKBody (line 14) | type VolumesListOKBody struct
FILE: vendor/github.com/docker/docker/client/checkpoint_create.go
method CheckpointCreate (line 9) | func (cli *Client) CheckpointCreate(ctx context.Context, container strin...
FILE: vendor/github.com/docker/docker/client/checkpoint_delete.go
method CheckpointDelete (line 11) | func (cli *Client) CheckpointDelete(ctx context.Context, containerID str...
FILE: vendor/github.com/docker/docker/client/checkpoint_list.go
method CheckpointList (line 13) | func (cli *Client) CheckpointList(ctx context.Context, container string,...
FILE: vendor/github.com/docker/docker/client/client.go
type Client (line 63) | type Client struct
method Close (line 181) | func (cli *Client) Close() error {
method getAPIPath (line 192) | func (cli *Client) getAPIPath(p string, query url.Values) string {
method ClientVersion (line 214) | func (cli *Client) ClientVersion() string {
method UpdateClientVersion (line 220) | func (cli *Client) UpdateClientVersion(v string) {
method CustomHTTPHeaders (line 249) | func (cli *Client) CustomHTTPHeaders() map[string]string {
method SetCustomHTTPHeaders (line 259) | func (cli *Client) SetCustomHTTPHeaders(headers map[string]string) {
function NewEnvClient (line 89) | func NewEnvClient() (*Client, error) {
function NewClient (line 136) | func NewClient(host string, version string, client *http.Client, httpHea...
function ParseHost (line 228) | func ParseHost(host string) (string, string, string, error) {
FILE: vendor/github.com/docker/docker/client/client_unix.go
constant DefaultDockerHost (line 6) | DefaultDockerHost = "unix:///var/run/docker.sock"
FILE: vendor/github.com/docker/docker/client/client_windows.go
constant DefaultDockerHost (line 4) | DefaultDockerHost = "npipe:////./pipe/docker_engine"
FILE: vendor/github.com/docker/docker/client/container_attach.go
method ContainerAttach (line 14) | func (cli *Client) ContainerAttach(ctx context.Context, container string...
FILE: vendor/github.com/docker/docker/client/container_commit.go
method ContainerCommit (line 14) | func (cli *Client) ContainerCommit(ctx context.Context, container string...
FILE: vendor/github.com/docker/docker/client/container_copy.go
method ContainerStatPath (line 19) | func (cli *Client) ContainerStatPath(ctx context.Context, containerID, p...
method CopyToContainer (line 33) | func (cli *Client) CopyToContainer(ctx context.Context, container, path ...
method CopyFromContainer (line 62) | func (cli *Client) CopyFromContainer(ctx context.Context, container, src...
function getContainerPathStatFromHeader (line 89) | func getContainerPathStatFromHeader(header http.Header) (types.Container...
FILE: vendor/github.com/docker/docker/client/container_create.go
type configWrapper (line 14) | type configWrapper struct
method ContainerCreate (line 22) | func (cli *Client) ContainerCreate(ctx context.Context, config *containe...
FILE: vendor/github.com/docker/docker/client/container_diff.go
method ContainerDiff (line 12) | func (cli *Client) ContainerDiff(ctx context.Context, containerID string...
FILE: vendor/github.com/docker/docker/client/container_exec.go
method ContainerExecCreate (line 11) | func (cli *Client) ContainerExecCreate(ctx context.Context, container st...
method ContainerExecStart (line 28) | func (cli *Client) ContainerExecStart(ctx context.Context, execID string...
method ContainerExecAttach (line 38) | func (cli *Client) ContainerExecAttach(ctx context.Context, execID strin...
method ContainerExecInspect (line 44) | func (cli *Client) ContainerExecInspect(ctx context.Context, execID stri...
FILE: vendor/github.com/docker/docker/client/container_export.go
method ContainerExport (line 13) | func (cli *Client) ContainerExport(ctx context.Context, containerID stri...
FILE: vendor/github.com/docker/docker/client/container_inspect.go
method ContainerInspect (line 15) | func (cli *Client) ContainerInspect(ctx context.Context, containerID str...
method ContainerInspectWithRaw (line 31) | func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containe...
FILE: vendor/github.com/docker/docker/client/container_kill.go
method ContainerKill (line 10) | func (cli *Client) ContainerKill(ctx context.Context, containerID, signa...
FILE: vendor/github.com/docker/docker/client/container_list.go
method ContainerList (line 14) | func (cli *Client) ContainerList(ctx context.Context, options types.Cont...
FILE: vendor/github.com/docker/docker/client/container_logs.go
method ContainerLogs (line 16) | func (cli *Client) ContainerLogs(ctx context.Context, container string, ...
FILE: vendor/github.com/docker/docker/client/container_pause.go
method ContainerPause (line 6) | func (cli *Client) ContainerPause(ctx context.Context, containerID strin...
FILE: vendor/github.com/docker/docker/client/container_prune.go
method ContainersPrune (line 13) | func (cli *Client) ContainersPrune(ctx context.Context, pruneFilters fil...
FILE: vendor/github.com/docker/docker/client/container_remove.go
method ContainerRemove (line 11) | func (cli *Client) ContainerRemove(ctx context.Context, containerID stri...
FILE: vendor/github.com/docker/docker/client/container_rename.go
method ContainerRename (line 10) | func (cli *Client) ContainerRename(ctx context.Context, containerID, new...
FILE: vendor/github.com/docker/docker/client/container_resize.go
method ContainerResize (line 12) | func (cli *Client) ContainerResize(ctx context.Context, containerID stri...
method ContainerExecResize (line 17) | func (cli *Client) ContainerExecResize(ctx context.Context, execID strin...
method resize (line 21) | func (cli *Client) resize(ctx context.Context, basePath string, height, ...
FILE: vendor/github.com/docker/docker/client/container_restart.go
method ContainerRestart (line 14) | func (cli *Client) ContainerRestart(ctx context.Context, containerID str...
FILE: vendor/github.com/docker/docker/client/container_start.go
method ContainerStart (line 12) | func (cli *Client) ContainerStart(ctx context.Context, containerID strin...
FILE: vendor/github.com/docker/docker/client/container_stats.go
method ContainerStats (line 12) | func (cli *Client) ContainerStats(ctx context.Context, containerID strin...
FILE: vendor/github.com/docker/docker/client/container_stop.go
method ContainerStop (line 13) | func (cli *Client) ContainerStop(ctx context.Context, containerID string...
FILE: vendor/github.com/docker/docker/client/container_top.go
method ContainerTop (line 13) | func (cli *Client) ContainerTop(ctx context.Context, containerID string,...
FILE: vendor/github.com/docker/docker/client/container_unpause.go
method ContainerUnpause (line 6) | func (cli *Client) ContainerUnpause(ctx context.Context, containerID str...
FILE: vendor/github.com/docker/docker/client/container_update.go
method ContainerUpdate (line 11) | func (cli *Client) ContainerUpdate(ctx context.Context, containerID stri...
FILE: vendor/github.com/docker/docker/client/container_wait.go
method ContainerWait (line 13) | func (cli *Client) ContainerWait(ctx context.Context, containerID string...
FILE: vendor/github.com/docker/docker/client/disk_usage.go
method DiskUsage (line 12) | func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, erro...
FILE: vendor/github.com/docker/docker/client/errors.go
type errConnectionFailed (line 11) | type errConnectionFailed struct
method Error (line 16) | func (err errConnectionFailed) Error() string {
function IsErrConnectionFailed (line 24) | func IsErrConnectionFailed(err error) bool {
function ErrorConnectionFailed (line 30) | func ErrorConnectionFailed(host string) error {
type notFound (line 34) | type notFound interface
function IsErrNotFound (line 41) | func IsErrNotFound(err error) bool {
type imageNotFoundError (line 47) | type imageNotFoundError struct
method NotFound (line 52) | func (e imageNotFoundError) NotFound() bool {
method Error (line 57) | func (e imageNotFoundError) Error() string {
function IsErrImageNotFound (line 63) | func IsErrImageNotFound(err error) bool {
type containerNotFoundError (line 68) | type containerNotFoundError struct
method NotFound (line 73) | func (e containerNotFoundError) NotFound() bool {
method Error (line 78) | func (e containerNotFoundError) Error() string {
function IsErrContainerNotFound (line 84) | func IsErrContainerNotFound(err error) bool {
type networkNotFoundError (line 89) | type networkNotFoundError struct
method NotFound (line 94) | func (e networkNotFoundError) NotFound() bool {
method Error (line 99) | func (e networkNotFoundError) Error() string {
function IsErrNetworkNotFound (line 105) | func IsErrNetworkNotFound(err error) bool {
type volumeNotFoundError (line 110) | type volumeNotFoundError struct
method NotFound (line 115) | func (e volumeNotFoundError) NotFound() bool {
method Error (line 120) | func (e volumeNotFoundError) Error() string {
function IsErrVolumeNotFound (line 126) | func IsErrVolumeNotFound(err error) bool {
type unauthorizedError (line 131) | type unauthorizedError struct
method Error (line 136) | func (u unauthorizedError) Error() string {
function IsErrUnauthorized (line 142) | func IsErrUnauthorized(err error) bool {
type nodeNotFoundError (line 148) | type nodeNotFoundError struct
method Error (line 153) | func (e nodeNotFoundError) Error() string {
method NotFound (line 158) | func (e nodeNotFoundError) NotFound() bool {
function IsErrNodeNotFound (line 164) | func IsErrNodeNotFound(err error) bool {
type serviceNotFoundError (line 170) | type serviceNotFoundError struct
method Error (line 175) | func (e serviceNotFoundError) Error() string {
method NotFound (line 180) | func (e serviceNotFoundError) NotFound() bool {
function IsErrServiceNotFound (line 186) | func IsErrServiceNotFound(err error) bool {
type taskNotFoundError (line 192) | type taskNotFoundError struct
method Error (line 197) | func (e taskNotFoundError) Error() string {
method NotFound (line 202) | func (e taskNotFoundError) NotFound() bool {
function IsErrTaskNotFound (line 208) | func IsErrTaskNotFound(err error) bool {
type pluginPermissionDenied (line 213) | type pluginPermissionDenied struct
method Error (line 217) | func (e pluginPermissionDenied) Error() string {
function IsErrPluginPermissionDenied (line 223) | func IsErrPluginPermissionDenied(err error) bool {
method NewVersionError (line 230) | func (cli *Client) NewVersionError(APIrequired, feature string) error {
type secretNotFoundError (line 238) | type secretNotFoundError struct
method Error (line 243) | func (e secretNotFoundError) Error() string {
method NotFound (line 248) | func (e secretNotFoundError) NotFound() bool {
function IsErrSecretNotFound (line 254) | func IsErrSecretNotFound(err error) bool {
type pluginNotFoundError (line 260) | type pluginNotFoundError struct
method NotFound (line 265) | func (e pluginNotFoundError) NotFound() bool {
method Error (line 270) | func (e pluginNotFoundError) Error() string {
function IsErrPluginNotFound (line 276) | func IsErrPluginNotFound(err error) bool {
FILE: vendor/github.com/docker/docker/client/events.go
method Events (line 20) | func (cli *Client) Events(ctx context.Context, options types.EventsOptio...
function buildEventsQueryParams (line 73) | func buildEventsQueryParams(cliVersion string, options types.EventsOptio...
FILE: vendor/github.com/docker/docker/client/hijack.go
type tlsClientCon (line 21) | type tlsClientCon struct
method CloseWrite (line 26) | func (c *tlsClientCon) CloseWrite() error {
method postHijacked (line 36) | func (cli *Client) postHijacked(ctx context.Context, path string, query ...
function tlsDial (line 82) | func tlsDial(network, addr string, config *tls.Config) (net.Conn, error) {
function tlsDialWithDialer (line 91) | func tlsDialWithDialer(dialer *net.Dialer, network, addr string, config ...
function dial (line 168) | func dial(proto, addr string, tlsConfig *tls.Config) (net.Conn, error) {
FILE: vendor/github.com/docker/docker/client/image_build.go
method ImageBuild (line 20) | func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reade...
method imageBuildOptionsToQuery (line 47) | func (cli *Client) imageBuildOptionsToQuery(options types.ImageBuildOpti...
FILE: vendor/github.com/docker/docker/client/image_create.go
method ImageCreate (line 15) | func (cli *Client) ImageCreate(ctx context.Context, parentReference stri...
method tryImageCreate (line 31) | func (cli *Client) tryImageCreate(ctx context.Context, query url.Values,...
FILE: vendor/github.com/docker/docker/client/image_history.go
method ImageHistory (line 12) | func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]...
FILE: vendor/github.com/docker/docker/client/image_import.go
method ImageImport (line 15) | func (cli *Client) ImageImport(ctx context.Context, source types.ImageIm...
FILE: vendor/github.com/docker/docker/client/image_inspect.go
method ImageInspectWithRaw (line 14) | func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID stri...
FILE: vendor/github.com/docker/docker/client/image_list.go
method ImageList (line 14) | func (cli *Client) ImageList(ctx context.Context, options types.ImageLis...
FILE: vendor/github.com/docker/docker/client/image_load.go
method ImageLoad (line 15) | func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet...
FILE: vendor/github.com/docker/docker/client/image_prune.go
method ImagesPrune (line 13) | func (cli *Client) ImagesPrune(ctx context.Context, pruneFilters filters...
FILE: vendor/github.com/docker/docker/client/image_pull.go
method ImagePull (line 22) | func (cli *Client) ImagePull(ctx context.Context, refStr string, options...
function getAPITagFromNamedRef (line 52) | func getAPITagFromNamedRef(ref reference.Named) string {
FILE: vendor/github.com/docker/docker/client/image_push.go
method ImagePush (line 19) | func (cli *Client) ImagePush(ctx context.Context, image string, options ...
method tryImagePush (line 53) | func (cli *Client) tryImagePush(ctx context.Context, imageID string, que...
FILE: vendor/github.com/docker/docker/client/image_remove.go
method ImageRemove (line 12) | func (cli *Client) ImageRemove(ctx context.Context, imageID string, opti...
FILE: vendor/github.com/docker/docker/client/image_save.go
method ImageSave (line 12) | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io...
FILE: vendor/github.com/docker/docker/client/image_search.go
method ImageSearch (line 17) | func (cli *Client) ImageSearch(ctx context.Context, term string, options...
method tryImageSearch (line 48) | func (cli *Client) tryImageSearch(ctx context.Context, query url.Values,...
FILE: vendor/github.com/docker/docker/client/image_tag.go
method ImageTag (line 12) | func (cli *Client) ImageTag(ctx context.Context, source, target string) ...
FILE: vendor/github.com/docker/docker/client/info.go
method Info (line 13) | func (cli *Client) Info(ctx context.Context) (types.Info, error) {
FILE: vendor/github.com/docker/docker/client/interface.go
type CommonAPIClient (line 20) | type CommonAPIClient interface
type ContainerAPIClient (line 37) | type ContainerAPIClient interface
type ImageAPIClient (line 72) | type ImageAPIClient interface
type NetworkAPIClient (line 90) | type NetworkAPIClient interface
type NodeAPIClient (line 102) | type NodeAPIClient interface
type PluginAPIClient (line 110) | type PluginAPIClient interface
type ServiceAPIClient (line 124) | type ServiceAPIClient interface
type SwarmAPIClient (line 137) | type SwarmAPIClient interface
type SystemAPIClient (line 148) | type SystemAPIClient interface
type VolumeAPIClient (line 157) | type VolumeAPIClient interface
type SecretAPIClient (line 167) | type SecretAPIClient interface
FILE: vendor/github.com/docker/docker/client/interface_experimental.go
type apiClientExperimental (line 8) | type apiClientExperimental interface
type CheckpointAPIClient (line 13) | type CheckpointAPIClient interface
FILE: vendor/github.com/docker/docker/client/interface_stable.go
type APIClient (line 4) | type APIClient interface
FILE: vendor/github.com/docker/docker/client/login.go
method RegistryLogin (line 15) | func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthCon...
FILE: vendor/github.com/docker/docker/client/network_connect.go
method NetworkConnect (line 10) | func (cli *Client) NetworkConnect(ctx context.Context, networkID, contai...
FILE: vendor/github.com/docker/docker/client/network_create.go
method NetworkCreate (line 11) | func (cli *Client) NetworkCreate(ctx context.Context, name string, optio...
FILE: vendor/github.com/docker/docker/client/network_disconnect.go
method NetworkDisconnect (line 9) | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, con...
FILE: vendor/github.com/docker/docker/client/network_inspect.go
method NetworkInspect (line 15) | func (cli *Client) NetworkInspect(ctx context.Context, networkID string,...
method NetworkInspectWithRaw (line 21) | func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID ...
FILE: vendor/github.com/docker/docker/client/network_list.go
method NetworkList (line 13) | func (cli *Client) NetworkList(ctx context.Context, options types.Networ...
FILE: vendor/github.com/docker/docker/client/network_prune.go
method NetworksPrune (line 13) | func (cli *Client) NetworksPrune(ctx context.Context, pruneFilters filte...
FILE: vendor/github.com/docker/docker/client/network_remove.go
method NetworkRemove (line 6) | func (cli *Client) NetworkRemove(ctx context.Context, networkID string) ...
FILE: vendor/github.com/docker/docker/client/node_inspect.go
method NodeInspectWithRaw (line 14) | func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string...
FILE: vendor/github.com/docker/docker/client/node_list.go
method NodeList (line 14) | func (cli *Client) NodeList(ctx context.Context, options types.NodeListO...
FILE: vendor/github.com/docker/docker/client/node_remove.go
method NodeRemove (line 12) | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, option...
FILE: vendor/github.com/docker/docker/client/node_update.go
method NodeUpdate (line 12) | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, versio...
FILE: vendor/github.com/docker/docker/client/ping.go
method Ping (line 11) | func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
FILE: vendor/github.com/docker/docker/client/plugin_create.go
method PluginCreate (line 13) | func (cli *Client) PluginCreate(ctx context.Context, createContext io.Re...
FILE: vendor/github.com/docker/docker/client/plugin_disable.go
method PluginDisable (line 11) | func (cli *Client) PluginDisable(ctx context.Context, name string, optio...
FILE: vendor/github.com/docker/docker/client/plugin_enable.go
method PluginEnable (line 12) | func (cli *Client) PluginEnable(ctx context.Context, name string, option...
FILE: vendor/github.com/docker/docker/client/plugin_inspect.go
method PluginInspectWithRaw (line 14) | func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string...
FILE: vendor/github.com/docker/docker/client/plugin_install.go
method PluginInstall (line 16) | func (cli *Client) PluginInstall(ctx context.Context, name string, optio...
method tryPluginPrivileges (line 69) | func (cli *Client) tryPluginPrivileges(ctx context.Context, query url.Va...
method tryPluginPull (line 74) | func (cli *Client) tryPluginPull(ctx context.Context, query url.Values, ...
method checkPluginPermissions (line 79) | func (cli *Client) checkPluginPermissions(ctx context.Context, query url...
FILE: vendor/github.com/docker/docker/client/plugin_list.go
method PluginList (line 13) | func (cli *Client) PluginList(ctx context.Context, filter filters.Args) ...
FILE: vendor/github.com/docker/docker/client/plugin_push.go
method PluginPush (line 10) | func (cli *Client) PluginPush(ctx context.Context, name string, registry...
FILE: vendor/github.com/docker/docker/client/plugin_remove.go
method PluginRemove (line 11) | func (cli *Client) PluginRemove(ctx context.Context, name string, option...
FILE: vendor/github.com/docker/docker/client/plugin_set.go
method PluginSet (line 8) | func (cli *Client) PluginSet(ctx context.Context, name string, args []st...
FILE: vendor/github.com/docker/docker/client/plugin_upgrade.go
method PluginUpgrade (line 15) | func (cli *Client) PluginUpgrade(ctx context.Context, name string, optio...
method tryPluginUpgrade (line 34) | func (cli *Client) tryPluginUpgrade(ctx context.Context, query url.Value...
FILE: vendor/github.com/docker/docker/client/request.go
type serverResponse (line 23) | type serverResponse struct
method head (line 30) | func (cli *Client) head(ctx context.Context, path string, query url.Valu...
method get (line 35) | func (cli *Client) get(ctx context.Context, path string, query url.Value...
method post (line 40) | func (cli *Client) post(ctx context.Context, path string, query url.Valu...
method postRaw (line 48) | func (cli *Client) postRaw(ctx context.Context, path string, query url.V...
method put (line 53) | func (cli *Client) put(ctx context.Context, path string, query url.Value...
method putRaw (line 62) | func (cli *Client) putRaw(ctx context.Context, path string, query url.Va...
method delete (line 67) | func (cli *Client) delete(ctx context.Context, path string, query url.Va...
type headers (line 71) | type headers
function encodeBody (line 73) | func encodeBody(obj interface{}, headers headers) (io.Reader, headers, e...
method buildRequest (line 89) | func (cli *Client) buildRequest(method, path string, body io.Reader, hea...
method sendRequest (line 116) | func (cli *Client) sendRequest(ctx context.Context, method, path string,...
method doRequest (line 124) | func (cli *Client) doRequest(ctx context.Context, req *http.Request) (se...
method addHeaders (line 213) | func (cli *Client) addHeaders(req *http.Request, headers headers) *http....
function encodeData (line 231) | func encodeData(data interface{}) (*bytes.Buffer, error) {
function ensureReaderClosed (line 241) | func ensureReaderClosed(response serverResponse) {
FILE: vendor/github.com/docker/docker/client/secret_create.go
method SecretCreate (line 12) | func (cli *Client) SecretCreate(ctx context.Context, secret swarm.Secret...
FILE: vendor/github.com/docker/docker/client/secret_inspect.go
method SecretInspectWithRaw (line 14) | func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) ...
FILE: vendor/github.com/docker/docker/client/secret_list.go
method SecretList (line 14) | func (cli *Client) SecretList(ctx context.Context, options types.SecretL...
FILE: vendor/github.com/docker/docker/client/secret_remove.go
method SecretRemove (line 6) | func (cli *Client) SecretRemove(ctx context.Context, id string) error {
FILE: vendor/github.com/docker/docker/client/secret_update.go
method SecretUpdate (line 12) | func (cli *Client) SecretUpdate(ctx context.Context, id string, version ...
FILE: vendor/github.com/docker/docker/client/service_create.go
method ServiceCreate (line 12) | func (cli *Client) ServiceCreate(ctx context.Context, service swarm.Serv...
FILE: vendor/github.com/docker/docker/client/service_inspect.go
method ServiceInspectWithRaw (line 17) | func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID ...
FILE: vendor/github.com/docker/docker/client/service_list.go
method ServiceList (line 14) | func (cli *Client) ServiceList(ctx context.Context, options types.Servic...
FILE: vendor/github.com/docker/docker/client/service_logs.go
method ServiceLogs (line 16) | func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, op...
FILE: vendor/github.com/docker/docker/client/service_remove.go
method ServiceRemove (line 6) | func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) ...
FILE: vendor/github.com/docker/docker/client/service_update.go
method ServiceUpdate (line 14) | func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, ...
FILE: vendor/github.com/docker/docker/client/swarm_get_unlock_key.go
method SwarmGetUnlockKey (line 11) | func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUn...
FILE: vendor/github.com/docker/docker/client/swarm_init.go
method SwarmInit (line 11) | func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest)...
FILE: vendor/github.com/docker/docker/client/swarm_inspect.go
method SwarmInspect (line 11) | func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) {
FILE: vendor/github.com/docker/docker/client/swarm_join.go
method SwarmJoin (line 9) | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest)...
FILE: vendor/github.com/docker/docker/client/swarm_leave.go
method SwarmLeave (line 10) | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error {
FILE: vendor/github.com/docker/docker/client/swarm_unlock.go
method SwarmUnlock (line 9) | func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequ...
FILE: vendor/github.com/docker/docker/client/swarm_update.go
method SwarmUpdate (line 13) | func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Versio...
FILE: vendor/github.com/docker/docker/client/task_inspect.go
method TaskInspectWithRaw (line 15) | func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string...
FILE: vendor/github.com/docker/docker/client/task_list.go
method TaskList (line 14) | func (cli *Client) TaskList(ctx context.Context, options types.TaskListO...
FILE: vendor/github.com/docker/docker/client/task_logs.go
method TaskLogs (line 16) | func (cli *Client) TaskLogs(ctx context.Context, taskID string, options ...
FILE: vendor/github.com/docker/docker/client/transport.go
type transportFunc (line 10) | type transportFunc
method RoundTrip (line 12) | func (tf transportFunc) RoundTrip(req *http.Request) (*http.Response, ...
function resolveTLSConfig (line 18) | func resolveTLSConfig(transport http.RoundTripper) *tls.Config {
FILE: vendor/github.com/docker/docker/client/utils.go
function getDockerOS (line 12) | func getDockerOS(serverHeader string) string {
function getFiltersQuery (line 23) | func getFiltersQuery(f filters.Args) (url.Values, error) {
FILE: vendor/github.com/docker/docker/client/version.go
method ServerVersion (line 11) | func (cli *Client) ServerVersion(ctx context.Context) (types.Version, er...
FILE: vendor/github.com/docker/docker/client/volume_create.go
method VolumeCreate (line 12) | func (cli *Client) VolumeCreate(ctx context.Context, options volumetypes...
FILE: vendor/github.com/docker/docker/client/volume_inspect.go
method VolumeInspect (line 14) | func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (...
method VolumeInspectWithRaw (line 20) | func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID st...
FILE: vendor/github.com/docker/docker/client/volume_list.go
method VolumeList (line 13) | func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) ...
FILE: vendor/github.com/docker/docker/client/volume_prune.go
method VolumesPrune (line 13) | func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filter...
FILE: vendor/github.com/docker/docker/client/volume_remove.go
method VolumeRemove (line 11) | func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, fo...
FILE: vendor/github.com/docker/docker/pkg/ioutils/buffer.go
type fixedBuffer (line 10) | type fixedBuffer struct
method Write (line 16) | func (b *fixedBuffer) Write(p []byte) (int, error) {
method Read (line 29) | func (b *fixedBuffer) Read(p []byte) (int, error) {
method Len (line 35) | func (b *fixedBuffer) Len() int {
method Cap (line 39) | func (b *fixedBuffer) Cap() int {
method Reset (line 43) | func (b *fixedBuffer) Reset() {
method String (line 49) | func (b *fixedBuffer) String() string {
FILE: vendor/github.com/docker/docker/pkg/ioutils/bytespipe.go
constant maxCap (line 10) | maxCap = 1e6
constant minCap (line 13) | minCap = 64
constant blockThreshold (line 17) | blockThreshold = 1e6
type BytesPipe (line 31) | type BytesPipe struct
method Write (line 51) | func (bp *BytesPipe) Write(p []byte) (int, error) {
method CloseWithError (line 108) | func (bp *BytesPipe) CloseWithError(err error) error {
method Close (line 121) | func (bp *BytesPipe) Close() error {
method Read (line 127) | func (bp *BytesPipe) Read(p []byte) (n int, err error) {
function NewBytesPipe (line 42) | func NewBytesPipe() *BytesPipe {
function returnBuffer (line 167) | func returnBuffer(b *fixedBuffer) {
function getBuffer (line 177) | func getBuffer(size int) *fixedBuffer {
FILE: vendor/github.com/docker/docker/pkg/ioutils/fmt.go
function FprintfIfNotEmpty (line 9) | func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) {
function FprintfIfTrue (line 17) | func FprintfIfTrue(w io.Writer, format string, ok bool) (int, error) {
FILE: vendor/github.com/docker/docker/pkg/ioutils/fswriters.go
function NewAtomicFileWriter (line 13) | func NewAtomicFileWriter(filename string, perm os.FileMode) (io.WriteClo...
function AtomicWriteFile (line 31) | func AtomicWriteFile(filename string, data []byte, perm os.FileMode) err...
type atomicFileWriter (line 47) | type atomicFileWriter struct
method Write (line 54) | func (w *atomicFileWriter) Write(dt []byte) (int, error) {
method Close (line 62) | func (w *atomicFileWriter) Close() (retErr error) {
type AtomicWriteSet (line 87) | type AtomicWriteSet struct
method WriteFile (line 109) | func (ws *AtomicWriteSet) WriteFile(filename string, data []byte, perm...
method FileWriter (line 138) | func (ws *AtomicWriteSet) FileWriter(name string, flag int, perm os.Fi...
method Cancel (line 148) | func (ws *AtomicWriteSet) Cancel() error {
method Commit (line 155) | func (ws *AtomicWriteSet) Commit(target string) error {
method String (line 160) | func (ws *AtomicWriteSet) String() string {
function NewAtomicWriteSet (line 96) | func NewAtomicWriteSet(tmpDir string) (*AtomicWriteSet, error) {
type syncFileCloser (line 124) | type syncFileCloser struct
method Close (line 128) | func (w syncFileCloser) Close() error {
FILE: vendor/github.com/docker/docker/pkg/ioutils/multireader.go
type pos (line 10) | type pos struct
type multiReadSeeker (line 15) | type multiReadSeeker struct
method Seek (line 21) | func (r *multiReadSeeker) Seek(offset int64, whence int) (int64, error) {
method getReaderForOffset (line 99) | func (r *multiReadSeeker) getReaderForOffset(offset int64) (io.ReadSee...
method getCurOffset (line 120) | func (r *multiReadSeeker) getCurOffset() (int64, error) {
method getOffsetToReader (line 137) | func (r *multiReadSeeker) getOffsetToReader(rdr io.ReadSeeker) (int64,...
method Read (line 153) | func (r *multiReadSeeker) Read(b []byte) (int, error) {
function getReadSeekerSize (line 183) | func getReadSeekerSize(rdr io.ReadSeeker) (int64, error) {
function MultiReadSeeker (line 212) | func MultiReadSeeker(readers ...io.ReadSeeker) io.ReadSeeker {
FILE: vendor/github.com/docker/docker/pkg/ioutils/readers.go
type readCloserWrapper (line 11) | type readCloserWrapper struct
method Close (line 16) | func (r *readCloserWrapper) Close() error {
function NewReadCloserWrapper (line 21) | func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser {
type readerErrWrapper (line 28) | type readerErrWrapper struct
method Read (line 33) | func (r *readerErrWrapper) Read(p []byte) (int, error) {
function NewReaderErrWrapper (line 42) | func NewReaderErrWrapper(r io.Reader, closer func()) io.Reader {
function HashData (line 50) | func HashData(src io.Reader) (string, error) {
type OnEOFReader (line 60) | type OnEOFReader struct
method Read (line 65) | func (r *OnEOFReader) Read(p []byte) (n int, err error) {
method Close (line 74) | func (r *OnEOFReader) Close() error {
method runFunc (line 80) | func (r *OnEOFReader) runFunc() {
type cancelReadCloser (line 89) | type cancelReadCloser struct
method Read (line 138) | func (p *cancelReadCloser) Read(buf []byte) (n int, err error) {
method closeWithError (line 144) | func (p *cancelReadCloser) closeWithError(err error) {
method Close (line 151) | func (p *cancelReadCloser) Close() error {
function NewCancelReadCloser (line 98) | func NewCancelReadCloser(ctx context.Context, in io.ReadCloser) io.ReadC...
FILE: vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go
function TempDir (line 8) | func TempDir(dir, prefix string) (string, error) {
FILE: vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go
function TempDir (line 12) | func TempDir(dir, prefix string) (string, error) {
FILE: vendor/github.com/docker/docker/pkg/ioutils/writeflusher.go
type WriteFlusher (line 11) | type WriteFlusher struct
method Write (line 26) | func (wf *WriteFlusher) Write(b []byte) (n int, err error) {
method Flush (line 39) | func (wf *WriteFlusher) Flush() {
method Flushed (line 54) | func (wf *WriteFlusher) Flushed() bool {
method Close (line 70) | func (wf *WriteFlusher) Close() error {
type flusher (line 20) | type flusher interface
function NewWriteFlusher (line 84) | func NewWriteFlusher(w io.Writer) *WriteFlusher {
FILE: vendor/github.com/docker/docker/pkg/ioutils/writers.go
type NopWriter (line 6) | type NopWriter struct
method Write (line 8) | func (*NopWriter) Write(buf []byte) (int, error) {
type nopWriteCloser (line 12) | type nopWriteCloser struct
method Close (line 16) | func (w *nopWriteCloser) Close() error { return nil }
function NopWriteCloser (line 19) | func NopWriteCloser(w io.Writer) io.WriteCloser {
type NopFlusher (line 24) | type NopFlusher struct
method Flush (line 27) | func (f *NopFlusher) Flush() {}
type writeCloserWrapper (line 29) | type writeCloserWrapper struct
method Close (line 34) | func (r *writeCloserWrapper) Close() error {
function NewWriteCloserWrapper (line 39) | func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteClo...
type WriteCounter (line 50) | type WriteCounter struct
method Write (line 62) | func (wc *WriteCounter) Write(p []byte) (count int, err error) {
function NewWriteCounter (line 56) | func NewWriteCounter(w io.Writer) *WriteCounter {
FILE: vendor/github.com/docker/docker/pkg/longpath/longpath.go
constant Prefix (line 12) | Prefix = `\\?\`
function AddPrefix (line 16) | func AddPrefix(path string) string {
FILE: vendor/github.com/docker/docker/pkg/system/chtimes.go
function init (line 14) | func init() {
function Chtimes (line 26) | func Chtimes(name string, atime time.Time, mtime time.Time) error {
FILE: vendor/github.com/docker/docker/pkg/system/chtimes_unix.go
function setCTime (line 12) | func setCTime(path string, ctime time.Time) error {
FILE: vendor/github.com/docker/docker/pkg/system/chtimes_windows.go
function setCTime (line 12) | func setCTime(path string, ctime time.Time) error {
FILE: vendor/github.com/docker/docker/pkg/system/events_windows.go
function CreateEvent (line 22) | func CreateEvent(eventAttributes *syscall.SecurityAttributes, manualRese...
function OpenEvent (line 42) | func OpenEvent(desiredAccess uint32, inheritHandle bool, name string) (h...
function SetEvent (line 58) | func SetEvent(handle syscall.Handle) (err error) {
function ResetEvent (line 63) | func ResetEvent(handle syscall.Handle) (err error) {
function PulseEvent (line 68) | func PulseEvent(handle syscall.Handle) (err error) {
function setResetPulse (line 72) | func setResetPulse(handle syscall.Handle, proc *windows.LazyProc) (err e...
function use (line 83) | func use(p unsafe.Pointer) {
FILE: vendor/github.com/docker/docker/pkg/system/exitcode.go
function GetExitCode (line 11) | func GetExitCode(err error) (int, error) {
function ProcessExitCode (line 23) | func ProcessExitCode(err error) (exitCode int) {
FILE: vendor/github.com/docker/docker/pkg/system/filesys.go
function MkdirAllWithACL (line 13) | func MkdirAllWithACL(path string, perm os.FileMode) error {
function MkdirAll (line 19) | func MkdirAll(path string, perm os.FileMode) error {
function IsAbs (line 24) | func IsAbs(path string) bool {
function CreateSequential (line 36) | func CreateSequential(name string) (*os.File, error) {
function OpenSequential (line 44) | func OpenSequential(name string) (*os.File, error) {
function OpenFileSequential (line 53) | func OpenFileSequential(name string, flag int, perm os.FileMode) (*os.Fi...
function TempFileSequential (line 66) | func TempFileSequential(dir, prefix string) (f *os.File, err error) {
FILE: vendor/github.com/docker/docker/pkg/system/filesys_windows.go
function MkdirAllWithACL (line 21) | func MkdirAllWithACL(path string, perm os.FileMode) error {
function MkdirAll (line 26) | func MkdirAll(path string, _ os.FileMode) error {
function mkdirall (line 33) | func mkdirall(path string, adminAndLocalSystem bool) error {
function mkdirWithACL (line 99) | func mkdirWithACL(name string) error {
function IsAbs (line 129) | func IsAbs(path string) bool {
function CreateSequential (line 151) | func CreateSequential(name string) (*os.File, error) {
function OpenSequential (line 159) | func OpenSequential(name string) (*os.File, error) {
function OpenFileSequential (line 166) | func OpenFileSequential(name string, flag int, _ os.FileMode) (*os.File,...
function syscallOpenFileSequential (line 177) | func syscallOpenFileSequential(name string, flag int, _ os.FileMode) (fi...
function makeInheritSa (line 185) | func makeInheritSa() *syscall.SecurityAttributes {
function syscallOpenSequential (line 192) | func syscallOpenSequential(path string, mode int, _ uint32) (fd syscall....
function reseed (line 245) | func reseed() uint32 {
function nextSuffix (line 248) | func nextSuffix() string {
function TempFileSequential (line 271) | func TempFileSequential(dir, prefix string) (f *os.File, err error) {
FILE: vendor/github.com/docker/docker/pkg/system/lstat_unix.go
function Lstat (line 11) | func Lstat(path string) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/lstat_windows.go
function Lstat (line 7) | func Lstat(path string) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/meminfo.go
type MemInfo (line 4) | type MemInfo struct
FILE: vendor/github.com/docker/docker/pkg/system/meminfo_linux.go
function ReadMemInfo (line 15) | func ReadMemInfo() (*MemInfo, error) {
function parseMemInfo (line 27) | func parseMemInfo(reader io.Reader) (*MemInfo, error) {
FILE: vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go
function getTotalMem (line 70) | func getTotalMem() int64 {
function getFreeMem (line 76) | func getFreeMem() int64 {
function ReadMemInfo (line 84) | func ReadMemInfo() (*MemInfo, error) {
function getSysSwap (line 106) | func getSysSwap() (int64, int64, error) {
FILE: vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go
function ReadMemInfo (line 6) | func ReadMemInfo() (*MemInfo, error) {
FILE: vendor/github.com/docker/docker/pkg/system/meminfo_windows.go
type memorystatusex (line 17) | type memorystatusex struct
function ReadMemInfo (line 31) | func ReadMemInfo() (*MemInfo, error) {
FILE: vendor/github.com/docker/docker/pkg/system/mknod.go
function Mknod (line 11) | func Mknod(path string, mode uint32, dev int) error {
function Mkdev (line 20) | func Mkdev(major int64, minor int64) uint32 {
FILE: vendor/github.com/docker/docker/pkg/system/mknod_windows.go
function Mknod (line 6) | func Mknod(path string, mode uint32, dev int) error {
function Mkdev (line 11) | func Mkdev(major int64, minor int64) uint32 {
FILE: vendor/github.com/docker/docker/pkg/system/path_unix.go
constant DefaultPathEnv (line 8) | DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbi...
function CheckSystemDriveAndRemoveDriveLetter (line 12) | func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {
FILE: vendor/github.com/docker/docker/pkg/system/path_windows.go
constant DefaultPathEnv (line 13) | DefaultPathEnv = ""
function CheckSystemDriveAndRemoveDriveLetter (line 26) | func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {
FILE: vendor/github.com/docker/docker/pkg/system/process_unix.go
function IsProcessAlive (line 10) | func IsProcessAlive(pid int) bool {
function KillProcess (line 20) | func KillProcess(pid int) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_darwin.go
function fromStatT (line 6) | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_freebsd.go
function fromStatT (line 6) | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_linux.go
function fromStatT (line 6) | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
function FromStatT (line 17) | func FromStatT(s *syscall.Stat_t) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_openbsd.go
function fromStatT (line 6) | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_solaris.go
function fromStatT (line 6) | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_unix.go
type StatT (line 9) | type StatT struct
method Mode (line 19) | func (s StatT) Mode() uint32 {
method UID (line 24) | func (s StatT) UID() uint32 {
method GID (line 29) | func (s StatT) GID() uint32 {
method Rdev (line 34) | func (s StatT) Rdev() uint64 {
method Size (line 39) | func (s StatT) Size() int64 {
method Mtim (line 44) | func (s StatT) Mtim() syscall.Timespec {
function Stat (line 52) | func Stat(path string) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/stat_windows.go
type StatT (line 10) | type StatT struct
method Size (line 17) | func (s StatT) Size() int64 {
method Mode (line 22) | func (s StatT) Mode() os.FileMode {
method Mtim (line 27) | func (s StatT) Mtim() time.Time {
function Stat (line 35) | func Stat(path string) (*StatT, error) {
function fromStatT (line 44) | func fromStatT(fi *os.FileInfo) (*StatT, error) {
FILE: vendor/github.com/docker/docker/pkg/system/syscall_unix.go
function Unmount (line 9) | func Unmount(dest string) error {
function CommandLineToArgv (line 15) | func CommandLineToArgv(commandLine string) ([]string, error) {
FILE: vendor/github.com/docker/docker/pkg/system/syscall_windows.go
type OSVersion (line 17) | type OSVersion struct
type osVersionInfoEx (line 25) | type osVersionInfoEx struct
function GetOSVersion (line 41) | func GetOSVersion() OSVersion {
function IsWindowsClient (line 58) | func IsWindowsClient() bool {
function Unmount (line 71) | func Unmount(dest string) error {
function CommandLineToArgv (line 76) | func CommandLineToArgv(commandLine string) ([]string, error) {
function HasWin32KSupport (line 100) | func HasWin32KSupport() bool {
FILE: vendor/github.com/docker/docker/pkg/system/umask.go
function Umask (line 11) | func Umask(newmask int) (oldmask int, err error) {
FILE: vendor/github.com/docker/docker/pkg/system/umask_windows.go
function Umask (line 6) | func Umask(newmask int) (oldmask int, err error) {
FILE: vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go
function LUtimesNano (line 10) | func LUtimesNano(path string, ts []syscall.Timespec) error {
FILE: vendor/github.com/docker/docker/pkg/system/utimes_linux.go
function LUtimesNano (line 10) | func LUtimesNano(path string, ts []syscall.Timespec) error {
FILE: vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go
function LUtimesNano (line 8) | func LUtimesNano(path string, ts []syscall.Timespec) error {
FILE: vendor/github.com/docker/docker/pkg/system/xattrs_linux.go
function Lgetxattr (line 11) | func Lgetxattr(path string, attr string) ([]byte, error) {
function Lsetxattr (line 43) | func Lsetxattr(path string, attr string, data []byte, flags int) error {
FILE: vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go
function Lgetxattr (line 6) | func Lgetxattr(path string, attr string) ([]byte, error) {
function Lsetxattr (line 11) | func Lsetxattr(path string, attr string, data []byte, flags int) error {
FILE: vendor/github.com/docker/docker/pkg/tlsconfig/tlsconfig_clone.go
function Clone (line 9) | func Clone(c *tls.Config) *tls.Config {
FILE: vendor/github.com/docker/docker/pkg/tlsconfig/tlsconfig_clone_go16.go
function Clone (line 9) | func Clone(c *tls.Config) *tls.Config {
FILE: vendor/github.com/docker/docker/pkg/tlsconfig/tlsconfig_clone_go17.go
function Clone (line 9) | func Clone(c *tls.Config) *tls.Config {
FILE: vendor/github.com/docker/docker/vendor/github.com/docker/docker-credential-helpers/osxkeychain/osxkeychain_darwin.c
type Server (line 17) | struct Server
type Server (line 54) | struct Server
type Server (line 96) | struct Server
function freeListData (line 223) | void freeListData(char *** data, unsigned int length) {
FILE: vendor/github.com/docker/docker/vendor/github.com/docker/docker-credential-helpers/osxkeychain/osxkeychain_darwin.go
constant errCredentialsNotFound (line 23) | errCredentialsNotFound = "The specified item could not be found in the k...
type Osxkeychain (line 26) | type Osxkeychain struct
method Add (line 29) | func (h Osxkeychain) Add(creds *credentials.Credentials) error {
method Delete (line 55) | func (h Osxkeychain) Delete(serverURL string) error {
method Get (line 72) | func (h Osxkeychain) Get(serverURL string) (string, string, error) {
method List (line 103) | func (h Osxkeychain) List() (map[string]string, error) {
function splitServer (line 137) | func splitServer(serverURL string) (*C.struct_Server, error) {
function freeServer (line 167) | func freeServer(s *C.struct_Server) {
FILE: vendor/github.com/docker/docker/vendor/github.com/docker/docker-credential-helpers/osxkeychain/osxkeychain_darwin.h
type Server (line 3) | struct Server {
type Server (line 10) | struct Server
type Server (line 11) | struct Server
type Server (line 12) | struct Server
FILE: vendor/github.com/docker/docker/vendor/github.com/docker/docker-credential-helpers/secretservice/secretservice_linux.c
function SecretSchema (line 5) | const SecretSchema *docker_get_schema(void)
function GError (line 20) | GError *add(char *label, char *server, char *username, char *secret) {
function GError (line 33) | GError *delete(char *server) {
function GError (line 60) | GError *get(char *server, char **username, char **secret) {
function GError (line 103) | GError *list(char *ref_label, char *** paths, char *** accts, unsigned i...
function freeListData (line 156) | void freeListData(char *** data, unsigned int length) {
FILE: vendor/github.com/docker/docker/vendor/github.com/docker/docker-credential-helpers/secretservice/secretservice_linux.go
type Secretservice (line 18) | type Secretservice struct
method Add (line 21) | func (h Secretservice) Add(creds *credentials.Credentials) error {
method Delete (line 43) | func (h Secretservice) Delete(serverURL string) error {
method Get (line 59) | func (h Secretservice) Get(serverURL string) (string, string, error) {
method List (line 85) | func (h Secretservice) List() (map[string]string, error) {
FILE: vendor/github.com/docker/docker/vendor/github.com/google/certificate-transparency/cpp/third_party/curl/hostcheck.c
function Curl_raw_toupper (line 54) | static char Curl_raw_toupper(char in) {
function Curl_raw_equal (line 122) | static int Curl_raw_equal(const char *first, const char *second) {
function Curl_raw_nequal (line 136) | static int Curl_raw_nequal(const char *first, const char *second, size_t...
function hostmatch (line 160) | static int hostmatch(const char *hostname, const char *pattern) {
function Curl_cert_hostcheck (line 203) | int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) {
FILE: vendor/github.com/docker/docker/vendor/github.com/google/certificate-transparency/cpp/third_party/isec_partners/openssl_hostname_validation.c
function HostnameValidationResult (line 55) | static HostnameValidationResult matches_common_name(const char *hostname,
function HostnameValidationResult (line 110) | static HostnameValidationResult matches_subject_alternative_name(
function HostnameValidationResult (line 165) | HostnameValidationResult validate_hostname(const char *hostname,
FILE: vendor/github.com/docker/docker/vendor/github.com/google/certificate-transparency/cpp/third_party/isec_partners/openssl_hostname_validation.h
type HostnameValidationResult (line 37) | typedef enum {
FILE: vendor/github.com/docker/docker/vendor/github.com/google/certificate-transparency/cpp/version.h
function namespace (line 4) | namespace cert_trans {
FILE: vendor/github.com/docker/docker/vendor/github.com/miekg/pkcs11/const.go
constant CKU_SO (line 8) | CKU_SO uint = 0
constant CKU_USER (line 9) | CKU_USER uint = 1
constant CKU_CONTEXT_SPECIFIC (line 10) | CKU_CONTEXT_SPECIFIC uint = 2
constant CKO_DATA (line 14) | CKO_DATA uint = 0x00000000
constant CKO_CERTIFICATE (line 15) | CKO_CERTIFICATE uint = 0x00000001
constant CKO_PUBLIC_KEY (line 16) | CKO_PUBLIC_KEY uint = 0x00000002
constant CKO_PRIVATE_KEY (line 17) | CKO_PRIVATE_KEY uint = 0x00000003
constant CKO_SECRET_KEY (line 18) | CKO_SECRET_KEY uint = 0x00000004
constant CKO_HW_FEATURE (line 19) | CKO_HW_FEATURE uint = 0x00000005
constant CKO_DOMAIN_PARAMETERS (line 20) | CKO_DOMAIN_PARAMETERS uint = 0x00000006
constant CKO_MECHANISM (line 21) | CKO_MECHANISM uint = 0x00000007
constant CKO_OTP_KEY (line 22) | CKO_OTP_KEY uint = 0x00000008
constant CKO_VENDOR_DEFINED (line 23) | CKO_VENDOR_DEFINED uint = 0x80000000
constant CKF_TOKEN_PRESENT (line 31) | CKF_TOKEN_PRESENT = 0x00000001
constant CKF_REMOVABLE_DEVICE (line 32) | CKF_REMOVABLE_DEVICE = 0x00000002
constant CKF_HW_SLOT (line 33) | CKF_HW_SLOT = 0x00000004
constant CKF_RNG (line 34) | CKF_RNG = 0x00000001
constant CKF_WRITE_PROTECTED (line 35) | CKF_WRITE_PROTECTED = 0x00000002
constant CKF_LOGIN_REQUIRED (line 36) | CKF_LOGIN_REQUIRED = 0x00000004
constant CKF_USER_PIN_INITIALIZED (line 37) | CKF_USER_PIN_INITIALIZED = 0x00000008
constant CKF_RESTORE_KEY_NOT_NEEDED (line 38) | CKF_RESTORE_KEY_NOT_NEEDED = 0x00000020
constant CKF_CLOCK_ON_TOKEN (line 39) | CKF_CLOCK_ON_TOKEN = 0x00000040
constant CKF_PROTECTED_AUTHENTICATION_PATH (line 40) | CKF_PROTECTED_AUTHENTICATION_PATH = 0x00000100
constant CKF_DUAL_CRYPTO_OPERATIONS (line 41) | CKF_DUAL_CRYPTO_OPERATIONS = 0x00000200
constant CKF_TOKEN_INITIALIZED (line 42) | CKF_TOKEN_INITIALIZED = 0x00000400
constant CKF_SECONDARY_AUTHENTICATION (line 43) | CKF_SECONDARY_AUTHENTICATION = 0x00000800
constant CKF_USER_PIN_COUNT_LOW (line 44) | CKF_USER_PIN_COUNT_LOW = 0x00010000
constant CKF_USER_PIN_FINAL_TRY (line 45) | CKF_USER_PIN_FINAL_TRY = 0x00020000
constant CKF_USER_PIN_LOCKED (line 46) | CKF_USER_PIN_LOCKED = 0x00040000
constant CKF_USER_PIN_TO_BE_CHANGED (line 47) | CKF_USER_PIN_TO_BE_CHANGED = 0x00080000
constant CKF_SO_PIN_COUNT_LOW (line 48) | CKF_SO_PIN_COUNT_LOW = 0x00100000
constant CKF_SO_PIN_FINAL_TRY (line 49) | CKF_SO_PIN_FINAL_TRY = 0x00200000
constant CKF_SO_PIN_LOCKED (line 50) | CKF_SO_PIN_LOCKED = 0x00400000
constant CKF_SO_PIN_TO_BE_CHANGED (line 51) | CKF_SO_PIN_TO_BE_CHANGED = 0x00800000
constant CKF_RW_SESSION (line 52) | CKF_RW_SESSION = 0x00000002
constant CKF_SERIAL_SESSION (line 53) | CKF_SERIAL_SESSION = 0x00000004
constant CKK_RSA (line 54) | CKK_RSA = 0x00000000
constant CKK_DSA (line 55) | CKK_DSA = 0x00000001
constant CKK_DH (line 56) | CKK_DH = 0x00000002
constant CKK_ECDSA (line 57) | CKK_ECDSA = 0x00000003
constant CKK_EC (line 58) | CKK_EC = 0x00000003
constant CKK_X9_42_DH (line 59) | CKK_X9_42_DH = 0x00000004
constant CKK_KEA (line 60) | CKK_KEA = 0x00000005
constant CKK_GENERIC_SECRET (line 61) | CKK_GENERIC_SECRET = 0x00000010
constant CKK_RC2 (line 62) | CKK_RC2 = 0x00000011
constant CKK_RC4 (line 63) | CKK_RC4 = 0x00000012
constant CKK_DES (line 64) | CKK_DES = 0x00000013
constant CKK_DES2 (line 65) | CKK_DES2 = 0x00000014
constant CKK_DES3 (line 66) | CKK_DES3 = 0x00000015
constant CKK_CAST (line 67) | CKK_CAST = 0x00000016
constant CKK_CAST3 (line 68) | CKK_CAST3 = 0x00000017
constant CKK_CAST5 (line 69) | CKK_CAST5 = 0x00000018
constant CKK_CAST128 (line 70) | CKK_CAST128 = 0x00000018
constant CKK_RC5 (line 71) | CKK_RC5 = 0x00000019
constant CKK_IDEA (line 72) | CKK_IDEA = 0x0000001A
constant CKK_SKIPJACK (line 73) | CKK_SKIPJACK = 0x0000001B
constant CKK_BATON (line 74) | CKK_BATON = 0x0000001C
constant CKK_JUNIPER (line 75) | CKK_JUNIPER = 0x0000001D
constant CKK_CDMF (line 76) | CKK_CDMF = 0x0000001E
constant CKK_AES (line 77) | CKK_AES = 0x0000001F
constant CKK_BLOWFISH (line 78) | CKK_BLOWFISH = 0x00000020
constant CKK_TWOFISH (line 79) | CKK_TWOFISH = 0x00000021
constant CKK_SECURID (line 80) | CKK_SECURID = 0x00000022
constant CKK_HOTP (line 81) | CKK_HOTP = 0x00000023
constant CKK_ACTI (line 82) | CKK_ACTI = 0x00000024
constant CKK_CAMELLIA (line 83) | CKK_CAMELLIA = 0x00000025
constant CKK_ARIA (line 84) | CKK_ARIA = 0x00000026
constant CKK_VENDOR_DEFINED (line 85) | CKK_VENDOR_DEFINED = 0x80000000
constant CKC_X_509 (line 86) | CKC_X_509 = 0x00000000
constant CKC_X_509_ATTR_CERT (line 87) | CKC_X_509_ATTR_CERT = 0x00000001
constant CKC_WTLS (line 88) | CKC_WTLS = 0x00000002
constant CKC_VENDOR_DEFINED (line 89) | CKC_VENDOR_DEFINED = 0x80000000
constant CKF_ARRAY_ATTRIBUTE (line 90) | CKF_ARRAY_ATTRIBUTE = 0x40000000
constant CKA_CLASS (line 91) | CKA_CLASS = 0x00000000
constant CKA_TOKEN (line 92) | CKA_TOKEN = 0x00000001
constant CKA_PRIVATE (line 93) | CKA_PRIVATE = 0x00000002
constant CKA_LABEL (line 94) | CKA_LABEL = 0x00000003
constant CKA_APPLICATION (line 95) | CKA_APPLICATION = 0x00000010
constant CKA_VALUE (line 96) | CKA_VALUE = 0x00000011
constant CKA_OBJECT_ID (line 97) | CKA_OBJECT_ID = 0x00000012
constant CKA_CERTIFICATE_TYPE (line 98) | CKA_CERTIFICATE_TYPE = 0x00000080
constant CKA_ISSUER (line 99) | CKA_ISSUER = 0x00000081
constant CKA_SERIAL_NUMBER (line 100) | CKA_SERIAL_NUMBER = 0x00000082
constant CKA_AC_ISSUER (line 101) | CKA_AC_ISSUER = 0x00000083
constant CKA_OWNER (line 102) | CKA_OWNER = 0x00000084
constant CKA_ATTR_TYPES (line 103) | CKA_ATTR_TYPES = 0x00000085
constant CKA_TRUSTED (line 104) | CKA_TRUSTED = 0x00000086
constant CKA_CERTIFICATE_CATEGORY (line 105) | CKA_CERTIFICATE_CATEGORY = 0x00000087
constant CKA_JAVA_MIDP_SECURITY_DOMAIN (line 106) | CKA_JAVA_MIDP_SECURITY_DOMAIN = 0x00000088
constant CKA_URL (line 107) | CKA_URL = 0x00000089
constant CKA_HASH_OF_SUBJECT_PUBLIC_KEY (line 108) | CKA_HASH_OF_SUBJECT_PUBLIC_KEY = 0x0000008A
constant CKA_HASH_OF_ISSUER_PUBLIC_KEY (line 109) | CKA_HASH_OF_ISSUER_PUBLIC_KEY = 0x0000008B
constant CKA_CHECK_VALUE (line 110) | CKA_CHECK_VALUE = 0x00000090
constant CKA_KEY_TYPE (line 111) | CKA_KEY_TYPE = 0x00000100
constant CKA_SUBJECT (line 112) | CKA_SUBJECT = 0x00000101
constant CKA_ID (line 113) | CKA_ID = 0x00000102
constant CKA_SENSITIVE (line 114) | CKA_SENSITIVE = 0x00000103
constant CKA_ENCRYPT (line 115) | CKA_ENCRYPT = 0x00000104
constant CKA_DECRYPT (line 116) | CKA_DECRYPT = 0x00000105
constant CKA_WRAP (line 117) | CKA_WRAP = 0x00000106
constant CKA_UNWRAP (line 118) | CKA_UNWRAP = 0x00000107
constant CKA_SIGN (line 119) | CKA_SIGN = 0x00000108
constant CKA_SIGN_RECOVER (line 120) | CKA_SIGN_RECOVER = 0x00000109
constant CKA_VERIFY (line 121) | CKA_VERIFY = 0x0000010A
constant CKA_VERIFY_RECOVER (line 122) | CKA_VERIFY_RECOVER = 0x0000010B
constant CKA_DERIVE (line 123) | CKA_DERIVE = 0x0000010C
constant CKA_START_DATE (line 124) | CKA_START_DATE = 0x00000110
constant CKA_END_DATE (line 125) | CKA_END_DATE = 0x00000111
constant CKA_MODULUS (line 126) | CKA_MODULUS = 0x00000120
constant CKA_MODULUS_BITS (line 127) | CKA_MODULUS_BITS = 0x00000121
constant CKA_PUBLIC_EXPONENT (line 128) | CKA_PUBLIC_EXPONENT = 0x00000122
constant CKA_PRIVATE_EXPONENT (line 129) | CKA_PRIVATE_EXPONENT = 0x00000123
constant CKA_PRIME_1 (line 130) | CKA_PRIME_1 = 0x00000124
constant CKA_PRIME_2 (line 131) | CKA_PRIME_2 = 0x00000125
constant CKA_EXPONENT_1 (line 132) | CKA_EXPONENT_1 = 0x00000126
constant CKA_EXPONENT_2 (line 133) | CKA_EXPONENT_2 = 0x00000127
constant CKA_COEFFICIENT (line 134) | CKA_COEFFICIENT = 0x00000128
constant CKA_PRIME (line 135) | CKA_PRIME = 0x00000130
constant CKA_SUBPRIME (line 136) | CKA_SUBPRIME = 0x00000131
constant CKA_BASE (line 137) | CKA_BASE = 0x00000132
constant CKA_PRIME_BITS (line 138) | CKA_PRIME_BITS = 0x00000133
constant CKA_SUBPRIME_BITS (line 139) | CKA_SUBPRIME_BITS = 0x00000134
constant CKA_SUB_PRIME_BITS (line 140) | CKA_SUB_PRIME_BITS = CKA_SUBPRIME_BITS
constant CKA_VALUE_BITS (line 141) | CKA_VALUE_BITS = 0x00000160
constant CKA_VALUE_LEN (line 142) | CKA_VALUE_LEN = 0x00000161
constant CKA_EXTRACTABLE (line 143) | CKA_EXTRACTABLE = 0x00000162
constant CKA_LOCAL (line 144) | CKA_LOCAL = 0x00000163
constant CKA_NEVER_EXTRACTABLE (line 145) | CKA_NEVER_EXTRACTABLE = 0x00000164
constant CKA_ALWAYS_SENSITIVE (line 146) | CKA_ALWAYS_SENSITIVE = 0x00000165
constant CKA_KEY_GEN_MECHANISM (line 147) | CKA_KEY_GEN_MECHANISM = 0x00000166
constant CKA_MODIFIABLE (line 148) | CKA_MODIFIABLE = 0x00000170
constant CKA_ECDSA_PARAMS (line 149) | CKA_ECDSA_PARAMS = 0x00000180
constant CKA_EC_PARAMS (line 150) | CKA_EC_PARAMS = 0x00000180
constant CKA_EC_POINT (line 151) | CKA_EC_POINT = 0x00000181
constant CKA_SECONDARY_AUTH (line 152) | CKA_SECONDARY_AUTH = 0x00000200
constant CKA_AUTH_PIN_FLAGS (line 153) | CKA_AUTH_PIN_FLAGS = 0x00000201
constant CKA_ALWAYS_AUTHENTICATE (line 154) | CKA_ALWAYS_AUTHENTICATE = 0x00000202
constant CKA_WRAP_WITH_TRUSTED (line 155) | CKA_WRAP_WITH_TRUSTED = 0x00000210
constant CKA_WRAP_TEMPLATE (line 156) | CKA_WRAP_TEMPLATE = (CKF_ARRAY_ATTRIBUTE | 0x00000211)
constant CKA_UNWRAP_TEMPLATE (line 157) | CKA_UNWRAP_TEMPLATE = (CKF_ARRAY_ATTRIBUTE | 0x00000212)
constant CKA_OTP_FORMAT (line 158) | CKA_OTP_FORMAT = 0x00000220
constant CKA_OTP_LENGTH (line 159) | CKA_OTP_LENGTH = 0x00000221
constant CKA_OTP_TIME_INTERVAL (line 160) | CKA_OTP_TIME_INTERVAL = 0x00000222
constant CKA_OTP_USER_FRIENDLY_MODE (line 161) | CKA_OTP_USER_FRIENDLY_MODE = 0x00000223
constant CKA_OTP_CHALLENGE_REQUIREMENT (line 162) | CKA_OTP_CHALLENGE_REQUIREMENT = 0x00000224
constant CKA_OTP_TIME_REQUIREMENT (line 163) | CKA_OTP_TIME_REQUIREMENT = 0x00000225
constant CKA_OTP_COUNTER_REQUIREMENT (line 164) | CKA_OTP_COUNTER_REQUIREMENT = 0x00000226
constant CKA_OTP_PIN_REQUIREMENT (line 165) | CKA_OTP_PIN_REQUIREMENT = 0x00000227
constant CKA_OTP_COUNTER (line 166) | CKA_OTP_COUNTER = 0x0000022E
constant CKA_OTP_TIME (line 167) | CKA_OTP_TIME = 0x0000022F
constant CKA_OTP_USER_IDENTIFIER (line 168) | CKA_OTP_USER_IDENTIFIER = 0x0000022A
constant CKA_OTP_SERVICE_IDENTIFIER (line 169) | CKA_OTP_SERVICE_IDENTIFIER = 0x0000022B
constant CKA_OTP_SERVICE_LOGO (line 170) | CKA_OTP_SERVICE_LOGO = 0x0000022C
constant CKA_OTP_SERVICE_LOGO_TYPE (line 171) | CKA_OTP_SERVICE_LOGO_TYPE = 0x0000022D
constant CKA_HW_FEATURE_TYPE (line 172) | CKA_HW_FEATURE_TYPE = 0x00000300
constant CKA_RESET_ON_INIT (line 173) | CKA_RESET_ON_INIT = 0x00000301
constant CKA_HAS_RESET (line 174) | CKA_HAS_RESET = 0x00000302
constant CKA_PIXEL_X (line 175) | CKA_PIXEL_X = 0x00000400
constant CKA_PIXEL_Y (line 176) | CKA_PIXEL_Y = 0x00000401
constant CKA_RESOLUTION (line 177) | CKA_RESOLUTION = 0x00000402
constant CKA_CHAR_ROWS (line 178) | CKA_CHAR_ROWS = 0x00000403
constant CKA_CHAR_COLUMNS (line 179) | CKA_CHAR_COLUMNS = 0x00000404
constant CKA_COLOR (line 180) | CKA_COLOR = 0x00000405
constant CKA_BITS_PER_PIXEL (line 181) | CKA_BITS_PER_PIXEL = 0x00000406
constant CKA_CHAR_SETS (line 182) | CKA_CHAR_SETS = 0x00000480
constant CKA_ENCODING_METHODS (line 183) | CKA_ENCODING_METHODS = 0x00000481
constant CKA_MIME_TYPES (line 184) | CKA_MIME_TYPES = 0x00000482
constant CKA_MECHANISM_TYPE (line 185) | CKA_MECHANISM_TYPE = 0x00000500
constant CKA_REQUIRED_CMS_ATTRIBUTES (line 186) | CKA_REQUIRED_CMS_ATTRIBUTES = 0x00000501
constant CKA_DEFAULT_CMS_ATTRIBUTES (line 187) | CKA_DEFAULT_CMS_ATTRIBUTES = 0x00000502
constant CKA_SUPPORTED_CMS_ATTRIBUTES (line 188) | CKA_SUPPORTED_CMS_ATTRIBUTES = 0x00000503
constant CKA_ALLOWED_MECHANISMS (line 189) | CKA_ALLOWED_MECHANISMS = (CKF_ARRAY_ATTRIBUTE | 0x00000600)
constant CKA_VENDOR_DEFINED (line 190) | CKA_VENDOR_DEFINED = 0x80000000
constant CKM_RSA_PKCS_KEY_PAIR_GEN (line 191) | CKM_RSA_PKCS_KEY_PAIR_GEN = 0x00000000
constant CKM_RSA_PKCS (line 192) | CKM_RSA_PKCS = 0x00000001
constant CKM_RSA_9796 (line 193) | CKM_RSA_9796 = 0x00000002
constant CKM_RSA_X_509 (line 194) | CKM_RSA_X_509 = 0x00000003
constant CKM_MD2_RSA_PKCS (line 195) | CKM_MD2_RSA_PKCS = 0x00000004
constant CKM_MD5_RSA_PKCS (line 196) | CKM_MD5_RSA_PKCS = 0x00000005
constant CKM_SHA1_RSA_PKCS (line 197) | CKM_SHA1_RSA_PKCS = 0x00000006
constant CKM_RIPEMD128_RSA_PKCS (line 198) | CKM_RIPEMD128_RSA_PKCS = 0x00000007
constant CKM_RIPEMD160_RSA_PKCS (line 199) | CKM_RIPEMD160_RSA_PKCS = 0x00000008
constant CKM_RSA_PKCS_OAEP (line 200) | CKM_RSA_PKCS_OAEP = 0x00000009
constant CKM_RSA_X9_31_KEY_PAIR_GEN (line 201) | CKM_RSA_X9_31_KEY_PAIR_GEN = 0x0000000A
constant CKM_RSA_X9_31 (line 202) | CKM_RSA_X9_31 = 0x0000000B
constant CKM_SHA1_RSA_X9_31 (line 203) | CKM_SHA1_RSA_X9_31 = 0x0000000C
constant CKM_RSA_PKCS_PSS (line 204) | CKM_RSA_PKCS_PSS = 0x0000000D
constant CKM_SHA1_RSA_PKCS_PSS (line 205) | CKM_SHA1_RSA_PKCS_PSS = 0x0000000E
constant CKM_DSA_KEY_PAIR_GEN (line 206) | CKM_DSA_KEY_PAIR_GEN = 0x00000010
constant CKM_DSA (line 207) | CKM_DSA = 0x00000011
constant CKM_DSA_SHA1 (line 208) | CKM_DSA_SHA1 = 0x00000012
constant CKM_DH_PKCS_KEY_PAIR_GEN (line 209) | CKM_DH_PKCS_KEY_PAIR_GEN = 0x00000020
constant CKM_DH_PKCS_DERIVE (line 210) | CKM_DH_PKCS_DERIVE = 0x00000021
constant CKM_X9_42_DH_KEY_PAIR_GEN (line 211) | CKM_X9_42_DH_KEY_PAIR_GEN = 0x00000030
constant CKM_X9_42_DH_DERIVE (line 212) | CKM_X9_42_DH_DERIVE = 0x00000031
constant CKM_X9_42_DH_HYBRID_DERIVE (line 213) | CKM_X9_42_DH_HYBRID_DERIVE = 0x00000032
constant CKM_X9_42_MQV_DERIVE (line 214) | CKM_X9_42_MQV_DERIVE = 0x00000033
constant CKM_SHA256_RSA_PKCS (line 215) | CKM_SHA256_RSA_PKCS = 0x00000040
constant CKM_SHA384_RSA_PKCS (line 216) | CKM_SHA384_RSA_PKCS = 0x00000041
constant CKM_SHA512_RSA_PKCS (line 217) | CKM_SHA512_RSA_PKCS = 0x00000042
constant CKM_SHA256_RSA_PKCS_PSS (line 218) | CKM_SHA256_RSA_PKCS_PSS = 0x00000043
constant CKM_SHA384_RSA_PKCS_PSS (line 219) | CKM_SHA384_RSA_PKCS_PSS = 0x00000044
constant CKM_SHA512_RSA_PKCS_PSS (line 220) | CKM_SHA512_RSA_PKCS_PSS = 0x00000045
constant CKM_SHA224_RSA_PKCS (line 221) | CKM_SHA224_RSA_PKCS = 0x00000046
constant CKM_SHA224_RSA_PKCS_PSS (line 222) | CKM_SHA224_RSA_PKCS_PSS = 0x00000047
constant CKM_RC2_KEY_GEN (line 223) | CKM_RC2_KEY_GEN = 0x00000100
constant CKM_RC2_ECB (line 224) | CKM_RC2_ECB = 0x00000101
constant CKM_RC2_CBC (line 225) | CKM_RC2_CBC = 0x00000102
constant CKM_RC2_MAC (line 226) | CKM_RC2_MAC = 0x00000103
constant CKM_RC2_MAC_GENERAL (line 227) | CKM_RC2_MAC_GENERAL = 0x00000104
constant CKM_RC2_CBC_PAD (line 228) | CKM_RC2_CBC_PAD = 0x00000105
constant CKM_RC4_KEY_GEN (line 229) | CKM_RC4_KEY_GEN = 0x00000110
constant CKM_RC4 (line 230) | CKM_RC4 = 0x00000111
constant CKM_DES_KEY_GEN (line 231) | CKM_DES_KEY_GEN = 0x00000120
constant CKM_DES_ECB (line 232) | CKM_DES_ECB = 0x00000121
constant CKM_DES_CBC (line 233) | CKM_DES_CBC = 0x00000122
constant CKM_DES_MAC (line 234) | CKM_DES_MAC = 0x00000123
constant CKM_DES_MAC_GENERAL (line 235) | CKM_DES_MAC_GENERAL = 0x00000124
constant CKM_DES_CBC_PAD (line 236) | CKM_DES_CBC_PAD = 0x00000125
constant CKM_DES2_KEY_GEN (line 237) | CKM_DES2_KEY_GEN = 0x00000130
constant CKM_DES3_KEY_GEN (line 238) | CKM_DES3_KEY_GEN = 0x00000131
constant CKM_DES3_ECB (line 239) | CKM_DES3_ECB = 0x00000132
constant CKM_DES3_CBC (line 240) | CKM_DES3_CBC = 0x00000133
constant CKM_DES3_MAC (line 241) | CKM_DES3_MAC = 0x00000134
constant CKM_DES3_MAC_GENERAL (line 242) | CKM_DES3_MAC_GENERAL = 0x00000135
constant CKM_DES3_CBC_PAD (line 243) | CKM_DES3_CBC_PAD = 0x00000136
constant CKM_CDMF_KEY_GEN (line 244) | CKM_CDMF_KEY_GEN = 0x00000140
constant CKM_CDMF_ECB (line 245) | CKM_CDMF_ECB = 0x00000141
constant CKM_CDMF_CBC (line 246) | CKM_CDMF_CBC = 0x00000142
constant CKM_CDMF_MAC (line 247) | CKM_CDMF_MAC = 0x00000143
constant CKM_CDMF_MAC_GENERAL (line 248) | CKM_CDMF_MAC_GENERAL = 0x00000144
constant CKM_CDMF_CBC_PAD (line 249) | CKM_CDMF_CBC_PAD = 0x00000145
constant CKM_DES_OFB64 (line 250) | CKM_DES_OFB64 = 0x00000150
constant CKM_DES_OFB8 (line 251) | CKM_DES_OFB8 = 0x00000151
constant CKM_DES_CFB64 (line 252) | CKM_DES_CFB64 = 0x00000152
constant CKM_DES_CFB8 (line 253) | CKM_DES_CFB8 = 0x00000153
constant CKM_MD2 (line 254) | CKM_MD2 = 0x00000200
constant CKM_MD2_HMAC (line 255) | CKM_MD2_HMAC = 0x00000201
constant CKM_MD2_HMAC_GENERAL (line 256) | CKM_MD2_HMAC_GENERAL = 0x00000202
constant CKM_MD5 (line 257) | CKM_MD5 = 0x00000210
constant CKM_MD5_HMAC (line 258) | CKM_MD5_HMAC = 0x00000211
constant CKM_MD5_HMAC_GENERAL (line 259) | CKM_MD5_HMAC_GENERAL = 0x00000212
constant CKM_SHA_1 (line 260) | CKM_SHA_1 = 0x00000220
constant CKM_SHA_1_HMAC (line 261) | CKM_SHA_1_HMAC = 0x00000221
constant CKM_SHA_1_HMAC_GENERAL (line 262) | CKM_SHA_1_HMAC_GENERAL = 0x00000222
constant CKM_RIPEMD128 (line 263) | CKM_RIPEMD128 = 0x00000230
constant CKM_RIPEMD128_HMAC (line 264) | CKM_RIPEMD128_HMAC = 0x00000231
constant CKM_RIPEMD128_HMAC_GENERAL (line 265) | CKM_RIPEMD128_HMAC_GENERAL = 0x00000232
constant CKM_RIPEMD160 (line 266) | CKM_RIPEMD160 = 0x00000240
constant CKM_RIPEMD160_HMAC (line 267) | CKM_RIPEMD160_HMAC = 0x00000241
constant CKM_RIPEMD160_HMAC_GENERAL (line 268) | CKM_RIPEMD160_HMAC_GENERAL = 0x00000242
constant CKM_SHA256 (line 269) | CKM_SHA256 = 0x00000250
constant CKM_SHA256_HMAC (line 270) | CKM_SHA256_HMAC = 0x00000251
constant CKM_SHA256_HMAC_GENERAL (line 271) | CKM_SHA256_HMAC_GENERAL = 0x00000252
constant CKM_SHA224 (line 272) | CKM_SHA224 = 0x00000255
constant CKM_SHA224_HMAC (line 273) | CKM_SHA224_HMAC = 0x00000256
constant CKM_SHA224_HMAC_GENERAL (line 274) | CKM_SHA224_HMAC_GENERAL = 0x00000257
constant CKM_SHA384 (line 275) | CKM_SHA384 = 0x00000260
constant CKM_SHA384_HMAC (line 276) | CKM_SHA384_HMAC = 0x00000261
constant CKM_SHA384_HMAC_GENERAL (line 277) | CKM_SHA384_HMAC_GENERAL = 0x00000262
constant CKM_SHA512 (line 278) | CKM_SHA512 = 0x00000270
constant CKM_SHA512_HMAC (line 279) | CKM_SHA512_HMAC = 0x00000271
constant CKM_SHA512_HMAC_GENERAL (line 280) | CKM_SHA512_HMAC_GENERAL = 0x00000272
constant CKM_SECURID_KEY_GEN (line 281) | CKM_SECURID_KEY_GEN = 0x00000280
constant CKM_SECURID (line 282) | CKM_SECURID = 0x00000282
constant CKM_HOTP_KEY_GEN (line 283) | CKM_HOTP_KEY_GEN = 0x00000290
constant CKM_HOTP (line 284) | CKM_HOTP = 0x00000291
constant CKM_ACTI (line 285) | CKM_ACTI = 0x000002A0
constant CKM_ACTI_KEY_GEN (line 286) | CKM_ACTI_KEY_GEN = 0x000002A1
constant CKM_CAST_KEY_GEN (line 287) | CKM_CAST_KEY_GEN = 0x00000300
constant CKM_CAST_ECB (line 288) | CKM_CAST_ECB = 0x00000301
constant CKM_CAST_CBC (line 289) | CKM_CAST_CBC = 0x00000302
constant CKM_CAST_MAC (line 290) | CKM_CAST_MAC = 0x00000303
constant CKM_CAST_MAC_GENERAL (line 291) | CKM_CAST_MAC_GENERAL = 0x00000304
constant CKM_CAST_CBC_PAD (line 292) | CKM_CAST_CBC_PAD = 0x00000305
constant CKM_CAST3_KEY_GEN (line 293) | CKM_CAST3_KEY_GEN = 0x00000310
constant CKM_CAST3_ECB (line 294) | CKM_CAST3_ECB = 0x00000311
constant CKM_CAST3_CBC (line 295) | CKM_CAST3_CBC = 0x00000312
constant CKM_CAST3_MAC (line 296) | CKM_CAST3_MAC = 0x00000313
constant CKM_CAST3_MAC_GENERAL (line 297) | CKM_CAST3_MAC_GENERAL = 0x00000314
constant CKM_CAST3_CBC_PAD (line 298) | CKM_CAST3_CBC_PAD = 0x00000315
constant CKM_CAST5_KEY_GEN (line 299) | CKM_CAST5_KEY_GEN = 0x00000320
constant CKM_CAST128_KEY_GEN (line 300) | CKM_CAST128_KEY_GEN = 0x00000320
constant CKM_CAST5_ECB (line 301) | CKM_CAST5_ECB = 0x00000321
constant CKM_CAST128_ECB (line 302) | CKM_CAST128_ECB = 0x00000321
constant CKM_CAST5_CBC (line 303) | CKM_CAST5_CBC = 0x00000322
constant CKM_CAST128_CBC (line 304) | CKM_CAST128_CBC = 0x00000322
constant CKM_CAST5_MAC (line 305) | CKM_CAST5_MAC = 0x00000323
constant CKM_CAST128_MAC (line 306) | CKM_CAST128_MAC = 0x00000323
constant CKM_CAST5_MAC_GENERAL (line 307) | CKM_CAST5_MAC_GENERAL = 0x00000324
constant CKM_CAST128_MAC_GENERAL (line 308) | CKM_CAST128_MAC_GENERAL = 0x00000324
constant CKM_CAST5_CBC_PAD (line 309) | CKM_CAST5_CBC_PAD = 0x00000325
constant CKM_CAST128_CBC_PAD (line 310) | CKM_CAST128_CBC_PAD = 0x00000325
constant CKM_RC5_KEY_GEN (line 311) | CKM_RC5_KEY_GEN = 0x00000330
constant CKM_RC5_ECB (line 312) | CKM_RC5_ECB = 0x00000331
constant CKM_RC5_CBC (line 313) | CKM_RC5_CBC = 0x00000332
constant CKM_RC5_MAC (line 314) | CKM_RC5_MAC = 0x00000333
constant CKM_RC5_MAC_GENERAL (line 315) | CKM_RC5_MAC_GENERAL = 0x00000334
constant CKM_RC5_CBC_PAD (line 316) | CKM_RC5_CBC_PAD = 0x00000335
constant CKM_IDEA_KEY_GEN (line 317) | CKM_IDEA_KEY_GEN = 0x00000340
constant CKM_IDEA_ECB (line 318) | CKM_IDEA_ECB = 0x00000341
constant CKM_IDEA_CBC (line 319) | CKM_IDEA_CBC = 0x00000342
constant CKM_IDEA_MAC (line 320) | CKM_IDEA_MAC = 0x00000343
constant CKM_IDEA_MAC_GENERAL (line 321) | CKM_IDEA_MAC_GENERAL = 0x00000344
constant CKM_IDEA_CBC_PAD (line 322) | CKM_IDEA_CBC_PAD = 0x00000345
constant CKM_GENERIC_SECRET_KEY_GEN (line 323) | CKM_GENERIC_SECRET_KEY_GEN = 0x00000350
constant CKM_CONCATENATE_BASE_AND_KEY (line 324) | CKM_CONCATENATE_BASE_AND_KEY = 0x00000360
constant CKM_CONCATENATE_BASE_AND_DATA (line 325) | CKM_CONCATENATE_BASE_AND_DATA = 0x00000362
constant CKM_CONCATENATE_DATA_AND_BASE (line 326) | CKM_CONCATENATE_DATA_AND_BASE = 0x00000363
constant CKM_XOR_BASE_AND_DATA (line 327) | CKM_XOR_BASE_AND_DATA = 0x00000364
constant CKM_EXTRACT_KEY_FROM_KEY (line 328) | CKM_EXTRACT_KEY_FROM_KEY = 0x00000365
constant CKM_SSL3_PRE_MASTER_KEY_GEN (line 329) | CKM_SSL3_PRE_MASTER_KEY_GEN = 0x00000370
constant CKM_SSL3_MASTER_KEY_DERIVE (line 330) | CKM_SSL3_MASTER_KEY_DERIVE = 0x00000371
constant CKM_SSL3_KEY_AND_MAC_DERIVE (line 331) | CKM_SSL3_KEY_AND_MAC_DERIVE = 0x00000372
constant CKM_SSL3_MASTER_KEY_DERIVE_DH (line 332) | CKM_SSL3_MASTER_KEY_DERIVE_DH = 0x00000373
constant CKM_TLS_PRE_MASTER_KEY_GEN (line 333) | CKM_TLS_PRE_MASTER_KEY_GEN = 0x00000374
constant CKM_TLS_MASTER_KEY_DERIVE (line 334) | CKM_TLS_MASTER_KEY_DERIVE = 0x00000375
constant CKM_TLS_KEY_AND_MAC_DERIVE (line 335) | CKM_TLS_KEY_AND_MAC_DERIVE = 0x00000376
constant CKM_TLS_MASTER_KEY_DERIVE_DH (line 336) | CKM_TLS_MASTER_KEY_DERIVE_DH = 0x00000377
constant CKM_TLS_PRF (line 337) | CKM_TLS_PRF = 0x00000378
constant CKM_SSL3_MD5_MAC (line 338) | CKM_SSL3_MD5_MAC = 0x00000380
constant CKM_SSL3_SHA1_MAC (line 339) | CKM_SSL3_SHA1_MAC = 0x00000381
constant CKM_MD5_KEY_DERIVATION (line 340) | CKM_MD5_KEY_DERIVATION = 0x00000390
constant CKM_MD2_KEY_DERIVATION (line 341) | CKM_MD2_KEY_DERIVATION = 0x00000391
constant CKM_SHA1_KEY_DERIVATION (line 342) | CKM_SHA1_KEY_DERIVATION = 0x00000392
constant CKM_SHA256_KEY_DERIVATION (line 343) | CKM_SHA256_KEY_DERIVATION = 0x00000393
constant CKM_SHA384_KEY_DERIVATION (line 344) | CKM_SHA384_KEY_DERIVATION = 0x00000394
constant CKM_SHA512_KEY_DERIVATION (line 345) | CKM_SHA512_KEY_DERIVATION = 0x00000395
constant CKM_SHA224_KEY_DERIVATION (line 346) | CKM_SHA224_KEY_DERIVATION = 0x00000396
constant CKM_PBE_MD2_DES_CBC (line 347) | CKM_PBE_MD2_DES_CBC = 0x000003A0
constant CKM_PBE_MD5_DES_CBC (line 348) | CKM_PBE_MD5_DES_CBC = 0x000003A1
constant CKM_PBE_MD5_CAST_CBC (line 349) | CKM_PBE_MD5_CAST_CBC = 0x000003A2
constant CKM_PBE_MD5_CAST3_CBC (line 350) | CKM_PBE_MD5_CAST3_CBC = 0x000003A3
constant CKM_PBE_MD5_CAST5_CBC (line 351) | CKM_PBE_MD5_CAST5_CBC = 0x000003A4
constant CKM_PBE_MD5_CAST128_CBC (line 352) | CKM_PBE_MD5_CAST128_CBC = 0x000003A4
constant CKM_PBE_SHA1_CAST5_CBC (line 353) | CKM_PBE_SHA1_CAST5_CBC = 0x000003A5
constant CKM_PBE_SHA1_CAST128_CBC (line 354) | CKM_PBE_SHA1_CAST128_CBC = 0x000003A5
constant CKM_PBE_SHA1_RC4_128 (line 355) | CKM_PBE_SHA1_RC4_128 = 0x000003A6
constant CKM_PBE_SHA1_RC4_40 (line 356) | CKM_PBE_SHA1_RC4_40 = 0x000003A7
constant CKM_PBE_SHA1_DES3_EDE_CBC (line 357) | CKM_PBE_SHA1_DES3_EDE_CBC = 0x000003A8
constant CKM_PBE_SHA1_DES2_EDE_CBC (line 358) | CKM_PBE_SHA1_DES2_EDE_CBC = 0x000003A9
constant CKM_PBE_SHA1_RC2_128_CBC (line 359) | CKM_PBE_SHA1_RC2_128_CBC = 0x000003AA
constant CKM_PBE_SHA1_RC2_40_CBC (line 360) | CKM_PBE_SHA1_RC2_40_CBC = 0x000003AB
constant CKM_PKCS5_PBKD2 (line 361) | CKM_PKCS5_PBKD2 = 0x000003B0
constant CKM_PBA_SHA1_WITH_SHA1_HMAC (line 362) | CKM_PBA_SHA1_WITH_SHA1_HMAC = 0x000003C0
constant CKM_WTLS_PRE_MASTER_KEY_GEN (line 363) | CKM_WTLS_PRE_MASTER_KEY_GEN = 0x000003D0
constant CKM_WTLS_MASTER_KEY_DERIVE (line 364) | CKM_WTLS_MASTER_KEY_DERIVE = 0x000003D1
constant CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC (line 365) | CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC = 0x000003D2
constant CKM_WTLS_PRF (line 366) | CKM_WTLS_PRF = 0x000003D3
constant CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE (line 367) | CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE = 0x000003D4
constant CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE (line 368) | CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE = 0x000003D5
constant CKM_KEY_WRAP_LYNKS (line 369) | CKM_KEY_WRAP_LYNKS = 0x00000400
constant CKM_KEY_WRAP_SET_OAEP (line 370) | CKM_KEY_WRAP_SET_OAEP = 0x00000401
constant CKM_CMS_SIG (line 371) | CKM_CMS_SIG = 0x00000500
constant CKM_KIP_DERIVE (line 372) | CKM_KIP_DERIVE = 0x00000510
constant CKM_KIP_WRAP (line 373) | CKM_KIP_WRAP = 0x00000511
constant CKM_KIP_MAC (line 374) | CKM_KIP_MAC = 0x00000512
constant CKM_CAMELLIA_KEY_GEN (line 375) | CKM_CAMELLIA_KEY_GEN = 0x00000550
constant CKM_CAMELLIA_ECB (line 376) | CKM_CAMELLIA_ECB = 0x00000551
constant CKM_CAMELLIA_CBC (line 377) | CKM_CAMELLIA_CBC = 0x00000552
constant CKM_CAMELLIA_MAC (line 378) | CKM_CAMELLIA_MAC = 0x00000553
constant CKM_CAMELLIA_MAC_GENERAL (line 379) | CKM_CAMELLIA_MAC_GENERAL = 0x00000554
constant CKM_CAMELLIA_CBC_PAD (line 380) | CKM_CAMELLIA_CBC_PAD = 0x00000555
constant CKM_CAMELLIA_ECB_ENCRYPT_DATA (line 381) | CKM_CAMELLIA_ECB_ENCRYPT_DATA = 0x00000556
constant CKM_CAMELLIA_CBC_ENCRYPT_DATA (line 382) | CKM_CAMELLIA_CBC_ENCRYPT_DATA = 0x00000557
constant CKM_CAMELLIA_CTR (line 383) | CKM_CAMELLIA_CTR = 0x00000558
constant CKM_ARIA_KEY_GEN (line 384) | CKM_ARIA_KEY_GEN = 0x00000560
constant CKM_ARIA_ECB (line 385) | CKM_ARIA_ECB = 0x00000561
constant CKM_ARIA_CBC (line 386) | CKM_ARIA_CBC = 0x00000562
constant CKM_ARIA_MAC (line 387) | CKM_ARIA_MAC = 0x00000563
constant CKM_ARIA_MAC_GENERAL (line 388) | CKM_ARIA_MAC_GENERAL = 0x00000564
constant CKM_ARIA_CBC_PAD (line 389) | CKM_ARIA_CBC_PAD = 0x00000565
constant CKM_ARIA_ECB_ENCRYPT_DATA (line 390) | CKM_ARIA_ECB_ENCRYPT_DATA = 0x00000566
constant CKM_ARIA_CBC_ENCRYPT_DATA (line 391) | CKM_ARIA_CBC_ENCRYPT_DATA = 0x00000567
constant CKM_SKIPJACK_KEY_GEN (line 392) | CKM_SKIPJACK_KEY_GEN = 0x00001000
constant CKM_SKIPJACK_ECB64 (line 393) | CKM_SKIPJACK_ECB64 = 0x00001001
constant CKM_SKIPJACK_CBC64 (line 394) | CKM_SKIPJACK_CBC64 = 0x00001002
constant CKM_SKIPJACK_OFB64 (line 395) | CKM_SKIPJACK_OFB64 = 0x00001003
constant CKM_SKIPJACK_CFB64 (line 396) | CKM_SKIPJACK_CFB64 = 0x00001004
constant CKM_SKIPJACK_CFB32 (line 397) | CKM_SKIPJACK_CFB32 = 0x00001005
constant CKM_SKIPJACK_CFB16 (line 398) | CKM_SKIPJACK_CFB16 = 0x00001006
constant CKM_SKIPJACK_CFB8 (line 399) | CKM_SKIPJACK_CFB8 = 0x00001007
constant CKM_SKIPJACK_WRAP (line 400) | CKM_SKIPJACK_WRAP = 0x00001008
constant CKM_SKIPJACK_PRIVATE_WRAP (line 401) | CKM_SKIPJACK_PRIVATE_WRAP = 0x00001009
constant CKM_SKIPJACK_RELAYX (line 402) | CKM_SKIPJACK_RELAYX = 0x0000100a
constant CKM_KEA_KEY_PAIR_GEN (line 403) | CKM_KEA_KEY_PAIR_GEN = 0x00001010
constant CKM_KEA_KEY_DERIVE (line 404) | CKM_KEA_KEY_DERIVE = 0x00001011
constant CKM_FORTEZZA_TIMESTAMP (line 405) | CKM_FORTEZZA_TIMESTAMP = 0x00001020
constant CKM_BATON_KEY_GEN (line 406) | CKM_BATON_KEY_GEN = 0x00001030
constant CKM_BATON_ECB128 (line 407) | CKM_BATON_ECB128 = 0x00001031
constant CKM_BATON_ECB96 (line 408) | CKM_BATON_ECB96 = 0x00001032
constant CKM_BATON_CBC128 (line 409) | CKM_BATON_CBC128 = 0x00001033
constant CKM_BATON_COUNTER (line 410) | CKM_BATON_COUNTER = 0x00001034
constant CKM_BATON_SHUFFLE (line 411) | CKM_BATON_SHUFFLE = 0x00001035
constant CKM_BATON_WRAP (line 412) | CKM_BATON_WRAP = 0x00001036
constant CKM_ECDSA_KEY_PAIR_GEN (line 413) | CKM_ECDSA_KEY_PAIR_GEN = 0x00001040
constant CKM_EC_KEY_PAIR_GEN (line 414) | CKM_EC_KEY_PAIR_GEN = 0x00001040
constant CKM_ECDSA (line 415) | CKM_ECDSA = 0x00001041
constant CKM_ECDSA_SHA1 (line 416) | CKM_ECDSA_SHA1 = 0x00001042
constant CKM_ECDH1_DERIVE (line 417) | CKM_ECDH1_DERIVE = 0x00001050
constant CKM_ECDH1_COFACTOR_DERIVE (line 418) | CKM_ECDH1_COFACTOR_DERIVE = 0x00001051
constant CKM_ECMQV_DERIVE (line 419) | CKM_ECMQV_DERIVE = 0x00001052
constant CKM_JUNIPER_KEY_GEN (line 420) | CKM_JUNIPER_KEY_GEN = 0x00001060
constant CKM_JUNIPER_ECB128 (line 421) | CKM_JUNIPER_ECB128 = 0x00001061
constant CKM_JUNIPER_CBC128 (line 422) | CKM_JUNIPER_CBC128 = 0x00001062
constant CKM_JUNIPER_COUNTER (line 423) | CKM_JUNIPER_COUNTER = 0x00001063
constant CKM_JUNIPER_SHUFFLE (line 424) | CKM_JUNIPER_SHUFFLE = 0x00001064
constant CKM_JUNIPER_WRAP (line 425) | CKM_JUNIPER_WRAP = 0x00001065
constant CKM_FASTHASH (line 426) | CKM_FASTHASH = 0x00001070
constant CKM_AES_KEY_GEN (line 427) | CKM_AES_KEY_GEN = 0x00001080
constant CKM_AES_ECB (line 428) | CKM_AES_ECB = 0x00001081
constant CKM_AES_CBC (line 429) | CKM_AES_CBC = 0x00001082
constant CKM_AES_MAC (line 430) | CKM_AES_MAC = 0x00001083
constant CKM_AES_MAC_GENERAL (line 431) | CKM_AES_MAC_GENERAL = 0x00001084
constant CKM_AES_CBC_PAD (line 432) | CKM_AES_CBC_PAD = 0x00001085
constant CKM_AES_CTR (line 433) | CKM_AES_CTR = 0x00001086
constant CKM_BLOWFISH_KEY_GEN (line 434) | CKM_BLOWFISH_KEY_GEN = 0x00001090
constant CKM_BLOWFISH_CBC (line 435) | CKM_BLOWFISH_CBC = 0x00001091
constant CKM_TWOFISH_KEY_GEN (line 436) | CKM_TWOFISH_KEY_GEN = 0x00001092
constant CKM_TWOFISH_CBC (line 437) | CKM_TWOFISH_CBC = 0x00001093
constant CKM_DES_ECB_ENCRYPT_DATA (line 438) | CKM_DES_ECB_ENCRYPT_DATA = 0x00001100
constant CKM_DES_CBC_ENCRYPT_DATA (line 439) | CKM_DES_CBC_ENCRYPT_DATA = 0x00001101
constant CKM_DES3_ECB_ENCRYPT_DATA (line 440) | CKM_DES3_ECB_ENCRYPT_DATA = 0x00001102
constant CKM_DES3_CBC_ENCRYPT_DATA (line 441) | CKM_DES3_CBC_ENCRYPT_DATA = 0x00001103
constant CKM_AES_ECB_ENCRYPT_DATA (line 442) | CKM_AES_ECB_ENCRYPT_DATA = 0x00001104
constant CKM_AES_CBC_ENCRYPT_DATA (line 443) | CKM_AES_CBC_ENCRYPT_DATA = 0x00001105
constant CKM_DSA_PARAMETER_GEN (line 444) | CKM_DSA_PARAMETER_GEN = 0x00002000
constant CKM_DH_PKCS_PARAMETER_GEN (line 445) | CKM_DH_PKCS_PARAMETER_GEN = 0x00002001
constant CKM_X9_42_DH_PARAMETER_GEN (line 446) | CKM_X9_42_DH_PARAMETER_GEN = 0x00002002
constant CKM_VENDOR_DEFINED (line 447) | CKM_VENDOR_DEFINED = 0x80000000
constant CKF_HW (line 448) | CKF_HW = 0x00000001
constant CKF_ENCRYPT (line 449) | CKF_ENCRYPT = 0x00000100
constant CKF_DECRYPT (line 450) | CKF_DECRYPT = 0x00000200
constant CKF_DIGEST (line 451) | CKF_DIGEST = 0x00000400
constant CKF_SIGN (line 452) | CKF_SIGN = 0x00000800
constant CKF_SIGN_RECOVER (line 453) | CKF_SIGN_RECOVER = 0x00001000
constant CKF_VERIFY (line 454) | CKF_VERIFY = 0x00002000
constant CKF_VERIFY_RECOVER (line 455) | CKF_VERIFY_RECOVER = 0x00004000
constant CKF_GENERATE (line 456) | CKF_GENERATE = 0x00008000
constant CKF_GENERATE_KEY_PAIR (line 457) | CKF_GENERATE_KEY_PAIR = 0x00010000
constant CKF_WRAP (line 458) | CKF_WRAP = 0x00020000
constant CKF_UNWRAP (line 459) | CKF_UNWRAP = 0x00040000
constant CKF_DERIVE (line 460) | CKF_DERIVE = 0x00080000
constant CKF_EC_F_P (line 461) | CKF_EC_F_P = 0x00100000
constant CKF_EC_F_2M (line 462) | CKF_EC_F_2M = 0x00200000
constant CKF_EC_ECPARAMETERS (line 463) | CKF_EC_ECPARAMETERS = 0x00400000
constant CKF_EC_NAMEDCURVE (line 464) | CKF_EC_NAMEDCURVE = 0x00800000
constant CKF_EC_UNCOMPRESS (line 465) | CKF_EC_UNCOMPRESS = 0x01000000
constant CKF_EC_COMPRESS (line 466) | CKF_EC_COMPRESS = 0x02000000
constant CKF_EXTENSION (line 467) | CKF_EXTENSION = 0x80000000
constant CKR_OK (line 468) | CKR_OK = 0x00000000
constant CKR_CANCEL (line 469) | CKR_CANCEL = 0x00000001
constant CKR_HOST_MEMORY (line 470) | CKR_HOST_MEMORY = 0x00000002
constant CKR_SLOT_ID_INVALID (line 471) | CKR_SLOT_ID_INVALID = 0x00000003
constant CKR_GENERAL_ERROR (line 472) | CKR_GENERAL_ERROR = 0x00000005
constant CKR_FUNCTION_FAILED (line 473) | CKR_FUNCTION_FAILED = 0x00000006
constant CKR_ARGUMENTS_BAD (line 474) | CKR_ARGUMENTS_BAD = 0x00000007
constant CKR_NO_EVENT (line 475) | CKR_NO_EVENT = 0x00000008
constant CKR_NEED_TO_CREATE_THREADS (line 476) | CKR_NEED_TO_CREATE_THREADS = 0x00000009
constant CKR_CANT_LOCK (line 477) | CKR_CANT_LOCK = 0x0000000A
constant CKR_ATTRIBUTE_READ_ONLY (line 478) | CKR_ATTRIBUTE_READ_ONLY = 0x00000010
constant CKR_ATTRIBUTE_SENSITIVE (line 479) | CKR_ATTRIBUTE_SENSITIVE = 0x00000011
constant CKR_ATTRIBUTE_TYPE_INVALID (line 480) | CKR_ATTRIBUTE_TYPE_INVALID = 0x00000012
constant CKR_ATTRIBUTE_VALUE_INVALID (line 481) | CKR_ATTRIBUTE_VALUE_INVALID = 0x00000013
constant CKR_DATA_INVALID (line 482) | CKR_DATA_INVALID = 0x00000020
constant CKR_DATA_LEN_RANGE (line 483) | CKR_DATA_LEN_RANGE = 0x00000021
constant CKR_DEVICE_ERROR (line 484) | CKR_DEVICE_ERROR = 0x00000030
constant CKR_DEVICE_MEMORY (line 485) | CKR_DEVICE_MEMORY = 0x00000031
constant CKR_DEVICE_REMOVED (line 486) | CKR_DEVICE_REMOVED = 0x00000032
constant CKR_ENCRYPTED_DATA_INVALID (line 487) | CKR_ENCRYPTED_DATA_INVALID = 0x00000040
constant CKR_ENCRYPTED_DATA_LEN_RANGE (line 488) | CKR_ENCRYPTED_DATA_LEN_RANGE = 0x00000041
constant CKR_FUNCTION_CANCELED (line 489) | CKR_FUNCTION_CANCELED = 0x00000050
constant CKR_FUNCTION_NOT_PARALLEL (line 490) | CKR_FUNCTION_NOT_PARALLEL = 0x00000051
constant CKR_FUNCTION_NOT_SUPPORTED (line 491) | CKR_FUNCTION_NOT_SUPPORTED = 0x00000054
constant CKR_KEY_HANDLE_INVALID (line 492) | CKR_KEY_HANDLE_INVALID = 0x00000060
constant CKR_KEY_SIZE_RANGE (line 493) | CKR_KEY_SIZE_RANGE = 0x00000062
constant CKR_KEY_TYPE_INCONSISTENT (line 494) | CKR_KEY_TYPE_INCONSISTENT = 0x00000063
constant CKR_KEY_NOT_NEEDED (line 495) | CKR_KEY_NOT_NEEDED = 0x00000064
constant CKR_KEY_CHANGED (line 496) | CKR_KEY_CHANGED = 0x00000065
constant CKR_KEY_NEEDED (line 497) | CKR_KEY_NEEDED = 0x00000066
constant CKR_KEY_INDIGESTIBLE (line 498) | CKR_KEY_INDIGESTIBLE = 0x00000067
constant CKR_KEY_FUNCTION_NOT_PERMITTED (line 499) | CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068
constant CKR_KEY_NOT_WRAPPABLE (line 500) | CKR_KEY_NOT_WRAPPABLE = 0x00000069
constant CKR_KEY_UNEXTRACTABLE (line 501) | CKR_KEY_UNEXTRACTABLE = 0x0000006A
constant CKR_MECHANISM_INVALID (line 502) | CKR_MECHANISM_INVALID = 0x00000070
constant CKR_MECHANISM_PARAM_INVALID (line 503) | CKR_MECHANISM_PARAM_INVALID = 0x00000071
constant CKR_OBJECT_HANDLE_INVALID (line 504) | CKR_OBJECT_HANDLE_INVALID = 0x00000082
constant CKR_OPERATION_ACTIVE (line 505) | CKR_OPERATION_ACTIVE = 0x00000090
constant CKR_OPERATION_NOT_INITIALIZED (line 506) | CKR_OPERATION_NOT_INITIALIZED = 0x00000091
constant CKR_PIN_INCORRECT (line 507) | CKR_PIN_INCORRECT = 0x000000A0
constant CKR_PIN_INVALID (line 508) | CKR_PIN_INVALID = 0x000000A1
constant CKR_PIN_LEN_RANGE (line 509) | CKR_PIN_LEN_RANGE = 0x000000A2
constant CKR_PIN_EXPIRED (line 510) | CKR_PIN_EXPIRED = 0x000000A3
constant CKR_PIN_LOCKED (line 511) | CKR_PIN_LOCKED = 0x000000A4
constant CKR_SESSION_CLOSED (line 512) | CKR_SESSION_CLOSED = 0x000000B0
constant CKR_SESSION_COUNT (line 513) | CKR_SESSION_COUNT = 0x000000B1
constant CKR_SESSION_HANDLE_INVALID (line 514) | CKR_SESSION_HANDLE_INVALID = 0x000000B3
constant CKR_SESSION_PARALLEL_NOT_SUPPORTED (line 515) | CKR_SESSION_PARALLEL_NOT_SUPPORTED = 0x000000B4
constant CKR_SESSION_READ_ONLY (line 516) | CKR_SESSION_READ_ONLY = 0x000000B5
constant CKR_SESSION_EXISTS (line 517) | CKR_SESSION_EXISTS = 0x000000B6
constant CKR_SESSION_READ_ONLY_EXISTS (line 518) | CKR_SESSION_READ_ONLY_EXISTS = 0x000000B7
constant CKR_SESSION_READ_WRITE_SO_EXISTS (line 519) | CKR_SESSION_READ_WRITE_SO_EXISTS = 0x000000B8
constant CKR_SIGNATURE_INVALID (line 520) | CKR_SIGNATURE_INVALID = 0x000000C0
constant CKR_SIGNATURE_LEN_RANGE (line 521) | CKR_SIGNATURE_LEN_RANGE = 0x000000C1
constant CKR_TEMPLATE_INCOMPLETE (line 522) | CKR_TEMPLATE_INCOMPLETE = 0x000000D0
constant CKR_TEMPLATE_INCONSISTENT (line 523) | CKR_TEMPLATE_INCONSISTENT = 0x000000D1
constant CKR_TOKEN_NOT_PRESENT (line 524) | CKR_TOKEN_NOT_PRESENT = 0x000000E0
constant CKR_TOKEN_NOT_RECOGNIZED (line 525) | CKR_TOKEN_NOT_RECOGNIZED = 0x000000E1
constant CKR_TOKEN_WRITE_PROTECTED (line 526) | CKR_TOKEN_WRITE_PROTECTED = 0x000000E2
constant CKR_UNWRAPPING_KEY_HANDLE_INVALID (line 527) | CKR_UNWRAPPING_KEY_HANDLE_INVALID = 0x000000F0
constant CKR_UNWRAPPING_KEY_SIZE_RANGE (line 528) | CKR_UNWRAPPING_KEY_SIZE_RANGE = 0x000000F1
constant CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (line 529) | CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 0x000000F2
constant CKR_USER_ALREADY_LOGGED_IN (line 530) | CKR_USER_ALREADY_LOGGED_IN = 0x00000100
constant CKR_USER_NOT_LOGGED_IN (line 531) | CKR_USER_NOT_LOGGED_IN = 0x00000101
constant CKR_USER_PIN_NOT_INITIALIZED (line 532) | CKR_USER_PIN_NOT_INITIALIZED = 0x00000102
constant CKR_USER_TYPE_INVALID (line 533) | CKR_USER_TYPE_INVALID = 0x00000103
constant CKR_USER_ANOTHER_ALREADY_LOGGED_IN (line 534) | CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 0x00000104
constant CKR_USER_TOO_MANY_TYPES (line 535) | CKR_USER_TOO_MANY_TYPES = 0x00000105
constant CKR_WRAPPED_KEY_INVALID (line 536) | CKR_WRAPPED_KEY_INVALID = 0x00000110
constant CKR_WRAPPED_KEY_LEN_RANGE (line 537) | CKR_WRAPPED_KEY_LEN_RANGE = 0x00000112
constant CKR_WRAPPING_KEY_HANDLE_INVALID (line 538) | CKR_WRAPPING_KEY_HANDLE_INVALID = 0x00000113
constant CKR_WRAPPING_KEY_SIZE_RANGE (line 539) | CKR_WRAPPING_KEY_SIZE_RANGE = 0x00000114
constant CKR_WRAPPING_KEY_TYPE_INCONSISTENT (line 540) | CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 0x00000115
constant CKR_RANDOM_SEED_NOT_SUPPORTED (line 541) | CKR_RANDOM_SEED_NOT_SUPPORTED = 0x00000120
constant CKR_RANDOM_NO_RNG (line 542) | CKR_RANDOM_NO_RNG = 0x00000121
constant CKR_DOMAIN_PARAMS_INVALID (line 543) | CKR_DOMAIN_PARAMS_INVALID = 0x00000130
constant CKR_BUFFER_TOO_SMALL (line 544) | CKR_BUFFER_TOO_SMALL = 0x00000150
constant CKR_SAVED_STATE_INVALID (line 545) | CKR_SAVED_STATE_INVALID = 0x00000160
constant CKR_INFORMATION_SENSITIVE (line 546) | CKR_INFORMATION_SENSITIVE = 0x00000170
constant CKR_STATE_UNSAVEABLE (line 547) | CKR_STATE_UNSAVEABLE = 0x00000180
constant CKR_CRYPTOKI_NOT_INITIALIZED (line 548) | CKR_CRYPTOKI_NOT_INITIALIZED = 0x00000190
constant CKR_CRYPTOKI_ALREADY_INITIALIZED (line 549) | CKR_CRYPTOKI_ALREADY_INITIALIZED = 0x00000191
constant CKR_MUTEX_BAD (line 550) | CKR_MUTEX_BAD = 0x000001A0
constant CKR_MUTEX_NOT_LOCKED (line 551) | CKR_MUTEX_NOT_LOCKED = 0x000001A1
constant CKR_NEW_PIN_MODE (line 552) | CKR_NEW_PIN_MODE = 0x000001B0
constant CKR_NEXT_OTP (line 553) | CKR_NEXT_OTP = 0x000001B1
constant CKR_FUNCTION_REJECTED (line 554) | CKR_FUNCTION_REJECTED = 0x00000200
constant CKR_VENDOR_DEFINED (line 555) | CKR_VENDOR_DEFINED = 0x80000000
constant CKF_LIBRARY_CANT_CREATE_OS_THREADS (line 556) | CKF_LIBRARY_CANT_CREATE_OS_THREADS = 0x00000001
constant CKF_OS_LOCKING_OK (line 557) | CKF_OS_LOCKING_OK = 0x00000002
constant CKF_DONT_BLOCK (line 558) | CKF_DONT_BLOCK = 1
constant CKF_NEXT_OTP (line 559) | CKF_NEXT_OTP = 0x00000001
constant CKF_EXCLUDE_TIME (line 560) | CKF_EXCLUDE_TIME = 0x00000002
constant CKF_EXCLUDE_COUNTER (line 561) | CKF_EXCLUDE_COUNTER = 0x00000004
constant CKF_EXCLUDE_CHALLENGE (line 562) | CKF_EXCLUDE_CHALLENGE = 0x00000008
constant CKF_EXCLUDE_PIN (line 563) | CKF_EXCLUDE_PIN = 0x00000010
constant CKF_USER_FRIENDLY_OTP (line 564) | CKF_USER_FRIENDLY_OTP = 0x00000020
FILE: vendor/github.com/docker/docker/vendor/github.com/miekg/pkcs11/pkcs11.go
type Ctx (line 745) | type Ctx struct
method Destroy (line 762) | func (c *Ctx) Destroy() {
method Initialize (line 771) | func (c *Ctx) Initialize() error {
method Finalize (line 778) | func (c *Ctx) Finalize() error {
method GetInfo (line 787) | func (c *Ctx) GetInfo() (Info, error) {
method GetSlotList (line 801) | func (c *Ctx) GetSlotList(tokenPresent bool) ([]uint, error) {
method GetSlotInfo (line 815) | func (c *Ctx) GetSlotInfo(slotID uint) (SlotInfo, error) {
method GetTokenInfo (line 830) | func (c *Ctx) GetTokenInfo(slotID uint) (TokenInfo, error) {
method GetMechanismList (line 857) | func (c *Ctx) GetMechanismList(slotID uint) ([]*Mechanism, error) {
method GetMechanismInfo (line 877) | func (c *Ctx) GetMechanismInfo(slotID uint, m []*Mechanism) (Mechanism...
method InitToken (line 892) | func (c *Ctx) InitToken(slotID uint, pin string, label string) error {
method InitPIN (line 907) | func (c *Ctx) InitPIN(sh SessionHandle, pin string) error {
method SetPIN (line 915) | func (c *Ctx) SetPIN(sh SessionHandle, oldpin string, newpin string) e...
method OpenSession (line 925) | func (c *Ctx) OpenSession(slotID uint, flags uint) (SessionHandle, err...
method CloseSession (line 932) | func (c *Ctx) CloseSession(sh SessionHandle) error {
method CloseAllSessions (line 941) | func (c *Ctx) CloseAllSessions(slotID uint) error {
method GetSessionInfo (line 950) | func (c *Ctx) GetSessionInfo(sh SessionHandle) (SessionInfo, error) {
method GetOperationState (line 962) | func (c *Ctx) GetOperationState(sh SessionHandle) ([]byte, error) {
method SetOperationState (line 977) | func (c *Ctx) SetOperationState(sh SessionHandle, state []byte, encryp...
method Login (line 984) | func (c *Ctx) Login(sh SessionHandle, userType uint, pin string) error {
method Logout (line 992) | func (c *Ctx) Logout(sh SessionHandle) error {
method CreateObject (line 1001) | func (c *Ctx) CreateObject(sh SessionHandle, temp []*Attribute) (Objec...
method CopyObject (line 1014) | func (c *Ctx) CopyObject(sh SessionHandle, o ObjectHandle, temp []*Att...
method DestroyObject (line 1028) | func (c *Ctx) DestroyObject(sh SessionHandle, oh ObjectHandle) error {
method GetObjectSize (line 1034) | func (c *Ctx) GetObjectSize(sh SessionHandle, oh ObjectHandle) (uint, ...
method GetAttributeValue (line 1041) | func (c *Ctx) GetAttributeValue(sh SessionHandle, o ObjectHandle, a []...
method SetAttributeValue (line 1066) | func (c *Ctx) SetAttributeValue(sh SessionHandle, o ObjectHandle, a []...
method FindObjectsInit (line 1075) | func (c *Ctx) FindObjectsInit(sh SessionHandle, temp []*Attribute) err...
method FindObjects (line 1086) | func (c *Ctx) FindObjects(sh SessionHandle, max int) ([]ObjectHandle, ...
method FindObjectsFinal (line 1106) | func (c *Ctx) FindObjectsFinal(sh SessionHandle) error {
method EncryptInit (line 1112) | func (c *Ctx) EncryptInit(sh SessionHandle, m []*Mechanism, o ObjectHa...
method Encrypt (line 1120) | func (c *Ctx) Encrypt(sh SessionHandle, message []byte) ([]byte, error) {
method EncryptUpdate (line 1135) | func (c *Ctx) EncryptUpdate(sh SessionHandle, plain []byte) ([]byte, e...
method EncryptFinal (line 1150) | func (c *Ctx) EncryptFinal(sh SessionHandle) ([]byte, error) {
method DecryptInit (line 1165) | func (c *Ctx) DecryptInit(sh SessionHandle, m []*Mechanism, o ObjectHa...
method Decrypt (line 1173) | func (c *Ctx) Decrypt(sh SessionHandle, cypher []byte) ([]byte, error) {
method DecryptUpdate (line 1188) | func (c *Ctx) DecryptUpdate(sh SessionHandle, cipher []byte) ([]byte, ...
method DecryptFinal (line 1203) | func (c *Ctx) DecryptFinal(sh SessionHandle) ([]byte, error) {
method DigestInit (line 1218) | func (c *Ctx) DigestInit(sh SessionHandle, m []*Mechanism) error {
method Digest (line 1226) | func (c *Ctx) Digest(sh SessionHandle, message []byte) ([]byte, error) {
method DigestUpdate (line 1241) | func (c *Ctx) DigestUpdate(sh SessionHandle, message []byte) error {
method DigestKey (line 1252) | func (c *Ctx) DigestKey(sh SessionHandle, key ObjectHandle) error {
method DigestFinal (line 1261) | func (c *Ctx) DigestFinal(sh SessionHandle) ([]byte, error) {
method SignInit (line 1279) | func (c *Ctx) SignInit(sh SessionHandle, m []*Mechanism, o ObjectHandl...
method Sign (line 1288) | func (c *Ctx) Sign(sh SessionHandle, message []byte) ([]byte, error) {
method SignUpdate (line 1305) | func (c *Ctx) SignUpdate(sh SessionHandle, message []byte) error {
method SignFinal (line 1311) | func (c *Ctx) SignFinal(sh SessionHandle) ([]byte, error) {
method SignRecoverInit (line 1327) | func (c *Ctx) SignRecoverInit(sh SessionHandle, m []*Mechanism, key Ob...
method SignRecover (line 1336) | func (c *Ctx) SignRecover(sh SessionHandle, data []byte) ([]byte, erro...
method VerifyInit (line 1353) | func (c *Ctx) VerifyInit(sh SessionHandle, m []*Mechanism, key ObjectH...
method Verify (line 1363) | func (c *Ctx) Verify(sh SessionHandle, data []byte, signature []byte) ...
method VerifyUpdate (line 1371) | func (c *Ctx) VerifyUpdate(sh SessionHandle, part []byte) error {
method VerifyFinal (line 1378) | func (c *Ctx) VerifyFinal(sh SessionHandle, signature []byte) error {
method VerifyRecoverInit (line 1385) | func (c *Ctx) VerifyRecoverInit(sh SessionHandle, m []*Mechanism, key ...
method VerifyRecover (line 1394) | func (c *Ctx) VerifyRecover(sh SessionHandle, signature []byte) ([]byt...
method DigestEncryptUpdate (line 1410) | func (c *Ctx) DigestEncryptUpdate(sh SessionHandle, part []byte) ([]by...
method DecryptDigestUpdate (line 1425) | func (c *Ctx) DecryptDigestUpdate(sh SessionHandle, cipher []byte) ([]...
method SignEncryptUpdate (line 1440) | func (c *Ctx) SignEncryptUpdate(sh SessionHandle, part []byte) ([]byte...
method DecryptVerifyUpdate (line 1455) | func (c *Ctx) DecryptVerifyUpdate(sh SessionHandle, cipher []byte) ([]...
method GenerateKey (line 1470) | func (c *Ctx) GenerateKey(sh SessionHandle, m []*Mechanism, temp []*At...
method GenerateKeyPair (line 1485) | func (c *Ctx) GenerateKeyPair(sh SessionHandle, m []*Mechanism, public...
method WrapKey (line 1505) | func (c *Ctx) WrapKey(sh SessionHandle, m []*Mechanism, wrappingkey, k...
method UnwrapKey (line 1522) | func (c *Ctx) UnwrapKey(sh SessionHandle, m []*Mechanism, unwrappingke...
method DeriveKey (line 1533) | func (c *Ctx) DeriveKey(sh SessionHandle, m []*Mechanism, basekey Obje...
method SeedRandom (line 1545) | func (c *Ctx) SeedRandom(sh SessionHandle, seed []byte) error {
method GenerateRandom (line 1551) | func (c *Ctx) GenerateRandom(sh SessionHandle, length int) ([]byte, er...
method WaitForSlotEvent (line 1564) | func (c *Ctx) WaitForSlotEvent(flags uint) chan SlotEvent {
method waitForSlotEventHelper (line 1570) | func (c *Ctx) waitForSlotEventHelper(f uint, sl chan SlotEvent) {
function New (line 750) | func New(module string) *Ctx {
FILE: vendor/github.com/docker/docker/vendor/github.com/miekg/pkcs11/pkcs11.h
type CK_FUNCTION_LIST (line 279) | struct CK_FUNCTION_LIST {
FILE: vendor/github.com/docker/docker/vendor/github.com/miekg/pkcs11/pkcs11t.h
type CK_BYTE (line 44) | typedef unsigned char CK_BYTE;
type CK_BYTE (line 47) | typedef CK_BYTE CK_CHAR;
type CK_BYTE (line 50) | typedef CK_BYTE CK_UTF8CHAR;
type CK_BYTE (line 53) | typedef CK_BYTE CK_BBOOL;
type CK_ULONG (line 56) | typedef unsigned long int CK_ULONG;
type CK_LONG (line 60) | typedef long int CK_LONG;
type CK_ULONG (line 63) | typedef CK_ULONG CK_FLAGS;
type CK_BYTE (line 71) | typedef CK_BYTE CK_PTR CK_BYTE_PTR;
type CK_CHAR (line 72) | typedef CK_CHAR CK_PTR CK_CHAR_PTR;
type CK_UTF8CHAR (line 73) | typedef CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR;
type CK_ULONG (line 74) | typedef CK_ULONG CK_PTR CK_ULONG_PTR;
type CK_VOID_PTR (line 75) | typedef void CK_PTR CK_VOID_PTR;
type CK_VOID_PTR (line 78) | typedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR;
type CK_VERSION (line 86) | typedef struct CK_VERSION {
type CK_VERSION (line 91) | typedef CK_VERSION CK_PTR CK_VERSION_PTR;
type CK_INFO (line 94) | typedef struct CK_INFO {
type CK_INFO (line 106) | typedef CK_INFO CK_PTR CK_INFO_PTR;
type CK_ULONG (line 113) | typedef CK_ULONG CK_NOTIFICATION;
type CK_ULONG (line 120) | typedef CK_ULONG CK_SLOT_ID;
type CK_SLOT_ID (line 122) | typedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR;
type CK_SLOT_INFO (line 126) | typedef struct CK_SLOT_INFO {
type CK_SLOT_INFO (line 145) | typedef CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR;
type CK_TOKEN_INFO (line 149) | typedef struct CK_TOKEN_INFO {
type CK_TOKEN_INFO (line 268) | typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR;
type CK_ULONG (line 273) | typedef CK_ULONG CK_SESSION_HANDLE;
type CK_SESSION_HANDLE (line 275) | typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR;
type CK_ULONG (line 281) | typedef CK_ULONG CK_USER_TYPE;
type CK_ULONG (line 292) | typedef CK_ULONG CK_STATE;
type CK_SESSION_INFO (line 301) | typedef struct CK_SESSION_INFO {
type CK_SESSION_INFO (line 317) | typedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR;
type CK_ULONG (line 322) | typedef CK_ULONG CK_OBJECT_HANDLE;
type CK_OBJECT_HANDLE (line 324) | typedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR;
type CK_ULONG (line 332) | typedef CK_ULONG CK_OBJECT_CLASS;
type CK_OBJECT_CLASS (line 352) | typedef CK_OBJECT_CLASS CK_PTR CK_OBJECT_CLASS_PTR;
type CK_ULONG (line 357) | typedef CK_ULONG CK_HW_FEATURE_TYPE;
type CK_ULONG (line 368) | typedef CK_ULONG CK_KEY_TYPE;
type CK_ULONG (line 425) | typedef CK_ULONG CK_CERTIFICATE_TYPE;
type CK_ULONG (line 440) | typedef CK_ULONG CK_ATTRIBUTE_TYPE;
type CK_ATTRIBUTE (line 606) | typedef struct CK_ATTRIBUTE {
type CK_ATTRIBUTE (line 614) | typedef CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR;
type CK_DATE (line 618) | typedef struct CK_DATE{
type CK_ULONG (line 629) | typedef CK_ULONG CK_MECHANISM_TYPE;
type CK_MECHANISM_TYPE (line 998) | typedef CK_MECHANISM_TYPE CK_PTR CK_MECHANISM_TYPE_PTR;
type CK_MECHANISM (line 1003) | typedef struct CK_MECHANISM {
type CK_MECHANISM (line 1012) | typedef CK_MECHANISM CK_PTR CK_MECHANISM_PTR;
type CK_MECHANISM_INFO (line 1017) | typedef struct CK_MECHANISM_INFO {
type CK_MECHANISM_INFO (line 1058) | typedef CK_MECHANISM_INFO CK_PTR CK_MECHANISM_INFO_PTR;
type CK_ULONG (line 1064) | typedef CK_ULONG CK_RV;
type CK_FUNCTION_LIST (line 1215) | typedef struct CK_FUNCTION_LIST CK_FUNCTION_LIST;
type CK_FUNCTION_LIST (line 1217) | typedef CK_FUNCTION_LIST CK_PTR CK_FUNCTION_LIST_PTR;
type CK_FUNCTION_LIST_PTR (line 1219) | typedef CK_FUNCTION_LIST_PTR CK_PTR CK_FUNCTION_LIST_PTR_PTR;
type CK_C_INITIALIZE_ARGS (line 1251) | typedef struct CK_C_INITIALIZE_ARGS {
type CK_C_INITIALIZE_ARGS (line 1266) | typedef CK_C_INITIALIZE_ARGS CK_PTR CK_C_INITIALIZE_ARGS_PTR;
type CK_ULONG (line 1279) | typedef CK_ULONG CK_RSA_PKCS_MGF_TYPE;
type CK_RSA_PKCS_MGF_TYPE (line 1281) | typedef CK_RSA_PKCS_MGF_TYPE CK_PTR CK_RSA_PKCS_MGF_TYPE_PTR;
type CK_ULONG (line 1297) | typedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE;
type CK_RSA_PKCS_OAEP_SOURCE_TYPE (line 1299) | typedef CK_RSA_PKCS_OAEP_SOURCE_TYPE CK_PTR CK_RSA_PKCS_OAEP_SOURCE_TYPE...
type CK_RSA_PKCS_OAEP_PARAMS (line 1307) | typedef struct CK_RSA_PKCS_OAEP_PARAMS {
type CK_RSA_PKCS_OAEP_PARAMS (line 1315) | typedef CK_RSA_PKCS_OAEP_PARAMS CK_PTR CK_RSA_PKCS_OAEP_PARAMS_PTR;
type CK_RSA_PKCS_PSS_PARAMS (line 1320) | typedef struct CK_RSA_PKCS_PSS_PARAMS {
type CK_RSA_PKCS_PSS_PARAMS (line 1326) | typedef CK_RSA_PKCS_PSS_PARAMS CK_PTR CK_RSA_PKCS_PSS_PARAMS_PTR;
type CK_ULONG (line 1329) | typedef CK_ULONG CK_EC_KDF_TYPE;
type CK_ECDH1_DERIVE_PARAMS (line 1340) | typedef struct CK_ECDH1_DERIVE_PARAMS {
type CK_ECDH1_DERIVE_PARAMS (line 1348) | typedef CK_ECDH1_DERIVE_PARAMS CK_PTR CK_ECDH1_DERIVE_PARAMS_PTR;
type CK_ECDH2_DERIVE_PARAMS (line 1354) | typedef struct CK_ECDH2_DERIVE_PARAMS {
type CK_ECDH2_DERIVE_PARAMS (line 1366) | typedef CK_ECDH2_DERIVE_PARAMS CK_PTR CK_ECDH2_DERIVE_PARAMS_PTR;
type CK_ECMQV_DERIVE_PARAMS (line 1368) | typedef struct CK_ECMQV_DERIVE_PARAMS {
type CK_ECMQV_DERIVE_PARAMS (line 1381) | typedef CK_ECMQV_DERIVE_PARAMS CK_PTR CK_ECMQV_DERIVE_PARAMS_PTR;
type CK_ULONG (line 1385) | typedef CK_ULONG CK_X9_42_DH_KDF_TYPE;
type CK_X9_42_DH_KDF_TYPE (line 1386) | typedef CK_X9_42_DH_KDF_TYPE CK_PTR CK_X9_42_DH_KDF_TYPE_PTR;
type CK_X9_42_DH1_DERIVE_PARAMS (line 1397) | typedef struct CK_X9_42_DH1_DERIVE_PARAMS {
type CK_X9_42_DH1_DERIVE_PARAMS_PTR (line 1405) | typedef struct CK_X9_42_DH1_DERIVE_PARAMS CK_PTR CK_X9_42_DH1_DERIVE_PAR...
type CK_X9_42_DH2_DERIVE_PARAMS (line 1411) | typedef struct CK_X9_42_DH2_DERIVE_PARAMS {
type CK_X9_42_DH2_DERIVE_PARAMS (line 1423) | typedef CK_X9_42_DH2_DERIVE_PARAMS CK_PTR CK_X9_42_DH2_DERIVE_PARAMS_PTR;
type CK_X9_42_MQV_DERIVE_PARAMS (line 1425) | typedef struct CK_X9_42_MQV_DERIVE_PARAMS {
type CK_X9_42_MQV_DERIVE_PARAMS (line 1438) | typedef CK_X9_42_MQV_DERIVE_PARAMS CK_PTR CK_X9_42_MQV_DERIVE_PARAMS_PTR;
type CK_KEA_DERIVE_PARAMS (line 1443) | typedef struct CK_KEA_DERIVE_PARAMS {
type CK_KEA_DERIVE_PARAMS (line 1452) | typedef CK_KEA_DERIVE_PARAMS CK_PTR CK_KEA_DERIVE_PARAMS_PTR;
type CK_ULONG (line 1458) | typedef CK_ULONG CK_RC2_PARAMS;
type CK_RC2_PARAMS (line 1460) | typedef CK_RC2_PARAMS CK_PTR CK_RC2_PARAMS_PTR;
type CK_RC2_CBC_PARAMS (line 1465) | typedef struct CK_RC2_CBC_PARAMS {
type CK_RC2_CBC_PARAMS (line 1473) | typedef CK_RC2_CBC_PARAMS CK_PTR CK_RC2_CBC_PARAMS_PTR;
type CK_RC2_MAC_GENERAL_PARAMS (line 1479) | typedef struct CK_RC2_MAC_GENERAL_PARAMS {
type CK_RC2_MAC_GENERAL_PARAMS (line 1484) | typedef CK_RC2_MAC_GENERAL_PARAMS CK_PTR \
type CK_RC5_PARAMS (line 1491) | typedef struct CK_RC5_PARAMS {
type CK_RC5_PARAMS (line 1496) | typedef CK_RC5_PARAMS CK_PTR CK_RC5_PARAMS_PTR;
type CK_RC5_CBC_PARAMS (line 1502) | typedef struct CK_RC5_CBC_PARAMS {
type CK_RC5_CBC_PARAMS (line 1509) | typedef CK_RC5_CBC_PARAMS CK_PTR CK_RC5_CBC_PARAMS_PTR;
type CK_RC5_MAC_GENERAL_PARAMS (line 1515) | typedef struct CK_RC5_MAC_GENERAL_PARAMS {
type CK_RC5_MAC_GENERAL_PARAMS (line 1521) | typedef CK_RC5_MAC_GENERAL_PARAMS CK_PTR \
type CK_ULONG (line 1529) | typedef CK_ULONG CK_MAC_GENERAL_PARAMS;
type CK_MAC_GENERAL_PARAMS (line 1531) | typedef CK_MAC_GENERAL_PARAMS CK_PTR CK_MAC_GENERAL_PARAMS_PTR;
type CK_DES_CBC_ENCRYPT_DATA_PARAMS (line 1534) | typedef struct CK_DES_CBC_ENCRYPT_DATA_PARAMS {
type CK_DES_CBC_ENCRYPT_DATA_PARAMS (line 1540) | typedef CK_DES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_DES_CBC_ENCRYPT_DATA_PA...
type CK_AES_CBC_ENCRYPT_DATA_PARAMS (line 1542) | typedef struct CK_AES_CBC_ENCRYPT_DATA_PARAMS {
type CK_AES_CBC_ENCRYPT_DATA_PARAMS (line 1548) | typedef CK_AES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_AES_CBC_ENCRYPT_DATA_PA...
type CK_SKIPJACK_PRIVATE_WRAP_PARAMS (line 1553) | typedef struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS {
type CK_SKIPJACK_PRIVATE_WRAP_PARAMS (line 1567) | typedef CK_SKIPJACK_PRIVATE_WRAP_PARAMS CK_PTR \
type CK_SKIPJACK_RELAYX_PARAMS (line 1574) | typedef struct CK_SKIPJACK_RELAYX_PARAMS {
type CK_SKIPJACK_RELAYX_PARAMS (line 1591) | typedef CK_SKIPJACK_RELAYX_PARAMS CK_PTR \
type CK_PBE_PARAMS (line 1595) | typedef struct CK_PBE_PARAMS {
type CK_PBE_PARAMS (line 1604) | typedef CK_PBE_PARAMS CK_PTR CK_PBE_PARAMS_PTR;
type CK_KEY_WRAP_SET_OAEP_PARAMS (line 1610) | typedef struct CK_KEY_WRAP_SET_OAEP_PARAMS {
type CK_KEY_WRAP_SET_OAEP_PARAMS (line 1616) | typedef CK_KEY_WRAP_SET_OAEP_PARAMS CK_PTR \
type CK_SSL3_RANDOM_DATA (line 1620) | typedef struct CK_SSL3_RANDOM_DATA {
type CK_SSL3_MASTER_KEY_DERIVE_PARAMS (line 1628) | typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS {
type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR (line 1633) | typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS CK_PTR \
type CK_SSL3_KEY_MAT_OUT (line 1637) | typedef struct CK_SSL3_KEY_MAT_OUT {
type CK_SSL3_KEY_MAT_OUT (line 1646) | typedef CK_SSL3_KEY_MAT_OUT CK_PTR CK_SSL3_KEY_MAT_OUT_PTR;
type CK_SSL3_KEY_MAT_PARAMS (line 1649) | typedef struct CK_SSL3_KEY_MAT_PARAMS {
type CK_SSL3_KEY_MAT_PARAMS (line 1658) | typedef CK_SSL3_KEY_MAT_PARAMS CK_PTR CK_SSL3_KEY_MAT_PARAMS_PTR;
type CK_TLS_PRF_PARAMS (line 1661) | typedef struct CK_TLS_PRF_PARAMS {
type CK_TLS_PRF_PARAMS (line 1670) | typedef CK_TLS_PRF_PARAMS CK_PTR CK_TLS_PRF_PARAMS_PTR;
type CK_WTLS_RANDOM_DATA (line 1673) | typedef struct CK_WTLS_RANDOM_DATA {
type CK_WTLS_RANDOM_DATA (line 1680) | typedef CK_WTLS_RANDOM_DATA CK_PTR CK_WTLS_RANDOM_DATA_PTR;
type CK_WTLS_MASTER_KEY_DERIVE_PARAMS (line 1682) | typedef struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS {
type CK_WTLS_MASTER_KEY_DERIVE_PARAMS (line 1688) | typedef CK_WTLS_MASTER_KEY_DERIVE_PARAMS CK_PTR \
type CK_WTLS_PRF_PARAMS (line 1691) | typedef struct CK_WTLS_PRF_PARAMS {
type CK_WTLS_PRF_PARAMS (line 1701) | typedef CK_WTLS_PRF_PARAMS CK_PTR CK_WTLS_PRF_PARAMS_PTR;
type CK_WTLS_KEY_MAT_OUT (line 1703) | typedef struct CK_WTLS_KEY_MAT_OUT {
type CK_WTLS_KEY_MAT_OUT (line 1709) | typedef CK_WTLS_KEY_MAT_OUT CK_PTR CK_WTLS_KEY_MAT_OUT_PTR;
type CK_WTLS_KEY_MAT_PARAMS (line 1711) | typedef struct CK_WTLS_KEY_MAT_PARAMS {
type CK_WTLS_KEY_MAT_PARAMS (line 1722) | typedef CK_WTLS_KEY_MAT_PARAMS CK_PTR CK_WTLS_KEY_MAT_PARAMS_PTR;
type CK_CMS_SIG_PARAMS (line 1725) | typedef struct CK_CMS_SIG_PARAMS {
type CK_CMS_SIG_PARAMS (line 1736) | typedef CK_CMS_SIG_PARAMS CK_PTR CK_CMS_SIG_PARAMS_PTR;
type CK_KEY_DERIVATION_STRING_DATA (line 1738) | typedef struct CK_KEY_DERIVATION_STRING_DATA {
type CK_KEY_DERIVATION_STRING_DATA (line 1743) | typedef CK_KEY_DERIVATION_STRING_DATA CK_PTR \
type CK_ULONG (line 1752) | typedef CK_ULONG CK_EXTRACT_PARAMS;
type CK_EXTRACT_PARAMS (line 1754) | typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR;
type CK_ULONG (line 1760) | typedef CK_ULONG CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE;
type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE (line 1762) | typedef CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE CK_PTR CK_PKCS5_PBKD2...
type CK_ULONG (line 1772) | typedef CK_ULONG CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE;
type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE (line 1774) | typedef CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE CK_PTR CK_PKCS5_PBKDF2_SALT_SOU...
type CK_PKCS5_PBKD2_PARAMS (line 1782) | typedef struct CK_PKCS5_PBKD2_PARAMS {
type CK_PKCS5_PBKD2_PARAMS (line 1794) | typedef CK_PKCS5_PBKD2_PARAMS CK_PTR CK_PKCS5_PBKD2_PARAMS_PTR;
type CK_ULONG (line 1798) | typedef CK_ULONG CK_OTP_PARAM_TYPE;
type CK_OTP_PARAM_TYPE (line 1799) | typedef CK_OTP_PARAM_TYPE CK_PARAM_TYPE;
type CK_OTP_PARAM (line 1801) | typedef struct CK_OTP_PARAM {
type CK_OTP_PARAM (line 1807) | typedef CK_OTP_PARAM CK_PTR CK_OTP_PARAM_PTR;
type CK_OTP_PARAMS (line 1809) | typedef struct CK_OTP_PARAMS {
type CK_OTP_PARAMS (line 1814) | typedef CK_OTP_PARAMS CK_PTR CK_OTP_PARAMS_PTR;
type CK_OTP_SIGNATURE_INFO (line 1816) | typedef struct CK_OTP_SIGNATURE_INFO {
type CK_OTP_SIGNATURE_INFO (line 1821) | typedef CK_OTP_SIGNATURE_INFO CK_PTR CK_OTP_SIGNATURE_INFO_PTR;
type CK_KIP_PARAMS (line 1842) | typedef struct CK_KIP_PARAMS {
type CK_KIP_PARAMS (line 1849) | typedef CK_KIP_PARAMS CK_PTR CK_KIP_PARAMS_PTR;
type CK_AES_CTR_PARAMS (line 1852) | typedef struct CK_AES_CTR_PARAMS {
type CK_AES_CTR_PARAMS (line 1857) | typedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR;
type CK_CAMELLIA_CTR_PARAMS (line 1860) | typedef struct CK_CAMELLIA_CTR_PARAMS {
type CK_CAMELLIA_CTR_PARAMS (line 1865) | typedef CK_CAMELLIA_CTR_PARAMS CK_PTR CK_CAMELLIA_CTR_PARAMS_PTR;
type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS (line 1868) | typedef struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS {
type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS (line 1874) | typedef CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_CAMELLIA_CBC_ENCRY...
type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS (line 1877) | typedef struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS {
type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS (line 1883) | typedef CK_ARIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_ARIA_CBC_ENCRYPT_DATA_...
FILE: vendor/github.com/docker/docker/vendor/github.com/miekg/pkcs11/types.go
type arena (line 34) | type arena
method Allocate (line 36) | func (a *arena) Allocate(obj []byte) (C.CK_VOID_PTR, C.CK_ULONG) {
method Free (line 43) | func (a arena) Free() {
function toList (line 50) | func toList(clist C.CK_ULONG_PTR, size C.CK_ULONG) []uint {
function cBBool (line 60) | func cBBool(x bool) C.CK_BBOOL {
function uintToBytes (line 67) | func uintToBytes(x uint64) []byte {
type Error (line 73) | type Error
method Error (line 75) | func (e Error) Error() string {
function toError (line 79) | func toError(e C.CK_RV) error {
type SessionHandle (line 87) | type SessionHandle
type ObjectHandle (line 90) | type ObjectHandle
type Version (line 93) | type Version struct
function toVersion (line 98) | func toVersion(version C.CK_VERSION) Version {
type SlotEvent (line 104) | type SlotEvent struct
type Info (line 109) | type Info struct
type SlotInfo (line 118) | type SlotInfo struct
type TokenInfo (line 127) | type TokenInfo struct
type SessionInfo (line 149) | type SessionInfo struct
type Attribute (line 157) | type Attribute struct
function NewAttribute (line 166) | func NewAttribute(typ uint, x interface{}) *Attribute {
function cAttributeList (line 199) | func cAttributeList(a []*Attribute) (arena, C.CK_ATTRIBUTE_PTR, C.CK_ULO...
function cDate (line 215) | func cDate(t time.Time) []byte {
type Mechanism (line 228) | type Mechanism struct
function NewMechanism (line 233) | func NewMechanism(mech uint, x interface{}) *Mechanism {
function cMechanismList (line 246) | func cMechanismList(m []*Mechanism) (arena, C.CK_MECHANISM_PTR, C.CK_ULO...
type MechanismInfo (line 263) | type MechanismInfo struct
FILE: vendor/github.com/docker/docker/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_gccgo.go
function init (line 18) | func init() {
FILE: vendor/github.com/docker/docker/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c
type sync_t (line 31) | enum sync_t {
type clone_t (line 50) | struct clone_t {
type nlconfig_t (line 63) | struct nlconfig_t {
function setns (line 103) | int setns(int fd, int nstype)
function write_file (line 127) | static int write_file(char *data, size_t data_len, char *pathfmt, ...)
type policy_t (line 156) | enum policy_t {
function update_setgroups (line 163) | static void update_setgroups(int pid, enum policy_t setgroup)
function update_uidmap (line 189) | static void update_uidmap(int pid, char *map, int map_len)
function update_gidmap (line 198) | static void update_gidmap(int pid, char *map, int map_len)
function child_func (line 209) | static int child_func(void *arg)
function clone_parent (line 216) | static int clone_parent(jmp_buf *env, int jmpval)
function initpipe (line 231) | static int initpipe(void)
function nsflag (line 248) | static int nsflag(char *name)
function readint32 (line 269) | static uint32_t readint32(char *buf)
function readint8 (line 274) | static uint8_t readint8(char *buf)
function nl_parse (line 279) | static void nl_parse(int fd, struct nlconfig_t *config)
function nl_free (line 353) | void nl_free(struct nlconfig_t *config)
function join_namespaces (line 358) | void join_namespaces(char *nslist)
function nsexec (line 423) | void nsexec(void)
FILE: vendor/github.com/docker/go-connections/nat/nat.go
constant portSpecTemplate (line 13) | portSpecTemplate = "ip:hostPort:containerPort"
type PortBinding (line 17) | type PortBinding struct
type PortMap (line 25) | type PortMap
type PortSet (line 28) | type PortSet
type Port (line 31) | type Port
method Proto (line 74) | func (p Port) Proto() string {
method Port (line 80) | func (p Port) Port() string {
method Int (line 86) | func (p Port) Int() int {
method Range (line 95) | func (p Port) Range() (int, int, error) {
function NewPort (line 34) | func NewPort(proto, port string) (Port, error) {
function ParsePort (line 50) | func ParsePort(rawPort string) (int, error) {
function ParsePortRangeToInt (line 62) | func ParsePortRangeToInt(rawPort string) (int, int, error) {
function SplitProtoPort (line 100) | func SplitProtoPort(rawPort string) (string, string) {
function validateProto (line 115) | func validateProto(proto string) bool {
function ParsePortSpecs (line 126) | func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortB...
type PortMapping (line 153) | type PortMapping struct
function splitParts (line 158) | func splitParts(rawport string) (string, string, string) {
function ParsePortSpec (line 176) | func ParsePortSpec(rawPort string) ([]PortMapping, error) {
FILE: vendor/github.com/docker/go-connections/nat/parse.go
function PartParse
Condensed preview — 605 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,634K chars).
[
{
"path": ".dockerignore",
"chars": 66,
"preview": ".git\ndocs/*\n!docs/img/logo64x64.png\nLICENSE\nMAINTAINERS\nREADME.md\n"
},
{
"path": ".gitignore",
"chars": 159,
"preview": ".DS_Store\nworld/banlist.sqlite\nworld/itemblacklist\nworld/logs/*\nworld/players\nworld/whitelist.sqlite\nworld/world/stats/P"
},
{
"path": "CONTRIBUTING.md",
"chars": 718,
"preview": "# Contributing to Dockercraft\n\nWant to hack on Dockercraft? Awesome! Here are instructions to get you\nstarted.\n\nDockercr"
},
{
"path": "Docker/config.lua",
"chars": 691,
"preview": "-- config sets all configuration variables\n-- for the Docker plugin.\n\n-- X,Z positions to draw first container\nCONTAINER"
},
{
"path": "Docker/container.lua",
"chars": 6752,
"preview": "-- Container object is the representation of a Docker\n-- container in the Minecraft world\n\n-- constant variables\nCONTAIN"
},
{
"path": "Docker/docker.lua",
"chars": 9562,
"preview": "----------------------------------------\n-- GLOBALS\n----------------------------------------\n\n-- queue containing the up"
},
{
"path": "Docker/error.lua",
"chars": 160,
"preview": "-- NewError returns an error object.\n-- An error has a code and a message\nfunction NewError(code, message)\n err = {code"
},
{
"path": "Docker/json.lua",
"chars": 7233,
"preview": "-- from https://gist.github.com/tylerneylon/59f4bcf316be525b30ab\n-- by @tylerneylon\n\n--[[ json.lua\nA compact pure-Lua JS"
},
{
"path": "Docker/log.lua",
"chars": 579,
"preview": "\n-- Print contents of `tbl`, with indentation.\n-- `indent` sets the initial level of indentation.\nfunction logTable (tbl"
},
{
"path": "Docker/tcpclient.lua",
"chars": 3891,
"preview": "json = require \"json\"\n\nTCP_CONN = nil\nTCP_DATA = \"\"\n\nTCP_CLIENT = {\n\n OnConnected = function (TCPConn)\n -- The speci"
},
{
"path": "Docker/update.lua",
"chars": 3615,
"preview": "-- UPDATE OPERATIONS\n-- The following functions can be used to update blocks in the map.\n-- There are 3 update types:\n--"
},
{
"path": "Dockerfile",
"chars": 959,
"preview": "FROM alpine:3.6 AS wget\nRUN apk add --no-cache ca-certificates wget tar\n\nFROM wget AS docker\nARG DOCKER_VERSION=17.09.0-"
},
{
"path": "LICENSE",
"chars": 10765,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MAINTAINERS",
"chars": 1010,
"preview": "# Dockercraft maintainers file\n#\n# This file describes who runs the docker/dockercraft project and how.\n# This is a livi"
},
{
"path": "Makefile",
"chars": 940,
"preview": ".PHONY: all test test-local install-deps lint fmt vet build serve\n\nREPO_NAME = dockercraft\nREPO_OWNER = docker\nPKG_NAME "
},
{
"path": "README.md",
"chars": 6393,
"preview": "# Dockercraft\n\n\n\nA simple Min"
},
{
"path": "circle.yml",
"chars": 136,
"preview": "---\nmachine:\n services:\n - docker\n\ndependencies:\n override:\n - echo \"Nothing to see here..\" \n\ntest:\n override:\n"
},
{
"path": "config/motd.txt",
"chars": 207,
"preview": "@9Welcome to Dockercraft!\n@9https://github.com/docker/dockercraft\n@cWarning: Use on your local machine only\n@cDockercraf"
},
{
"path": "config/settings.ini",
"chars": 1014,
"preview": "; This is the main server configuration\n; Most of the settings here can be configured using the webadmin interface, if e"
},
{
"path": "config/start.sh",
"chars": 473,
"preview": "#!/bin/sh\n\nset -e\n\nbiome=\"Plains\"\ngroundlevel=\"62\"\nsealevel=\"0\"\nfinishers=\"\"\n\nif [ -n \"$1\" ]; then\n biome=\"$1\"\nfi\n\nif"
},
{
"path": "config/world/world.ini",
"chars": 891,
"preview": "; This is the per-world configuration file, managing settings such as generators, simulators, and spawn points\n\n[General"
},
{
"path": "daemon.go",
"chars": 14362,
"preview": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n\t\"net\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sy"
},
{
"path": "docker-compose.yml",
"chars": 155,
"preview": "dockercraft:\n container_name: dockercraft\n build: .\n volumes:\n - \"/var/run/docker.sock:/var/run/docker.sock\"\n por"
},
{
"path": "main.go",
"chars": 813,
"preview": "package main\n\nimport (\n\t\"flag\"\n\tlog \"github.com/Sirupsen/logrus\"\n\t\"os\"\n)\n\n// The main purpose of this application is to "
},
{
"path": "setup.go",
"chars": 3104,
"preview": "package main\n\nimport (\n\t\"archive/tar\"\n\t\"compress/gzip\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path\"\n\t\"strconv\"\n\t\"strings\"\n\n\tlog \"gith"
},
{
"path": "vendor/github.com/Microsoft/go-winio/LICENSE",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Microsoft\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "vendor/github.com/Microsoft/go-winio/README.md",
"chars": 1038,
"preview": "# go-winio\n\nThis repository contains utilities for efficiently performing Win32 IO operations in\nGo. Currently, this is "
},
{
"path": "vendor/github.com/Microsoft/go-winio/backup.go",
"chars": 7769,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"runtime\"\n\t\"sys"
},
{
"path": "vendor/github.com/Microsoft/go-winio/file.go",
"chars": 5505,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"runtime\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n)\n\n//sys cancelIoEx(fil"
},
{
"path": "vendor/github.com/Microsoft/go-winio/fileinfo.go",
"chars": 2052,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//sys getFileInformationByHandleEx(h syscall.Ha"
},
{
"path": "vendor/github.com/Microsoft/go-winio/pipe.go",
"chars": 10727,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\t\"unsafe\"\n)\n\n//sys connectNam"
},
{
"path": "vendor/github.com/Microsoft/go-winio/privilege.go",
"chars": 5415,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unicode/ut"
},
{
"path": "vendor/github.com/Microsoft/go-winio/reparse.go",
"chars": 3471,
"preview": "package winio\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode/utf16\"\n\t\"unsafe\"\n)\n\nconst (\n\treparseTagM"
},
{
"path": "vendor/github.com/Microsoft/go-winio/sd.go",
"chars": 3289,
"preview": "// +build windows\n\npackage winio\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//sys lookupAccountName(systemName *uint16, accountNa"
},
{
"path": "vendor/github.com/Microsoft/go-winio/syscall.go",
"chars": 162,
"preview": "package winio\n\n//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go"
},
{
"path": "vendor/github.com/Microsoft/go-winio/zsyscall_windows.go",
"chars": 17141,
"preview": "// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT\n\npackage winio\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x"
},
{
"path": "vendor/github.com/Sirupsen/logrus/LICENSE",
"chars": 1082,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Simon Eskildsen\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "vendor/github.com/Sirupsen/logrus/README.md",
"chars": 20694,
"preview": "# Logrus <img src=\"http://i.imgur.com/hTeVwmJ.png\" width=\"40\" height=\"40\" alt=\":walrus:\" class=\"emoji\" title=\":walrus:\"/"
},
{
"path": "vendor/github.com/Sirupsen/logrus/alt_exit.go",
"chars": 2246,
"preview": "package logrus\n\n// The following code was sourced and modified from the\n// https://github.com/tebeka/atexit package gove"
},
{
"path": "vendor/github.com/Sirupsen/logrus/doc.go",
"chars": 586,
"preview": "/*\nPackage logrus is a structured logger for Go, completely API compatible with the standard library logger.\n\n\nThe simpl"
},
{
"path": "vendor/github.com/Sirupsen/logrus/entry.go",
"chars": 6821,
"preview": "package logrus\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n)\n\nvar bufferPool *sync.Pool\n\nfunc init() {\n\tbufferPool ="
},
{
"path": "vendor/github.com/Sirupsen/logrus/exported.go",
"chars": 4876,
"preview": "package logrus\n\nimport (\n\t\"io\"\n)\n\nvar (\n\t// std is the name of the standard logger in stdlib `log`\n\tstd = New()\n)\n\nfunc "
},
{
"path": "vendor/github.com/Sirupsen/logrus/formatter.go",
"chars": 1368,
"preview": "package logrus\n\nimport \"time\"\n\nconst DefaultTimestampFormat = time.RFC3339\n\n// The Formatter interface is used to implem"
},
{
"path": "vendor/github.com/Sirupsen/logrus/hooks.go",
"chars": 1101,
"preview": "package logrus\n\n// A hook to be fired when logging on the logging levels returned from\n// `Levels()` on your implementat"
},
{
"path": "vendor/github.com/Sirupsen/logrus/json_formatter.go",
"chars": 1686,
"preview": "package logrus\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\ntype fieldKey string\ntype FieldMap map[fieldKey]string\n\nconst (\n\tFie"
},
{
"path": "vendor/github.com/Sirupsen/logrus/logger.go",
"chars": 7707,
"preview": "package logrus\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n)\n\ntype Logger struct {\n\t// The logs are `io.Copy`'d to this in a mutex. It"
},
{
"path": "vendor/github.com/Sirupsen/logrus/logrus.go",
"chars": 3666,
"preview": "package logrus\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"strings\"\n)\n\n// Fields type, used to pass to `WithFields`.\ntype Fields map[strin"
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_appengine.go",
"chars": 171,
"preview": "// +build appengine\n\npackage logrus\n\nimport \"io\"\n\n// IsTerminal returns true if stderr's file descriptor is a terminal.\n"
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_bsd.go",
"chars": 178,
"preview": "// +build darwin freebsd openbsd netbsd dragonfly\n// +build !appengine\n\npackage logrus\n\nimport \"syscall\"\n\nconst ioctlRea"
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_linux.go",
"chars": 312,
"preview": "// Based on ssh/terminal:\n// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed "
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_notwindows.go",
"chars": 670,
"preview": "// Based on ssh/terminal:\n// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed "
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_solaris.go",
"chars": 352,
"preview": "// +build solaris,!appengine\n\npackage logrus\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// IsTerminal returns tr"
},
{
"path": "vendor/github.com/Sirupsen/logrus/terminal_windows.go",
"chars": 721,
"preview": "// Based on ssh/terminal:\n// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed "
},
{
"path": "vendor/github.com/Sirupsen/logrus/text_formatter.go",
"chars": 4374,
"preview": "package logrus\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\nconst (\n\tnocolor = 0\n\tred = 31\n\tgreen"
},
{
"path": "vendor/github.com/Sirupsen/logrus/writer.go",
"chars": 1269,
"preview": "package logrus\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"runtime\"\n)\n\nfunc (logger *Logger) Writer() *io.PipeWriter {\n\treturn logger.Wri"
},
{
"path": "vendor/github.com/docker/distribution/LICENSE",
"chars": 11325,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "vendor/github.com/docker/distribution/README.md",
"chars": 5527,
"preview": "# Distribution\n\nThe Docker toolset to pack, ship, store, and deliver content.\n\nThis repository's main product is the Doc"
},
{
"path": "vendor/github.com/docker/distribution/digestset/set.go",
"chars": 6745,
"preview": "package digestset\n\nimport (\n\t\"errors\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\nvar ("
},
{
"path": "vendor/github.com/docker/distribution/reference/helpers.go",
"chars": 1148,
"preview": "package reference\n\nimport \"path\"\n\n// IsNameOnly returns true if reference only contains a repo name.\nfunc IsNameOnly(ref"
},
{
"path": "vendor/github.com/docker/distribution/reference/normalize.go",
"chars": 4951,
"preview": "package reference\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/docker/distribution/digestset\"\n\t\"github.com/openco"
},
{
"path": "vendor/github.com/docker/distribution/reference/reference.go",
"chars": 11169,
"preview": "// Package reference provides a general type to represent any way of referencing images within the registry.\n// Its main"
},
{
"path": "vendor/github.com/docker/distribution/reference/regexp.go",
"chars": 5266,
"preview": "package reference\n\nimport \"regexp\"\n\nvar (\n\t// alphaNumericRegexp defines the alpha numeric atom, typically a\n\t// compone"
},
{
"path": "vendor/github.com/docker/docker/LICENSE",
"chars": 10765,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/docker/docker/NOTICE",
"chars": 638,
"preview": "Docker\nCopyright 2012-2017 Docker, Inc.\n\nThis product includes software developed at Docker, Inc. (https://www.docker.co"
},
{
"path": "vendor/github.com/docker/docker/README.md",
"chars": 13759,
"preview": "Docker: the container engine [](https://github.com/do"
},
{
"path": "vendor/github.com/docker/docker/api/README.md",
"chars": 2799,
"preview": "# Working on the Engine API\n\nThe Engine API is an HTTP API used by the command-line client to communicate with the daemo"
},
{
"path": "vendor/github.com/docker/docker/api/common.go",
"chars": 4688,
"preview": "package api\n\nimport (\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"mime\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"strconv\"\n\t\"string"
},
{
"path": "vendor/github.com/docker/docker/api/common_unix.go",
"chars": 126,
"preview": "// +build !windows\n\npackage api\n\n// MinVersion represents Minimum REST API version supported\nconst MinVersion string = \""
},
{
"path": "vendor/github.com/docker/docker/api/common_windows.go",
"chars": 380,
"preview": "package api\n\n// MinVersion represents Minimum REST API version supported\n// Technically the first daemon API version rel"
},
{
"path": "vendor/github.com/docker/docker/api/names.go",
"chars": 414,
"preview": "package api\n\nimport \"regexp\"\n\n// RestrictedNameChars collects the characters allowed to represent a name, normally used "
},
{
"path": "vendor/github.com/docker/docker/api/types/auth.go",
"chars": 761,
"preview": "package types\n\n// AuthConfig contains authorization information for connecting to a Registry\ntype AuthConfig struct {\n\tU"
},
{
"path": "vendor/github.com/docker/docker/api/types/blkiodev/blkio.go",
"chars": 464,
"preview": "package blkiodev\n\nimport \"fmt\"\n\n// WeightDevice is a structure that holds device:weight pair\ntype WeightDevice struct {\n"
},
{
"path": "vendor/github.com/docker/docker/api/types/client.go",
"chars": 10566,
"preview": "package types\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"net\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"github.com/docker/docke"
},
{
"path": "vendor/github.com/docker/docker/api/types/configs.go",
"chars": 2187,
"preview": "package types\n\nimport (\n\t\"github.com/docker/docker/api/types/container\"\n\t\"github.com/docker/docker/api/types/network\"\n)\n"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/config.go",
"chars": 3832,
"preview": "package container\n\nimport (\n\t\"time\"\n\n\t\"github.com/docker/docker/api/types/strslice\"\n\t\"github.com/docker/go-connections/n"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/container_changes.go",
"chars": 600,
"preview": "package container\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS F"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/container_create.go",
"chars": 639,
"preview": "package container\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS F"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/container_top.go",
"chars": 673,
"preview": "package container\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS F"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/container_update.go",
"chars": 501,
"preview": "package container\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS F"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/container_wait.go",
"chars": 512,
"preview": "package container\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS F"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/host_config.go",
"chars": 13834,
"preview": "package container\n\nimport (\n\t\"strings\"\n\n\t\"github.com/docker/docker/api/types/blkiodev\"\n\t\"github.com/docker/docker/api/ty"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go",
"chars": 986,
"preview": "// +build !windows\n\npackage container\n\n// IsValid indicates if an isolation technology is valid\nfunc (i Isolation) IsVal"
},
{
"path": "vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go",
"chars": 1343,
"preview": "package container\n\nimport (\n\t\"strings\"\n)\n\n// IsBridge indicates whether container uses the bridge network stack\n// in wi"
},
{
"path": "vendor/github.com/docker/docker/api/types/error_response.go",
"chars": 324,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/events/events.go",
"chars": 1313,
"preview": "package events\n\nconst (\n\t// ContainerEventType is the event type that containers generate\n\tContainerEventType = \"contain"
},
{
"path": "vendor/github.com/docker/docker/api/types/filters/parse.go",
"chars": 8252,
"preview": "// Package filters provides helper function to parse and handle command line\n// filter, used for example in docker ps or"
},
{
"path": "vendor/github.com/docker/docker/api/types/graph_driver_data.go",
"chars": 402,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/id_response.go",
"chars": 349,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/image/image_history.go",
"chars": 781,
"preview": "package image\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS FILE\n"
},
{
"path": "vendor/github.com/docker/docker/api/types/image_delete_response_item.go",
"chars": 467,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/image_summary.go",
"chars": 924,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/mount/mount.go",
"chars": 3927,
"preview": "package mount\n\nimport (\n\t\"os\"\n)\n\n// Type represents the type of a mount.\ntype Type string\n\n// Type constants\nconst (\n\t//"
},
{
"path": "vendor/github.com/docker/docker/api/types/network/network.go",
"chars": 2772,
"preview": "package network\n\n// Address represents an IP address\ntype Address struct {\n\tAddr string\n\tPrefixLen int\n}\n\n// IPAM r"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin.go",
"chars": 3974,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin_device.go",
"chars": 498,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin_env.go",
"chars": 489,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin_interface_type.go",
"chars": 468,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin_mount.go",
"chars": 700,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/plugin_responses.go",
"chars": 1819,
"preview": "package types\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n)\n\n// PluginsListResponse contains the response for the Engine A"
},
{
"path": "vendor/github.com/docker/docker/api/types/port.go",
"chars": 491,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/registry/authenticate.go",
"chars": 643,
"preview": "package registry\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS FI"
},
{
"path": "vendor/github.com/docker/docker/api/types/registry/registry.go",
"chars": 3198,
"preview": "package registry\n\nimport (\n\t\"encoding/json\"\n\t\"net\"\n)\n\n// ServiceConfig stores daemon registry services configuration.\nty"
},
{
"path": "vendor/github.com/docker/docker/api/types/seccomp.go",
"chars": 2961,
"preview": "package types\n\n// Seccomp represents the config for a seccomp profile for syscall restriction.\ntype Seccomp struct {\n\tDe"
},
{
"path": "vendor/github.com/docker/docker/api/types/service_update_response.go",
"chars": 343,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/api/types/stats.go",
"chars": 6858,
"preview": "// Package types is used for API stability in the types and response to the\n// consumers of the API stats endpoint.\npack"
},
{
"path": "vendor/github.com/docker/docker/api/types/strslice/strslice.go",
"chars": 772,
"preview": "package strslice\n\nimport \"encoding/json\"\n\n// StrSlice represents a string or an array of strings.\n// We need to override"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/common.go",
"chars": 684,
"preview": "package swarm\n\nimport \"time\"\n\n// Version represents the internal object version.\ntype Version struct {\n\tIndex uint64 `js"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/container.go",
"chars": 2639,
"preview": "package swarm\n\nimport (\n\t\"time\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"github.com/docker/docker/api/types/mo"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/network.go",
"chars": 3422,
"preview": "package swarm\n\n// Endpoint represents an endpoint.\ntype Endpoint struct {\n\tSpec EndpointSpec `json:\",omitem"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/node.go",
"chars": 3389,
"preview": "package swarm\n\n// Node represents a node.\ntype Node struct {\n\tID string\n\tMeta\n\t// Spec defines the desired state of the "
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/runtime.go",
"chars": 607,
"preview": "package swarm\n\n// RuntimeType is the type of runtime used for the TaskSpec\ntype RuntimeType string\n\n// RuntimeURL is the"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/secret.go",
"chars": 594,
"preview": "package swarm\n\nimport \"os\"\n\n// Secret represents a secret.\ntype Secret struct {\n\tID string\n\tMeta\n\tSpec SecretSpec\n}\n\n// "
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/service.go",
"chars": 4434,
"preview": "package swarm\n\nimport \"time\"\n\n// Service represents a service.\ntype Service struct {\n\tID string\n\tMeta\n\tSpec Serv"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/swarm.go",
"chars": 6095,
"preview": "package swarm\n\nimport \"time\"\n\n// ClusterInfo represents info about the cluster for outputing in \"info\"\n// it contains th"
},
{
"path": "vendor/github.com/docker/docker/api/types/swarm/task.go",
"chars": 4876,
"preview": "package swarm\n\nimport \"time\"\n\n// TaskState represents the state of a task.\ntype TaskState string\n\nconst (\n\t// TaskStateN"
},
{
"path": "vendor/github.com/docker/docker/api/types/time/duration_convert.go",
"chars": 291,
"preview": "package time\n\nimport (\n\t\"strconv\"\n\t\"time\"\n)\n\n// DurationToSecondsString converts the specified duration to the number\n//"
},
{
"path": "vendor/github.com/docker/docker/api/types/time/timestamp.go",
"chars": 4122,
"preview": "package time\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// These are additional predefined layouts for us"
},
{
"path": "vendor/github.com/docker/docker/api/types/types.go",
"chars": 17333,
"preview": "package types\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/docker/docker/api/types/container\""
},
{
"path": "vendor/github.com/docker/docker/api/types/versions/README.md",
"chars": 1211,
"preview": "# Legacy API type versions\n\nThis package includes types for legacy API versions. The stable version of the API types liv"
},
{
"path": "vendor/github.com/docker/docker/api/types/versions/compare.go",
"chars": 1329,
"preview": "package versions\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n)\n\n// compare compares two version strings\n// returns -1 if v1 < v2, 1 "
},
{
"path": "vendor/github.com/docker/docker/api/types/volume/volumes_create.go",
"chars": 902,
"preview": "package volume\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS FILE"
},
{
"path": "vendor/github.com/docker/docker/api/types/volume/volumes_list.go",
"chars": 657,
"preview": "package volume\n\n// ----------------------------------------------------------------------------\n// DO NOT EDIT THIS FILE"
},
{
"path": "vendor/github.com/docker/docker/api/types/volume.go",
"chars": 1594,
"preview": "package types\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run t"
},
{
"path": "vendor/github.com/docker/docker/client/README.md",
"chars": 876,
"preview": "# Go client for the Docker Engine API\n\nThe `docker` command uses this package to communicate with the daemon. It can als"
},
{
"path": "vendor/github.com/docker/docker/client/checkpoint_create.go",
"chars": 430,
"preview": "package client\n\nimport (\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// CheckpointCreate create"
},
{
"path": "vendor/github.com/docker/docker/client/checkpoint_delete.go",
"chars": 568,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// CheckpointD"
},
{
"path": "vendor/github.com/docker/docker/client/checkpoint_list.go",
"chars": 841,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/n"
},
{
"path": "vendor/github.com/docker/docker/client/client.go",
"chars": 7610,
"preview": "/*\nPackage client is a Go client for the Docker Engine API.\n\nThe \"docker\" command uses this package to communicate with "
},
{
"path": "vendor/github.com/docker/docker/client/client_unix.go",
"chars": 193,
"preview": "// +build linux freebsd solaris openbsd darwin\n\npackage client\n\n// DefaultDockerHost defines os specific default if DOCK"
},
{
"path": "vendor/github.com/docker/docker/client/client_windows.go",
"chars": 148,
"preview": "package client\n\n// DefaultDockerHost defines os specific default if DOCKER_HOST is unset\nconst DefaultDockerHost = \"npip"
},
{
"path": "vendor/github.com/docker/docker/client/container_attach.go",
"chars": 1033,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerAt"
},
{
"path": "vendor/github.com/docker/docker/client/container_commit.go",
"chars": 1464,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/url\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"github.com"
},
{
"path": "vendor/github.com/docker/docker/client/container_copy.go",
"chars": 3529,
"preview": "package client\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"path/filepath\"\n\t\"stri"
},
{
"path": "vendor/github.com/docker/docker/client/container_create.go",
"chars": 1720,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"githu"
},
{
"path": "vendor/github.com/docker/docker/client/container_diff.go",
"chars": 641,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"golang.org/x/net"
},
{
"path": "vendor/github.com/docker/docker/client/container_exec.go",
"chars": 2022,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// Conta"
},
{
"path": "vendor/github.com/docker/docker/client/container_export.go",
"chars": 483,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerExport retrieves the raw contents "
},
{
"path": "vendor/github.com/docker/docker/client/container_inspect.go",
"chars": 1580,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/t"
},
{
"path": "vendor/github.com/docker/docker/client/container_kill.go",
"chars": 438,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerKill terminates the container process bu"
},
{
"path": "vendor/github.com/docker/docker/client/container_list.go",
"chars": 1130,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/dock"
},
{
"path": "vendor/github.com/docker/docker/client/container_logs.go",
"chars": 1062,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/docker/api/types\"\n\tt"
},
{
"path": "vendor/github.com/docker/docker/client/container_pause.go",
"chars": 341,
"preview": "package client\n\nimport \"golang.org/x/net/context\"\n\n// ContainerPause pauses the main process of a given container withou"
},
{
"path": "vendor/github.com/docker/docker/client/container_prune.go",
"chars": 893,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/t"
},
{
"path": "vendor/github.com/docker/docker/client/container_remove.go",
"chars": 590,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerRe"
},
{
"path": "vendor/github.com/docker/docker/client/container_rename.go",
"chars": 411,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerRename changes the name of a given conta"
},
{
"path": "vendor/github.com/docker/docker/client/container_resize.go",
"chars": 972,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// "
},
{
"path": "vendor/github.com/docker/docker/client/container_restart.go",
"chars": 644,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\t\"time\"\n\n\ttimetypes \"github.com/docker/docker/api/types/time\"\n\t\"golang.org/x/net/con"
},
{
"path": "vendor/github.com/docker/docker/client/container_start.go",
"chars": 632,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/docker/api/types\"\n)\n\n// ContainerS"
},
{
"path": "vendor/github.com/docker/docker/client/container_stats.go",
"chars": 703,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// ContainerSt"
},
{
"path": "vendor/github.com/docker/docker/client/container_stop.go",
"chars": 609,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\t\"time\"\n\n\ttimetypes \"github.com/docker/docker/api/types/time\"\n\t\"golang.org/x/net/con"
},
{
"path": "vendor/github.com/docker/docker/client/container_top.go",
"chars": 712,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"golan"
},
{
"path": "vendor/github.com/docker/docker/client/container_unpause.go",
"chars": 327,
"preview": "package client\n\nimport \"golang.org/x/net/context\"\n\n// ContainerUnpause resumes the process execution within a container\n"
},
{
"path": "vendor/github.com/docker/docker/client/container_update.go",
"chars": 631,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/docker/docker/api/types/container\"\n\t\"golang.org/x/net/context\"\n)"
},
{
"path": "vendor/github.com/docker/docker/client/container_wait.go",
"chars": 641,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/docker/api/types/container\"\n"
},
{
"path": "vendor/github.com/docker/docker/client/disk_usage.go",
"chars": 571,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n/"
},
{
"path": "vendor/github.com/docker/docker/client/errors.go",
"chars": 8074,
"preview": "package client\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types/versions\"\n\t\"github.com/pkg/errors\"\n)\n\n// errConnec"
},
{
"path": "vendor/github.com/docker/docker/client/events.go",
"chars": 2242,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/docker/ap"
},
{
"path": "vendor/github.com/docker/docker/client/hijack.go",
"chars": 5296,
"preview": "package client\n\nimport (\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"net/url\"\n\t\"strings\"\n\t\""
},
{
"path": "vendor/github.com/docker/docker/client/image_build.go",
"chars": 3295,
"preview": "package client\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"golang.org/x/net"
},
{
"path": "vendor/github.com/docker/docker/client/image_create.go",
"chars": 1012,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"gi"
},
{
"path": "vendor/github.com/docker/docker/client/image_history.go",
"chars": 583,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types/image\"\n\t\"golang.org/x/net/con"
},
{
"path": "vendor/github.com/docker/docker/client/image_import.go",
"chars": 961,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"gi"
},
{
"path": "vendor/github.com/docker/docker/client/image_inspect.go",
"chars": 878,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"gol"
},
{
"path": "vendor/github.com/docker/docker/client/image_list.go",
"chars": 1198,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/a"
},
{
"path": "vendor/github.com/docker/docker/client/image_load.go",
"chars": 802,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/docker/api/types\"\n)\n\n// Imag"
},
{
"path": "vendor/github.com/docker/docker/client/image_prune.go",
"chars": 869,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/t"
},
{
"path": "vendor/github.com/docker/docker/client/image_pull.go",
"chars": 1955,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/distribution/ref"
},
{
"path": "vendor/github.com/docker/docker/client/image_push.go",
"chars": 1654,
"preview": "package client\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/distri"
},
{
"path": "vendor/github.com/docker/docker/client/image_remove.go",
"chars": 693,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n"
},
{
"path": "vendor/github.com/docker/docker/client/image_save.go",
"chars": 483,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// ImageSave retrieves one or more images from"
},
{
"path": "vendor/github.com/docker/docker/client/image_search.go",
"chars": 1530,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github."
},
{
"path": "vendor/github.com/docker/docker/client/image_tag.go",
"chars": 1035,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"github.com/pkg/errors\"\n\t\"golang.org/x"
},
{
"path": "vendor/github.com/docker/docker/client/info.go",
"chars": 570,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/co"
},
{
"path": "vendor/github.com/docker/docker/client/interface.go",
"chars": 11212,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/types/conta"
},
{
"path": "vendor/github.com/docker/docker/client/interface_experimental.go",
"chars": 590,
"preview": "package client\n\nimport (\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\ntype apiClientExperimental"
},
{
"path": "vendor/github.com/docker/docker/client/interface_stable.go",
"chars": 254,
"preview": "package client\n\n// APIClient is an interface that clients that talk with a docker server must implement.\ntype APIClient "
},
{
"path": "vendor/github.com/docker/docker/client/login.go",
"chars": 827,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/doc"
},
{
"path": "vendor/github.com/docker/docker/client/network_connect.go",
"chars": 556,
"preview": "package client\n\nimport (\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/types/network\"\n\t\"golang.or"
},
{
"path": "vendor/github.com/docker/docker/client/network_create.go",
"chars": 691,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// Netwo"
},
{
"path": "vendor/github.com/docker/docker/client/network_disconnect.go",
"chars": 482,
"preview": "package client\n\nimport (\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// NetworkDisconnect disco"
},
{
"path": "vendor/github.com/docker/docker/client/network_inspect.go",
"chars": 1406,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/t"
},
{
"path": "vendor/github.com/docker/docker/client/network_list.go",
"chars": 845,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/a"
},
{
"path": "vendor/github.com/docker/docker/client/network_prune.go",
"chars": 895,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/t"
},
{
"path": "vendor/github.com/docker/docker/client/network_remove.go",
"chars": 302,
"preview": "package client\n\nimport \"golang.org/x/net/context\"\n\n// NetworkRemove removes an existent network from the docker host.\nfu"
},
{
"path": "vendor/github.com/docker/docker/client/node_inspect.go",
"chars": 801,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"github.com/docker/docker/api/types/swarm\""
},
{
"path": "vendor/github.com/docker/docker/client/node_list.go",
"chars": 756,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/a"
},
{
"path": "vendor/github.com/docker/docker/client/node_remove.go",
"chars": 417,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// NodeRemove"
},
{
"path": "vendor/github.com/docker/docker/client/node_update.go",
"chars": 469,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/docker/docker/api/types/swarm\"\n\t\"golang.org/x/net/context\"\n"
},
{
"path": "vendor/github.com/docker/docker/client/ping.go",
"chars": 765,
"preview": "package client\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// Ping pings the "
},
{
"path": "vendor/github.com/docker/docker/client/plugin_create.go",
"chars": 607,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\""
},
{
"path": "vendor/github.com/docker/docker/client/plugin_disable.go",
"chars": 438,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// PluginDisab"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_enable.go",
"chars": 449,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// "
},
{
"path": "vendor/github.com/docker/docker/client/plugin_inspect.go",
"chars": 736,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"gol"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_install.go",
"chars": 3374,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"gi"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_list.go",
"chars": 754,
"preview": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/a"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_push.go",
"chars": 420,
"preview": "package client\n\nimport (\n\t\"io\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// PluginPush pushes a plugin to a registry\nfunc (cli *Cl"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_remove.go",
"chars": 421,
"preview": "package client\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"golang.org/x/net/context\"\n)\n\n// PluginRemov"
},
{
"path": "vendor/github.com/docker/docker/client/plugin_set.go",
"chars": 305,
"preview": "package client\n\nimport (\n\t\"golang.org/x/net/context\"\n)\n\n// PluginSet modifies settings for an existing plugin\nfunc (cli "
},
{
"path": "vendor/github.com/docker/docker/client/plugin_upgrade.go",
"chars": 1144,
"preview": "package client\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\n\t\"github.com/docker/distribution/reference\"\n\t\"github.com/docker/docker"
},
{
"path": "vendor/github.com/docker/docker/client/request.go",
"chars": 8552,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"strin"
}
]
// ... and 405 more files (download for full content)
About this extraction
This page contains the full source code of the docker-archive-public/docker.dockercraft GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 605 files (5.0 MB), approximately 1.4M tokens, and a symbol index with 62150 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.