├── Dockerfile
├── LICENSE
├── README.md
├── cmd
└── onionize
│ ├── gui.go
│ ├── main.go
│ └── nogui.go
├── dockerfiles
├── Dockerfile.stretch
├── Dockerfile.xenial
└── README.md
├── docs
├── onionize-dir-1.png
├── onionize-dir-2.png
├── onionize-file-1.png
├── onionize-file-2.png
├── onionize-zip-1.png
└── onionize-zip-2.png
├── go.mod
├── go.sum
├── onionize.go
├── proxy.go
├── slug.go
├── tor.go
├── util
└── pbkdf.go
└── vendor
├── github.com
├── gotk3
│ └── gotk3
│ │ ├── LICENSE
│ │ ├── cairo
│ │ ├── antialias.go
│ │ ├── cairo.go
│ │ ├── canvas.go
│ │ ├── errors.go
│ │ ├── fillrule.go
│ │ ├── format.go
│ │ ├── linecap.go
│ │ ├── linejoin.go
│ │ ├── matrix.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
│ │ ├── gaction.go
│ │ ├── gactiongroup.go
│ │ ├── gactionmap.go
│ │ ├── gbinding.go
│ │ ├── glib.go
│ │ ├── glib.go.h
│ │ ├── glib_extension.go
│ │ ├── gmain_context.go
│ │ ├── gsimpleactiongroup.go
│ │ ├── gsource.go
│ │ ├── gvariant.go
│ │ ├── gvariant.go.h
│ │ ├── gvariantbuilder.go
│ │ ├── gvariantclass.go
│ │ ├── gvariantdict.go
│ │ ├── gvariantiter.go
│ │ ├── gvarianttype.go
│ │ ├── gvarianttype.go.h
│ │ ├── list.go
│ │ ├── menu.go
│ │ ├── notifications.go
│ │ ├── settings.go
│ │ ├── settings_backend.go
│ │ ├── settings_schema.go
│ │ ├── settings_schema_source.go
│ │ └── slist.go
│ │ ├── gtk
│ │ ├── aboutdialog.go
│ │ ├── accel.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
│ │ ├── box_since_3_12.go
│ │ ├── color_chooser.go
│ │ ├── combo_box.go
│ │ ├── font_chooser.go
│ │ ├── gdk.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_deprecated_since_3_8.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_20.go
│ │ ├── gtk_since_3_20.go.h
│ │ ├── gtk_since_3_8.go
│ │ ├── icon_view.go
│ │ ├── info_bar.go
│ │ ├── label.go
│ │ ├── level_bar.go
│ │ ├── level_bar_since_3_8.go
│ │ ├── menu.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
│ │ ├── settings.go
│ │ ├── settings.go.h
│ │ ├── shortcutswindow_since_3_22.go
│ │ ├── shortcutswindow_since_3_22.go.h
│ │ ├── stack_since_3_12.go
│ │ ├── stackswitcher_since_3_10.go
│ │ ├── style.go
│ │ ├── text_iter.go
│ │ ├── text_mark.go
│ │ ├── text_view.go
│ │ ├── tooltip.go
│ │ ├── tree_view.go
│ │ ├── tree_view_column.go
│ │ ├── version.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
│ │ ├── fontconfig.go.h
│ │ ├── 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
└── nogoegst
│ ├── balloon
│ ├── LICENSE
│ ├── README
│ └── balloon.go
│ ├── blake2xb
│ ├── LICENSE
│ ├── README
│ ├── blake2b.go
│ ├── blake2xb.go
│ ├── block.go
│ └── xof.go
│ ├── bulb
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── cmd_authenticate.go
│ ├── cmd_onion.go
│ ├── cmd_protocolinfo.go
│ ├── conn.go
│ ├── dialer.go
│ ├── go.mod
│ ├── go.sum
│ ├── listener.go
│ ├── response.go
│ ├── status.go
│ └── utils
│ │ ├── pkcs1
│ │ └── rsa.go
│ │ └── utils.go
│ ├── fileserver
│ ├── LICENSE
│ └── fileserver.go
│ ├── onionutil
│ ├── LICENSE
│ ├── address.go
│ ├── common.go
│ ├── go.mod
│ ├── go.sum
│ ├── intropoint.go
│ ├── keyfile.go
│ ├── oniondesc.go
│ ├── pkcs1
│ │ └── rsa.go
│ ├── relaydesc.go
│ └── torparse
│ │ └── torparse.go
│ ├── pickfs
│ ├── LICENSE
│ └── pickfs.go
│ ├── terminal
│ ├── LICENSE
│ ├── terminal.go
│ ├── util.go
│ ├── util_bsd.go
│ ├── util_linux.go
│ ├── util_plan9.go
│ ├── util_solaris.go
│ └── util_windows.go
│ ├── textqr
│ ├── LICENSE
│ ├── go.mod
│ ├── go.sum
│ └── textqr.go
│ ├── tlspin
│ ├── LICENSE
│ ├── tlspin.go
│ └── util
│ │ ├── certs.go
│ │ ├── connection.go
│ │ ├── encoding.go
│ │ └── keys.go
│ └── wslpath
│ ├── LICENSE
│ ├── mount
│ ├── LICENSE
│ ├── NOTICE
│ ├── mount.go
│ ├── mountinfo.go
│ └── mountinfo_linux.go
│ ├── wslpath.go
│ └── wslpath_other.go
├── golang.org
└── x
│ ├── crypto
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── blake2b
│ │ ├── blake2b.go
│ │ ├── blake2bAVX2_amd64.go
│ │ ├── blake2bAVX2_amd64.s
│ │ ├── blake2b_amd64.go
│ │ ├── blake2b_amd64.s
│ │ ├── blake2b_generic.go
│ │ ├── blake2b_ref.go
│ │ ├── blake2x.go
│ │ └── register.go
│ ├── ed25519
│ │ ├── ed25519.go
│ │ └── internal
│ │ │ └── edwards25519
│ │ │ ├── const.go
│ │ │ └── edwards25519.go
│ └── sha3
│ │ ├── doc.go
│ │ ├── hashes.go
│ │ ├── hashes_generic.go
│ │ ├── keccakf.go
│ │ ├── keccakf_amd64.go
│ │ ├── keccakf_amd64.s
│ │ ├── register.go
│ │ ├── sha3.go
│ │ ├── sha3_s390x.go
│ │ ├── sha3_s390x.s
│ │ ├── shake.go
│ │ ├── shake_generic.go
│ │ ├── xor.go
│ │ ├── xor_generic.go
│ │ └── xor_unaligned.go
│ ├── net
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── internal
│ │ └── socks
│ │ │ ├── client.go
│ │ │ └── socks.go
│ └── proxy
│ │ ├── direct.go
│ │ ├── per_host.go
│ │ ├── proxy.go
│ │ └── socks5.go
│ ├── sys
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── cpu
│ │ ├── cpu.go
│ │ ├── cpu_arm.go
│ │ ├── cpu_arm64.go
│ │ ├── cpu_gc_x86.go
│ │ ├── cpu_gccgo.c
│ │ ├── cpu_gccgo.go
│ │ ├── cpu_mips64x.go
│ │ ├── cpu_mipsx.go
│ │ ├── cpu_ppc64x.go
│ │ ├── cpu_s390x.go
│ │ ├── cpu_x86.go
│ │ └── cpu_x86.s
│ └── unix
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── 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
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── fcntl.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ioctl.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mkpost.go
│ │ ├── mksyscall.pl
│ │ ├── mksyscall_aix.pl
│ │ ├── mksyscall_solaris.pl
│ │ ├── mksysctl_openbsd.pl
│ │ ├── mksysnum_darwin.pl
│ │ ├── mksysnum_dragonfly.pl
│ │ ├── mksysnum_freebsd.pl
│ │ ├── mksysnum_netbsd.pl
│ │ ├── mksysnum_openbsd.pl
│ │ ├── openbsd_pledge.go
│ │ ├── pagesize_unix.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── timestruct.go
│ │ ├── types_aix.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_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_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.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_riscv64.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_riscv64.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_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── tools
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ └── godoc
│ └── vfs
│ ├── emptyvfs.go
│ ├── httpfs
│ └── httpfs.go
│ ├── mapfs
│ └── mapfs.go
│ ├── namespace.go
│ ├── os.go
│ ├── vfs.go
│ └── zipfs
│ └── zipfs.go
├── modules.txt
└── rsc.io
└── qr
├── LICENSE
├── README.md
├── coding
├── gen.go
└── qr.go
├── gf256
└── gf256.go
├── go.mod
├── png.go
└── qr.go
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.11-alpine AS onionize-build
2 | RUN apk add --no-cache git
3 | WORKDIR /go/src/github.com/nogoegst/onionize
4 | COPY . .
5 | RUN CGO_ENABLED=0 go install -v github.com/nogoegst/onionize/cmd/onionize
6 | FROM alpine
7 | RUN apk add --no-cache tor ca-certificates
8 | COPY --from=onionize-build /go/bin/onionize /usr/local/bin/
9 | ENTRYPOINT ["onionize", "-start-tor"]
10 | CMD ["-h"]
11 |
--------------------------------------------------------------------------------
/cmd/onionize/nogui.go:
--------------------------------------------------------------------------------
1 | // nogui.go - empty GUI wrapper.
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of onionize, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 | // +build !gui
8 |
9 | package main
10 |
11 | import (
12 | "log"
13 | "net/url"
14 |
15 | "github.com/nogoegst/onionize"
16 | )
17 |
18 | func guiMain(chan onionize.Parameters, chan url.URL, chan error) {
19 | log.Fatal("Please specify path to target")
20 | }
21 |
--------------------------------------------------------------------------------
/dockerfiles/Dockerfile.stretch:
--------------------------------------------------------------------------------
1 | FROM golang:1.9-stretch
2 | RUN apt-get update
3 | RUN apt-get install -y git
4 |
5 | RUN apt-get install -y libgtk-3-dev libcairo2-dev libglib2.0-dev
6 |
7 | RUN dpkg -l libgtk-3-0
8 |
9 | CMD ["go", "get", "-v", "-tags","gtk_3_22 gui", "github.com/nogoegst/onionize/cmd/onionize"]
10 |
--------------------------------------------------------------------------------
/dockerfiles/Dockerfile.xenial:
--------------------------------------------------------------------------------
1 | FROM nogoegst/golang-ubuntu:1.9-xenial
2 | RUN apt-get update
3 | RUN apt-get install -y git
4 |
5 | RUN apt-get install -y libgtk-3-dev libcairo2-dev libglib2.0-dev
6 |
7 | RUN dpkg -l libgtk-3-0
8 |
9 | CMD ["go", "get", "-v", "-tags","gtk_3_18 gui", "github.com/nogoegst/onionize/cmd/onionize"]
10 |
--------------------------------------------------------------------------------
/dockerfiles/README.md:
--------------------------------------------------------------------------------
1 | Building
2 | -------
3 | You have to have docker 17.05+ installed.
4 |
5 | To build `onionize` binary with GUI for Ubuntu Xenial to `$HOME/go/bin` do:
6 | ```shell
7 | $ sudo docker build -t onionize-build:xenial -f Dockerfile.xenial .
8 | $ sudo docker run -ti --rm -v $HOME/go/bin:/go/bin onionize-build:xenial
9 | ```
10 |
11 | To build `onionize` binary with GUI for Debian Stretch to `$HOME/go/bin` do:
12 | ```shell
13 | $ sudo docker build -t onionize-build:stretch -f Dockerfile.stretch .
14 | $ sudo docker run -ti --rm -v $HOME/go/bin:/go/bin onionize-build:stretch
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/onionize-dir-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-dir-1.png
--------------------------------------------------------------------------------
/docs/onionize-dir-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-dir-2.png
--------------------------------------------------------------------------------
/docs/onionize-file-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-file-1.png
--------------------------------------------------------------------------------
/docs/onionize-file-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-file-2.png
--------------------------------------------------------------------------------
/docs/onionize-zip-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-zip-1.png
--------------------------------------------------------------------------------
/docs/onionize-zip-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/docs/onionize-zip-2.png
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/nogoegst/onionize
2 |
3 | require (
4 | github.com/gotk3/gotk3 v0.0.0-20180905040958-020531a77b59
5 | github.com/matryer/is v1.2.0 // indirect
6 | github.com/nogoegst/balloon v1.0.0
7 | github.com/nogoegst/blake2xb v1.0.1 // indirect
8 | github.com/nogoegst/bulb v1.1.0
9 | github.com/nogoegst/fileserver v1.0.0
10 | github.com/nogoegst/onionutil v1.1.0
11 | github.com/nogoegst/pickfs v1.1.0 // indirect
12 | github.com/nogoegst/terminal v0.0.0-20161218222815-90cba33d8a32
13 | github.com/nogoegst/textqr v0.0.0-20181213220145-28c55cae7e92
14 | github.com/nogoegst/tlspin v2.1.0+incompatible
15 | golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd
16 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect
17 | golang.org/x/tools v0.0.0-20180910180008-18207bb12d3a // indirect
18 | rsc.io/qr v0.2.0
19 | )
20 |
--------------------------------------------------------------------------------
/proxy.go:
--------------------------------------------------------------------------------
1 | // proxy.go - reverse proxy to another HTTP server.
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of onionize, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package onionize
9 |
10 | import (
11 | "log"
12 | "net/http"
13 | "net/http/httputil"
14 | "net/url"
15 | )
16 |
17 | func onionReverseHTTPProxy(target *url.URL) *httputil.ReverseProxy {
18 | director := func(req *http.Request) {
19 | req.URL.Scheme = target.Scheme
20 | req.URL.Host = target.Host
21 | req.Host = target.Host
22 | req.Header.Set("User-Agent", "onionize")
23 | log.Printf("%v", req.URL)
24 | }
25 | return &httputil.ReverseProxy{Director: director}
26 | }
27 |
--------------------------------------------------------------------------------
/slug.go:
--------------------------------------------------------------------------------
1 | package onionize
2 |
3 | import (
4 | "crypto/subtle"
5 | "fmt"
6 | "net/http"
7 | "strings"
8 | )
9 |
10 | func checkSlug(req *http.Request, slug string) error {
11 | if slug == "" {
12 | return nil
13 | }
14 | shost := strings.Split(req.Host, ".")
15 | if len(shost) < 3 {
16 | return fmt.Errorf("hostname is too short")
17 | }
18 | if 1 != subtle.ConstantTimeCompare([]byte(slug), []byte(shost[len(shost)-3])) {
19 | return fmt.Errorf("wrong slug")
20 | }
21 | return nil
22 | }
23 |
24 | func subdomainSluggedHandler(h http.Handler, slug string) http.Handler {
25 | mux := http.NewServeMux()
26 | mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
27 | err := checkSlug(req, slug)
28 | if err != nil {
29 | http.NotFound(w, req)
30 | return
31 | }
32 | h.ServeHTTP(w, req)
33 | })
34 | return mux
35 | }
36 |
--------------------------------------------------------------------------------
/tor.go:
--------------------------------------------------------------------------------
1 | // tor.go - start an instance of little-t-tor.
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of onionize, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package onionize
9 |
10 | import (
11 | "net"
12 | "os"
13 | "os/exec"
14 | "strings"
15 | "time"
16 | )
17 |
18 | const torrc = `RunAsDaemon 0
19 | SOCKSPort 0
20 | ControlPort 9999
21 | AvoidDiskWrites 1
22 | `
23 |
24 | func runTor(ready chan<- struct{}) error {
25 | cmd := exec.Command("tor", "-f", "-")
26 | cmd.Stdin = strings.NewReader(torrc)
27 | cmd.Stderr = os.Stderr
28 | err := cmd.Start()
29 | if err != nil {
30 | return err
31 | }
32 | t := time.NewTicker(500 * time.Millisecond)
33 | for range t.C {
34 | c, err := net.Dial("tcp", "127.0.0.1:9999")
35 | if err == nil {
36 | c.Close()
37 | t.Stop()
38 | ready <- struct{}{}
39 | break
40 | }
41 | }
42 | return cmd.Wait()
43 | }
44 |
--------------------------------------------------------------------------------
/util/pbkdf.go:
--------------------------------------------------------------------------------
1 | // pbkdf.go - passphrase based key derivation function
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of onionize, using the creative
5 | // commons "CC0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package util
9 |
10 | import (
11 | "io"
12 |
13 | "github.com/nogoegst/balloon"
14 | "golang.org/x/crypto/blake2b"
15 | )
16 |
17 | var (
18 | sCost = 1 << 23 // 8 MiB
19 | tCost = 2
20 | )
21 |
22 | func KeystreamReader(passphrase, salt []byte) io.Reader {
23 | h, err := blake2b.New512(nil)
24 | if err != nil {
25 | panic(err)
26 | }
27 | secret := balloon.Balloon(h, passphrase, salt, uint64(sCost/h.Size()), uint64(tCost))
28 | b2xb, err := blake2b.NewXOF(blake2b.OutputLengthUnknown, nil)
29 | if err != nil {
30 | panic(err)
31 | }
32 | b2xb.Write(secret)
33 | return b2xb
34 | }
35 |
--------------------------------------------------------------------------------
/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/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_3_6-8.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013-2014 Conformal Systems
2 | //
3 | // This file originated from: http://opensource.conformal.com/
4 | //
5 | // Permission to use, copy, modify, and distribute this software for any
6 | // purpose with or without fee is hereby granted, provided that the above
7 | // copyright notice and this permission notice appear in all copies.
8 | //
9 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | // This file includes wrapers for symbols deprecated beginning with GTK 3.10,
18 | // and should only be included in a build targeted intended to target GTK
19 | // 3.8 or earlier. To target an earlier build build, use the build tag
20 | // gtk_MAJOR_MINOR. For example, to target GTK 3.8, run
21 | // 'go build -tags gtk_3_8'.
22 | // +build gtk_3_6 gtk_3_8
23 |
24 | package gdk
25 |
26 | // #cgo pkg-config: gdk-3.0
27 | // #include
28 | import "C"
29 |
30 | // GetNScreens is a wrapper around gdk_display_get_n_screens().
31 | func (v *Display) GetNScreens() int {
32 | c := C.gdk_display_get_n_screens(v.native())
33 | return int(c)
34 | }
35 |
--------------------------------------------------------------------------------
/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/screen_x11.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build !no_x11
3 |
4 | package gdk
5 |
6 | // #cgo pkg-config: gdk-x11-3.0
7 | // #include
8 | // #include
9 | import "C"
10 |
11 | func WorkspaceControlSupported() bool {
12 | return true
13 | }
14 |
15 | // GetScreenNumber is a wrapper around gdk_x11_screen_get_screen_number().
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) GetScreenNumber() int {
18 | return int(C.gdk_x11_screen_get_screen_number(v.native()))
19 | }
20 |
21 | // GetNumberOfDesktops is a wrapper around gdk_x11_screen_get_number_of_desktops().
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) GetNumberOfDesktops() uint32 {
24 | return uint32(C.gdk_x11_screen_get_number_of_desktops(v.native()))
25 | }
26 |
27 | // GetCurrentDesktop is a wrapper around gdk_x11_screen_get_current_desktop().
28 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
29 | func (v *Screen) GetCurrentDesktop() uint32 {
30 | return uint32(C.gdk_x11_screen_get_current_desktop(v.native()))
31 | }
32 |
--------------------------------------------------------------------------------
/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/gdk/window_x11.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build !no_x11
3 |
4 | package gdk
5 |
6 | // #cgo pkg-config: gdk-x11-3.0
7 | // #include
8 | // #include
9 | import "C"
10 |
11 | // MoveToCurrentDesktop is a wrapper around gdk_x11_window_move_to_current_desktop().
12 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
13 | func (v *Window) MoveToCurrentDesktop() {
14 | C.gdk_x11_window_move_to_current_desktop(v.native())
15 | }
16 |
17 | // GetDesktop is a wrapper around gdk_x11_window_get_desktop().
18 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
19 | func (v *Window) GetDesktop() uint32 {
20 | return uint32(C.gdk_x11_window_get_desktop(v.native()))
21 | }
22 |
23 | // MoveToDesktop is a wrapper around gdk_x11_window_move_to_desktop().
24 | // It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
25 | func (v *Window) MoveToDesktop(d uint32) {
26 | C.gdk_x11_window_move_to_desktop(v.native(), C.guint32(d))
27 | }
28 |
--------------------------------------------------------------------------------
/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/gsimpleactiongroup.go:
--------------------------------------------------------------------------------
1 | package glib
2 |
3 | // #cgo pkg-config: glib-2.0 gobject-2.0
4 | // #include
5 | // #include
6 | // #include
7 | // #include "glib.go.h"
8 | import "C"
9 | import (
10 | "unsafe"
11 | )
12 |
13 | // SimpleActionGroup is a representation of glib's GSimpleActionGroup
14 | type SimpleActionGroup struct {
15 | *Object
16 |
17 | // Interfaces
18 | IActionMap
19 | IActionGroup
20 | }
21 |
22 | // deprecated since 2.38:
23 | // g_simple_action_group_lookup()
24 | // g_simple_action_group_insert()
25 | // g_simple_action_group_remove()
26 | // g_simple_action_group_add_entries()
27 | // -> See implementations in ActionMap
28 |
29 | // native() returns a pointer to the underlying GSimpleActionGroup.
30 | func (v *SimpleActionGroup) native() *C.GSimpleActionGroup {
31 | if v == nil || v.GObject == nil {
32 | return nil
33 | }
34 | return C.toGSimpleActionGroup(unsafe.Pointer(v.GObject))
35 | }
36 |
37 | func (v *SimpleActionGroup) Native() uintptr {
38 | return uintptr(unsafe.Pointer(v.native()))
39 | }
40 |
41 | func marshalSimpleActionGroup(p uintptr) (interface{}, error) {
42 | c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
43 | return wrapSimpleActionGroup(wrapObject(unsafe.Pointer(c))), nil
44 | }
45 |
46 | func wrapSimpleActionGroup(obj *Object) *SimpleActionGroup {
47 | am := wrapActionMap(obj)
48 | ag := wrapActionGroup(obj)
49 | return &SimpleActionGroup{obj, am, ag}
50 | }
51 |
52 | // SimpleActionGroupNew is a wrapper around g_simple_action_group_new
53 | func SimpleActionGroupNew() *SimpleActionGroup {
54 | c := C.g_simple_action_group_new()
55 | if c == nil {
56 | return nil
57 | }
58 | return wrapSimpleActionGroup(wrapObject(unsafe.Pointer(c)))
59 | }
60 |
--------------------------------------------------------------------------------
/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/gvariantbuilder.go:
--------------------------------------------------------------------------------
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 | package glib
7 |
8 | // #cgo pkg-config: glib-2.0 gobject-2.0
9 | // #include
10 | // #include
11 | // #include "glib.go.h"
12 | // #include "gvariant.go.h"
13 | import "C"
14 | import "unsafe"
15 |
16 | /*
17 | * GVariantBuilder
18 | */
19 |
20 | // VariantBuilder is a representation of GLib's VariantBuilder.
21 | type VariantBuilder struct {
22 | GVariantBuilder *C.GVariantBuilder
23 | }
24 |
25 | func (v *VariantBuilder) toGVariantBuilder() *C.GVariantBuilder {
26 | if v == nil {
27 | return nil
28 | }
29 | return v.native()
30 | }
31 |
32 | func (v *VariantBuilder) toVariantBuilder() *VariantBuilder {
33 | return v
34 | }
35 |
36 | // newVariantBuilder creates a new VariantBuilder from a GVariantBuilder pointer.
37 | func newVariantBuilder(p *C.GVariantBuilder) *VariantBuilder {
38 | return &VariantBuilder{GVariantBuilder: p}
39 | }
40 |
41 | // native returns a pointer to the underlying GVariantBuilder.
42 | func (v *VariantBuilder) native() *C.GVariantBuilder {
43 | if v == nil || v.GVariantBuilder == nil {
44 | return nil
45 | }
46 | p := unsafe.Pointer(v.GVariantBuilder)
47 | return C.toGVariantBuilder(p)
48 | }
49 |
50 | // Native returns a pointer to the underlying GVariantBuilder.
51 | func (v *VariantBuilder) Native() uintptr {
52 | return uintptr(unsafe.Pointer(v.native()))
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/glib/gvariantdict.go:
--------------------------------------------------------------------------------
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 | package glib
7 |
8 | // #cgo pkg-config: glib-2.0 gobject-2.0
9 | // #include
10 | // #include
11 | // #include "glib.go.h"
12 | // #include "gvariant.go.h"
13 | import "C"
14 | import "unsafe"
15 |
16 | /*
17 | * GVariantDict
18 | */
19 |
20 | // VariantDict is a representation of GLib's VariantDict.
21 | type VariantDict struct {
22 | GVariantDict *C.GVariantDict
23 | }
24 |
25 | func (v *VariantDict) toGVariantDict() *C.GVariantDict {
26 | if v == nil {
27 | return nil
28 | }
29 | return v.native()
30 | }
31 |
32 | func (v *VariantDict) toVariantDict() *VariantDict {
33 | return v
34 | }
35 |
36 | // newVariantDict creates a new VariantDict from a GVariantDict pointer.
37 | func newVariantDict(p *C.GVariantDict) *VariantDict {
38 | return &VariantDict{GVariantDict: p}
39 | }
40 |
41 | // native returns a pointer to the underlying GVariantDict.
42 | func (v *VariantDict) native() *C.GVariantDict {
43 | if v == nil || v.GVariantDict == nil {
44 | return nil
45 | }
46 | p := unsafe.Pointer(v.GVariantDict)
47 | return C.toGVariantDict(p)
48 | }
49 |
50 | // Native returns a pointer to the underlying GVariantDict.
51 | func (v *VariantDict) Native() uintptr {
52 | return uintptr(unsafe.Pointer(v.native()))
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/glib/gvariantiter.go:
--------------------------------------------------------------------------------
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 | package glib
7 |
8 | // #cgo pkg-config: glib-2.0 gobject-2.0
9 | // #include
10 | // #include
11 | // #include "glib.go.h"
12 | // #include "gvariant.go.h"
13 | import "C"
14 | import "unsafe"
15 |
16 | /*
17 | * GVariantIter
18 | */
19 |
20 | // VariantIter is a representation of GLib's GVariantIter.
21 | type VariantIter struct {
22 | GVariantIter *C.GVariantIter
23 | }
24 |
25 | func (v *VariantIter) toGVariantIter() *C.GVariantIter {
26 | if v == nil {
27 | return nil
28 | }
29 | return v.native()
30 | }
31 |
32 | func (v *VariantIter) toVariantIter() *VariantIter {
33 | return v
34 | }
35 |
36 | // newVariantIter creates a new VariantIter from a GVariantIter pointer.
37 | func newVariantIter(p *C.GVariantIter) *VariantIter {
38 | return &VariantIter{GVariantIter: p}
39 | }
40 |
41 | // native returns a pointer to the underlying GVariantIter.
42 | func (v *VariantIter) native() *C.GVariantIter {
43 | if v == nil || v.GVariantIter == nil {
44 | return nil
45 | }
46 | p := unsafe.Pointer(v.GVariantIter)
47 | return C.toGVariantIter(p)
48 | }
49 |
50 | // Native returns a pointer to the underlying GVariantIter.
51 | func (v *VariantIter) Native() uintptr {
52 | return uintptr(unsafe.Pointer(v.native()))
53 | }
54 |
--------------------------------------------------------------------------------
/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/application_since_3_12.go:
--------------------------------------------------------------------------------
1 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10
2 |
3 | // See: https://developer.gnome.org/gtk3/3.12/api-index-3-12.html
4 |
5 | package gtk
6 |
7 | // #include
8 | // #include "gtk.go.h"
9 | import "C"
10 | import "unsafe"
11 |
12 | // GetAccelsForAction is a wrapper around gtk_application_get_accels_for_action().
13 | func (v *Application) GetAccelsForAction(act string) []string {
14 | cstr1 := (*C.gchar)(C.CString(act))
15 | defer C.free(unsafe.Pointer(cstr1))
16 |
17 | var descs []string
18 | c := C.gtk_application_get_accels_for_action(v.native(), cstr1)
19 | originalc := c
20 | defer C.g_strfreev(originalc)
21 |
22 | for *c != nil {
23 | descs = append(descs, C.GoString((*C.char)(*c)))
24 | c = C.next_gcharptr(c)
25 | }
26 |
27 | return descs
28 | }
29 |
30 | // SetAccelsForAction is a wrapper around gtk_application_set_accels_for_action().
31 | func (v *Application) SetAccelsForAction(act string, accels []string) {
32 | cstr1 := (*C.gchar)(C.CString(act))
33 | defer C.free(unsafe.Pointer(cstr1))
34 |
35 | caccels := C.make_strings(C.int(len(accels) + 1))
36 | defer C.destroy_strings(caccels)
37 |
38 | for i, accel := range accels {
39 | cstr := C.CString(accel)
40 | defer C.free(unsafe.Pointer(cstr))
41 | C.set_string(caccels, C.int(i), (*C.gchar)(cstr))
42 | }
43 |
44 | C.set_string(caccels, C.int(len(accels)), nil)
45 |
46 | C.gtk_application_set_accels_for_action(v.native(), cstr1, caccels)
47 | }
48 |
49 | // ListActionDescriptions is a wrapper around gtk_application_list_action_descriptions().
50 | func (v *Application) ListActionDescriptions() []string {
51 | var descs []string
52 | c := C.gtk_application_list_action_descriptions(v.native())
53 | originalc := c
54 | defer C.g_strfreev(originalc)
55 |
56 | for *c != nil {
57 | descs = append(descs, C.GoString((*C.char)(*c)))
58 | c = C.next_gcharptr(c)
59 | }
60 |
61 | return descs
62 | }
63 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/application_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 | // #include
8 | // #include "gtk.go.h"
9 | import "C"
10 | import (
11 | "unsafe"
12 |
13 | "github.com/gotk3/gotk3/glib"
14 | )
15 |
16 | // PrefersAppMenu is a wrapper around gtk_application_prefers_app_menu().
17 | func (v *Application) PrefersAppMenu() bool {
18 | return gobool(C.gtk_application_prefers_app_menu(v.native()))
19 | }
20 |
21 | // GetActionsForAccel is a wrapper around gtk_application_get_actions_for_accel().
22 | func (v *Application) GetActionsForAccel(acc string) []string {
23 | cstr1 := (*C.gchar)(C.CString(acc))
24 | defer C.free(unsafe.Pointer(cstr1))
25 |
26 | var acts []string
27 | c := C.gtk_application_get_actions_for_accel(v.native(), cstr1)
28 | originalc := c
29 | defer C.g_strfreev(originalc)
30 |
31 | for *c != nil {
32 | acts = append(acts, C.GoString((*C.char)(*c)))
33 | c = C.next_gcharptr(c)
34 | }
35 |
36 | return acts
37 | }
38 |
39 | // GetMenuByID is a wrapper around gtk_application_get_menu_by_id().
40 | func (v *Application) GetMenuByID(id string) *glib.Menu {
41 | cstr1 := (*C.gchar)(C.CString(id))
42 | defer C.free(unsafe.Pointer(cstr1))
43 |
44 | c := C.gtk_application_get_menu_by_id(v.native(), cstr1)
45 | if c == nil {
46 | return nil
47 | }
48 | return &glib.Menu{glib.MenuModel{glib.Take(unsafe.Pointer(c))}}
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gdk.go:
--------------------------------------------------------------------------------
1 | package gtk
2 |
3 | // #include
4 | // #include "gtk.go.h"
5 | import "C"
6 | import "github.com/gotk3/gotk3/gdk"
7 |
8 | func nativeGdkRectangle(rect gdk.Rectangle) *C.GdkRectangle {
9 | // Note: Here we can't use rect.GdkRectangle because it would return
10 | // C type prefixed with gdk package. A ways how to resolve this Go
11 | // issue with same C structs in different Go packages is documented
12 | // here https://github.com/golang/go/issues/13467 .
13 | // This is the easiest way how to resolve the problem.
14 | return &C.GdkRectangle{
15 | x: C.int(rect.GetX()),
16 | y: C.int(rect.GetY()),
17 | width: C.int(rect.GetWidth()),
18 | height: C.int(rect.GetHeight()),
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_deprecated_since_3_14.go.h:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * deprecated since version 3.14
4 | */
5 |
6 | // Wrapper for gtk_menu_popup to allow calling gtk_status_icon_position_menu as callback from go code
7 | // Used in func (v *Menu) PopupAtStatusIcon
8 | static void
9 | gotk_menu_popup_at_status_icon(GtkMenu *menu, GtkStatusIcon *status_icon, guint button, guint32 activate_time)
10 | {
11 | gtk_menu_popup(menu, NULL, NULL, gtk_status_icon_position_menu, status_icon, button, activate_time);
12 | }
13 |
14 | static GtkAlignment *
15 | toGtkAlignment(void *p)
16 | {
17 | return (GTK_ALIGNMENT(p));
18 | }
19 |
20 | static GtkArrow *
21 | toGtkArrow(void *p)
22 | {
23 | return (GTK_ARROW(p));
24 | }
25 |
26 | static GtkMisc *
27 | toGtkMisc(void *p)
28 | {
29 | return (GTK_MISC(p));
30 | }
31 |
32 | static GtkStatusIcon *
33 | toGtkStatusIcon(void *p)
34 | {
35 | return (GTK_STATUS_ICON(p));
36 | }
37 |
38 | static GdkPixbuf *
39 | toGdkPixbuf(void *p)
40 | {
41 | return (GDK_PIXBUF(p));
42 | }
43 |
44 | /*
45 | * End deprecated since version 3.14
46 | */
47 |
--------------------------------------------------------------------------------
/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_deprecated_since_3_20.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 | package gtk
4 |
5 | // #cgo pkg-config: gtk+-3.0
6 | // #include
7 | // #include
8 | import "C"
9 |
10 | // GetFocusOnClick() is a wrapper around gtk_button_get_focus_on_click().
11 | func (v *Button) GetFocusOnClick() bool {
12 | c := C.gtk_button_get_focus_on_click(v.native())
13 | return gobool(c)
14 | }
15 |
16 | // BeginsTag is a wrapper around gtk_text_iter_begins_tag().
17 | func (v *TextIter) BeginsTag(v1 *TextTag) bool {
18 | return gobool(C.gtk_text_iter_begins_tag(v.native(), v1.native()))
19 | }
20 |
21 | // ResizeToGeometry is a wrapper around gtk_window_resize_to_geometry().
22 | func (v *Window) ResizeToGeometry(width, height int) {
23 | C.gtk_window_resize_to_geometry(v.native(), C.gint(width), C.gint(height))
24 | }
25 |
26 | // SetDefaultGeometry is a wrapper around gtk_window_set_default_geometry().
27 | func (v *Window) SetDefaultGeometry(width, height int) {
28 | C.gtk_window_set_default_geometry(v.native(), C.gint(width),
29 | C.gint(height))
30 | }
31 |
32 | // SetFocusOnClick() is a wrapper around gtk_button_set_focus_on_click().
33 | func (v *Button) SetFocusOnClick(focusOnClick bool) {
34 | C.gtk_button_set_focus_on_click(v.native(), gbool(focusOnClick))
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_deprecated_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 |
10 | import (
11 | "unsafe"
12 | )
13 |
14 | // PopupAtMouse() is a wrapper for gtk_menu_popup(), without the option for a custom positioning function.
15 | func (v *Menu) PopupAtMouseCursor(parentMenuShell IMenu, parentMenuItem IMenuItem, button int, activateTime uint32) {
16 | wshell := nullableWidget(parentMenuShell)
17 | witem := nullableWidget(parentMenuItem)
18 |
19 | C.gtk_menu_popup(v.native(),
20 | wshell,
21 | witem,
22 | nil,
23 | nil,
24 | C.guint(button),
25 | C.guint32(activateTime))
26 | }
27 |
28 | func (v *SizeGroup) GetIgnoreHidden() bool {
29 | c := C.gtk_size_group_get_ignore_hidden(v.native())
30 | return gobool(c)
31 | }
32 |
33 | // SetWMClass is a wrapper around gtk_window_set_wmclass().
34 | func (v *Window) SetWMClass(name, class string) {
35 | cName := C.CString(name)
36 | defer C.free(unsafe.Pointer(cName))
37 | cClass := C.CString(class)
38 | defer C.free(unsafe.Pointer(cClass))
39 | C.gtk_window_set_wmclass(v.native(), (*C.gchar)(cName), (*C.gchar)(cClass))
40 | }
41 |
42 | func (v *SizeGroup) SetIgnoreHidden(ignoreHidden bool) {
43 | C.gtk_size_group_set_ignore_hidden(v.native(), gbool(ignoreHidden))
44 | }
45 |
46 | // GetFontName is a wrapper around gtk_font_button_get_font_name().
47 | func (v *FontButton) GetFontName() string {
48 | c := C.gtk_font_button_get_font_name(v.native())
49 | return goString(c)
50 | }
51 |
52 | // SetFontName is a wrapper around gtk_font_button_set_font_name().
53 | func (v *FontButton) SetFontName(fontname string) bool {
54 | cstr := C.CString(fontname)
55 | defer C.free(unsafe.Pointer(cstr))
56 | c := C.gtk_font_button_set_font_name(v.native(), (*C.gchar)(cstr))
57 | return gobool(c)
58 | }
59 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_since_3_10.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 GtkHeaderBar *
20 | toGtkHeaderBar(void *p)
21 | {
22 | return (GTK_HEADER_BAR(p));
23 | }
24 |
25 | static GtkListBox *
26 | toGtkListBox(void *p)
27 | {
28 | return (GTK_LIST_BOX(p));
29 | }
30 |
31 | static GtkListBoxRow *
32 | toGtkListBoxRow(void *p)
33 | {
34 | return (GTK_LIST_BOX_ROW(p));
35 | }
36 |
37 | static GtkRevealer *
38 | toGtkRevealer(void *p)
39 | {
40 | return (GTK_REVEALER(p));
41 | }
42 |
43 | static GtkSearchBar *
44 | toGtkSearchBar(void *p)
45 | {
46 | return (GTK_SEARCH_BAR(p));
47 | }
48 |
49 | static GtkStack *
50 | toGtkStack(void *p)
51 | {
52 | return (GTK_STACK(p));
53 | }
54 |
55 | static GtkStackSwitcher *
56 | toGtkStackSwitcher(void *p)
57 | {
58 | return (GTK_STACK_SWITCHER(p));
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_since_3_12.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 GtkFlowBox *
20 | toGtkFlowBox(void *p)
21 | {
22 | return (GTK_FLOW_BOX(p));
23 | }
24 |
25 | static GtkFlowBoxChild *
26 | toGtkFlowBoxChild(void *p)
27 | {
28 | return (GTK_FLOW_BOX_CHILD(p));
29 | }
--------------------------------------------------------------------------------
/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/gtk_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 | // For gtk_overlay_reorder_overlay():
6 | // See: https://git.gnome.org/browse/gtk+/tree/gtk/gtkoverlay.h?h=gtk-3-18
7 |
8 | package gtk
9 |
10 | // #cgo pkg-config: gtk+-3.0
11 | // #include
12 | import "C"
13 |
14 | // ReorderOverlay() is a wrapper around gtk_overlay_reorder_overlay().
15 | func (v *Overlay) ReorderOverlay(child IWidget, position int) {
16 | C.gtk_overlay_reorder_overlay(v.native(), child.toWidget(), C.gint(position))
17 | }
18 |
19 | // GetOverlayPassThrough() is a wrapper around
20 | // gtk_overlay_get_overlay_pass_through().
21 | func (v *Overlay) GetOverlayPassThrough(widget IWidget) bool {
22 | c := C.gtk_overlay_get_overlay_pass_through(v.native(), widget.toWidget())
23 | return gobool(c)
24 | }
25 |
26 | // SetOverlayPassThrough() is a wrapper around
27 | // gtk_overlay_set_overlay_pass_through().
28 | func (v *Overlay) SetOverlayPassThrough(widget IWidget, passThrough bool) {
29 | C.gtk_overlay_set_overlay_pass_through(v.native(), widget.toWidget(), gbool(passThrough))
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_since_3_20.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 | #pragma once
20 |
21 | #include
22 |
23 | static GtkFileChooser *
24 | toGtkFileChooser(void *p)
25 | {
26 | return (GTK_FILE_CHOOSER(p));
27 | }
28 |
29 | static GtkFileChooserNative *
30 | toGtkFileChooserNative(void *p)
31 | {
32 | return (GTK_FILE_CHOOSER_NATIVE(p));
33 | }
34 |
35 | static GtkNativeDialog *
36 | toGtkNativeDialog(void *p)
37 | {
38 | return (GTK_NATIVE_DIALOG(p));
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/gtk_since_3_8.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013-2014 Conformal Systems
2 | //
3 | // This file originated from: http://opensource.conformal.com/
4 | //
5 | // Permission to use, copy, modify, and distribute this software for any
6 | // purpose with or without fee is hereby granted, provided that the above
7 | // copyright notice and this permission notice appear in all copies.
8 | //
9 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | // This file includes wrapers for symbols included since GTK 3.8, and
18 | // and should not be included in a build intended to target any older GTK
19 | // versions. To target an older build, such as 3.8, use
20 | // 'go build -tags gtk_3_8'. Otherwise, if no build tags are used, GTK 3.18
21 | // is assumed and this file is built.
22 | // +build !gtk_3_6
23 |
24 | package gtk
25 |
26 | // #cgo pkg-config: gtk+-3.0
27 | // #include
28 | import "C"
29 |
30 | /*
31 | * Constants
32 | */
33 |
34 | const (
35 | STATE_FLAG_DIR_LTR StateFlags = C.GTK_STATE_FLAG_DIR_LTR
36 | STATE_FLAG_DIR_RTL StateFlags = C.GTK_STATE_FLAG_DIR_RTL
37 | )
38 |
--------------------------------------------------------------------------------
/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 |
21 | // PopupAtWidget() is a wrapper for gtk_menu_popup_at_widget()
22 | func (v *Menu) PopupAtWidget(widget IWidget, widgetAnchor gdk.GdkGravity, menuAnchor gdk.GdkGravity, triggerEvent *gdk.Event) {
23 | e := (*C.GdkEvent)(unsafe.Pointer(triggerEvent.Native()))
24 | C.gtk_menu_popup_at_widget(v.native(), widget.toWidget(), C.GdkGravity(widgetAnchor), C.GdkGravity(menuAnchor), e)
25 | }
26 |
--------------------------------------------------------------------------------
/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:
--------------------------------------------------------------------------------
1 | package gtk
2 |
3 | // #include
4 | // #include "settings.go.h"
5 | import "C"
6 | import (
7 | "unsafe"
8 |
9 | "github.com/gotk3/gotk3/glib"
10 | )
11 |
12 | func init() {
13 | tm := []glib.TypeMarshaler{
14 | {glib.Type(C.gtk_settings_get_type()), marshalSettings},
15 | }
16 |
17 | glib.RegisterGValueMarshalers(tm)
18 |
19 | WrapMap["GtkSettings"] = wrapSettings
20 | }
21 |
22 | //GtkSettings
23 | type Settings struct {
24 | *glib.Object
25 | }
26 |
27 | func (v *Settings) native() *C.GtkSettings {
28 | if v == nil || v.GObject == nil {
29 | return nil
30 | }
31 |
32 | p := unsafe.Pointer(v.GObject)
33 | return C.toGtkSettings(p)
34 | }
35 |
36 | func marshalSettings(p uintptr) (interface{}, error) {
37 | c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
38 | return wrapSettings(glib.Take(unsafe.Pointer(c))), nil
39 | }
40 |
41 | func wrapSettings(obj *glib.Object) *Settings {
42 | return &Settings{obj}
43 | }
44 |
45 | //Get the global non window specific settings
46 | func SettingsGetDefault() (*Settings, error) {
47 | c := C.gtk_settings_get_default()
48 | if c == nil {
49 | return nil, nilPtrErr
50 | }
51 |
52 | return wrapSettings(glib.Take(unsafe.Pointer(c))), nil
53 | }
54 |
--------------------------------------------------------------------------------
/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/shortcutswindow_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 | // #include
6 | // #include "gtk.go.h"
7 | // #include "shortcutswindow_since_3_22.go.h"
8 | import "C"
9 | import (
10 | "unsafe"
11 |
12 | "github.com/gotk3/gotk3/glib"
13 | )
14 |
15 | func init() {
16 | tm := []glib.TypeMarshaler{
17 | {glib.Type(C.gtk_shortcuts_window_get_type()), marshalShortcutsWindow},
18 | }
19 |
20 | glib.RegisterGValueMarshalers(tm)
21 |
22 | WrapMap["GtkShortcutsWindow"] = wrapShortcutsWindow
23 | }
24 |
25 | /*
26 | * GtkShortcutsWindow
27 | */
28 |
29 | // ShortcutsWindow is a representation of GTK's GtkShortcutsWindow.
30 | type ShortcutsWindow struct {
31 | Window
32 | }
33 |
34 | func (v *ShortcutsWindow) native() *C.GtkShortcutsWindow {
35 | if v == nil || v.GObject == nil {
36 | return nil
37 | }
38 | p := unsafe.Pointer(v.GObject)
39 | return C.toGtkShortcutsWindow(p)
40 | }
41 |
42 | func marshalShortcutsWindow(p uintptr) (interface{}, error) {
43 | c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
44 | obj := glib.Take(unsafe.Pointer(c))
45 | return wrapShortcutsWindow(obj), nil
46 | }
47 |
48 | func wrapShortcutsWindow(obj *glib.Object) *ShortcutsWindow {
49 | return &ShortcutsWindow{Window{Bin{Container{Widget{glib.InitiallyUnowned{obj}}}}}}
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/gtk/shortcutswindow_since_3_22.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 GtkShortcutsWindow *
20 | toGtkShortcutsWindow(void *p)
21 | {
22 | return (GTK_SHORTCUTS_WINDOW(p));
23 | }
--------------------------------------------------------------------------------
/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 |
31 | // GetTransitionRunning is a wrapper around gtk_stack_get_transition_running().
32 | func (v *Stack) GetTransitionRunning() bool {
33 | c := C.gtk_stack_get_transition_running(v.native())
34 | return gobool(c)
35 | }
36 |
--------------------------------------------------------------------------------
/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/widget_since_3_12.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013-2014 Conformal Systems
2 | //
3 | // This file originated from: http://opensource.conformal.com/
4 | //
5 | // Permission to use, copy, modify, and distribute this software for any
6 | // purpose with or without fee is hereby granted, provided that the above
7 | // copyright notice and this permission notice appear in all copies.
8 | //
9 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | // This file includes wrapers for symbols included since GTK 3.12, and
18 | // and should not be included in a build intended to target any older GTK
19 | // versions. To target an older build, such as 3.10, use
20 | // 'go build -tags gtk_3_10'. Otherwise, if no build tags are used, GTK 3.12
21 | // is assumed and this file is built.
22 | // +build !gtk_3_6,!gtk_3_8,!gtk_3_10
23 |
24 | package gtk
25 |
26 | // #cgo pkg-config: gtk+-3.0
27 | // #include
28 | import "C"
29 |
30 | func (v *Widget) SetMarginStart(margin int) {
31 | C.gtk_widget_set_margin_start(v.native(), C.gint(margin))
32 | }
33 |
34 | func (v *Widget) GetMarginStart() int {
35 | c := C.gtk_widget_get_margin_start(v.native())
36 | return int(c)
37 | }
38 |
39 | func (v *Widget) SetMarginEnd(margin int) {
40 | C.gtk_widget_set_margin_end(v.native(), C.gint(margin))
41 | }
42 |
43 | func (v *Widget) GetMarginEnd() int {
44 | c := C.gtk_widget_get_margin_end(v.native())
45 | return int(c)
46 | }
47 |
--------------------------------------------------------------------------------
/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/fontconfig.go.h:
--------------------------------------------------------------------------------
1 |
2 | #include
3 |
4 | static int addFont(char* font) {
5 | FcBool fontAddStatus = FcConfigAppFontAddFile(FcConfigGetCurrent(), font);
6 | return fontAddStatus;
7 | }
--------------------------------------------------------------------------------
/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-glyph-item.go:
--------------------------------------------------------------------------------
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 | package pango
20 |
21 | // #cgo pkg-config: pango
22 | // #include
23 | // #include "pango.go.h"
24 | // #include
25 | import "C"
26 | import (
27 | // "github.com/andre-hub/gotk3/glib"
28 | // "github.com/andre-hub/gotk3/cairo"
29 | "unsafe"
30 | )
31 |
32 | // GlyphItem is a representation of PangoGlyphItem.
33 | type GlyphItem struct {
34 | pangoGlyphItem *C.PangoGlyphItem
35 | }
36 |
37 | // Native returns a pointer to the underlying PangoGlyphItem.
38 | func (v *GlyphItem) Native() uintptr {
39 | return uintptr(unsafe.Pointer(v.native()))
40 | }
41 |
42 | func (v *GlyphItem) native() *C.PangoGlyphItem {
43 | return (*C.PangoGlyphItem)(unsafe.Pointer(v.pangoGlyphItem))
44 | }
45 |
--------------------------------------------------------------------------------
/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/pango.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013-2014 Conformal Systems
2 | //
3 | // This file originated from: http://opensource.conformal.com/
4 | //
5 | // Permission to use, copy, modify, and distribute this software for any
6 | // purpose with or without fee is hereby granted, provided that the above
7 | // copyright notice and this permission notice appear in all copies.
8 | //
9 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | // Go bindings for Pango.
18 | package pango
19 |
20 | // #cgo pkg-config: pango
21 | // #include
22 | // #include "pango.go.h"
23 | import "C"
24 |
25 | // "github.com/andre-hub/gotk3/glib"
26 | // "unsafe"
27 |
28 | func init() {
29 |
30 | }
31 |
32 | /*
33 | * Type conversions
34 | */
35 |
36 | func gbool(b bool) C.gboolean {
37 | if b {
38 | return C.gboolean(1)
39 | }
40 | return C.gboolean(0)
41 | }
42 | func gobool(b C.gboolean) bool {
43 | if b != 0 {
44 | return true
45 | }
46 | return false
47 | }
48 |
49 | /*
50 | * Constantes
51 | */
52 |
53 | const (
54 | SCALE int = 1024
55 | )
56 |
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/pango/pango.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 | #include "pango-attributes.go.h"
24 | #include "pango-layout.go.h"
25 |
26 | #include "pangocairo.go.h"
27 |
28 |
29 | static PangoRectangle *
30 | createPangoRectangle(int x, int y, int width, int height)
31 | {
32 | PangoRectangle *r = (PangoRectangle *)malloc(sizeof(PangoRectangle));
33 | r->x = x;
34 | r->y = y;
35 | r->width = width;
36 | r->height = height;
37 | return r;
38 | }
--------------------------------------------------------------------------------
/vendor/github.com/gotk3/gotk3/pango/pangocairo.go.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unkaktus/onionize/19fc1dbe84d17b0e6e7881d9ff25821a6c4f1136/vendor/github.com/gotk3/gotk3/pango/pangocairo.go.h
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/balloon/README:
--------------------------------------------------------------------------------
1 | Go implementation of Balloon memory-hard hash (https://crypto.stanford.edu/balloon/)
2 | created by Dan Boneh, Henry Corrigan-Gibbs and Stuart Schechter.
3 |
4 | DOCUMENTATION
5 |
6 | https://godoc.org/github.com/nogoegst/balloon
7 |
8 | PUBLIC DOMAIN DEDICATION
9 |
10 | Balloon implementation written in 2017 by Ivan Markin.
11 |
12 | To the extent possible under law, the author has dedicated all copyright
13 | and related and neighboring rights to this software to the public domain
14 | worldwide. This software is distributed without any warranty.
15 | See LICENSE file or http://creativecommons.org/publicdomain/zero/1.0/.
16 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/blake2xb/README:
--------------------------------------------------------------------------------
1 | Go implementation of BLAKE2b collision-resistant cryptographic hash function
2 | and related BLAKE2Xb XOF created by Jean-Philippe Aumasson, Samuel Neves,
3 | Zooko Wilcox-O'Hearn, and Christian Winnerlein (https://blake2.net).
4 |
5 | INSTALLATION
6 |
7 | $ go get github.com/nogoegst/blake2xb
8 |
9 |
10 | DOCUMENTATION
11 |
12 | See http://godoc.org/github.com/nogoegst/blake2xb
13 |
14 |
15 | PUBLIC DOMAIN DEDICATION
16 |
17 | BLAKE2b implementation written in 2012 by Dmitry Chestnykh.
18 | BLAKE2Xb implementation written in 2017 by Ivan Markin.
19 |
20 | To the extent possible under law, the authors have dedicated all copyright
21 | and related and neighboring rights to this software to the public domain
22 | worldwide. This software is distributed without any warranty.
23 | http://creativecommons.org/publicdomain/zero/1.0/
24 |
25 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/blake2xb/xof.go:
--------------------------------------------------------------------------------
1 | // xor.go - definition of XOF interface.
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of blake2xb, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package blake2xb
9 |
10 | import (
11 | "hash"
12 | "io"
13 | )
14 |
15 | type XOFHash interface {
16 | hash.Hash
17 | io.Reader
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/bulb/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | *~
3 | examples/basic/basic
4 | examples/listener/listener
5 | examples/dialer/dialer
6 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/bulb/README.md:
--------------------------------------------------------------------------------
1 | ## bulb - Is not stem
2 | ### Yawning Angel (yawning at torproject dot org)
3 |
4 | bulb is a Go language interface to the Tor control port. It is considerably
5 | lighter in functionality than stem and other controller libraries, and is
6 | intended to be used in combination with`control-spec.txt`.
7 |
8 | It was written primarily as a not-invented-here hack, and the base interface is
9 | more than likely to stay fairly low level, though useful helpers will be added
10 | as I need them.
11 |
12 | Things you should probably use instead:
13 | * [stem](https://stem.torproject.org)
14 | * [txtorcon](https://pypi.python.org/pypi/txtorcon)
15 | * [orc](https://github.com/sycamoreone/orc)
16 |
17 | Bugs:
18 | * bulb does not send the 'QUIT' command before closing the connection.
19 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/bulb/dialer.go:
--------------------------------------------------------------------------------
1 | // dialer.go - Tor backed proxy.Dialer.
2 | //
3 | // To the extent possible under law, Yawning Angel waived all copyright
4 | // and related or neighboring rights to bulb, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package bulb
9 |
10 | import (
11 | "strconv"
12 | "strings"
13 |
14 | "golang.org/x/net/proxy"
15 | )
16 |
17 | // Dialer returns a proxy.Dialer for the given Tor instance.
18 | func (c *Conn) Dialer(auth *proxy.Auth) (proxy.Dialer, error) {
19 | const (
20 | cmdGetInfo = "GETINFO"
21 | socksListeners = "net/listeners/socks"
22 | unixPrefix = "unix:"
23 | )
24 |
25 | // Query for the SOCKS listeners via a GETINFO request.
26 | resp, err := c.Request("%s %s", cmdGetInfo, socksListeners)
27 | if err != nil {
28 | return nil, err
29 | }
30 |
31 | if len(resp.Data) != 1 {
32 | return nil, newProtocolError("no SOCKS listeners configured")
33 | }
34 | splitResp := strings.Split(resp.Data[0], " ")
35 | if len(splitResp) < 1 {
36 | return nil, newProtocolError("no SOCKS listeners configured")
37 | }
38 |
39 | // The first listener will have a "net/listeners/socks=" prefix, and all
40 | // entries are QuotedStrings.
41 | laddrStr := strings.TrimPrefix(splitResp[0], socksListeners+"=")
42 | if laddrStr == splitResp[0] {
43 | return nil, newProtocolError("failed to parse SOCKS listener")
44 | }
45 | laddrStr, _ = strconv.Unquote(laddrStr)
46 |
47 | // Construct the proxyDialer.
48 | if strings.HasPrefix(laddrStr, unixPrefix) {
49 | unixPath := strings.TrimPrefix(laddrStr, unixPrefix)
50 | return proxy.SOCKS5("unix", unixPath, auth, proxy.Direct)
51 | }
52 |
53 | return proxy.SOCKS5("tcp", laddrStr, auth, proxy.Direct)
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/bulb/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/nogoegst/bulb
2 |
3 | require (
4 | github.com/nogoegst/wslpath v0.1.0
5 | golang.org/x/net v0.0.0-20181107093936-a544f70c90f1
6 | )
7 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/bulb/go.sum:
--------------------------------------------------------------------------------
1 | github.com/nogoegst/wslpath v0.1.0 h1:hnUj8S2RSAJoljmOPgzseP3/XEDGy6nExsMI00mqUBs=
2 | github.com/nogoegst/wslpath v0.1.0/go.mod h1:KbpjFJTcFGLrBXgvCodBNB8fE1/ZSNP568f0KGntcSE=
3 | golang.org/x/net v0.0.0-20181107093936-a544f70c90f1 h1:SwqD3GJ9PsSBBVv1HlDeSwjjPSeZjUZQcAgGnwsWpyc=
4 | golang.org/x/net v0.0.0-20181107093936-a544f70c90f1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
5 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/onionutil/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/nogoegst/onionutil
2 |
3 | require golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd
4 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/onionutil/go.sum:
--------------------------------------------------------------------------------
1 | golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd h1:VtIkGDhk0ph3t+THbvXHfMZ8QHgsBO39Nh52+74pq7w=
2 | golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
3 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/onionutil/keyfile.go:
--------------------------------------------------------------------------------
1 | // keyfile.go - operations with onion keyfiles.
2 | //
3 | // To the extent possible under law, Ivan Markin waived all copyright
4 | // and related or neighboring rights to this module of onionutil, using the creative
5 | // commons "cc0" public domain dedication. See LICENSE or
6 | // for full details.
7 |
8 | package onionutil
9 |
10 | import (
11 | "crypto"
12 | "crypto/x509"
13 | "encoding/pem"
14 | "fmt"
15 | "io/ioutil"
16 | )
17 |
18 | func LoadPrivateKeyFile(filename string) (crypto.PrivateKey, crypto.PublicKey, error) {
19 | fileContent, err := ioutil.ReadFile(filename)
20 | if err != nil {
21 | return nil, nil, err
22 | }
23 | block, rest := pem.Decode(fileContent)
24 | if len(rest) == len(fileContent) {
25 | return nil, nil, fmt.Errorf("No vailid PEM blocks found")
26 | }
27 |
28 | switch block.Type {
29 | case "RSA PRIVATE KEY":
30 | sk, err := x509.ParsePKCS1PrivateKey(block.Bytes)
31 | if err != nil {
32 | return nil, nil, err
33 | }
34 | return sk, sk.Public(), err
35 | default:
36 | return nil, nil, fmt.Errorf("Unrecognized type of PEM block")
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/terminal/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 | Copyright (c) 2016 Ivan Markin. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/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 "syscall"
10 |
11 | const ioctlReadTermios = syscall.TIOCGETA
12 | const ioctlWriteTermios = syscall.TIOCSETA
13 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/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 | // These constants are declared here, rather than importing
8 | // them from the syscall package as some syscall packages, even
9 | // on linux, for example gccgo, do not declare them.
10 | const ioctlReadTermios = 0x5401 // syscall.TCGETS
11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS
12 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/textqr/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/nogoegst/textqr
2 |
3 | require rsc.io/qr v0.2.0
4 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/textqr/go.sum:
--------------------------------------------------------------------------------
1 | rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY=
2 | rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs=
3 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/tlspin/util/connection.go:
--------------------------------------------------------------------------------
1 | package tlspinutil
2 |
3 | import (
4 | "crypto/tls"
5 | "crypto/x509"
6 | "net"
7 |
8 | "golang.org/x/crypto/blake2b"
9 | )
10 |
11 | func InitDialWithDialer(dialer *net.Dialer, network, addr string) (conn net.Conn, keydigest []byte, err error) {
12 | tlsConfig := &tls.Config{
13 | InsecureSkipVerify: true,
14 | }
15 | c, err := tls.DialWithDialer(dialer, network, addr, tlsConfig)
16 | if err != nil {
17 | return nil, nil, err
18 | }
19 | connstate := c.ConnectionState()
20 | chainlen := len(connstate.PeerCertificates)
21 | if chainlen > 0 {
22 | peercert := connstate.PeerCertificates[chainlen-1]
23 | der, _ := x509.MarshalPKIXPublicKey(peercert.PublicKey)
24 | hash := blake2b.Sum256(der)
25 | return c, hash[:], nil
26 | }
27 | return c, nil, nil
28 | }
29 |
30 | func InitDial(network, addr string) (conn net.Conn, keydigest []byte, err error) {
31 | return InitDialWithDialer(new(net.Dialer), network, addr)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/tlspin/util/encoding.go:
--------------------------------------------------------------------------------
1 | // encoding.go - encode keys.
2 | //
3 | // To the extent possible under law, Ivan Markin has waived all copyright
4 | // and related or neighboring rights to tlspin, using the Creative
5 | // Commons "CC0" public domain dedication. See LICENSE or
6 | // for full details.
7 | package tlspinutil
8 |
9 | import (
10 | "crypto/ecdsa"
11 | "crypto/rsa"
12 | "crypto/x509"
13 | "encoding/base64"
14 | "encoding/pem"
15 | "errors"
16 | "fmt"
17 | "io/ioutil"
18 | )
19 |
20 | func MarshalPrivateKeyToPEM(sk interface{}) (*pem.Block, error) {
21 | switch k := sk.(type) {
22 | case *rsa.PrivateKey:
23 | block := &pem.Block{
24 | Type: "RSA PRIVATE KEY",
25 | Bytes: x509.MarshalPKCS1PrivateKey(k),
26 | }
27 | return block, nil
28 | case *ecdsa.PrivateKey:
29 | b, err := x509.MarshalECPrivateKey(k)
30 | if err != nil {
31 | return nil, fmt.Errorf("unable to marshal private key: %v", err)
32 | }
33 | block := &pem.Block{
34 | Type: "EC PRIVATE KEY",
35 | Bytes: b,
36 | }
37 | return block, nil
38 | }
39 | return nil, errors.New("unsupported private key type")
40 | }
41 |
42 | func EncodeKey(k []byte) string {
43 | return base64.StdEncoding.EncodeToString(k)
44 | }
45 |
46 | func DecodeKey(data string) ([]byte, error) {
47 | return base64.StdEncoding.DecodeString(data)
48 | }
49 |
50 | //LoadKey loads private key from a file in base64-encoded form
51 | func LoadKeyFromFile(filename string) (string, error) {
52 | b, err := ioutil.ReadFile(filename)
53 | if err != nil {
54 | return "", err
55 | }
56 | return string(b), nil
57 | }
58 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/wslpath/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Ivan Markin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/wslpath/mount/NOTICE:
--------------------------------------------------------------------------------
1 | Docker
2 | Copyright 2012-2017 Docker, Inc.
3 |
4 | This product includes software developed at Docker, Inc. (https://www.docker.com).
5 |
6 | This product contains software (https://github.com/kr/pty) developed
7 | by Keith Rarick, licensed under the MIT License.
8 |
9 | The following is courtesy of our legal counsel:
10 |
11 |
12 | Use and transfer of Docker may be subject to certain restrictions by the
13 | United States and other governments.
14 | It is your responsibility to ensure that your use and/or transfer does not
15 | violate applicable laws.
16 |
17 | For more information, please see https://www.bis.doc.gov
18 |
19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/wslpath/mount/mount.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 |
3 | package mount
4 |
5 | // FilterFunc is a type defining a callback function
6 | // to filter out unwanted entries. It takes a pointer
7 | // to an Info struct, and returns two booleans:
8 | // - skip: true if the entry should be skipped
9 | // - stop: true if parsing should be stopped after the entry
10 | type FilterFunc func(*Info) (skip, stop bool)
11 |
12 | // GetMounts retrieves a list of mounts for the current running process,
13 | // with an optional filter applied (use nil for no filter).
14 | func GetMounts(f FilterFunc) ([]*Info, error) {
15 | return parseMountTable(f)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/wslpath/mount/mountinfo.go:
--------------------------------------------------------------------------------
1 | package mount
2 |
3 | // Info reveals information about a particular mounted filesystem. This
4 | // struct is populated from the content in the /proc//mountinfo file.
5 | type Info struct {
6 | // ID is a unique identifier of the mount (may be reused after umount).
7 | ID int
8 |
9 | // Parent indicates the ID of the mount parent (or of self for the top of the
10 | // mount tree).
11 | Parent int
12 |
13 | // Major indicates one half of the device ID which identifies the device class.
14 | Major int
15 |
16 | // Minor indicates one half of the device ID which identifies a specific
17 | // instance of device.
18 | Minor int
19 |
20 | // Root of the mount within the filesystem.
21 | Root string
22 |
23 | // Mountpoint indicates the mount point relative to the process's root.
24 | Mountpoint string
25 |
26 | // Opts represents mount-specific options.
27 | Opts string
28 |
29 | // Optional represents optional fields.
30 | Optional string
31 |
32 | // Fstype indicates the type of filesystem, such as EXT3.
33 | Fstype string
34 |
35 | // Source indicates filesystem specific information or "none".
36 | Source string
37 |
38 | // VfsOpts represents per super block options.
39 | VfsOpts string
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/nogoegst/wslpath/wslpath_other.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package wslpath
4 |
5 | import "errors"
6 |
7 | var ErrNotImplemented = errors.New("wslpath: not implemented")
8 |
9 | func FromWindows(p string) (string, error) {
10 | return "", ErrNotImplemented
11 | }
12 |
13 | func ToWindows(p string) (string, error) {
14 | return "", ErrNotImplemented
15 | }
16 |
--------------------------------------------------------------------------------
/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/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_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 | import "golang.org/x/sys/cpu"
10 |
11 | func init() {
12 | useAVX2 = cpu.X86.HasAVX2
13 | useAVX = cpu.X86.HasAVX
14 | useSSE4 = cpu.X86.HasSSE41
15 | }
16 |
17 | //go:noescape
18 | func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
19 |
20 | //go:noescape
21 | func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
22 |
23 | //go:noescape
24 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
25 |
26 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
27 | switch {
28 | case useAVX2:
29 | hashBlocksAVX2(h, c, flag, blocks)
30 | case useAVX:
31 | hashBlocksAVX(h, c, flag, blocks)
32 | case useSSE4:
33 | hashBlocksSSE4(h, c, flag, blocks)
34 | default:
35 | hashBlocksGeneric(h, c, flag, blocks)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/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 | import "golang.org/x/sys/cpu"
10 |
11 | func init() {
12 | useSSE4 = cpu.X86.HasSSE41
13 | }
14 |
15 | //go:noescape
16 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
17 |
18 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
19 | if useSSE4 {
20 | hashBlocksSSE4(h, c, flag, blocks)
21 | } else {
22 | hashBlocksGeneric(h, c, flag, blocks)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/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/sha3/hashes_generic.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 gccgo appengine !s390x
6 |
7 | package sha3
8 |
9 | import (
10 | "hash"
11 | )
12 |
13 | // new224Asm returns an assembly implementation of SHA3-224 if available,
14 | // otherwise it returns nil.
15 | func new224Asm() hash.Hash { return nil }
16 |
17 | // new256Asm returns an assembly implementation of SHA3-256 if available,
18 | // otherwise it returns nil.
19 | func new256Asm() hash.Hash { return nil }
20 |
21 | // new384Asm returns an assembly implementation of SHA3-384 if available,
22 | // otherwise it returns nil.
23 | func new384Asm() hash.Hash { return nil }
24 |
25 | // new512Asm returns an assembly implementation of SHA3-512 if available,
26 | // otherwise it returns nil.
27 | func new512Asm() hash.Hash { return nil }
28 |
--------------------------------------------------------------------------------
/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/sha3_s390x.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,!appengine
6 |
7 | #include "textflag.h"
8 |
9 | TEXT ·hasMSA6(SB), NOSPLIT, $16-1
10 | MOVD $0, R0 // KIMD-Query function code
11 | MOVD $tmp-16(SP), R1 // parameter block
12 | XC $16, (R1), (R1) // clear the parameter block
13 | WORD $0xB93E0002 // KIMD --, --
14 | WORD $0x91FC1004 // TM 4(R1), 0xFC (test bits [32-37])
15 | BVS yes
16 |
17 | no:
18 | MOVB $0, ret+0(FP)
19 | RET
20 |
21 | yes:
22 | MOVB $1, ret+0(FP)
23 | RET
24 |
25 | // func kimd(function code, params *[200]byte, src []byte)
26 | TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
27 | MOVD function+0(FP), R0
28 | MOVD params+8(FP), R1
29 | LMG src+16(FP), R2, R3 // R2=base, R3=len
30 |
31 | continue:
32 | WORD $0xB93E0002 // KIMD --, R2
33 | BVS continue // continue if interrupted
34 | MOVD $0, R0 // reset R0 for pre-go1.8 compilers
35 | RET
36 |
37 | // func klmd(function code, params *[200]byte, dst, src []byte)
38 | TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
39 | // TODO: SHAKE support
40 | MOVD function+0(FP), R0
41 | MOVD params+8(FP), R1
42 | LMG dst+16(FP), R2, R3 // R2=base, R3=len
43 | LMG src+40(FP), R4, R5 // R4=base, R5=len
44 |
45 | continue:
46 | WORD $0xB93F0024 // KLMD R2, R4
47 | BVS continue // continue if interrupted
48 | MOVD $0, R0 // reset R0 for pre-go1.8 compilers
49 | RET
50 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/shake_generic.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 gccgo appengine !s390x
6 |
7 | package sha3
8 |
9 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available,
10 | // otherwise it returns nil.
11 | func newShake128Asm() ShakeHash {
12 | return nil
13 | }
14 |
15 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available,
16 | // otherwise it returns nil.
17 | func newShake256Asm() ShakeHash {
18 | return nil
19 | }
20 |
--------------------------------------------------------------------------------
/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/sha3/xor_unaligned.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
6 | // +build !appengine
7 |
8 | package sha3
9 |
10 | import "unsafe"
11 |
12 | func xorInUnaligned(d *state, buf []byte) {
13 | bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))
14 | n := len(buf)
15 | if n >= 72 {
16 | d.a[0] ^= bw[0]
17 | d.a[1] ^= bw[1]
18 | d.a[2] ^= bw[2]
19 | d.a[3] ^= bw[3]
20 | d.a[4] ^= bw[4]
21 | d.a[5] ^= bw[5]
22 | d.a[6] ^= bw[6]
23 | d.a[7] ^= bw[7]
24 | d.a[8] ^= bw[8]
25 | }
26 | if n >= 104 {
27 | d.a[9] ^= bw[9]
28 | d.a[10] ^= bw[10]
29 | d.a[11] ^= bw[11]
30 | d.a[12] ^= bw[12]
31 | }
32 | if n >= 136 {
33 | d.a[13] ^= bw[13]
34 | d.a[14] ^= bw[14]
35 | d.a[15] ^= bw[15]
36 | d.a[16] ^= bw[16]
37 | }
38 | if n >= 144 {
39 | d.a[17] ^= bw[17]
40 | }
41 | if n >= 168 {
42 | d.a[18] ^= bw[18]
43 | d.a[19] ^= bw[19]
44 | d.a[20] ^= bw[20]
45 | }
46 | }
47 |
48 | func copyOutUnaligned(d *state, buf []byte) {
49 | ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
50 | copy(buf, ab[:])
51 | }
52 |
53 | var (
54 | xorIn = xorInUnaligned
55 | copyOut = copyOutUnaligned
56 | )
57 |
58 | const xorImplementationUnaligned = "unaligned"
59 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/proxy/direct.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package proxy
6 |
7 | import (
8 | "net"
9 | )
10 |
11 | type direct struct{}
12 |
13 | // Direct is a direct proxy: one that makes network connections directly.
14 | var Direct = direct{}
15 |
16 | func (direct) Dial(network, addr string) (net.Conn, error) {
17 | return net.Dial(network, addr)
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/proxy/socks5.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package proxy
6 |
7 | import (
8 | "context"
9 | "net"
10 |
11 | "golang.org/x/net/internal/socks"
12 | )
13 |
14 | // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given
15 | // address with an optional username and password.
16 | // See RFC 1928 and RFC 1929.
17 | func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) {
18 | d := socks.NewDialer(network, address)
19 | if forward != nil {
20 | d.ProxyDial = func(_ context.Context, network string, address string) (net.Conn, error) {
21 | return forward.Dial(network, address)
22 | }
23 | }
24 | if auth != nil {
25 | up := socks.UsernamePassword{
26 | Username: auth.User,
27 | Password: auth.Password,
28 | }
29 | d.AuthMethods = []socks.AuthMethod{
30 | socks.AuthMethodNotRequired,
31 | socks.AuthMethodUsernamePassword,
32 | }
33 | d.Authenticate = up.Authenticate
34 | }
35 | return d, nil
36 | }
37 |
--------------------------------------------------------------------------------
/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/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package cpu implements processor feature detection for
6 | // various CPU architectures.
7 | package cpu
8 |
9 | // CacheLinePad is used to pad structs to avoid false sharing.
10 | type CacheLinePad struct{ _ [cacheLineSize]byte }
11 |
12 | // X86 contains the supported CPU features of the
13 | // current X86/AMD64 platform. If the current platform
14 | // is not X86/AMD64 then all feature flags are false.
15 | //
16 | // X86 is padded to avoid false sharing. Further the HasAVX
17 | // and HasAVX2 are only set if the OS supports XMM and YMM
18 | // registers in addition to the CPUID feature bit being set.
19 | var X86 struct {
20 | _ CacheLinePad
21 | HasAES bool // AES hardware implementation (AES NI)
22 | HasADX bool // Multi-precision add-carry instruction extensions
23 | HasAVX bool // Advanced vector extension
24 | HasAVX2 bool // Advanced vector extension 2
25 | HasBMI1 bool // Bit manipulation instruction set 1
26 | HasBMI2 bool // Bit manipulation instruction set 2
27 | HasERMS bool // Enhanced REP for MOVSB and STOSB
28 | HasFMA bool // Fused-multiply-add instructions
29 | HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
30 | HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM
31 | HasPOPCNT bool // Hamming weight instruction POPCNT.
32 | HasSSE2 bool // Streaming SIMD extension 2 (always available on amd64)
33 | HasSSE3 bool // Streaming SIMD extension 3
34 | HasSSSE3 bool // Supplemental streaming SIMD extension 3
35 | HasSSE41 bool // Streaming SIMD extension 4 and 4.1
36 | HasSSE42 bool // Streaming SIMD extension 4 and 4.2
37 | _ CacheLinePad
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | const cacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | const cacheLineSize = 64
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386 amd64 amd64p32
6 | // +build !gccgo
7 |
8 | package cpu
9 |
10 | // cpuid is implemented in cpu_x86.s for gc compiler
11 | // and in cpu_gccgo.c for gccgo.
12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
13 |
14 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
15 | // and in cpu_gccgo.c for gccgo.
16 | func xgetbv() (eax, edx uint32)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo.c:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386 amd64 amd64p32
6 | // +build gccgo
7 |
8 | #include
9 | #include
10 |
11 | // Need to wrap __get_cpuid_count because it's declared as static.
12 | int
13 | gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf,
14 | uint32_t *eax, uint32_t *ebx,
15 | uint32_t *ecx, uint32_t *edx)
16 | {
17 | return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx);
18 | }
19 |
20 | // xgetbv reads the contents of an XCR (Extended Control Register)
21 | // specified in the ECX register into registers EDX:EAX.
22 | // Currently, the only supported value for XCR is 0.
23 | //
24 | // TODO: Replace with a better alternative:
25 | //
26 | // #include
27 | //
28 | // #pragma GCC target("xsave")
29 | //
30 | // void gccgoXgetbv(uint32_t *eax, uint32_t *edx) {
31 | // unsigned long long x = _xgetbv(0);
32 | // *eax = x & 0xffffffff;
33 | // *edx = (x >> 32) & 0xffffffff;
34 | // }
35 | //
36 | // Note that _xgetbv is defined starting with GCC 8.
37 | void
38 | gccgoXgetbv(uint32_t *eax, uint32_t *edx)
39 | {
40 | __asm(" xorl %%ecx, %%ecx\n"
41 | " xgetbv"
42 | : "=a"(*eax), "=d"(*edx));
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386 amd64 amd64p32
6 | // +build gccgo
7 |
8 | package cpu
9 |
10 | //extern gccgoGetCpuidCount
11 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
12 |
13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
14 | var a, b, c, d uint32
15 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
16 | return a, b, c, d
17 | }
18 |
19 | //extern gccgoXgetbv
20 | func gccgoXgetbv(eax, edx *uint32)
21 |
22 | func xgetbv() (eax, edx uint32) {
23 | var a, d uint32
24 | gccgoXgetbv(&a, &d)
25 | return a, d
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build mips64 mips64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build mips mipsle
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build ppc64 ppc64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 128
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | const cacheLineSize = 256
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386 amd64 amd64p32
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 64
10 |
11 | func init() {
12 | maxID, _, _, _ := cpuid(0, 0)
13 |
14 | if maxID < 1 {
15 | return
16 | }
17 |
18 | _, _, ecx1, edx1 := cpuid(1, 0)
19 | X86.HasSSE2 = isSet(26, edx1)
20 |
21 | X86.HasSSE3 = isSet(0, ecx1)
22 | X86.HasPCLMULQDQ = isSet(1, ecx1)
23 | X86.HasSSSE3 = isSet(9, ecx1)
24 | X86.HasFMA = isSet(12, ecx1)
25 | X86.HasSSE41 = isSet(19, ecx1)
26 | X86.HasSSE42 = isSet(20, ecx1)
27 | X86.HasPOPCNT = isSet(23, ecx1)
28 | X86.HasAES = isSet(25, ecx1)
29 | X86.HasOSXSAVE = isSet(27, ecx1)
30 |
31 | osSupportsAVX := false
32 | // For XGETBV, OSXSAVE bit is required and sufficient.
33 | if X86.HasOSXSAVE {
34 | eax, _ := xgetbv()
35 | // Check if XMM and YMM registers have OS support.
36 | osSupportsAVX = isSet(1, eax) && isSet(2, eax)
37 | }
38 |
39 | X86.HasAVX = isSet(28, ecx1) && osSupportsAVX
40 |
41 | if maxID < 7 {
42 | return
43 | }
44 |
45 | _, ebx7, _, _ := cpuid(7, 0)
46 | X86.HasBMI1 = isSet(3, ebx7)
47 | X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX
48 | X86.HasBMI2 = isSet(8, ebx7)
49 | X86.HasERMS = isSet(9, ebx7)
50 | X86.HasADX = isSet(19, ebx7)
51 | }
52 |
53 | func isSet(bitpos uint, value uint32) bool {
54 | return value&(1<> 16) & 0xffff)
26 | }
27 |
28 | // Minor returns the minor component of a Linux device number.
29 | func Minor(dev uint64) uint32 {
30 | return uint32(dev & 0xffff)
31 | }
32 |
33 | // Mkdev returns a Linux device number generated from the given major and minor
34 | // components.
35 | func Mkdev(major, minor uint32) uint64 {
36 | return uint64(((major) << 16) | (minor))
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by the Linux kernel and glibc.
10 | //
11 | // The information below is extracted and adapted from bits/sysmacros.h in the
12 | // glibc sources:
13 | //
14 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
15 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
16 | // number and m is a hex digit of the minor number. This is backward compatible
17 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
18 | // backward compatible with the Linux kernel, which for some architectures uses
19 | // 32-bit dev_t, encoded as mmmM MMmm.
20 |
21 | package unix
22 |
23 | // Major returns the major component of a Linux device number.
24 | func Major(dev uint64) uint32 {
25 | return uint32((dev & 0x3fffffff00000000) >> 32)
26 | }
27 |
28 | // Minor returns the minor component of a Linux device number.
29 | func Minor(dev uint64) uint32 {
30 | return uint32((dev & 0x00000000ffffffff) >> 0)
31 | }
32 |
33 | // Mkdev returns a Linux device number generated from the given major and minor
34 | // components.
35 | func Mkdev(major, minor uint32) uint64 {
36 | var DEVNO64 uint64
37 | DEVNO64 = 0x8000000000000000
38 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
39 | }
40 |
--------------------------------------------------------------------------------
/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_dragonfly.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 Dragonfly'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 DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD 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_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_linux.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 by the Linux kernel and glibc.
7 | //
8 | // The information below is extracted and adapted from bits/sysmacros.h in the
9 | // glibc sources:
10 | //
11 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
12 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
13 | // number and m is a hex digit of the minor number. This is backward compatible
14 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
15 | // backward compatible with the Linux kernel, which for some architectures uses
16 | // 32-bit dev_t, encoded as mmmM MMmm.
17 |
18 | package unix
19 |
20 | // Major returns the major component of a Linux device number.
21 | func Major(dev uint64) uint32 {
22 | major := uint32((dev & 0x00000000000fff00) >> 8)
23 | major |= uint32((dev & 0xfffff00000000000) >> 32)
24 | return major
25 | }
26 |
27 | // Minor returns the minor component of a Linux device number.
28 | func Minor(dev uint64) uint32 {
29 | minor := uint32((dev & 0x00000000000000ff) >> 0)
30 | minor |= uint32((dev & 0x00000ffffff00000) >> 12)
31 | return minor
32 | }
33 |
34 | // Mkdev returns a Linux device number generated from the given major and minor
35 | // components.
36 | func Mkdev(major, minor uint32) uint64 {
37 | dev := (uint64(major) & 0x00000fff) << 8
38 | dev |= (uint64(major) & 0xfffff000) << 32
39 | dev |= (uint64(minor) & 0x000000ff) << 0
40 | dev |= (uint64(minor) & 0xffffff00) << 12
41 | return dev
42 | }
43 |
--------------------------------------------------------------------------------
/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/dirent.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // ParseDirent parses up to max directory entries in buf,
12 | // appending the names to names. It returns the number of
13 | // bytes consumed from buf, the number of entries added
14 | // to names, and the new names slice.
15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
16 | return syscall.ParseDirent(buf, max, names)
17 | }
18 |
--------------------------------------------------------------------------------
/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 aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.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 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
18 | var err error
19 | if errno != 0 {
20 | err = errno
21 | }
22 | return int(valptr), err
23 | }
24 |
25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
28 | if errno == 0 {
29 | return nil
30 | }
31 | return errno
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_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_c.c:
--------------------------------------------------------------------------------
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 !aix
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #define _STRINGIFY2_(x) #x
13 | #define _STRINGIFY_(x) _STRINGIFY2_(x)
14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
15 |
16 | // Call syscall from C code because the gccgo support for calling from
17 | // Go to C does not support varargs functions.
18 |
19 | struct ret {
20 | uintptr_t r;
21 | uintptr_t err;
22 | };
23 |
24 | struct ret
25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
26 | {
27 | struct ret r;
28 |
29 | errno = 0;
30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
31 | r.err = errno;
32 | return r;
33 | }
34 |
35 | uintptr_t
36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
37 | {
38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
39 | }
40 |
--------------------------------------------------------------------------------
/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/ioctl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
12 | //
13 | // To change fd's window size, the req argument should be TIOCSWINSZ.
14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
15 | // TODO: if we get the chance, remove the req parameter and
16 | // hardcode TIOCSWINSZ.
17 | err := ioctlSetWinsize(fd, req, value)
18 | runtime.KeepAlive(value)
19 | return err
20 | }
21 |
22 | // IoctlSetTermios performs an ioctl on fd with a *Termios.
23 | //
24 | // The req value will usually be TCSETA or TIOCSETA.
25 | func IoctlSetTermios(fd int, req uint, value *Termios) error {
26 | // TODO: if we get the chance, remove the req parameter.
27 | err := ioctlSetTermios(fd, req, value)
28 | runtime.KeepAlive(value)
29 | return err
30 | }
31 |
--------------------------------------------------------------------------------
/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 <){
30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
30 | if(/^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
31 | if($line =~ /^(.*)\\$/) {
32 | # Handle continuation
33 | $line = $1;
34 | $_ =~ s/^\s+//;
35 | $line .= $_;
36 | } else {
37 | # New line
38 | $line = $_;
39 | }
40 | next if $line =~ /\\$/;
41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
42 | my $num = $1;
43 | my $proto = $6;
44 | my $compat = $8;
45 | my $name = "$7_$9";
46 |
47 | $name = "$7_$11" if $11 ne '';
48 | $name =~ y/a-z/A-Z/;
49 |
50 | if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
51 | print " $name = $num; // $proto\n";
52 | }
53 | }
54 | }
55 |
56 | print <){
30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $3;
33 | my $name = $4;
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | 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_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint32(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: sec, Nsec: nsec}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int64(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_dragonfly_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,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_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,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_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,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.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 arm,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/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_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_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 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/unix/zptracearm_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptracemips_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mips mips64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMips is the registers used by mips binaries.
11 | type PtraceRegsMips struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMips fetches the registers used by mips binaries.
22 | func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMips sets the registers used by mips binaries.
27 | func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64 is the registers used by mips64 binaries.
32 | type PtraceRegsMips64 struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
43 | func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
48 | func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mipsle mips64le
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMipsle is the registers used by mipsle binaries.
11 | type PtraceRegsMipsle struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
22 | func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
27 | func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64le is the registers used by mips64le binaries.
32 | type PtraceRegsMips64le struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
43 | func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
48 | func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/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/tools/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/tools/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/godoc/vfs/vfs.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 vfs defines types for abstract file system access and provides an
6 | // implementation accessing the file system of the underlying OS.
7 | package vfs // import "golang.org/x/tools/godoc/vfs"
8 |
9 | import (
10 | "io"
11 | "io/ioutil"
12 | "os"
13 | )
14 |
15 | // RootType indicates the type of files contained within a directory.
16 | //
17 | // It is used to indicate whether a directory is the root
18 | // of a GOROOT, a GOPATH, or neither.
19 | // An empty string represents the case when a directory is neither.
20 | type RootType string
21 |
22 | const (
23 | RootTypeGoRoot RootType = "GOROOT"
24 | RootTypeGoPath RootType = "GOPATH"
25 | )
26 |
27 | // The FileSystem interface specifies the methods godoc is using
28 | // to access the file system for which it serves documentation.
29 | type FileSystem interface {
30 | Opener
31 | Lstat(path string) (os.FileInfo, error)
32 | Stat(path string) (os.FileInfo, error)
33 | ReadDir(path string) ([]os.FileInfo, error)
34 | RootType(path string) RootType
35 | String() string
36 | }
37 |
38 | // Opener is a minimal virtual filesystem that can only open regular files.
39 | type Opener interface {
40 | Open(name string) (ReadSeekCloser, error)
41 | }
42 |
43 | // A ReadSeekCloser can Read, Seek, and Close.
44 | type ReadSeekCloser interface {
45 | io.Reader
46 | io.Seeker
47 | io.Closer
48 | }
49 |
50 | // ReadFile reads the file named by path from fs and returns the contents.
51 | func ReadFile(fs Opener, path string) ([]byte, error) {
52 | rc, err := fs.Open(path)
53 | if err != nil {
54 | return nil, err
55 | }
56 | defer rc.Close()
57 | return ioutil.ReadAll(rc)
58 | }
59 |
--------------------------------------------------------------------------------
/vendor/modules.txt:
--------------------------------------------------------------------------------
1 | # github.com/gotk3/gotk3 v0.0.0-20180905040958-020531a77b59
2 | github.com/gotk3/gotk3/gdk
3 | github.com/gotk3/gotk3/glib
4 | github.com/gotk3/gotk3/gtk
5 | github.com/gotk3/gotk3/cairo
6 | github.com/gotk3/gotk3/pango
7 | # github.com/nogoegst/balloon v1.0.0
8 | github.com/nogoegst/balloon
9 | # github.com/nogoegst/blake2xb v1.0.1
10 | github.com/nogoegst/blake2xb
11 | # github.com/nogoegst/bulb v1.1.0
12 | github.com/nogoegst/bulb
13 | github.com/nogoegst/bulb/utils
14 | github.com/nogoegst/bulb/utils/pkcs1
15 | # github.com/nogoegst/fileserver v1.0.0
16 | github.com/nogoegst/fileserver
17 | # github.com/nogoegst/onionutil v1.1.0
18 | github.com/nogoegst/onionutil
19 | github.com/nogoegst/onionutil/pkcs1
20 | github.com/nogoegst/onionutil/torparse
21 | # github.com/nogoegst/pickfs v1.1.0
22 | github.com/nogoegst/pickfs
23 | # github.com/nogoegst/terminal v0.0.0-20161218222815-90cba33d8a32
24 | github.com/nogoegst/terminal
25 | # github.com/nogoegst/textqr v0.0.0-20181213220145-28c55cae7e92
26 | github.com/nogoegst/textqr
27 | # github.com/nogoegst/tlspin v2.1.0+incompatible
28 | github.com/nogoegst/tlspin
29 | github.com/nogoegst/tlspin/util
30 | # github.com/nogoegst/wslpath v0.1.0
31 | github.com/nogoegst/wslpath
32 | github.com/nogoegst/wslpath/mount
33 | # golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd
34 | golang.org/x/crypto/blake2b
35 | golang.org/x/crypto/ed25519
36 | golang.org/x/crypto/sha3
37 | golang.org/x/crypto/ed25519/internal/edwards25519
38 | # golang.org/x/net v0.0.0-20181107093936-a544f70c90f1
39 | golang.org/x/net/proxy
40 | golang.org/x/net/internal/socks
41 | # golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
42 | golang.org/x/sys/unix
43 | golang.org/x/sys/cpu
44 | # golang.org/x/tools v0.0.0-20180910180008-18207bb12d3a
45 | golang.org/x/tools/godoc/vfs
46 | golang.org/x/tools/godoc/vfs/httpfs
47 | golang.org/x/tools/godoc/vfs/zipfs
48 | golang.org/x/tools/godoc/vfs/mapfs
49 | # rsc.io/qr v0.2.0
50 | rsc.io/qr
51 | rsc.io/qr/coding
52 | rsc.io/qr/gf256
53 |
--------------------------------------------------------------------------------
/vendor/rsc.io/qr/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/rsc.io/qr/README.md:
--------------------------------------------------------------------------------
1 | Basic QR encoder.
2 |
3 | go get [-u] rsc.io/qr
4 |
--------------------------------------------------------------------------------
/vendor/rsc.io/qr/go.mod:
--------------------------------------------------------------------------------
1 | module rsc.io/qr
2 |
--------------------------------------------------------------------------------