├── .dockerignore ├── .gitignore ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── Makefile ├── README.md ├── debian ├── compat ├── control ├── copyright ├── gbp.conf ├── local │ ├── disablescreenblank.sh │ ├── insserv.conf.d │ │ └── octoprint-tft │ └── octoprint-tft-environment ├── octoprint-tft.config ├── octoprint-tft.install ├── octoprint-tft.postinst ├── octoprint-tft.service ├── octoprint-tft.templates ├── rules ├── source │ └── format └── watch ├── main.go ├── styles └── default │ ├── images │ ├── back.svg │ ├── bed.svg │ ├── bed_off.svg │ ├── calibrate.svg │ ├── control.svg │ ├── cool-down.svg │ ├── decrease.svg │ ├── delete.svg │ ├── extrude.svg │ ├── extruder.svg │ ├── fan-off.svg │ ├── fan-on.svg │ ├── filament.svg │ ├── filament_clean.svg │ ├── file.svg │ ├── files.svg │ ├── finish.svg │ ├── heat-up.svg │ ├── home-x.svg │ ├── home-y.svg │ ├── home-z.svg │ ├── home.svg │ ├── increase.svg │ ├── load.svg │ ├── motor-off.svg │ ├── move-step.svg │ ├── move-x+.svg │ ├── move-x-.svg │ ├── move-y+.svg │ ├── move-y-.svg │ ├── move-z+.svg │ ├── move-z-.svg │ ├── move.svg │ ├── octoprint-logo.png │ ├── pause.svg │ ├── print.svg │ ├── reboot.svg │ ├── refresh.svg │ ├── resume.svg │ ├── retract.svg │ ├── sd.svg │ ├── sd_eject.svg │ ├── settings.svg │ ├── shutdown.svg │ ├── speed-step.svg │ ├── status.svg │ └── stop.svg │ └── style.css ├── ui ├── common.go ├── control.go ├── default.go ├── filament.go ├── files.go ├── gtk.go ├── home.go ├── logger.go ├── move.go ├── notifications.go ├── splash.go ├── status.go ├── system.go ├── temperature.go └── ui.go └── vendor ├── github.com ├── StackExchange │ └── wmi │ │ ├── LICENSE │ │ ├── README.md │ │ ├── swbemservices.go │ │ ├── swbemservices_test.go │ │ ├── wmi.go │ │ └── wmi_test.go ├── dustin │ └── go-humanize │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── big.go │ │ ├── bigbytes.go │ │ ├── bigbytes_test.go │ │ ├── bytes.go │ │ ├── bytes_test.go │ │ ├── comma.go │ │ ├── comma_test.go │ │ ├── commaf.go │ │ ├── commaf_test.go │ │ ├── common_test.go │ │ ├── english │ │ ├── words.go │ │ └── words_test.go │ │ ├── ftoa.go │ │ ├── ftoa_test.go │ │ ├── humanize.go │ │ ├── number.go │ │ ├── number_test.go │ │ ├── ordinals.go │ │ ├── ordinals_test.go │ │ ├── si.go │ │ ├── si_test.go │ │ ├── times.go │ │ └── times_test.go ├── go-ole │ └── go-ole │ │ ├── .travis.yml │ │ ├── ChangeLog.md │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── com.go │ │ ├── com_func.go │ │ ├── com_func_test.go │ │ ├── com_test.go │ │ ├── connect.go │ │ ├── connect_test.go │ │ ├── connect_windows_test.go │ │ ├── constants.go │ │ ├── data │ │ └── screenshot.png │ │ ├── error.go │ │ ├── error_func.go │ │ ├── error_windows.go │ │ ├── example │ │ ├── excel │ │ │ └── excel.go │ │ ├── excel2 │ │ │ └── excel.go │ │ ├── ie │ │ │ └── ie.go │ │ ├── itunes │ │ │ └── itunes.go │ │ ├── mediaplayer │ │ │ └── mediaplayer.go │ │ ├── msagent │ │ │ └── msagent.go │ │ ├── msxml │ │ │ └── rssreader.go │ │ ├── outlook │ │ │ └── outlook.go │ │ └── winsock │ │ │ └── winsock.go │ │ ├── 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 │ │ ├── idispatch_windows_test.go │ │ ├── ienumvariant.go │ │ ├── ienumvariant_func.go │ │ ├── ienumvariant_test.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 │ │ ├── iunknown_windows_test.go │ │ ├── ole.go │ │ ├── oleutil │ │ ├── connection.go │ │ ├── connection_func.go │ │ ├── connection_windows.go │ │ ├── go-get.go │ │ └── oleutil.go │ │ ├── safearray.go │ │ ├── safearray_func.go │ │ ├── safearray_test.go │ │ ├── safearray_windows.go │ │ ├── safearrayconversion.go │ │ ├── safearrayconversion_test.go │ │ ├── safearrayslices.go │ │ ├── utility.go │ │ ├── variables.go │ │ ├── variant.go │ │ ├── variant_386.go │ │ ├── variant_amd64.go │ │ ├── vt_string.go │ │ ├── winrt.go │ │ └── winrt_doc.go ├── gotk3 │ └── gotk3 │ │ ├── .travis.yml │ │ ├── CHANGES │ │ ├── CONTRIBUTIONS.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cairo │ │ ├── antialias.go │ │ ├── cairo.go │ │ ├── canvas.go │ │ ├── errors.go │ │ ├── fillrule.go │ │ ├── format.go │ │ ├── linecap.go │ │ ├── linejoin.go │ │ ├── mimetype.go │ │ ├── operator.go │ │ ├── pattern.go │ │ ├── status.go │ │ ├── surface.go │ │ ├── surfacetype.go │ │ ├── text.go │ │ ├── translations.go │ │ └── util.go │ │ ├── gdk │ │ ├── gdk.go │ │ ├── gdk.go.h │ │ ├── gdk_3_6-8.go │ │ ├── gdk_deprecated_since_3_16.go │ │ ├── gdk_deprecated_since_3_20.go │ │ ├── gdk_deprecated_since_3_22.go │ │ ├── gdk_pixbuf_format.go │ │ ├── keys.go │ │ ├── screen.go │ │ ├── screen_no_x11.go │ │ ├── screen_x11.go │ │ ├── window_no_x11.go │ │ └── window_x11.go │ │ ├── glib │ │ ├── application.go │ │ ├── connect.go │ │ ├── gbinding.go │ │ ├── glib.go │ │ ├── glib.go.h │ │ ├── glib_extension.go │ │ ├── glib_test.go │ │ ├── gmain_context.go │ │ ├── gsource.go │ │ ├── gvariant.go │ │ ├── gvariant.go.h │ │ ├── gvariant_test.go │ │ ├── gvariantbuilder.go │ │ ├── gvariantclass.go │ │ ├── gvariantdict.go │ │ ├── gvariantiter.go │ │ ├── gvarianttype.go │ │ ├── gvarianttype.go.h │ │ ├── list.go │ │ ├── list_test.go │ │ ├── menu.go │ │ ├── notifications.go │ │ ├── settings.go │ │ ├── settings_backend.go │ │ ├── settings_schema.go │ │ ├── settings_schema_source.go │ │ └── slist.go │ │ ├── gtk │ │ ├── aboutdialog.go │ │ ├── accel.go │ │ ├── accel_test.go │ │ ├── actionbar_since_3_12.go │ │ ├── actionbar_since_3_12.go.h │ │ ├── app_chooser.go │ │ ├── application.go │ │ ├── application_since_3_12.go │ │ ├── application_since_3_14.go │ │ ├── application_window.go │ │ ├── color_chooser.go │ │ ├── combo_box.go │ │ ├── gtk.go │ │ ├── gtk.go.h │ │ ├── gtk_deprecated_since_3_10.go │ │ ├── gtk_deprecated_since_3_12.go │ │ ├── gtk_deprecated_since_3_14.go │ │ ├── gtk_deprecated_since_3_14.go.h │ │ ├── gtk_deprecated_since_3_16.go │ │ ├── gtk_deprecated_since_3_20.go │ │ ├── gtk_deprecated_since_3_22.go │ │ ├── gtk_export.go │ │ ├── gtk_since_3_10.go │ │ ├── gtk_since_3_10.go.h │ │ ├── gtk_since_3_12.go │ │ ├── gtk_since_3_12.go.h │ │ ├── gtk_since_3_16.go │ │ ├── gtk_since_3_16.go.h │ │ ├── gtk_since_3_18.go │ │ ├── gtk_since_3_8.go │ │ ├── gtk_test.go │ │ ├── info_bar.go │ │ ├── label.go │ │ ├── level_bar.go │ │ ├── level_bar_since_3_8.go │ │ ├── menu_before_3_22.go │ │ ├── menu_shell.go │ │ ├── menu_since_3_22.go │ │ ├── popover_since_3_12.go │ │ ├── popover_since_3_12.go.h │ │ ├── popover_since_3_18.go │ │ ├── print.go │ │ ├── print_since_3_16.go │ │ ├── print_test.go │ │ ├── settings.go │ │ ├── settings.go.h │ │ ├── stack_since_3_12.go │ │ ├── stackswitcher_since_3_10.go │ │ ├── style.go │ │ ├── text_iter.go │ │ ├── text_mark.go │ │ ├── text_view.go │ │ ├── tree_view.go │ │ ├── tree_view_column.go │ │ ├── version.go │ │ ├── version_test.go │ │ ├── widget.go │ │ ├── widget_since_3_12.go │ │ ├── widget_since_3_14.go │ │ ├── widget_since_3_8.go │ │ ├── window.go │ │ ├── window_since_3_10.go │ │ └── window_since_3_12.go │ │ ├── pango │ │ ├── pango-attributes.go │ │ ├── pango-attributes.go.h │ │ ├── pango-context.go │ │ ├── pango-font.go │ │ ├── pango-glyph-item.go │ │ ├── pango-glyph.go │ │ ├── pango-gravity.go │ │ ├── pango-layout.go │ │ ├── pango-layout.go.h │ │ ├── pango-types.go │ │ ├── pango.go │ │ ├── pango.go.h │ │ ├── pangocairo.go │ │ └── pangocairo.go.h │ │ └── shippable.yml ├── mcuadros │ └── go-octoprint │ │ ├── .travis.yml │ │ ├── .travis │ │ └── config.yaml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── _examples │ │ └── state │ │ │ └── main.go │ │ ├── client.go │ │ ├── common.go │ │ ├── common_test.go │ │ ├── connection.go │ │ ├── files.go │ │ ├── files_test.go │ │ ├── job.go │ │ ├── printer.go │ │ ├── printer_test.go │ │ ├── settings.go │ │ ├── settings_test.go │ │ ├── system.go │ │ ├── system_test.go │ │ └── version.go ├── shirou │ └── gopsutil │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.rst │ │ ├── circle.yml │ │ ├── coverall.sh │ │ ├── cpu │ │ ├── cpu.go │ │ ├── cpu_darwin.go │ │ ├── cpu_darwin_cgo.go │ │ ├── cpu_darwin_nocgo.go │ │ ├── cpu_fallback.go │ │ ├── cpu_freebsd.go │ │ ├── cpu_freebsd_386.go │ │ ├── cpu_freebsd_amd64.go │ │ ├── cpu_freebsd_test.go │ │ ├── cpu_linux.go │ │ ├── cpu_linux_test.go │ │ ├── cpu_openbsd.go │ │ ├── cpu_solaris.go │ │ ├── cpu_solaris_test.go │ │ ├── cpu_test.go │ │ ├── cpu_windows.go │ │ └── testdata │ │ │ ├── freebsd │ │ │ ├── 1cpu_2core.txt │ │ │ ├── 1cpu_4core.txt │ │ │ └── 2cpu_4core.txt │ │ │ ├── linux │ │ │ ├── 424 │ │ │ │ └── proc │ │ │ │ │ └── stat │ │ │ └── times_empty │ │ │ │ └── proc │ │ │ │ └── stat │ │ │ └── solaris │ │ │ ├── 1cpu_1core_isainfo.txt │ │ │ ├── 1cpu_1core_psrinfo.txt │ │ │ ├── 2cpu_1core_isainfo.txt │ │ │ ├── 2cpu_1core_psrinfo.txt │ │ │ ├── 2cpu_8core_isainfo.txt │ │ │ └── 2cpu_8core_psrinfo.txt │ │ ├── disk │ │ ├── disk.go │ │ ├── disk_darwin.go │ │ ├── disk_darwin.h │ │ ├── disk_darwin_amd64.go │ │ ├── disk_darwin_arm64.go │ │ ├── disk_darwin_cgo.go │ │ ├── disk_darwin_nocgo.go │ │ ├── disk_fallback.go │ │ ├── disk_freebsd.go │ │ ├── disk_freebsd_386.go │ │ ├── disk_freebsd_amd64.go │ │ ├── disk_linux.go │ │ ├── disk_openbsd.go │ │ ├── disk_openbsd_amd64.go │ │ ├── disk_test.go │ │ ├── disk_unix.go │ │ ├── disk_windows.go │ │ ├── types_freebsd.go │ │ └── types_openbsd.go │ │ ├── doc.go │ │ ├── docker │ │ ├── docker.go │ │ ├── docker_linux.go │ │ ├── docker_linux_test.go │ │ └── docker_notlinux.go │ │ ├── host │ │ ├── host.go │ │ ├── host_darwin.go │ │ ├── host_darwin_386.go │ │ ├── host_darwin_amd64.go │ │ ├── host_darwin_cgo.go │ │ ├── host_darwin_nocgo.go │ │ ├── host_fallback.go │ │ ├── host_freebsd.go │ │ ├── host_freebsd_386.go │ │ ├── host_freebsd_amd64.go │ │ ├── host_freebsd_arm.go │ │ ├── host_linux.go │ │ ├── host_linux_386.go │ │ ├── host_linux_amd64.go │ │ ├── host_linux_arm.go │ │ ├── host_linux_arm64.go │ │ ├── host_linux_mips.go │ │ ├── host_linux_mipsle.go │ │ ├── host_linux_ppc64le.go │ │ ├── host_linux_s390x.go │ │ ├── host_linux_test.go │ │ ├── host_openbsd.go │ │ ├── host_openbsd_amd64.go │ │ ├── host_solaris.go │ │ ├── host_test.go │ │ ├── host_windows.go │ │ ├── include │ │ │ ├── smc.c │ │ │ └── smc.h │ │ ├── types_darwin.go │ │ ├── types_freebsd.go │ │ ├── types_linux.go │ │ └── types_openbsd.go │ │ ├── internal │ │ └── common │ │ │ ├── binary.go │ │ │ ├── common.go │ │ │ ├── common_darwin.go │ │ │ ├── common_freebsd.go │ │ │ ├── common_linux.go │ │ │ ├── common_openbsd.go │ │ │ ├── common_test.go │ │ │ ├── common_unix.go │ │ │ └── common_windows.go │ │ ├── load │ │ ├── load.go │ │ ├── load_bsd.go │ │ ├── load_darwin.go │ │ ├── load_fallback.go │ │ ├── load_linux.go │ │ ├── load_test.go │ │ └── load_windows.go │ │ ├── mem │ │ ├── mem.go │ │ ├── mem_darwin.go │ │ ├── mem_darwin_cgo.go │ │ ├── mem_darwin_nocgo.go │ │ ├── mem_darwin_test.go │ │ ├── mem_fallback.go │ │ ├── mem_freebsd.go │ │ ├── mem_linux.go │ │ ├── mem_openbsd.go │ │ ├── mem_openbsd_amd64.go │ │ ├── mem_solaris.go │ │ ├── mem_test.go │ │ ├── mem_windows.go │ │ └── types_openbsd.go │ │ ├── mktypes.sh │ │ ├── net │ │ ├── net.go │ │ ├── net_darwin.go │ │ ├── net_darwin_test.go │ │ ├── net_fallback.go │ │ ├── net_freebsd.go │ │ ├── net_linux.go │ │ ├── net_linux_test.go │ │ ├── net_openbsd.go │ │ ├── net_test.go │ │ ├── net_unix.go │ │ └── net_windows.go │ │ ├── process │ │ ├── process.go │ │ ├── process_darwin.go │ │ ├── process_darwin_386.go │ │ ├── process_darwin_amd64.go │ │ ├── process_fallback.go │ │ ├── process_freebsd.go │ │ ├── process_freebsd_386.go │ │ ├── process_freebsd_amd64.go │ │ ├── process_freebsd_arm.go │ │ ├── process_linux.go │ │ ├── process_openbsd.go │ │ ├── process_openbsd_amd64.go │ │ ├── process_posix.go │ │ ├── process_posix_test.go │ │ ├── process_test.go │ │ ├── process_windows.go │ │ ├── process_windows_386.go │ │ ├── process_windows_amd64.go │ │ ├── testdata │ │ │ └── darwin │ │ │ │ └── ps-ax-opid_fail │ │ ├── types_darwin.go │ │ ├── types_freebsd.go │ │ └── types_openbsd.go │ │ ├── v2migration.sh │ │ └── windows_memo.rst └── sirupsen │ └── logrus │ ├── .gitignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── alt_exit.go │ ├── alt_exit_test.go │ ├── appveyor.yml │ ├── doc.go │ ├── entry.go │ ├── entry_test.go │ ├── example_basic_test.go │ ├── example_hook_test.go │ ├── exported.go │ ├── formatter.go │ ├── formatter_bench_test.go │ ├── hook_test.go │ ├── hooks.go │ ├── hooks │ ├── syslog │ │ ├── README.md │ │ ├── syslog.go │ │ └── syslog_test.go │ └── test │ │ ├── test.go │ │ └── test_test.go │ ├── json_formatter.go │ ├── json_formatter_test.go │ ├── logger.go │ ├── logger_bench_test.go │ ├── logrus.go │ ├── logrus_test.go │ ├── terminal_bsd.go │ ├── terminal_check_appengine.go │ ├── terminal_check_notappengine.go │ ├── terminal_linux.go │ ├── text_formatter.go │ ├── text_formatter_test.go │ └── writer.go ├── golang.org └── x │ ├── crypto │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── acme │ │ ├── acme.go │ │ ├── acme_test.go │ │ ├── autocert │ │ │ ├── autocert.go │ │ │ ├── autocert_test.go │ │ │ ├── cache.go │ │ │ ├── cache_test.go │ │ │ ├── example_test.go │ │ │ ├── listener.go │ │ │ ├── renewal.go │ │ │ └── renewal_test.go │ │ ├── jws.go │ │ ├── jws_test.go │ │ ├── types.go │ │ └── types_test.go │ ├── argon2 │ │ ├── argon2.go │ │ ├── argon2_test.go │ │ ├── blake2b.go │ │ ├── blamka_amd64.go │ │ ├── blamka_amd64.s │ │ ├── blamka_generic.go │ │ └── blamka_ref.go │ ├── bcrypt │ │ ├── base64.go │ │ ├── bcrypt.go │ │ └── bcrypt_test.go │ ├── blake2b │ │ ├── blake2b.go │ │ ├── blake2bAVX2_amd64.go │ │ ├── blake2bAVX2_amd64.s │ │ ├── blake2b_amd64.go │ │ ├── blake2b_amd64.s │ │ ├── blake2b_generic.go │ │ ├── blake2b_ref.go │ │ ├── blake2b_test.go │ │ ├── blake2x.go │ │ └── register.go │ ├── blake2s │ │ ├── blake2s.go │ │ ├── blake2s_386.go │ │ ├── blake2s_386.s │ │ ├── blake2s_amd64.go │ │ ├── blake2s_amd64.s │ │ ├── blake2s_generic.go │ │ ├── blake2s_ref.go │ │ ├── blake2s_test.go │ │ ├── blake2x.go │ │ └── register.go │ ├── blowfish │ │ ├── block.go │ │ ├── blowfish_test.go │ │ ├── cipher.go │ │ └── const.go │ ├── bn256 │ │ ├── bn256.go │ │ ├── bn256_test.go │ │ ├── constants.go │ │ ├── curve.go │ │ ├── example_test.go │ │ ├── gfp12.go │ │ ├── gfp2.go │ │ ├── gfp6.go │ │ ├── optate.go │ │ └── twist.go │ ├── cast5 │ │ ├── cast5.go │ │ └── cast5_test.go │ ├── chacha20poly1305 │ │ ├── chacha20poly1305.go │ │ ├── chacha20poly1305_amd64.go │ │ ├── chacha20poly1305_amd64.s │ │ ├── chacha20poly1305_generic.go │ │ ├── chacha20poly1305_noasm.go │ │ ├── chacha20poly1305_test.go │ │ ├── chacha20poly1305_vectors_test.go │ │ └── internal │ │ │ └── chacha20 │ │ │ ├── chacha_generic.go │ │ │ └── chacha_test.go │ ├── codereview.cfg │ ├── cryptobyte │ │ ├── asn1.go │ │ ├── asn1 │ │ │ └── asn1.go │ │ ├── asn1_test.go │ │ ├── builder.go │ │ ├── cryptobyte_test.go │ │ ├── example_test.go │ │ └── string.go │ ├── curve25519 │ │ ├── const_amd64.h │ │ ├── const_amd64.s │ │ ├── cswap_amd64.s │ │ ├── curve25519.go │ │ ├── curve25519_test.go │ │ ├── doc.go │ │ ├── freeze_amd64.s │ │ ├── ladderstep_amd64.s │ │ ├── mont25519_amd64.go │ │ ├── mul_amd64.s │ │ └── square_amd64.s │ ├── ed25519 │ │ ├── ed25519.go │ │ ├── ed25519_test.go │ │ ├── internal │ │ │ └── edwards25519 │ │ │ │ ├── const.go │ │ │ │ └── edwards25519.go │ │ └── testdata │ │ │ └── sign.input.gz │ ├── hkdf │ │ ├── example_test.go │ │ ├── hkdf.go │ │ └── hkdf_test.go │ ├── md4 │ │ ├── example_test.go │ │ ├── md4.go │ │ ├── md4_test.go │ │ └── md4block.go │ ├── nacl │ │ ├── auth │ │ │ ├── auth.go │ │ │ ├── auth_test.go │ │ │ └── example_test.go │ │ ├── box │ │ │ ├── box.go │ │ │ ├── box_test.go │ │ │ └── example_test.go │ │ └── secretbox │ │ │ ├── example_test.go │ │ │ ├── secretbox.go │ │ │ └── secretbox_test.go │ ├── ocsp │ │ ├── ocsp.go │ │ └── ocsp_test.go │ ├── openpgp │ │ ├── armor │ │ │ ├── armor.go │ │ │ ├── armor_test.go │ │ │ └── encode.go │ │ ├── canonical_text.go │ │ ├── canonical_text_test.go │ │ ├── clearsign │ │ │ ├── clearsign.go │ │ │ └── clearsign_test.go │ │ ├── elgamal │ │ │ ├── elgamal.go │ │ │ └── elgamal_test.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── keys.go │ │ ├── keys_test.go │ │ ├── packet │ │ │ ├── compressed.go │ │ │ ├── compressed_test.go │ │ │ ├── config.go │ │ │ ├── encrypted_key.go │ │ │ ├── encrypted_key_test.go │ │ │ ├── literal.go │ │ │ ├── ocfb.go │ │ │ ├── ocfb_test.go │ │ │ ├── one_pass_signature.go │ │ │ ├── opaque.go │ │ │ ├── opaque_test.go │ │ │ ├── packet.go │ │ │ ├── packet_test.go │ │ │ ├── private_key.go │ │ │ ├── private_key_test.go │ │ │ ├── public_key.go │ │ │ ├── public_key_test.go │ │ │ ├── public_key_v3.go │ │ │ ├── public_key_v3_test.go │ │ │ ├── reader.go │ │ │ ├── signature.go │ │ │ ├── signature_test.go │ │ │ ├── signature_v3.go │ │ │ ├── signature_v3_test.go │ │ │ ├── symmetric_key_encrypted.go │ │ │ ├── symmetric_key_encrypted_test.go │ │ │ ├── symmetrically_encrypted.go │ │ │ ├── symmetrically_encrypted_test.go │ │ │ ├── userattribute.go │ │ │ ├── userattribute_test.go │ │ │ ├── userid.go │ │ │ └── userid_test.go │ │ ├── read.go │ │ ├── read_test.go │ │ ├── s2k │ │ │ ├── s2k.go │ │ │ └── s2k_test.go │ │ ├── write.go │ │ └── write_test.go │ ├── otr │ │ ├── libotr_test_helper.c │ │ ├── otr.go │ │ ├── otr_test.go │ │ └── smp.go │ ├── pbkdf2 │ │ ├── pbkdf2.go │ │ └── pbkdf2_test.go │ ├── pkcs12 │ │ ├── bmp-string.go │ │ ├── bmp-string_test.go │ │ ├── crypto.go │ │ ├── crypto_test.go │ │ ├── errors.go │ │ ├── internal │ │ │ └── rc2 │ │ │ │ ├── bench_test.go │ │ │ │ ├── rc2.go │ │ │ │ └── rc2_test.go │ │ ├── mac.go │ │ ├── mac_test.go │ │ ├── pbkdf.go │ │ ├── pbkdf_test.go │ │ ├── pkcs12.go │ │ ├── pkcs12_test.go │ │ └── safebags.go │ ├── poly1305 │ │ ├── poly1305.go │ │ ├── poly1305_test.go │ │ ├── sum_amd64.go │ │ ├── sum_amd64.s │ │ ├── sum_arm.go │ │ ├── sum_arm.s │ │ └── sum_ref.go │ ├── ripemd160 │ │ ├── ripemd160.go │ │ ├── ripemd160_test.go │ │ └── ripemd160block.go │ ├── salsa20 │ │ ├── salsa │ │ │ ├── hsalsa20.go │ │ │ ├── salsa2020_amd64.s │ │ │ ├── salsa208.go │ │ │ ├── salsa20_amd64.go │ │ │ ├── salsa20_ref.go │ │ │ └── salsa_test.go │ │ ├── salsa20.go │ │ └── salsa20_test.go │ ├── scrypt │ │ ├── example_test.go │ │ ├── scrypt.go │ │ └── scrypt_test.go │ ├── sha3 │ │ ├── doc.go │ │ ├── hashes.go │ │ ├── keccakf.go │ │ ├── keccakf_amd64.go │ │ ├── keccakf_amd64.s │ │ ├── register.go │ │ ├── sha3.go │ │ ├── sha3_test.go │ │ ├── shake.go │ │ ├── testdata │ │ │ └── keccakKats.json.deflate │ │ ├── xor.go │ │ ├── xor_generic.go │ │ └── xor_unaligned.go │ ├── ssh │ │ ├── agent │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── example_test.go │ │ │ ├── forward.go │ │ │ ├── keyring.go │ │ │ ├── keyring_test.go │ │ │ ├── server.go │ │ │ ├── server_test.go │ │ │ └── testdata_test.go │ │ ├── benchmark_test.go │ │ ├── buffer.go │ │ ├── buffer_test.go │ │ ├── certs.go │ │ ├── certs_test.go │ │ ├── channel.go │ │ ├── cipher.go │ │ ├── cipher_test.go │ │ ├── client.go │ │ ├── client_auth.go │ │ ├── client_auth_test.go │ │ ├── client_test.go │ │ ├── common.go │ │ ├── connection.go │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── handshake.go │ │ ├── handshake_test.go │ │ ├── kex.go │ │ ├── kex_test.go │ │ ├── keys.go │ │ ├── keys_test.go │ │ ├── knownhosts │ │ │ ├── knownhosts.go │ │ │ └── knownhosts_test.go │ │ ├── mac.go │ │ ├── mempipe_test.go │ │ ├── messages.go │ │ ├── messages_test.go │ │ ├── mux.go │ │ ├── mux_test.go │ │ ├── server.go │ │ ├── session.go │ │ ├── session_test.go │ │ ├── streamlocal.go │ │ ├── tcpip.go │ │ ├── tcpip_test.go │ │ ├── terminal │ │ │ ├── terminal.go │ │ │ ├── terminal_test.go │ │ │ ├── util.go │ │ │ ├── util_bsd.go │ │ │ ├── util_linux.go │ │ │ ├── util_plan9.go │ │ │ ├── util_solaris.go │ │ │ └── util_windows.go │ │ ├── test │ │ │ ├── agent_unix_test.go │ │ │ ├── banner_test.go │ │ │ ├── cert_test.go │ │ │ ├── dial_unix_test.go │ │ │ ├── doc.go │ │ │ ├── forward_unix_test.go │ │ │ ├── session_test.go │ │ │ ├── test_unix_test.go │ │ │ └── testdata_test.go │ │ ├── testdata │ │ │ ├── doc.go │ │ │ └── keys.go │ │ ├── testdata_test.go │ │ ├── transport.go │ │ └── transport_test.go │ ├── tea │ │ ├── cipher.go │ │ └── tea_test.go │ ├── twofish │ │ ├── twofish.go │ │ └── twofish_test.go │ ├── xtea │ │ ├── block.go │ │ ├── cipher.go │ │ └── xtea_test.go │ └── xts │ │ ├── xts.go │ │ └── xts_test.go │ └── sys │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── plan9 │ ├── asm.s │ ├── asm_plan9_386.s │ ├── asm_plan9_amd64.s │ ├── const_plan9.go │ ├── dir_plan9.go │ ├── env_plan9.go │ ├── env_unset.go │ ├── errors_plan9.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mksyscall.pl │ ├── mksysnum_plan9.sh │ ├── pwd_go15_plan9.go │ ├── pwd_plan9.go │ ├── race.go │ ├── race0.go │ ├── str.go │ ├── syscall.go │ ├── syscall_plan9.go │ ├── syscall_test.go │ ├── zsyscall_plan9_386.go │ ├── zsyscall_plan9_amd64.go │ └── zsysnum_plan9.go │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── asm_darwin_386.s │ ├── asm_darwin_amd64.s │ ├── asm_darwin_arm.s │ ├── asm_darwin_arm64.s │ ├── asm_dragonfly_amd64.s │ ├── asm_freebsd_386.s │ ├── asm_freebsd_amd64.s │ ├── asm_freebsd_arm.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_s390x.s │ ├── asm_netbsd_386.s │ ├── asm_netbsd_amd64.s │ ├── asm_netbsd_arm.s │ ├── asm_openbsd_386.s │ ├── asm_openbsd_amd64.s │ ├── asm_openbsd_arm.s │ ├── asm_solaris_amd64.s │ ├── bluetooth_linux.go │ ├── cap_freebsd.go │ ├── constants.go │ ├── creds_test.go │ ├── dev_darwin.go │ ├── dev_darwin_test.go │ ├── dev_dragonfly.go │ ├── dev_dragonfly_test.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_linux_test.go │ ├── dev_netbsd.go │ ├── dev_netbsd_test.go │ ├── dev_openbsd.go │ ├── dev_openbsd_test.go │ ├── dev_solaris_test.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── env_unset.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── export_test.go │ ├── flock.go │ ├── flock_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── linux │ │ ├── Dockerfile │ │ ├── mkall.go │ │ ├── mksysnum.pl │ │ └── types.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.pl │ ├── mksyscall_solaris.pl │ ├── mksysctl_openbsd.pl │ ├── mksysnum_darwin.pl │ ├── mksysnum_dragonfly.pl │ ├── mksysnum_freebsd.pl │ ├── mksysnum_netbsd.pl │ ├── mksysnum_openbsd.pl │ ├── mmap_unix_test.go │ ├── openbsd_pledge.go │ ├── openbsd_test.go │ ├── pagesize_unix.go │ ├── race.go │ ├── race0.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_bsd.go │ ├── syscall_bsd_test.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.go │ ├── syscall_darwin_arm64.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_test.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_linux_test.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_solaris_test.go │ ├── syscall_test.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_test.go │ ├── timestruct.go │ ├── timestruct_test.go │ ├── types_darwin.go │ ├── types_dragonfly.go │ ├── types_freebsd.go │ ├── types_netbsd.go │ ├── types_openbsd.go │ ├── types_solaris.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_solaris_amd64.go │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.go │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_solaris_amd64.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ └── ztypes_solaris_amd64.go │ └── windows │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── dll_windows.go │ ├── env_unset.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── registry │ ├── export_test.go │ ├── key.go │ ├── mksyscall.go │ ├── registry_test.go │ ├── syscall.go │ ├── value.go │ └── zsyscall_windows.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── svc │ ├── debug │ │ ├── log.go │ │ └── service.go │ ├── event.go │ ├── eventlog │ │ ├── install.go │ │ ├── log.go │ │ └── log_test.go │ ├── example │ │ ├── beep.go │ │ ├── install.go │ │ ├── main.go │ │ ├── manage.go │ │ └── service.go │ ├── go12.c │ ├── go12.go │ ├── go13.go │ ├── mgr │ │ ├── config.go │ │ ├── mgr.go │ │ ├── mgr_test.go │ │ └── service.go │ ├── security.go │ ├── service.go │ ├── svc_test.go │ ├── sys_386.s │ └── sys_amd64.s │ ├── syscall.go │ ├── syscall_test.go │ ├── syscall_windows.go │ ├── syscall_windows_test.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ └── zsyscall_windows.go └── gopkg.in └── yaml.v1 ├── LICENSE ├── LICENSE.libyaml ├── README.md ├── apic.go ├── decode.go ├── decode_test.go ├── emitterc.go ├── encode.go ├── encode_test.go ├── parserc.go ├── readerc.go ├── resolve.go ├── scannerc.go ├── sorter.go ├── suite_test.go ├── writerc.go ├── yaml.go ├── yamlh.go └── yamlprivateh.go /.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | Dockerfile 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | debian/changelog 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG IMAGE 2 | FROM ${IMAGE} 3 | 4 | ARG GO_TAGS 5 | ENV GO_TAGS=${GO_TAGS} 6 | 7 | RUN apt-get update && apt-get install -y --no-install-recommends \ 8 | git build-essential \ 9 | debhelper devscripts fakeroot git-buildpackage dh-make dh-systemd dh-golang \ 10 | libcairo2-dev \ 11 | libgtk-3-dev 12 | 13 | # We cache go get gtk, to speed up builds. 14 | #RUN go get -tags ${GO_TAGS} -v github.com/gotk3/gotk3/gtk/... 15 | 16 | ADD . ${GOPATH}/src/github.com/mcuadros/OctoPrint-TFT/ 17 | #RUN go get -tags ${GO_TAGS} -v ./... 18 | 19 | WORKDIR ${GOPATH}/src/github.com/mcuadros/OctoPrint-TFT/ 20 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/gbp.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | pristine-tar = True 3 | -------------------------------------------------------------------------------- /debian/local/disablescreenblank.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | screen=${1:-0} 4 | 5 | # wait 20s for the display manager service to start and attach to screen 6 | sleep 20 7 | 8 | /usr/bin/xset -display :$screen s off # deactivate screen saver 9 | /usr/bin/xset -display :$screen -dpms # disable DPMS 10 | /usr/bin/xset -display :$screen s noblank # disable screen blanking 11 | 12 | -------------------------------------------------------------------------------- /debian/local/insserv.conf.d/octoprint-tft: -------------------------------------------------------------------------------- 1 | $x-display-manager octoprint-tft 2 | -------------------------------------------------------------------------------- /debian/local/octoprint-tft-environment: -------------------------------------------------------------------------------- 1 | # Location of the OctoPrint's config.yaml file. If empty the file will 2 | # be search at the `pi` home folder or the current user. Only used for locally 3 | # installed OctoPrint servers. 4 | OCTOPRINT_CONFIG_FILE= 5 | 6 | # OctoPrint HTTP address, example `http://localhost:5000`, if OctoPrint is 7 | # locally installed will be read from the config file. 8 | OCTOPRINT_HOST= 9 | 10 | # OctoPrint-TFT expects an API key to be supplied. This API key can be either 11 | # the globally configured one or a user specific one if “Access Control”. 12 | # http://docs.octoprint.org/en/master/api/general.html, if OctoPrint is 13 | # locally installed will be read from the config file. 14 | OCTOPRINT_APIKEY= 15 | 16 | # Location of the application theme. 17 | OCTOPRINT_TFT_STYLE_PATH=/opt/octoprint-tft/styles/default/ 18 | 19 | # Resolution of the application, should be configured to the resolution of your 20 | # screen, for example 800x480. By default 480x320. 21 | OCTOPRINT_TFT_RESOLUTION= 22 | -------------------------------------------------------------------------------- /debian/octoprint-tft.install: -------------------------------------------------------------------------------- 1 | debian/local/octoprint-tft-environment etc 2 | debian/local/insserv.conf.d/octoprint-tft etc/insserv.conf.d 3 | debian/local/disablescreenblank.sh etc 4 | -------------------------------------------------------------------------------- /debian/octoprint-tft.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OctoPrint-TFT 3 | Conflicts=getty@tty7.service 4 | After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service 5 | 6 | [Service] 7 | EnvironmentFile=/etc/octoprint-tft-environment 8 | ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor 9 | ExecStartPost=/etc/disablescreenblank.sh 0 10 | StandardOutput=journal 11 | Restart=always 12 | RestartSec=1s 13 | TimeoutStopSec=5s 14 | IgnoreSIGPIPE=no 15 | 16 | [Install] 17 | WantedBy=graphical.target 18 | Alias=display-manager.service 19 | -------------------------------------------------------------------------------- /debian/octoprint-tft.templates: -------------------------------------------------------------------------------- 1 | Template: shared/default-x-display-manager 2 | Type: select 3 | Choices: ${choices} 4 | Description: Default display manager: 5 | A display manager is a program that provides graphical login capabilities for 6 | the X Window System. 7 | . 8 | Only one display manager can manage a given X server, but multiple display 9 | manager packages are installed. Please select which display manager should 10 | run by default. 11 | . 12 | Multiple display managers can run simultaneously if they are configured to 13 | manage different servers; to achieve this, configure the display managers 14 | accordingly, edit each of their init scripts in /etc/init.d, and disable the 15 | check for a default display manager. 16 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export DH_VERBOSE := 1 4 | export DH_GOPKG := github.com/mcuadros/OctoPrint-TFT 5 | export DH_GOLANG_INSTALL_ALL := 1 6 | export DH_GOLANG_EXCLUDES := vendor 7 | 8 | %: 9 | dh $@ --buildsystem=golang --with=golang,systemd 10 | 11 | override_dh_auto_build: 12 | dh_auto_build -O--buildsystem=golang -O--no-parallel -- \ 13 | --tags $(GO_TAGS) \ 14 | -ldflags "\ 15 | -X $(DH_GOPKG)/ui.Version=$(VERSION) \ 16 | -X $(DH_GOPKG)/ui.Build=$(BUILD_DATE)\ 17 | " 18 | 19 | override_dh_golang: 20 | # The dh_golang is used to add the Built-using field to the deb. This is only for reference. 21 | # https://github.com/git-lfs/git-lfs/pull/2203/files 22 | # dh_golang errors out because the go compiler used was not installed via a package. Therefore the step is skipped 23 | 24 | override_dh_install: 25 | mkdir -p $(CURDIR)/debian/octoprint-tft/opt/octoprint-tft/ 26 | cp -r styles $(CURDIR)/debian/octoprint-tft/opt/octoprint-tft/ 27 | rm -rf $(CURDIR)/debian/octoprint-tft/usr/share/gocode 28 | dh_install -XLICENSE 29 | 30 | override_dh_auto_test: 31 | echo "skip no tests" 32 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/octoprint-tft-\$1\.tar\.gz/,\ 3 | uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \ 4 | https://github.com/mcuadros/OctoPrint-TFT/tags .*/v?(\d\S*)\.tar\.gz 5 | -------------------------------------------------------------------------------- /styles/default/images/octoprint-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/styles/default/images/octoprint-logo.png -------------------------------------------------------------------------------- /ui/splash.go: -------------------------------------------------------------------------------- 1 | package ui 2 | 3 | import "github.com/gotk3/gotk3/gtk" 4 | 5 | type SplashPanel struct { 6 | CommonPanel 7 | Label *gtk.Label 8 | } 9 | 10 | func NewSplashPanel(ui *UI) *SplashPanel { 11 | m := &SplashPanel{CommonPanel: NewCommonPanel(ui, nil)} 12 | m.initialize() 13 | return m 14 | } 15 | 16 | func (m *SplashPanel) initialize() { 17 | logo := MustImageFromFile("octoprint-logo.png") 18 | m.Label = MustLabel("Connecting to OctoPrint...") 19 | 20 | box := MustBox(gtk.ORIENTATION_VERTICAL, 15) 21 | box.SetVAlign(gtk.ALIGN_CENTER) 22 | box.SetVExpand(true) 23 | box.SetHExpand(true) 24 | 25 | box.Add(logo) 26 | box.Add(m.Label) 27 | 28 | m.Grid().Attach(box, 1, 0, 1, 1) 29 | } 30 | -------------------------------------------------------------------------------- /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/dustin/go-humanize/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.3.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - 1.9.x 10 | - master 11 | matrix: 12 | allow_failures: 13 | - go: master 14 | fast_finish: true 15 | install: 16 | - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). 17 | script: 18 | - go get -t -v ./... 19 | - diff -u <(echo -n) <(gofmt -d -s .) 20 | - go tool vet . 21 | - go test -v -race ./... 22 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/big.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import ( 4 | "math/big" 5 | ) 6 | 7 | // order of magnitude (to a max order) 8 | func oomm(n, b *big.Int, maxmag int) (float64, int) { 9 | mag := 0 10 | m := &big.Int{} 11 | for n.Cmp(b) >= 0 { 12 | n.DivMod(n, b, m) 13 | mag++ 14 | if mag == maxmag && maxmag >= 0 { 15 | break 16 | } 17 | } 18 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 19 | } 20 | 21 | // total order of magnitude 22 | // (same as above, but with no upper limit) 23 | func oom(n, b *big.Int) (float64, int) { 24 | mag := 0 25 | m := &big.Int{} 26 | for n.Cmp(b) >= 0 { 27 | n.DivMod(n, b, m) 28 | mag++ 29 | } 30 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/commaf.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package humanize 4 | 5 | import ( 6 | "bytes" 7 | "math/big" 8 | "strings" 9 | ) 10 | 11 | // BigCommaf produces a string form of the given big.Float in base 10 12 | // with commas after every three orders of magnitude. 13 | func BigCommaf(v *big.Float) string { 14 | buf := &bytes.Buffer{} 15 | if v.Sign() < 0 { 16 | buf.Write([]byte{'-'}) 17 | v.Abs(v) 18 | } 19 | 20 | comma := []byte{','} 21 | 22 | parts := strings.Split(v.Text('f', -1), ".") 23 | pos := 0 24 | if len(parts[0])%3 != 0 { 25 | pos += len(parts[0]) % 3 26 | buf.WriteString(parts[0][:pos]) 27 | buf.Write(comma) 28 | } 29 | for ; pos < len(parts[0]); pos += 3 { 30 | buf.WriteString(parts[0][pos : pos+3]) 31 | buf.Write(comma) 32 | } 33 | buf.Truncate(buf.Len() - 1) 34 | 35 | if len(parts) > 1 { 36 | buf.Write([]byte{'.'}) 37 | buf.WriteString(parts[1]) 38 | } 39 | return buf.String() 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/common_test.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | type testList []struct { 8 | name, got, exp string 9 | } 10 | 11 | func (tl testList) validate(t *testing.T) { 12 | for _, test := range tl { 13 | if test.got != test.exp { 14 | t.Errorf("On %v, expected '%v', but got '%v'", 15 | test.name, test.exp, test.got) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/ftoa.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import "strconv" 4 | 5 | func stripTrailingZeros(s string) string { 6 | offset := len(s) - 1 7 | for offset > 0 { 8 | if s[offset] == '.' { 9 | offset-- 10 | break 11 | } 12 | if s[offset] != '0' { 13 | break 14 | } 15 | offset-- 16 | } 17 | return s[:offset+1] 18 | } 19 | 20 | // Ftoa converts a float to a string with no trailing zeros. 21 | func Ftoa(num float64) string { 22 | return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/humanize.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package humanize converts boring ugly numbers to human-friendly strings and back. 3 | 4 | Durations can be turned into strings such as "3 days ago", numbers 5 | representing sizes like 82854982 into useful strings like, "83 MB" or 6 | "79 MiB" (whichever you prefer). 7 | */ 8 | package humanize 9 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/ordinals.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import "strconv" 4 | 5 | // Ordinal gives you the input number in a rank/ordinal format. 6 | // 7 | // Ordinal(3) -> 3rd 8 | func Ordinal(x int) string { 9 | suffix := "th" 10 | switch x % 10 { 11 | case 1: 12 | if x%100 != 11 { 13 | suffix = "st" 14 | } 15 | case 2: 16 | if x%100 != 12 { 17 | suffix = "nd" 18 | } 19 | case 3: 20 | if x%100 != 13 { 21 | suffix = "rd" 22 | } 23 | } 24 | return strconv.Itoa(x) + suffix 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/ordinals_test.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestOrdinals(t *testing.T) { 8 | testList{ 9 | {"0", Ordinal(0), "0th"}, 10 | {"1", Ordinal(1), "1st"}, 11 | {"2", Ordinal(2), "2nd"}, 12 | {"3", Ordinal(3), "3rd"}, 13 | {"4", Ordinal(4), "4th"}, 14 | {"10", Ordinal(10), "10th"}, 15 | {"11", Ordinal(11), "11th"}, 16 | {"12", Ordinal(12), "12th"}, 17 | {"13", Ordinal(13), "13th"}, 18 | {"101", Ordinal(101), "101st"}, 19 | {"102", Ordinal(102), "102nd"}, 20 | {"103", Ordinal(103), "103rd"}, 21 | }.validate(t) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.1 6 | - 1.2 7 | - 1.3 8 | - 1.4 9 | - tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/data/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/vendor/github.com/go-ole/go-ole/data/screenshot.png -------------------------------------------------------------------------------- /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/example/excel/excel.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | import ( 6 | "time" 7 | 8 | ole "github.com/go-ole/go-ole" 9 | "github.com/go-ole/go-ole/oleutil" 10 | ) 11 | 12 | func main() { 13 | ole.CoInitialize(0) 14 | unknown, _ := oleutil.CreateObject("Excel.Application") 15 | excel, _ := unknown.QueryInterface(ole.IID_IDispatch) 16 | oleutil.PutProperty(excel, "Visible", true) 17 | workbooks := oleutil.MustGetProperty(excel, "Workbooks").ToIDispatch() 18 | workbook := oleutil.MustCallMethod(workbooks, "Add", nil).ToIDispatch() 19 | worksheet := oleutil.MustGetProperty(workbook, "Worksheets", 1).ToIDispatch() 20 | cell := oleutil.MustGetProperty(worksheet, "Cells", 1, 1).ToIDispatch() 21 | oleutil.PutProperty(cell, "Value", 12345) 22 | 23 | time.Sleep(2000000000) 24 | 25 | oleutil.PutProperty(workbook, "Saved", true) 26 | oleutil.CallMethod(workbook, "Close", false) 27 | oleutil.CallMethod(excel, "Quit") 28 | excel.Release() 29 | 30 | ole.CoUninitialize() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/example/ie/ie.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | import ( 6 | "time" 7 | 8 | ole "github.com/go-ole/go-ole" 9 | "github.com/go-ole/go-ole/oleutil" 10 | ) 11 | 12 | func main() { 13 | ole.CoInitialize(0) 14 | unknown, _ := oleutil.CreateObject("InternetExplorer.Application") 15 | ie, _ := unknown.QueryInterface(ole.IID_IDispatch) 16 | oleutil.CallMethod(ie, "Navigate", "http://www.google.com") 17 | oleutil.PutProperty(ie, "Visible", true) 18 | for { 19 | if oleutil.MustGetProperty(ie, "Busy").Val == 0 { 20 | break 21 | } 22 | } 23 | 24 | time.Sleep(1e9) 25 | 26 | document := oleutil.MustGetProperty(ie, "document").ToIDispatch() 27 | window := oleutil.MustGetProperty(document, "parentWindow").ToIDispatch() 28 | // set 'golang' to text box. 29 | oleutil.MustCallMethod(window, "eval", "document.getElementsByName('q')[0].value = 'golang'") 30 | // click btnG. 31 | btnG := oleutil.MustCallMethod(window, "eval", "document.getElementsByName('btnG')[0]").ToIDispatch() 32 | oleutil.MustCallMethod(btnG, "click") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/example/mediaplayer/mediaplayer.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "log" 8 | 9 | ole "github.com/go-ole/go-ole" 10 | "github.com/go-ole/go-ole/oleutil" 11 | ) 12 | 13 | func main() { 14 | ole.CoInitialize(0) 15 | unknown, err := oleutil.CreateObject("WMPlayer.OCX") 16 | if err != nil { 17 | log.Fatal(err) 18 | } 19 | wmp := unknown.MustQueryInterface(ole.IID_IDispatch) 20 | collection := oleutil.MustGetProperty(wmp, "MediaCollection").ToIDispatch() 21 | list := oleutil.MustCallMethod(collection, "getAll").ToIDispatch() 22 | count := int(oleutil.MustGetProperty(list, "count").Val) 23 | for i := 0; i < count; i++ { 24 | item := oleutil.MustGetProperty(list, "item", i).ToIDispatch() 25 | name := oleutil.MustGetProperty(item, "name").ToString() 26 | sourceURL := oleutil.MustGetProperty(item, "sourceURL").ToString() 27 | fmt.Println(name, sourceURL) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/example/msagent/msagent.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | import ( 6 | "time" 7 | 8 | ole "github.com/go-ole/go-ole" 9 | "github.com/go-ole/go-ole/oleutil" 10 | ) 11 | 12 | func main() { 13 | ole.CoInitialize(0) 14 | unknown, _ := oleutil.CreateObject("Agent.Control.1") 15 | agent, _ := unknown.QueryInterface(ole.IID_IDispatch) 16 | oleutil.PutProperty(agent, "Connected", true) 17 | characters := oleutil.MustGetProperty(agent, "Characters").ToIDispatch() 18 | oleutil.CallMethod(characters, "Load", "Merlin", "c:\\windows\\msagent\\chars\\Merlin.acs") 19 | character := oleutil.MustCallMethod(characters, "Character", "Merlin").ToIDispatch() 20 | oleutil.CallMethod(character, "Show") 21 | oleutil.CallMethod(character, "Speak", "こんにちわ世界") 22 | 23 | time.Sleep(4000000000) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/example/outlook/outlook.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | 8 | ole "github.com/go-ole/go-ole" 9 | "github.com/go-ole/go-ole/oleutil" 10 | ) 11 | 12 | func main() { 13 | ole.CoInitialize(0) 14 | unknown, _ := oleutil.CreateObject("Outlook.Application") 15 | outlook, _ := unknown.QueryInterface(ole.IID_IDispatch) 16 | ns := oleutil.MustCallMethod(outlook, "GetNamespace", "MAPI").ToIDispatch() 17 | folder := oleutil.MustCallMethod(ns, "GetDefaultFolder", 10).ToIDispatch() 18 | contacts := oleutil.MustCallMethod(folder, "Items").ToIDispatch() 19 | count := oleutil.MustGetProperty(contacts, "Count").Value().(int32) 20 | for i := 1; i <= int(count); i++ { 21 | item, err := oleutil.GetProperty(contacts, "Item", i) 22 | if err == nil && item.VT == ole.VT_DISPATCH { 23 | if value, err := oleutil.GetProperty(item.ToIDispatch(), "FullName"); err == nil { 24 | fmt.Println(value.Value()) 25 | } 26 | } 27 | } 28 | oleutil.MustCallMethod(outlook, "Quit") 29 | } 30 | -------------------------------------------------------------------------------- /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/iconnectionpoint_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { 11 | // XXX: This doesn't look like it does what it's supposed to 12 | return release((*IUnknown)(unsafe.Pointer(v))) 13 | } 14 | 15 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) { 16 | hr, _, _ := syscall.Syscall( 17 | v.VTable().Advise, 18 | 3, 19 | uintptr(unsafe.Pointer(v)), 20 | uintptr(unsafe.Pointer(unknown)), 21 | uintptr(unsafe.Pointer(&cookie))) 22 | if hr != 0 { 23 | err = NewError(hr) 24 | } 25 | return 26 | } 27 | 28 | func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) { 29 | hr, _, _ := syscall.Syscall( 30 | v.VTable().Unadvise, 31 | 2, 32 | uintptr(unsafe.Pointer(v)), 33 | uintptr(cookie), 34 | 0) 35 | if hr != 0 { 36 | err = NewError(hr) 37 | } 38 | return 39 | } 40 | 41 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error { 42 | return NewError(E_NOTIMPL) 43 | } 44 | -------------------------------------------------------------------------------- /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/iunknown_windows_test.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import "testing" 6 | 7 | func TestIUnknown(t *testing.T) { 8 | defer func() { 9 | if r := recover(); r != nil { 10 | t.Error(r) 11 | } 12 | }() 13 | 14 | var err error 15 | 16 | err = CoInitialize(0) 17 | if err != nil { 18 | t.Fatal(err) 19 | } 20 | 21 | defer CoUninitialize() 22 | 23 | var unknown *IUnknown 24 | 25 | // oleutil.CreateObject() 26 | unknown, err = CreateInstance(CLSID_COMEchoTestObject, IID_IUnknown) 27 | if err != nil { 28 | t.Fatal(err) 29 | return 30 | } 31 | unknown.Release() 32 | } 33 | -------------------------------------------------------------------------------- /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/winrt_doc.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | // RoInitialize 6 | func RoInitialize(thread_type uint32) (err error) { 7 | return NewError(E_NOTIMPL) 8 | } 9 | 10 | // RoActivateInstance 11 | func RoActivateInstance(clsid string) (ins *IInspectable, err error) { 12 | return nil, NewError(E_NOTIMPL) 13 | } 14 | 15 | // RoGetActivationFactory 16 | func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { 17 | return nil, NewError(E_NOTIMPL) 18 | } 19 | 20 | // HString is handle string for pointers. 21 | type HString uintptr 22 | 23 | // NewHString returns a new HString for Go string. 24 | func NewHString(s string) (hstring HString, err error) { 25 | return HString(uintptr(0)), NewError(E_NOTIMPL) 26 | } 27 | 28 | // DeleteHString deletes HString. 29 | func DeleteHString(hstring HString) (err error) { 30 | return NewError(E_NOTIMPL) 31 | } 32 | 33 | // String returns Go string value of HString. 34 | func (h HString) String() string { 35 | return "" 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | 9 | env: 10 | - GOARCH=amd64 11 | 12 | sudo: required 13 | dist: trusty 14 | 15 | before_install: 16 | - sudo apt-get update -qq 17 | - sudo apt-get install -qq -y gtk+3.0 libgtk-3-dev 18 | - sudo apt-get install -qq -y xvfb 19 | - "export DISPLAY=:99.0" 20 | - sudo /usr/bin/Xvfb $DISPLAY 2>1 > /dev/null & 21 | - "export GTK_VERSION=$(pkg-config --modversion gtk+-3.0 | tr . _| cut -d '_' -f 1-2)" 22 | - "export Glib_VERSION=$(pkg-config --modversion glib-2.0)" 23 | - "export Cairo_VERSION=$(pkg-config --modversion cairo)" 24 | - "export Pango_VERSION=$(pkg-config --modversion pango)" 25 | - echo "GTK version ${GTK_VERSION} (Glib ${Glib_VERSION}, Cairo ${Cairo_VERSION}, Pango ${Pango_VERSION})" 26 | 27 | install: 28 | - go get -t -tags "gtk_${GTK_VERSION}" github.com/gotk3/gotk3/... 29 | 30 | script: 31 | - go test -tags "gtk_${GTK_VERSION}" ./... -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/CONTRIBUTIONS.md: -------------------------------------------------------------------------------- 1 | ## CONTRIBUTIONS 2 | - [conformal](https://github.com/conformal/gotk3) 3 | - [jrick](https://github.com/jrick/gotk3) 4 | - [sqp](https://github.com/sqp/gotk3) 5 | - [dradtke](https://github.com/dradtke/gotk3) 6 | - [MovingtoMars](https://github.com/MovingtoMars/gotk3) 7 | - [shish](https://github.com/shish/gotk3) 8 | - [andre](https://github.com/andre-hub/gotk3) 9 | - [raichu](https://github.com/raichu/gotk3) 10 | - [juniorz](https://github.com/juniorz) 11 | - you? -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 Conformal Systems LLC. 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/antialias.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | import ( 9 | "unsafe" 10 | ) 11 | 12 | // Antialias is a representation of Cairo's cairo_antialias_t. 13 | type Antialias int 14 | 15 | const ( 16 | ANTIALIAS_DEFAULT Antialias = C.CAIRO_ANTIALIAS_DEFAULT 17 | ANTIALIAS_NONE Antialias = C.CAIRO_ANTIALIAS_NONE 18 | ANTIALIAS_GRAY Antialias = C.CAIRO_ANTIALIAS_GRAY 19 | ANTIALIAS_SUBPIXEL Antialias = C.CAIRO_ANTIALIAS_SUBPIXEL 20 | // ANTIALIAS_FAST Antialias = C.CAIRO_ANTIALIAS_FAST (since 1.12) 21 | // ANTIALIAS_GOOD Antialias = C.CAIRO_ANTIALIAS_GOOD (since 1.12) 22 | // ANTIALIAS_BEST Antialias = C.CAIRO_ANTIALIAS_BEST (since 1.12) 23 | ) 24 | 25 | func marshalAntialias(p uintptr) (interface{}, error) { 26 | c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p))) 27 | return Antialias(c), nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/errors.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | type ErrorStatus Status 4 | 5 | func (e ErrorStatus) Error() string { 6 | return StatusToString(Status(e)) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/fillrule.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | import ( 9 | "unsafe" 10 | ) 11 | 12 | // FillRule is a representation of Cairo's cairo_fill_rule_t. 13 | type FillRule int 14 | 15 | const ( 16 | FILL_RULE_WINDING FillRule = C.CAIRO_FILL_RULE_WINDING 17 | FILL_RULE_EVEN_ODD FillRule = C.CAIRO_FILL_RULE_EVEN_ODD 18 | ) 19 | 20 | func marshalFillRule(p uintptr) (interface{}, error) { 21 | c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p))) 22 | return FillRule(c), nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/format.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | import ( 9 | "unsafe" 10 | ) 11 | 12 | // Format is a representation of Cairo's cairo_format_t. 13 | type Format int 14 | 15 | const ( 16 | FORMAT_INVALID Format = C.CAIRO_FORMAT_INVALID 17 | FORMAT_ARGB32 Format = C.CAIRO_FORMAT_ARGB32 18 | FORMAT_RGB24 Format = C.CAIRO_FORMAT_RGB24 19 | FORMAT_A8 Format = C.CAIRO_FORMAT_A8 20 | FORMAT_A1 Format = C.CAIRO_FORMAT_A1 21 | FORMAT_RGB16_565 Format = C.CAIRO_FORMAT_RGB16_565 22 | FORMAT_RGB30 Format = C.CAIRO_FORMAT_RGB30 23 | ) 24 | 25 | func marshalFormat(p uintptr) (interface{}, error) { 26 | c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p))) 27 | return Format(c), nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/linecap.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | import ( 9 | "unsafe" 10 | ) 11 | 12 | // LineCap is a representation of Cairo's cairo_line_cap_t. 13 | type LineCap int 14 | 15 | const ( 16 | LINE_CAP_BUTT LineCap = C.CAIRO_LINE_CAP_BUTT 17 | LINE_CAP_ROUND LineCap = C.CAIRO_LINE_CAP_ROUND 18 | LINE_CAP_SQUARE LineCap = C.CAIRO_LINE_CAP_SQUARE 19 | ) 20 | 21 | func marshalLineCap(p uintptr) (interface{}, error) { 22 | c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p))) 23 | return LineCap(c), nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/linejoin.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | import ( 9 | "unsafe" 10 | ) 11 | 12 | // LineJoin is a representation of Cairo's cairo_line_join_t. 13 | type LineJoin int 14 | 15 | const ( 16 | LINE_JOIN_MITER LineJoin = C.CAIRO_LINE_JOIN_MITER 17 | LINE_JOIN_ROUND LineJoin = C.CAIRO_LINE_JOIN_ROUND 18 | LINE_JOIN_BEVEL LineJoin = C.CAIRO_LINE_JOIN_BEVEL 19 | ) 20 | 21 | func marshalLineJoin(p uintptr) (interface{}, error) { 22 | c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p))) 23 | return LineJoin(c), nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/mimetype.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // MimeType is a representation of Cairo's CAIRO_MIME_TYPE_* 4 | // preprocessor constants. 5 | type MimeType string 6 | 7 | const ( 8 | MIME_TYPE_JP2 MimeType = "image/jp2" 9 | MIME_TYPE_JPEG MimeType = "image/jpeg" 10 | MIME_TYPE_PNG MimeType = "image/png" 11 | MIME_TYPE_URI MimeType = "image/x-uri" 12 | MIME_TYPE_UNIQUE_ID MimeType = "application/x-cairo.uuid" 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/translations.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | 9 | // Translate is a wrapper around cairo_translate. 10 | func (v *Context) Translate(tx, ty float64) { 11 | C.cairo_translate(v.native(), C.double(tx), C.double(ty)) 12 | } 13 | 14 | // Scale is a wrapper around cairo_scale. 15 | func (v *Context) Scale(sx, sy float64) { 16 | C.cairo_scale(v.native(), C.double(sx), C.double(sy)) 17 | } 18 | 19 | // Rotate is a wrapper around cairo_rotate. 20 | func (v *Context) Rotate(angle float64) { 21 | C.cairo_rotate(v.native(), C.double(angle)) 22 | } 23 | 24 | // TODO: The following depend on cairo_matrix_t: 25 | //void cairo_transform () 26 | //void cairo_set_matrix () 27 | //void cairo_get_matrix () 28 | //void cairo_identity_matrix () 29 | //void cairo_user_to_device () 30 | //void cairo_user_to_device_distance () 31 | //void cairo_device_to_user () 32 | //void cairo_device_to_user_distance () 33 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/cairo/util.go: -------------------------------------------------------------------------------- 1 | package cairo 2 | 3 | // #cgo pkg-config: cairo cairo-gobject 4 | // #include 5 | // #include 6 | // #include 7 | import "C" 8 | 9 | func cairobool(b bool) C.cairo_bool_t { 10 | if b { 11 | return C.cairo_bool_t(1) 12 | } 13 | return C.cairo_bool_t(0) 14 | } 15 | 16 | func gobool(b C.cairo_bool_t) bool { 17 | if b != 0 { 18 | return true 19 | } 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gdk/gdk_deprecated_since_3_16.go: -------------------------------------------------------------------------------- 1 | //+build gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 2 | 3 | package gdk 4 | 5 | // #cgo pkg-config: gdk-3.0 6 | // #include 7 | import "C" 8 | 9 | // SupportsComposite() is a wrapper around gdk_display_supports_composite(). 10 | func (v *Display) SupportsComposite() bool { 11 | c := C.gdk_display_supports_composite(v.native()) 12 | return gobool(c) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gdk/screen_no_x11.go: -------------------------------------------------------------------------------- 1 | // +build !linux no_x11 2 | 3 | package gdk 4 | 5 | func WorkspaceControlSupported() bool { 6 | return false 7 | } 8 | 9 | // GetScreenNumber is a wrapper around gdk_x11_screen_get_screen_number(). 10 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false 11 | func (v *Screen) GetScreenNumber() int { 12 | return -1 13 | } 14 | 15 | // GetNumberOfDesktops is a wrapper around gdk_x11_screen_get_number_of_desktops(). 16 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false 17 | func (v *Screen) GetNumberOfDesktops() uint32 { 18 | return 0 19 | } 20 | 21 | // GetCurrentDesktop is a wrapper around gdk_x11_screen_get_current_desktop(). 22 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false 23 | func (v *Screen) GetCurrentDesktop() uint32 { 24 | return 0 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gdk/window_no_x11.go: -------------------------------------------------------------------------------- 1 | // +build !linux no_x11 2 | 3 | package gdk 4 | 5 | func (v *Window) MoveToCurrentDesktop() { 6 | } 7 | 8 | // GetDesktop is a wrapper around gdk_x11_window_get_desktop(). 9 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false 10 | func (v *Window) GetDesktop() uint32 { 11 | return 0 12 | } 13 | 14 | // MoveToDesktop is a wrapper around gdk_x11_window_move_to_desktop(). 15 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false 16 | func (v *Window) MoveToDesktop(d uint32) { 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/glib/glib_extension.go: -------------------------------------------------------------------------------- 1 | //glib_extension contains definitions and functions to interface between glib/gtk/gio and go universe 2 | 3 | package glib 4 | 5 | import ( 6 | "reflect" 7 | ) 8 | 9 | // Should be implemented by any class which need special conversion like 10 | // gtk.Application -> gio.Application 11 | type IGlibConvert interface { 12 | // If convertion can't be done, function have to panic with a message that it can't convert to type 13 | Convert(reflect.Type) reflect.Value 14 | } 15 | 16 | var ( 17 | IGlibConvertType reflect.Type 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/glib/gmain_context.go: -------------------------------------------------------------------------------- 1 | package glib 2 | 3 | // #cgo pkg-config: glib-2.0 gobject-2.0 gio-2.0 4 | // #include 5 | // #include 6 | // #include 7 | // #include "glib.go.h" 8 | import "C" 9 | 10 | type MainContext C.GMainContext 11 | 12 | // native returns a pointer to the underlying GMainContext. 13 | func (v *MainContext) native() *C.GMainContext { 14 | if v == nil { 15 | return nil 16 | } 17 | return (*C.GMainContext)(v) 18 | } 19 | 20 | // MainContextDefault is a wrapper around g_main_context_default(). 21 | func MainContextDefault() *MainContext { 22 | c := C.g_main_context_default() 23 | if c == nil { 24 | return nil 25 | } 26 | return (*MainContext)(c) 27 | } 28 | 29 | // MainDepth is a wrapper around g_main_depth(). 30 | func MainDepth() int { 31 | return int(C.g_main_depth()) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/glib/gsource.go: -------------------------------------------------------------------------------- 1 | package glib 2 | 3 | // #cgo pkg-config: glib-2.0 gobject-2.0 gio-2.0 4 | // #include 5 | // #include 6 | // #include 7 | // #include "glib.go.h" 8 | import "C" 9 | 10 | type Source C.GSource 11 | 12 | // native returns a pointer to the underlying GSource. 13 | func (v *Source) native() *C.GSource { 14 | if v == nil { 15 | return nil 16 | } 17 | return (*C.GSource)(v) 18 | } 19 | 20 | // MainCurrentSource is a wrapper around g_main_current_source(). 21 | func MainCurrentSource() *Source { 22 | c := C.g_main_current_source() 23 | if c == nil { 24 | return nil 25 | } 26 | return (*Source)(c) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/glib/gvariant.go.h: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | 3 | //GVariant : GVariant — strongly typed value datatype 4 | // https://developer.gnome.org/glib/2.26/glib-GVariant.html 5 | 6 | #ifndef __GVARIANT_GO_H__ 7 | #define __GVARIANT_GO_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | // Type Casting 15 | 16 | static GVariant * 17 | toGVariant(void *p) 18 | { 19 | return (GVariant*)p; 20 | } 21 | 22 | static GVariantBuilder * 23 | toGVariantBuilder(void *p) 24 | { 25 | return (GVariantBuilder*)p; 26 | } 27 | 28 | static GVariantDict * 29 | toGVariantDict(void *p) 30 | { 31 | return (GVariantDict*)p; 32 | } 33 | 34 | static GVariantIter * 35 | toGVariantIter(void *p) 36 | { 37 | return (GVariantIter*)p; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/glib/gvariant_test.go: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | 3 | package glib_test 4 | 5 | import ( 6 | "testing" 7 | ) 8 | 9 | func Test_AcceleratorParse(t *testing.T) { 10 | /* 11 | testVariant := &Variant{} 12 | t.Log("native: " + testVariant.Native()) 13 | */ 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/accel_test.go: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | 3 | package gtk 4 | 5 | import "testing" 6 | 7 | func Test_AccelGroup_Locking(t *testing.T) { 8 | ag, _ := AccelGroupNew() 9 | if ag.IsLocked() { 10 | t.Error("A newly created AccelGroup should not be locked") 11 | } 12 | 13 | ag.Lock() 14 | 15 | if !ag.IsLocked() { 16 | t.Error("A locked AccelGroup should report being locked") 17 | } 18 | 19 | ag.Unlock() 20 | 21 | if ag.IsLocked() { 22 | t.Error("An unlocked AccelGroup should report being unlocked") 23 | } 24 | } 25 | 26 | func Test_AcceleratorParse(t *testing.T) { 27 | l, r := AcceleratorParse("F1") 28 | if l != 65470 { 29 | t.Errorf("Expected parsed key to equal %d but was %d", 65470, l) 30 | } 31 | if r != 9 { 32 | t.Errorf("Expected parsed mods to equal %d but was %d", 9, r) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/actionbar_since_3_12.go.h: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12 2 | 3 | /* 4 | * Copyright (c) 2013-2014 Conformal Systems 5 | * 6 | * This file originated from: http://opensource.conformal.com/ 7 | * 8 | * Permission to use, copy, modify, and distribute this software for any 9 | * purpose with or without fee is hereby granted, provided that the above 10 | * copyright notice and this permission notice appear in all copies. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | */ 20 | 21 | static GtkActionBar * 22 | toGtkActionBar(void *p) 23 | { 24 | return (GTK_ACTION_BAR(p)); 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/gtk_deprecated_since_3_14.go.h: -------------------------------------------------------------------------------- 1 | 2 | static GtkStatusIcon * 3 | toGtkStatusIcon(void *p) 4 | { 5 | return (GTK_STATUS_ICON(p)); 6 | } 7 | 8 | /* 9 | * deprecated since version 3.14 10 | */ 11 | static GtkAlignment * 12 | toGtkAlignment(void *p) 13 | { 14 | return (GTK_ALIGNMENT(p)); 15 | } 16 | 17 | static GtkArrow * 18 | toGtkArrow(void *p) 19 | { 20 | return (GTK_ARROW(p)); 21 | } 22 | 23 | static GtkMisc * 24 | toGtkMisc(void *p) 25 | { 26 | return (GTK_MISC(p)); 27 | } 28 | /* 29 | * End deprecated since version 3.14 30 | */ 31 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/gtk_deprecated_since_3_16.go: -------------------------------------------------------------------------------- 1 | //+build gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 2 | 3 | package gtk 4 | 5 | // #cgo pkg-config: gtk+-3.0 6 | // #include 7 | // #include 8 | import "C" 9 | 10 | import ( 11 | "unsafe" 12 | 13 | "github.com/gotk3/gotk3/gdk" 14 | ) 15 | 16 | // OverrideColor is a wrapper around gtk_widget_override_color(). 17 | func (v *Widget) OverrideColor(state StateFlags, color *gdk.RGBA) { 18 | var cColor *C.GdkRGBA 19 | if color != nil { 20 | cColor = (*C.GdkRGBA)(unsafe.Pointer(color.Native())) 21 | } 22 | C.gtk_widget_override_color(v.native(), C.GtkStateFlags(state), cColor) 23 | } 24 | 25 | // OverrideFont is a wrapper around gtk_widget_override_font(). 26 | func (v *Widget) OverrideFont(description string) { 27 | cstr := C.CString(description) 28 | defer C.free(unsafe.Pointer(cstr)) 29 | c := C.pango_font_description_from_string(cstr) 30 | C.gtk_widget_override_font(v.native(), c) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/gtk_since_3_16.go.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2014 Conformal Systems 3 | * 4 | * This file originated from: http://opensource.conformal.com/ 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | static GtkStackSidebar * 20 | toGtkStackSidebar(void *p) 21 | { 22 | return (GTK_STACK_SIDEBAR(p)); 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/level_bar_since_3_8.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6 2 | 3 | package gtk 4 | 5 | // #include 6 | // #include "gtk.go.h" 7 | import "C" 8 | 9 | // SetInverted() is a wrapper around gtk_level_bar_set_inverted(). 10 | func (v *LevelBar) SetInverted(inverted bool) { 11 | C.gtk_level_bar_set_inverted(v.native(), gbool(inverted)) 12 | } 13 | 14 | // GetInverted() is a wrapper around gtk_level_bar_get_inverted(). 15 | func (v *LevelBar) GetInverted() bool { 16 | c := C.gtk_level_bar_get_inverted(v.native()) 17 | return gobool(c) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/menu_before_3_22.go: -------------------------------------------------------------------------------- 1 | // +build gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 gtk_3_16 gtk_3_18 gtk_3_20 2 | 3 | package gtk 4 | 5 | // #cgo pkg-config: gtk+-3.0 6 | // #include 7 | // #include 8 | import "C" 9 | import "github.com/gotk3/gotk3/gdk" 10 | 11 | // PopupAtPointer() is a wrapper for gtk_menu_popup_at_pointer(), on older versions it uses PopupAtMouseCursor 12 | func (v *Menu) PopupAtPointer(_ *gdk.Event) { 13 | C.gtk_menu_popup(v.native(), 14 | nil, 15 | nil, 16 | nil, 17 | nil, 18 | C.guint(0), 19 | C.gtk_get_current_event_time()) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/menu_since_3_22.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14,!gtk_3_16,!gtk_3_18,!gtk_3_20 2 | 3 | package gtk 4 | 5 | // #cgo pkg-config: gtk+-3.0 6 | // #include 7 | // #include 8 | import "C" 9 | import ( 10 | "unsafe" 11 | 12 | "github.com/gotk3/gotk3/gdk" 13 | ) 14 | 15 | // PopupAtPointer() is a wrapper for gtk_menu_popup_at_pointer(), on older versions it uses PopupAtMouseCursor 16 | func (v *Menu) PopupAtPointer(triggerEvent *gdk.Event) { 17 | e := (*C.GdkEvent)(unsafe.Pointer(triggerEvent.Native())) 18 | C.gtk_menu_popup_at_pointer(v.native(), e) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/popover_since_3_12.go.h: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12 2 | 3 | /* 4 | * Copyright (c) 2013-2014 Conformal Systems 5 | * 6 | * This file originated from: http://opensource.conformal.com/ 7 | * 8 | * Permission to use, copy, modify, and distribute this software for any 9 | * purpose with or without fee is hereby granted, provided that the above 10 | * copyright notice and this permission notice appear in all copies. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | */ 20 | 21 | static GtkPopover * 22 | toGtkPopover(void *p) 23 | { 24 | return (GTK_POPOVER(p)); 25 | } -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/popover_since_3_18.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14,!gtk_3_16,gtk_3_18 2 | 3 | // See: https://developer.gnome.org/gtk3/3.18/api-index-3-18.html 4 | 5 | package gtk 6 | 7 | // #cgo pkg-config: gtk+-3.0 8 | // #include 9 | import "C" 10 | import ( 11 | "unsafe" 12 | 13 | "github.com/gotk3/gotk3/glib" 14 | ) 15 | 16 | //void 17 | //gtk_popover_set_default_widget (GtkPopover *popover, GtkWidget *widget); 18 | func (p *Popover) SetDefaultWidget(widget IWidget) { 19 | C.gtk_popover_set_default_widget(p.native(), widget.toWidget()) 20 | } 21 | 22 | //GtkWidget * 23 | //gtk_popover_get_default_widget (GtkPopover *popover); 24 | func (p *Popover) GetDefaultWidget() *Widget { 25 | w := C.gtk_popover_get_default_widget(p.native()) 26 | if w == nil { 27 | return nil 28 | } 29 | return &Widget{glib.InitiallyUnowned{glib.Take(unsafe.Pointer(w))}} 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/print_since_3_16.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14 2 | 3 | // See: https://developer.gnome.org/gtk3/3.16/api-index-3-16.html 4 | 5 | package gtk 6 | 7 | // #cgo pkg-config: gtk+-3.0 8 | // #include 9 | // #include "gtk.go.h" 10 | import "C" 11 | import ( 12 | "runtime" 13 | "unsafe" 14 | ) 15 | 16 | // PaperSizeNewFromIpp is a wrapper around gtk_paper_size_new_from_ipp(). 17 | func PaperSizeNewFromIPP(name string, width, height float64) (*PaperSize, error) { 18 | cstr := C.CString(name) 19 | defer C.free(unsafe.Pointer(cstr)) 20 | 21 | c := C.gtk_paper_size_new_from_ipp((*C.gchar)(cstr), C.gdouble(width), C.gdouble(height)) 22 | if c == nil { 23 | return nil, nilPtrErr 24 | } 25 | 26 | t := &PaperSize{c} 27 | runtime.SetFinalizer(t, (*PaperSize).free) 28 | return t, nil 29 | } 30 | 31 | // IsIPP() is a wrapper around gtk_paper_size_is_ipp(). 32 | func (ps *PaperSize) IsIPP() bool { 33 | c := C.gtk_paper_size_is_ipp(ps.native()) 34 | return gobool(c) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/settings.go.h: -------------------------------------------------------------------------------- 1 | static GtkSettings * 2 | toGtkSettings(void *p) 3 | { 4 | return (GTK_SETTINGS(p)); 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/stack_since_3_12.go: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | // This file contains accelerator related functions and structures 3 | 4 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10 5 | // not use this: go build -tags gtk_3_8'. Otherwise, if no build tags are used, GTK 3.10 6 | 7 | package gtk 8 | 9 | // #cgo pkg-config: gtk+-3.0 10 | // #include 11 | // #include 12 | // #include "gtk_since_3_10.go.h" 13 | import "C" 14 | import ( 15 | "unsafe" 16 | 17 | "github.com/gotk3/gotk3/glib" 18 | ) 19 | 20 | // GetChildByName is a wrapper around gtk_stack_get_child_by_name(). 21 | func (v *Stack) GetChildByName(name string) *Widget { 22 | cstr := C.CString(name) 23 | defer C.free(unsafe.Pointer(cstr)) 24 | c := C.gtk_stack_get_child_by_name(v.native(), (*C.gchar)(cstr)) 25 | if c == nil { 26 | return nil 27 | } 28 | return wrapWidget(glib.Take(unsafe.Pointer(c))) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/text_mark.go: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | 3 | package gtk 4 | 5 | // #include 6 | // #include "gtk.go.h" 7 | import "C" 8 | 9 | import "unsafe" 10 | 11 | /* 12 | * GtkTextMark 13 | */ 14 | 15 | // TextMark is a representation of GTK's GtkTextMark 16 | type TextMark C.GtkTextMark 17 | 18 | // native returns a pointer to the underlying GtkTextMark. 19 | func (v *TextMark) native() *C.GtkTextMark { 20 | if v == nil { 21 | return nil 22 | } 23 | return (*C.GtkTextMark)(v) 24 | } 25 | 26 | func marshalTextMark(p uintptr) (interface{}, error) { 27 | c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) 28 | return (*TextMark)(unsafe.Pointer(c)), nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/version.go: -------------------------------------------------------------------------------- 1 | package gtk 2 | 3 | // #cgo pkg-config: gtk+-3.0 4 | // #include 5 | import "C" 6 | import "errors" 7 | 8 | func CheckVersion(major, minor, micro uint) error { 9 | errChar := C.gtk_check_version(C.guint(major), C.guint(minor), C.guint(micro)) 10 | if errChar == nil { 11 | return nil 12 | } 13 | 14 | return errors.New(C.GoString((*C.char)(errChar))) 15 | } 16 | 17 | func GetMajorVersion() uint { 18 | v := C.gtk_get_major_version() 19 | return uint(v) 20 | } 21 | 22 | func GetMinorVersion() uint { 23 | v := C.gtk_get_minor_version() 24 | return uint(v) 25 | } 26 | 27 | func GetMicroVersion() uint { 28 | v := C.gtk_get_micro_version() 29 | return uint(v) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/version_test.go: -------------------------------------------------------------------------------- 1 | package gtk 2 | 3 | import "testing" 4 | 5 | func TestCheckVersion(t *testing.T) { 6 | err := CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion()) 7 | if err != nil { 8 | t.Error(err) 9 | } 10 | 11 | err = CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion()-1) 12 | if err != nil { 13 | t.Error(err) 14 | } 15 | 16 | err = CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion()+1) 17 | if err == nil { 18 | t.Error("Expected to fail when an more recent version is expected") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/widget_since_3_14.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12 2 | 3 | // See: https://developer.gnome.org/gtk3/3.14/api-index-3-14.html 4 | 5 | package gtk 6 | 7 | // #cgo pkg-config: gtk+-3.0 8 | // #include 9 | import "C" 10 | 11 | // GetClip is a wrapper around gtk_widget_get_clip(). 12 | func (v *Widget) GetClip() *Allocation { 13 | var clip Allocation 14 | C.gtk_widget_get_clip(v.native(), clip.native()) 15 | return &clip 16 | } 17 | 18 | // SetClip is a wrapper around gtk_widget_set_clip(). 19 | func (v *Widget) SetClip(clip *Allocation) { 20 | C.gtk_widget_set_clip(v.native(), clip.native()) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/window_since_3_10.go: -------------------------------------------------------------------------------- 1 | // Same copyright and license as the rest of the files in this project 2 | // This file contains accelerator related functions and structures 3 | 4 | // +build !gtk_3_6,!gtk_3_8 5 | // not use this: go build -tags gtk_3_8'. Otherwise, if no build tags are used, GTK 3.10 6 | 7 | package gtk 8 | 9 | // #cgo pkg-config: gtk+-3.0 10 | // #include 11 | // #include 12 | // #include "gtk_since_3_10.go.h" 13 | import "C" 14 | 15 | /* 16 | * GtkWindow 17 | */ 18 | 19 | // SetTitlebar is a wrapper around gtk_window_set_titlebar(). 20 | func (v *Window) SetTitlebar(titlebar IWidget) { 21 | C.gtk_window_set_titlebar(v.native(), titlebar.toWidget()) 22 | } 23 | 24 | // Close is a wrapper around gtk_window_close(). 25 | func (v *Window) Close() { 26 | C.gtk_window_close(v.native()) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/gtk/window_since_3_12.go: -------------------------------------------------------------------------------- 1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10 2 | 3 | package gtk 4 | 5 | // #cgo pkg-config: gtk+-3.0 6 | // #include 7 | import "C" 8 | 9 | // IsMaximized is a wrapper around gtk_window_is_maximized(). 10 | func (v *Window) IsMaximized() bool { 11 | c := C.gtk_window_is_maximized(v.native()) 12 | return gobool(c) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/pango/pango-attributes.go.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015- terrak 3 | * 4 | * This file originated from: http://www.terrak.net/ 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | static PangoColor* toPangoColor(void *p) 24 | { 25 | return ( (PangoColor*) (p) ); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/pango/pango-layout.go.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015- terrak 3 | * 4 | * This file originated from: http://www.terrak.net/ 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | static PangoLayout* toPangoLayout(void *p) 24 | { 25 | return ( (PangoLayout*) (p) ); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /vendor/github.com/gotk3/gotk3/pango/pangocairo.go.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/vendor/github.com/gotk3/gotk3/pango/pangocairo.go.h -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: required 4 | 5 | services: 6 | - docker 7 | 8 | go: 9 | - 1.9 10 | 11 | before_install: 12 | - docker run -d -p 5000:5000 -v $PWD/.travis/config.yaml:/home/octoprint/.octoprint/config.yaml --name octoprint octoprint/octoprint 13 | - sleep 5 14 | 15 | script: 16 | - go get -t -v ./... 17 | - go test -v ./... 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/_examples/state/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/mcuadros/go-octoprint" 8 | "github.com/mgutz/logxi/v1" 9 | ) 10 | 11 | func main() { 12 | baseURL, apiKey := os.Args[1], os.Args[2] 13 | 14 | c := octoprint.NewClient(baseURL, apiKey) 15 | printConnectionState(c) 16 | printTemperature(c) 17 | } 18 | 19 | func printConnectionState(c *octoprint.Client) { 20 | r := octoprint.ConnectionRequest{} 21 | s, err := r.Do(c) 22 | if err != nil { 23 | log.Error("error requesting connection state: %s", err) 24 | } 25 | 26 | fmt.Printf("Connection State: %q\n", s.Current.State) 27 | } 28 | 29 | func printTemperature(c *octoprint.Client) { 30 | r := octoprint.StateRequest{} 31 | s, err := r.Do(c) 32 | if err != nil { 33 | log.Error("error requesting state: %s", err) 34 | } 35 | 36 | fmt.Println("Current Temperatures:") 37 | for tool, state := range s.Temperature.Current { 38 | fmt.Printf("- %s: %.1f°C / %.1f°C\n", tool, state.Actual, state.Target) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/settings.go: -------------------------------------------------------------------------------- 1 | package octoprint 2 | 3 | import "encoding/json" 4 | 5 | const URISettings = "/api/settings" 6 | 7 | // SettingsRequest retrieves the current configuration of OctoPrint. 8 | type SettingsRequest struct{} 9 | 10 | // Do sends an API request and returns the API response. 11 | func (cmd *SettingsRequest) Do(c *Client) (*Settings, error) { 12 | b, err := c.doJSONRequest("GET", URISettings, nil, nil) 13 | if err != nil { 14 | return nil, err 15 | } 16 | 17 | r := &Settings{} 18 | if err := json.Unmarshal(b, r); err != nil { 19 | return nil, err 20 | } 21 | 22 | return r, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/settings_test.go: -------------------------------------------------------------------------------- 1 | package octoprint 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestSettingsRequest_Do(t *testing.T) { 10 | cli := NewClient("http://localhost:5000", "") 11 | 12 | r := &SettingsRequest{} 13 | settings, err := r.Do(cli) 14 | assert.NoError(t, err) 15 | 16 | assert.Equal(t, settings.API.Enabled, true) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/system_test.go: -------------------------------------------------------------------------------- 1 | package octoprint 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestSystemCommandsRequest_Do(t *testing.T) { 10 | cli := NewClient("http://localhost:5000", "") 11 | 12 | r := &SystemCommandsRequest{} 13 | state, err := r.Do(cli) 14 | assert.NoError(t, err) 15 | 16 | assert.Len(t, state.Core, 1) 17 | assert.Len(t, state.Custom, 0) 18 | assert.Equal(t, "shutdown", state.Core[0].Action) 19 | } 20 | 21 | func TestSystemExecuteCommandRequest_Do(t *testing.T) { 22 | cli := NewClient("http://localhost:5000", "") 23 | 24 | r := &SystemExecuteCommandRequest{} 25 | err := r.Do(cli) 26 | assert.Error(t, err) 27 | 28 | r = &SystemExecuteCommandRequest{Source: Core, Action: "shutdown"} 29 | err = r.Do(cli) 30 | assert.NoError(t, err) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-octoprint/version.go: -------------------------------------------------------------------------------- 1 | package octoprint 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | const URIVersion = "/api/version" 8 | 9 | // VersionRequest retrieve information regarding server and API version. 10 | type VersionRequest struct{} 11 | 12 | // Do sends an API request and returns the API response. 13 | func (cmd *VersionRequest) Do(c *Client) (*VersionResponse, error) { 14 | b, err := c.doJSONRequest("GET", URIVersion, nil, nil) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | r := &VersionResponse{} 20 | if err := json.Unmarshal(b, r); err != nil { 21 | return nil, err 22 | } 23 | 24 | return r, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | #* 3 | _obj 4 | *.tmp 5 | .idea 6 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | timezone: 3 | Asia/Tokyo 4 | pre: 5 | - sudo chown -R ubuntu:ubuntu /usr/local/go/pkg/ 6 | test: 7 | override: 8 | - GOOS=linux GOARCH=amd64 go test -v ./... 9 | - GOOS=linux GOARCH=386 go get -v ./... 10 | - GOOS=linux GOARCH=arm GOARM=7 go get -v ./... 11 | - GOOS=freebsd GOARCH=amd64 go get -v ./... 12 | - GOOS=windows GOARCH=amd64 go get -v ./... 13 | - GOOS=darwin GOARCH=amd64 go get -v ./... 14 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/coverall.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | # see http://www.songmu.jp/riji/entry/2015-01-15-goveralls-multi-package.html 4 | 5 | set -e 6 | # cleanup 7 | cleanup() { 8 | if [ $tmpprof != "" ] && [ -f $tmpprof ]; then 9 | rm -f $tmpprof 10 | fi 11 | exit 12 | } 13 | trap cleanup INT QUIT TERM EXIT 14 | 15 | # メインの処理 16 | prof=${1:-".profile.cov"} 17 | echo "mode: count" > $prof 18 | gopath1=$(echo $GOPATH | cut -d: -f1) 19 | for pkg in $(go list ./...); do 20 | tmpprof=$gopath1/src/$pkg/profile.tmp 21 | go test -covermode=count -coverprofile=$tmpprof $pkg 22 | if [ -f $tmpprof ]; then 23 | cat $tmpprof | tail -n +2 >> $prof 24 | rm $tmpprof 25 | fi 26 | done 27 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | // +build !cgo 3 | 4 | package cpu 5 | 6 | import "github.com/shirou/gopsutil/internal/common" 7 | 8 | func perCPUTimes() ([]TimesStat, error) { 9 | return []TimesStat{}, common.ErrNotImplementedError 10 | } 11 | 12 | func allCPUTimes() ([]TimesStat, error) { 13 | return []TimesStat{}, common.ErrNotImplementedError 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows 2 | 3 | package cpu 4 | 5 | import ( 6 | "github.com/shirou/gopsutil/internal/common" 7 | ) 8 | 9 | func Times(percpu bool) ([]TimesStat, error) { 10 | return []TimesStat{}, common.ErrNotImplementedError 11 | } 12 | 13 | func Info() ([]InfoStat, error) { 14 | return []InfoStat{}, common.ErrNotImplementedError 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_386.go: -------------------------------------------------------------------------------- 1 | package cpu 2 | 3 | type cpuTimes struct { 4 | User uint32 5 | Nice uint32 6 | Sys uint32 7 | Intr uint32 8 | Idle uint32 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | package cpu 2 | 3 | type cpuTimes struct { 4 | User uint64 5 | Nice uint64 6 | Sys uint64 7 | Intr uint64 8 | Idle uint64 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_test.go: -------------------------------------------------------------------------------- 1 | package cpu 2 | 3 | import ( 4 | "path/filepath" 5 | "runtime" 6 | "testing" 7 | 8 | "github.com/shirou/gopsutil/internal/common" 9 | ) 10 | 11 | func TestParseDmesgBoot(t *testing.T) { 12 | if runtime.GOOS != "freebsd" { 13 | t.SkipNow() 14 | } 15 | 16 | var cpuTests = []struct { 17 | file string 18 | cpuNum int 19 | cores int32 20 | }{ 21 | {"1cpu_2core.txt", 1, 2}, 22 | {"1cpu_4core.txt", 1, 4}, 23 | {"2cpu_4core.txt", 2, 4}, 24 | } 25 | for _, tt := range cpuTests { 26 | v, num, err := parseDmesgBoot(filepath.Join("testdata", "freebsd", tt.file)) 27 | if err != nil { 28 | t.Errorf("parseDmesgBoot failed(%s), %v", tt.file, err) 29 | } 30 | if num != tt.cpuNum { 31 | t.Errorf("parseDmesgBoot wrong length(%s), %v", tt.file, err) 32 | } 33 | if v.Cores != tt.cores { 34 | t.Errorf("parseDmesgBoot wrong core(%s), %v", tt.file, err) 35 | } 36 | if !common.StringsContains(v.Flags, "fpu") { 37 | t.Errorf("parseDmesgBoot fail to parse features(%s), %v", tt.file, err) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_linux_test.go: -------------------------------------------------------------------------------- 1 | package cpu 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | ) 7 | 8 | func TestTimesEmpty(t *testing.T) { 9 | orig := os.Getenv("HOST_PROC") 10 | os.Setenv("HOST_PROC", "testdata/linux/times_empty") 11 | _, err := Times(true) 12 | if err != nil { 13 | t.Error("Times(true) failed") 14 | } 15 | _, err = Times(false) 16 | if err != nil { 17 | t.Error("Times(false) failed") 18 | } 19 | os.Setenv("HOST_PROC", orig) 20 | } 21 | 22 | func TestCPUparseStatLine_424(t *testing.T) { 23 | orig := os.Getenv("HOST_PROC") 24 | os.Setenv("HOST_PROC", "testdata/linux/424/proc") 25 | { 26 | l, err := Times(true) 27 | if err != nil || len(l) == 0 { 28 | t.Error("Times(true) failed") 29 | } 30 | t.Logf("Times(true): %#v", l) 31 | } 32 | { 33 | l, err := Times(false) 34 | if err != nil || len(l) == 0 { 35 | t.Error("Times(false) failed") 36 | } 37 | t.Logf("Times(false): %#v", l) 38 | } 39 | os.Setenv("HOST_PROC", orig) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/linux/times_empty/proc/stat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/vendor/github.com/shirou/gopsutil/cpu/testdata/linux/times_empty/proc/stat -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/solaris/1cpu_1core_isainfo.txt: -------------------------------------------------------------------------------- 1 | 64-bit amd64 applications 2 | rdseed adx avx2 fma bmi2 bmi1 rdrand f16c vmx avx xsave pclmulqdq 3 | aes movbe sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2 sse fxsr 4 | mmx cmov amd_sysc cx8 tsc fpu -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/solaris/1cpu_1core_psrinfo.txt: -------------------------------------------------------------------------------- 1 | The physical processor has 1 virtual processor (0) 2 | x86 (GenuineIntel 406E3 family 6 model 78 step 3 clock 3312 MHz) 3 | Intel(r) Core(tm) i7-6567U CPU @ 3.30GHz -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/solaris/2cpu_1core_isainfo.txt: -------------------------------------------------------------------------------- 1 | 64-bit amd64 applications 2 | rdseed adx avx2 fma bmi2 bmi1 rdrand f16c vmx avx xsave pclmulqdq 3 | aes movbe sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2 sse fxsr 4 | mmx cmov amd_sysc cx8 tsc fpu -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/solaris/2cpu_1core_psrinfo.txt: -------------------------------------------------------------------------------- 1 | The physical processor has 1 virtual processor (0) 2 | x86 (GenuineIntel 406E3 family 6 model 78 step 3 clock 3312 MHz) 3 | Intel(r) Core(tm) i7-6567U CPU @ 3.30GHz 4 | The physical processor has 1 virtual processor (1) 5 | x86 (GenuineIntel 406E3 family 6 model 78 step 3 clock 3312 MHz) 6 | Intel(r) Core(tm) i7-6567U CPU @ 3.30GHz -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/testdata/solaris/2cpu_8core_isainfo.txt: -------------------------------------------------------------------------------- 1 | 64-bit amd64 applications 2 | vmx avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp cx16 3 | sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/disk/disk_darwin_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | // +build !cgo 3 | 4 | package disk 5 | 6 | import "github.com/shirou/gopsutil/internal/common" 7 | 8 | func IOCounters(names ...string) (map[string]IOCountersStat, error) { 9 | return nil, common.ErrNotImplementedError 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/disk/disk_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!windows,!solaris 2 | 3 | package disk 4 | 5 | import "github.com/shirou/gopsutil/internal/common" 6 | 7 | func IOCounters(names ...string) (map[string]IOCountersStat, error) { 8 | return nil, common.ErrNotImplementedError 9 | } 10 | 11 | func Partitions(all bool) ([]PartitionStat, error) { 12 | return []PartitionStat{}, common.ErrNotImplementedError 13 | } 14 | 15 | func Usage(path string) (*UsageStat, error) { 16 | return nil, common.ErrNotImplementedError 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/doc.go: -------------------------------------------------------------------------------- 1 | package gopsutil 2 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_darwin_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_darwin.go 3 | 4 | package host 5 | 6 | type Utmpx struct { 7 | User [256]int8 8 | ID [4]int8 9 | Line [32]int8 10 | Pid int32 11 | Type int16 12 | Pad_cgo_0 [6]byte 13 | Tv Timeval 14 | Host [256]int8 15 | Pad [16]uint32 16 | } 17 | type Timeval struct { 18 | Sec int32 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_darwin_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_darwin.go 3 | 4 | package host 5 | 6 | type Utmpx struct { 7 | User [256]int8 8 | ID [4]int8 9 | Line [32]int8 10 | Pid int32 11 | Type int16 12 | Pad_cgo_0 [6]byte 13 | Tv Timeval 14 | Host [256]int8 15 | Pad [16]uint32 16 | } 17 | type Timeval struct { 18 | Sec int32 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_darwin_cgo.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | // +build cgo 3 | 4 | package host 5 | 6 | // #cgo LDFLAGS: -framework IOKit 7 | // #include "include/smc.c" 8 | import "C" 9 | 10 | func SensorsTemperatures() ([]TemperatureStat, error) { 11 | temperatureKeys := []string{ 12 | C.AMBIENT_AIR_0, 13 | C.AMBIENT_AIR_1, 14 | C.CPU_0_DIODE, 15 | C.CPU_0_HEATSINK, 16 | C.CPU_0_PROXIMITY, 17 | C.ENCLOSURE_BASE_0, 18 | C.ENCLOSURE_BASE_1, 19 | C.ENCLOSURE_BASE_2, 20 | C.ENCLOSURE_BASE_3, 21 | C.GPU_0_DIODE, 22 | C.GPU_0_HEATSINK, 23 | C.GPU_0_PROXIMITY, 24 | C.HARD_DRIVE_BAY, 25 | C.MEMORY_SLOT_0, 26 | C.MEMORY_SLOTS_PROXIMITY, 27 | C.NORTHBRIDGE, 28 | C.NORTHBRIDGE_DIODE, 29 | C.NORTHBRIDGE_PROXIMITY, 30 | C.THUNDERBOLT_0, 31 | C.THUNDERBOLT_1, 32 | C.WIRELESS_MODULE, 33 | } 34 | var temperatures []TemperatureStat 35 | 36 | C.open_smc() 37 | defer C.close_smc() 38 | 39 | for _, key := range temperatureKeys { 40 | temperatures = append(temperatures, TemperatureStat{ 41 | SensorKey: key, 42 | Temperature: float64(C.get_tmp(C.CString(key), C.CELSIUS)), 43 | }) 44 | } 45 | return temperatures, nil 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_darwin_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | // +build !cgo 3 | 4 | package host 5 | 6 | import "github.com/shirou/gopsutil/internal/common" 7 | 8 | func SensorsTemperatures() ([]TemperatureStat, error) { 9 | return []TemperatureStat{}, common.ErrNotImplementedError 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows 2 | 3 | package host 4 | 5 | import "github.com/shirou/gopsutil/internal/common" 6 | 7 | func Info() (*InfoStat, error) { 8 | return nil, common.ErrNotImplementedError 9 | } 10 | 11 | func BootTime() (uint64, error) { 12 | return 0, common.ErrNotImplementedError 13 | } 14 | 15 | func Uptime() (uint64, error) { 16 | return 0, common.ErrNotImplementedError 17 | } 18 | 19 | func Users() ([]UserStat, error) { 20 | return []UserStat{}, common.ErrNotImplementedError 21 | } 22 | 23 | func Virtualization() (string, string, error) { 24 | return "", "", common.ErrNotImplementedError 25 | } 26 | 27 | func KernelVersion() (string, error) { 28 | return "", common.ErrNotImplementedError 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x4 11 | sizeofLongLong = 0x8 12 | sizeOfUtmpx = 197 // TODO why should 197 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [16]int8 25 | Host [16]int8 26 | Time int32 27 | } 28 | 29 | type Utmpx struct { 30 | Type int16 31 | Tv Timeval 32 | Id [8]int8 33 | Pid int32 34 | User [32]int8 35 | Line [16]int8 36 | Host [125]int8 37 | // X__ut_spare [64]int8 38 | } 39 | 40 | type Timeval struct { 41 | Sec [4]byte 42 | Usec [3]byte 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x8 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmpx = 197 // TODO: why should 197, not 0x118 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int64 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [16]int8 25 | Host [16]int8 26 | Time int32 27 | } 28 | 29 | type Utmpx struct { 30 | Type int16 31 | Tv Timeval 32 | Id [8]int8 33 | Pid int32 34 | User [32]int8 35 | Line [16]int8 36 | Host [125]int8 37 | // Host [128]int8 38 | // X__ut_spare [64]int8 39 | } 40 | 41 | type Timeval struct { 42 | Sec [4]byte 43 | Usec [3]byte 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmpx = 197 // TODO: why should 197, not 0x118 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [16]int8 25 | Host [16]int8 26 | Time int32 27 | } 28 | 29 | type Utmpx struct { 30 | Type int16 31 | Tv Timeval 32 | Id [8]int8 33 | Pid int32 34 | User [32]int8 35 | Line [16]int8 36 | Host [125]int8 37 | // Host [128]int8 38 | // X__ut_spare [64]int8 39 | } 40 | 41 | type Timeval struct { 42 | Sec [4]byte 43 | Usec [3]byte 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_386.go: -------------------------------------------------------------------------------- 1 | // ATTENTION - FILE MANUAL FIXED AFTER CGO. 2 | // Fixed line: Tv _Ctype_struct_timeval -> Tv UtTv 3 | // Created by cgo -godefs, MANUAL FIXED 4 | // cgo -godefs types_linux.go 5 | 6 | package host 7 | 8 | const ( 9 | sizeofPtr = 0x4 10 | sizeofShort = 0x2 11 | sizeofInt = 0x4 12 | sizeofLong = 0x4 13 | sizeofLongLong = 0x8 14 | sizeOfUtmp = 0x180 15 | ) 16 | 17 | type ( 18 | _C_short int16 19 | _C_int int32 20 | _C_long int32 21 | _C_long_long int64 22 | ) 23 | 24 | type utmp struct { 25 | Type int16 26 | Pad_cgo_0 [2]byte 27 | Pid int32 28 | Line [32]int8 29 | ID [4]int8 30 | User [32]int8 31 | Host [256]int8 32 | Exit exit_status 33 | Session int32 34 | Tv UtTv 35 | Addr_v6 [4]int32 36 | X__unused [20]int8 37 | } 38 | type exit_status struct { 39 | Termination int16 40 | Exit int16 41 | } 42 | type UtTv struct { 43 | Sec int32 44 | Usec int32 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_linux.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x8 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x180 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int64 19 | _C_long_long int64 20 | ) 21 | 22 | type utmp struct { 23 | Type int16 24 | Pad_cgo_0 [2]byte 25 | Pid int32 26 | Line [32]int8 27 | Id [4]int8 28 | User [32]int8 29 | Host [256]int8 30 | Exit exit_status 31 | Session int32 32 | Tv _Ctype_struct___0 33 | Addr_v6 [4]int32 34 | X__glibc_reserved [20]int8 35 | } 36 | type exit_status struct { 37 | Termination int16 38 | Exit int16 39 | } 40 | type timeval struct { 41 | Sec int64 42 | Usec int64 43 | } 44 | 45 | type _Ctype_struct___0 struct { 46 | Sec int32 47 | Usec int32 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_linux.go | sed "s/uint8/int8/g" 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x4 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x180 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type utmp struct { 23 | Type int16 24 | Pad_cgo_0 [2]byte 25 | Pid int32 26 | Line [32]int8 27 | Id [4]int8 28 | User [32]int8 29 | Host [256]int8 30 | Exit exit_status 31 | Session int32 32 | Tv timeval 33 | Addr_v6 [4]int32 34 | X__glibc_reserved [20]int8 35 | } 36 | type exit_status struct { 37 | Termination int16 38 | Exit int16 39 | } 40 | type timeval struct { 41 | Sec int32 42 | Usec int32 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_linux.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x8 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x180 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int64 19 | _C_long_long int64 20 | ) 21 | 22 | type utmp struct { 23 | Type int16 24 | Pad_cgo_0 [2]byte 25 | Pid int32 26 | Line [32]int8 27 | Id [4]int8 28 | User [32]int8 29 | Host [256]int8 30 | Exit exit_status 31 | Session int32 32 | Tv timeval 33 | Addr_v6 [4]int32 34 | X__glibc_reserved [20]int8 35 | } 36 | type exit_status struct { 37 | Termination int16 38 | Exit int16 39 | } 40 | type timeval struct { 41 | Sec int64 42 | Usec int64 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_mips.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_linux.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x4 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x180 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type utmp struct { 23 | Type int16 24 | Pad_cgo_0 [2]byte 25 | Pid int32 26 | Line [32]int8 27 | Id [4]int8 28 | User [32]int8 29 | Host [256]int8 30 | Exit exit_status 31 | Session int32 32 | Tv timeval 33 | Addr_v6 [4]int32 34 | X__unused [20]int8 35 | } 36 | type exit_status struct { 37 | Termination int16 38 | Exit int16 39 | } 40 | type timeval struct { 41 | Sec int32 42 | Usec int32 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_mipsle.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_linux.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x4 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x180 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type utmp struct { 23 | Type int16 24 | Pad_cgo_0 [2]byte 25 | Pid int32 26 | Line [32]int8 27 | Id [4]int8 28 | User [32]int8 29 | Host [256]int8 30 | Exit exit_status 31 | Session int32 32 | Tv timeval 33 | Addr_v6 [4]int32 34 | X__unused [20]int8 35 | } 36 | type exit_status struct { 37 | Termination int16 38 | Exit int16 39 | } 40 | type timeval struct { 41 | Sec int32 42 | Usec int32 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build ppc64le 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types_linux.go 5 | 6 | package host 7 | 8 | const ( 9 | sizeofPtr = 0x8 10 | sizeofShort = 0x2 11 | sizeofInt = 0x4 12 | sizeofLong = 0x8 13 | sizeofLongLong = 0x8 14 | sizeOfUtmp = 0x180 15 | ) 16 | 17 | type ( 18 | _C_short int16 19 | _C_int int32 20 | _C_long int64 21 | _C_long_long int64 22 | ) 23 | 24 | type utmp struct { 25 | Type int16 26 | Pad_cgo_0 [2]byte 27 | Pid int32 28 | Line [32]int8 29 | Id [4]int8 30 | User [32]int8 31 | Host [256]int8 32 | Exit exit_status 33 | Session int32 34 | Tv timeval 35 | Addr_v6 [4]int32 36 | X__glibc_reserved [20]int8 37 | } 38 | type exit_status struct { 39 | Termination int16 40 | Exit int16 41 | } 42 | type timeval struct { 43 | Sec int64 44 | Usec int64 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build s390x 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types_linux.go 5 | 6 | package host 7 | 8 | const ( 9 | sizeofPtr = 0x8 10 | sizeofShort = 0x2 11 | sizeofInt = 0x4 12 | sizeofLong = 0x8 13 | sizeofLongLong = 0x8 14 | sizeOfUtmp = 0x180 15 | ) 16 | 17 | type ( 18 | _C_short int16 19 | _C_int int32 20 | _C_long int64 21 | _C_long_long int64 22 | ) 23 | 24 | type utmp struct { 25 | Type int16 26 | Pad_cgo_0 [2]byte 27 | Pid int32 28 | Line [32]int8 29 | Id [4]int8 30 | User [32]int8 31 | Host [256]int8 32 | Exit exit_status 33 | Session int32 34 | Tv timeval 35 | Addr_v6 [4]int32 36 | X__glibc_reserved [20]int8 37 | } 38 | type exit_status struct { 39 | Termination int16 40 | Exit int16 41 | } 42 | type timeval struct { 43 | Sec int64 44 | Usec int64 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_openbsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x8 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmp = 0x130 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int64 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [32]int8 25 | Host [256]int8 26 | Time int64 27 | } 28 | type Timeval struct { 29 | Sec int64 30 | Usec int64 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_darwin.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | // plus hand editing about timeval 3 | 4 | /* 5 | Input to cgo -godefs. 6 | */ 7 | 8 | package host 9 | 10 | /* 11 | #include 12 | #include 13 | */ 14 | import "C" 15 | 16 | type Utmpx C.struct_utmpx 17 | type Timeval C.struct_timeval 18 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package host 8 | 9 | /* 10 | #define KERNEL 11 | #include 12 | #include 13 | #include 14 | 15 | enum { 16 | sizeofPtr = sizeof(void*), 17 | }; 18 | 19 | */ 20 | import "C" 21 | 22 | // Machine characteristics; for internal use. 23 | 24 | const ( 25 | sizeofPtr = C.sizeofPtr 26 | sizeofShort = C.sizeof_short 27 | sizeofInt = C.sizeof_int 28 | sizeofLong = C.sizeof_long 29 | sizeofLongLong = C.sizeof_longlong 30 | sizeOfUtmpx = C.sizeof_struct_utmpx 31 | ) 32 | 33 | // Basic types 34 | 35 | type ( 36 | _C_short C.short 37 | _C_int C.int 38 | _C_long C.long 39 | _C_long_long C.longlong 40 | ) 41 | 42 | type Utmp C.struct_utmp 43 | type Utmpx C.struct_utmpx 44 | type Timeval C.struct_timeval 45 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_linux.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package host 8 | 9 | /* 10 | #include 11 | #include 12 | 13 | enum { 14 | sizeofPtr = sizeof(void*), 15 | }; 16 | 17 | */ 18 | import "C" 19 | 20 | // Machine characteristics; for internal use. 21 | 22 | const ( 23 | sizeofPtr = C.sizeofPtr 24 | sizeofShort = C.sizeof_short 25 | sizeofInt = C.sizeof_int 26 | sizeofLong = C.sizeof_long 27 | sizeofLongLong = C.sizeof_longlong 28 | sizeOfUtmp = C.sizeof_struct_utmp 29 | ) 30 | 31 | // Basic types 32 | 33 | type ( 34 | _C_short C.short 35 | _C_int C.int 36 | _C_long C.long 37 | _C_long_long C.longlong 38 | ) 39 | 40 | type utmp C.struct_utmp 41 | type exit_status C.struct_exit_status 42 | type timeval C.struct_timeval 43 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_openbsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package host 8 | 9 | /* 10 | #define KERNEL 11 | #include 12 | #include 13 | #include 14 | 15 | enum { 16 | sizeofPtr = sizeof(void*), 17 | }; 18 | 19 | */ 20 | import "C" 21 | 22 | // Machine characteristics; for internal use. 23 | 24 | const ( 25 | sizeofPtr = C.sizeofPtr 26 | sizeofShort = C.sizeof_short 27 | sizeofInt = C.sizeof_int 28 | sizeofLong = C.sizeof_long 29 | sizeofLongLong = C.sizeof_longlong 30 | sizeOfUtmp = C.sizeof_struct_utmp 31 | ) 32 | 33 | // Basic types 34 | 35 | type ( 36 | _C_short C.short 37 | _C_int C.int 38 | _C_long C.long 39 | _C_long_long C.longlong 40 | ) 41 | 42 | type Utmp C.struct_utmp 43 | type Timeval C.struct_timeval 44 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/internal/common/common_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package common 4 | 5 | import ( 6 | "os" 7 | "os/exec" 8 | "strings" 9 | ) 10 | 11 | func DoSysctrl(mib string) ([]string, error) { 12 | sysctl, err := exec.LookPath("/sbin/sysctl") 13 | if err != nil { 14 | return []string{}, err 15 | } 16 | cmd := exec.Command(sysctl, "-n", mib) 17 | cmd.Env = getSysctrlEnv(os.Environ()) 18 | out, err := cmd.Output() 19 | if err != nil { 20 | return []string{}, err 21 | } 22 | v := strings.Replace(string(out), "{ ", "", 1) 23 | v = strings.Replace(string(v), " }", "", 1) 24 | values := strings.Fields(string(v)) 25 | 26 | return values, nil 27 | } 28 | 29 | func NumProcs() (uint64, error) { 30 | f, err := os.Open(HostProc()) 31 | if err != nil { 32 | return 0, err 33 | } 34 | defer f.Close() 35 | 36 | list, err := f.Readdirnames(-1) 37 | if err != nil { 38 | return 0, err 39 | } 40 | return uint64(len(list)), err 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/load/load.go: -------------------------------------------------------------------------------- 1 | package load 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/shirou/gopsutil/internal/common" 7 | ) 8 | 9 | var invoke common.Invoker 10 | 11 | func init() { 12 | invoke = common.Invoke{} 13 | } 14 | 15 | type AvgStat struct { 16 | Load1 float64 `json:"load1"` 17 | Load5 float64 `json:"load5"` 18 | Load15 float64 `json:"load15"` 19 | } 20 | 21 | func (l AvgStat) String() string { 22 | s, _ := json.Marshal(l) 23 | return string(s) 24 | } 25 | 26 | type MiscStat struct { 27 | ProcsRunning int `json:"procsRunning"` 28 | ProcsBlocked int `json:"procsBlocked"` 29 | Ctxt int `json:"ctxt"` 30 | } 31 | 32 | func (m MiscStat) String() string { 33 | s, _ := json.Marshal(m) 34 | return string(s) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/load/load_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!windows 2 | 3 | package load 4 | 5 | import "github.com/shirou/gopsutil/internal/common" 6 | 7 | func Avg() (*AvgStat, error) { 8 | return nil, common.ErrNotImplementedError 9 | } 10 | 11 | func Misc() (*MiscStat, error) { 12 | return nil, common.ErrNotImplementedError 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/load/load_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package load 4 | 5 | import ( 6 | "github.com/shirou/gopsutil/internal/common" 7 | ) 8 | 9 | func Avg() (*AvgStat, error) { 10 | ret := AvgStat{} 11 | 12 | return &ret, common.ErrNotImplementedError 13 | } 14 | 15 | func Misc() (*MiscStat, error) { 16 | ret := MiscStat{} 17 | 18 | return &ret, common.ErrNotImplementedError 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/mem/mem_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows 2 | 3 | package mem 4 | 5 | import "github.com/shirou/gopsutil/internal/common" 6 | 7 | func VirtualMemory() (*VirtualMemoryStat, error) { 8 | return nil, common.ErrNotImplementedError 9 | } 10 | 11 | func SwapMemory() (*SwapMemoryStat, error) { 12 | return nil, common.ErrNotImplementedError 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/mem/types_openbsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package mem 8 | 9 | /* 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | */ 16 | import "C" 17 | 18 | // Machine characteristics; for internal use. 19 | 20 | const ( 21 | CTLVm = 2 22 | CTLVfs = 10 23 | VmUvmexp = 4 // get uvmexp 24 | VfsGeneric = 0 25 | VfsBcacheStat = 3 26 | ) 27 | 28 | const ( 29 | sizeOfUvmexp = C.sizeof_struct_uvmexp 30 | sizeOfBcachestats = C.sizeof_struct_bcachestats 31 | ) 32 | 33 | type Uvmexp C.struct_uvmexp 34 | type Bcachestats C.struct_bcachestats 35 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/mktypes.sh: -------------------------------------------------------------------------------- 1 | 2 | DIRS="cpu disk docker host load mem net process" 3 | 4 | GOOS=`uname | tr '[:upper:]' '[:lower:]'` 5 | ARCH=`uname -m` 6 | 7 | case $ARCH in 8 | amd64) 9 | GOARCH="amd64" 10 | ;; 11 | x86_64) 12 | GOARCH="amd64" 13 | ;; 14 | i386) 15 | GOARCH="386" 16 | ;; 17 | i686) 18 | GOARCH="386" 19 | ;; 20 | arm) 21 | GOARCH="arm" 22 | ;; 23 | *) 24 | echo "unknown arch: $ARCH" 25 | exit 1 26 | esac 27 | 28 | for DIR in $DIRS 29 | do 30 | if [ -e ${DIR}/types_${GOOS}.go ]; then 31 | echo "// +build $GOOS" > ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 32 | echo "// +build $GOARCH" >> ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 33 | go tool cgo -godefs ${DIR}/types_${GOOS}.go >> ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 34 | fi 35 | done 36 | 37 | 38 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/net/net_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux,!freebsd,!openbsd,!windows 2 | 3 | package net 4 | 5 | import "github.com/shirou/gopsutil/internal/common" 6 | 7 | func IOCounters(pernic bool) ([]IOCountersStat, error) { 8 | return []IOCountersStat{}, common.ErrNotImplementedError 9 | } 10 | 11 | func FilterCounters() ([]FilterStat, error) { 12 | return []FilterStat{}, common.ErrNotImplementedError 13 | } 14 | 15 | func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) { 16 | return []ProtoCountersStat{}, common.ErrNotImplementedError 17 | } 18 | 19 | func Connections(kind string) ([]ConnectionStat, error) { 20 | return []ConnectionStat{}, common.ErrNotImplementedError 21 | } 22 | 23 | func ConnectionsMax(kind string, max int) ([]ConnectionStat, error) { 24 | return []ConnectionStat{}, common.ErrNotImplementedError 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_posix_test.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package process 4 | 5 | import ( 6 | "os" 7 | "testing" 8 | 9 | "golang.org/x/sys/unix" 10 | ) 11 | 12 | func Test_SendSignal(t *testing.T) { 13 | checkPid := os.Getpid() 14 | 15 | p, _ := NewProcess(int32(checkPid)) 16 | err := p.SendSignal(unix.SIGCONT) 17 | if err != nil { 18 | t.Errorf("send signal %v", err) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_windows_386.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package process 4 | 5 | type PROCESS_MEMORY_COUNTERS struct { 6 | CB uint32 7 | PageFaultCount uint32 8 | PeakWorkingSetSize uint32 9 | WorkingSetSize uint32 10 | QuotaPeakPagedPoolUsage uint32 11 | QuotaPagedPoolUsage uint32 12 | QuotaPeakNonPagedPoolUsage uint32 13 | QuotaNonPagedPoolUsage uint32 14 | PagefileUsage uint32 15 | PeakPagefileUsage uint32 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package process 4 | 5 | type PROCESS_MEMORY_COUNTERS struct { 6 | CB uint32 7 | PageFaultCount uint32 8 | PeakWorkingSetSize uint64 9 | WorkingSetSize uint64 10 | QuotaPeakPagedPoolUsage uint64 11 | QuotaPagedPoolUsage uint64 12 | QuotaPeakNonPagedPoolUsage uint64 13 | QuotaNonPagedPoolUsage uint64 14 | PagefileUsage uint64 15 | PeakPagefileUsage uint64 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/testdata/darwin/ps-ax-opid_fail: -------------------------------------------------------------------------------- 1 | PID 2 | 245 3 | 247 4 | 248 5 | 249 6 | 254 7 | 262 8 | 264 9 | 265 10 | 267 11 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/windows_memo.rst: -------------------------------------------------------------------------------- 1 | Windows memo 2 | ===================== 3 | 4 | Size 5 | ---------- 6 | 7 | DWORD 8 | 32-bit unsigned integer 9 | DWORDLONG 10 | 64-bit unsigned integer 11 | DWORD_PTR 12 | unsigned long type for pointer precision 13 | DWORD32 14 | 32-bit unsigned integer 15 | DWORD64 16 | 64-bit unsigned integer 17 | HALF_PTR 18 | _WIN64 = int, else short 19 | INT 20 | 32-bit signed integer 21 | INT_PTR 22 | _WIN64 = __int64 else int 23 | LONG 24 | 32-bit signed integer 25 | LONGLONG 26 | 64-bit signed integer 27 | LONG_PTR 28 | _WIN64 = __int64 else long 29 | SHORT 30 | 16-bit integer 31 | SIZE_T 32 | maximum number of bytes to which a pointer can point. typedef ULONG_PTR SIZE_T; 33 | SSIZE_T 34 | signed version of SIZE_T. typedef LONG_PTR SSIZE_T; 35 | WORD 36 | 16-bit unsigned integer -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.6.x 4 | - 1.7.x 5 | - 1.8.x 6 | - tip 7 | env: 8 | - GOMAXPROCS=4 GORACE=halt_on_error=1 9 | install: 10 | - go get github.com/stretchr/testify/assert 11 | - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2 12 | - go get golang.org/x/sys/unix 13 | - go get golang.org/x/sys/windows 14 | script: 15 | - go test -race -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/sirupsen/logrus" 9 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | 22 | If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. 23 | 24 | ```go 25 | import ( 26 | "log/syslog" 27 | "github.com/sirupsen/logrus" 28 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 29 | ) 30 | 31 | func main() { 32 | log := logrus.New() 33 | hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "") 34 | 35 | if err == nil { 36 | log.Hooks.Add(hook) 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package syslog 2 | 3 | import ( 4 | "log/syslog" 5 | "testing" 6 | 7 | "github.com/sirupsen/logrus" 8 | ) 9 | 10 | func TestLocalhostAddAndPrint(t *testing.T) { 11 | log := logrus.New() 12 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 13 | 14 | if err != nil { 15 | t.Errorf("Unable to connect to local syslog.") 16 | } 17 | 18 | log.Hooks.Add(hook) 19 | 20 | for _, level := range hook.Levels() { 21 | if len(log.Hooks[level]) != 1 { 22 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 23 | } 24 | } 25 | 26 | log.Info("Congratulations!") 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/test/test_test.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/sirupsen/logrus" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestAllHooks(t *testing.T) { 11 | 12 | assert := assert.New(t) 13 | 14 | logger, hook := NewNullLogger() 15 | assert.Nil(hook.LastEntry()) 16 | assert.Equal(0, len(hook.Entries)) 17 | 18 | logger.Error("Hello error") 19 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) 20 | assert.Equal("Hello error", hook.LastEntry().Message) 21 | assert.Equal(1, len(hook.Entries)) 22 | 23 | logger.Warn("Hello warning") 24 | assert.Equal(logrus.WarnLevel, hook.LastEntry().Level) 25 | assert.Equal("Hello warning", hook.LastEntry().Message) 26 | assert.Equal(2, len(hook.Entries)) 27 | 28 | hook.Reset() 29 | assert.Nil(hook.LastEntry()) 30 | assert.Equal(0, len(hook.Entries)) 31 | 32 | hook = NewGlobal() 33 | 34 | logrus.Error("Hello error") 35 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) 36 | assert.Equal("Hello error", hook.LastEntry().Message) 37 | assert.Equal(1, len(hook.Entries)) 38 | 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/README.md: -------------------------------------------------------------------------------- 1 | # Go Cryptography 2 | 3 | This repository holds supplementary Go cryptography libraries. 4 | 5 | ## Download/Install 6 | 7 | The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You 8 | can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. 9 | 10 | ## Report Issues / Send Patches 11 | 12 | This repository uses Gerrit for code changes. To learn how to submit changes to 13 | this repository, see https://golang.org/doc/contribute.html. 14 | 15 | The main issue tracker for the crypto repository is located at 16 | https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the 17 | subject line, so it is easy to find. 18 | 19 | Note that contributions to the cryptography package receive additional scrutiny 20 | due to their sensitive nature. Patches may take longer than normal to receive 21 | feedback. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/acme/autocert/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package autocert_test 6 | 7 | import ( 8 | "crypto/tls" 9 | "fmt" 10 | "log" 11 | "net/http" 12 | 13 | "golang.org/x/crypto/acme/autocert" 14 | ) 15 | 16 | func ExampleNewListener() { 17 | mux := http.NewServeMux() 18 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 19 | fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS) 20 | }) 21 | log.Fatal(http.Serve(autocert.NewListener("example.com"), mux)) 22 | } 23 | 24 | func ExampleManager() { 25 | m := autocert.Manager{ 26 | Cache: autocert.DirCache("secret-dir"), 27 | Prompt: autocert.AcceptTOS, 28 | HostPolicy: autocert.HostWhitelist("example.org"), 29 | } 30 | s := &http.Server{ 31 | Addr: ":https", 32 | TLSConfig: &tls.Config{GetCertificate: m.GetCertificate}, 33 | } 34 | s.ListenAndServeTLS("", "") 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/argon2/blamka_ref.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 !amd64 appengine gccgo 6 | 7 | package argon2 8 | 9 | func processBlock(out, in1, in2 *block) { 10 | processBlockGeneric(out, in1, in2, false) 11 | } 12 | 13 | func processBlockXOR(out, in1, in2 *block) { 14 | processBlockGeneric(out, in1, in2, true) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_amd64.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.7,amd64,!gccgo,!appengine 6 | 7 | package blake2b 8 | 9 | func init() { 10 | useSSE4 = supportsSSE4() 11 | } 12 | 13 | //go:noescape 14 | func supportsSSE4() bool 15 | 16 | //go:noescape 17 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 18 | 19 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 20 | if useSSE4 { 21 | hashBlocksSSE4(h, c, flag, blocks) 22 | } else { 23 | hashBlocksGeneric(h, c, flag, blocks) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_ref.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 appengine gccgo 6 | 7 | package blake2b 8 | 9 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 10 | hashBlocksGeneric(h, c, flag, blocks) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/register.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 blake2b 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | newHash384 := func() hash.Hash { 20 | h, _ := New384(nil) 21 | return h 22 | } 23 | 24 | newHash512 := func() hash.Hash { 25 | h, _ := New512(nil) 26 | return h 27 | } 28 | 29 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) 30 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) 31 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_386.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,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = false 11 | useSSSE3 = supportSSSE3() 12 | useSSE2 = supportSSE2() 13 | ) 14 | 15 | //go:noescape 16 | func supportSSE2() bool 17 | 18 | //go:noescape 19 | func supportSSSE3() bool 20 | 21 | //go:noescape 22 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 23 | 24 | //go:noescape 25 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 26 | 27 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 28 | if useSSSE3 { 29 | hashBlocksSSSE3(h, c, flag, blocks) 30 | } else if useSSE2 { 31 | hashBlocksSSE2(h, c, flag, blocks) 32 | } else { 33 | hashBlocksGeneric(h, c, flag, blocks) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_amd64.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,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = supportSSE4() 11 | useSSSE3 = supportSSSE3() 12 | useSSE2 = true // Always available on amd64 13 | ) 14 | 15 | //go:noescape 16 | func supportSSSE3() bool 17 | 18 | //go:noescape 19 | func supportSSE4() bool 20 | 21 | //go:noescape 22 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 23 | 24 | //go:noescape 25 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 26 | 27 | //go:noescape 28 | func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 29 | 30 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 31 | if useSSE4 { 32 | hashBlocksSSE4(h, c, flag, blocks) 33 | } else if useSSSE3 { 34 | hashBlocksSSSE3(h, c, flag, blocks) 35 | } else if useSSE2 { 36 | hashBlocksSSE2(h, c, flag, blocks) 37 | } else { 38 | hashBlocksGeneric(h, c, flag, blocks) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_ref.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,!386 gccgo appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = false 11 | useSSSE3 = false 12 | useSSE2 = false 13 | ) 14 | 15 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 16 | hashBlocksGeneric(h, c, flag, blocks) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/register.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 blake2s 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | 20 | crypto.RegisterHash(crypto.BLAKE2s_256, newHash256) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.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 !go1.7 gccgo appengine 6 | 7 | package chacha20poly1305 8 | 9 | func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte { 10 | return c.sealGeneric(dst, nonce, plaintext, additionalData) 11 | } 12 | 13 | func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { 14 | return c.openGeneric(dst, nonce, ciphertext, additionalData) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.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 | package chacha20 6 | 7 | import ( 8 | "encoding/hex" 9 | "testing" 10 | ) 11 | 12 | func TestCore(t *testing.T) { 13 | // This is just a smoke test that checks the example from 14 | // https://tools.ietf.org/html/rfc7539#section-2.3.2. The 15 | // chacha20poly1305 package contains much more extensive tests of this 16 | // code. 17 | var key [32]byte 18 | for i := range key { 19 | key[i] = byte(i) 20 | } 21 | 22 | var input [16]byte 23 | input[0] = 1 24 | input[7] = 9 25 | input[11] = 0x4a 26 | 27 | var out [64]byte 28 | XORKeyStream(out[:], out[:], &input, &key) 29 | const expected = "10f1e7e4d13b5915500fdd1fa32071c4c7d1f4c733c068030422aa9ac3d46c4ed2826446079faa0914c2d705d98b02a2b5129cd1de164eb9cbd083e8a2503c4e" 30 | if result := hex.EncodeToString(out[:]); result != expected { 31 | t.Errorf("wanted %x but got %x", expected, result) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.h: -------------------------------------------------------------------------------- 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 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | #define REDMASK51 0x0007FFFFFFFFFFFF 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.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 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | // These constants cannot be encoded in non-MOVQ immediates. 11 | // We access them directly from memory instead. 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/curve25519_test.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 | package curve25519 6 | 7 | import ( 8 | "fmt" 9 | "testing" 10 | ) 11 | 12 | const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a" 13 | 14 | func TestBaseScalarMult(t *testing.T) { 15 | var a, b [32]byte 16 | in := &a 17 | out := &b 18 | a[0] = 1 19 | 20 | for i := 0; i < 200; i++ { 21 | ScalarBaseMult(out, in) 22 | in, out = out, in 23 | } 24 | 25 | result := fmt.Sprintf("%x", in[:]) 26 | if result != expectedHex { 27 | t.Errorf("incorrect result: got %s, want %s", result, expectedHex) 28 | } 29 | } 30 | 31 | func BenchmarkScalarBaseMult(b *testing.B) { 32 | var in, out [32]byte 33 | in[0] = 1 34 | 35 | b.SetBytes(32) 36 | for i := 0; i < b.N; i++ { 37 | ScalarBaseMult(&out, &in) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/doc.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 | // Package curve25519 provides an implementation of scalar multiplication on 6 | // the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html 7 | package curve25519 // import "golang.org/x/crypto/curve25519" 8 | 9 | // basePoint is the x coordinate of the generator of the curve. 10 | var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} 11 | 12 | // ScalarMult sets dst to the product in*base where dst and base are the x 13 | // coordinates of group points and all values are in little-endian form. 14 | func ScalarMult(dst, in, base *[32]byte) { 15 | scalarMult(dst, in, base) 16 | } 17 | 18 | // ScalarBaseMult sets dst to the product in*base where dst and base are the x 19 | // coordinates of group points, base is the standard generator and all values 20 | // are in little-endian form. 21 | func ScalarBaseMult(dst, in *[32]byte) { 22 | ScalarMult(dst, in, &basePoint) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/md4/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package md4_test 6 | 7 | import ( 8 | "fmt" 9 | "io" 10 | 11 | "golang.org/x/crypto/md4" 12 | ) 13 | 14 | func ExampleNew() { 15 | h := md4.New() 16 | data := "These pretzels are making me thirsty." 17 | io.WriteString(h, data) 18 | fmt.Printf("%x", h.Sum(nil)) 19 | // Output: 48c4e365090b30a32f084c4888deceaa 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/openpgp/packet/compressed_test.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 packet 6 | 7 | import ( 8 | "bytes" 9 | "encoding/hex" 10 | "io" 11 | "io/ioutil" 12 | "testing" 13 | ) 14 | 15 | func TestCompressed(t *testing.T) { 16 | packet, err := Read(readerFromHex(compressedHex)) 17 | if err != nil { 18 | t.Errorf("failed to read Compressed: %s", err) 19 | return 20 | } 21 | 22 | c, ok := packet.(*Compressed) 23 | if !ok { 24 | t.Error("didn't find Compressed packet") 25 | return 26 | } 27 | 28 | contents, err := ioutil.ReadAll(c.Body) 29 | if err != nil && err != io.EOF { 30 | t.Error(err) 31 | return 32 | } 33 | 34 | expected, _ := hex.DecodeString(compressedExpectedHex) 35 | if !bytes.Equal(expected, contents) { 36 | t.Errorf("got:%x want:%x", contents, expected) 37 | } 38 | } 39 | 40 | const compressedHex = "a3013b2d90c4e02b72e25f727e5e496a5e49b11e1700" 41 | const compressedExpectedHex = "cb1062004d14c8fe636f6e74656e74732e0a" 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/errors.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 pkcs12 6 | 7 | import "errors" 8 | 9 | var ( 10 | // ErrDecryption represents a failure to decrypt the input. 11 | ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") 12 | 13 | // ErrIncorrectPassword is returned when an incorrect password is detected. 14 | // Usually, P12/PFX data is signed to be able to verify the password. 15 | ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") 16 | ) 17 | 18 | // NotImplementedError indicates that the input is not currently supported. 19 | type NotImplementedError string 20 | 21 | func (e NotImplementedError) Error() string { 22 | return "pkcs12: " + string(e) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package rc2 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func BenchmarkEncrypt(b *testing.B) { 12 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 13 | b.ResetTimer() 14 | var src [8]byte 15 | for i := 0; i < b.N; i++ { 16 | r.Encrypt(src[:], src[:]) 17 | } 18 | } 19 | 20 | func BenchmarkDecrypt(b *testing.B) { 21 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 22 | b.ResetTimer() 23 | var src [8]byte 24 | for i := 0; i < b.N; i++ { 25 | r.Decrypt(src[:], src[:]) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_amd64.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 amd64,!gccgo,!appengine 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_amd64.s 10 | //go:noescape 11 | func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305(out, mPtr, uint64(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_arm.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 arm,!gccgo,!appengine,!nacl 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_arm.s 10 | //go:noescape 11 | func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.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 amd64,!appengine,!gccgo 6 | 7 | package salsa 8 | 9 | // This function is implemented in salsa2020_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out must overlap entirely or not at all. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | _ = out[len(in)-1] 23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/scrypt/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scrypt_test 6 | 7 | import ( 8 | "encoding/base64" 9 | "fmt" 10 | "log" 11 | 12 | "golang.org/x/crypto/scrypt" 13 | ) 14 | 15 | func Example() { 16 | // DO NOT use this salt value; generate your own random salt. 8 bytes is 17 | // a good length. 18 | salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b} 19 | 20 | dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32) 21 | if err != nil { 22 | log.Fatal(err) 23 | } 24 | fmt.Println(base64.StdEncoding.EncodeToString(dk)) 25 | // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M= 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/keccakf_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 amd64,!appengine,!gccgo 6 | 7 | package sha3 8 | 9 | // This function is implemented in keccakf_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func keccakF1600(a *[25]uint64) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package sha3 8 | 9 | import ( 10 | "crypto" 11 | ) 12 | 13 | func init() { 14 | crypto.RegisterHash(crypto.SHA3_224, New224) 15 | crypto.RegisterHash(crypto.SHA3_256, New256) 16 | crypto.RegisterHash(crypto.SHA3_384, New384) 17 | crypto.RegisterHash(crypto.SHA3_512, New512) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darksid3r/OctoPrint-TFT/dbc3bc02a5e79e15dd2e7cd8e4a92cdce7284ed8/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor.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 !amd64,!386,!ppc64le appengine 6 | 7 | package sha3 8 | 9 | var ( 10 | xorIn = xorInGeneric 11 | copyOut = copyOutGeneric 12 | xorInUnaligned = xorInGeneric 13 | copyOutUnaligned = copyOutGeneric 14 | ) 15 | 16 | const xorImplementationUnaligned = "generic" 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor_generic.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 sha3 6 | 7 | import "encoding/binary" 8 | 9 | // xorInGeneric xors the bytes in buf into the state; it 10 | // makes no non-portable assumptions about memory layout 11 | // or alignment. 12 | func xorInGeneric(d *state, buf []byte) { 13 | n := len(buf) / 8 14 | 15 | for i := 0; i < n; i++ { 16 | a := binary.LittleEndian.Uint64(buf) 17 | d.a[i] ^= a 18 | buf = buf[8:] 19 | } 20 | } 21 | 22 | // copyOutGeneric copies ulint64s to a byte buffer. 23 | func copyOutGeneric(d *state, b []byte) { 24 | for i := 0; len(b) >= 8; i++ { 25 | binary.LittleEndian.PutUint64(b, d.a[i]) 26 | b = b[8:] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/agent/example_test.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 | package agent_test 6 | 7 | import ( 8 | "log" 9 | "net" 10 | "os" 11 | 12 | "golang.org/x/crypto/ssh" 13 | "golang.org/x/crypto/ssh/agent" 14 | ) 15 | 16 | func ExampleClientAgent() { 17 | // ssh-agent has a UNIX socket under $SSH_AUTH_SOCK 18 | socket := os.Getenv("SSH_AUTH_SOCK") 19 | conn, err := net.Dial("unix", socket) 20 | if err != nil { 21 | log.Fatalf("net.Dial: %v", err) 22 | } 23 | agentClient := agent.NewClient(conn) 24 | config := &ssh.ClientConfig{ 25 | User: "username", 26 | Auth: []ssh.AuthMethod{ 27 | // Use a callback rather than PublicKeys 28 | // so we only consult the agent once the remote server 29 | // wants it. 30 | ssh.PublicKeysCallback(agentClient.Signers), 31 | }, 32 | HostKeyCallback: ssh.InsecureIgnoreHostKey(), 33 | } 34 | 35 | sshc, err := ssh.Dial("tcp", "localhost:22", config) 36 | if err != nil { 37 | log.Fatalf("Dial: %v", err) 38 | } 39 | // .. use sshc 40 | sshc.Close() 41 | } 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/doc.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 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | 18 | This package does not fall under the stability promise of the Go language itself, 19 | so its API may be changed when pressing needs arise. 20 | */ 21 | package ssh // import "golang.org/x/crypto/ssh" 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/tcpip_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/banner_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package test 8 | 9 | import ( 10 | "testing" 11 | ) 12 | 13 | func TestBannerCallbackAgainstOpenSSH(t *testing.T) { 14 | server := newServer(t) 15 | defer server.Shutdown() 16 | 17 | clientConf := clientConfig() 18 | 19 | var receivedBanner string 20 | clientConf.BannerCallback = func(message string) error { 21 | receivedBanner = message 22 | return nil 23 | } 24 | 25 | conn := server.Dial(clientConf) 26 | defer conn.Close() 27 | 28 | expected := "Server Banner" 29 | if receivedBanner != expected { 30 | t.Fatalf("got %v; want %v", receivedBanner, expected) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/doc.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 | // Package test contains integration tests for the 6 | // golang.org/x/crypto/ssh package. 7 | package test // import "golang.org/x/crypto/ssh/test" 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/testdata/doc.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 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata // import "golang.org/x/crypto/ssh/testdata" 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.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 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.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 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package plan9 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 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/plan9/syscall_test.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 plan9 6 | 7 | package plan9_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/plan9" 13 | ) 14 | 15 | func testSetGetenv(t *testing.T, key, value string) { 16 | err := plan9.Setenv(key, value) 17 | if err != nil { 18 | t.Fatalf("Setenv failed to set %q: %v", value, err) 19 | } 20 | newvalue, found := plan9.Getenv(key) 21 | if !found { 22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) 23 | } 24 | if newvalue != value { 25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) 26 | } 27 | } 28 | 29 | func TestEnv(t *testing.T) { 30 | testSetGetenv(t, "TESTENV", "AVALUE") 31 | // make sure TESTENV gets set to "", not deleted 32 | testSetGetenv(t, "TESTENV", "") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | var Itoa = itoa 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(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 = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(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 = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(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 = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func 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 SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(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 = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | 25 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 26 | // TODO(aram): implement this, see issue 5847. 27 | panic("unimplemented") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package registry 8 | 9 | func (k Key) SetValue(name string, valtype uint32, data []byte) error { 10 | return k.setValue(name, valtype, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.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 registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /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/example/beep.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 main 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | // BUG(brainman): MessageBeep Windows api is broken on Windows 7, 14 | // so this example does not beep when runs as service on Windows 7. 15 | 16 | var ( 17 | beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") 18 | ) 19 | 20 | func beep() { 21 | beepFunc.Call(0xffffffff) 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/svc/go12.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build !go1.3 7 | 8 | package svc 9 | 10 | // from go12.c 11 | func getServiceMain(r *uintptr) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go13.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.3 7 | 8 | package svc 9 | 10 | import "unsafe" 11 | 12 | const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const 13 | 14 | // Should be a built-in for unsafe.Pointer? 15 | func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { 16 | return unsafe.Pointer(uintptr(p) + x) 17 | } 18 | 19 | // funcPC returns the entry PC of the function f. 20 | // It assumes that f is a func value. Otherwise the behavior is undefined. 21 | func funcPC(f interface{}) uintptr { 22 | return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) 23 | } 24 | 25 | // from sys_386.s and sys_amd64.s 26 | func servicectlhandler(ctl uint32) uintptr 27 | func servicemain(argc uint32, argv **uint16) 28 | 29 | func getServiceMain(r *uintptr) { 30 | *r = funcPC(servicemain) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v1/suite_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | "testing" 6 | ) 7 | 8 | func Test(t *testing.T) { TestingT(t) } 9 | 10 | type S struct{} 11 | 12 | var _ = Suite(&S{}) 13 | --------------------------------------------------------------------------------