├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── Gopkg.lock
├── Gopkg.toml
├── LICENSE.txt
├── Makefile
├── README.md
├── assets
└── engarde.png
├── build-scripts
└── build.sh
├── cmd
├── engarde-client
│ ├── main.go
│ ├── nocache.go
│ ├── udpconn.go
│ ├── udpconn_bindtodevice.go
│ └── webserver.go
└── engarde-server
│ ├── main.go
│ ├── nocache.go
│ └── webserver.go
├── engarde.yml.sample
├── go.mod
├── go.sum
├── vendor
├── github.com
│ ├── gobuffalo
│ │ ├── envy
│ │ │ ├── .env
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── LICENSE.txt
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SHOULDERS.md
│ │ │ ├── azure-pipelines.yml
│ │ │ ├── azure-tests.yml
│ │ │ ├── azure.sh
│ │ │ ├── env
│ │ │ ├── envy.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── version.go
│ │ ├── logger
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SHOULDERS.md
│ │ │ ├── azure-pipelines.yml
│ │ │ ├── azure-tests.yml
│ │ │ ├── formatter.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── level.go
│ │ │ ├── logger.go
│ │ │ ├── logrus.go
│ │ │ ├── outable.go
│ │ │ ├── terminal_check.go
│ │ │ ├── terminal_check_appengine.go
│ │ │ └── version.go
│ │ ├── packd
│ │ │ ├── .gitignore
│ │ │ ├── .gometalinter.json
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SHOULDERS.md
│ │ │ ├── azure-pipelines.yml
│ │ │ ├── azure-tests.yml
│ │ │ ├── file.go
│ │ │ ├── file_info.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── interfaces.go
│ │ │ ├── internal
│ │ │ │ └── takeon
│ │ │ │ │ └── github.com
│ │ │ │ │ └── markbates
│ │ │ │ │ └── errx
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── SHOULDERS.md
│ │ │ │ │ ├── azure-pipelines.yml
│ │ │ │ │ ├── azure-tests.yml
│ │ │ │ │ ├── errx.go
│ │ │ │ │ └── version.go
│ │ │ ├── map.go
│ │ │ ├── memory_box.go
│ │ │ ├── skip_walker.go
│ │ │ └── version.go
│ │ └── packr
│ │ │ └── v2
│ │ │ ├── .gometalinter.json
│ │ │ ├── .goreleaser.yml
│ │ │ ├── .goreleaser.yml.plush
│ │ │ ├── LICENSE.txt
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SHOULDERS.md
│ │ │ ├── box.go
│ │ │ ├── box_map.go
│ │ │ ├── deprecated.go
│ │ │ ├── dirs_map.go
│ │ │ ├── file
│ │ │ ├── file.go
│ │ │ ├── info.go
│ │ │ └── resolver
│ │ │ │ ├── disk.go
│ │ │ │ ├── encoding
│ │ │ │ └── hex
│ │ │ │ │ └── hex.go
│ │ │ │ ├── hex_gzip.go
│ │ │ │ ├── ident.go
│ │ │ │ ├── in_memory.go
│ │ │ │ ├── packable.go
│ │ │ │ └── resolver.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── helpers.go
│ │ │ ├── internal
│ │ │ └── takeon
│ │ │ │ └── github.com
│ │ │ │ ├── karrick
│ │ │ │ └── godirwalk
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── debug_development.go
│ │ │ │ │ ├── debug_release.go
│ │ │ │ │ ├── dirent.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── inoWithFileno.go
│ │ │ │ │ ├── inoWithIno.go
│ │ │ │ │ ├── modeType.go
│ │ │ │ │ ├── modeTypeWithType.go
│ │ │ │ │ ├── modeTypeWithoutType.go
│ │ │ │ │ ├── nameWithNamlen.go
│ │ │ │ │ ├── nameWithoutNamlen.go
│ │ │ │ │ ├── readdir.go
│ │ │ │ │ ├── scandir_unix.go
│ │ │ │ │ ├── scandir_windows.go
│ │ │ │ │ ├── scanner.go
│ │ │ │ │ ├── symdir.go
│ │ │ │ │ └── walk.go
│ │ │ │ └── markbates
│ │ │ │ ├── errx
│ │ │ │ ├── .gitignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── SHOULDERS.md
│ │ │ │ ├── azure-pipelines.yml
│ │ │ │ ├── azure-tests.yml
│ │ │ │ ├── errx.go
│ │ │ │ └── version.go
│ │ │ │ ├── oncer
│ │ │ │ ├── .gitignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── deprecate.go
│ │ │ │ ├── log.go
│ │ │ │ ├── log_debug.go
│ │ │ │ └── oncer.go
│ │ │ │ └── safe
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .gometalinter.json
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── safe.go
│ │ │ │ ├── shoulders.md
│ │ │ │ └── version.go
│ │ │ ├── jam
│ │ │ └── parser
│ │ │ │ ├── args.go
│ │ │ │ ├── box.go
│ │ │ │ ├── file.go
│ │ │ │ ├── finder.go
│ │ │ │ ├── gogen.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── prospect.go
│ │ │ │ ├── roots.go
│ │ │ │ └── visitor.go
│ │ │ ├── packr.go
│ │ │ ├── plog
│ │ │ └── plog.go
│ │ │ ├── pointer.go
│ │ │ ├── resolvers_map.go
│ │ │ ├── version.go
│ │ │ └── walk.go
│ ├── joho
│ │ └── godotenv
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENCE
│ │ │ ├── README.md
│ │ │ └── godotenv.go
│ ├── konsorten
│ │ └── go-windows-terminal-sequences
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── go.mod
│ │ │ ├── sequences.go
│ │ │ └── sequences_dummy.go
│ ├── rogpeppe
│ │ └── go-internal
│ │ │ ├── LICENSE
│ │ │ ├── modfile
│ │ │ ├── gopkgin.go
│ │ │ ├── print.go
│ │ │ ├── read.go
│ │ │ └── rule.go
│ │ │ ├── module
│ │ │ └── module.go
│ │ │ └── semver
│ │ │ └── semver.go
│ └── sirupsen
│ │ └── logrus
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── alt_exit.go
│ │ ├── appveyor.yml
│ │ ├── doc.go
│ │ ├── entry.go
│ │ ├── exported.go
│ │ ├── formatter.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── hooks.go
│ │ ├── json_formatter.go
│ │ ├── logger.go
│ │ ├── logrus.go
│ │ ├── terminal_check_appengine.go
│ │ ├── terminal_check_bsd.go
│ │ ├── terminal_check_no_terminal.go
│ │ ├── terminal_check_notappengine.go
│ │ ├── terminal_check_solaris.go
│ │ ├── terminal_check_unix.go
│ │ ├── terminal_check_windows.go
│ │ ├── text_formatter.go
│ │ └── writer.go
├── golang.org
│ └── x
│ │ ├── crypto
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── ssh
│ │ │ └── terminal
│ │ │ ├── terminal.go
│ │ │ ├── util.go
│ │ │ ├── util_aix.go
│ │ │ ├── util_bsd.go
│ │ │ ├── util_linux.go
│ │ │ ├── util_plan9.go
│ │ │ ├── util_solaris.go
│ │ │ └── util_windows.go
│ │ └── sys
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── unix
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_freebsd_arm64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_riscv64.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_netbsd_arm64.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_openbsd_arm64.s
│ │ ├── asm_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_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ioctl.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── pagesize_unix.go
│ │ ├── pledge_openbsd.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── readdirent_getdents.go
│ │ ├── readdirent_getdirentries.go
│ │ ├── sockcmsg_dragonfly.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── sockcmsg_unix_other.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.1_12.go
│ │ ├── syscall_darwin.1_13.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.1_11.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.1_11.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.1_11.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.1_11.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_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_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zptrace386_linux.go
│ │ ├── zptracearm_linux.go
│ │ ├── zptracemips_linux.go
│ │ ├── zptracemipsle_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_386.1_11.go
│ │ ├── zsyscall_darwin_386.1_13.go
│ │ ├── zsyscall_darwin_386.1_13.s
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_386.s
│ │ ├── zsyscall_darwin_amd64.1_11.go
│ │ ├── zsyscall_darwin_amd64.1_13.go
│ │ ├── zsyscall_darwin_amd64.1_13.s
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm.1_11.go
│ │ ├── zsyscall_darwin_arm.1_13.go
│ │ ├── zsyscall_darwin_arm.1_13.s
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm.s
│ │ ├── zsyscall_darwin_arm64.1_11.go
│ │ ├── zsyscall_darwin_arm64.1_13.go
│ │ ├── zsyscall_darwin_arm64.1_13.s
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ └── ztypes_solaris_amd64.go
│ │ └── windows
│ │ ├── aliases.go
│ │ ├── dll_windows.go
│ │ ├── env_windows.go
│ │ ├── eventlog.go
│ │ ├── exec_windows.go
│ │ ├── memory_windows.go
│ │ ├── mkerrors.bash
│ │ ├── mkknownfolderids.bash
│ │ ├── mksyscall.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── security_windows.go
│ │ ├── service.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_windows.go
│ │ ├── types_windows.go
│ │ ├── types_windows_386.go
│ │ ├── types_windows_amd64.go
│ │ ├── types_windows_arm.go
│ │ ├── zerrors_windows.go
│ │ ├── zknownfolderids_windows.go
│ │ └── zsyscall_windows.go
├── gopkg.in
│ └── yaml.v2
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── LICENSE.libyaml
│ │ ├── NOTICE
│ │ ├── README.md
│ │ ├── apic.go
│ │ ├── decode.go
│ │ ├── emitterc.go
│ │ ├── encode.go
│ │ ├── go.mod
│ │ ├── parserc.go
│ │ ├── readerc.go
│ │ ├── resolve.go
│ │ ├── scannerc.go
│ │ ├── sorter.go
│ │ ├── writerc.go
│ │ ├── yaml.go
│ │ ├── yamlh.go
│ │ └── yamlprivateh.go
└── modules.txt
└── webmanager
├── .editorconfig
├── .gitignore
├── README.md
├── angular.json
├── browserslist
├── e2e
├── protractor.conf.js
├── src
│ ├── app.e2e-spec.ts
│ └── app.po.ts
└── tsconfig.e2e.json
├── package-lock.json
├── package.json
├── proxy.conf.json
├── src
├── app
│ ├── animations
│ │ ├── scalein.animation.ts
│ │ └── slideout.animation.ts
│ ├── app-routing.module.ts
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── components
│ │ ├── actionbar
│ │ │ ├── actionbar.component.css
│ │ │ ├── actionbar.component.html
│ │ │ ├── actionbar.component.spec.ts
│ │ │ └── actionbar.component.ts
│ │ └── dialog
│ │ │ ├── dialog.component.html
│ │ │ ├── dialog.component.scss
│ │ │ ├── dialog.component.spec.ts
│ │ │ └── dialog.component.ts
│ ├── models
│ │ ├── iface.model.ts
│ │ ├── resp.model.ts
│ │ └── socket.model.ts
│ ├── modules
│ │ └── material
│ │ │ ├── material.module.spec.ts
│ │ │ └── material.module.ts
│ ├── pipes
│ │ ├── callback.pipe.ts
│ │ ├── sortby.pipe.ts
│ │ └── string2objectfilter.pipe.ts
│ └── services
│ │ ├── actionbar.service.ts
│ │ └── apicaller.service.ts
├── assets
│ ├── .gitkeep
│ └── engarde-detail.png
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── karma.conf.js
├── main.ts
├── polyfills.ts
├── styles.css
├── test.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── tslint.json
├── tsconfig.json
└── tslint.json
/.gitignore:
--------------------------------------------------------------------------------
1 | /dist
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: true
3 | node_js:
4 | - "12.13.0"
5 |
6 | before_script:
7 | - wget -q https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
8 | - sudo tar -xf go1.13.4.linux-amd64.tar.gz
9 | - sudo mv go /usr/local
10 | - export GOPATH=$HOME/go
11 | - export GOROOT=/usr/local/go
12 | - export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
13 | - mkdir -p $HOME/go/src
14 | - mkdir -p $HOME/go/bin
15 | - go get "github.com/gobuffalo/packr/v2/packr2"
16 |
17 | script:
18 | - cd webmanager && npm install && npm run-script build-prod && cd ..
19 | - make
20 |
21 | after_success:
22 | - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd dist && find * -type f -exec echo 'Uploading @{}' \; -exec curl -4 -F 'file=@{}' -F "path=$TRAVIS_BRANCH/{}" -F "key=$UPLOAD_KEY" "$UPLOAD_URL" \;; fi
23 |
--------------------------------------------------------------------------------
/Gopkg.toml:
--------------------------------------------------------------------------------
1 | # Gopkg.toml example
2 | #
3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4 | # for detailed Gopkg.toml documentation.
5 | #
6 | # required = ["github.com/user/thing/cmd/thing"]
7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8 | #
9 | # [[constraint]]
10 | # name = "github.com/user/project"
11 | # version = "1.0.0"
12 | #
13 | # [[constraint]]
14 | # name = "github.com/user/project2"
15 | # branch = "dev"
16 | # source = "github.com/myfork/project2"
17 | #
18 | # [[override]]
19 | # name = "github.com/x/y"
20 | # version = "2.4.0"
21 | #
22 | # [prune]
23 | # non-go = false
24 | # go-tests = true
25 | # unused-packages = true
26 |
27 |
28 | [[constraint]]
29 | name = "github.com/sirupsen/logrus"
30 | version = "1.4.2"
31 |
32 | [[constraint]]
33 | name = "gopkg.in/yaml.v2"
34 | version = "2.2.2"
35 |
36 | [prune]
37 | go-tests = true
38 | unused-packages = true
39 |
--------------------------------------------------------------------------------
/assets/engarde.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/porech/engarde/705f38a5dc5b565de949c060537066dc876d1985/assets/engarde.png
--------------------------------------------------------------------------------
/build-scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | type=$1
4 |
5 | if [ "$type" != "client" ] && [ "$type" != "server" ]; then
6 | echo "Usage: $0 [client|server]"
7 | exit 1
8 | fi
9 |
10 | if [ "$TRAVIS_COMMIT" != "" ]; then
11 | commit=$(echo "$TRAVIS_COMMIT" | head -c 7);
12 | branch="$TRAVIS_BRANCH";
13 | version="$commit ($branch)"
14 | elif [ $(which git) != "" ]; then
15 | commit=$(git rev-parse HEAD | head -c 7);
16 | branch=$(git rev-parse --abbrev-ref HEAD);
17 | version="$commit ($branch) - UNOFFICIAL BUILD"
18 | else
19 | version="UNOFFICIAL BUILD"
20 | fi
21 |
22 | dstArch="$GOARCH"
23 | if [ "$dstArch" = "386" ]; then
24 | dstArch="i386"
25 | fi
26 |
27 | dstName="engarde-$type"
28 | if [ "$GOOS" = "windows" ]; then
29 | dstName="$dstName.exe"
30 | fi
31 |
32 | echo "Building $type for $GOOS $dstArch - ver. $version"
33 | go build -ldflags "-s -w -X 'main.Version=$version'" -o dist/$GOOS/$dstArch/$dstName ./cmd/engarde-$type
34 |
--------------------------------------------------------------------------------
/cmd/engarde-client/udpconn.go:
--------------------------------------------------------------------------------
1 | // +build windows darwin
2 |
3 | package main
4 |
5 | import (
6 | "net"
7 | )
8 |
9 | // In Windows, it's enough to listen on a particular address to bind to its interface
10 | func udpConn(laddr *net.UDPAddr, ifname string) (*net.UDPConn, error) {
11 | return net.ListenUDP("udp", laddr)
12 | }
13 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/porech/engarde/v2
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/gobuffalo/packr/v2 v2.7.1
7 | github.com/rogpeppe/go-internal v1.5.0 // indirect
8 | github.com/sirupsen/logrus v1.4.2
9 | golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a // indirect
10 | golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd // indirect
11 | gopkg.in/yaml.v2 v2.2.2
12 | )
13 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/.env:
--------------------------------------------------------------------------------
1 | # This is a comment
2 | # We can use equal or colon notation
3 | DIR: root
4 | FLAVOUR: none
5 | INSIDE_FOLDER=false
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.pid
7 | coverage
8 | coverage.data
9 | build/*
10 | *.pbxuser
11 | *.mode1v3
12 | .svn
13 | profile
14 | .console_history
15 | .sass-cache/*
16 | solr/
17 | .jhw-cache/
18 | jhw.*
19 | *.sublime*
20 | node_modules/
21 | dist/
22 | generated/
23 | .vendor/
24 | bin/*
25 | gin-bin
26 | .idea/
27 | .vscode
28 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Mark Bates
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/gobuffalo/envy/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright (c) 2018 Mark Bates
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= ""
2 | GO_BIN ?= "go"
3 | GO_ENV ?= "test"
4 |
5 | install:
6 | $(GO_BIN) install -tags ${TAGS} -v .
7 | make tidy
8 |
9 | tidy:
10 | ifeq ($(GO111MODULE),on)
11 | $(GO_BIN) mod tidy
12 | else
13 | echo skipping go mod tidy
14 | endif
15 |
16 | deps:
17 | $(GO_BIN) get -tags ${TAGS} -t ./...
18 | make tidy
19 |
20 | build:
21 | $(GO_BIN) build -v .
22 | make tidy
23 |
24 | test:
25 | $(GO_BIN) test -cover -tags ${TAGS} ./...
26 | make tidy
27 |
28 | ci-deps:
29 | $(GO_BIN) get -tags ${TAGS} -t ./...
30 |
31 | ci-test:
32 | $(GO_BIN) test -tags ${TAGS} -race ./...
33 |
34 | lint:
35 | go get github.com/golangci/golangci-lint/cmd/golangci-lint
36 | golangci-lint run --enable-all
37 | make tidy
38 |
39 | update:
40 | ifeq ($(GO111MODULE),on)
41 | rm go.*
42 | $(GO_BIN) mod init
43 | $(GO_BIN) mod tidy
44 | else
45 | $(GO_BIN) get -u -tags ${TAGS}
46 | endif
47 | make test
48 | make install
49 | make tidy
50 |
51 | release-test:
52 | $(GO_BIN) test -tags ${TAGS} -race ./...
53 | make tidy
54 |
55 | release:
56 | $(GO_BIN) get github.com/gobuffalo/release
57 | make tidy
58 | release -y -f version.go --skip-packr
59 | make tidy
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/SHOULDERS.md:
--------------------------------------------------------------------------------
1 | # github.com/gobuffalo/envy Stands on the Shoulders of Giants
2 |
3 | github.com/gobuffalo/envy does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
8 | * [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew)
9 |
10 | * [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv)
11 |
12 | * [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty)
13 |
14 | * [github.com/kr/pty](https://godoc.org/github.com/kr/pty)
15 |
16 | * [github.com/kr/text](https://godoc.org/github.com/kr/text)
17 |
18 | * [github.com/pmezard/go-difflib](https://godoc.org/github.com/pmezard/go-difflib)
19 |
20 | * [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal)
21 |
22 | * [github.com/stretchr/objx](https://godoc.org/github.com/stretchr/objx)
23 |
24 | * [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify)
25 |
26 | * [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1)
27 |
28 | * [gopkg.in/errgo.v2](https://godoc.org/gopkg.in/errgo.v2)
29 |
30 | * [gopkg.in/yaml.v2](https://godoc.org/gopkg.in/yaml.v2)
31 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/azure-tests.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - task: GoTool@0
3 | inputs:
4 | version: $(go_version)
5 | - task: Bash@3
6 | inputs:
7 | targetType: inline
8 | script: |
9 | mkdir -p "$(GOBIN)"
10 | mkdir -p "$(GOPATH)/pkg"
11 | mkdir -p "$(modulePath)"
12 | shopt -s extglob
13 | mv !(gopath) "$(modulePath)"
14 | displayName: "Setup Go Workspace"
15 | - script: |
16 | go get -t -v ./...
17 | go test -race ./...
18 | workingDirectory: "$(modulePath)"
19 | displayName: "Tests"
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/azure.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -xe
4 |
5 | cat >> .env << EOF
6 | # This is a comment
7 | # We can use equal or colon notation
8 | DIR: root
9 | FLAVOUR: none
10 | INSIDE_FOLDER=false
11 | EOF
12 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/env:
--------------------------------------------------------------------------------
1 | # This is a comment
2 | # We can use equal or colon notation
3 | DIR: root
4 | FLAVOUR: none
5 | INSIDE_FOLDER=false
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gobuffalo/envy
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/davecgh/go-spew v1.1.1 // indirect
7 | github.com/joho/godotenv v1.3.0
8 | github.com/rogpeppe/go-internal v1.3.2
9 | github.com/stretchr/testify v1.4.0
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/envy/version.go:
--------------------------------------------------------------------------------
1 | package envy
2 |
3 | const Version = "v1.7.1"
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Mark Bates
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/gobuffalo/logger/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= ""
2 | GO_BIN ?= "go"
3 |
4 | install:
5 | $(GO_BIN) install -tags ${TAGS} -v .
6 | make tidy
7 |
8 | tidy:
9 | ifeq ($(GO111MODULE),on)
10 | $(GO_BIN) mod tidy
11 | else
12 | echo skipping go mod tidy
13 | endif
14 |
15 | deps:
16 | $(GO_BIN) get -tags ${TAGS} -t ./...
17 | make tidy
18 |
19 | build:
20 | $(GO_BIN) build -v .
21 | make tidy
22 |
23 | test:
24 | $(GO_BIN) test -cover -tags ${TAGS} ./...
25 | make tidy
26 |
27 | ci-deps:
28 | $(GO_BIN) get -tags ${TAGS} -t ./...
29 |
30 | ci-test:
31 | $(GO_BIN) test -tags ${TAGS} -race ./...
32 |
33 | lint:
34 | go get github.com/golangci/golangci-lint/cmd/golangci-lint
35 | golangci-lint run --enable-all
36 | make tidy
37 |
38 | update:
39 | ifeq ($(GO111MODULE),on)
40 | rm go.*
41 | $(GO_BIN) mod init
42 | $(GO_BIN) mod tidy
43 | else
44 | $(GO_BIN) get -u -tags ${TAGS}
45 | endif
46 | make test
47 | make install
48 | make tidy
49 |
50 | release-test:
51 | $(GO_BIN) test -tags ${TAGS} -race ./...
52 | make tidy
53 |
54 | release:
55 | $(GO_BIN) get github.com/gobuffalo/release
56 | make tidy
57 | release -y -f version.go --skip-packr
58 | make tidy
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/README.md:
--------------------------------------------------------------------------------
1 |

2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | # Logger
10 |
11 | The [`logger.Logger`](https://godoc.org/github.com/gobuffalo/logger#Logger) interface is used throughout Buffalo apps, and other systems, to log a whole manner of things.
12 |
13 | ## Installation
14 |
15 | ```bash
16 | $ go get -u github.com/gobuffalo/logger
17 | ```
18 |
19 | ## Documentation
20 |
21 | * [GoDoc](https://godoc.org/github.com/gobuffalo/logger)
22 | * [General Buffalo Documentation](https://gobuffalo.io)
23 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/SHOULDERS.md:
--------------------------------------------------------------------------------
1 | # github.com/gobuffalo/logger Stands on the Shoulders of Giants
2 |
3 | github.com/gobuffalo/logger does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
8 | * [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy)
9 |
10 | * [github.com/konsorten/go-windows-terminal-sequences](https://godoc.org/github.com/konsorten/go-windows-terminal-sequences)
11 |
12 | * [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal)
13 |
14 | * [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus)
15 |
16 | * [golang.org/x/crypto](https://godoc.org/golang.org/x/crypto)
17 |
18 | * [golang.org/x/sys](https://godoc.org/golang.org/x/sys)
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/azure-tests.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - task: GoTool@0
3 | inputs:
4 | version: $(go_version)
5 | - task: Bash@3
6 | inputs:
7 | targetType: inline
8 | script: |
9 | mkdir -p "$(GOBIN)"
10 | mkdir -p "$(GOPATH)/pkg"
11 | mkdir -p "$(modulePath)"
12 | shopt -s extglob
13 | mv !(gopath) "$(modulePath)"
14 | displayName: "Setup Go Workspace"
15 | - script: |
16 | go get -t -v ./...
17 | go test -race ./...
18 | workingDirectory: "$(modulePath)"
19 | displayName: "Tests"
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gobuffalo/logger
2 |
3 | go 1.12
4 |
5 | require (
6 | github.com/gobuffalo/envy v1.7.0
7 | github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
8 | github.com/rogpeppe/go-internal v1.3.0 // indirect
9 | github.com/sirupsen/logrus v1.4.2
10 | golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4
11 | golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 // indirect
12 | )
13 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/level.go:
--------------------------------------------------------------------------------
1 | package logger
2 |
3 | import "github.com/sirupsen/logrus"
4 |
5 | // Level of the logger
6 | type Level = logrus.Level
7 |
8 | const (
9 | // PanicLevel level, highest level of severity. Logs and then calls panic with the
10 | // message passed to Debug, Info, ...
11 | PanicLevel = logrus.PanicLevel
12 | // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
13 | // logging level is set to Panic.
14 | FatalLevel = logrus.FatalLevel
15 | // ErrorLevel level. Logs. Used for errors that should definitely be noted.
16 | // Commonly used for hooks to send errors to an error tracking service.
17 | ErrorLevel = logrus.ErrorLevel
18 | // WarnLevel level. Non-critical entries that deserve eyes.
19 | WarnLevel = logrus.WarnLevel
20 | // InfoLevel level. General operational entries about what's going on inside the
21 | // application.
22 | InfoLevel = logrus.InfoLevel
23 | // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
24 | DebugLevel = logrus.DebugLevel
25 | )
26 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/logrus.go:
--------------------------------------------------------------------------------
1 | package logger
2 |
3 | import (
4 | "io"
5 |
6 | "github.com/sirupsen/logrus"
7 | )
8 |
9 | var _ Logger = Logrus{}
10 | var _ FieldLogger = Logrus{}
11 | var _ Outable = Logrus{}
12 |
13 | // Logrus is a Logger implementation backed by sirupsen/logrus
14 | type Logrus struct {
15 | logrus.FieldLogger
16 | }
17 |
18 | // SetOutput will try and set the output of the underlying
19 | // logrus.FieldLogger if it can
20 | func (l Logrus) SetOutput(w io.Writer) {
21 | if lg, ok := l.FieldLogger.(Outable); ok {
22 | lg.SetOutput(w)
23 | }
24 | }
25 |
26 | // WithField returns a new Logger with the field added
27 | func (l Logrus) WithField(s string, i interface{}) FieldLogger {
28 | return Logrus{l.FieldLogger.WithField(s, i)}
29 | }
30 |
31 | // WithFields returns a new Logger with the fields added
32 | func (l Logrus) WithFields(m map[string]interface{}) FieldLogger {
33 | return Logrus{l.FieldLogger.WithFields(m)}
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/outable.go:
--------------------------------------------------------------------------------
1 | package logger
2 |
3 | import "io"
4 |
5 | // Outable interface for loggers that allow setting the output writer
6 | type Outable interface {
7 | SetOutput(out io.Writer)
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/terminal_check.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 |
3 | package logger
4 |
5 | import (
6 | "io"
7 | "os"
8 |
9 | "golang.org/x/crypto/ssh/terminal"
10 | )
11 |
12 | func checkIfTerminal(w io.Writer) bool {
13 | switch v := w.(type) {
14 | case *os.File:
15 | return terminal.IsTerminal(int(v.Fd()))
16 | default:
17 | return false
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/terminal_check_appengine.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package logger
4 |
5 | import (
6 | "io"
7 | )
8 |
9 | func checkIfTerminal(w io.Writer) bool {
10 | return true
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/logger/version.go:
--------------------------------------------------------------------------------
1 | package logger
2 |
3 | // Version of the logger
4 | const Version = "v1.0.1"
5 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/.gometalinter.json:
--------------------------------------------------------------------------------
1 | {
2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Mark Bates
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/gobuffalo/packd/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= ""
2 | GO_BIN ?= "go"
3 |
4 | install:
5 | $(GO_BIN) install -tags ${TAGS} -v .
6 | make tidy
7 |
8 | tidy:
9 | ifeq ($(GO111MODULE),on)
10 | $(GO_BIN) mod tidy
11 | else
12 | echo skipping go mod tidy
13 | endif
14 |
15 | deps:
16 | $(GO_BIN) get -tags ${TAGS} -t ./...
17 | make tidy
18 |
19 | build:
20 | $(GO_BIN) build -v .
21 | make tidy
22 |
23 | test:
24 | $(GO_BIN) test -cover -tags ${TAGS} ./...
25 | make tidy
26 |
27 | ci-deps:
28 | $(GO_BIN) get -tags ${TAGS} -t ./...
29 |
30 | ci-test:
31 | $(GO_BIN) test -tags ${TAGS} -race ./...
32 |
33 | lint:
34 | go get github.com/golangci/golangci-lint/cmd/golangci-lint
35 | golangci-lint run --enable-all
36 | make tidy
37 |
38 | update:
39 | ifeq ($(GO111MODULE),on)
40 | rm go.*
41 | $(GO_BIN) mod init
42 | $(GO_BIN) mod tidy
43 | else
44 | $(GO_BIN) get -u -tags ${TAGS}
45 | endif
46 | make test
47 | make install
48 | make tidy
49 |
50 | release-test:
51 | $(GO_BIN) test -tags ${TAGS} -race ./...
52 | make tidy
53 |
54 | release:
55 | $(GO_BIN) get github.com/gobuffalo/release
56 | make tidy
57 | release -y -f version.go --skip-packr
58 | make tidy
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | # github.com/gobuffalo/packd
10 |
11 | This is a collection of interfaces designed to make using [github.com/gobuffalo/packr](https://github.com/gobuffalo/packr) easier, and to make the transition between v1 and v2 as seamless as possible.
12 |
13 | They can, and should, be used for testing, alternate Box implementations, etc...
14 |
15 |
16 | ## Installation
17 |
18 | ```bash
19 | $ go get -u -v github.com/gobuffalo/packd
20 | ```
21 |
22 | ## Memory Box
23 |
24 | The [`packd#MemoryBox`](https://godoc.org/github.com/gobuffalo/packd#MemoryBox) is a complete, thread-safe, implementation of [`packd#Box`](https://godoc.org/github.com/gobuffalo/packd#Box)
25 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/SHOULDERS.md:
--------------------------------------------------------------------------------
1 | # github.com/gobuffalo/packd Stands on the Shoulders of Giants
2 |
3 | github.com/gobuffalo/packd does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
8 | * [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew)
9 |
10 | * [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify)
11 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/azure-tests.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - task: GoTool@0
3 | inputs:
4 | version: $(go_version)
5 | - task: Bash@3
6 | inputs:
7 | targetType: inline
8 | script: |
9 | mkdir -p "$(GOBIN)"
10 | mkdir -p "$(GOPATH)/pkg"
11 | mkdir -p "$(modulePath)"
12 | shopt -s extglob
13 | mv !(gopath) "$(modulePath)"
14 | displayName: "Setup Go Workspace"
15 | - script: |
16 | go get -t -v ./...
17 | go test -race ./...
18 | workingDirectory: "$(modulePath)"
19 | displayName: "Tests"
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/file_info.go:
--------------------------------------------------------------------------------
1 | package packd
2 |
3 | import (
4 | "os"
5 | "time"
6 | )
7 |
8 | var _ os.FileInfo = fileInfo{}
9 |
10 | type fileInfo struct {
11 | Path string
12 | size int64
13 | modTime time.Time
14 | isDir bool
15 | }
16 |
17 | func (f fileInfo) Name() string {
18 | return f.Path
19 | }
20 |
21 | func (f fileInfo) Size() int64 {
22 | return f.size
23 | }
24 |
25 | func (f fileInfo) Mode() os.FileMode {
26 | return 0444
27 | }
28 |
29 | func (f fileInfo) ModTime() time.Time {
30 | return f.modTime
31 | }
32 |
33 | func (f fileInfo) IsDir() bool {
34 | return f.isDir
35 | }
36 |
37 | func (f fileInfo) Sys() interface{} {
38 | return nil
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gobuffalo/packd
2 |
3 | go 1.12
4 |
5 | require (
6 | github.com/davecgh/go-spew v1.1.1 // indirect
7 | github.com/stretchr/testify v1.3.0
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
8 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
9 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
10 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Mark Bates
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/gobuffalo/packd/internal/takeon/github.com/markbates/errx/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= ""
2 | GO_BIN ?= "go"
3 |
4 | install:
5 | $(GO_BIN) install -tags ${TAGS} -v .
6 | make tidy
7 |
8 | tidy:
9 | ifeq ($(GO111MODULE),on)
10 | $(GO_BIN) mod tidy
11 | else
12 | echo skipping go mod tidy
13 | endif
14 |
15 | deps:
16 | $(GO_BIN) get -tags ${TAGS} -t ./...
17 | make tidy
18 |
19 | build:
20 | $(GO_BIN) build -v .
21 | make tidy
22 |
23 | test:
24 | $(GO_BIN) test -cover -tags ${TAGS} ./...
25 | make tidy
26 |
27 | ci-deps:
28 | $(GO_BIN) get -tags ${TAGS} -t ./...
29 |
30 | ci-test:
31 | $(GO_BIN) test -tags ${TAGS} -race ./...
32 |
33 | lint:
34 | go get github.com/golangci/golangci-lint/cmd/golangci-lint
35 | golangci-lint run --enable-all
36 | make tidy
37 |
38 | update:
39 | ifeq ($(GO111MODULE),on)
40 | rm go.*
41 | $(GO_BIN) mod init
42 | $(GO_BIN) mod tidy
43 | else
44 | $(GO_BIN) get -u -tags ${TAGS}
45 | endif
46 | make test
47 | make install
48 | make tidy
49 |
50 | release-test:
51 | $(GO_BIN) test -tags ${TAGS} -race ./...
52 | make tidy
53 |
54 | release:
55 | $(GO_BIN) get github.com/gobuffalo/release
56 | make tidy
57 | release -y -f version.go --skip-packr
58 | make tidy
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/SHOULDERS.md:
--------------------------------------------------------------------------------
1 | # github.com/markbates/errx Stands on the Shoulders of Giants
2 |
3 | github.com/markbates/errx does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-tests.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - task: GoTool@0
3 | inputs:
4 | version: $(go_version)
5 | - task: Bash@3
6 | inputs:
7 | targetType: inline
8 | script: |
9 | mkdir -p "$(GOBIN)"
10 | mkdir -p "$(GOPATH)/pkg"
11 | mkdir -p "$(modulePath)"
12 | shopt -s extglob
13 | mv !(gopath) "$(modulePath)"
14 | displayName: "Setup Go Workspace"
15 | - script: |
16 | go get -t -v ./...
17 | go test -race ./...
18 | workingDirectory: "$(modulePath)"
19 | displayName: "Tests"
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/errx.go:
--------------------------------------------------------------------------------
1 | package errx
2 |
3 | // go2 errors
4 | type Wrapper interface {
5 | Unwrap() error
6 | }
7 |
8 | // pkg/errors
9 | type Causer interface {
10 | Cause() error
11 | }
12 |
13 | func Unwrap(err error) error {
14 | switch e := err.(type) {
15 | case Wrapper:
16 | return e.Unwrap()
17 | case Causer:
18 | return e.Cause()
19 | }
20 | return err
21 | }
22 |
23 | var Cause = Unwrap
24 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/version.go:
--------------------------------------------------------------------------------
1 | package errx
2 |
3 | // Version of errx
4 | const Version = "v1.0.0"
5 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/skip_walker.go:
--------------------------------------------------------------------------------
1 | package packd
2 |
3 | import (
4 | "path/filepath"
5 | "strings"
6 | )
7 |
8 | var CommonSkipPrefixes = []string{".", "_", "node_modules", "vendor"}
9 |
10 | // SkipWalker will walk the Walker and call the WalkFunc for files who's directories
11 | // do no match any of the skipPrefixes. If no skipPrefixes are passed, then
12 | // CommonSkipPrefixes is used
13 | func SkipWalker(walker Walker, skipPrefixes []string, wf WalkFunc) error {
14 | if len(skipPrefixes) == 0 {
15 | skipPrefixes = append(skipPrefixes, CommonSkipPrefixes...)
16 | }
17 | return walker.Walk(func(path string, file File) error {
18 | fi, err := file.FileInfo()
19 | if err != nil {
20 | return err
21 | }
22 |
23 | path = strings.Replace(path, "\\", "/", -1)
24 |
25 | parts := strings.Split(path, "/")
26 | if !fi.IsDir() {
27 | parts = parts[:len(parts)-1]
28 | }
29 |
30 | for _, base := range parts {
31 | if base != "." {
32 | for _, skip := range skipPrefixes {
33 | skip = strings.ToLower(skip)
34 | lbase := strings.ToLower(base)
35 | if strings.HasPrefix(lbase, skip) {
36 | return filepath.SkipDir
37 | }
38 | }
39 | }
40 | }
41 | return wf(path, file)
42 | })
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packd/version.go:
--------------------------------------------------------------------------------
1 | package packd
2 |
3 | // Version of packd
4 | const Version = "v0.3.0"
5 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/.gometalinter.json:
--------------------------------------------------------------------------------
1 | {
2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml:
--------------------------------------------------------------------------------
1 | # Code generated by github.com/gobuffalo/release. DO NOT EDIT.
2 | # Edit .goreleaser.yml.plush instead
3 |
4 | builds:
5 | -
6 | goos:
7 | - darwin
8 | - linux
9 | - windows
10 | goarch:
11 | - ppc64le
12 | - 386
13 | - amd64
14 | env:
15 | - CGO_ENABLED=0
16 | ignore:
17 | - goos: darwin
18 | goarch: ppc64le
19 | - goos: windows
20 | goarch: ppc64le
21 | main: ./packr2/main.go
22 | binary: packr2
23 |
24 | checksum:
25 | name_template: 'checksums.txt'
26 |
27 | snapshot:
28 | name_template: "{{ .Tag }}-next"
29 |
30 | changelog:
31 | sort: asc
32 | filters:
33 | exclude:
34 | - '^docs:'
35 | - '^test:'
36 |
37 | brews:
38 | -
39 | github:
40 | owner: gobuffalo
41 | name: homebrew-tap
42 |
43 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush:
--------------------------------------------------------------------------------
1 | builds:
2 | -
3 | goos:
4 | - darwin
5 | - linux
6 | - windows
7 | goarch:
8 | - ppc64le
9 | - 386
10 | - amd64
11 | env:
12 | - CGO_ENABLED=0
13 | ignore:
14 | - goos: darwin
15 | goarch: ppc64le
16 | - goos: windows
17 | goarch: ppc64le
18 | main: ./packr2/main.go
19 | binary: packr2
20 |
21 | checksum:
22 | name_template: 'checksums.txt'
23 |
24 | snapshot:
25 | name_template: "{{ .Tag }}-next"
26 |
27 | changelog:
28 | sort: asc
29 | filters:
30 | exclude:
31 | - '^docs:'
32 | - '^test:'
33 | <%= if (brew) { %>
34 | brews:
35 | -
36 | github:
37 | owner: gobuffalo
38 | name: homebrew-tap
39 | <% } %>
40 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright (c) 2016 Mark Bates
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= "sqlite"
2 | GO_BIN ?= go
3 |
4 | install: deps
5 | echo "installing packr v2"
6 | packr2
7 | $(GO_BIN) install -v ./packr2
8 |
9 | tidy:
10 | ifeq ($(GO111MODULE),on)
11 | $(GO_BIN) mod tidy
12 | else
13 | echo skipping go mod tidy
14 | endif
15 |
16 | deps:
17 | $(GO_BIN) get github.com/gobuffalo/release
18 | $(GO_BIN) get -tags ${TAGS} -t ./...
19 | $(GO_BIN) install -v ./packr2
20 | make tidy
21 |
22 | build: deps
23 | packr2
24 | $(GO_BIN) build -v ./packr2
25 | make tidy
26 |
27 | test:
28 | packr2
29 | $(GO_BIN) test -tags ${TAGS} ./...
30 | make tidy
31 |
32 | lint:
33 | gometalinter --vendor ./... --deadline=1m --skip=internal
34 |
35 | update:
36 | $(GO_BIN) get -u -tags ${TAGS} ./...
37 | make tidy
38 | make install
39 | make test
40 | make tidy
41 |
42 | release-test:
43 | $(GO_BIN) test -tags ${TAGS} -race ./...
44 |
45 | release:
46 | release -y -f version.go
47 | make tidy
48 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/file.go:
--------------------------------------------------------------------------------
1 | package file
2 |
3 | import (
4 | "bytes"
5 | "io"
6 |
7 | "github.com/gobuffalo/packd"
8 | )
9 |
10 | // File represents a virtual, or physical, backing of
11 | // a file object in a Box
12 | type File = packd.File
13 |
14 | // FileMappable types are capable of returning a map of
15 | // path => File
16 | type FileMappable interface {
17 | FileMap() map[string]File
18 | }
19 |
20 | // NewFile returns a virtual File implementation
21 | func NewFile(name string, b []byte) (File, error) {
22 | return packd.NewFile(name, bytes.NewReader(b))
23 | }
24 |
25 | // NewDir returns a virtual dir implementation
26 | func NewDir(name string) (File, error) {
27 | return packd.NewDir(name)
28 | }
29 |
30 | func NewFileR(name string, r io.Reader) (File, error) {
31 | return packd.NewFile(name, r)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/info.go:
--------------------------------------------------------------------------------
1 | package file
2 |
3 | import (
4 | "os"
5 | "time"
6 | )
7 |
8 | type info struct {
9 | Path string
10 | Contents []byte
11 | size int64
12 | modTime time.Time
13 | isDir bool
14 | }
15 |
16 | func (f info) Name() string {
17 | return f.Path
18 | }
19 |
20 | func (f info) Size() int64 {
21 | return f.size
22 | }
23 |
24 | func (f info) Mode() os.FileMode {
25 | return 0444
26 | }
27 |
28 | func (f info) ModTime() time.Time {
29 | return f.modTime
30 | }
31 |
32 | func (f info) IsDir() bool {
33 | return f.isDir
34 | }
35 |
36 | func (f info) Sys() interface{} {
37 | return nil
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/resolver/ident.go:
--------------------------------------------------------------------------------
1 | package resolver
2 |
3 | import (
4 | "path/filepath"
5 | "runtime"
6 | "strings"
7 | )
8 |
9 | func Key(s string) string {
10 | s = strings.Replace(s, "\\", "/", -1)
11 | return s
12 | }
13 |
14 | func OsPath(s string) string {
15 | if runtime.GOOS == "windows" {
16 | s = strings.Replace(s, "/", string(filepath.Separator), -1)
17 | } else {
18 | s = strings.Replace(s, "\\", string(filepath.Separator), -1)
19 | }
20 | return s
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go:
--------------------------------------------------------------------------------
1 | package resolver
2 |
3 | import (
4 | "io/ioutil"
5 |
6 | "github.com/gobuffalo/packd"
7 | "github.com/gobuffalo/packr/v2/file"
8 | "github.com/gobuffalo/packr/v2/plog"
9 | )
10 |
11 | var _ Resolver = &InMemory{}
12 |
13 | type InMemory struct {
14 | *packd.MemoryBox
15 | }
16 |
17 | func (d InMemory) String() string {
18 | return String(&d)
19 | }
20 |
21 | func (d *InMemory) Resolve(box string, name string) (file.File, error) {
22 | b, err := d.MemoryBox.Find(name)
23 | if err != nil {
24 | return nil, err
25 | }
26 | return file.NewFile(name, b)
27 | }
28 |
29 | func (d *InMemory) Pack(name string, f file.File) error {
30 | plog.Debug(d, "Pack", "name", name)
31 | b, err := ioutil.ReadAll(f)
32 | if err != nil {
33 | return err
34 | }
35 | d.AddBytes(name, b)
36 | return nil
37 | }
38 |
39 | func (d *InMemory) FileMap() map[string]file.File {
40 | m := map[string]file.File{}
41 | d.Walk(func(path string, file file.File) error {
42 | m[path] = file
43 | return nil
44 | })
45 | return m
46 | }
47 |
48 | func NewInMemory(files map[string]file.File) *InMemory {
49 | if files == nil {
50 | files = map[string]file.File{}
51 | }
52 | box := packd.NewMemoryBox()
53 |
54 | for p, f := range files {
55 | if b, err := ioutil.ReadAll(f); err == nil {
56 | box.AddBytes(p, b)
57 | }
58 | }
59 |
60 | return &InMemory{
61 | MemoryBox: box,
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/resolver/packable.go:
--------------------------------------------------------------------------------
1 | package resolver
2 |
3 | import "github.com/gobuffalo/packr/v2/file"
4 |
5 | type Packable interface {
6 | Pack(name string, f file.File) error
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/file/resolver/resolver.go:
--------------------------------------------------------------------------------
1 | package resolver
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "os"
7 |
8 | "github.com/gobuffalo/packr/v2/file"
9 | )
10 |
11 | type Resolver interface {
12 | Resolve(string, string) (file.File, error)
13 | }
14 |
15 | func defaultResolver() Resolver {
16 | pwd, _ := os.Getwd()
17 | return &Disk{
18 | Root: pwd,
19 | }
20 | }
21 |
22 | var DefaultResolver = defaultResolver()
23 |
24 | func String(r Resolver) string {
25 | m := map[string]interface{}{
26 | "name": fmt.Sprintf("%T", r),
27 | }
28 | if fm, ok := r.(file.FileMappable); ok {
29 | m["files"] = fm
30 | }
31 | b, _ := json.Marshal(m)
32 | return string(b)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gobuffalo/packr/v2
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/gobuffalo/envy v1.7.1
7 | github.com/gobuffalo/logger v1.0.1
8 | github.com/gobuffalo/packd v0.3.0
9 | github.com/rogpeppe/go-internal v1.4.0
10 | github.com/sirupsen/logrus v1.4.2
11 | github.com/spf13/cobra v0.0.5
12 | github.com/stretchr/testify v1.4.0
13 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
14 | golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3
15 | )
16 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/debug_development.go:
--------------------------------------------------------------------------------
1 | // +build godirwalk_debug
2 |
3 | package godirwalk
4 |
5 | import (
6 | "fmt"
7 | "os"
8 | )
9 |
10 | // debug formats and prints arguments to stderr for development builds
11 | func debug(f string, a ...interface{}) {
12 | // fmt.Fprintf(os.Stderr, f, a...)
13 | os.Stderr.Write([]byte("godirwalk: " + fmt.Sprintf(f, a...)))
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/debug_release.go:
--------------------------------------------------------------------------------
1 | // +build !godirwalk_debug
2 |
3 | package godirwalk
4 |
5 | // debug is a no-op for release builds
6 | func debug(_ string, _ ...interface{}) {}
7 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package godirwalk provides functions to read and traverse directory trees.
3 |
4 | In short, why do I use this library?
5 |
6 | * It's faster than `filepath.Walk`.
7 |
8 | * It's more correct on Windows than `filepath.Walk`.
9 |
10 | * It's more easy to use than `filepath.Walk`.
11 |
12 | * It's more flexible than `filepath.Walk`.
13 |
14 | USAGE
15 |
16 | This library will normalize the provided top level directory name based on the
17 | os-specific path separator by calling `filepath.Clean` on its first
18 | argument. However it always provides the pathname created by using the correct
19 | os-specific path separator when invoking the provided callback function.
20 |
21 | dirname := "some/directory/root"
22 | err := godirwalk.Walk(dirname, &godirwalk.Options{
23 | Callback: func(osPathname string, de *godirwalk.Dirent) error {
24 | fmt.Printf("%s %s\n", de.ModeType(), osPathname)
25 | return nil
26 | },
27 | })
28 |
29 | This library not only provides functions for traversing a file system directory
30 | tree, but also for obtaining a list of immediate descendants of a particular
31 | directory, typically much more quickly than using `os.ReadDir` or
32 | `os.ReadDirnames`.
33 |
34 | dirname := "some/directory"
35 | names, err := godirwalk.ReadDirnames()
36 | */
37 | package godirwalk
38 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/inoWithFileno.go:
--------------------------------------------------------------------------------
1 | // +build dragonfly freebsd openbsd netbsd
2 |
3 | package godirwalk
4 |
5 | import "syscall"
6 |
7 | func inoFromDirent(de *syscall.Dirent) uint64 {
8 | return uint64(de.Fileno)
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/inoWithIno.go:
--------------------------------------------------------------------------------
1 | // +build aix darwin linux nacl solaris
2 |
3 | package godirwalk
4 |
5 | import "syscall"
6 |
7 | func inoFromDirent(de *syscall.Dirent) uint64 {
8 | // cast necessary on file systems that store ino as different type
9 | return uint64(de.Ino)
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/modeType.go:
--------------------------------------------------------------------------------
1 | package godirwalk
2 |
3 | import (
4 | "os"
5 | )
6 |
7 | // modeType returns the mode type of the file system entry identified by
8 | // osPathname by calling os.LStat function, to intentionally not follow symbolic
9 | // links.
10 | //
11 | // Even though os.LStat provides all file mode bits, we want to ensure same
12 | // values returned to caller regardless of whether we obtained file mode bits
13 | // from syscall or stat call. Therefore mask out the additional file mode bits
14 | // that are provided by stat but not by the syscall, so users can rely on their
15 | // values.
16 | func modeType(osPathname string) (os.FileMode, error) {
17 | fi, err := os.Lstat(osPathname)
18 | if err == nil {
19 | return fi.Mode() & os.ModeType, nil
20 | }
21 | return 0, err
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/modeTypeWithType.go:
--------------------------------------------------------------------------------
1 | // +build darwin dragonfly freebsd linux netbsd openbsd
2 |
3 | package godirwalk
4 |
5 | import (
6 | "os"
7 | "path/filepath"
8 | "syscall"
9 | )
10 |
11 | // modeTypeFromDirent converts a syscall defined constant, which is in purview
12 | // of OS, to a constant defined by Go, assumed by this project to be stable.
13 | //
14 | // When the syscall constant is not recognized, this function falls back to a
15 | // Stat on the file system.
16 | func modeTypeFromDirent(de *syscall.Dirent, osDirname, osBasename string) (os.FileMode, error) {
17 | switch de.Type {
18 | case syscall.DT_REG:
19 | return 0, nil
20 | case syscall.DT_DIR:
21 | return os.ModeDir, nil
22 | case syscall.DT_LNK:
23 | return os.ModeSymlink, nil
24 | case syscall.DT_CHR:
25 | return os.ModeDevice | os.ModeCharDevice, nil
26 | case syscall.DT_BLK:
27 | return os.ModeDevice, nil
28 | case syscall.DT_FIFO:
29 | return os.ModeNamedPipe, nil
30 | case syscall.DT_SOCK:
31 | return os.ModeSocket, nil
32 | default:
33 | // If syscall returned unknown type (e.g., DT_UNKNOWN, DT_WHT), then
34 | // resolve actual mode by reading file information.
35 | return modeType(filepath.Join(osDirname, osBasename))
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/modeTypeWithoutType.go:
--------------------------------------------------------------------------------
1 | // +build aix js nacl solaris
2 |
3 | package godirwalk
4 |
5 | import (
6 | "os"
7 | "path/filepath"
8 | "syscall"
9 | )
10 |
11 | // modeTypeFromDirent converts a syscall defined constant, which is in purview
12 | // of OS, to a constant defined by Go, assumed by this project to be stable.
13 | //
14 | // Because some operating system syscall.Dirent structures do not include a Type
15 | // field, fall back on Stat of the file system.
16 | func modeTypeFromDirent(_ *syscall.Dirent, osDirname, osBasename string) (os.FileMode, error) {
17 | return modeType(filepath.Join(osDirname, osBasename))
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/nameWithNamlen.go:
--------------------------------------------------------------------------------
1 | // +build aix darwin dragonfly freebsd netbsd openbsd
2 |
3 | package godirwalk
4 |
5 | import (
6 | "reflect"
7 | "syscall"
8 | "unsafe"
9 | )
10 |
11 | func nameFromDirent(de *syscall.Dirent) []byte {
12 | // Because this GOOS' syscall.Dirent provides a Namlen field that says how
13 | // long the name is, this function does not need to search for the NULL
14 | // byte.
15 | ml := int(de.Namlen)
16 |
17 | // Convert syscall.Dirent.Name, which is array of int8, to []byte, by
18 | // overwriting Cap, Len, and Data slice header fields to values from
19 | // syscall.Dirent fields. Setting the Cap, Len, and Data field values for
20 | // the slice header modifies what the slice header points to, and in this
21 | // case, the name buffer.
22 | var name []byte
23 | sh := (*reflect.SliceHeader)(unsafe.Pointer(&name))
24 | sh.Cap = ml
25 | sh.Len = ml
26 | sh.Data = uintptr(unsafe.Pointer(&de.Name[0]))
27 |
28 | return name
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/scanner.go:
--------------------------------------------------------------------------------
1 | package godirwalk
2 |
3 | import "sort"
4 |
5 | type scanner interface {
6 | Dirent() (*Dirent, error)
7 | Err() error
8 | Name() string
9 | Scan() bool
10 | }
11 |
12 | // sortedScanner enumerates through a directory's contents after reading the
13 | // entire directory and sorting the entries by name. Used by walk to simplify
14 | // its implementation.
15 | type sortedScanner struct {
16 | dd []*Dirent
17 | de *Dirent
18 | }
19 |
20 | func newSortedScanner(osPathname string) (*sortedScanner, error) {
21 | deChildren, err := ReadDirents(osPathname, nil)
22 | if err != nil {
23 | return nil, err
24 | }
25 | sort.Sort(deChildren)
26 | return &sortedScanner{dd: deChildren}, nil
27 | }
28 |
29 | func (d *sortedScanner) Err() error {
30 | d.dd, d.de = nil, nil
31 | return nil
32 | }
33 |
34 | func (d *sortedScanner) Dirent() (*Dirent, error) { return d.de, nil }
35 |
36 | func (d *sortedScanner) Name() string { return d.de.name }
37 |
38 | func (d *sortedScanner) Scan() bool {
39 | if len(d.dd) > 0 {
40 | d.de, d.dd = d.dd[0], d.dd[1:]
41 | return true
42 | }
43 | return false
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk/symdir.go:
--------------------------------------------------------------------------------
1 | package godirwalk
2 |
3 | import "os"
4 |
5 | func isDirectoryOrSymlinkToDirectory(de *Dirent, osPathname string) (bool, error) {
6 | if de.IsDir() {
7 | return true, nil
8 | }
9 | return isSymlinkToDirectory(de, osPathname)
10 | }
11 |
12 | func isSymlinkToDirectory(de *Dirent, osPathname string) (bool, error) {
13 | if !de.IsSymlink() {
14 | return false, nil
15 | }
16 | // Need to resolve the symbolic link's referent in order to respond.
17 | info, err := os.Stat(osPathname)
18 | if err != nil {
19 | return false, err
20 | }
21 | return info.IsDir(), nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Mark Bates
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/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= ""
2 | GO_BIN ?= "go"
3 |
4 | install:
5 | $(GO_BIN) install -tags ${TAGS} -v .
6 | make tidy
7 |
8 | tidy:
9 | ifeq ($(GO111MODULE),on)
10 | $(GO_BIN) mod tidy
11 | else
12 | echo skipping go mod tidy
13 | endif
14 |
15 | deps:
16 | $(GO_BIN) get -tags ${TAGS} -t ./...
17 | make tidy
18 |
19 | build:
20 | $(GO_BIN) build -v .
21 | make tidy
22 |
23 | test:
24 | $(GO_BIN) test -cover -tags ${TAGS} ./...
25 | make tidy
26 |
27 | ci-deps:
28 | $(GO_BIN) get -tags ${TAGS} -t ./...
29 |
30 | ci-test:
31 | $(GO_BIN) test -tags ${TAGS} -race ./...
32 |
33 | lint:
34 | go get github.com/golangci/golangci-lint/cmd/golangci-lint
35 | golangci-lint run --enable-all
36 | make tidy
37 |
38 | update:
39 | ifeq ($(GO111MODULE),on)
40 | rm go.*
41 | $(GO_BIN) mod init
42 | $(GO_BIN) mod tidy
43 | else
44 | $(GO_BIN) get -u -tags ${TAGS}
45 | endif
46 | make test
47 | make install
48 | make tidy
49 |
50 | release-test:
51 | $(GO_BIN) test -tags ${TAGS} -race ./...
52 | make tidy
53 |
54 | release:
55 | $(GO_BIN) get github.com/gobuffalo/release
56 | make tidy
57 | release -y -f version.go --skip-packr
58 | make tidy
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/SHOULDERS.md:
--------------------------------------------------------------------------------
1 | # github.com/markbates/errx Stands on the Shoulders of Giants
2 |
3 | github.com/markbates/errx does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/azure-tests.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - task: GoTool@0
3 | inputs:
4 | version: $(go_version)
5 | - task: Bash@3
6 | inputs:
7 | targetType: inline
8 | script: |
9 | mkdir -p "$(GOBIN)"
10 | mkdir -p "$(GOPATH)/pkg"
11 | mkdir -p "$(modulePath)"
12 | shopt -s extglob
13 | mv !(gopath) "$(modulePath)"
14 | displayName: "Setup Go Workspace"
15 | - script: |
16 | go get -t -v ./...
17 | go test -race ./...
18 | workingDirectory: "$(modulePath)"
19 | displayName: "Tests"
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/errx.go:
--------------------------------------------------------------------------------
1 | package errx
2 |
3 | // go2 errors
4 | type Wrapper interface {
5 | Unwrap() error
6 | }
7 |
8 | // pkg/errors
9 | type Causer interface {
10 | Cause() error
11 | }
12 |
13 | func Unwrap(err error) error {
14 | switch e := err.(type) {
15 | case Wrapper:
16 | return e.Unwrap()
17 | case Causer:
18 | return e.Cause()
19 | }
20 | return err
21 | }
22 |
23 | var Cause = Unwrap
24 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx/version.go:
--------------------------------------------------------------------------------
1 | package errx
2 |
3 | // Version of errx
4 | const Version = "v1.0.0"
5 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Mark Bates
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/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= "sqlite"
2 | GO_BIN ?= go
3 |
4 | install:
5 | packr
6 | $(GO_BIN) install -v .
7 |
8 | deps:
9 | $(GO_BIN) get github.com/gobuffalo/release
10 | $(GO_BIN) get github.com/gobuffalo/packr/packr
11 | $(GO_BIN) get -tags ${TAGS} -t ./...
12 | $(GO_BIN) mod tidy
13 |
14 | build:
15 | packr
16 | $(GO_BIN) build -v .
17 |
18 | test:
19 | packr
20 | $(GO_BIN) test -tags ${TAGS} ./...
21 |
22 | ci-test: deps
23 | $(GO_BIN) test -tags ${TAGS} -race ./...
24 |
25 | lint:
26 | gometalinter --vendor ./... --deadline=1m --skip=internal
27 |
28 | update:
29 | $(GO_BIN) get -u -tags ${TAGS}
30 | $(GO_BIN) mod tidy
31 | packr
32 | make test
33 | make install
34 | $(GO_BIN) mod tidy
35 |
36 | release-test:
37 | $(GO_BIN) test -tags ${TAGS} -race ./...
38 |
39 | release:
40 | release -y -f version.go
41 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/deprecate.go:
--------------------------------------------------------------------------------
1 | package oncer
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | "os"
7 | )
8 |
9 | const deprecated = "DEPRECATED"
10 |
11 | var deprecationWriter io.Writer = os.Stdout
12 |
13 | func Deprecate(depth int, name string, msg string) {
14 | Do(deprecated+name, func() {
15 | fmt.Fprintf(deprecationWriter, "[%s] %s has been deprecated.\n", deprecated, name)
16 | if len(msg) > 0 {
17 | fmt.Fprintf(deprecationWriter, "\t%s\n", msg)
18 | }
19 | })
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/log.go:
--------------------------------------------------------------------------------
1 | //+build !debug
2 |
3 | package oncer
4 |
5 | func log(name string, fn func()) func() {
6 | return fn
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/log_debug.go:
--------------------------------------------------------------------------------
1 | //+build debug
2 |
3 | package oncer
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func log(name string, fn func()) func() {
11 | return func() {
12 | start := time.Now()
13 | if len(name) > 80 {
14 | name = name[(len(name) - 80):]
15 | }
16 | defer fmt.Println(name, time.Now().Sub(start))
17 | fn()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer/oncer.go:
--------------------------------------------------------------------------------
1 | package oncer
2 |
3 | import (
4 | "sync"
5 | )
6 |
7 | var onces = &sync.Map{}
8 |
9 | func Do(name string, fn func()) {
10 | o, _ := onces.LoadOrStore(name, &sync.Once{})
11 | if once, ok := o.(*sync.Once); ok {
12 | once.Do(log(name, fn))
13 | }
14 | }
15 |
16 | func Reset(names ...string) {
17 | if len(names) == 0 {
18 | onces = &sync.Map{}
19 | return
20 | }
21 |
22 | for _, n := range names {
23 | onces.Delete(n)
24 | onces.Delete(deprecated + n)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | doc
4 | tmp
5 | pkg
6 | *.gem
7 | *.pid
8 | coverage
9 | coverage.data
10 | build/*
11 | *.pbxuser
12 | *.mode1v3
13 | .svn
14 | profile
15 | .console_history
16 | .sass-cache/*
17 | .rake_tasks~
18 | *.log.lck
19 | solr/
20 | .jhw-cache/
21 | jhw.*
22 | *.sublime*
23 | node_modules/
24 | dist/
25 | generated/
26 | .vendor/
27 | bin/*
28 | gin-bin
29 | .idea/
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/.gometalinter.json:
--------------------------------------------------------------------------------
1 | {
2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | sudo: false
4 |
5 | matrix:
6 | include:
7 | - go: "1.9.x"
8 | - go: "1.10.x"
9 | - go: "1.11.x"
10 | env:
11 | - GO111MODULE=off
12 | - go: "1.11.x"
13 | env:
14 | - GO111MODULE=on
15 | - go: "tip"
16 | env:
17 | - GO111MODULE=off
18 | - go: "tip"
19 | env:
20 | - GO111MODULE=on
21 | allow_failures:
22 | - go: "tip"
23 |
24 | install: make deps
25 |
26 | script: make ci-test
27 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Mark Bates
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/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/Makefile:
--------------------------------------------------------------------------------
1 | TAGS ?= "sqlite"
2 | GO_BIN ?= go
3 |
4 | install:
5 | packr
6 | $(GO_BIN) install -tags ${TAGS} -v .
7 | make tidy
8 |
9 | tidy:
10 | ifeq ($(GO111MODULE),on)
11 | $(GO_BIN) mod tidy
12 | else
13 | echo skipping go mod tidy
14 | endif
15 |
16 | deps:
17 | $(GO_BIN) get github.com/gobuffalo/release
18 | $(GO_BIN) get github.com/gobuffalo/packr/packr
19 | $(GO_BIN) get -tags ${TAGS} -t ./...
20 | make tidy
21 |
22 | build:
23 | packr
24 | $(GO_BIN) build -v .
25 | make tidy
26 |
27 | test:
28 | packr
29 | $(GO_BIN) test -tags ${TAGS} ./...
30 | make tidy
31 |
32 | ci-test:
33 | $(GO_BIN) test -tags ${TAGS} -race ./...
34 | make tidy
35 |
36 | lint:
37 | gometalinter --vendor ./... --deadline=1m --skip=internal
38 | make tidy
39 |
40 | update:
41 | $(GO_BIN) get -u -tags ${TAGS}
42 | make tidy
43 | packr
44 | make test
45 | make install
46 | make tidy
47 |
48 | release-test:
49 | $(GO_BIN) test -tags ${TAGS} -race ./...
50 | make tidy
51 |
52 | release:
53 | make tidy
54 | release -y -f version.go
55 | make tidy
56 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/safe.go:
--------------------------------------------------------------------------------
1 | package safe
2 |
3 | import (
4 | "errors"
5 | "fmt"
6 | )
7 |
8 | // Run the function safely knowing that if it panics
9 | // the panic will be caught and returned as an error
10 | func Run(fn func()) (err error) {
11 | return RunE(func() error {
12 | fn()
13 | return nil
14 | })
15 | }
16 |
17 | // Run the function safely knowing that if it panics
18 | // the panic will be caught and returned as an error
19 | func RunE(fn func() error) (err error) {
20 | defer func() {
21 | if err != nil {
22 | return
23 | }
24 | if ex := recover(); ex != nil {
25 | if e, ok := ex.(error); ok {
26 | err = e
27 | return
28 | }
29 | err = errors.New(fmt.Sprint(ex))
30 | }
31 | }()
32 | return fn()
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/shoulders.md:
--------------------------------------------------------------------------------
1 | # github.com/markbates/safe Stands on the Shoulders of Giants
2 |
3 | github.com/markbates/safe does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
4 |
5 | Thank you to the following **GIANTS**:
6 |
7 |
8 | * [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe)
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe/version.go:
--------------------------------------------------------------------------------
1 | package safe
2 |
3 | const Version = "v1.0.1"
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | )
7 |
8 | // FromArgs is useful when writing packr store-cmd binaries.
9 | /*
10 | package main
11 |
12 | import (
13 | "log"
14 | "os"
15 |
16 | "github.com/gobuffalo/packr/v2/jam/parser"
17 | "github.com/markbates/s3packr/s3packr"
18 | )
19 |
20 | func main() {
21 | err := parser.FromArgs(os.Args[1:], func(boxes parser.Boxes) error {
22 | for _, box := range boxes {
23 | s3 := s3packr.New(box)
24 | if err := s3.Pack(box); err != nil {
25 | return err
26 | }
27 | }
28 | return nil
29 | })
30 |
31 | if err != nil {
32 | log.Fatal(err)
33 | }
34 | }
35 | */
36 | func FromArgs(args []string, fn func(Boxes) error) error {
37 | if len(args) == 0 {
38 | return fmt.Errorf("you must supply a payload")
39 | }
40 | payload := args[0]
41 | if len(payload) == 0 {
42 | return fmt.Errorf("you must supply a payload")
43 | }
44 |
45 | var boxes Boxes
46 | err := json.Unmarshal([]byte(payload), &boxes)
47 | if err != nil {
48 | return err
49 | }
50 |
51 | return fn(boxes)
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/jam/parser/box.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "encoding/json"
5 | "os"
6 | "strings"
7 | )
8 |
9 | // Box found while parsing a file
10 | type Box struct {
11 | Name string // name of the box
12 | Path string // relative path of folder NewBox("./templates")
13 | AbsPath string // absolute path of Path
14 | Package string // the package name the box was found in
15 | PWD string // the PWD when the parser was run
16 | PackageDir string // the absolute path of the package where the box was found
17 | }
18 |
19 | type Boxes []*Box
20 |
21 | // String - json returned
22 | func (b Box) String() string {
23 | x, _ := json.Marshal(b)
24 | return string(x)
25 | }
26 |
27 | // NewBox stub from the name and the path provided
28 | func NewBox(name string, path string) *Box {
29 | if len(name) == 0 {
30 | name = path
31 | }
32 | name = strings.Replace(name, "\"", "", -1)
33 | pwd, _ := os.Getwd()
34 | box := &Box{
35 | Name: name,
36 | Path: path,
37 | PWD: pwd,
38 | }
39 | return box
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/jam/parser/file.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "bytes"
5 | "io"
6 | "io/ioutil"
7 | "path/filepath"
8 | )
9 |
10 | // File that is to be parsed
11 | type File struct {
12 | io.Reader
13 | Path string
14 | AbsPath string
15 | }
16 |
17 | // Name of the file "app.go"
18 | func (f File) Name() string {
19 | return f.Path
20 | }
21 |
22 | // String returns the contents of the reader
23 | func (f *File) String() string {
24 | src, _ := ioutil.ReadAll(f)
25 | f.Reader = bytes.NewReader(src)
26 | return string(src)
27 | }
28 |
29 | func (s *File) Write(p []byte) (int, error) {
30 | bb := &bytes.Buffer{}
31 | i, err := bb.Write(p)
32 | s.Reader = bb
33 | return i, err
34 | }
35 |
36 | // NewFile takes the name of the file you want to
37 | // write to and a reader to reader from
38 | func NewFile(path string, r io.Reader) *File {
39 | if r == nil {
40 | r = &bytes.Buffer{}
41 | }
42 | if seek, ok := r.(io.Seeker); ok {
43 | seek.Seek(0, 0)
44 | }
45 | abs := path
46 | if !filepath.IsAbs(path) {
47 | abs, _ = filepath.Abs(path)
48 | }
49 | return &File{
50 | Reader: r,
51 | Path: path,
52 | AbsPath: abs,
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/jam/parser/gogen.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "go/ast"
5 | "go/parser"
6 | "go/token"
7 | "io"
8 | "strings"
9 |
10 | "github.com/gobuffalo/packd"
11 | "github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx"
12 | )
13 |
14 | // ParsedFile ...
15 | type ParsedFile struct {
16 | File packd.SimpleFile
17 | FileSet *token.FileSet
18 | Ast *ast.File
19 | Lines []string
20 | }
21 |
22 | // ParseFileMode ...
23 | func ParseFileMode(gf packd.SimpleFile, mode parser.Mode) (ParsedFile, error) {
24 | pf := ParsedFile{
25 | FileSet: token.NewFileSet(),
26 | File: gf,
27 | }
28 |
29 | src := gf.String()
30 | f, err := parser.ParseFile(pf.FileSet, gf.Name(), src, mode)
31 | if err != nil && errx.Unwrap(err) != io.EOF {
32 | return pf, err
33 | }
34 | pf.Ast = f
35 |
36 | pf.Lines = strings.Split(src, "\n")
37 | return pf, nil
38 | }
39 |
40 | // ParseFile ...
41 | func ParseFile(gf packd.SimpleFile) (ParsedFile, error) {
42 | return ParseFileMode(gf, 0)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "os"
5 | "sort"
6 | "strings"
7 |
8 | "github.com/gobuffalo/packr/v2/plog"
9 | )
10 |
11 | // Parser to find boxes
12 | type Parser struct {
13 | Prospects []*File // a list of files to check for boxes
14 | IgnoreImports bool
15 | }
16 |
17 | // Run the parser and run any boxes found
18 | func (p *Parser) Run() (Boxes, error) {
19 | var boxes Boxes
20 | for _, pros := range p.Prospects {
21 | plog.Debug(p, "Run", "parsing", pros.Name())
22 | v := NewVisitor(pros)
23 | pbr, err := v.Run()
24 | if err != nil {
25 | return boxes, err
26 | }
27 | for _, b := range pbr {
28 | plog.Debug(p, "Run", "file", pros.Name(), "box", b.Name)
29 | boxes = append(boxes, b)
30 | }
31 | }
32 |
33 | pwd, _ := os.Getwd()
34 | sort.Slice(boxes, func(a, b int) bool {
35 | b1 := boxes[a]
36 | return !strings.HasPrefix(b1.AbsPath, pwd)
37 | })
38 | return boxes, nil
39 | }
40 |
41 | // New Parser from a list of File
42 | func New(prospects ...*File) *Parser {
43 | return &Parser{
44 | Prospects: prospects,
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/packr.go:
--------------------------------------------------------------------------------
1 | package packr
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/gobuffalo/packr/v2/file/resolver"
7 | "github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe"
8 | "github.com/gobuffalo/packr/v2/jam/parser"
9 | "github.com/gobuffalo/packr/v2/plog"
10 | )
11 |
12 | var boxes = &boxMap{}
13 |
14 | var _ = safe.Run(func() {
15 | p, err := parser.NewFromRoots([]string{}, nil)
16 | if err != nil {
17 | plog.Logger.Error(err)
18 | return
19 | }
20 | boxes, err := p.Run()
21 | if err != nil {
22 | plog.Logger.Error(err)
23 | return
24 | }
25 | for _, box := range boxes {
26 | b := construct(box.Name, box.AbsPath)
27 | _, err = placeBox(b)
28 | if err != nil {
29 | plog.Logger.Error(err)
30 | return
31 | }
32 | }
33 |
34 | })
35 |
36 | func findBox(name string) (*Box, error) {
37 | key := resolver.Key(name)
38 | plog.Debug("packr", "findBox", "name", name, "key", key)
39 |
40 | b, ok := boxes.Load(key)
41 | if !ok {
42 | plog.Debug("packr", "findBox", "name", name, "key", key, "found", ok)
43 | return nil, fmt.Errorf("could not find box %s", name)
44 | }
45 |
46 | plog.Debug(b, "found", "box", b)
47 | return b, nil
48 | }
49 |
50 | func placeBox(b *Box) (*Box, error) {
51 | key := resolver.Key(b.Name)
52 | eb, _ := boxes.LoadOrStore(key, b)
53 |
54 | plog.Debug("packr", "placeBox", "name", eb.Name, "path", eb.Path, "resolution directory", eb.ResolutionDir)
55 | return eb, nil
56 | }
57 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/plog/plog.go:
--------------------------------------------------------------------------------
1 | package plog
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 |
7 | "github.com/gobuffalo/logger"
8 | "github.com/sirupsen/logrus"
9 | )
10 |
11 | var Logger = logger.New(logger.ErrorLevel)
12 |
13 | func Debug(t interface{}, m string, args ...interface{}) {
14 | if len(args)%2 == 1 {
15 | args = append(args, "")
16 | }
17 | f := logrus.Fields{}
18 | for i := 0; i < len(args); i += 2 {
19 | k := fmt.Sprint(args[i])
20 | v := args[i+1]
21 | if s, ok := v.(fmt.Stringer); ok {
22 | f[k] = s.String()
23 | continue
24 | }
25 | if s, ok := v.(string); ok {
26 | f[k] = s
27 | continue
28 | }
29 | if b, err := json.Marshal(v); err == nil {
30 | f[k] = string(b)
31 | continue
32 | }
33 | f[k] = v
34 | }
35 | e := Logger.WithFields(f)
36 | if s, ok := t.(string); ok {
37 | e.Debugf("%s#%s", s, m)
38 | return
39 | }
40 | e.Debugf("%T#%s", t, m)
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/pointer.go:
--------------------------------------------------------------------------------
1 | package packr
2 |
3 | import (
4 | "github.com/gobuffalo/packr/v2/file"
5 | "github.com/gobuffalo/packr/v2/file/resolver"
6 | "github.com/gobuffalo/packr/v2/plog"
7 | )
8 |
9 | // Pointer is a resolvr which resolves
10 | // a file from a different box.
11 | type Pointer struct {
12 | ForwardBox string
13 | ForwardPath string
14 | }
15 |
16 | var _ resolver.Resolver = Pointer{}
17 |
18 | // Resolve attempts to find the file in the specific box
19 | // with the specified key
20 | func (p Pointer) Resolve(box string, path string) (file.File, error) {
21 | plog.Debug(p, "Resolve", "box", box, "path", path, "forward-box", p.ForwardBox, "forward-path", p.ForwardPath)
22 | b, err := findBox(p.ForwardBox)
23 | if err != nil {
24 | return nil, err
25 | }
26 | f, err := b.Resolve(p.ForwardPath)
27 | if err != nil {
28 | return f, err
29 | }
30 | plog.Debug(p, "Resolve", "box", box, "path", path, "file", f)
31 | return file.NewFileR(path, f)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/gobuffalo/packr/v2/version.go:
--------------------------------------------------------------------------------
1 | package packr
2 |
3 | // Version of Packr
4 | const Version = "v2.7.1"
5 |
--------------------------------------------------------------------------------
/vendor/github.com/joho/godotenv/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/vendor/github.com/joho/godotenv/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.x
5 |
6 | os:
7 | - linux
8 | - osx
9 |
--------------------------------------------------------------------------------
/vendor/github.com/joho/godotenv/LICENCE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 John Barton
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/konsorten/go-windows-terminal-sequences
2 |
--------------------------------------------------------------------------------
/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package sequences
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | var (
11 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll")
12 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode")
13 | )
14 |
15 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error {
16 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4
17 |
18 | var mode uint32
19 | err := syscall.GetConsoleMode(syscall.Stdout, &mode)
20 | if err != nil {
21 | return err
22 | }
23 |
24 | if enable {
25 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING
26 | } else {
27 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING
28 | }
29 |
30 | ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode))
31 | if ret == 0 {
32 | return err
33 | }
34 |
35 | return nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go:
--------------------------------------------------------------------------------
1 | // +build linux darwin
2 |
3 | package sequences
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error {
10 | return fmt.Errorf("windows only package")
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/.gitignore:
--------------------------------------------------------------------------------
1 | logrus
2 | vendor
3 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go_import_path: github.com/sirupsen/logrus
3 | git:
4 | depth: 1
5 | env:
6 | - GO111MODULE=on
7 | - GO111MODULE=off
8 | go: [ 1.11.x, 1.12.x ]
9 | os: [ linux, osx ]
10 | matrix:
11 | exclude:
12 | - go: 1.12.x
13 | env: GO111MODULE=off
14 | - go: 1.11.x
15 | os: osx
16 | install:
17 | - ./travis/install.sh
18 | - if [[ "$GO111MODULE" == "on" ]]; then go mod download; fi
19 | - if [[ "$GO111MODULE" == "off" ]]; then go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences; fi
20 | script:
21 | - ./travis/cross_build.sh
22 | - export GOMAXPROCS=4
23 | - export GORACE=halt_on_error=1
24 | - go test -race -v ./...
25 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi
26 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Simon Eskildsen
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
13 | all 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
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: "{build}"
2 | platform: x64
3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus
4 | environment:
5 | GOPATH: c:\gopath
6 | branches:
7 | only:
8 | - master
9 | install:
10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
11 | - go version
12 | build_script:
13 | - go get -t
14 | - go test
15 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
3 |
4 |
5 | The simplest way to use Logrus is simply the package-level exported logger:
6 |
7 | package main
8 |
9 | import (
10 | log "github.com/sirupsen/logrus"
11 | )
12 |
13 | func main() {
14 | log.WithFields(log.Fields{
15 | "animal": "walrus",
16 | "number": 1,
17 | "size": 10,
18 | }).Info("A walrus appears")
19 | }
20 |
21 | Output:
22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
23 |
24 | For a full guide visit https://github.com/sirupsen/logrus
25 | */
26 | package logrus
27 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/sirupsen/logrus
2 |
3 | require (
4 | github.com/davecgh/go-spew v1.1.1 // indirect
5 | github.com/konsorten/go-windows-terminal-sequences v1.0.1
6 | github.com/pmezard/go-difflib v1.0.0 // indirect
7 | github.com/stretchr/objx v0.1.1 // indirect
8 | github.com/stretchr/testify v1.2.2
9 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/hooks.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | // A hook to be fired when logging on the logging levels returned from
4 | // `Levels()` on your implementation of the interface. Note that this is not
5 | // fired in a goroutine or a channel with workers, you should handle such
6 | // functionality yourself if your call is non-blocking and you don't wish for
7 | // the logging calls for levels returned from `Levels()` to block.
8 | type Hook interface {
9 | Levels() []Level
10 | Fire(*Entry) error
11 | }
12 |
13 | // Internal type for storing the hooks on a logger instance.
14 | type LevelHooks map[Level][]Hook
15 |
16 | // Add a hook to an instance of logger. This is called with
17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
18 | func (hooks LevelHooks) Add(hook Hook) {
19 | for _, level := range hook.Levels() {
20 | hooks[level] = append(hooks[level], hook)
21 | }
22 | }
23 |
24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire
25 | // appropriate hooks for a log entry.
26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
27 | for _, hook := range hooks[level] {
28 | if err := hook.Fire(entry); err != nil {
29 | return err
30 | }
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package logrus
4 |
5 | import (
6 | "io"
7 | )
8 |
9 | func checkIfTerminal(w io.Writer) bool {
10 | return true
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go:
--------------------------------------------------------------------------------
1 | // +build darwin dragonfly freebsd netbsd openbsd
2 |
3 | package logrus
4 |
5 | import "golang.org/x/sys/unix"
6 |
7 | const ioctlReadTermios = unix.TIOCGETA
8 |
9 | func isTerminal(fd int) bool {
10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
11 | return err == nil
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go:
--------------------------------------------------------------------------------
1 | // +build js nacl plan9
2 |
3 | package logrus
4 |
5 | import (
6 | "io"
7 | )
8 |
9 | func checkIfTerminal(w io.Writer) bool {
10 | return false
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go:
--------------------------------------------------------------------------------
1 | // +build !appengine,!js,!windows,!nacl,!plan9
2 |
3 | package logrus
4 |
5 | import (
6 | "io"
7 | "os"
8 | )
9 |
10 | func checkIfTerminal(w io.Writer) bool {
11 | switch v := w.(type) {
12 | case *os.File:
13 | return isTerminal(int(v.Fd()))
14 | default:
15 | return false
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | import (
4 | "golang.org/x/sys/unix"
5 | )
6 |
7 | // IsTerminal returns true if the given file descriptor is a terminal.
8 | func isTerminal(fd int) bool {
9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA)
10 | return err == nil
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_unix.go:
--------------------------------------------------------------------------------
1 | // +build linux aix
2 |
3 | package logrus
4 |
5 | import "golang.org/x/sys/unix"
6 |
7 | const ioctlReadTermios = unix.TCGETS
8 |
9 | func isTerminal(fd int) bool {
10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
11 | return err == nil
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/vendor/github.com/sirupsen/logrus/terminal_check_windows.go:
--------------------------------------------------------------------------------
1 | // +build !appengine,!js,windows
2 |
3 | package logrus
4 |
5 | import (
6 | "io"
7 | "os"
8 | "syscall"
9 |
10 | sequences "github.com/konsorten/go-windows-terminal-sequences"
11 | )
12 |
13 | func initTerminal(w io.Writer) {
14 | switch v := w.(type) {
15 | case *os.File:
16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
17 | }
18 | }
19 |
20 | func checkIfTerminal(w io.Writer) bool {
21 | var ret bool
22 | switch v := w.(type) {
23 | case *os.File:
24 | var mode uint32
25 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
26 | ret = (err == nil)
27 | default:
28 | ret = false
29 | }
30 | if ret {
31 | initTerminal(w)
32 | }
33 | return ret
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/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/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/ssh/terminal/util_aix.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 |
7 | package terminal
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const ioctlReadTermios = unix.TCGETS
12 | const ioctlWriteTermios = unix.TCSETS
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd netbsd openbsd
6 |
7 | package terminal
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const ioctlReadTermios = unix.TIOCGETA
12 | const ioctlWriteTermios = unix.TIOCSETA
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package terminal
6 |
7 | import "golang.org/x/sys/unix"
8 |
9 | const ioctlReadTermios = unix.TCGETS
10 | const ioctlWriteTermios = unix.TCSETS
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/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/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/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build go1.9
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | type Signal = syscall.Signal
13 | type Errno = syscall.Errno
14 | type SysProcAttr = syscall.SysProcAttr
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
21 | BL runtime·entersyscall(SB)
22 | MOVD a1+8(FP), R0
23 | MOVD a2+16(FP), R1
24 | MOVD a3+24(FP), R2
25 | MOVD $0, R3
26 | MOVD $0, R4
27 | MOVD $0, R5
28 | MOVD trap+0(FP), R8 // syscall entry
29 | SVC
30 | MOVD R0, r1+32(FP) // r1
31 | MOVD R1, r2+40(FP) // r2
32 | BL runtime·exitsyscall(SB)
33 | RET
34 |
35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
36 | B syscall·RawSyscall(SB)
37 |
38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
39 | B syscall·RawSyscall6(SB)
40 |
41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
42 | MOVD a1+8(FP), R0
43 | MOVD a2+16(FP), R1
44 | MOVD a3+24(FP), R2
45 | MOVD $0, R3
46 | MOVD $0, R4
47 | MOVD $0, R5
48 | MOVD trap+0(FP), R8 // syscall entry
49 | SVC
50 | MOVD R0, r1+32(FP)
51 | MOVD R1, r2+40(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | JAL runtime·entersyscall(SB)
26 | MOVV a1+8(FP), R4
27 | MOVV a2+16(FP), R5
28 | MOVV a3+24(FP), R6
29 | MOVV R0, R7
30 | MOVV R0, R8
31 | MOVV R0, R9
32 | MOVV trap+0(FP), R2 // syscall entry
33 | SYSCALL
34 | MOVV R2, r1+32(FP)
35 | MOVV R3, r2+40(FP)
36 | JAL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | JMP syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | JMP syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVV a1+8(FP), R4
47 | MOVV a2+16(FP), R5
48 | MOVV a3+24(FP), R6
49 | MOVV R0, R7
50 | MOVV R0, R8
51 | MOVV R0, R9
52 | MOVV trap+0(FP), R2 // syscall entry
53 | SYSCALL
54 | MOVV R2, r1+32(FP)
55 | MOVV R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
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 linux
6 | // +build mips mipsle
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-28
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
28 | JAL runtime·entersyscall(SB)
29 | MOVW a1+4(FP), R4
30 | MOVW a2+8(FP), R5
31 | MOVW a3+12(FP), R6
32 | MOVW R0, R7
33 | MOVW trap+0(FP), R2 // syscall entry
34 | SYSCALL
35 | MOVW R2, r1+16(FP) // r1
36 | MOVW R3, r2+20(FP) // r2
37 | JAL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVW a1+4(FP), R4
48 | MOVW a2+8(FP), R5
49 | MOVW a3+12(FP), R6
50 | MOVW trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVW R2, r1+16(FP)
53 | MOVW R3, r2+20(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
19 | BL runtime·entersyscall(SB)
20 | MOVD a1+8(FP), R3
21 | MOVD a2+16(FP), R4
22 | MOVD a3+24(FP), R5
23 | MOVD R0, R6
24 | MOVD R0, R7
25 | MOVD R0, R8
26 | MOVD trap+0(FP), R9 // syscall entry
27 | SYSCALL R9
28 | MOVD R3, r1+32(FP)
29 | MOVD R4, r2+40(FP)
30 | BL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
34 | MOVD a1+8(FP), R3
35 | MOVD a2+16(FP), R4
36 | MOVD a3+24(FP), R5
37 | MOVD R0, R6
38 | MOVD R0, R7
39 | MOVD R0, R8
40 | MOVD trap+0(FP), R9 // syscall entry
41 | SYSCALL R9
42 | MOVD R3, r1+32(FP)
43 | MOVD R4, r2+40(FP)
44 | RET
45 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build riscv64,!gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for linux/riscv64.
11 | //
12 | // Where available, just jump to package syscall's implementation of
13 | // these functions.
14 |
15 | TEXT ·Syscall(SB),NOSPLIT,$0-56
16 | JMP syscall·Syscall(SB)
17 |
18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 | JMP syscall·Syscall6(SB)
20 |
21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
22 | CALL runtime·entersyscall(SB)
23 | MOV a1+8(FP), A0
24 | MOV a2+16(FP), A1
25 | MOV a3+24(FP), A2
26 | MOV $0, A3
27 | MOV $0, A4
28 | MOV $0, A5
29 | MOV $0, A6
30 | MOV trap+0(FP), A7 // syscall entry
31 | ECALL
32 | MOV A0, r1+32(FP) // r1
33 | MOV A1, r2+40(FP) // r2
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOV a1+8(FP), A0
45 | MOV a2+16(FP), A1
46 | MOV a3+24(FP), A2
47 | MOV ZERO, A3
48 | MOV ZERO, A4
49 | MOV ZERO, A5
50 | MOV trap+0(FP), A7 // syscall entry
51 | ECALL
52 | MOV A0, r1+32(FP)
53 | MOV A1, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
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 s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R2
27 | MOVD a2+16(FP), R3
28 | MOVD a3+24(FP), R4
29 | MOVD $0, R5
30 | MOVD $0, R6
31 | MOVD $0, R7
32 | MOVD trap+0(FP), R1 // syscall entry
33 | SYSCALL
34 | MOVD R2, r1+32(FP)
35 | MOVD R3, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R2
47 | MOVD a2+16(FP), R3
48 | MOVD a3+24(FP), R4
49 | MOVD $0, R5
50 | MOVD $0, R6
51 | MOVD $0, R7
52 | MOVD trap+0(FP), R1 // syscall entry
53 | SYSCALL
54 | MOVD R2, r1+32(FP)
55 | MOVD R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for arm64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev >> 16) & 0xffff)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32(dev & 0xffff)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | return uint64(((major) << 16) | (minor))
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_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 AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev & 0x3fffffff00000000) >> 32)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32((dev & 0x00000000ffffffff) >> 0)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | var DEVNO64 uint64
27 | DEVNO64 = 0x8000000000000000
28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
29 | }
30 |
--------------------------------------------------------------------------------
/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_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
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 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_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
--------------------------------------------------------------------------------
/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/fdset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | // Set adds fd to the set fds.
10 | func (fds *FdSet) Set(fd int) {
11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12 | }
13 |
14 | // Clear removes fd from the set fds.
15 | func (fds *FdSet) Clear(fd int) {
16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17 | }
18 |
19 | // IsSet returns whether fd is in the set fds.
20 | func (fds *FdSet) IsSet(fd int) bool {
21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22 | }
23 |
24 | // Zero clears the set fds.
25 | func (fds *FdSet) Zero() {
26 | for i := range fds.Bits {
27 | fds.Bits[i] = 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_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/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,race linux,race freebsd,race
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | // ReadDirent reads directory entries from fd and writes them into buf.
10 | func ReadDirent(fd int, buf []byte) (n int, err error) {
11 | return Getdents(fd, buf)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // ReadDirent reads directory entries from fd and writes them into buf.
12 | func ReadDirent(fd int, buf []byte) (n int, err error) {
13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
15 | // actual system call is getdirentries64, 64 is a good guess.
16 | // TODO(rsc): Can we use a single global basep for all calls?
17 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
18 | return Getdirentries(fd, buf, base)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_linux.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 | // Socket control messages
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // UnixCredentials encodes credentials into a socket control message
12 | // for sending to another process. This can be used for
13 | // authentication.
14 | func UnixCredentials(ucred *Ucred) []byte {
15 | b := make([]byte, CmsgSpace(SizeofUcred))
16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
17 | h.Level = SOL_SOCKET
18 | h.Type = SCM_CREDENTIALS
19 | h.SetLen(CmsgLen(SizeofUcred))
20 | *(*Ucred)(h.data(0)) = *ucred
21 | return b
22 | }
23 |
24 | // ParseUnixCredentials decodes a socket control message that contains
25 | // credentials in a Ucred structure. To receive such a message, the
26 | // SO_PASSCRED option must be enabled on the socket.
27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
28 | if m.Header.Level != SOL_SOCKET {
29 | return nil, EINVAL
30 | }
31 | if m.Header.Type != SCM_CREDENTIALS {
32 | return nil, EINVAL
33 | }
34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
35 | return &ucred, nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | )
12 |
13 | // Round the length of a raw sockaddr up to align it properly.
14 | func cmsgAlignOf(salen int) int {
15 | salign := SizeofPtr
16 |
17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
18 | // sockcmsg_dragonfly.go
19 | switch runtime.GOOS {
20 | case "aix":
21 | // There is no alignment on AIX.
22 | salign = 1
23 | case "darwin", "illumos", "solaris":
24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
25 | // kernels still require 32-bit aligned access to network
26 | // subsystem.
27 | if SizeofPtr == 8 {
28 | salign = 4
29 | }
30 | case "netbsd", "openbsd":
31 | // NetBSD and OpenBSD armv7 require 64-bit alignment.
32 | if runtime.GOARCH == "arm" {
33 | salign = 8
34 | }
35 | }
36 |
37 | return (salen + salign - 1) & ^(salign - 1)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + uitoa(uint(-val))
12 | }
13 | return uitoa(uint(val))
14 | }
15 |
16 | func uitoa(val uint) string {
17 | var buf [32]byte // big enough for int64
18 | i := len(buf) - 1
19 | for val >= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,go1.12,!go1.13
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
14 | // To implement this using libSystem we'd need syscall_syscallPtr for
15 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
16 | // back to raw syscalls for this func on Go 1.12.
17 | var p unsafe.Pointer
18 | if len(buf) > 0 {
19 | p = unsafe.Pointer(&buf[0])
20 | } else {
21 | p = unsafe.Pointer(&_zero)
22 | }
23 | r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
24 | n = int(r0)
25 | if e1 != 0 {
26 | return n, errnoErr(e1)
27 | }
28 | return n, nil
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,386,!go1.12
6 |
7 | package unix
8 |
9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,amd64,!go1.12
6 |
7 | package unix
8 |
9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,386,!go1.12
6 |
7 | package unix
8 |
9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
10 | return 0, ENOSYS
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,arm64,!go1.12
6 |
7 | package unix
8 |
9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
10 | return 0, ENOSYS
11 | }
12 |
--------------------------------------------------------------------------------
/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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,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 (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (msghdr *Msghdr) SetIovlen(length int) {
22 | msghdr.Iovlen = int32(length)
23 | }
24 |
25 | func (cmsg *Cmsghdr) SetLen(length int) {
26 | cmsg.Len = uint32(length)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo,!ppc64le,!ppc64
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64le ppc64
7 | // +build !gccgo
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
14 | return syscall.Syscall(trap, a1, a2, a3)
15 | }
16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
18 | }
19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
20 | return syscall.RawSyscall(trap, a1, a2, a3)
21 | }
22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/unveil_openbsd.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 unix
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | // Unveil implements the unveil syscall.
13 | // For more information see unveil(2).
14 | // Note that the special case of blocking further
15 | // unveil calls is handled by UnveilBlock.
16 | func Unveil(path string, flags string) error {
17 | pathPtr, err := syscall.BytePtrFromString(path)
18 | if err != nil {
19 | return err
20 | }
21 | flagsPtr, err := syscall.BytePtrFromString(flags)
22 | if err != nil {
23 | return err
24 | }
25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0)
26 | if e != 0 {
27 | return e
28 | }
29 | return nil
30 | }
31 |
32 | // UnveilBlock blocks future unveil calls.
33 | // For more information see unveil(2).
34 | func UnveilBlock() error {
35 | // Both pointers must be nil.
36 | var pathUnsafe, flagsUnsafe unsafe.Pointer
37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0)
38 | if e != 0 {
39 | return e
40 | }
41 | return nil
42 | }
43 |
--------------------------------------------------------------------------------
/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/zsyscall_darwin_386.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,386,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go 386
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,amd64,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go amd64
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,arm,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go arm
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,arm64,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go arm64
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 | // +build go1.9
7 |
8 | package windows
9 |
10 | import "syscall"
11 |
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/eventlog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package windows
8 |
9 | const (
10 | EVENTLOG_SUCCESS = 0
11 | EVENTLOG_ERROR_TYPE = 1
12 | EVENTLOG_WARNING_TYPE = 2
13 | EVENTLOG_INFORMATION_TYPE = 4
14 | EVENTLOG_AUDIT_SUCCESS = 8
15 | EVENTLOG_AUDIT_FAILURE = 16
16 | )
17 |
18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/memory_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | const (
8 | MEM_COMMIT = 0x00001000
9 | MEM_RESERVE = 0x00002000
10 | MEM_DECOMMIT = 0x00004000
11 | MEM_RELEASE = 0x00008000
12 | MEM_RESET = 0x00080000
13 | MEM_TOP_DOWN = 0x00100000
14 | MEM_WRITE_WATCH = 0x00200000
15 | MEM_PHYSICAL = 0x00400000
16 | MEM_RESET_UNDO = 0x01000000
17 | MEM_LARGE_PAGES = 0x20000000
18 |
19 | PAGE_NOACCESS = 0x01
20 | PAGE_READONLY = 0x02
21 | PAGE_READWRITE = 0x04
22 | PAGE_WRITECOPY = 0x08
23 | PAGE_EXECUTE_READ = 0x20
24 | PAGE_EXECUTE_READWRITE = 0x40
25 | PAGE_EXECUTE_WRITECOPY = 0x80
26 | )
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build generate
6 |
7 | package windows
8 |
9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,race
6 |
7 | package windows
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,!race
6 |
7 | package windows
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package windows
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + itoa(-val)
12 | }
13 | var buf [32]byte // big enough for int64
14 | i := len(buf) - 1
15 | for val >= 10 {
16 | buf[i] = byte(val%10 + '0')
17 | i--
18 | val /= 10
19 | }
20 | buf[i] = byte(val + '0')
21 | return string(buf[i:])
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4
5 | - 1.5
6 | - 1.6
7 | - 1.7
8 | - 1.8
9 | - 1.9
10 | - tip
11 |
12 | go_import_path: gopkg.in/yaml.v2
13 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/LICENSE.libyaml:
--------------------------------------------------------------------------------
1 | The following files were ported to Go from C files of libyaml, and thus
2 | are still covered by their original copyright and license:
3 |
4 | apic.go
5 | emitterc.go
6 | parserc.go
7 | readerc.go
8 | scannerc.go
9 | writerc.go
10 | yamlh.go
11 | yamlprivateh.go
12 |
13 | Copyright (c) 2006 Kirill Simonov
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy of
16 | this software and associated documentation files (the "Software"), to deal in
17 | the Software without restriction, including without limitation the rights to
18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19 | of the Software, and to permit persons to whom the Software is furnished to do
20 | so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
32 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2011-2016 Canonical Ltd.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/go.mod:
--------------------------------------------------------------------------------
1 | module "gopkg.in/yaml.v2"
2 |
3 | require (
4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405
5 | )
6 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/writerc.go:
--------------------------------------------------------------------------------
1 | package yaml
2 |
3 | // Set the writer error and return false.
4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool {
5 | emitter.error = yaml_WRITER_ERROR
6 | emitter.problem = problem
7 | return false
8 | }
9 |
10 | // Flush the output buffer.
11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool {
12 | if emitter.write_handler == nil {
13 | panic("write handler not set")
14 | }
15 |
16 | // Check if the buffer is empty.
17 | if emitter.buffer_pos == 0 {
18 | return true
19 | }
20 |
21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil {
22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error())
23 | }
24 | emitter.buffer_pos = 0
25 | return true
26 | }
27 |
--------------------------------------------------------------------------------
/webmanager/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/webmanager/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | # Only exists if Bazel was run
8 | /bazel-out
9 |
10 | # dependencies
11 | /node_modules
12 |
13 | # profiling files
14 | chrome-profiler-events.json
15 | speed-measure-plugin.json
16 |
17 | # IDEs and editors
18 | /.idea
19 | .project
20 | .classpath
21 | .c9/
22 | *.launch
23 | .settings/
24 | *.sublime-workspace
25 |
26 | # IDE - VSCode
27 | .vscode/*
28 | !.vscode/settings.json
29 | !.vscode/tasks.json
30 | !.vscode/launch.json
31 | !.vscode/extensions.json
32 | .history/*
33 |
34 | # misc
35 | /.sass-cache
36 | /connect.lock
37 | /coverage
38 | /libpeerconnection.log
39 | npm-debug.log
40 | yarn-error.log
41 | testem.log
42 | /typings
43 |
44 | # System Files
45 | .DS_Store
46 | Thumbs.db
47 |
--------------------------------------------------------------------------------
/webmanager/README.md:
--------------------------------------------------------------------------------
1 | # engarde web manager
2 | This is an Angular interface to manage an engarde instance. It is built into the engarde binaries.
3 |
4 | ## Developing
5 | Just run `npm install` and `npm start`.
6 |
7 | By default, requests to the API are forwarded to http://127.0.0.1:9091, so be sure to set up an engarde instance (client or server, depending on what you want to test) with web management enabled on port 9091.
8 |
9 | During development, you should leave authentication disabled for better testing. In the builds, authentication is handled by the embedded webserver itself, so the frontend doesn't need to worry about it at the moment.
10 |
--------------------------------------------------------------------------------
/webmanager/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/webmanager/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/webmanager/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 | import { browser, logging } from 'protractor';
3 |
4 | describe('workspace-project App', () => {
5 | let page: AppPage;
6 |
7 | beforeEach(() => {
8 | page = new AppPage();
9 | });
10 |
11 | it('should display welcome message', () => {
12 | page.navigateTo();
13 | expect(page.getTitleText()).toEqual('Welcome to webmanager!');
14 | });
15 |
16 | afterEach(async () => {
17 | // Assert that there are no errors emitted from the browser
18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19 | expect(logs).not.toContain(jasmine.objectContaining({
20 | level: logging.Level.SEVERE,
21 | } as logging.Entry));
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/webmanager/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get(browser.baseUrl) as Promise;
6 | }
7 |
8 | getTitleText() {
9 | return element(by.css('app-root h1')).getText() as Promise;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/webmanager/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/webmanager/proxy.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "/api": {
3 | "target": "http://127.0.0.1:9001",
4 | "secure": false
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/webmanager/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes, RouterModule } from '@angular/router';
3 |
4 | const routes: Routes = [];
5 |
6 | @NgModule({
7 | imports: [RouterModule.forRoot(routes)],
8 | exports: [RouterModule]
9 | })
10 | export class AppRoutingModule { }
11 |
--------------------------------------------------------------------------------
/webmanager/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed, async } from '@angular/core/testing';
2 | import { RouterTestingModule } from '@angular/router/testing';
3 | import { AppComponent } from './app.component';
4 |
5 | describe('AppComponent', () => {
6 | beforeEach(async(() => {
7 | TestBed.configureTestingModule({
8 | imports: [
9 | RouterTestingModule
10 | ],
11 | declarations: [
12 | AppComponent
13 | ],
14 | }).compileComponents();
15 | }));
16 |
17 | it('should create the app', () => {
18 | const fixture = TestBed.createComponent(AppComponent);
19 | const app = fixture.debugElement.componentInstance;
20 | expect(app).toBeTruthy();
21 | });
22 |
23 | it(`should have as title 'webmanager'`, () => {
24 | const fixture = TestBed.createComponent(AppComponent);
25 | const app = fixture.debugElement.componentInstance;
26 | expect(app.title).toEqual('webmanager');
27 | });
28 |
29 | it('should render title in a h1 tag', () => {
30 | const fixture = TestBed.createComponent(AppComponent);
31 | fixture.detectChanges();
32 | const compiled = fixture.debugElement.nativeElement;
33 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to webmanager!');
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/webmanager/src/app/components/actionbar/actionbar.component.css:
--------------------------------------------------------------------------------
1 | .actionbar-container {
2 | display: flex;
3 | flex-flow: row;
4 | padding: 1vh;
5 | z-index: 10;
6 | }
7 | .left-anchored {
8 | display: block;
9 | position: absolute;
10 | float: left;
11 | left: 5px;
12 | top: 3px;
13 | margin-right: 1vw;
14 | }
15 | .logo {
16 | transform: translateY(-20px)
17 | }
18 | .right-anchored {
19 | display: block;
20 | position: absolute;
21 | float: right;
22 | right: 5px;
23 | top: 3px;
24 | margin-left: 1vw;
25 | }
26 |
27 | .rounded{
28 | border-radius: 100px;
29 | }
30 |
31 | .title {
32 | margin-left: 20px;
33 | line-height: 50px;
34 | min-width: 130px;
35 | }
36 |
37 | .title span {
38 | display: inline-block;
39 | line-height: 20px;
40 | }
--------------------------------------------------------------------------------
/webmanager/src/app/components/actionbar/actionbar.component.html:
--------------------------------------------------------------------------------
1 |
2 |
![]()
3 |
{{title}}
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/webmanager/src/app/components/actionbar/actionbar.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { ActionbarComponent } from './actionbar.component';
4 |
5 | describe('ActionbarComponent', () => {
6 | let component: ActionbarComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ ActionbarComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(ActionbarComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/webmanager/src/app/components/dialog/dialog.component.scss:
--------------------------------------------------------------------------------
1 | .dialog-title {
2 | text-align: left;
3 | }
4 | .dialog-content {
5 | text-align: left;
6 | font-family: roboto;
7 | font-size: .8em;
8 | }
9 |
10 |
11 | .dialog-actions {
12 | margin-top: 2vh;
13 | text-align: right;
14 |
15 | }
--------------------------------------------------------------------------------
/webmanager/src/app/components/dialog/dialog.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { DialogComponent } from './dialog.component';
4 |
5 | describe('DialogComponent', () => {
6 | let component: DialogComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ DialogComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(DialogComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should be created', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/webmanager/src/app/models/iface.model.ts:
--------------------------------------------------------------------------------
1 | export interface IfaceModel {
2 | "name": string,
3 | "status": string,
4 | "senderAddress": string,
5 | "dstAddress": string,
6 | "last": number,
7 | }
8 |
--------------------------------------------------------------------------------
/webmanager/src/app/models/resp.model.ts:
--------------------------------------------------------------------------------
1 | import { IfaceModel } from './iface.model';
2 | import { SocketModel } from './socket.model';
3 |
4 | export interface RespModel {
5 | type: string,
6 | version: string,
7 | listenAddress: string,
8 | dstAddress?: string,
9 | interfaces?: IfaceModel[],
10 | sockets?: SocketModel[],
11 | description?: string
12 | }
13 |
--------------------------------------------------------------------------------
/webmanager/src/app/models/socket.model.ts:
--------------------------------------------------------------------------------
1 | export interface SocketModel {
2 | "address": string,
3 | "last": number,
4 | }
5 |
--------------------------------------------------------------------------------
/webmanager/src/app/modules/material/material.module.spec.ts:
--------------------------------------------------------------------------------
1 | import { MaterialModule } from './material.module';
2 |
3 | describe('MaterialModule', () => {
4 | let materialModule: MaterialModule;
5 |
6 | beforeEach(() => {
7 | materialModule = new MaterialModule();
8 | });
9 |
10 | it('should create an instance', () => {
11 | expect(materialModule).toBeTruthy();
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/webmanager/src/app/pipes/callback.pipe.ts:
--------------------------------------------------------------------------------
1 | import { PipeTransform, Pipe } from '@angular/core';
2 |
3 | @Pipe({
4 | name: 'callback',
5 | pure: false
6 | })
7 | export class CallbackPipe implements PipeTransform {
8 | transform(items: any[], callback: (item: any) => boolean): any {
9 | if (!items || !callback) {
10 | return items;
11 | }
12 | return items.filter(item => callback(item));
13 | }
14 | }
--------------------------------------------------------------------------------
/webmanager/src/app/pipes/sortby.pipe.ts:
--------------------------------------------------------------------------------
1 | import { PipeTransform, Pipe } from '@angular/core';
2 |
3 | @Pipe({
4 | name: 'sortBy',
5 | pure: false
6 | })
7 | export class SortByPipe implements PipeTransform {
8 | transform(items: any[], sortField: any): any {
9 | if (!items || !sortField) {
10 | return items;
11 | }
12 | return items.sort((item1, item2) => {
13 | return item1[sortField] > item2[sortField] ? 1 : -1;
14 | });
15 | }
16 | }
--------------------------------------------------------------------------------
/webmanager/src/app/pipes/string2objectfilter.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({
4 | name: 'string2objectfilter',
5 | pure: false
6 | })
7 | export class StringToObjectFilterPipe implements PipeTransform {
8 | transform(items: any[], filter: string, itemField: string): any {
9 | if (!items || !filter) {
10 | return items;
11 | }
12 | // filter items array, items which match and return true will be
13 | // kept, false will be filtered out
14 | return items.filter(item => item[itemField].toLowerCase().indexOf(filter.toLowerCase()) !== -1);
15 | }
16 | }
--------------------------------------------------------------------------------
/webmanager/src/app/services/apicaller.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpClient } from "@angular/common/http";
3 | import { timeout, catchError } from 'rxjs/operators';
4 | import { RespModel } from '../models/resp.model';
5 |
6 | /**
7 | @Injectable({
8 | providedIn: 'root'
9 | })
10 | */
11 | @Injectable()
12 | export class APICallerService {
13 | /**
14 | *
15 | * @param http il servizio HTTP iniettato
16 | */
17 |
18 | // For development purposes you can set an API prefix here.
19 | // ONLY COMMIT WITH THIS VARIABLE EMPTY!!!
20 | private apiPrefix = ""
21 |
22 | constructor(public http : HttpClient) { }
23 |
24 | public getList() {
25 | return this.http.get(this.apiPrefix + "/api/v1/get-list")
26 | .pipe(
27 | timeout(1500),
28 | catchError(e => {
29 | throw e
30 | })
31 | )
32 | }
33 |
34 | public toggleOverride(iface: string) {
35 | return this.http.post(this.apiPrefix + "/api/v1/swap-exclusion", {"interface" : iface})
36 | .toPromise()
37 | .then(res => {
38 | return res['status'];
39 | })
40 | }
41 |
42 | public clearOverrides() {
43 | return this.http.get(this.apiPrefix + "/api/v1/reset-exclusions")
44 | .toPromise()
45 | .then(res => {
46 | return res['status'];
47 | })
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/webmanager/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/porech/engarde/705f38a5dc5b565de949c060537066dc876d1985/webmanager/src/assets/.gitkeep
--------------------------------------------------------------------------------
/webmanager/src/assets/engarde-detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/porech/engarde/705f38a5dc5b565de949c060537066dc876d1985/webmanager/src/assets/engarde-detail.png
--------------------------------------------------------------------------------
/webmanager/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/webmanager/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/webmanager/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/porech/engarde/705f38a5dc5b565de949c060537066dc876d1985/webmanager/src/favicon.ico
--------------------------------------------------------------------------------
/webmanager/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | engarde web manager
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/webmanager/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, '../coverage/webmanager'),
20 | reports: ['html', 'lcovonly', 'text-summary'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false,
30 | restartOnFileChange: true
31 | });
32 | };
33 |
--------------------------------------------------------------------------------
/webmanager/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/webmanager/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @import '@angular/material/prebuilt-themes/indigo-pink.css';
3 | @import '~roboto-fontface/css/roboto/roboto-fontface.css';
4 |
5 | body {
6 | font-family: Roboto, Helvetica, Arial, sans-serif;
7 | margin: 0;
8 | padding: 0;
9 | }
--------------------------------------------------------------------------------
/webmanager/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/webmanager/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/webmanager/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/webmanager/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/webmanager/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "downlevelIteration": true,
6 | "outDir": "./dist/out-tsc",
7 | "sourceMap": true,
8 | "declaration": false,
9 | "module": "esnext",
10 | "moduleResolution": "node",
11 | "emitDecoratorMetadata": true,
12 | "experimentalDecorators": true,
13 | "importHelpers": true,
14 | "target": "es2015",
15 | "typeRoots": [
16 | "node_modules/@types"
17 | ],
18 | "lib": [
19 | "es2018",
20 | "dom"
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------