├── .github └── workflows │ ├── release.yml │ └── test.yml ├── .gitignore ├── .go-version ├── .goreleaser.yml ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── Vagrantfile ├── _tools └── release ├── agent ├── agent.go ├── polling │ └── polling.go └── streaming │ └── streaming.go ├── assets ├── CREDITS └── schema │ └── flows.sql ├── command ├── command.go ├── create_scheme.go ├── look.go └── probe.go ├── config ├── config.go └── config_test.go ├── db ├── db.go ├── db_test.go └── testing.go ├── doc ├── images │ ├── logo.png │ ├── socket_diagnosis.png │ └── system_structure.png └── quickstart.md ├── docker-compose.yml ├── example.env ├── go.mod ├── go.sum ├── logging ├── level.go ├── logger.go └── logger_test.go ├── main.go ├── main_test.go ├── probe ├── ebpf │ └── ebpf.go ├── netlink │ ├── connections.go │ ├── netutil │ │ ├── netutil.go │ │ ├── netutil_linux.go │ │ ├── netutil_linux_test.go │ │ └── netutil_test.go │ └── testdata │ │ └── 10000 │ │ └── stat └── probe.go ├── renovate.json ├── scripts ├── docker-entrypoint-initdb.d │ └── enable_query_log.sh ├── provisioning │ └── setup_dev.sh └── systemd │ └── shawk.service ├── statik ├── genstatik │ └── statik.go └── statik.go ├── vendor ├── github.com │ ├── Azure │ │ └── go-ansiterm │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── constants.go │ │ │ ├── context.go │ │ │ ├── csi_entry_state.go │ │ │ ├── csi_param_state.go │ │ │ ├── escape_intermediate_state.go │ │ │ ├── escape_state.go │ │ │ ├── event_handler.go │ │ │ ├── ground_state.go │ │ │ ├── osc_string_state.go │ │ │ ├── parser.go │ │ │ ├── parser_action_helpers.go │ │ │ ├── parser_actions.go │ │ │ ├── states.go │ │ │ ├── utilities.go │ │ │ └── winterm │ │ │ ├── ansi.go │ │ │ ├── api.go │ │ │ ├── attr_translation.go │ │ │ ├── cursor_helpers.go │ │ │ ├── erase_helpers.go │ │ │ ├── scroll_helper.go │ │ │ ├── utilities.go │ │ │ └── win_event_handler.go │ ├── EricLagergren │ │ └── go-gnulib │ │ │ ├── LICENSE │ │ │ ├── dirent │ │ │ ├── README.md │ │ │ ├── absent_freebsd.go │ │ │ ├── absent_linux.go │ │ │ └── getdents_unix.go │ │ │ └── util │ │ │ ├── helper.go │ │ │ └── unsafe.go │ ├── Microsoft │ │ └── go-winio │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backup.go │ │ │ ├── ea.go │ │ │ ├── file.go │ │ │ ├── fileinfo.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── hvsock.go │ │ │ ├── pipe.go │ │ │ ├── pkg │ │ │ └── guid │ │ │ │ └── guid.go │ │ │ ├── privilege.go │ │ │ ├── reparse.go │ │ │ ├── sd.go │ │ │ ├── syscall.go │ │ │ └── zsyscall_windows.go │ ├── Nvveen │ │ └── Gotty │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── TODO │ │ │ ├── attributes.go │ │ │ ├── gotty.go │ │ │ ├── parser.go │ │ │ └── types.go │ ├── StackExchange │ │ └── wmi │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── swbemservices.go │ │ │ └── wmi.go │ ├── cenkalti │ │ └── backoff │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backoff.go │ │ │ ├── context.go │ │ │ ├── exponential.go │ │ │ ├── retry.go │ │ │ ├── ticker.go │ │ │ └── tries.go │ ├── containerd │ │ └── continuity │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ └── pathdriver │ │ │ └── path_driver.go │ ├── docker │ │ ├── go-connections │ │ │ ├── LICENSE │ │ │ └── nat │ │ │ │ ├── nat.go │ │ │ │ ├── parse.go │ │ │ │ └── sort.go │ │ └── go-units │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── circle.yml │ │ │ ├── duration.go │ │ │ ├── size.go │ │ │ └── ulimit.go │ ├── elastic │ │ └── gosigar │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── sys │ │ │ ├── endian.go │ │ │ └── linux │ │ │ ├── inetdiag.go │ │ │ ├── netlink.go │ │ │ ├── sysconf_cgo.go │ │ │ └── sysconf_nocgo.go │ ├── go-ole │ │ └── go-ole │ │ │ ├── .travis.yml │ │ │ ├── ChangeLog.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── com.go │ │ │ ├── com_func.go │ │ │ ├── connect.go │ │ │ ├── constants.go │ │ │ ├── error.go │ │ │ ├── error_func.go │ │ │ ├── error_windows.go │ │ │ ├── go.mod │ │ │ ├── guid.go │ │ │ ├── iconnectionpoint.go │ │ │ ├── iconnectionpoint_func.go │ │ │ ├── iconnectionpoint_windows.go │ │ │ ├── iconnectionpointcontainer.go │ │ │ ├── iconnectionpointcontainer_func.go │ │ │ ├── iconnectionpointcontainer_windows.go │ │ │ ├── idispatch.go │ │ │ ├── idispatch_func.go │ │ │ ├── idispatch_windows.go │ │ │ ├── ienumvariant.go │ │ │ ├── ienumvariant_func.go │ │ │ ├── ienumvariant_windows.go │ │ │ ├── iinspectable.go │ │ │ ├── iinspectable_func.go │ │ │ ├── iinspectable_windows.go │ │ │ ├── iprovideclassinfo.go │ │ │ ├── iprovideclassinfo_func.go │ │ │ ├── iprovideclassinfo_windows.go │ │ │ ├── itypeinfo.go │ │ │ ├── itypeinfo_func.go │ │ │ ├── itypeinfo_windows.go │ │ │ ├── iunknown.go │ │ │ ├── iunknown_func.go │ │ │ ├── iunknown_windows.go │ │ │ ├── ole.go │ │ │ ├── oleutil │ │ │ ├── connection.go │ │ │ ├── connection_func.go │ │ │ ├── connection_windows.go │ │ │ ├── go-get.go │ │ │ └── oleutil.go │ │ │ ├── safearray.go │ │ │ ├── safearray_func.go │ │ │ ├── safearray_windows.go │ │ │ ├── safearrayconversion.go │ │ │ ├── safearrayslices.go │ │ │ ├── utility.go │ │ │ ├── variables.go │ │ │ ├── variant.go │ │ │ ├── variant_386.go │ │ │ ├── variant_amd64.go │ │ │ ├── variant_date_386.go │ │ │ ├── variant_date_amd64.go │ │ │ ├── variant_ppc64le.go │ │ │ ├── variant_s390x.go │ │ │ ├── vt_string.go │ │ │ ├── winrt.go │ │ │ └── winrt_doc.go │ ├── go-stack │ │ └── stack │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ └── stack.go │ ├── google │ │ └── go-cmp │ │ │ ├── LICENSE │ │ │ └── cmp │ │ │ ├── compare.go │ │ │ ├── export_panic.go │ │ │ ├── export_unsafe.go │ │ │ ├── internal │ │ │ ├── diff │ │ │ │ ├── debug_disable.go │ │ │ │ ├── debug_enable.go │ │ │ │ └── diff.go │ │ │ ├── flags │ │ │ │ ├── flags.go │ │ │ │ ├── toolchain_legacy.go │ │ │ │ └── toolchain_recent.go │ │ │ ├── function │ │ │ │ └── func.go │ │ │ └── value │ │ │ │ ├── name.go │ │ │ │ ├── pointer_purego.go │ │ │ │ ├── pointer_unsafe.go │ │ │ │ ├── sort.go │ │ │ │ └── zero.go │ │ │ ├── options.go │ │ │ ├── path.go │ │ │ ├── report.go │ │ │ ├── report_compare.go │ │ │ ├── report_references.go │ │ │ ├── report_reflect.go │ │ │ ├── report_slices.go │ │ │ ├── report_text.go │ │ │ └── report_value.go │ ├── iovisor │ │ └── gobpf │ │ │ ├── COPYRIGHT.txt │ │ │ ├── LICENSE-bpf.txt │ │ │ ├── LICENSE.txt │ │ │ ├── elf │ │ │ ├── compat.go │ │ │ ├── elf.go │ │ │ ├── elf_unsupported.go │ │ │ ├── errno.go │ │ │ ├── include │ │ │ │ ├── bpf.h │ │ │ │ ├── bpf_map.h │ │ │ │ ├── libbpf.h │ │ │ │ └── nlattr.h │ │ │ ├── kernel_version.go │ │ │ ├── lib │ │ │ │ ├── netlink.c │ │ │ │ └── nlattr.c │ │ │ ├── module.go │ │ │ ├── module_unsupported.go │ │ │ ├── perf.go │ │ │ ├── perf_unsupported.go │ │ │ ├── pinning.go │ │ │ ├── table.go │ │ │ ├── utsname_int8.go │ │ │ └── utsname_uint8.go │ │ │ └── pkg │ │ │ ├── bpffs │ │ │ └── fs.go │ │ │ └── cpuonline │ │ │ └── cpu_range.go │ ├── jackc │ │ ├── chunkreader │ │ │ └── v2 │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── chunkreader.go │ │ │ │ └── go.mod │ │ ├── pgconn │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth_scram.go │ │ │ ├── config.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── internal │ │ │ │ └── ctxwatch │ │ │ │ │ └── context_watcher.go │ │ │ ├── pgconn.go │ │ │ └── stmtcache │ │ │ │ ├── lru.go │ │ │ │ └── stmtcache.go │ │ ├── pgio │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ └── write.go │ │ ├── pgpassfile │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── pgpass.go │ │ ├── pgproto3 │ │ │ └── v2 │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── authentication_cleartext_password.go │ │ │ │ ├── authentication_md5_password.go │ │ │ │ ├── authentication_ok.go │ │ │ │ ├── authentication_sasl.go │ │ │ │ ├── authentication_sasl_continue.go │ │ │ │ ├── authentication_sasl_final.go │ │ │ │ ├── backend.go │ │ │ │ ├── backend_key_data.go │ │ │ │ ├── big_endian.go │ │ │ │ ├── bind.go │ │ │ │ ├── bind_complete.go │ │ │ │ ├── cancel_request.go │ │ │ │ ├── chunkreader.go │ │ │ │ ├── close.go │ │ │ │ ├── close_complete.go │ │ │ │ ├── command_complete.go │ │ │ │ ├── copy_both_response.go │ │ │ │ ├── copy_data.go │ │ │ │ ├── copy_done.go │ │ │ │ ├── copy_fail.go │ │ │ │ ├── copy_in_response.go │ │ │ │ ├── copy_out_response.go │ │ │ │ ├── data_row.go │ │ │ │ ├── describe.go │ │ │ │ ├── doc.go │ │ │ │ ├── empty_query_response.go │ │ │ │ ├── error_response.go │ │ │ │ ├── execute.go │ │ │ │ ├── flush.go │ │ │ │ ├── frontend.go │ │ │ │ ├── function_call_response.go │ │ │ │ ├── go.mod │ │ │ │ ├── go.sum │ │ │ │ ├── no_data.go │ │ │ │ ├── notice_response.go │ │ │ │ ├── notification_response.go │ │ │ │ ├── parameter_description.go │ │ │ │ ├── parameter_status.go │ │ │ │ ├── parse.go │ │ │ │ ├── parse_complete.go │ │ │ │ ├── password_message.go │ │ │ │ ├── pgproto3.go │ │ │ │ ├── portal_suspended.go │ │ │ │ ├── query.go │ │ │ │ ├── ready_for_query.go │ │ │ │ ├── row_description.go │ │ │ │ ├── sasl_initial_response.go │ │ │ │ ├── sasl_response.go │ │ │ │ ├── ssl_request.go │ │ │ │ ├── startup_message.go │ │ │ │ ├── sync.go │ │ │ │ └── terminate.go │ │ ├── pgservicefile │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── pgservicefile.go │ │ ├── pgtype │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── aclitem.go │ │ │ ├── aclitem_array.go │ │ │ ├── array.go │ │ │ ├── bit.go │ │ │ ├── bool.go │ │ │ ├── bool_array.go │ │ │ ├── box.go │ │ │ ├── bpchar.go │ │ │ ├── bpchar_array.go │ │ │ ├── bytea.go │ │ │ ├── bytea_array.go │ │ │ ├── cid.go │ │ │ ├── cidr.go │ │ │ ├── cidr_array.go │ │ │ ├── circle.go │ │ │ ├── convert.go │ │ │ ├── database_sql.go │ │ │ ├── date.go │ │ │ ├── date_array.go │ │ │ ├── daterange.go │ │ │ ├── enum_array.go │ │ │ ├── float4.go │ │ │ ├── float4_array.go │ │ │ ├── float8.go │ │ │ ├── float8_array.go │ │ │ ├── generic_binary.go │ │ │ ├── generic_text.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── hstore.go │ │ │ ├── hstore_array.go │ │ │ ├── inet.go │ │ │ ├── inet_array.go │ │ │ ├── int2.go │ │ │ ├── int2_array.go │ │ │ ├── int4.go │ │ │ ├── int4_array.go │ │ │ ├── int4range.go │ │ │ ├── int8.go │ │ │ ├── int8_array.go │ │ │ ├── int8range.go │ │ │ ├── interval.go │ │ │ ├── json.go │ │ │ ├── jsonb.go │ │ │ ├── line.go │ │ │ ├── lseg.go │ │ │ ├── macaddr.go │ │ │ ├── macaddr_array.go │ │ │ ├── name.go │ │ │ ├── numeric.go │ │ │ ├── numeric_array.go │ │ │ ├── numrange.go │ │ │ ├── oid.go │ │ │ ├── oid_value.go │ │ │ ├── path.go │ │ │ ├── pgtype.go │ │ │ ├── pguint32.go │ │ │ ├── point.go │ │ │ ├── polygon.go │ │ │ ├── qchar.go │ │ │ ├── range.go │ │ │ ├── record.go │ │ │ ├── text.go │ │ │ ├── text_array.go │ │ │ ├── tid.go │ │ │ ├── time.go │ │ │ ├── timestamp.go │ │ │ ├── timestamp_array.go │ │ │ ├── timestamptz.go │ │ │ ├── timestamptz_array.go │ │ │ ├── tsrange.go │ │ │ ├── tstzrange.go │ │ │ ├── tstzrange_array.go │ │ │ ├── typed_array.go.erb │ │ │ ├── typed_array_gen.sh │ │ │ ├── typed_range.go.erb │ │ │ ├── typed_range_gen.sh │ │ │ ├── unknown.go │ │ │ ├── uuid.go │ │ │ ├── uuid_array.go │ │ │ ├── varbit.go │ │ │ ├── varchar.go │ │ │ ├── varchar_array.go │ │ │ └── xid.go │ │ └── pgx │ │ │ └── v4 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── batch.go │ │ │ ├── conn.go │ │ │ ├── copy_from.go │ │ │ ├── doc.go │ │ │ ├── extended_query_builder.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go_stdlib.go │ │ │ ├── internal │ │ │ └── sanitize │ │ │ │ └── sanitize.go │ │ │ ├── large_objects.go │ │ │ ├── log │ │ │ └── log15adapter │ │ │ │ └── adapter.go │ │ │ ├── logger.go │ │ │ ├── messages.go │ │ │ ├── rows.go │ │ │ ├── tx.go │ │ │ └── values.go │ ├── joho │ │ └── godotenv │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENCE │ │ │ ├── README.md │ │ │ └── godotenv.go │ ├── kelseyhightower │ │ └── envconfig │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── env_os.go │ │ │ ├── env_syscall.go │ │ │ ├── envconfig.go │ │ │ ├── go.mod │ │ │ └── usage.go │ ├── konsorten │ │ └── go-windows-terminal-sequences │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── sequences.go │ │ │ └── sequences_dummy.go │ ├── mattn │ │ ├── go-colorable │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── colorable_appengine.go │ │ │ ├── colorable_others.go │ │ │ ├── colorable_windows.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go.test.sh │ │ │ └── noncolorable.go │ │ └── go-isatty │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go.test.sh │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ ├── isatty_windows.go │ │ │ └── renovate.json │ ├── opencontainers │ │ ├── go-digest │ │ │ ├── .mailmap │ │ │ ├── .pullapprove.yml │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.code │ │ │ ├── LICENSE.docs │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── algorithm.go │ │ │ ├── digest.go │ │ │ ├── digester.go │ │ │ ├── doc.go │ │ │ └── verifiers.go │ │ ├── image-spec │ │ │ ├── LICENSE │ │ │ └── specs-go │ │ │ │ ├── v1 │ │ │ │ ├── annotations.go │ │ │ │ ├── config.go │ │ │ │ ├── descriptor.go │ │ │ │ ├── index.go │ │ │ │ ├── layout.go │ │ │ │ ├── manifest.go │ │ │ │ └── mediatype.go │ │ │ │ ├── version.go │ │ │ │ └── versioned.go │ │ └── runc │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── libcontainer │ │ │ └── user │ │ │ ├── MAINTAINERS │ │ │ ├── lookup.go │ │ │ ├── lookup_unix.go │ │ │ ├── lookup_unsupported.go │ │ │ └── user.go │ ├── ory │ │ └── dockertest │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── docker │ │ │ ├── AUTHORS │ │ │ ├── DOCKER-LICENSE │ │ │ ├── LICENSE │ │ │ ├── README.markdown │ │ │ ├── auth.go │ │ │ ├── change.go │ │ │ ├── client.go │ │ │ ├── client_unix.go │ │ │ ├── client_windows.go │ │ │ ├── container.go │ │ │ ├── distribution.go │ │ │ ├── env.go │ │ │ ├── event.go │ │ │ ├── exec.go │ │ │ ├── image.go │ │ │ ├── misc.go │ │ │ ├── network.go │ │ │ ├── opts │ │ │ │ ├── env.go │ │ │ │ ├── hosts.go │ │ │ │ ├── hosts_unix.go │ │ │ │ ├── hosts_windows.go │ │ │ │ ├── ip.go │ │ │ │ ├── opts.go │ │ │ │ ├── opts_unix.go │ │ │ │ ├── opts_windows.go │ │ │ │ ├── quotedstring.go │ │ │ │ ├── runtime.go │ │ │ │ └── ulimit.go │ │ │ ├── pkg │ │ │ │ ├── archive │ │ │ │ │ ├── README.md │ │ │ │ │ ├── archive.go │ │ │ │ │ ├── archive_linux.go │ │ │ │ │ ├── archive_other.go │ │ │ │ │ ├── archive_unix.go │ │ │ │ │ ├── archive_windows.go │ │ │ │ │ ├── changes.go │ │ │ │ │ ├── changes_linux.go │ │ │ │ │ ├── changes_other.go │ │ │ │ │ ├── changes_unix.go │ │ │ │ │ ├── changes_windows.go │ │ │ │ │ ├── copy.go │ │ │ │ │ ├── copy_unix.go │ │ │ │ │ ├── copy_windows.go │ │ │ │ │ ├── diff.go │ │ │ │ │ ├── time_linux.go │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ ├── whiteouts.go │ │ │ │ │ └── wrap.go │ │ │ │ ├── fileutils │ │ │ │ │ ├── fileutils.go │ │ │ │ │ ├── fileutils_darwin.go │ │ │ │ │ ├── fileutils_unix.go │ │ │ │ │ └── fileutils_windows.go │ │ │ │ ├── homedir │ │ │ │ │ ├── homedir_linux.go │ │ │ │ │ ├── homedir_others.go │ │ │ │ │ ├── homedir_unix.go │ │ │ │ │ └── homedir_windows.go │ │ │ │ ├── idtools │ │ │ │ │ ├── idtools.go │ │ │ │ │ ├── idtools_unix.go │ │ │ │ │ ├── idtools_windows.go │ │ │ │ │ ├── usergroupadd_linux.go │ │ │ │ │ ├── usergroupadd_unsupported.go │ │ │ │ │ └── utils_unix.go │ │ │ │ ├── ioutils │ │ │ │ │ ├── buffer.go │ │ │ │ │ ├── bytespipe.go │ │ │ │ │ ├── fswriters.go │ │ │ │ │ ├── readers.go │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ ├── temp_windows.go │ │ │ │ │ ├── writeflusher.go │ │ │ │ │ └── writers.go │ │ │ │ ├── jsonmessage │ │ │ │ │ └── jsonmessage.go │ │ │ │ ├── longpath │ │ │ │ │ └── longpath.go │ │ │ │ ├── mount │ │ │ │ │ ├── flags.go │ │ │ │ │ ├── flags_freebsd.go │ │ │ │ │ ├── flags_linux.go │ │ │ │ │ ├── flags_unsupported.go │ │ │ │ │ ├── mount.go │ │ │ │ │ ├── mounter_freebsd.go │ │ │ │ │ ├── mounter_linux.go │ │ │ │ │ ├── mounter_unsupported.go │ │ │ │ │ ├── mountinfo.go │ │ │ │ │ ├── mountinfo_freebsd.go │ │ │ │ │ ├── mountinfo_linux.go │ │ │ │ │ ├── mountinfo_unsupported.go │ │ │ │ │ ├── mountinfo_windows.go │ │ │ │ │ └── sharedsubtree_linux.go │ │ │ │ ├── pools │ │ │ │ │ └── pools.go │ │ │ │ ├── stdcopy │ │ │ │ │ └── stdcopy.go │ │ │ │ ├── system │ │ │ │ │ ├── chtimes.go │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ ├── chtimes_windows.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── exitcode.go │ │ │ │ │ ├── filesys.go │ │ │ │ │ ├── filesys_windows.go │ │ │ │ │ ├── init.go │ │ │ │ │ ├── init_unix.go │ │ │ │ │ ├── init_windows.go │ │ │ │ │ ├── lcow.go │ │ │ │ │ ├── lcow_unix.go │ │ │ │ │ ├── lcow_windows.go │ │ │ │ │ ├── lstat_unix.go │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ ├── meminfo.go │ │ │ │ │ ├── meminfo_linux.go │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ ├── meminfo_windows.go │ │ │ │ │ ├── mknod.go │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ ├── path.go │ │ │ │ │ ├── process_unix.go │ │ │ │ │ ├── process_windows.go │ │ │ │ │ ├── rm.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 │ │ │ │ └── term │ │ │ │ │ ├── ascii.go │ │ │ │ │ ├── proxy.go │ │ │ │ │ ├── tc.go │ │ │ │ │ ├── term.go │ │ │ │ │ ├── term_windows.go │ │ │ │ │ ├── termios_bsd.go │ │ │ │ │ ├── termios_linux.go │ │ │ │ │ ├── windows │ │ │ │ │ ├── ansi_reader.go │ │ │ │ │ ├── ansi_writer.go │ │ │ │ │ ├── console.go │ │ │ │ │ └── windows.go │ │ │ │ │ └── winsize.go │ │ │ ├── plugin.go │ │ │ ├── signal.go │ │ │ ├── tar.go │ │ │ ├── tls.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 │ │ │ │ │ └── waitcondition.go │ │ │ │ ├── error_response.go │ │ │ │ ├── filters │ │ │ │ │ └── parse.go │ │ │ │ ├── graph_driver_data.go │ │ │ │ ├── id_response.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 │ │ │ │ ├── types.go │ │ │ │ ├── versions │ │ │ │ │ ├── README.md │ │ │ │ │ └── compare.go │ │ │ │ └── volume.go │ │ │ └── volume.go │ │ │ └── dockertest.go │ ├── pkg │ │ └── errors │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── errors.go │ │ │ ├── go113.go │ │ │ └── stack.go │ ├── rakyll │ │ └── statik │ │ │ ├── LICENSE │ │ │ └── fs │ │ │ ├── fs.go │ │ │ └── walk.go │ ├── shirou │ │ └── gopsutil │ │ │ ├── LICENSE │ │ │ ├── internal │ │ │ └── common │ │ │ │ ├── binary.go │ │ │ │ ├── common.go │ │ │ │ ├── common_darwin.go │ │ │ │ ├── common_freebsd.go │ │ │ │ ├── common_linux.go │ │ │ │ ├── common_openbsd.go │ │ │ │ ├── common_unix.go │ │ │ │ └── common_windows.go │ │ │ └── net │ │ │ ├── net.go │ │ │ ├── net_aix.go │ │ │ ├── net_darwin.go │ │ │ ├── net_fallback.go │ │ │ ├── net_freebsd.go │ │ │ ├── net_linux.go │ │ │ ├── net_openbsd.go │ │ │ ├── net_unix.go │ │ │ └── net_windows.go │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── alt_exit.go │ │ │ ├── appveyor.yml │ │ │ ├── doc.go │ │ │ ├── entry.go │ │ │ ├── exported.go │ │ │ ├── formatter.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── hooks.go │ │ │ ├── json_formatter.go │ │ │ ├── logger.go │ │ │ ├── logrus.go │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check_bsd.go │ │ │ ├── terminal_check_js.go │ │ │ ├── terminal_check_no_terminal.go │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── terminal_check_solaris.go │ │ │ ├── terminal_check_unix.go │ │ │ ├── terminal_check_windows.go │ │ │ ├── text_formatter.go │ │ │ └── writer.go │ └── weaveworks │ │ └── tcptracer-bpf │ │ ├── LICENSE │ │ ├── pkg │ │ └── tracer │ │ │ ├── byteorder.go │ │ │ ├── event.go │ │ │ ├── event_common.go │ │ │ ├── offsetguess.go │ │ │ ├── offsetguess_unsupported.go │ │ │ ├── tcptracer-ebpf.go │ │ │ ├── tracer.go │ │ │ ├── tracer_cb.go │ │ │ └── tracer_unsupported.go │ │ └── tcptracer-bpf.h ├── golang.org │ └── x │ │ ├── crypto │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── pbkdf2 │ │ │ └── pbkdf2.go │ │ ├── net │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── context │ │ │ ├── context.go │ │ │ ├── go17.go │ │ │ ├── go19.go │ │ │ ├── pre_go17.go │ │ │ └── pre_go19.go │ │ ├── sys │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── internal │ │ │ └── unsafeheader │ │ │ │ └── unsafeheader.go │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── 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_freebsd_arm64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_riscv64.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_netbsd_arm64.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_openbsd_arm.s │ │ │ ├── asm_openbsd_arm64.s │ │ │ ├── asm_openbsd_mips64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_aix_ppc.go │ │ │ ├── dev_aix_ppc64.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── errors_freebsd_386.go │ │ │ ├── errors_freebsd_amd64.go │ │ │ ├── errors_freebsd_arm.go │ │ │ ├── errors_freebsd_arm64.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── fdset.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ioctl.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── sockcmsg_unix_other.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.1_12.go │ │ │ ├── syscall_darwin.1_13.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_386.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_darwin_libSystem.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_freebsd_arm64.go │ │ │ ├── syscall_illumos.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_riscv64.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_netbsd_arm64.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_openbsd_arm64.go │ │ │ ├── syscall_openbsd_mips64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── timestruct.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.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_freebsd_arm64.go │ │ │ ├── zerrors_linux.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_riscv64.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ ├── zerrors_openbsd_mips64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zptrace_armnn_linux.go │ │ │ ├── zptrace_linux_arm64.go │ │ │ ├── zptrace_mipsnn_linux.go │ │ │ ├── zptrace_mipsnnle_linux.go │ │ │ ├── zptrace_x86_linux.go │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_386.1_13.go │ │ │ ├── zsyscall_darwin_386.1_13.s │ │ │ ├── zsyscall_darwin_386.go │ │ │ ├── zsyscall_darwin_386.s │ │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm.1_13.go │ │ │ ├── zsyscall_darwin_arm.1_13.s │ │ │ ├── zsyscall_darwin_arm.go │ │ │ ├── zsyscall_darwin_arm.s │ │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ ├── zsyscall_illumos_amd64.go │ │ │ ├── zsyscall_linux.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ ├── zsyscall_openbsd_mips64.go │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysctl_openbsd_mips64.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_freebsd_arm64.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ ├── zsysnum_openbsd_mips64.go │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.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_freebsd_arm64.go │ │ │ ├── ztypes_linux.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_riscv64.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ ├── ztypes_openbsd_mips64.go │ │ │ └── ztypes_solaris_amd64.go │ │ └── windows │ │ │ ├── aliases.go │ │ │ ├── dll_windows.go │ │ │ ├── empty.s │ │ │ ├── env_windows.go │ │ │ ├── eventlog.go │ │ │ ├── exec_windows.go │ │ │ ├── memory_windows.go │ │ │ ├── mkerrors.bash │ │ │ ├── mkknownfolderids.bash │ │ │ ├── mksyscall.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── security_windows.go │ │ │ ├── service.go │ │ │ ├── setupapierrors_windows.go │ │ │ ├── str.go │ │ │ ├── svc │ │ │ └── go12.c │ │ │ ├── syscall.go │ │ │ ├── syscall_windows.go │ │ │ ├── types_windows.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── types_windows_arm.go │ │ │ ├── zerrors_windows.go │ │ │ ├── zknownfolderids_windows.go │ │ │ └── zsyscall_windows.go │ │ ├── text │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cases │ │ │ ├── cases.go │ │ │ ├── context.go │ │ │ ├── fold.go │ │ │ ├── icu.go │ │ │ ├── info.go │ │ │ ├── map.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ └── trieval.go │ │ ├── internal │ │ │ ├── internal.go │ │ │ ├── language │ │ │ │ ├── common.go │ │ │ │ ├── compact.go │ │ │ │ ├── compact │ │ │ │ │ ├── compact.go │ │ │ │ │ ├── language.go │ │ │ │ │ ├── parents.go │ │ │ │ │ ├── tables.go │ │ │ │ │ └── tags.go │ │ │ │ ├── compose.go │ │ │ │ ├── coverage.go │ │ │ │ ├── language.go │ │ │ │ ├── lookup.go │ │ │ │ ├── match.go │ │ │ │ ├── parse.go │ │ │ │ ├── tables.go │ │ │ │ └── tags.go │ │ │ ├── match.go │ │ │ └── tag │ │ │ │ └── tag.go │ │ ├── language │ │ │ ├── coverage.go │ │ │ ├── doc.go │ │ │ ├── go1_1.go │ │ │ ├── go1_2.go │ │ │ ├── language.go │ │ │ ├── match.go │ │ │ ├── parse.go │ │ │ ├── tables.go │ │ │ └── tags.go │ │ ├── runes │ │ │ ├── cond.go │ │ │ └── runes.go │ │ ├── secure │ │ │ ├── bidirule │ │ │ │ ├── bidirule.go │ │ │ │ ├── bidirule10.0.0.go │ │ │ │ └── bidirule9.0.0.go │ │ │ └── precis │ │ │ │ ├── class.go │ │ │ │ ├── context.go │ │ │ │ ├── doc.go │ │ │ │ ├── nickname.go │ │ │ │ ├── options.go │ │ │ │ ├── profile.go │ │ │ │ ├── profiles.go │ │ │ │ ├── tables10.0.0.go │ │ │ │ ├── tables11.0.0.go │ │ │ │ ├── tables12.0.0.go │ │ │ │ ├── tables9.0.0.go │ │ │ │ ├── transformer.go │ │ │ │ └── trieval.go │ │ ├── transform │ │ │ └── transform.go │ │ ├── unicode │ │ │ ├── bidi │ │ │ │ ├── bidi.go │ │ │ │ ├── bracket.go │ │ │ │ ├── core.go │ │ │ │ ├── prop.go │ │ │ │ ├── tables10.0.0.go │ │ │ │ ├── tables11.0.0.go │ │ │ │ ├── tables12.0.0.go │ │ │ │ ├── tables9.0.0.go │ │ │ │ └── trieval.go │ │ │ └── norm │ │ │ │ ├── composition.go │ │ │ │ ├── forminfo.go │ │ │ │ ├── input.go │ │ │ │ ├── iter.go │ │ │ │ ├── normalize.go │ │ │ │ ├── readwriter.go │ │ │ │ ├── tables10.0.0.go │ │ │ │ ├── tables11.0.0.go │ │ │ │ ├── tables12.0.0.go │ │ │ │ ├── tables9.0.0.go │ │ │ │ ├── transform.go │ │ │ │ └── trie.go │ │ └── width │ │ │ ├── kind_string.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── transform.go │ │ │ ├── trieval.go │ │ │ └── width.go │ │ └── xerrors │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README │ │ ├── adaptor.go │ │ ├── codereview.cfg │ │ ├── doc.go │ │ ├── errors.go │ │ ├── fmt.go │ │ ├── format.go │ │ ├── frame.go │ │ ├── go.mod │ │ ├── internal │ │ └── internal.go │ │ └── wrap.go ├── gopkg.in │ └── inconshreveable │ │ └── log15.v2 │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── format.go │ │ ├── handler.go │ │ ├── handler_go13.go │ │ ├── handler_go14.go │ │ ├── logger.go │ │ ├── root.go │ │ └── syslog.go └── modules.txt └── version └── version.go /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | on: 3 | push: 4 | tags: 5 | - "v[0-9]+.[0-9]+.[0-9]+" 6 | jobs: 7 | goreleaser: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v1 12 | with: 13 | fetch-depth: 1 14 | - name: Setup Go 15 | uses: actions/setup-go@v1 16 | with: 17 | go-version: 1.14 18 | - name: Run GoReleaser 19 | uses: goreleaser/goreleaser-action@v1 20 | with: 21 | version: latest 22 | args: release --rm-dist 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | name: Test 3 | jobs: 4 | test: 5 | strategy: 6 | matrix: 7 | go-version: [1.15.x] 8 | os: [ubuntu-latest] 9 | runs-on: ${{ matrix.os }} 10 | steps: 11 | - name: Install Go 12 | uses: actions/setup-go@v1 13 | with: 14 | go-version: ${{ matrix.go-version }} 15 | - name: Checkout code 16 | uses: actions/checkout@v1 17 | - name: Install deps 18 | run: make deps 19 | - name: Lint 20 | run: make ci-lint 21 | shell: bash 22 | - name: Test 23 | run: make ci-test 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /shawk 2 | /dist 3 | /.vagrant 4 | -------------------------------------------------------------------------------- /.go-version: -------------------------------------------------------------------------------- 1 | 1.15.5 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.15.5 2 | 3 | ENV PKG github.com/yuuki/shawk 4 | WORKDIR /go/src/$PKG 5 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # Validate environment 2 | ['vagrant-reload', 'vagrant-vbguest'].each do |plugin| 3 | unless Vagrant.has_plugin?(plugin) 4 | raise "Vagrant plugin #{plugin} is not installed!" 5 | end 6 | end 7 | 8 | Vagrant.configure("2") do |config| 9 | config.vm.box = "generic/ubuntu1804" 10 | config.vm.provision :shell, :privileged => false, :path => "scripts/provisioning/setup_dev.sh" 11 | config.vm.synced_folder "./", "/home/vagrant/go/src/github.com/yuuki/shawk", mount_options: ['dmode=777','fmode=777'] 12 | config.vm.provider "virtualbox" do |vb| 13 | vb.memory = "1280" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /_tools/release: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ $(git status -s) != "" ]]; then 5 | echo 2>&1 "git is currently in a dirty state" 6 | exit 1 7 | fi 8 | 9 | current_version=$(gobump show -r version) 10 | 11 | echo "current version: $current_version" 12 | read -p "input next version: " next_version 13 | 14 | echo "--> Bumping version $next_version" 15 | gobump set "$next_version" -w version 16 | echo "--> Generating CHANGELOG" 17 | ghch -w -N "v$next_version" 18 | 19 | git commit -am "Bump version $next_version" 20 | git tag "v$next_version" 21 | git push origin HEAD && git push --tags 22 | -------------------------------------------------------------------------------- /agent/agent.go: -------------------------------------------------------------------------------- 1 | package agent 2 | 3 | import ( 4 | "os" 5 | "os/signal" 6 | "syscall" 7 | "time" 8 | 9 | "github.com/yuuki/shawk/db" 10 | "github.com/yuuki/shawk/logging" 11 | "golang.org/x/xerrors" 12 | ) 13 | 14 | var logger = logging.New("agent") 15 | 16 | // Wait waits a signal or shutdowns the db. 17 | func Wait(db *db.DB) error { 18 | sigch := make(chan os.Signal, 1) 19 | signal.Notify(sigch, syscall.SIGTERM, syscall.SIGINT) 20 | sig := <-sigch 21 | logger.Infof("Received %s gracefully shutdown...", sig) 22 | 23 | time.Sleep(3 * time.Second) 24 | logger.Infof("--> Closing db connection...") 25 | if err := db.Shutdown(); err != nil { 26 | return xerrors.Errorf("db close error: %w", err) 27 | } 28 | logger.Infof("Closed db connection") 29 | 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /command/command.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import "github.com/yuuki/shawk/logging" 4 | 5 | var ( 6 | logger = logging.New("command") 7 | ) 8 | -------------------------------------------------------------------------------- /command/create_scheme.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "github.com/yuuki/shawk/config" 5 | "github.com/yuuki/shawk/db" 6 | "golang.org/x/xerrors" 7 | ) 8 | 9 | // CreateSchemeParam is 10 | type CreateSchemeParam struct{} 11 | 12 | // CreateScheme runs create-scheme subcommand. 13 | func CreateScheme(param *CreateSchemeParam) error { 14 | logger.Infof("Connecting postgres ...") 15 | 16 | db, err := db.New(config.Config.CMDB.URL) 17 | if err != nil { 18 | return xerrors.Errorf("postgres initialize error: %w", err) 19 | } 20 | 21 | logger.Infof("Connected postgres ...") 22 | 23 | logger.Infof("Creating postgres schema ...") 24 | 25 | if err := db.CreateSchema(); err != nil { 26 | return err 27 | } 28 | 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /doc/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuuki/shawk/63131ee4ecb166620b452e46372ac2b987534523/doc/images/logo.png -------------------------------------------------------------------------------- /doc/images/socket_diagnosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuuki/shawk/63131ee4ecb166620b452e46372ac2b987534523/doc/images/socket_diagnosis.png -------------------------------------------------------------------------------- /doc/images/system_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuuki/shawk/63131ee4ecb166620b452e46372ac2b987534523/doc/images/system_structure.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.6" 2 | 3 | services: 4 | agent: 5 | build: . 6 | depends_on: 7 | - db 8 | command: bash -c "/go/bin/shawk create-scheme && /go/bin/shawk probe" 9 | volumes: 10 | - ./shawk:/go/bin/shawk 11 | environment: 12 | - SHAWK_CMDB_URL=postgres://shawk:shawk@db:5432/shawk?sslmode=disable 13 | db: 14 | image: postgres:11.7 15 | ports: 16 | - 5432 17 | environment: 18 | - POSTGRES_USER=shawk 19 | - POSTGRES_DB=shawk 20 | - POSTGRES_PASSWORD=shawk 21 | restart: always 22 | user: postgres 23 | volumes: 24 | - ./postgres/init:/docker-entrypoint-initdb.d 25 | healthcheck: 26 | test: ["CMD-SHELL", "pg_isready -U shawk"] 27 | interval: 3s 28 | timeout: 3s 29 | retries: 5 30 | start_period: 3s 31 | -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | SHAWK_CMDB_NAME="shawk" # CMDB: postgres database name 2 | SHAWK_CMDB_HOST="127.0.0.1" # CMDB: postgres hostname 3 | SHAWK_CMDB_PORT=5432 # CMDB: postgres port 4 | SHAWK_CMDB_USER="testuser" # CMDB: postgres role name 5 | SHAWK_CMDB_PASSWORD="shawk" # CMDB: postgres password 6 | SHAWK_CMDB_CONNECT_TIMEOUT="3s" # CMDB: postgres connect timeout 7 | 8 | SHAWK_PROBE_MODE=streaming # agent's probe mode. 'polling'(default) or 'streaming' 9 | SHAWK_PROBE_INTERVAL="1s" # interval of scan connection stats (default: 1s) 10 | SHAWK_PROBE_FLUSH_INTERVAL="10s" # interval of flushing data into the CMDB (default: 30s) only if --mode='polling' 11 | 12 | SHAWK_DEBUG=1 # debug mode 13 | -------------------------------------------------------------------------------- /logging/level.go: -------------------------------------------------------------------------------- 1 | package logging 2 | 3 | import "fmt" 4 | 5 | type level uint8 6 | 7 | // loglevels 8 | const ( 9 | _ level = iota 10 | TRACE 11 | DEBUG 12 | INFO 13 | WARNING 14 | ERROR 15 | FATAL 16 | ) 17 | 18 | // String returns a string value of log level. 19 | func (l level) String() string { 20 | switch l { 21 | case TRACE: 22 | return "TRACE" 23 | case DEBUG: 24 | return "DEBUG" 25 | case INFO: 26 | return "INFO" 27 | case WARNING: 28 | return "WARNING" 29 | case ERROR: 30 | return "ERROR" 31 | case FATAL: 32 | return "FATAL" 33 | } 34 | return fmt.Sprintf("level(%d)", l) 35 | } 36 | -------------------------------------------------------------------------------- /probe/netlink/testdata/10000/stat: -------------------------------------------------------------------------------- 1 | 11185 (nginx) S 1 11185 11185 0 -1 4194624 218 392 0 1 0 0 1029 3152 20 0 1 0 10567517 144142336 1700 18446744073709551615 93898093838336 93898094868816 140732241499024 0 0 0 0 1073745920 402745863 1 0 0 17 0 0 0 0 0 0 93898096966256 93898097078384 93898129534976 140732241501961 140732241502010 140732241502010 140732241502184 0 2 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "schedule": "before 3am on the first day of the month", 3 | "extends": [ 4 | "config:base" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /scripts/docker-entrypoint-initdb.d/enable_query_log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo 'Tests - Enabling query log' 4 | 5 | cat << EOF >> /var/lib/postgresql/data/postgresql.conf 6 | log_destination = 'stderr' 7 | log_statement = 'all' 8 | EOF 9 | 10 | kill -HUP 1 11 | -------------------------------------------------------------------------------- /scripts/systemd/shawk.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=shawk probe agent 3 | Documentation=https://github.com/yuuki/shawk/ 4 | After=network-online.target nss-lookup.target 5 | 6 | [Service] 7 | EnvironmentFile=-/etc/default/shawk 8 | ExecStart=/usr/bin/shawk probe 9 | LimitNOFILE=65536 10 | LimitNPROC=65536 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /statik/statik.go: -------------------------------------------------------------------------------- 1 | //go:generate statik -f -m -p genstatik -src=../assets 2 | 3 | package statik 4 | 5 | import ( 6 | "io/ioutil" 7 | 8 | "github.com/rakyll/statik/fs" 9 | "golang.org/x/xerrors" 10 | 11 | // local import 12 | _ "github.com/yuuki/shawk/statik/genstatik" 13 | ) 14 | 15 | // FindString returns the string representation of the given file path. 16 | func FindString(path string) (string, error) { 17 | fs, err := fs.New() 18 | if err != nil { 19 | return "", xerrors.Errorf("statik/fs.New() failed: %v", err) 20 | } 21 | f, err := fs.Open(path) 22 | if err != nil { 23 | return "", xerrors.Errorf("statik/fs.Open(%s) failed: %v", path, err) 24 | } 25 | defer f.Close() 26 | b, err := ioutil.ReadAll(f) 27 | if err != nil { 28 | return "", xerrors.Errorf("read '%s' failed: %v", path, err) 29 | } 30 | return string(b), nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/context.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type ansiContext struct { 4 | currentChar byte 5 | paramBuffer []byte 6 | interBuffer []byte 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/ground_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type groundState struct { 4 | baseState 5 | } 6 | 7 | func (gs groundState) Handle(b byte) (s state, e error) { 8 | gs.parser.context.currentChar = b 9 | 10 | nextState, err := gs.baseState.Handle(b) 11 | if nextState != nil || err != nil { 12 | return nextState, err 13 | } 14 | 15 | switch { 16 | case sliceContains(printables, b): 17 | return gs, gs.parser.print() 18 | 19 | case sliceContains(executors, b): 20 | return gs, gs.parser.execute() 21 | } 22 | 23 | return gs, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/osc_string_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type oscStringState struct { 4 | baseState 5 | } 6 | 7 | func (oscState oscStringState) Handle(b byte) (s state, e error) { 8 | oscState.parser.logf("OscString::Handle %#x", b) 9 | nextState, err := oscState.baseState.Handle(b) 10 | if nextState != nil || err != nil { 11 | return nextState, err 12 | } 13 | 14 | switch { 15 | case isOscStringTerminator(b): 16 | return oscState.parser.ground, nil 17 | } 18 | 19 | return oscState, nil 20 | } 21 | 22 | // See below for OSC string terminators for linux 23 | // http://man7.org/linux/man-pages/man4/console_codes.4.html 24 | func isOscStringTerminator(b byte) bool { 25 | 26 | if b == ANSI_BEL || b == 0x5C { 27 | return true 28 | } 29 | 30 | return false 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/utilities.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | import ( 4 | "strconv" 5 | ) 6 | 7 | func sliceContains(bytes []byte, b byte) bool { 8 | for _, v := range bytes { 9 | if v == b { 10 | return true 11 | } 12 | } 13 | 14 | return false 15 | } 16 | 17 | func convertBytesToInteger(bytes []byte) int { 18 | s := string(bytes) 19 | i, _ := strconv.Atoi(s) 20 | return i 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/winterm/utilities.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package winterm 4 | 5 | // AddInRange increments a value by the passed quantity while ensuring the values 6 | // always remain within the supplied min / max range. 7 | func addInRange(n int16, increment int16, min int16, max int16) int16 { 8 | return ensureInRange(n+increment, min, max) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/EricLagergren/go-gnulib/dirent/README.md: -------------------------------------------------------------------------------- 1 | simple implementation of getdents(2) -------------------------------------------------------------------------------- /vendor/github.com/EricLagergren/go-gnulib/dirent/absent_freebsd.go: -------------------------------------------------------------------------------- 1 | package dirent 2 | 3 | import "golang.org/x/sys/unix" 4 | 5 | // isAbsent returns true if the file is absent in the directory. 6 | func isAbsent(d *unix.Dirent) bool { 7 | return d.Fileno == 0 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/EricLagergren/go-gnulib/dirent/absent_linux.go: -------------------------------------------------------------------------------- 1 | // +build !freebsd 2 | 3 | package dirent 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | // isAbsent returns true if the file is absent in the directory. 8 | func isAbsent(d *unix.Dirent) bool { 9 | return d.Ino == 0 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/EricLagergren/go-gnulib/util/unsafe.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "unsafe" 4 | 5 | func i8tob(a []int8) []byte { 6 | return *(*[]byte)(unsafe.Pointer(&a[0])) 7 | } 8 | 9 | func btoi8(a []byte) []int8 { 10 | return *(*[]int8)(unsafe.Pointer(&a[0])) 11 | } 12 | 13 | func i8toStr(a []int8) string { 14 | return string(i8tob(a)) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Microsoft/go-winio 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/pkg/errors v0.8.1 7 | github.com/sirupsen/logrus v1.4.1 8 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go hvsock.go 4 | -------------------------------------------------------------------------------- /vendor/github.com/Nvveen/Gotty/README: -------------------------------------------------------------------------------- 1 | Gotty is a library written in Go that determines and reads termcap database 2 | files to produce an interface for interacting with the capabilities of a 3 | terminal. 4 | See the godoc documentation or the source code for more information about 5 | function usage. 6 | -------------------------------------------------------------------------------- /vendor/github.com/Nvveen/Gotty/TODO: -------------------------------------------------------------------------------- 1 | gotty.go:// TODO add more concurrency to name lookup, look for more opportunities. 2 | all:// TODO add more documentation, with function usage in a doc.go file. 3 | all:// TODO add more testing/benchmarking with go test. 4 | -------------------------------------------------------------------------------- /vendor/github.com/Nvveen/Gotty/types.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Neal van Veen. All rights reserved. 2 | // Usage of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package gotty 6 | 7 | type TermInfo struct { 8 | boolAttributes map[string]bool 9 | numAttributes map[string]int16 10 | strAttributes map[string]string 11 | // The various names of the TermInfo file. 12 | Names []string 13 | } 14 | 15 | type stacker interface { 16 | } 17 | type stack []stacker 18 | 19 | type parser struct { 20 | st stack 21 | parameters []stacker 22 | dynamicVar map[byte]stacker 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/StackExchange/wmi/README.md: -------------------------------------------------------------------------------- 1 | wmi 2 | === 3 | 4 | Package wmi provides a WQL interface to Windows WMI. 5 | 6 | Note: It interfaces with WMI on the local machine, therefore it only runs on Windows. 7 | -------------------------------------------------------------------------------- /vendor/github.com/cenkalti/backoff/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/cenkalti/backoff/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | - 1.x 5 | - tip 6 | before_install: 7 | - go get github.com/mattn/goveralls 8 | - go get golang.org/x/tools/cmd/cover 9 | script: 10 | - $HOME/gopath/bin/goveralls -service=travis-ci 11 | -------------------------------------------------------------------------------- /vendor/github.com/cenkalti/backoff/tries.go: -------------------------------------------------------------------------------- 1 | package backoff 2 | 3 | import "time" 4 | 5 | /* 6 | WithMaxRetries creates a wrapper around another BackOff, which will 7 | return Stop if NextBackOff() has been called too many times since 8 | the last time Reset() was called 9 | 10 | Note: Implementation is not thread-safe. 11 | */ 12 | func WithMaxRetries(b BackOff, max uint64) BackOff { 13 | return &backOffTries{delegate: b, maxTries: max} 14 | } 15 | 16 | type backOffTries struct { 17 | delegate BackOff 18 | maxTries uint64 19 | numTries uint64 20 | } 21 | 22 | func (b *backOffTries) NextBackOff() time.Duration { 23 | if b.maxTries > 0 { 24 | if b.maxTries <= b.numTries { 25 | return Stop 26 | } 27 | b.numTries++ 28 | } 29 | return b.delegate.NextBackOff() 30 | } 31 | 32 | func (b *backOffTries) Reset() { 33 | b.numTries = 0 34 | b.delegate.Reset() 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/continuity/AUTHORS: -------------------------------------------------------------------------------- 1 | Aaron Lehmann 2 | Akash Gupta 3 | Akihiro Suda 4 | Andrew Pennebaker 5 | Brandon Philips 6 | Christopher Jones 7 | Daniel, Dao Quang Minh 8 | Derek McGowan 9 | Edward Pilatowicz 10 | Ian Campbell 11 | Justin Cormack 12 | Justin Cummins 13 | Phil Estes 14 | Stephen J Day 15 | Tobias Klauser 16 | Tonis Tiigi 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get golang.org/x/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/elastic/gosigar/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) [2009-2011] VMware, Inc. All Rights Reserved. 2 | 3 | This product is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this product except in compliance with the License. 5 | 6 | This product includes a number of subcomponents with 7 | separate copyright notices and license terms. Your use of these 8 | subcomponents is subject to the terms and conditions of the 9 | subcomponent's license, as noted in the LICENSE file. -------------------------------------------------------------------------------- /vendor/github.com/elastic/gosigar/sys/endian.go: -------------------------------------------------------------------------------- 1 | package sys 2 | 3 | import ( 4 | "encoding/binary" 5 | "unsafe" 6 | ) 7 | 8 | func GetEndian() binary.ByteOrder { 9 | var i int32 = 0x1 10 | v := (*[4]byte)(unsafe.Pointer(&i)) 11 | if v[0] == 0 { 12 | return binary.BigEndian 13 | } else { 14 | return binary.LittleEndian 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/elastic/gosigar/sys/linux/sysconf_cgo.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo 2 | 3 | package linux 4 | 5 | /* 6 | #include 7 | */ 8 | import "C" 9 | 10 | // GetClockTicks returns the number of click ticks in one jiffie. 11 | func GetClockTicks() int { 12 | return int(C.sysconf(C._SC_CLK_TCK)) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/elastic/gosigar/sys/linux/sysconf_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo !linux 2 | 3 | package linux 4 | 5 | // GetClockTicks returns the number of click ticks in one jiffie. 6 | func GetClockTicks() int { 7 | return 100 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.9.x 6 | - 1.10.x 7 | - 1.11.x 8 | - tip 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/error_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | // errstr converts error code to string. 6 | func errstr(errno int) string { 7 | return "" 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/error_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "fmt" 7 | "syscall" 8 | "unicode/utf16" 9 | ) 10 | 11 | // errstr converts error code to string. 12 | func errstr(errno int) string { 13 | // ask windows for the remaining errors 14 | var flags uint32 = syscall.FORMAT_MESSAGE_FROM_SYSTEM | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS 15 | b := make([]uint16, 300) 16 | n, err := syscall.FormatMessage(flags, 0, uint32(errno), 0, b, nil) 17 | if err != nil { 18 | return fmt.Sprintf("error %d (FormatMessage failed with: %v)", errno, err) 19 | } 20 | // trim terminating \r and \n 21 | for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { 22 | } 23 | return string(utf16.Decode(b[:n])) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-ole/go-ole 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpoint.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IConnectionPoint struct { 6 | IUnknown 7 | } 8 | 9 | type IConnectionPointVtbl struct { 10 | IUnknownVtbl 11 | GetConnectionInterface uintptr 12 | GetConnectionPointContainer uintptr 13 | Advise uintptr 14 | Unadvise uintptr 15 | EnumConnections uintptr 16 | } 17 | 18 | func (v *IConnectionPoint) VTable() *IConnectionPointVtbl { 19 | return (*IConnectionPointVtbl)(unsafe.Pointer(v.RawVTable)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | import "unsafe" 6 | 7 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { 8 | return int32(0) 9 | } 10 | 11 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) { 12 | return uint32(0), NewError(E_NOTIMPL) 13 | } 14 | 15 | func (v *IConnectionPoint) Unadvise(cookie uint32) error { 16 | return NewError(E_NOTIMPL) 17 | } 18 | 19 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) { 20 | return NewError(E_NOTIMPL) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IConnectionPointContainer struct { 6 | IUnknown 7 | } 8 | 9 | type IConnectionPointContainerVtbl struct { 10 | IUnknownVtbl 11 | EnumConnectionPoints uintptr 12 | FindConnectionPoint uintptr 13 | } 14 | 15 | func (v *IConnectionPointContainer) VTable() *IConnectionPointContainerVtbl { 16 | return (*IConnectionPointContainerVtbl)(unsafe.Pointer(v.RawVTable)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { 6 | return NewError(E_NOTIMPL) 7 | } 8 | 9 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) error { 10 | return NewError(E_NOTIMPL) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { 11 | return NewError(E_NOTIMPL) 12 | } 13 | 14 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) (err error) { 15 | hr, _, _ := syscall.Syscall( 16 | v.VTable().FindConnectionPoint, 17 | 3, 18 | uintptr(unsafe.Pointer(v)), 19 | uintptr(unsafe.Pointer(iid)), 20 | uintptr(unsafe.Pointer(point))) 21 | if hr != 0 { 22 | err = NewError(hr) 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/idispatch_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) { 6 | return []int32{}, NewError(E_NOTIMPL) 7 | } 8 | 9 | func getTypeInfoCount(disp *IDispatch) (uint32, error) { 10 | return uint32(0), NewError(E_NOTIMPL) 11 | } 12 | 13 | func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) { 14 | return nil, NewError(E_NOTIMPL) 15 | } 16 | 17 | func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (*VARIANT, error) { 18 | return nil, NewError(E_NOTIMPL) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/ienumvariant.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IEnumVARIANT struct { 6 | IUnknown 7 | } 8 | 9 | type IEnumVARIANTVtbl struct { 10 | IUnknownVtbl 11 | Next uintptr 12 | Skip uintptr 13 | Reset uintptr 14 | Clone uintptr 15 | } 16 | 17 | func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl { 18 | return (*IEnumVARIANTVtbl)(unsafe.Pointer(v.RawVTable)) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/ienumvariant_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | 9 | func (enum *IEnumVARIANT) Reset() error { 10 | return NewError(E_NOTIMPL) 11 | } 12 | 13 | func (enum *IEnumVARIANT) Skip(celt uint) error { 14 | return NewError(E_NOTIMPL) 15 | } 16 | 17 | func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) { 18 | return NewVariant(VT_NULL, int64(0)), 0, NewError(E_NOTIMPL) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iinspectable.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IInspectable struct { 6 | IUnknown 7 | } 8 | 9 | type IInspectableVtbl struct { 10 | IUnknownVtbl 11 | GetIIds uintptr 12 | GetRuntimeClassName uintptr 13 | GetTrustLevel uintptr 14 | } 15 | 16 | func (v *IInspectable) VTable() *IInspectableVtbl { 17 | return (*IInspectableVtbl)(unsafe.Pointer(v.RawVTable)) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iinspectable_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *IInspectable) GetIids() ([]*GUID, error) { 6 | return []*GUID{}, NewError(E_NOTIMPL) 7 | } 8 | 9 | func (v *IInspectable) GetRuntimeClassName() (string, error) { 10 | return "", NewError(E_NOTIMPL) 11 | } 12 | 13 | func (v *IInspectable) GetTrustLevel() (uint32, error) { 14 | return uint32(0), NewError(E_NOTIMPL) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IProvideClassInfo struct { 6 | IUnknown 7 | } 8 | 9 | type IProvideClassInfoVtbl struct { 10 | IUnknownVtbl 11 | GetClassInfo uintptr 12 | } 13 | 14 | func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl { 15 | return (*IProvideClassInfoVtbl)(unsafe.Pointer(v.RawVTable)) 16 | } 17 | 18 | func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err error) { 19 | cinfo, err = getClassInfo(v) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { 11 | hr, _, _ := syscall.Syscall( 12 | disp.VTable().GetClassInfo, 13 | 2, 14 | uintptr(unsafe.Pointer(disp)), 15 | uintptr(unsafe.Pointer(&tinfo)), 16 | 0) 17 | if hr != 0 { 18 | err = NewError(hr) 19 | } 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type ITypeInfo struct { 6 | IUnknown 7 | } 8 | 9 | type ITypeInfoVtbl struct { 10 | IUnknownVtbl 11 | GetTypeAttr uintptr 12 | GetTypeComp uintptr 13 | GetFuncDesc uintptr 14 | GetVarDesc uintptr 15 | GetNames uintptr 16 | GetRefTypeOfImplType uintptr 17 | GetImplTypeFlags uintptr 18 | GetIDsOfNames uintptr 19 | Invoke uintptr 20 | GetDocumentation uintptr 21 | GetDllEntry uintptr 22 | GetRefTypeInfo uintptr 23 | AddressOfMember uintptr 24 | CreateInstance uintptr 25 | GetMops uintptr 26 | GetContainingTypeLib uintptr 27 | ReleaseTypeAttr uintptr 28 | ReleaseFuncDesc uintptr 29 | ReleaseVarDesc uintptr 30 | } 31 | 32 | func (v *ITypeInfo) VTable() *ITypeInfoVtbl { 33 | return (*ITypeInfoVtbl)(unsafe.Pointer(v.RawVTable)) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) { 11 | hr, _, _ := syscall.Syscall( 12 | uintptr(v.VTable().GetTypeAttr), 13 | 2, 14 | uintptr(unsafe.Pointer(v)), 15 | uintptr(unsafe.Pointer(&tattr)), 16 | 0) 17 | if hr != 0 { 18 | err = NewError(hr) 19 | } 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iunknown_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { 6 | return NewError(E_NOTIMPL) 7 | } 8 | 9 | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { 10 | return nil, NewError(E_NOTIMPL) 11 | } 12 | 13 | func addRef(unk *IUnknown) int32 { 14 | return 0 15 | } 16 | 17 | func release(unk *IUnknown) int32 { 18 | return 0 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/oleutil/connection_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package oleutil 4 | 5 | import ole "github.com/go-ole/go-ole" 6 | 7 | // ConnectObject creates a connection point between two services for communication. 8 | func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) { 9 | return 0, ole.NewError(ole.E_NOTIMPL) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/oleutil/go-get.go: -------------------------------------------------------------------------------- 1 | // This file is here so go get succeeds as without it errors with: 2 | // no buildable Go source files in ... 3 | // 4 | // +build !windows 5 | 6 | package oleutil 7 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/safearray.go: -------------------------------------------------------------------------------- 1 | // Package is meant to retrieve and process safe array data returned from COM. 2 | 3 | package ole 4 | 5 | // SafeArrayBound defines the SafeArray boundaries. 6 | type SafeArrayBound struct { 7 | Elements uint32 8 | LowerBound int32 9 | } 10 | 11 | // SafeArray is how COM handles arrays. 12 | type SafeArray struct { 13 | Dimensions uint16 14 | FeaturesFlag uint16 15 | ElementsSize uint32 16 | LocksAmount uint32 17 | Data uint32 18 | Bounds [16]byte 19 | } 20 | 21 | // SAFEARRAY is obsolete, exists for backwards compatibility. 22 | // Use SafeArray 23 | type SAFEARRAY SafeArray 24 | 25 | // SAFEARRAYBOUND is obsolete, exists for backwards compatibility. 26 | // Use SafeArrayBound 27 | type SAFEARRAYBOUND SafeArrayBound 28 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/safearrayslices.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | func safeArrayFromByteSlice(slice []byte) *SafeArray { 10 | array, _ := safeArrayCreateVector(VT_UI1, 0, uint32(len(slice))) 11 | 12 | if array == nil { 13 | panic("Could not convert []byte to SAFEARRAY") 14 | } 15 | 16 | for i, v := range slice { 17 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(&v))) 18 | } 19 | return array 20 | } 21 | 22 | func safeArrayFromStringSlice(slice []string) *SafeArray { 23 | array, _ := safeArrayCreateVector(VT_BSTR, 0, uint32(len(slice))) 24 | 25 | if array == nil { 26 | panic("Could not convert []string to SAFEARRAY") 27 | } 28 | // SysAllocStringLen(s) 29 | for i, v := range slice { 30 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(SysAllocStringLen(v)))) 31 | } 32 | return array 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variables.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | var ( 10 | modcombase = syscall.NewLazyDLL("combase.dll") 11 | modkernel32, _ = syscall.LoadDLL("kernel32.dll") 12 | modole32, _ = syscall.LoadDLL("ole32.dll") 13 | modoleaut32, _ = syscall.LoadDLL("oleaut32.dll") 14 | modmsvcrt, _ = syscall.LoadDLL("msvcrt.dll") 15 | moduser32, _ = syscall.LoadDLL("user32.dll") 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_386.go: -------------------------------------------------------------------------------- 1 | // +build 386 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_amd64.go: -------------------------------------------------------------------------------- 1 | // +build amd64 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_386.go: -------------------------------------------------------------------------------- 1 | // +build windows,386 2 | 3 | package ole 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | "time" 9 | "unsafe" 10 | ) 11 | 12 | // GetVariantDate converts COM Variant Time value to Go time.Time. 13 | func GetVariantDate(value uint64) (time.Time, error) { 14 | var st syscall.Systemtime 15 | v1 := uint32(value) 16 | v2 := uint32(value >> 32) 17 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) 18 | if r != 0 { 19 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 20 | } 21 | return time.Now(), errors.New("Could not convert to time, passing current time.") 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_amd64.go: -------------------------------------------------------------------------------- 1 | // +build windows,amd64 2 | 3 | package ole 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | "time" 9 | "unsafe" 10 | ) 11 | 12 | // GetVariantDate converts COM Variant Time value to Go time.Time. 13 | func GetVariantDate(value uint64) (time.Time, error) { 14 | var st syscall.Systemtime 15 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(value), uintptr(unsafe.Pointer(&st))) 16 | if r != 0 { 17 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 18 | } 19 | return time.Now(), errors.New("Could not convert to time, passing current time.") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-stack/stack/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.7.x 5 | - 1.8.x 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | before_install: 12 | - go get github.com/mattn/goveralls 13 | 14 | script: 15 | - goveralls -service=travis-ci 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-stack/stack/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-stack/stack 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_panic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build purego 6 | 7 | package cmp 8 | 9 | import "reflect" 10 | 11 | const supportExporters = false 12 | 13 | func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value { 14 | panic("no support for forcibly accessing unexported fields") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build !cmp_debug 6 | 7 | package diff 8 | 9 | var debug debugger 10 | 11 | type debugger struct{} 12 | 13 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 14 | return f 15 | } 16 | func (debugger) Update() {} 17 | func (debugger) Finish() {} 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build !go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = true 11 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 PLUMgrid 2 | Copyright 2016 Kinvolk 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/elf_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package elf 4 | 5 | // not supported; dummy struct 6 | type BPFKProbePerf struct{} 7 | type SectionParams struct{} 8 | type Map struct{} 9 | 10 | func (b *Module) Load(parameters map[string]SectionParams) error { 11 | return errNotSupported 12 | } 13 | 14 | func NewBpfPerfEvent(fileName string) *BPFKProbePerf { 15 | // not supported 16 | return nil 17 | } 18 | 19 | func (b *BPFKProbePerf) Load() error { 20 | return errNotSupported 21 | } 22 | 23 | func (b *BPFKProbePerf) PollStart(mapName string, receiverChan chan []byte, lostChan chan uint64) { 24 | // not supported 25 | return 26 | } 27 | 28 | func (b *BPFKProbePerf) PollStop(mapName string) { 29 | // not supported 30 | return 31 | } 32 | 33 | func (m *Map) Fd() int { 34 | // not supported 35 | return -1 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/errno.go: -------------------------------------------------------------------------------- 1 | package elf 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | errNotSupported = errors.New("not supported") 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/include/bpf_map.h: -------------------------------------------------------------------------------- 1 | #define BUF_SIZE_MAP_NS 256 2 | 3 | typedef struct bpf_map_def { 4 | unsigned int type; 5 | unsigned int key_size; 6 | unsigned int value_size; 7 | unsigned int max_entries; 8 | unsigned int map_flags; 9 | unsigned int pinning; 10 | char namespace[BUF_SIZE_MAP_NS]; 11 | } bpf_map_def; 12 | 13 | enum bpf_pin_type { 14 | PIN_NONE = 0, 15 | PIN_OBJECT_NS, 16 | PIN_GLOBAL_NS, 17 | PIN_CUSTOM_NS, 18 | }; 19 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/perf_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package elf 4 | 5 | type PerfMap struct{} 6 | 7 | func InitPerfMap(b *Module, mapName string, receiverChan chan []byte, lostChan chan uint64) (*PerfMap, error) { 8 | return nil, errNotSupported 9 | } 10 | 11 | func (pm *PerfMap) SetTimestampFunc(timestamp func(*[]byte) uint64) {} 12 | 13 | func (pm *PerfMap) PollStart() {} 14 | 15 | func (pm *PerfMap) PollStop() {} 16 | 17 | func NowNanoseconds() uint64 { 18 | return 0 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/utsname_int8.go: -------------------------------------------------------------------------------- 1 | // +build linux,amd64 linux,arm64 2 | 3 | package elf 4 | 5 | func utsnameStr(in []int8) string { 6 | out := make([]byte, len(in)) 7 | for i := 0; i < len(in); i++ { 8 | if in[i] == 0 { 9 | break 10 | } 11 | out = append(out, byte(in[i])) 12 | } 13 | return string(out) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/iovisor/gobpf/elf/utsname_uint8.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm linux,ppc64 linux,ppc64le s390x 2 | 3 | package elf 4 | 5 | func utsnameStr(in []uint8) string { 6 | out := make([]byte, len(in)) 7 | for i := 0; i < len(in); i++ { 8 | if in[i] == 0 { 9 | break 10 | } 11 | out = append(out, byte(in[i])) 12 | } 13 | return string(out) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/chunkreader?status.svg)](https://godoc.org/github.com/jackc/chunkreader) 2 | [![Build Status](https://travis-ci.org/jackc/chunkreader.svg)](https://travis-ci.org/jackc/chunkreader) 3 | 4 | # chunkreader 5 | 6 | Package chunkreader provides an io.Reader wrapper that minimizes IO reads and memory allocations. 7 | 8 | Extracted from original implementation in https://github.com/jackc/pgx. 9 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/chunkreader/v2 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgconn/.gitignore: -------------------------------------------------------------------------------- 1 | .envrc 2 | vendor/ 3 | .vscode 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgconn/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgconn 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/jackc/chunkreader/v2 v2.0.1 7 | github.com/jackc/pgio v1.0.0 8 | github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 9 | github.com/jackc/pgpassfile v1.0.0 10 | github.com/jackc/pgproto3/v2 v2.0.1 11 | github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8 12 | github.com/stretchr/testify v1.5.1 13 | golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 14 | golang.org/x/text v0.3.2 15 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgio?status.svg)](https://godoc.org/github.com/jackc/pgio) 2 | [![Build Status](https://travis-ci.org/jackc/pgio.svg)](https://travis-ci.org/jackc/pgio) 3 | 4 | # pgio 5 | 6 | Package pgio is a low-level toolkit building messages in the PostgreSQL wire protocol. 7 | 8 | pgio provides functions for appending integers to a []byte while doing byte 9 | order conversion. 10 | 11 | Extracted from original implementation in https://github.com/jackc/pgx. 12 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/doc.go: -------------------------------------------------------------------------------- 1 | // Package pgio is a low-level toolkit building messages in the PostgreSQL wire protocol. 2 | /* 3 | pgio provides functions for appending integers to a []byte while doing byte 4 | order conversion. 5 | */ 6 | package pgio 7 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgio 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgpassfile?status.svg)](https://godoc.org/github.com/jackc/pgpassfile) 2 | [![Build Status](https://travis-ci.org/jackc/pgpassfile.svg)](https://travis-ci.org/jackc/pgpassfile) 3 | 4 | # pgpassfile 5 | 6 | Package pgpassfile is a parser PostgreSQL .pgpass files. 7 | 8 | Extracted and rewritten from original implementation in https://github.com/jackc/pgx. 9 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgpassfile 2 | 3 | go 1.12 4 | 5 | require github.com/stretchr/testify v1.3.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 7 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 8 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgproto3?status.svg)](https://godoc.org/github.com/jackc/pgproto3) 2 | [![Build Status](https://travis-ci.org/jackc/pgproto3.svg)](https://travis-ci.org/jackc/pgproto3) 3 | 4 | # pgproto3 5 | 6 | Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3. 7 | 8 | pgproto3 can be used as a foundation for PostgreSQL drivers, proxies, mock servers, load balancers and more. 9 | 10 | See example/pgfortune for a playful example of a fake PostgreSQL server. 11 | 12 | Extracted from original implementation in https://github.com/jackc/pgx. 13 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/big_endian.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | import ( 4 | "encoding/binary" 5 | ) 6 | 7 | type BigEndianBuf [8]byte 8 | 9 | func (b BigEndianBuf) Int16(n int16) []byte { 10 | buf := b[0:2] 11 | binary.BigEndian.PutUint16(buf, uint16(n)) 12 | return buf 13 | } 14 | 15 | func (b BigEndianBuf) Uint16(n uint16) []byte { 16 | buf := b[0:2] 17 | binary.BigEndian.PutUint16(buf, n) 18 | return buf 19 | } 20 | 21 | func (b BigEndianBuf) Int32(n int32) []byte { 22 | buf := b[0:4] 23 | binary.BigEndian.PutUint32(buf, uint32(n)) 24 | return buf 25 | } 26 | 27 | func (b BigEndianBuf) Uint32(n uint32) []byte { 28 | buf := b[0:4] 29 | binary.BigEndian.PutUint32(buf, n) 30 | return buf 31 | } 32 | 33 | func (b BigEndianBuf) Int64(n int64) []byte { 34 | buf := b[0:8] 35 | binary.BigEndian.PutUint64(buf, uint64(n)) 36 | return buf 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/chunkreader.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/jackc/chunkreader/v2" 7 | ) 8 | 9 | // ChunkReader is an interface to decouple github.com/jackc/chunkreader from this package. 10 | type ChunkReader interface { 11 | // Next returns buf filled with the next n bytes. If an error (including a partial read) occurs, 12 | // buf must be nil. Next must preserve any partially read data. Next must not reuse buf. 13 | Next(n int) (buf []byte, err error) 14 | } 15 | 16 | // NewChunkReader creates and returns a new default ChunkReader. 17 | func NewChunkReader(r io.Reader) ChunkReader { 18 | return chunkreader.New(r) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3. 2 | // 3 | // See https://www.postgresql.org/docs/current/protocol-message-formats.html for meanings of the different messages. 4 | package pgproto3 5 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgproto3/v2 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/jackc/chunkreader/v2 v2.0.0 7 | github.com/jackc/pgio v1.0.0 8 | github.com/stretchr/testify v1.4.0 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/notice_response.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | type NoticeResponse ErrorResponse 4 | 5 | // Backend identifies this message as sendable by the PostgreSQL backend. 6 | func (*NoticeResponse) Backend() {} 7 | 8 | // Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message 9 | // type identifier and 4 byte message length. 10 | func (dst *NoticeResponse) Decode(src []byte) error { 11 | return (*ErrorResponse)(dst).Decode(src) 12 | } 13 | 14 | // Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length. 15 | func (src *NoticeResponse) Encode(dst []byte) []byte { 16 | return append(dst, (*ErrorResponse)(src).marshalBinary('N')...) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgservicefile?status.svg)](https://godoc.org/github.com/jackc/pgservicefile) 2 | [![Build Status](https://travis-ci.org/jackc/pgservicefile.svg)](https://travis-ci.org/jackc/pgservicefile) 3 | 4 | # pgservicefile 5 | 6 | Package pgservicefile is a parser for PostgreSQL service files (e.g. `.pg_service.conf`). 7 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgservicefile 2 | 3 | go 1.14 4 | 5 | require github.com/stretchr/testify v1.5.1 6 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= 7 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 8 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 9 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 10 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 11 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgtype?status.svg)](https://godoc.org/github.com/jackc/pgtype) 2 | 3 | # pgtype 4 | 5 | pgtype implements Go types for over 70 PostgreSQL types. pgtype is the type system underlying the 6 | https://github.com/jackc/pgx PostgreSQL driver. These types support the binary format for enhanced performance with pgx. 7 | They also support the database/sql `Scan` and `Value` interfaces and can be used with https://github.com/lib/pq. 8 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/cidr.go: -------------------------------------------------------------------------------- 1 | package pgtype 2 | 3 | type CIDR Inet 4 | 5 | func (dst *CIDR) Set(src interface{}) error { 6 | return (*Inet)(dst).Set(src) 7 | } 8 | 9 | func (dst CIDR) Get() interface{} { 10 | return (Inet)(dst).Get() 11 | } 12 | 13 | func (src *CIDR) AssignTo(dst interface{}) error { 14 | return (*Inet)(src).AssignTo(dst) 15 | } 16 | 17 | func (dst *CIDR) DecodeText(ci *ConnInfo, src []byte) error { 18 | return (*Inet)(dst).DecodeText(ci, src) 19 | } 20 | 21 | func (dst *CIDR) DecodeBinary(ci *ConnInfo, src []byte) error { 22 | return (*Inet)(dst).DecodeBinary(ci, src) 23 | } 24 | 25 | func (src CIDR) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { 26 | return (Inet)(src).EncodeText(ci, buf) 27 | } 28 | 29 | func (src CIDR) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { 30 | return (Inet)(src).EncodeBinary(ci, buf) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgtype 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/gofrs/uuid v3.2.0+incompatible 7 | github.com/jackc/pgio v1.0.0 8 | github.com/jackc/pgx v3.6.2+incompatible 9 | github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186 10 | github.com/lib/pq v1.2.0 11 | github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 12 | github.com/stretchr/testify v1.4.0 13 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/typed_range_gen.sh: -------------------------------------------------------------------------------- 1 | erb range_type=Int4range element_type=Int4 typed_range.go.erb > int4range.go 2 | erb range_type=Int8range element_type=Int8 typed_range.go.erb > int8range.go 3 | erb range_type=Tsrange element_type=Timestamp typed_range.go.erb > tsrange.go 4 | erb range_type=Tstzrange element_type=Timestamptz typed_range.go.erb > tstzrange.go 5 | erb range_type=Daterange element_type=Date typed_range.go.erb > daterange.go 6 | erb range_type=Numrange element_type=Numeric typed_range.go.erb > numrange.go 7 | goimports -w *range.go 8 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .envrc 25 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | # Derived from https://github.com/lib/pq/blob/master/.travis.yml 8 | before_install: 9 | - ./travis/before_install.bash 10 | 11 | env: 12 | global: 13 | - GO111MODULE=on 14 | - PGX_TEST_DATABASE=postgres://pgx_md5:secret@127.0.0.1/pgx_test 15 | 16 | matrix: 17 | - CRATEVERSION=2.1 PGX_TEST_CRATEDB_CONN_STRING="host=127.0.0.1 port=6543 user=pgx database=pgx_test" 18 | - PGVERSION=12 19 | - PGVERSION=11 20 | - PGVERSION=10 21 | - PGVERSION=9.6 22 | - PGVERSION=9.5 23 | - PGVERSION=9.4 24 | 25 | before_script: 26 | - ./travis/before_script.bash 27 | 28 | script: 29 | - ./travis/script.bash 30 | 31 | matrix: 32 | allow_failures: 33 | - go: tip 34 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgx/v4 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/cockroachdb/apd v1.1.0 7 | github.com/gofrs/uuid v3.2.0+incompatible 8 | github.com/jackc/pgconn v1.5.0 9 | github.com/jackc/pgio v1.0.0 10 | github.com/jackc/pgproto3/v2 v2.0.1 11 | github.com/jackc/pgtype v1.3.0 12 | github.com/jackc/puddle v1.1.0 13 | github.com/mattn/go-colorable v0.1.2 // indirect 14 | github.com/mattn/go-isatty v0.0.9 // indirect 15 | github.com/rs/zerolog v1.15.0 16 | github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 17 | github.com/sirupsen/logrus v1.4.2 18 | github.com/stretchr/testify v1.5.1 19 | go.uber.org/zap v1.10.0 20 | golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect 21 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 22 | gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/joho/godotenv/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/joho/godotenv/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | 6 | os: 7 | - linux 8 | - osx 9 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - 1.9.x 10 | - 1.10.x 11 | - 1.11.x 12 | - 1.12.x 13 | - tip 14 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Kelsey Hightower kelsey.hightower@gmail.com github.com/kelseyhightower 2 | Travis Parker travis.parker@gmail.com github.com/teepark 3 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Kelsey Hightower. All rights reserved. 2 | // Use of this source code is governed by the MIT License that can be found in 3 | // the LICENSE file. 4 | 5 | // Package envconfig implements decoding of environment variables based on a user 6 | // defined specification. A typical use is using environment variables for 7 | // configuration settings. 8 | package envconfig 9 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/env_os.go: -------------------------------------------------------------------------------- 1 | // +build appengine go1.5 2 | 3 | package envconfig 4 | 5 | import "os" 6 | 7 | var lookupEnv = os.LookupEnv 8 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/env_syscall.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!go1.5 2 | 3 | package envconfig 4 | 5 | import "syscall" 6 | 7 | var lookupEnv = syscall.Getenv 8 | -------------------------------------------------------------------------------- /vendor/github.com/kelseyhightower/envconfig/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/kelseyhightower/envconfig 2 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sequences 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | var ( 10 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") 11 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") 12 | ) 13 | 14 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { 15 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 16 | 17 | var mode uint32 18 | err := syscall.GetConsoleMode(syscall.Stdout, &mode) 19 | if err != nil { 20 | return err 21 | } 22 | 23 | if enable { 24 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING 25 | } else { 26 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING 27 | } 28 | 29 | ret, _, err := setConsoleMode.Call(uintptr(stream), uintptr(mode)) 30 | if ret == 0 { 31 | return err 32 | } 33 | 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin 2 | 3 | package sequences 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error { 10 | return fmt.Errorf("windows only package") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | - tip 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./go.test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | _ "github.com/mattn/go-isatty" 10 | ) 11 | 12 | // NewColorable returns new instance of Writer which handles escape sequence. 13 | func NewColorable(file *os.File) io.Writer { 14 | if file == nil { 15 | panic("nil passed instead of *os.File to NewColorable()") 16 | } 17 | 18 | return file 19 | } 20 | 21 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 22 | func NewColorableStdout() io.Writer { 23 | return os.Stdout 24 | } 25 | 26 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 27 | func NewColorableStderr() io.Writer { 28 | return os.Stderr 29 | } 30 | 31 | // EnableColorsStdout enable colors if possible. 32 | func EnableColorsStdout(enabled *bool) func() { 33 | if enabled != nil { 34 | *enabled = true 35 | } 36 | return func() {} 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-colorable 2 | 3 | require ( 4 | github.com/mattn/go-isatty v0.0.12 5 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect 6 | ) 7 | 8 | go 1.13 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.sum: -------------------------------------------------------------------------------- 1 | github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= 2 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 3 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 4 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= 5 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 6 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | - tip 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./go.test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-isatty 2 | 3 | go 1.12 4 | 5 | require golang.org/x/sys v0.0.0-20200116001909-b77594299b42 6 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= 2 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | // +build plan9 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // IsTerminal returns true if the given file descriptor is a terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | path, err := syscall.Fd2path(int(fd)) 12 | if err != nil { 13 | return false 14 | } 15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "postUpdateOptions": [ 6 | "gomodTidy" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.mailmap: -------------------------------------------------------------------------------- 1 | Stephen J Day 2 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | approve_by_comment: true 2 | approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' 3 | reject_regex: ^Rejected 4 | reset_on_push: true 5 | author_approval: ignored 6 | signed_off_by: 7 | required: true 8 | reviewers: 9 | teams: 10 | - go-digest-maintainers 11 | name: default 12 | required: 2 13 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | - master 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Aaron Lehmann (@aaronlehmann) 2 | Brandon Philips (@philips) 3 | Brendan Burns (@brendandburns) 4 | Derek McGowan (@dmcgowan) 5 | Jason Bouzane (@jbouzane) 6 | John Starks (@jstarks) 7 | Jonathan Boulle (@jonboulle) 8 | Stephen Day (@stevvooe) 9 | Vincent Batts (@vbatts) 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/NOTICE: -------------------------------------------------------------------------------- 1 | runc 2 | 3 | Copyright 2012-2015 Docker, Inc. 4 | 5 | This product includes software developed at Docker, Inc. (http://www.docker.com). 6 | 7 | The following is courtesy of our legal counsel: 8 | 9 | 10 | Use and transfer of Docker may be subject to certain restrictions by the 11 | United States and other governments. 12 | It is your responsibility to ensure that your use and/or transfer does not 13 | violate applicable laws. 14 | 15 | For more information, please see http://www.bis.doc.gov 16 | 17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 18 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules/ 3 | *.iml 4 | *.exe 5 | .cover/ 6 | vendor/ 7 | cover.out 8 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | go_import_path: github.com/ory/dockertest 4 | 5 | language: go 6 | 7 | services: 8 | - docker 9 | 10 | go: 11 | - 1.9 12 | 13 | install: 14 | - go get github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/pierrre/gotestcover 15 | - curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o $GOPATH/bin/dep && chmod +x $GOPATH/bin/dep 16 | - dep ensure -vendor-only 17 | 18 | script: 19 | - go vet -x . 20 | - go test -covermode=atomic -coverprofile="cover.out" . 21 | - goveralls -coverprofile="cover.out" 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | We release patches for security vulnerabilities. 6 | Which versions are eligible receiving such patches 7 | depend on the CVSS v3.0 Rating: 8 | 9 | | CVSS v3.0 | Supported Versions | 10 | | ---------- | ----------------------------------------- | 11 | | 9.0-10.0 | Releases within the previous three months | 12 | | 4.0-8.9 | Most recent release | 13 | 14 | ## Reporting a Vulnerability 15 | 16 | Please report (suspected) security vulnerabilities to 17 | **[security@ory.sh](mailto:security@ory.sh)**. You will receive 18 | a response from us within 48 hours. If the issue is confirmed, 19 | we will release a patch as soon as possible depending on complexity 20 | but historically within a few days. 21 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/DOCKER-LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | You can find the Docker license at the following link: 6 | https://raw.githubusercontent.com/docker/docker/master/LICENSE 7 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/client_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 go-dockerclient authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package docker 8 | 9 | import ( 10 | "context" 11 | "net" 12 | "net/http" 13 | ) 14 | 15 | // initializeNativeClient initializes the native Unix domain socket client on 16 | // Unix-style operating systems 17 | func (c *Client) initializeNativeClient(trFunc func() *http.Transport) { 18 | if c.endpointURL.Scheme != unixProtocol { 19 | return 20 | } 21 | sockPath := c.endpointURL.Path 22 | 23 | tr := trFunc() 24 | 25 | tr.Dial = func(network, addr string) (net.Conn, error) { 26 | return c.Dialer.Dial(unixProtocol, sockPath) 27 | } 28 | tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) { 29 | return c.Dialer.Dial(unixProtocol, sockPath) 30 | } 31 | c.HTTPClient.Transport = tr 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/distribution.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 go-dockerclient authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package docker 6 | 7 | import ( 8 | "encoding/json" 9 | 10 | "github.com/ory/dockertest/docker/types/registry" 11 | ) 12 | 13 | // InspectDistribution returns image digest and platform information by contacting the registry 14 | func (c *Client) InspectDistribution(name string) (*registry.DistributionInspect, error) { 15 | path := "/distribution/" + name + "/json" 16 | resp, err := c.do("GET", path, doOptions{}) 17 | if err != nil { 18 | return nil, err 19 | } 20 | defer resp.Body.Close() 21 | var distributionInspect registry.DistributionInspect 22 | if err := json.NewDecoder(resp.Body).Decode(&distributionInspect); err != nil { 23 | return nil, err 24 | } 25 | return &distributionInspect, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | // DefaultHost constant defines the default host string used by docker on other hosts than Windows 8 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 9 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | // DefaultHost constant defines the default host string used by docker on Windows 4 | var DefaultHost = "npipe://" + DefaultNamedPipe 5 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/opts/opts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. dockerd -H tcp://:8080 6 | const DefaultHTTPHost = "localhost" 7 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/archive_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 4 | 5 | func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/ory/dockertest/docker/pkg/system" 7 | ) 8 | 9 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { 10 | 11 | // Don't look at size for dirs, its not a good measure of change 12 | if oldStat.Mtim() != newStat.Mtim() || 13 | oldStat.Mode() != newStat.Mode() || 14 | oldStat.Size() != newStat.Size() && !oldStat.Mode().IsDir() { 15 | return true 16 | } 17 | return false 18 | } 19 | 20 | func (info *FileInfo) isDir() bool { 21 | return info.parent == nil || info.stat.Mode().IsDir() 22 | } 23 | 24 | func getIno(fi os.FileInfo) (inode uint64) { 25 | return 26 | } 27 | 28 | func hasHardlinks(fi os.FileInfo) bool { 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func normalizePath(path string) string { 10 | return filepath.ToSlash(path) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/copy_windows.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func normalizePath(path string) string { 8 | return filepath.FromSlash(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/time_linux.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | ) 7 | 8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 9 | if time.IsZero() { 10 | // Return UTIME_OMIT special value 11 | ts.Sec = 0 12 | ts.Nsec = ((1 << 30) - 2) 13 | return 14 | } 15 | return syscall.NsecToTimespec(time.UnixNano()) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/archive/time_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive // import "github.com/ory/dockertest/docker/pkg/archive" 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 11 | nsec := int64(0) 12 | if !time.IsZero() { 13 | nsec = time.UnixNano() 14 | } 15 | return syscall.NsecToTimespec(nsec) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/fileutils/fileutils_darwin.go: -------------------------------------------------------------------------------- 1 | package fileutils // import "github.com/ory/dockertest/docker/pkg/fileutils" 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | // GetTotalUsedFds returns the number of used File Descriptors by 11 | // executing `lsof -p PID` 12 | func GetTotalUsedFds() int { 13 | pid := os.Getpid() 14 | 15 | cmd := exec.Command("lsof", "-p", strconv.Itoa(pid)) 16 | 17 | output, err := cmd.CombinedOutput() 18 | if err != nil { 19 | return -1 20 | } 21 | 22 | outputStr := strings.TrimSpace(string(output)) 23 | 24 | fds := strings.Split(outputStr, "\n") 25 | 26 | return len(fds) - 1 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/fileutils/fileutils_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package fileutils // import "github.com/ory/dockertest/docker/pkg/fileutils" 4 | 5 | import ( 6 | "fmt" 7 | "io/ioutil" 8 | "os" 9 | 10 | "github.com/sirupsen/logrus" 11 | ) 12 | 13 | // GetTotalUsedFds Returns the number of used File Descriptors by 14 | // reading it via /proc filesystem. 15 | func GetTotalUsedFds() int { 16 | if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil { 17 | logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err) 18 | } else { 19 | return len(fds) 20 | } 21 | return -1 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/fileutils/fileutils_windows.go: -------------------------------------------------------------------------------- 1 | package fileutils // import "github.com/ory/dockertest/docker/pkg/fileutils" 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. Not supported 4 | // on Windows. 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/homedir/homedir_linux.go: -------------------------------------------------------------------------------- 1 | package homedir // import "github.com/ory/dockertest/docker/pkg/homedir" 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/ory/dockertest/docker/pkg/idtools" 7 | ) 8 | 9 | // GetStatic returns the home directory for the current user without calling 10 | // os/user.Current(). This is useful for static-linked binary on glibc-based 11 | // system, because a call to os/user.Current() in a static binary leads to 12 | // segfault due to a glibc issue that won't be fixed in a short term. 13 | // (#29344, golang/go#13470, https://sourceware.org/bugzilla/show_bug.cgi?id=19341) 14 | func GetStatic() (string, error) { 15 | uid := os.Getuid() 16 | usr, err := idtools.LookupUID(uid) 17 | if err != nil { 18 | return "", err 19 | } 20 | return usr.Home, nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/homedir/homedir_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package homedir // import "github.com/ory/dockertest/docker/pkg/homedir" 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // GetStatic is not needed for non-linux systems. 10 | // (Precisely, it is needed only for glibc-based linux systems.) 11 | func GetStatic() (string, error) { 12 | return "", errors.New("homedir.GetStatic() is not supported on this system") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/homedir/homedir_windows.go: -------------------------------------------------------------------------------- 1 | package homedir // import "github.com/ory/dockertest/docker/pkg/homedir" 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | // Key returns the env var name for the user's home dir based on 8 | // the platform being run on 9 | func Key() string { 10 | return "USERPROFILE" 11 | } 12 | 13 | // Get returns the home directory of the current user with the help of 14 | // environment variables depending on the target operating system. 15 | // Returned path should be used with "path/filepath" to form new paths. 16 | func Get() string { 17 | return os.Getenv(Key()) 18 | } 19 | 20 | // GetShortcutString returns the string that is shortcut to user's home directory 21 | // in the native shell of the platform running on. 22 | func GetShortcutString() string { 23 | return "%USERPROFILE%" // be careful while using in format functions 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/idtools/idtools_windows.go: -------------------------------------------------------------------------------- 1 | package idtools // import "github.com/ory/dockertest/docker/pkg/idtools" 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/ory/dockertest/docker/pkg/system" 7 | ) 8 | 9 | // Platforms such as Windows do not support the UID/GID concept. So make this 10 | // just a wrapper around system.MkdirAll. 11 | func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error { 12 | if err := system.MkdirAll(path, mode, ""); err != nil { 13 | return err 14 | } 15 | return nil 16 | } 17 | 18 | // CanAccess takes a valid (existing) directory and a uid, gid pair and determines 19 | // if that uid, gid pair has access (execute bit) to the directory 20 | // Windows does not require/support this function, so always return true 21 | func CanAccess(path string, pair IDPair) bool { 22 | return true 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/idtools/usergroupadd_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package idtools // import "github.com/ory/dockertest/docker/pkg/idtools" 4 | 5 | import "fmt" 6 | 7 | // AddNamespaceRangesUser takes a name and finds an unused uid, gid pair 8 | // and calls the appropriate helper function to add the group and then 9 | // the user to the group in /etc/group and /etc/passwd respectively. 10 | func AddNamespaceRangesUser(name string) (int, int, error) { 11 | return -1, -1, fmt.Errorf("No support for adding users or groups on this OS") 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/idtools/utils_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package idtools // import "github.com/ory/dockertest/docker/pkg/idtools" 4 | 5 | import ( 6 | "fmt" 7 | "os/exec" 8 | "path/filepath" 9 | "strings" 10 | ) 11 | 12 | func resolveBinary(binname string) (string, error) { 13 | binaryPath, err := exec.LookPath(binname) 14 | if err != nil { 15 | return "", err 16 | } 17 | resolvedPath, err := filepath.EvalSymlinks(binaryPath) 18 | if err != nil { 19 | return "", err 20 | } 21 | //only return no error if the final resolved binary basename 22 | //matches what was searched for 23 | if filepath.Base(resolvedPath) == binname { 24 | return resolvedPath, nil 25 | } 26 | return "", fmt.Errorf("Binary %q does not resolve to a binary of that name in $PATH (%q)", binname, resolvedPath) 27 | } 28 | 29 | func execCmd(cmd, args string) ([]byte, error) { 30 | execCmd := exec.Command(cmd, strings.Split(args, " ")...) 31 | return execCmd.CombinedOutput() 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils // import "github.com/ory/dockertest/docker/pkg/ioutils" 4 | 5 | import "io/ioutil" 6 | 7 | // TempDir on Unix systems is equivalent to ioutil.TempDir. 8 | func TempDir(dir, prefix string) (string, error) { 9 | return ioutil.TempDir(dir, prefix) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/ioutils/temp_windows.go: -------------------------------------------------------------------------------- 1 | package ioutils // import "github.com/ory/dockertest/docker/pkg/ioutils" 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | "github.com/ory/dockertest/docker/pkg/longpath" 7 | ) 8 | 9 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 10 | func TempDir(dir, prefix string) (string, error) { 11 | tempDir, err := ioutil.TempDir(dir, prefix) 12 | if err != nil { 13 | return "", err 14 | } 15 | return longpath.AddPrefix(tempDir), nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/longpath/longpath.go: -------------------------------------------------------------------------------- 1 | // longpath introduces some constants and helper functions for handling long paths 2 | // in Windows, which are expected to be prepended with `\\?\` and followed by either 3 | // a drive letter, a UNC server\share, or a volume identifier. 4 | 5 | package longpath // import "github.com/ory/dockertest/docker/pkg/longpath" 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // Prefix is the longpath prefix for Windows file paths. 12 | const Prefix = `\\?\` 13 | 14 | // AddPrefix will add the Windows long path prefix to the path provided if 15 | // it does not already have it. 16 | func AddPrefix(path string) string { 17 | if !strings.HasPrefix(path, Prefix) { 18 | if strings.HasPrefix(path, `\\`) { 19 | // This is a UNC path, so we need to add 'UNC' to the path as well. 20 | path = Prefix + `UNC` + path[1:] 21 | } else { 22 | path = Prefix + path 23 | } 24 | } 25 | return path 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/ory/dockertest/docker/pkg/mount" 4 | 5 | // These flags are unsupported. 6 | const ( 7 | BIND = 0 8 | DIRSYNC = 0 9 | MANDLOCK = 0 10 | NOATIME = 0 11 | NODEV = 0 12 | NODIRATIME = 0 13 | NOEXEC = 0 14 | NOSUID = 0 15 | UNBINDABLE = 0 16 | RUNBINDABLE = 0 17 | PRIVATE = 0 18 | RPRIVATE = 0 19 | SHARED = 0 20 | RSHARED = 0 21 | SLAVE = 0 22 | RSLAVE = 0 23 | RBIND = 0 24 | RELATIME = 0 25 | RELATIVE = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | SYNCHRONOUS = 0 29 | RDONLY = 0 30 | mntDetach = 0 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/ory/dockertest/docker/pkg/mount" 4 | 5 | func mount(device, target, mType string, flag uintptr, data string) error { 6 | panic("Not implemented") 7 | } 8 | 9 | func unmount(target string, flag int) error { 10 | panic("Not implemented") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/ory/dockertest/docker/pkg/mount" 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | ) 9 | 10 | func parseMountTable() ([]*Info, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/mount/mountinfo_windows.go: -------------------------------------------------------------------------------- 1 | package mount // import "github.com/ory/dockertest/docker/pkg/mount" 2 | 3 | func parseMountTable() ([]*Info, error) { 4 | // Do NOT return an error! 5 | return nil, nil 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/chtimes.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "os" 5 | "time" 6 | ) 7 | 8 | // Chtimes changes the access time and modified time of a file at the given path 9 | func Chtimes(name string, atime time.Time, mtime time.Time) error { 10 | unixMinTime := time.Unix(0, 0) 11 | unixMaxTime := maxTime 12 | 13 | // If the modified time is prior to the Unix Epoch, or after the 14 | // end of Unix Time, os.Chtimes has undefined behavior 15 | // default to Unix Epoch in this case, just in case 16 | 17 | if atime.Before(unixMinTime) || atime.After(unixMaxTime) { 18 | atime = unixMinTime 19 | } 20 | 21 | if mtime.Before(unixMinTime) || mtime.After(unixMaxTime) { 22 | mtime = unixMinTime 23 | } 24 | 25 | if err := os.Chtimes(name, atime, mtime); err != nil { 26 | return err 27 | } 28 | 29 | // Take platform specific action for setting create time. 30 | return setCTime(name, mtime) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/chtimes_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import ( 6 | "time" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Unix, the create 10 | //time is updated as a side effect of setting the modified time, so 11 | //no action is required. 12 | func setCTime(path string, ctime time.Time) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/chtimes_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "time" 5 | 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Windows, this requires 10 | //calling SetFileTime and explicitly including the create time. 11 | func setCTime(path string, ctime time.Time) error { 12 | ctimespec := windows.NsecToTimespec(ctime.UnixNano()) 13 | pathp, e := windows.UTF16PtrFromString(path) 14 | if e != nil { 15 | return e 16 | } 17 | h, e := windows.CreateFile(pathp, 18 | windows.FILE_WRITE_ATTRIBUTES, windows.FILE_SHARE_WRITE, nil, 19 | windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0) 20 | if e != nil { 21 | return e 22 | } 23 | defer windows.Close(h) 24 | c := windows.NsecToFiletime(windows.TimespecToNsec(ctimespec)) 25 | return windows.SetFileTime(h, &c, nil, nil) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrNotSupportedPlatform means the platform is not supported. 9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 10 | 11 | // ErrNotSupportedOperatingSystem means the operating system is not supported. 12 | ErrNotSupportedOperatingSystem = errors.New("operating system is not supported") 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/exitcode.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "syscall" 7 | ) 8 | 9 | // GetExitCode returns the ExitStatus of the specified error if its type is 10 | // exec.ExitError, returns 0 and an error otherwise. 11 | func GetExitCode(err error) (int, error) { 12 | exitCode := 0 13 | if exiterr, ok := err.(*exec.ExitError); ok { 14 | if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok { 15 | return procExit.ExitStatus(), nil 16 | } 17 | } 18 | return exitCode, fmt.Errorf("failed to get exit code") 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/init.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | "unsafe" 7 | ) 8 | 9 | // Used by chtimes 10 | var maxTime time.Time 11 | 12 | func init() { 13 | // chtimes initialization 14 | if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 { 15 | // This is a 64 bit timespec 16 | // os.Chtimes limits time to the following 17 | maxTime = time.Unix(0, 1<<63-1) 18 | } else { 19 | // This is a 32 bit timespec 20 | maxTime = time.Unix(1<<31-1, 0) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/init_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | // InitLCOW does nothing since LCOW is a windows only feature 6 | func InitLCOW(experimental bool) { 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/init_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | // lcowSupported determines if Linux Containers on Windows are supported. 4 | var lcowSupported = false 5 | 6 | // InitLCOW sets whether LCOW is supported or not 7 | func InitLCOW(experimental bool) { 8 | v := GetOSVersion() 9 | if experimental && v.Build >= 16299 { 10 | lcowSupported = true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/lcow_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | // LCOWSupported returns true if Linux containers on Windows are supported. 6 | func LCOWSupported() bool { 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/lcow_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | // LCOWSupported returns true if Linux containers on Windows are supported. 4 | func LCOWSupported() bool { 5 | return lcowSupported 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/lstat_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Lstat takes a path to a file and returns 10 | // a system.StatT type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*StatT, error) { 14 | s := &syscall.Stat_t{} 15 | if err := syscall.Lstat(path, s); err != nil { 16 | return nil, err 17 | } 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "os" 4 | 5 | // Lstat calls os.Lstat to get a fileinfo interface back. 6 | // This is then copied into our own locally defined structure. 7 | func Lstat(path string) (*StatT, error) { 8 | fi, err := os.Lstat(path) 9 | if err != nil { 10 | return nil, err 11 | } 12 | 13 | return fromStatT(&fi) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | // MemInfo contains memory statistics of the host system. 4 | type MemInfo struct { 5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the 6 | // kernel binary code). 7 | MemTotal int64 8 | 9 | // Amount of free memory. 10 | MemFree int64 11 | 12 | // Total amount of swap space available. 13 | SwapTotal int64 14 | 15 | // Amount of swap space that is currently unused. 16 | SwapFree int64 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | // ReadMemInfo is not supported on platforms other than linux and windows. 6 | func ReadMemInfo() (*MemInfo, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/mknod.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // Mknod creates a filesystem node (file, device special file or named pipe) named path 10 | // with attributes specified by mode and dev. 11 | func Mknod(path string, mode uint32, dev int) error { 12 | return unix.Mknod(path, mode, dev) 13 | } 14 | 15 | // Mkdev is used to build the value of linux devices (in /dev/) which specifies major 16 | // and minor number of the newly created device special file. 17 | // Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. 18 | // They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, 19 | // then the top 12 bits of the minor. 20 | func Mkdev(major int64, minor int64) uint32 { 21 | return uint32(unix.Mkdev(uint32(major), uint32(minor))) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | // Mknod is not implemented on Windows. 4 | func Mknod(path string, mode uint32, dev int) error { 5 | return ErrNotSupportedPlatform 6 | } 7 | 8 | // Mkdev is not implemented on Windows. 9 | func Mkdev(major int64, minor int64) uint32 { 10 | panic("Mkdev not implemented on Windows.") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/process_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd darwin 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import ( 6 | "syscall" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsProcessAlive returns true if process with a given pid is running. 12 | func IsProcessAlive(pid int) bool { 13 | err := unix.Kill(pid, syscall.Signal(0)) 14 | if err == nil || err == unix.EPERM { 15 | return true 16 | } 17 | 18 | return false 19 | } 20 | 21 | // KillProcess force-stops a process. 22 | func KillProcess(pid int) { 23 | unix.Kill(pid, unix.SIGKILL) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/process_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "os" 4 | 5 | // IsProcessAlive returns true if process with a given pid is running. 6 | func IsProcessAlive(pid int) bool { 7 | _, err := os.FindProcess(pid) 8 | 9 | return err == nil 10 | } 11 | 12 | // KillProcess force-stops a process. 13 | func KillProcess(pid int) { 14 | p, err := os.FindProcess(pid) 15 | if err == nil { 16 | p.Kill() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/stat_darwin.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: s.Mode, 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: s.Rdev, 12 | mtim: s.Mtim}, nil 13 | } 14 | 15 | // FromStatT converts a syscall.Stat_t type to a system.Stat_t type 16 | // This is exposed on Linux as pkg/archive/changes uses it. 17 | func FromStatT(s *syscall.Stat_t) (*StatT, error) { 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/stat_openbsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/stat_solaris.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/syscall_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | // Unmount is a platform-specific helper function to call 8 | // the unmount syscall. 9 | func Unmount(dest string) error { 10 | return unix.Unmount(dest, 0) 11 | } 12 | 13 | // CommandLineToArgv should not be used on Unix. 14 | // It simply returns commandLine in the only element in the returned array. 15 | func CommandLineToArgv(commandLine string) ([]string, error) { 16 | return []string{commandLine}, nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // Umask sets current process's file mode creation mask to newmask 10 | // and returns oldmask. 11 | func Umask(newmask int) (oldmask int, err error) { 12 | return unix.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | // Umask is not supported on the windows platform. 4 | func Umask(newmask int) (oldmask int, err error) { 5 | // should not be called on cli code path 6 | return 0, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // LUtimesNano is used to change access and modification time of the specified path. 11 | // It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm. 12 | func LUtimesNano(path string, ts []syscall.Timespec) error { 13 | var _path *byte 14 | _path, err := unix.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := unix.Syscall(unix.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != unix.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/ory/dockertest/docker/pkg/system" 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // LUtimesNano is used to change access and modification time of the specified path. 11 | // It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm. 12 | func LUtimesNano(path string, ts []syscall.Timespec) error { 13 | atFdCwd := unix.AT_FDCWD 14 | 15 | var _path *byte 16 | _path, err := unix.BytePtrFromString(path) 17 | if err != nil { 18 | return err 19 | } 20 | if _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), unix.AT_SYMLINK_NOFOLLOW, 0, 0); err != 0 && err != unix.ENOSYS { 21 | return err 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | import "syscall" 6 | 7 | // LUtimesNano is only supported on linux and freebsd. 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | return ErrNotSupportedPlatform 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system // import "github.com/ory/dockertest/docker/pkg/system" 4 | 5 | // Lgetxattr is not supported on platforms other than linux. 6 | func Lgetxattr(path string, attr string) ([]byte, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | 10 | // Lsetxattr is not supported on platforms other than linux. 11 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/term/tc.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package term // import "github.com/ory/dockertest/docker/pkg/term" 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | 9 | "golang.org/x/sys/unix" 10 | ) 11 | 12 | func tcget(fd uintptr, p *Termios) syscall.Errno { 13 | _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 14 | return err 15 | } 16 | 17 | func tcset(fd uintptr, p *Termios) syscall.Errno { 18 | _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/pkg/term/winsize.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package term // import "github.com/ory/dockertest/docker/pkg/term" 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // GetWinsize returns the window size based on the specified file descriptor. 10 | func GetWinsize(fd uintptr) (*Winsize, error) { 11 | uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) 12 | ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} 13 | return ws, err 14 | } 15 | 16 | // SetWinsize tries to set the specified window size for the specified file descriptor. 17 | func SetWinsize(fd uintptr, ws *Winsize) error { 18 | uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} 19 | return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/auth.go: -------------------------------------------------------------------------------- 1 | package types // import "github.com/ory/dockertest/docker/types" 2 | 3 | // AuthConfig contains authorization information for connecting to a Registry 4 | type AuthConfig struct { 5 | Username string `json:"username,omitempty"` 6 | Password string `json:"password,omitempty"` 7 | Auth string `json:"auth,omitempty"` 8 | 9 | // Email is an optional value associated with the username. 10 | // This field is deprecated and will be removed in a later 11 | // version of docker. 12 | Email string `json:"email,omitempty"` 13 | 14 | ServerAddress string `json:"serveraddress,omitempty"` 15 | 16 | // IdentityToken is used to authenticate the user and get 17 | // an access token for the registry. 18 | IdentityToken string `json:"identitytoken,omitempty"` 19 | 20 | // RegistryToken is a bearer token to be sent to a registry 21 | RegistryToken string `json:"registrytoken,omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/blkiodev/blkio.go: -------------------------------------------------------------------------------- 1 | package blkiodev // import "github.com/ory/dockertest/docker/types/blkiodev" 2 | 3 | import "fmt" 4 | 5 | // WeightDevice is a structure that holds device:weight pair 6 | type WeightDevice struct { 7 | Path string 8 | Weight uint16 9 | } 10 | 11 | func (w *WeightDevice) String() string { 12 | return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 | } 14 | 15 | // ThrottleDevice is a structure that holds device:rate_per_second pair 16 | type ThrottleDevice struct { 17 | Path string 18 | Rate uint64 19 | } 20 | 21 | func (t *ThrottleDevice) String() string { 22 | return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/container/container_changes.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerChangeResponseItem change item in response to ContainerChanges operation 11 | // swagger:model ContainerChangeResponseItem 12 | type ContainerChangeResponseItem struct { 13 | 14 | // Kind of change 15 | // Required: true 16 | Kind uint8 `json:"Kind"` 17 | 18 | // Path to file that has changed 19 | // Required: true 20 | Path string `json:"Path"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/container/container_create.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerCreateCreatedBody OK response to ContainerCreate operation 11 | // swagger:model ContainerCreateCreatedBody 12 | type ContainerCreateCreatedBody struct { 13 | 14 | // The ID of the created container 15 | // Required: true 16 | ID string `json:"Id"` 17 | 18 | // Warnings encountered when creating the container 19 | // Required: true 20 | Warnings []string `json:"Warnings"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/container/container_top.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerTopOKBody OK response to ContainerTop operation 11 | // swagger:model ContainerTopOKBody 12 | type ContainerTopOKBody struct { 13 | 14 | // Each process running in the container, where each is process is an array of values corresponding to the titles 15 | // Required: true 16 | Processes [][]string `json:"Processes"` 17 | 18 | // The ps column titles 19 | // Required: true 20 | Titles []string `json:"Titles"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/container/container_update.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerUpdateOKBody OK response to ContainerUpdate operation 11 | // swagger:model ContainerUpdateOKBody 12 | type ContainerUpdateOKBody struct { 13 | 14 | // warnings 15 | // Required: true 16 | Warnings []string `json:"Warnings"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/container/container_wait.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerWaitOKBodyError container waiting error, if any 11 | // swagger:model ContainerWaitOKBodyError 12 | type ContainerWaitOKBodyError struct { 13 | 14 | // Details of an error 15 | Message string `json:"Message,omitempty"` 16 | } 17 | 18 | // ContainerWaitOKBody OK response to ContainerWait operation 19 | // swagger:model ContainerWaitOKBody 20 | type ContainerWaitOKBody struct { 21 | 22 | // error 23 | // Required: true 24 | Error *ContainerWaitOKBodyError `json:"Error"` 25 | 26 | // Exit code of the container 27 | // Required: true 28 | StatusCode int64 `json:"StatusCode"` 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/error_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ErrorResponse Represents an error. 7 | // swagger:model ErrorResponse 8 | type ErrorResponse struct { 9 | 10 | // The error message. 11 | // Required: true 12 | Message string `json:"message"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/graph_driver_data.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // GraphDriverData Information about a container's graph driver. 7 | // swagger:model GraphDriverData 8 | type GraphDriverData struct { 9 | 10 | // data 11 | // Required: true 12 | Data map[string]string `json:"Data"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/id_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // IDResponse Response to an API call that returns just an Id 7 | // swagger:model IdResponse 8 | type IDResponse struct { 9 | 10 | // The id of the newly created object. 11 | // Required: true 12 | ID string `json:"Id"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/image_delete_response_item.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ImageDeleteResponseItem image delete response item 7 | // swagger:model ImageDeleteResponseItem 8 | type ImageDeleteResponseItem struct { 9 | 10 | // The image ID of an image that was deleted 11 | Deleted string `json:"Deleted,omitempty"` 12 | 13 | // The image ID of an image that was untagged 14 | Untagged string `json:"Untagged,omitempty"` 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/plugin_device.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginDevice plugin device 7 | // swagger:model PluginDevice 8 | type PluginDevice struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // path 19 | // Required: true 20 | Path *string `json:"Path"` 21 | 22 | // settable 23 | // Required: true 24 | Settable []string `json:"Settable"` 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/plugin_env.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginEnv plugin env 7 | // swagger:model PluginEnv 8 | type PluginEnv struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // settable 19 | // Required: true 20 | Settable []string `json:"Settable"` 21 | 22 | // value 23 | // Required: true 24 | Value *string `json:"Value"` 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/plugin_interface_type.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginInterfaceType plugin interface type 7 | // swagger:model PluginInterfaceType 8 | type PluginInterfaceType struct { 9 | 10 | // capability 11 | // Required: true 12 | Capability string `json:"Capability"` 13 | 14 | // prefix 15 | // Required: true 16 | Prefix string `json:"Prefix"` 17 | 18 | // version 19 | // Required: true 20 | Version string `json:"Version"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/plugin_mount.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginMount plugin mount 7 | // swagger:model PluginMount 8 | type PluginMount struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // destination 15 | // Required: true 16 | Destination string `json:"Destination"` 17 | 18 | // name 19 | // Required: true 20 | Name string `json:"Name"` 21 | 22 | // options 23 | // Required: true 24 | Options []string `json:"Options"` 25 | 26 | // settable 27 | // Required: true 28 | Settable []string `json:"Settable"` 29 | 30 | // source 31 | // Required: true 32 | Source *string `json:"Source"` 33 | 34 | // type 35 | // Required: true 36 | Type string `json:"Type"` 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/port.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // Port An open port on a container 7 | // swagger:model Port 8 | type Port struct { 9 | 10 | // IP 11 | IP string `json:"IP,omitempty"` 12 | 13 | // Port on the container 14 | // Required: true 15 | PrivatePort uint16 `json:"PrivatePort"` 16 | 17 | // Port exposed on the host 18 | PublicPort uint16 `json:"PublicPort,omitempty"` 19 | 20 | // type 21 | // Required: true 22 | Type string `json:"Type"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/registry/authenticate.go: -------------------------------------------------------------------------------- 1 | package registry // import "github.com/ory/dockertest/docker/types/registry" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // AuthenticateOKBody authenticate o k body 11 | // swagger:model AuthenticateOKBody 12 | type AuthenticateOKBody struct { 13 | 14 | // An opaque token used to authenticate a user after a successful login 15 | // Required: true 16 | IdentityToken string `json:"IdentityToken"` 17 | 18 | // The status of the authentication 19 | // Required: true 20 | Status string `json:"Status"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/ory/dockertest/docker/types/service_update_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ServiceUpdateResponse service update response 7 | // swagger:model ServiceUpdateResponse 8 | type ServiceUpdateResponse struct { 9 | 10 | // Optional warning messages 11 | Warnings []string `json:"Warnings"` 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | go: [1.13.x, 1.14.x] 8 | os: [linux, osx] 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - ./travis/cross_build.sh 13 | - ./travis/lint.sh 14 | - export GOMAXPROCS=4 15 | - export GORACE=halt_on_error=1 16 | - go test -race -v ./... 17 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi 18 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v1.0.3 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/testify v1.2.2 8 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894 9 | ) 10 | 11 | go 1.13 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | 20 | func checkIfTerminal(w io.Writer) bool { 21 | var ret bool 22 | switch v := w.(type) { 23 | case *os.File: 24 | var mode uint32 25 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 26 | ret = (err == nil) 27 | default: 28 | ret = false 29 | } 30 | if ret { 31 | initTerminal(w) 32 | } 33 | return ret 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/weaveworks/tcptracer-bpf/pkg/tracer/byteorder.go: -------------------------------------------------------------------------------- 1 | package tracer 2 | 3 | import ( 4 | "encoding/binary" 5 | "unsafe" 6 | ) 7 | 8 | var nativeEndian binary.ByteOrder 9 | 10 | // In lack of binary.NativeEndian ... 11 | func init() { 12 | var i int32 = 0x01020304 13 | u := unsafe.Pointer(&i) 14 | pb := (*byte)(u) 15 | b := *pb 16 | if b == 0x04 { 17 | nativeEndian = binary.LittleEndian 18 | } else { 19 | nativeEndian = binary.BigEndian 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/weaveworks/tcptracer-bpf/pkg/tracer/offsetguess_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package tracer 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/iovisor/gobpf/elf" 9 | ) 10 | 11 | func guess(b *elf.Module) error { 12 | return fmt.Errorf("not supported on non-Linux systems") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/weaveworks/tcptracer-bpf/pkg/tracer/tracer_cb.go: -------------------------------------------------------------------------------- 1 | package tracer 2 | 3 | type Callback interface { 4 | TCPEventV4(TcpV4) 5 | TCPEventV6(TcpV6) 6 | LostV4(uint64) 7 | LostV6(uint64) 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/weaveworks/tcptracer-bpf/pkg/tracer/tracer_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package tracer 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | type Tracer struct{} 10 | 11 | func TracerAsset() ([]byte, error) { 12 | return nil, fmt.Errorf("not supported on non-Linux systems") 13 | } 14 | 15 | func NewTracer(cb Callback) (*Tracer, error) { 16 | return nil, fmt.Errorf("not supported on non-Linux systems") 17 | } 18 | func (t *Tracer) Start() { 19 | } 20 | func (t *Tracer) AddFdInstallWatcher(pid uint32) (err error) { 21 | return fmt.Errorf("not supported on non-Linux systems") 22 | } 23 | func (t *Tracer) RemoveFdInstallWatcher(pid uint32) (err error) { 24 | return fmt.Errorf("not supported on non-Linux systems") 25 | } 26 | func (t *Tracer) Stop() { 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for arm64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Constants that were deprecated or moved to enums in the FreeBSD headers. Keep 6 | // them here for backwards compatibility. 7 | 8 | package unix 9 | 10 | const ( 11 | DLT_HHDLC = 0x79 12 | IPV6_MIN_MEMBERSHIPS = 0x1f 13 | IP_MAX_SOURCE_FILTER = 0x400 14 | IP_MIN_MEMBERSHIPS = 0x1f 15 | RT_CACHING_CONTEXT = 0x1 16 | RT_NORTREF = 0x2 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,386 linux,arm linux,mips linux,mipsle 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gc,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,gc,linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build gc,!ppc64le,!ppc64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build gc 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go 386 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/empty.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.12 6 | 7 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 8 | // and earlier (see https://golang.org/issue/23311). 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.c: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build !go1.3 7 | 8 | // copied from pkg/runtime 9 | typedef unsigned int uint32; 10 | typedef unsigned long long int uint64; 11 | #ifdef _64BIT 12 | typedef uint64 uintptr; 13 | #else 14 | typedef uint32 uintptr; 15 | #endif 16 | 17 | // from sys_386.s or sys_amd64.s 18 | void ·servicemain(void); 19 | 20 | void 21 | ·getServiceMain(uintptr *r) 22 | { 23 | *r = (uintptr)·servicemain; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // AliasType is the type of an alias in AliasMap. 8 | type AliasType int8 9 | 10 | const ( 11 | Deprecated AliasType = iota 12 | Macro 13 | Legacy 14 | 15 | AliasTypeUnknown AliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/coverage.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // BaseLanguages returns the list of all supported base languages. It generates 8 | // the list by traversing the internal structures. 9 | func BaseLanguages() []Language { 10 | base := make([]Language, 0, NumLanguages) 11 | for i := 0; i < langNoIndexOffset; i++ { 12 | // We included "und" already for the value 0. 13 | if i != nonCanonicalUnd { 14 | base = append(base, Language(i)) 15 | } 16 | } 17 | i := langNoIndexOffset 18 | for _, v := range langNoIndex { 19 | for k := 0; k < 8; k++ { 20 | if v&1 == 1 { 21 | base = append(base, Language(i)) 22 | } 23 | v >>= 1 24 | i++ 25 | } 26 | } 27 | return base 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | func sortStable(s sort.Interface) { 12 | ss := stableSort{ 13 | s: s, 14 | pos: make([]int, s.Len()), 15 | } 16 | for i := range ss.pos { 17 | ss.pos[i] = i 18 | } 19 | sort.Sort(&ss) 20 | } 21 | 22 | type stableSort struct { 23 | s sort.Interface 24 | pos []int 25 | } 26 | 27 | func (s *stableSort) Len() int { 28 | return len(s.pos) 29 | } 30 | 31 | func (s *stableSort) Less(i, j int) bool { 32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 33 | } 34 | 35 | func (s *stableSort) Swap(i, j int) { 36 | s.s.Swap(i, j) 37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | var sortStable = sort.Stable 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package precis contains types and functions for the preparation, 6 | // enforcement, and comparison of internationalized strings ("PRECIS") as 7 | // defined in RFC 8264. It also contains several pre-defined profiles for 8 | // passwords, nicknames, and usernames as defined in RFC 8265 and RFC 8266. 9 | // 10 | // BE ADVISED: This package is under construction and the API may change in 11 | // backwards incompatible ways and without notice. 12 | package precis // import "golang.org/x/text/secure/precis" 13 | 14 | //go:generate go run gen.go gen_trieval.go 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/kind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Kind"; DO NOT EDIT. 2 | 3 | package width 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[Neutral-0] 12 | _ = x[EastAsianAmbiguous-1] 13 | _ = x[EastAsianWide-2] 14 | _ = x[EastAsianNarrow-3] 15 | _ = x[EastAsianFullwidth-4] 16 | _ = x[EastAsianHalfwidth-5] 17 | } 18 | 19 | const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth" 20 | 21 | var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89} 22 | 23 | func (i Kind) String() string { 24 | if i < 0 || i >= Kind(len(_Kind_index)-1) { 25 | return "Kind(" + strconv.FormatInt(int64(i), 10) + ")" 26 | } 27 | return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/README: -------------------------------------------------------------------------------- 1 | This repository holds the transition packages for the new Go 1.13 error values. 2 | See golang.org/design/29934-error-values. 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package xerrors implements functions to manipulate errors. 6 | // 7 | // This package is based on the Go 2 proposal for error values: 8 | // https://golang.org/design/29934-error-values 9 | // 10 | // These functions were incorporated into the standard library's errors package 11 | // in Go 1.13: 12 | // - Is 13 | // - As 14 | // - Unwrap 15 | // 16 | // Also, Errorf's %w verb was incorporated into fmt.Errorf. 17 | // 18 | // Use this package to get equivalent behavior in all supported Go versions. 19 | // 20 | // No other features of this package were included in Go 1.13, and at present 21 | // there are no plans to include any of them. 22 | package xerrors // import "golang.org/x/xerrors" 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package xerrors 6 | 7 | import "fmt" 8 | 9 | // errorString is a trivial implementation of error. 10 | type errorString struct { 11 | s string 12 | frame Frame 13 | } 14 | 15 | // New returns an error that formats as the given text. 16 | // 17 | // The returned error contains a Frame set to the caller's location and 18 | // implements Formatter to show this information when printed with details. 19 | func New(text string) error { 20 | return &errorString{text, Caller(1)} 21 | } 22 | 23 | func (e *errorString) Error() string { 24 | return e.s 25 | } 26 | 27 | func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } 28 | 29 | func (e *errorString) FormatError(p Printer) (next error) { 30 | p.Print(e.s) 31 | e.frame.Format(p) 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/xerrors 2 | 3 | go 1.11 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/internal/internal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | // EnableTrace indicates whether stack information should be recorded in errors. 8 | var EnableTrace = true 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/inconshreveable/log15.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/inconshreveable/log15 3 | sudo: false 4 | 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - 1.12.x 10 | - 1.13.x 11 | - master 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/inconshreveable/log15.v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 Alan Shreve 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/inconshreveable/log15.v2/handler_go13.go: -------------------------------------------------------------------------------- 1 | // +build !go1.4 2 | 3 | package log15 4 | 5 | import ( 6 | "sync/atomic" 7 | "unsafe" 8 | ) 9 | 10 | // swapHandler wraps another handler that may be swapped out 11 | // dynamically at runtime in a thread-safe fashion. 12 | type swapHandler struct { 13 | handler unsafe.Pointer 14 | } 15 | 16 | func (h *swapHandler) Log(r *Record) error { 17 | return h.Get().Log(r) 18 | } 19 | 20 | func (h *swapHandler) Get() Handler { 21 | return *(*Handler)(atomic.LoadPointer(&h.handler)) 22 | } 23 | 24 | func (h *swapHandler) Swap(newHandler Handler) { 25 | atomic.StorePointer(&h.handler, unsafe.Pointer(&newHandler)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gopkg.in/inconshreveable/log15.v2/handler_go14.go: -------------------------------------------------------------------------------- 1 | // +build go1.4 2 | 3 | package log15 4 | 5 | import "sync/atomic" 6 | 7 | // swapHandler wraps another handler that may be swapped out 8 | // dynamically at runtime in a thread-safe fashion. 9 | type swapHandler struct { 10 | handler atomic.Value 11 | } 12 | 13 | func (h *swapHandler) Log(r *Record) error { 14 | return (*h.handler.Load().(*Handler)).Log(r) 15 | } 16 | 17 | func (h *swapHandler) Swap(newHandler Handler) { 18 | h.handler.Store(&newHandler) 19 | } 20 | 21 | func (h *swapHandler) Get() Handler { 22 | return *h.handler.Load().(*Handler) 23 | } 24 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | // name is application name. 9 | const name = "shawk" 10 | 11 | // version is application version. 12 | const version = "0.7.1" 13 | 14 | // commit describes latest git commit hash. 15 | // This is automatically extracted by git describe --always. 16 | var commit string 17 | 18 | // date describes build date. 19 | var date string 20 | 21 | // PrintVersion prints version. 22 | func PrintVersion(w io.Writer) { 23 | fmt.Fprintf(w, "%s version %s, build %s, date %s \n", name, version, commit, date) 24 | } 25 | 26 | // GetVersion returns version. 27 | func GetVersion() string { 28 | return version 29 | } 30 | --------------------------------------------------------------------------------