├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── example ├── .gitignore └── main.go ├── go.mod ├── go.sum ├── main.go └── vendor ├── github.com ├── dgrijalva │ └── jwt-go │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── MIGRATION_GUIDE.md │ │ ├── README.md │ │ ├── VERSION_HISTORY.md │ │ ├── claims.go │ │ ├── doc.go │ │ ├── ecdsa.go │ │ ├── ecdsa_utils.go │ │ ├── errors.go │ │ ├── hmac.go │ │ ├── map_claims.go │ │ ├── none.go │ │ ├── parser.go │ │ ├── rsa.go │ │ ├── rsa_pss.go │ │ ├── rsa_utils.go │ │ ├── signing_method.go │ │ └── token.go ├── gomodule │ └── redigo │ │ ├── LICENSE │ │ ├── internal │ │ └── commandinfo.go │ │ └── redis │ │ ├── conn.go │ │ ├── doc.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── go18.go │ │ ├── log.go │ │ ├── pool.go │ │ ├── pool17.go │ │ ├── pubsub.go │ │ ├── redis.go │ │ ├── reply.go │ │ ├── scan.go │ │ └── script.go ├── labstack │ ├── echo │ │ └── v4 │ │ │ ├── .editorconfig │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── bind.go │ │ │ ├── context.go │ │ │ ├── echo.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── group.go │ │ │ ├── log.go │ │ │ ├── middleware │ │ │ ├── basic_auth.go │ │ │ ├── body_dump.go │ │ │ ├── body_limit.go │ │ │ ├── compress.go │ │ │ ├── cors.go │ │ │ ├── csrf.go │ │ │ ├── jwt.go │ │ │ ├── key_auth.go │ │ │ ├── logger.go │ │ │ ├── method_override.go │ │ │ ├── middleware.go │ │ │ ├── proxy.go │ │ │ ├── proxy_1_11.go │ │ │ ├── proxy_1_11_n.go │ │ │ ├── recover.go │ │ │ ├── redirect.go │ │ │ ├── request_id.go │ │ │ ├── rewrite.go │ │ │ ├── secure.go │ │ │ ├── slash.go │ │ │ ├── static.go │ │ │ └── util.go │ │ │ ├── response.go │ │ │ └── router.go │ └── gommon │ │ ├── LICENSE │ │ ├── bytes │ │ ├── README.md │ │ └── bytes.go │ │ ├── color │ │ ├── README.md │ │ └── color.go │ │ ├── log │ │ ├── README.md │ │ ├── color.go │ │ ├── log.go │ │ └── white.go │ │ └── random │ │ └── random.go ├── mattn │ ├── go-colorable │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorable_appengine.go │ │ ├── colorable_others.go │ │ ├── colorable_windows.go │ │ ├── go.mod │ │ ├── go.sum │ │ └── noncolorable.go │ └── go-isatty │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── isatty_android.go │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go ├── valyala │ ├── bytebufferpool │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bytebuffer.go │ │ ├── doc.go │ │ └── pool.go │ └── fasttemplate │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── go.sum │ │ ├── template.go │ │ ├── unsafe.go │ │ └── unsafe_gae.go └── xyproto │ ├── cookie │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── cookie.go │ ├── go.mod │ ├── go.sum │ └── randomstring.go │ ├── permissions2 │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── TODO.md │ ├── go.mod │ ├── go.sum │ ├── hashing.go │ ├── permissions.go │ └── userstate.go │ ├── pinterface │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── go.mod │ └── pinterface.go │ ├── randomstring │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── go.mod │ └── randomstring.go │ └── simpleredis │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── creator.go │ ├── go.mod │ ├── go.sum │ └── simpleredis.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── acme │ │ ├── acme.go │ │ ├── autocert │ │ │ ├── autocert.go │ │ │ ├── cache.go │ │ │ ├── listener.go │ │ │ └── renewal.go │ │ ├── http.go │ │ ├── jws.go │ │ ├── rfc8555.go │ │ ├── types.go │ │ └── version_go112.go │ ├── bcrypt │ │ ├── base64.go │ │ └── bcrypt.go │ └── blowfish │ │ ├── block.go │ │ ├── cipher.go │ │ └── const.go │ ├── net │ ├── LICENSE │ ├── PATENTS │ └── idna │ │ ├── go118.go │ │ ├── idna10.0.0.go │ │ ├── idna9.0.0.go │ │ ├── pre_go118.go │ │ ├── punycode.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables9.0.0.go │ │ ├── trie.go │ │ └── trieval.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── internal │ │ └── unsafeheader │ │ │ └── unsafeheader.go │ └── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.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 │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── epoll_zos.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── fstatfs_zos.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.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_amd64.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_freebsd_riscv64.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.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_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysnum_darwin_amd64.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_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.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_freebsd_riscv64.go │ │ ├── ztypes_illumos_amd64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── text │ ├── LICENSE │ ├── PATENTS │ ├── secure │ └── bidirule │ │ ├── bidirule.go │ │ ├── bidirule10.0.0.go │ │ └── bidirule9.0.0.go │ ├── transform │ └── transform.go │ └── unicode │ ├── bidi │ ├── bidi.go │ ├── bracket.go │ ├── core.go │ ├── prop.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ └── trieval.go │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ └── trie.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | example/example 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | services: 4 | - redis-server 5 | 6 | go: 7 | - "1.10" 8 | - "1.11" 9 | - "1.12" 10 | - "1.13" 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Alexander F. Rødseth 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 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | example 2 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/echoperm 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/labstack/echo/v4 v4.1.10 7 | github.com/xyproto/permissions2 v0.0.0-20190729074010-6510c7590749 8 | github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684 9 | github.com/xyproto/simpleredis v0.0.0-20190919091103-4dd4111d2407 // indirect 10 | golang.org/x/text v0.3.8 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package echoperm 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/labstack/echo/v4" 7 | "github.com/xyproto/permissions2" 8 | "github.com/xyproto/pinterface" 9 | ) 10 | 11 | // Middleware sets up a middleware handler for Echo. 12 | // 13 | // Requires a Redis hostname (can be "localhost"), a Redis password (can be 14 | // blank) and a custom message for when permissions are denied. 15 | func Middleware(redisHostname, redisPassword, denyMessage string) (echo.MiddlewareFunc, pinterface.IUserState, error) { 16 | userstate, err := permissions.NewUserStateWithPassword2(redisHostname, redisPassword) 17 | if err != nil { 18 | return nil, nil, err 19 | } 20 | perm := permissions.NewPermissions(userstate) 21 | 22 | return echo.MiddlewareFunc(func(next echo.HandlerFunc) echo.HandlerFunc { 23 | return echo.HandlerFunc(func(c echo.Context) error { 24 | // Check if the user has the right admin/user rights 25 | if perm.Rejected(c.Response(), c.Request()) { 26 | // Deny the request 27 | return echo.NewHTTPError(http.StatusForbidden, denyMessage) 28 | } 29 | // Continue the chain of middleware 30 | return next(c) 31 | }) 32 | }), userstate, nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bin 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | script: 4 | - go vet ./... 5 | - go test -v ./... 6 | 7 | go: 8 | - 1.3 9 | - 1.4 10 | - 1.5 11 | - 1.6 12 | - 1.7 13 | - tip 14 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Dave Grijalva 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/doc.go: -------------------------------------------------------------------------------- 1 | // Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html 2 | // 3 | // See README.md for more info. 4 | package jwt 5 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | import ( 4 | "crypto/ecdsa" 5 | "crypto/x509" 6 | "encoding/pem" 7 | "errors" 8 | ) 9 | 10 | var ( 11 | ErrNotECPublicKey = errors.New("Key is not a valid ECDSA public key") 12 | ErrNotECPrivateKey = errors.New("Key is not a valid ECDSA private key") 13 | ) 14 | 15 | // Parse PEM encoded Elliptic Curve Private Key Structure 16 | func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) { 17 | var err error 18 | 19 | // Parse PEM block 20 | var block *pem.Block 21 | if block, _ = pem.Decode(key); block == nil { 22 | return nil, ErrKeyMustBePEMEncoded 23 | } 24 | 25 | // Parse the key 26 | var parsedKey interface{} 27 | if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil { 28 | return nil, err 29 | } 30 | 31 | var pkey *ecdsa.PrivateKey 32 | var ok bool 33 | if pkey, ok = parsedKey.(*ecdsa.PrivateKey); !ok { 34 | return nil, ErrNotECPrivateKey 35 | } 36 | 37 | return pkey, nil 38 | } 39 | 40 | // Parse PEM encoded PKCS1 or PKCS8 public key 41 | func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) { 42 | var err error 43 | 44 | // Parse PEM block 45 | var block *pem.Block 46 | if block, _ = pem.Decode(key); block == nil { 47 | return nil, ErrKeyMustBePEMEncoded 48 | } 49 | 50 | // Parse the key 51 | var parsedKey interface{} 52 | if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { 53 | if cert, err := x509.ParseCertificate(block.Bytes); err == nil { 54 | parsedKey = cert.PublicKey 55 | } else { 56 | return nil, err 57 | } 58 | } 59 | 60 | var pkey *ecdsa.PublicKey 61 | var ok bool 62 | if pkey, ok = parsedKey.(*ecdsa.PublicKey); !ok { 63 | return nil, ErrNotECPublicKey 64 | } 65 | 66 | return pkey, nil 67 | } 68 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/errors.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // Error constants 8 | var ( 9 | ErrInvalidKey = errors.New("key is invalid") 10 | ErrInvalidKeyType = errors.New("key is of invalid type") 11 | ErrHashUnavailable = errors.New("the requested hash function is unavailable") 12 | ) 13 | 14 | // The errors that might occur when parsing and validating a token 15 | const ( 16 | ValidationErrorMalformed uint32 = 1 << iota // Token is malformed 17 | ValidationErrorUnverifiable // Token could not be verified because of signing problems 18 | ValidationErrorSignatureInvalid // Signature validation failed 19 | 20 | // Standard Claim validation errors 21 | ValidationErrorAudience // AUD validation failed 22 | ValidationErrorExpired // EXP validation failed 23 | ValidationErrorIssuedAt // IAT validation failed 24 | ValidationErrorIssuer // ISS validation failed 25 | ValidationErrorNotValidYet // NBF validation failed 26 | ValidationErrorId // JTI validation failed 27 | ValidationErrorClaimsInvalid // Generic claims validation error 28 | ) 29 | 30 | // Helper for constructing a ValidationError with a string error message 31 | func NewValidationError(errorText string, errorFlags uint32) *ValidationError { 32 | return &ValidationError{ 33 | text: errorText, 34 | Errors: errorFlags, 35 | } 36 | } 37 | 38 | // The error from Parse if token is not valid 39 | type ValidationError struct { 40 | Inner error // stores the error returned by external dependencies, i.e.: KeyFunc 41 | Errors uint32 // bitfield. see ValidationError... constants 42 | text string // errors that do not have a valid error just have text 43 | } 44 | 45 | // Validation error is an error type 46 | func (e ValidationError) Error() string { 47 | if e.Inner != nil { 48 | return e.Inner.Error() 49 | } else if e.text != "" { 50 | return e.text 51 | } else { 52 | return "token is invalid" 53 | } 54 | } 55 | 56 | // No errors 57 | func (e *ValidationError) valid() bool { 58 | return e.Errors == 0 59 | } 60 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/none.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | // Implements the none signing method. This is required by the spec 4 | // but you probably should never use it. 5 | var SigningMethodNone *signingMethodNone 6 | 7 | const UnsafeAllowNoneSignatureType unsafeNoneMagicConstant = "none signing method allowed" 8 | 9 | var NoneSignatureTypeDisallowedError error 10 | 11 | type signingMethodNone struct{} 12 | type unsafeNoneMagicConstant string 13 | 14 | func init() { 15 | SigningMethodNone = &signingMethodNone{} 16 | NoneSignatureTypeDisallowedError = NewValidationError("'none' signature type is not allowed", ValidationErrorSignatureInvalid) 17 | 18 | RegisterSigningMethod(SigningMethodNone.Alg(), func() SigningMethod { 19 | return SigningMethodNone 20 | }) 21 | } 22 | 23 | func (m *signingMethodNone) Alg() string { 24 | return "none" 25 | } 26 | 27 | // Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key 28 | func (m *signingMethodNone) Verify(signingString, signature string, key interface{}) (err error) { 29 | // Key must be UnsafeAllowNoneSignatureType to prevent accidentally 30 | // accepting 'none' signing method 31 | if _, ok := key.(unsafeNoneMagicConstant); !ok { 32 | return NoneSignatureTypeDisallowedError 33 | } 34 | // If signing method is none, signature must be an empty string 35 | if signature != "" { 36 | return NewValidationError( 37 | "'none' signing method with non-empty signature", 38 | ValidationErrorSignatureInvalid, 39 | ) 40 | } 41 | 42 | // Accept 'none' signing method. 43 | return nil 44 | } 45 | 46 | // Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key 47 | func (m *signingMethodNone) Sign(signingString string, key interface{}) (string, error) { 48 | if _, ok := key.(unsafeNoneMagicConstant); ok { 49 | return "", nil 50 | } 51 | return "", NoneSignatureTypeDisallowedError 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/signing_method.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var signingMethods = map[string]func() SigningMethod{} 8 | var signingMethodLock = new(sync.RWMutex) 9 | 10 | // Implement SigningMethod to add new methods for signing or verifying tokens. 11 | type SigningMethod interface { 12 | Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid 13 | Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error 14 | Alg() string // returns the alg identifier for this method (example: 'HS256') 15 | } 16 | 17 | // Register the "alg" name and a factory function for signing method. 18 | // This is typically done during init() in the method's implementation 19 | func RegisterSigningMethod(alg string, f func() SigningMethod) { 20 | signingMethodLock.Lock() 21 | defer signingMethodLock.Unlock() 22 | 23 | signingMethods[alg] = f 24 | } 25 | 26 | // Get a signing method from an "alg" string 27 | func GetSigningMethod(alg string) (method SigningMethod) { 28 | signingMethodLock.RLock() 29 | defer signingMethodLock.RUnlock() 30 | 31 | if methodF, ok := signingMethods[alg]; ok { 32 | method = methodF() 33 | } 34 | return 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/internal/commandinfo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // 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, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package internal // import "github.com/gomodule/redigo/internal" 16 | 17 | import ( 18 | "strings" 19 | ) 20 | 21 | const ( 22 | WatchState = 1 << iota 23 | MultiState 24 | SubscribeState 25 | MonitorState 26 | ) 27 | 28 | type CommandInfo struct { 29 | Set, Clear int 30 | } 31 | 32 | var commandInfos = map[string]CommandInfo{ 33 | "WATCH": {Set: WatchState}, 34 | "UNWATCH": {Clear: WatchState}, 35 | "MULTI": {Set: MultiState}, 36 | "EXEC": {Clear: WatchState | MultiState}, 37 | "DISCARD": {Clear: WatchState | MultiState}, 38 | "PSUBSCRIBE": {Set: SubscribeState}, 39 | "SUBSCRIBE": {Set: SubscribeState}, 40 | "MONITOR": {Set: MonitorState}, 41 | } 42 | 43 | func init() { 44 | for n, ci := range commandInfos { 45 | commandInfos[strings.ToLower(n)] = ci 46 | } 47 | } 48 | 49 | func LookupCommandInfo(commandName string) CommandInfo { 50 | if ci, ok := commandInfos[commandName]; ok { 51 | return ci 52 | } 53 | return commandInfos[strings.ToUpper(commandName)] 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go16.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return &tls.Config{ 9 | Rand: cfg.Rand, 10 | Time: cfg.Time, 11 | Certificates: cfg.Certificates, 12 | NameToCertificate: cfg.NameToCertificate, 13 | GetCertificate: cfg.GetCertificate, 14 | RootCAs: cfg.RootCAs, 15 | NextProtos: cfg.NextProtos, 16 | ServerName: cfg.ServerName, 17 | ClientAuth: cfg.ClientAuth, 18 | ClientCAs: cfg.ClientCAs, 19 | InsecureSkipVerify: cfg.InsecureSkipVerify, 20 | CipherSuites: cfg.CipherSuites, 21 | PreferServerCipherSuites: cfg.PreferServerCipherSuites, 22 | ClientSessionCache: cfg.ClientSessionCache, 23 | MinVersion: cfg.MinVersion, 24 | MaxVersion: cfg.MaxVersion, 25 | CurvePreferences: cfg.CurvePreferences, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7,!go1.8 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return &tls.Config{ 9 | Rand: cfg.Rand, 10 | Time: cfg.Time, 11 | Certificates: cfg.Certificates, 12 | NameToCertificate: cfg.NameToCertificate, 13 | GetCertificate: cfg.GetCertificate, 14 | RootCAs: cfg.RootCAs, 15 | NextProtos: cfg.NextProtos, 16 | ServerName: cfg.ServerName, 17 | ClientAuth: cfg.ClientAuth, 18 | ClientCAs: cfg.ClientCAs, 19 | InsecureSkipVerify: cfg.InsecureSkipVerify, 20 | CipherSuites: cfg.CipherSuites, 21 | PreferServerCipherSuites: cfg.PreferServerCipherSuites, 22 | ClientSessionCache: cfg.ClientSessionCache, 23 | MinVersion: cfg.MinVersion, 24 | MaxVersion: cfg.MaxVersion, 25 | CurvePreferences: cfg.CurvePreferences, 26 | DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, 27 | Renegotiation: cfg.Renegotiation, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return cfg.Clone() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/pool17.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // 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, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | // +build go1.7 16 | 17 | package redis 18 | 19 | import "context" 20 | 21 | // GetContext gets a connection using the provided context. 22 | // 23 | // The provided Context must be non-nil. If the context expires before the 24 | // connection is complete, an error is returned. Any expiration on the context 25 | // will not affect the returned connection. 26 | // 27 | // If the function completes without error, then the application must close the 28 | // returned connection. 29 | func (p *Pool) GetContext(ctx context.Context) (Conn, error) { 30 | pc, err := p.get(ctx) 31 | if err != nil { 32 | return errorConn{err}, err 33 | } 34 | return &activeConn{p: p, pc: pc}, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig coding styles definitions. For more information about the 2 | # properties used in this file, please see the EditorConfig documentation: 3 | # http://editorconfig.org/ 4 | 5 | # indicate this is the root of the project 6 | root = true 7 | 8 | [*] 9 | charset = utf-8 10 | 11 | end_of_line = LF 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | indent_style = space 16 | indent_size = 2 17 | 18 | [Makefile] 19 | indent_style = tab 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | 24 | [*.go] 25 | indent_style = tab 26 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically normalize line endings for all text-based files 2 | # http://git-scm.com/docs/gitattributes#_end_of_line_conversion 3 | * text=auto 4 | 5 | # For the following file types, normalize line endings to LF on checking and 6 | # prevent conversion to CRLF when they are checked out (this is required in 7 | # order to prevent newline related issues) 8 | .* text eol=lf 9 | *.go text eol=lf 10 | *.yml text eol=lf 11 | *.html text eol=lf 12 | *.css text eol=lf 13 | *.js text eol=lf 14 | *.json text eol=lf 15 | LICENSE text eol=lf 16 | 17 | # Exclude `website` and `cookbook` from GitHub's language statistics 18 | # https://github.com/github/linguist#using-gitattributes 19 | cookbook/* linguist-documentation 20 | website/* linguist-documentation 21 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | coverage.txt 3 | _test 4 | vendor 5 | .idea 6 | *.iml 7 | *.out 8 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.11.x 4 | - 1.12.x 5 | - tip 6 | env: 7 | - GO111MODULE=on 8 | install: 9 | - go get -v golang.org/x/lint/golint 10 | script: 11 | - golint -set_exit_status ./... 12 | - go test -race -coverprofile=coverage.txt -covermode=atomic ./... 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | matrix: 16 | allow_failures: 17 | - go: tip 18 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 LabStack 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/labstack/echo/v4/Makefile: -------------------------------------------------------------------------------- 1 | tag: 2 | @git tag `grep -P '^\tversion = ' echo.go|cut -f2 -d'"'` 3 | @git tag|grep -v ^v 4 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/labstack/echo/v4 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/dgrijalva/jwt-go v3.2.0+incompatible 7 | github.com/labstack/gommon v0.3.0 8 | github.com/stretchr/testify v1.4.0 9 | github.com/valyala/fasttemplate v1.0.1 10 | golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/log.go: -------------------------------------------------------------------------------- 1 | package echo 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/labstack/gommon/log" 7 | ) 8 | 9 | type ( 10 | // Logger defines the logging interface. 11 | Logger interface { 12 | Output() io.Writer 13 | SetOutput(w io.Writer) 14 | Prefix() string 15 | SetPrefix(p string) 16 | Level() log.Lvl 17 | SetLevel(v log.Lvl) 18 | SetHeader(h string) 19 | Print(i ...interface{}) 20 | Printf(format string, args ...interface{}) 21 | Printj(j log.JSON) 22 | Debug(i ...interface{}) 23 | Debugf(format string, args ...interface{}) 24 | Debugj(j log.JSON) 25 | Info(i ...interface{}) 26 | Infof(format string, args ...interface{}) 27 | Infoj(j log.JSON) 28 | Warn(i ...interface{}) 29 | Warnf(format string, args ...interface{}) 30 | Warnj(j log.JSON) 31 | Error(i ...interface{}) 32 | Errorf(format string, args ...interface{}) 33 | Errorj(j log.JSON) 34 | Fatal(i ...interface{}) 35 | Fatalj(j log.JSON) 36 | Fatalf(format string, args ...interface{}) 37 | Panic(i ...interface{}) 38 | Panicj(j log.JSON) 39 | Panicf(format string, args ...interface{}) 40 | } 41 | ) 42 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/middleware.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "regexp" 5 | "strconv" 6 | "strings" 7 | 8 | "github.com/labstack/echo/v4" 9 | ) 10 | 11 | type ( 12 | // Skipper defines a function to skip middleware. Returning true skips processing 13 | // the middleware. 14 | Skipper func(echo.Context) bool 15 | 16 | // BeforeFunc defines a function which is executed just before the middleware. 17 | BeforeFunc func(echo.Context) 18 | ) 19 | 20 | func captureTokens(pattern *regexp.Regexp, input string) *strings.Replacer { 21 | groups := pattern.FindAllStringSubmatch(input, -1) 22 | if groups == nil { 23 | return nil 24 | } 25 | values := groups[0][1:] 26 | replace := make([]string, 2*len(values)) 27 | for i, v := range values { 28 | j := 2 * i 29 | replace[j] = "$" + strconv.Itoa(i+1) 30 | replace[j+1] = v 31 | } 32 | return strings.NewReplacer(replace...) 33 | } 34 | 35 | // DefaultSkipper returns false which processes the middleware. 36 | func DefaultSkipper(echo.Context) bool { 37 | return false 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/proxy_1_11.go: -------------------------------------------------------------------------------- 1 | // +build go1.11 2 | 3 | package middleware 4 | 5 | import ( 6 | "fmt" 7 | "net/http" 8 | "net/http/httputil" 9 | 10 | "github.com/labstack/echo/v4" 11 | ) 12 | 13 | func proxyHTTP(tgt *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler { 14 | proxy := httputil.NewSingleHostReverseProxy(tgt.URL) 15 | proxy.ErrorHandler = func(resp http.ResponseWriter, req *http.Request, err error) { 16 | desc := tgt.URL.String() 17 | if tgt.Name != "" { 18 | desc = fmt.Sprintf("%s(%s)", tgt.Name, tgt.URL.String()) 19 | } 20 | c.Logger().Errorf("remote %s unreachable, could not forward: %v", desc, err) 21 | c.Error(echo.NewHTTPError(http.StatusServiceUnavailable)) 22 | } 23 | proxy.Transport = config.Transport 24 | return proxy 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/proxy_1_11_n.go: -------------------------------------------------------------------------------- 1 | // +build !go1.11 2 | 3 | package middleware 4 | 5 | import ( 6 | "net/http" 7 | "net/http/httputil" 8 | 9 | "github.com/labstack/echo/v4" 10 | ) 11 | 12 | func proxyHTTP(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler { 13 | return httputil.NewSingleHostReverseProxy(t.URL) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/request_id.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/labstack/echo/v4" 5 | "github.com/labstack/gommon/random" 6 | ) 7 | 8 | type ( 9 | // RequestIDConfig defines the config for RequestID middleware. 10 | RequestIDConfig struct { 11 | // Skipper defines a function to skip middleware. 12 | Skipper Skipper 13 | 14 | // Generator defines a function to generate an ID. 15 | // Optional. Default value random.String(32). 16 | Generator func() string 17 | } 18 | ) 19 | 20 | var ( 21 | // DefaultRequestIDConfig is the default RequestID middleware config. 22 | DefaultRequestIDConfig = RequestIDConfig{ 23 | Skipper: DefaultSkipper, 24 | Generator: generator, 25 | } 26 | ) 27 | 28 | // RequestID returns a X-Request-ID middleware. 29 | func RequestID() echo.MiddlewareFunc { 30 | return RequestIDWithConfig(DefaultRequestIDConfig) 31 | } 32 | 33 | // RequestIDWithConfig returns a X-Request-ID middleware with config. 34 | func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc { 35 | // Defaults 36 | if config.Skipper == nil { 37 | config.Skipper = DefaultRequestIDConfig.Skipper 38 | } 39 | if config.Generator == nil { 40 | config.Generator = generator 41 | } 42 | 43 | return func(next echo.HandlerFunc) echo.HandlerFunc { 44 | return func(c echo.Context) error { 45 | if config.Skipper(c) { 46 | return next(c) 47 | } 48 | 49 | req := c.Request() 50 | res := c.Response() 51 | rid := req.Header.Get(echo.HeaderXRequestID) 52 | if rid == "" { 53 | rid = config.Generator() 54 | } 55 | res.Header().Set(echo.HeaderXRequestID, rid) 56 | 57 | return next(c) 58 | } 59 | } 60 | } 61 | 62 | func generator() string { 63 | return random.String(32) 64 | } 65 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/rewrite.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "regexp" 5 | "strings" 6 | 7 | "github.com/labstack/echo/v4" 8 | ) 9 | 10 | type ( 11 | // RewriteConfig defines the config for Rewrite middleware. 12 | RewriteConfig struct { 13 | // Skipper defines a function to skip middleware. 14 | Skipper Skipper 15 | 16 | // Rules defines the URL path rewrite rules. The values captured in asterisk can be 17 | // retrieved by index e.g. $1, $2 and so on. 18 | // Example: 19 | // "/old": "/new", 20 | // "/api/*": "/$1", 21 | // "/js/*": "/public/javascripts/$1", 22 | // "/users/*/orders/*": "/user/$1/order/$2", 23 | // Required. 24 | Rules map[string]string `yaml:"rules"` 25 | 26 | rulesRegex map[*regexp.Regexp]string 27 | } 28 | ) 29 | 30 | var ( 31 | // DefaultRewriteConfig is the default Rewrite middleware config. 32 | DefaultRewriteConfig = RewriteConfig{ 33 | Skipper: DefaultSkipper, 34 | } 35 | ) 36 | 37 | // Rewrite returns a Rewrite middleware. 38 | // 39 | // Rewrite middleware rewrites the URL path based on the provided rules. 40 | func Rewrite(rules map[string]string) echo.MiddlewareFunc { 41 | c := DefaultRewriteConfig 42 | c.Rules = rules 43 | return RewriteWithConfig(c) 44 | } 45 | 46 | // RewriteWithConfig returns a Rewrite middleware with config. 47 | // See: `Rewrite()`. 48 | func RewriteWithConfig(config RewriteConfig) echo.MiddlewareFunc { 49 | // Defaults 50 | if config.Rules == nil { 51 | panic("echo: rewrite middleware requires url path rewrite rules") 52 | } 53 | if config.Skipper == nil { 54 | config.Skipper = DefaultBodyDumpConfig.Skipper 55 | } 56 | config.rulesRegex = map[*regexp.Regexp]string{} 57 | 58 | // Initialize 59 | for k, v := range config.Rules { 60 | k = strings.Replace(k, "*", "(.*)", -1) 61 | k = k + "$" 62 | config.rulesRegex[regexp.MustCompile(k)] = v 63 | } 64 | 65 | return func(next echo.HandlerFunc) echo.HandlerFunc { 66 | return func(c echo.Context) (err error) { 67 | if config.Skipper(c) { 68 | return next(c) 69 | } 70 | 71 | req := c.Request() 72 | 73 | // Rewrite 74 | for k, v := range config.rulesRegex { 75 | replacer := captureTokens(k, req.URL.Path) 76 | if replacer != nil { 77 | req.URL.Path = replacer.Replace(v) 78 | break 79 | } 80 | } 81 | return next(c) 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/echo/v4/middleware/util.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | func matchScheme(domain, pattern string) bool { 8 | didx := strings.Index(domain, ":") 9 | pidx := strings.Index(pattern, ":") 10 | return didx != -1 && pidx != -1 && domain[:didx] == pattern[:pidx] 11 | } 12 | 13 | // matchSubdomain compares authority with wildcard 14 | func matchSubdomain(domain, pattern string) bool { 15 | if !matchScheme(domain, pattern) { 16 | return false 17 | } 18 | didx := strings.Index(domain, "://") 19 | pidx := strings.Index(pattern, "://") 20 | if didx == -1 || pidx == -1 { 21 | return false 22 | } 23 | domAuth := domain[didx+3:] 24 | // to avoid long loop by invalid long domain 25 | if len(domAuth) > 253 { 26 | return false 27 | } 28 | patAuth := pattern[pidx+3:] 29 | 30 | domComp := strings.Split(domAuth, ".") 31 | patComp := strings.Split(patAuth, ".") 32 | for i := len(domComp)/2 - 1; i >= 0; i-- { 33 | opp := len(domComp) - 1 - i 34 | domComp[i], domComp[opp] = domComp[opp], domComp[i] 35 | } 36 | for i := len(patComp)/2 - 1; i >= 0; i-- { 37 | opp := len(patComp) - 1 - i 38 | patComp[i], patComp[opp] = patComp[opp], patComp[i] 39 | } 40 | 41 | for i, v := range domComp { 42 | if len(patComp) <= i { 43 | return false 44 | } 45 | p := patComp[i] 46 | if p == "*" { 47 | return true 48 | } 49 | if p != v { 50 | return false 51 | } 52 | } 53 | return false 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 labstack 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 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/bytes/README.md: -------------------------------------------------------------------------------- 1 | # Bytes 2 | 3 | - Format bytes integer to human readable bytes string. 4 | - Parse human readable bytes string to bytes integer. 5 | 6 | ## Installation 7 | 8 | ```go 9 | go get github.com/labstack/gommon/bytes 10 | ``` 11 | 12 | ## [Usage](https://github.com/labstack/gommon/blob/master/bytes/bytes_test.go) 13 | 14 | ### Format 15 | 16 | ```go 17 | println(bytes.Format(13231323)) 18 | ``` 19 | 20 | `12.62MB` 21 | 22 | ### Parse 23 | 24 | ```go 25 | b, _ = Parse("2M") 26 | println(b) 27 | ``` 28 | 29 | `2097152` 30 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/log/README.md: -------------------------------------------------------------------------------- 1 | ## WORK IN PROGRESS 2 | 3 | ### Usage 4 | 5 | [log_test.go](log_test.go) 6 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/log/color.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package log 4 | 5 | import ( 6 | "io" 7 | 8 | "github.com/mattn/go-colorable" 9 | ) 10 | 11 | func output() io.Writer { 12 | return colorable.NewColorableStdout() 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/log/white.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package log 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func output() io.Writer { 11 | return os.Stdout 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/labstack/gommon/random/random.go: -------------------------------------------------------------------------------- 1 | package random 2 | 3 | import ( 4 | "math/rand" 5 | "strings" 6 | "time" 7 | ) 8 | 9 | type ( 10 | Random struct { 11 | } 12 | ) 13 | 14 | // Charsets 15 | const ( 16 | Uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 17 | Lowercase = "abcdefghijklmnopqrstuvwxyz" 18 | Alphabetic = Uppercase + Lowercase 19 | Numeric = "0123456789" 20 | Alphanumeric = Alphabetic + Numeric 21 | Symbols = "`" + `~!@#$%^&*()-_+={}[]|\;:"<>,./?` 22 | Hex = Numeric + "abcdef" 23 | ) 24 | 25 | var ( 26 | global = New() 27 | ) 28 | 29 | func New() *Random { 30 | rand.Seed(time.Now().UnixNano()) 31 | return new(Random) 32 | } 33 | 34 | func (r *Random) String(length uint8, charsets ...string) string { 35 | charset := strings.Join(charsets, "") 36 | if charset == "" { 37 | charset = Alphanumeric 38 | } 39 | b := make([]byte, length) 40 | for i := range b { 41 | b[i] = charset[rand.Int63()%int64(len(charset))] 42 | } 43 | return string(b) 44 | } 45 | 46 | func String(length uint8, charsets ...string) string { 47 | return global.String(length, charsets...) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | before_install: 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 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/mattn/go-colorable/README.md: -------------------------------------------------------------------------------- 1 | # go-colorable 2 | 3 | [![Godoc Reference](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable) 4 | [![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable) 5 | [![Coverage Status](https://coveralls.io/repos/github/mattn/go-colorable/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-colorable?branch=master) 6 | [![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable) 7 | 8 | Colorable writer for windows. 9 | 10 | For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) 11 | This package is possible to handle escape sequence for ansi color on windows. 12 | 13 | ## Too Bad! 14 | 15 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) 16 | 17 | 18 | ## So Good! 19 | 20 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) 21 | 22 | ## Usage 23 | 24 | ```go 25 | logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) 26 | logrus.SetOutput(colorable.NewColorableStdout()) 27 | 28 | logrus.Info("succeeded") 29 | logrus.Warn("not correct") 30 | logrus.Error("something error") 31 | logrus.Fatal("panic") 32 | ``` 33 | 34 | You can compile above code on non-windows OSs. 35 | 36 | ## Installation 37 | 38 | ``` 39 | $ go get github.com/mattn/go-colorable 40 | ``` 41 | 42 | # License 43 | 44 | MIT 45 | 46 | # Author 47 | 48 | Yasuhiro Matsumoto (a.k.a mattn) 49 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | _ "github.com/mattn/go-isatty" 10 | ) 11 | 12 | // NewColorable return new instance of Writer which handle escape sequence. 13 | func NewColorable(file *os.File) io.Writer { 14 | if file == nil { 15 | panic("nil passed instead of *os.File to NewColorable()") 16 | } 17 | 18 | return file 19 | } 20 | 21 | // NewColorableStdout return new instance of Writer which handle escape sequence for stdout. 22 | func NewColorableStdout() io.Writer { 23 | return os.Stdout 24 | } 25 | 26 | // NewColorableStderr return new instance of Writer which handle escape sequence for stderr. 27 | func NewColorableStderr() io.Writer { 28 | return os.Stderr 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable return new instance of Writer which handle escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout return new instance of Writer which handle escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr return new instance of Writer which handle escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-colorable 2 | 3 | require github.com/mattn/go-isatty v0.0.8 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.sum: -------------------------------------------------------------------------------- 1 | github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= 2 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 3 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= 4 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 5 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/noncolorable.go: -------------------------------------------------------------------------------- 1 | package colorable 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | ) 7 | 8 | // NonColorable hold writer but remove escape sequence. 9 | type NonColorable struct { 10 | out io.Writer 11 | } 12 | 13 | // NewNonColorable return new instance of Writer which remove escape sequence from Writer. 14 | func NewNonColorable(w io.Writer) io.Writer { 15 | return &NonColorable{out: w} 16 | } 17 | 18 | // Write write data on console 19 | func (w *NonColorable) Write(data []byte) (n int, err error) { 20 | er := bytes.NewReader(data) 21 | var bw [1]byte 22 | loop: 23 | for { 24 | c1, err := er.ReadByte() 25 | if err != nil { 26 | break loop 27 | } 28 | if c1 != 0x1b { 29 | bw[0] = c1 30 | w.out.Write(bw[:]) 31 | continue 32 | } 33 | c2, err := er.ReadByte() 34 | if err != nil { 35 | break loop 36 | } 37 | if c2 != 0x5b { 38 | continue 39 | } 40 | 41 | var buf bytes.Buffer 42 | for { 43 | c, err := er.ReadByte() 44 | if err != nil { 45 | break loop 46 | } 47 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { 48 | break 49 | } 50 | buf.Write([]byte(string(c))) 51 | } 52 | } 53 | 54 | return len(data), nil 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | os: 6 | - linux 7 | - osx 8 | 9 | before_install: 10 | - go get github.com/mattn/goveralls 11 | - go get golang.org/x/tools/cmd/cover 12 | script: 13 | - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 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/mattn/go-isatty/README.md: -------------------------------------------------------------------------------- 1 | # go-isatty 2 | 3 | [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) 4 | [![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/mattn/go-isatty) 5 | [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) 6 | [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) 7 | 8 | isatty for golang 9 | 10 | ## Usage 11 | 12 | ```go 13 | package main 14 | 15 | import ( 16 | "fmt" 17 | "github.com/mattn/go-isatty" 18 | "os" 19 | ) 20 | 21 | func main() { 22 | if isatty.IsTerminal(os.Stdout.Fd()) { 23 | fmt.Println("Is Terminal") 24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { 25 | fmt.Println("Is Cygwin/MSYS2 Terminal") 26 | } else { 27 | fmt.Println("Is Not Terminal") 28 | } 29 | } 30 | ``` 31 | 32 | ## Installation 33 | 34 | ``` 35 | $ go get github.com/mattn/go-isatty 36 | ``` 37 | 38 | ## License 39 | 40 | MIT 41 | 42 | ## Author 43 | 44 | Yasuhiro Matsumoto (a.k.a mattn) 45 | 46 | ## Thanks 47 | 48 | * k-takata: base idea for IsCygwinTerminal 49 | 50 | https://github.com/k-takata/go-iscygpty 51 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-isatty 2 | 3 | require golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= 2 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_android.go: -------------------------------------------------------------------------------- 1 | // +build android 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | // IsTerminal return true if the file descriptor is terminal. 13 | func IsTerminal(fd uintptr) bool { 14 | var termios syscall.Termios 15 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 16 | return err == 0 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | 20 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 21 | // terminal. This is also always false on this environment. 22 | func IsCygwinTerminal(fd uintptr) bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | // +build !android 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6 5 | 6 | script: 7 | # build test for supported platforms 8 | - GOOS=linux go build 9 | - GOOS=darwin go build 10 | - GOOS=freebsd go build 11 | - GOOS=windows go build 12 | - GOARCH=386 go build 13 | 14 | # run tests on a standard platform 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Aliaksandr Valialkin, VertaMedia 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 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/valyala/bytebufferpool.svg)](https://travis-ci.org/valyala/bytebufferpool) 2 | [![GoDoc](https://godoc.org/github.com/valyala/bytebufferpool?status.svg)](http://godoc.org/github.com/valyala/bytebufferpool) 3 | [![Go Report](http://goreportcard.com/badge/valyala/bytebufferpool)](http://goreportcard.com/report/valyala/bytebufferpool) 4 | 5 | # bytebufferpool 6 | 7 | An implementation of a pool of byte buffers with anti-memory-waste protection. 8 | 9 | The pool may waste limited amount of memory due to fragmentation. 10 | This amount equals to the maximum total size of the byte buffers 11 | in concurrent use. 12 | 13 | # Benchmark results 14 | Currently bytebufferpool is fastest and most effective buffer pool written in Go. 15 | 16 | You can find results [here](https://omgnull.github.io/go-benchmark/buffer/). 17 | 18 | # bytebufferpool users 19 | 20 | * [fasthttp](https://github.com/valyala/fasthttp) 21 | * [quicktemplate](https://github.com/valyala/quicktemplate) 22 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/doc.go: -------------------------------------------------------------------------------- 1 | // Package bytebufferpool implements a pool of byte buffers 2 | // with anti-fragmentation protection. 3 | // 4 | // The pool may waste limited amount of memory due to fragmentation. 5 | // This amount equals to the maximum total size of the byte buffers 6 | // in concurrent use. 7 | package bytebufferpool 8 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fasttemplate/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Aliaksandr Valialkin 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 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fasttemplate/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/valyala/fasttemplate 2 | 3 | require github.com/valyala/bytebufferpool v1.0.0 4 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fasttemplate/go.sum: -------------------------------------------------------------------------------- 1 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= 2 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= 3 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fasttemplate/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package fasttemplate 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | func unsafeBytes2String(b []byte) string { 11 | return *(*string)(unsafe.Pointer(&b)) 12 | } 13 | 14 | func unsafeString2Bytes(s string) []byte { 15 | sh := (*reflect.StringHeader)(unsafe.Pointer(&s)) 16 | bh := reflect.SliceHeader{ 17 | Data: sh.Data, 18 | Len: sh.Len, 19 | Cap: sh.Len, 20 | } 21 | return *(*[]byte)(unsafe.Pointer(&bh)) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fasttemplate/unsafe_gae.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package fasttemplate 4 | 5 | func unsafeBytes2String(b []byte) string { 6 | return string(b) 7 | } 8 | 9 | func unsafeString2Bytes(s string) []byte { 10 | return []byte(s) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8 5 | - tip 6 | 7 | script: 8 | - go test 9 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Alexander F Rødseth 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 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/README.md: -------------------------------------------------------------------------------- 1 | # Cookie [![Build Status](https://travis-ci.org/xyproto/cookie.svg?branch=master)](https://travis-ci.org/xyproto/cookie) [![GoDoc](https://godoc.org/github.com/xyproto/cookie?status.svg)](http://godoc.org/github.com/xyproto/cookie) [![Report Card](https://img.shields.io/badge/go_report-A+-brightgreen.svg?style=flat)](http://goreportcard.com/report/xyproto/cookie) 2 | 3 | Functions related to cookies. 4 | 5 | Related projects 6 | ---------------- 7 | 8 | * [permissions2](https://github.com/xyproto/permissions2) 9 | * [permissionbolt](https://github.com/xyproto/permissionbolt) 10 | * [permissionhstore](https://github.com/xyproto/permissionhstore) 11 | * [permissionsql](https://github.com/xyproto/permissionsql) 12 | 13 | General information 14 | ------------------- 15 | 16 | * Version: 2.2.0 17 | * License: MIT 18 | * Alexander F. Rødseth <xyproto@archlinux.org> 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/cookie 2 | 3 | require github.com/xyproto/randomstring v0.0.0-20181220103026-e5e8317e5d67 4 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/go.sum: -------------------------------------------------------------------------------- 1 | github.com/xyproto/randomstring v0.0.0-20181220103026-e5e8317e5d67 h1:SKnNWKHC0th19CZTOH/KQevGTolInAFI6yQcXBQB90E= 2 | github.com/xyproto/randomstring v0.0.0-20181220103026-e5e8317e5d67/go.mod h1:HcK1ojGYWgNJz1Rp9UouvxVGIWsMFAtkftDoHZ6DE9k= 3 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/cookie/randomstring.go: -------------------------------------------------------------------------------- 1 | package cookie 2 | 3 | // This file exists only for backwards compatibility reasons 4 | 5 | import ( 6 | "github.com/xyproto/randomstring" 7 | ) 8 | 9 | // Seed the random number generator. One of many possible ways. 10 | func Seed() { 11 | randomstring.Seed() 12 | } 13 | 14 | // RandomString generates a random string of a given length. 15 | func RandomString(length int) string { 16 | return randomstring.String(length) 17 | } 18 | 19 | /*RandomHumanFriendlyString generates a random, but human-friendly, string of 20 | * the given length. It should be possible to read out loud and send in an email 21 | * without problems. The string alternates between vowels and consontants. 22 | * 23 | * Google Translate believes the output is Samoan. 24 | * 25 | * Example output for length 10: ookeouvapu 26 | */ 27 | func RandomHumanFriendlyString(length int) string { 28 | return randomstring.HumanFriendlyString(length) 29 | } 30 | 31 | // RandomCookieFriendlyString generates a random, but cookie-friendly, string of 32 | // the given length. 33 | func RandomCookieFriendlyString(length int) string { 34 | return randomstring.CookieFriendlyString(length) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/permissions2/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | *.swp 6 | 7 | # Folders 8 | _obj 9 | _test 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.rdb 26 | 27 | # Executables for the examples 28 | examples/negroni/negroni 29 | examples/martini/martini 30 | examples/gin/gin 31 | examples/macaron/macaron 32 | examples/echo/echo 33 | examples/http/http 34 | examples/goji/goji 35 | examples/iris/iris 36 | examples/getdb/getdb 37 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/permissions2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | services: 4 | - redis-server 5 | 6 | go: 7 | - "1.9" 8 | - "1.10" 9 | - "1.11" 10 | - "1.12" 11 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/permissions2/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alexander F. Rødseth 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/xyproto/permissions2/TODO.md: -------------------------------------------------------------------------------- 1 | TODO 2 | ==== 3 | 4 | Priority 5 | -------- 6 | 7 | - [ ] Document how to add a custom role (like admin/user/public). 8 | 9 | For the next major version 10 | -------------------------- 11 | 12 | - [ ] Let `HashPassword` return an error instead of panic if bcrypt should fail. 13 | - [ ] Let `NewUserState` return an error instead of the user having to check the Redis connection first. 14 | 15 | Maybe 16 | ----- 17 | 18 | - [ ] Use a more international selection of letters when validating usernames (in `userstate.go`). 19 | - [ ] Look into writing samples for: 20 | - [ ] [pilu/traffix](https://github.com/pilu/traffic) 21 | - [ ] [beego](https://github.com/astaxie/beego) 22 | - See: [filter.md](http://beego.me/docs/mvc/controller/filter.md) 23 | - [ ] [gocraft/web](https://github.com/gocraft/web) 24 | - [ ] [revel](https://github.com/revel/revel) 25 | - [ ] Look into supporting HTTP basic auth, but only for some paths (see [scoreserver](https://github.com/xyproto/scoreserver)). 26 | 27 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/permissions2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/permissions2 2 | 3 | require ( 4 | github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect 5 | github.com/gin-contrib/sse v0.1.0 // indirect 6 | github.com/gin-gonic/gin v1.4.0 7 | github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab 8 | github.com/golang/protobuf v1.3.2 // indirect 9 | github.com/gomodule/redigo v2.0.0+incompatible 10 | github.com/json-iterator/go v1.1.7 // indirect 11 | github.com/kr/pretty v0.1.0 // indirect 12 | github.com/mattn/go-isatty v0.0.8 // indirect 13 | github.com/ugorji/go v1.1.7 // indirect 14 | github.com/urfave/negroni v1.0.0 15 | github.com/xyproto/cookie v0.0.0-20181220103240-f4de411f45ff 16 | github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684 17 | github.com/xyproto/randomstring v0.0.0-20181222003104-0f764aabc45a // indirect 18 | github.com/xyproto/simpleredis v0.0.0-20181004131423-f2c3a2cf62d0 19 | github.com/zenazn/goji v0.9.0 20 | golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 21 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect 22 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e // indirect 23 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/permissions2/hashing.go: -------------------------------------------------------------------------------- 1 | package permissions 2 | 3 | import ( 4 | "crypto/sha256" 5 | "crypto/subtle" 6 | 7 | "golang.org/x/crypto/bcrypt" 8 | "io" 9 | ) 10 | 11 | // Hash the password with sha256 (the username is needed for salting) 12 | func hashSha256(cookieSecret, username, password string) []byte { 13 | hasher := sha256.New() 14 | // Use the cookie secret as additional salt 15 | io.WriteString(hasher, password+cookieSecret+username) 16 | return hasher.Sum(nil) 17 | } 18 | 19 | // Hash the password with bcrypt 20 | func hashBcrypt(password string) []byte { 21 | hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) 22 | if err != nil { 23 | panic("Permissions: bcrypt password hashing unsuccessful") 24 | } 25 | return hash 26 | } 27 | 28 | // Check if a given password(+username) is correct, for a given sha256 hash 29 | func correctSha256(hash []byte, cookieSecret, username, password string) bool { 30 | comparisonHash := hashSha256(cookieSecret, username, password) 31 | // check that the lengths are equal before calling ConstantTimeCompare 32 | if len(hash) != len(comparisonHash) { 33 | return false 34 | } 35 | // prevents timing attack 36 | return subtle.ConstantTimeCompare(hash, comparisonHash) == 1 37 | } 38 | 39 | // Check if a given password is correct, for a given bcrypt hash 40 | func correctBcrypt(hash []byte, password string) bool { 41 | // prevents timing attack 42 | return bcrypt.CompareHashAndPassword(hash, []byte(password)) == nil 43 | } 44 | 45 | // Check if the given hash is sha256 (when the alternative is only bcrypt) 46 | func isSha256(hash []byte) bool { 47 | return len(hash) == 32 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/pinterface/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/pinterface/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alexander F. Rødseth 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 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/pinterface/README.md: -------------------------------------------------------------------------------- 1 | # pinterface 2 | 3 | Interfaces for: 4 | --------------- 5 | 6 | * Redis: [permissions2](https://github.com/xyproto/permissions2) and [simpleredis](https://github.com/xyproto/simpleredis) 7 | * Bolt: [permissionbolt](https://github.com/xyproto/permissionbolt) and [simplebolt](https://github.com/xyproto/simplebolt) 8 | * MariaDB/MySQL: [permissionsql](https://github.com/xyproto/permissionsql) and [simplemaria](https://github.com/xyproto/simplemaria) 9 | * PostgreSQL: [pstore](https://github.com/xyproto/pstore) and [simplehstore](https://github.com/xyproto/simplehstore) 10 | 11 | General information 12 | ------------------- 13 | 14 | * Version 5.0.0 15 | * License: MIT 16 | * Author: Alexander F Rødseth <xyproto@archlinux.org> 17 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/pinterface/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/pinterface 2 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/randomstring/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/randomstring/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Alexander F. Rødseth 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/xyproto/randomstring/README.md: -------------------------------------------------------------------------------- 1 | # randomstring 2 | 3 | Generate random strings. 4 | 5 | Used by [cookie](https://github.com/xyproto/cookie) and [alienpdf](https://github.com/xyproto/alienpdf/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/randomstring/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/randomstring 2 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/simpleredis/.gitignore: -------------------------------------------------------------------------------- 1 | example/example 2 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/simpleredis/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.8" 5 | - "1.9" 6 | - "1.10" 7 | - "1.11" 8 | - tip 9 | 10 | services: 11 | - redis-server 12 | 13 | os: 14 | - linux 15 | 16 | dist: trusty 17 | sudo: false 18 | 19 | install: true 20 | 21 | script: 22 | - env GO111MODULE=on go build 23 | - env GO111MODULE=on go test 24 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/simpleredis/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Alexander F. Rødseth 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/xyproto/simpleredis/creator.go: -------------------------------------------------------------------------------- 1 | package simpleredis 2 | 3 | import ( 4 | "github.com/xyproto/pinterface" 5 | ) 6 | 7 | // For implementing pinterface.ICreator 8 | 9 | type RedisCreator struct { 10 | pool *ConnectionPool 11 | dbindex int 12 | } 13 | 14 | func NewCreator(pool *ConnectionPool, dbindex int) *RedisCreator { 15 | return &RedisCreator{pool, dbindex} 16 | } 17 | 18 | func (c *RedisCreator) SelectDatabase(dbindex int) { 19 | c.dbindex = dbindex 20 | } 21 | 22 | func (c *RedisCreator) NewList(id string) (pinterface.IList, error) { 23 | return &List{c.pool, id, c.dbindex}, nil 24 | } 25 | 26 | func (c *RedisCreator) NewSet(id string) (pinterface.ISet, error) { 27 | return &Set{c.pool, id, c.dbindex}, nil 28 | } 29 | 30 | func (c *RedisCreator) NewHashMap(id string) (pinterface.IHashMap, error) { 31 | return &HashMap{c.pool, id, c.dbindex}, nil 32 | } 33 | 34 | func (c *RedisCreator) NewKeyValue(id string) (pinterface.IKeyValue, error) { 35 | return &KeyValue{c.pool, id, c.dbindex}, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/simpleredis/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xyproto/simpleredis 2 | 3 | require ( 4 | github.com/gomodule/redigo v2.0.0+incompatible 5 | github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/github.com/xyproto/simpleredis/go.sum: -------------------------------------------------------------------------------- 1 | github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= 2 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 3 | github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684 h1:NFSurCu+HqTKLlURDwnZL2J6GQv4WKzGBuFdrO8Rimc= 4 | github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684/go.mod h1:BzQLxcJwPQpzFgOyNEL02hGO5T4VqXB1BX+lp5bE040= 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/acme/version_go112.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 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package acme 9 | 10 | import "runtime/debug" 11 | 12 | func init() { 13 | // Set packageVersion if the binary was built in modules mode and x/crypto 14 | // was not replaced with a different module. 15 | info, ok := debug.ReadBuildInfo() 16 | if !ok { 17 | return 18 | } 19 | for _, m := range info.Deps { 20 | if m.Path != "golang.org/x/crypto" { 21 | continue 22 | } 23 | if m.Replace == nil { 24 | packageVersion = m.Version 25 | } 26 | break 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 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 | //go:build go1.18 8 | // +build go1.18 9 | 10 | package idna 11 | 12 | // Transitional processing is disabled by default in Go 1.18. 13 | // https://golang.org/issue/47510 14 | const transitionalLookup = false 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/pre_go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 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 | //go:build !go1.18 8 | // +build !go1.18 9 | 10 | package idna 11 | 12 | const transitionalLookup = true 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/trie.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2016 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 idna 8 | 9 | // appendMapping appends the mapping for the respective rune. isMapped must be 10 | // true. A mapping is a categorization of a rune as defined in UTS #46. 11 | func (c info) appendMapping(b []byte, s string) []byte { 12 | index := int(c >> indexShift) 13 | if c&xorBit == 0 { 14 | s := mappings[index:] 15 | return append(b, s[1:s[0]+1]...) 16 | } 17 | b = append(b, s...) 18 | if c&inlineXOR == inlineXOR { 19 | // TODO: support and handle two-byte inline masks 20 | b[len(b)-1] ^= byte(index) 21 | } else { 22 | for p := len(b) - int(xorData[index]); p < len(b); p++ { 23 | index++ 24 | b[p] ^= xorData[index] 25 | } 26 | } 27 | return b 28 | } 29 | 30 | // Sparse block handling code. 31 | 32 | type valueRange struct { 33 | value uint16 // header: value:stride 34 | lo, hi byte // header: lo:n 35 | } 36 | 37 | type sparseBlocks struct { 38 | values []valueRange 39 | offset []uint16 40 | } 41 | 42 | var idnaSparse = sparseBlocks{ 43 | values: idnaSparseValues[:], 44 | offset: idnaSparseOffset[:], 45 | } 46 | 47 | // Don't use newIdnaTrie to avoid unconditional linking in of the table. 48 | var trie = &idnaTrie{} 49 | 50 | // lookup determines the type of block n and looks up the value for b. 51 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block 52 | // is a list of ranges with an accompanying value. Given a matching range r, 53 | // the value for b is by r.value + (b - r.lo) * stride. 54 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { 55 | offset := t.offset[n] 56 | header := t.values[offset] 57 | lo := offset + 1 58 | hi := lo + uint16(header.lo) 59 | for lo < hi { 60 | m := lo + (hi-lo)/2 61 | r := t.values[m] 62 | if r.lo <= b && b <= r.hi { 63 | return r.value + uint16(b-r.lo)*header.value 64 | } 65 | if b < r.lo { 66 | hi = m 67 | } else { 68 | lo = m + 1 69 | } 70 | } 71 | return 0 72 | } 73 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package unsafeheader contains header declarations for the Go runtime's 6 | // slice and string implementations. 7 | // 8 | // This package allows x/sys to use types equivalent to 9 | // reflect.SliceHeader and reflect.StringHeader without introducing 10 | // a dependency on the (relatively heavy) "reflect" package. 11 | package unsafeheader 12 | 13 | import ( 14 | "unsafe" 15 | ) 16 | 17 | // Slice is the runtime representation of a slice. 18 | // It cannot be used safely or portably and its representation may change in a later release. 19 | type Slice struct { 20 | Data unsafe.Pointer 21 | Len int 22 | Cap int 23 | } 24 | 25 | // String is the runtime representation of a string. 26 | // It cannot be used safely or portably and its representation may change in a later release. 27 | type String struct { 28 | Data unsafe.Pointer 29 | Len int 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/affinity_linux.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 | // CPU affinity functions 6 | 7 | package unix 8 | 9 | import ( 10 | "math/bits" 11 | "unsafe" 12 | ) 13 | 14 | const cpuSetSize = _CPU_SETSIZE / _NCPUBITS 15 | 16 | // CPUSet represents a CPU affinity mask. 17 | type CPUSet [cpuSetSize]cpuMask 18 | 19 | func schedAffinity(trap uintptr, pid int, set *CPUSet) error { 20 | _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set))) 21 | if e != 0 { 22 | return errnoErr(e) 23 | } 24 | return nil 25 | } 26 | 27 | // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. 28 | // If pid is 0 the calling thread is used. 29 | func SchedGetaffinity(pid int, set *CPUSet) error { 30 | return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set) 31 | } 32 | 33 | // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. 34 | // If pid is 0 the calling thread is used. 35 | func SchedSetaffinity(pid int, set *CPUSet) error { 36 | return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set) 37 | } 38 | 39 | // Zero clears the set s, so that it contains no CPUs. 40 | func (s *CPUSet) Zero() { 41 | for i := range s { 42 | s[i] = 0 43 | } 44 | } 45 | 46 | func cpuBitsIndex(cpu int) int { 47 | return cpu / _NCPUBITS 48 | } 49 | 50 | func cpuBitsMask(cpu int) cpuMask { 51 | return cpuMask(1 << (uint(cpu) % _NCPUBITS)) 52 | } 53 | 54 | // Set adds cpu to the set s. 55 | func (s *CPUSet) Set(cpu int) { 56 | i := cpuBitsIndex(cpu) 57 | if i < len(s) { 58 | s[i] |= cpuBitsMask(cpu) 59 | } 60 | } 61 | 62 | // Clear removes cpu from the set s. 63 | func (s *CPUSet) Clear(cpu int) { 64 | i := cpuBitsIndex(cpu) 65 | if i < len(s) { 66 | s[i] &^= cpuBitsMask(cpu) 67 | } 68 | } 69 | 70 | // IsSet reports whether cpu is in the set s. 71 | func (s *CPUSet) IsSet(cpu int) bool { 72 | i := cpuBitsIndex(cpu) 73 | if i < len(s) { 74 | return s[i]&cpuBitsMask(cpu) != 0 75 | } 76 | return false 77 | } 78 | 79 | // Count returns the number of CPUs in the set s. 80 | func (s *CPUSet) Count() int { 81 | c := 0 82 | for _, b := range s { 83 | c += bits.OnesCount64(uint64(b)) 84 | } 85 | return c 86 | } 87 | -------------------------------------------------------------------------------- /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 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | // +build go1.9 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | type Signal = syscall.Signal 14 | type Errno = syscall.Errno 15 | type SysProcAttr = syscall.SysProcAttr 16 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for 386 BSD 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_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for AMD64 BSD 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_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM BSD 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_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM64 BSD 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_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for RISCV64 BSD 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_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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for 386, Linux 12 | // 13 | 14 | // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 15 | // instead of the glibc-specific "CALL 0x10(GS)". 16 | #define INVOKE_SYSCALL INT $0x80 17 | 18 | // Just jump to package syscall's implementation for all these functions. 19 | // The runtime may know about them. 20 | 21 | TEXT ·Syscall(SB),NOSPLIT,$0-28 22 | JMP syscall·Syscall(SB) 23 | 24 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 25 | JMP syscall·Syscall6(SB) 26 | 27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 28 | CALL runtime·entersyscall(SB) 29 | MOVL trap+0(FP), AX // syscall entry 30 | MOVL a1+4(FP), BX 31 | MOVL a2+8(FP), CX 32 | MOVL a3+12(FP), DX 33 | MOVL $0, SI 34 | MOVL $0, DI 35 | INVOKE_SYSCALL 36 | MOVL AX, r1+16(FP) 37 | MOVL DX, r2+20(FP) 38 | CALL runtime·exitsyscall(SB) 39 | RET 40 | 41 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 42 | JMP syscall·RawSyscall(SB) 43 | 44 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 45 | JMP syscall·RawSyscall6(SB) 46 | 47 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 48 | MOVL trap+0(FP), AX // syscall entry 49 | MOVL a1+4(FP), BX 50 | MOVL a2+8(FP), CX 51 | MOVL a3+12(FP), DX 52 | MOVL $0, SI 53 | MOVL $0, DI 54 | INVOKE_SYSCALL 55 | MOVL AX, r1+16(FP) 56 | MOVL DX, r2+20(FP) 57 | RET 58 | 59 | TEXT ·socketcall(SB),NOSPLIT,$0-36 60 | JMP syscall·socketcall(SB) 61 | 62 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 63 | JMP syscall·rawsocketcall(SB) 64 | 65 | TEXT ·seek(SB),NOSPLIT,$0-28 66 | JMP syscall·seek(SB) 67 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for AMD64, Linux 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 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 24 | CALL runtime·entersyscall(SB) 25 | MOVQ a1+8(FP), DI 26 | MOVQ a2+16(FP), SI 27 | MOVQ a3+24(FP), DX 28 | MOVQ $0, R10 29 | MOVQ $0, R8 30 | MOVQ $0, R9 31 | MOVQ trap+0(FP), AX // syscall entry 32 | SYSCALL 33 | MOVQ AX, r1+32(FP) 34 | MOVQ DX, r2+40(FP) 35 | CALL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 39 | JMP syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 42 | JMP syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 45 | MOVQ a1+8(FP), DI 46 | MOVQ a2+16(FP), SI 47 | MOVQ a3+24(FP), DX 48 | MOVQ $0, R10 49 | MOVQ $0, R8 50 | MOVQ $0, R9 51 | MOVQ trap+0(FP), AX // syscall entry 52 | SYSCALL 53 | MOVQ AX, r1+32(FP) 54 | MOVQ DX, r2+40(FP) 55 | RET 56 | 57 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 58 | JMP syscall·gettimeofday(SB) 59 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for arm, Linux 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 ·SyscallNoError(SB),NOSPLIT,$0-24 24 | BL runtime·entersyscall(SB) 25 | MOVW trap+0(FP), R7 26 | MOVW a1+4(FP), R0 27 | MOVW a2+8(FP), R1 28 | MOVW a3+12(FP), R2 29 | MOVW $0, R3 30 | MOVW $0, R4 31 | MOVW $0, R5 32 | SWI $0 33 | MOVW R0, r1+16(FP) 34 | MOVW $0, R0 35 | MOVW R0, r2+20(FP) 36 | BL runtime·exitsyscall(SB) 37 | RET 38 | 39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 40 | B syscall·RawSyscall(SB) 41 | 42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 43 | B syscall·RawSyscall6(SB) 44 | 45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 46 | MOVW trap+0(FP), R7 // syscall entry 47 | MOVW a1+4(FP), R0 48 | MOVW a2+8(FP), R1 49 | MOVW a3+12(FP), R2 50 | SWI $0 51 | MOVW R0, r1+16(FP) 52 | MOVW $0, R0 53 | MOVW R0, r2+20(FP) 54 | RET 55 | 56 | TEXT ·seek(SB),NOSPLIT,$0-28 57 | B syscall·seek(SB) 58 | -------------------------------------------------------------------------------- /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 | //go:build linux && arm64 && gc 6 | // +build linux 7 | // +build arm64 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // Just jump to package syscall's implementation for all these functions. 13 | // The runtime may know about them. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | B syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | B syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | BL runtime·entersyscall(SB) 23 | MOVD a1+8(FP), R0 24 | MOVD a2+16(FP), R1 25 | MOVD a3+24(FP), R2 26 | MOVD $0, R3 27 | MOVD $0, R4 28 | MOVD $0, R5 29 | MOVD trap+0(FP), R8 // syscall entry 30 | SVC 31 | MOVD R0, r1+32(FP) // r1 32 | MOVD R1, r2+40(FP) // r2 33 | BL runtime·exitsyscall(SB) 34 | RET 35 | 36 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 37 | B syscall·RawSyscall(SB) 38 | 39 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 40 | B syscall·RawSyscall6(SB) 41 | 42 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 43 | MOVD a1+8(FP), R0 44 | MOVD a2+16(FP), R1 45 | MOVD a3+24(FP), R2 46 | MOVD $0, R3 47 | MOVD $0, R4 48 | MOVD $0, R5 49 | MOVD trap+0(FP), R8 // syscall entry 50 | SVC 51 | MOVD R0, r1+32(FP) 52 | MOVD R1, r2+40(FP) 53 | RET 54 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_loong64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && loong64 && gc 6 | // +build linux 7 | // +build loong64 8 | // +build gc 9 | 10 | #include "textflag.h" 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 | JAL runtime·entersyscall(SB) 24 | MOVV a1+8(FP), R4 25 | MOVV a2+16(FP), R5 26 | MOVV a3+24(FP), R6 27 | MOVV R0, R7 28 | MOVV R0, R8 29 | MOVV R0, R9 30 | MOVV trap+0(FP), R11 // syscall entry 31 | SYSCALL 32 | MOVV R4, r1+32(FP) 33 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 34 | JAL 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 | MOVV a1+8(FP), R4 45 | MOVV a2+16(FP), R5 46 | MOVV a3+24(FP), R6 47 | MOVV R0, R7 48 | MOVV R0, R8 49 | MOVV R0, R9 50 | MOVV trap+0(FP), R11 // syscall entry 51 | SYSCALL 52 | MOVV R4, r1+32(FP) 53 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 54 | RET 55 | -------------------------------------------------------------------------------- /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 | //go:build linux && (mips64 || mips64le) && gc 6 | // +build linux 7 | // +build mips64 mips64le 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for mips64, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-56 20 | JMP syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 23 | JMP syscall·Syscall6(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 26 | JAL runtime·entersyscall(SB) 27 | MOVV a1+8(FP), R4 28 | MOVV a2+16(FP), R5 29 | MOVV a3+24(FP), R6 30 | MOVV R0, R7 31 | MOVV R0, R8 32 | MOVV R0, R9 33 | MOVV trap+0(FP), R2 // syscall entry 34 | SYSCALL 35 | MOVV R2, r1+32(FP) 36 | MOVV R3, r2+40(FP) 37 | JAL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 41 | JMP syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 44 | JMP syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 47 | MOVV a1+8(FP), R4 48 | MOVV a2+16(FP), R5 49 | MOVV a3+24(FP), R6 50 | MOVV R0, R7 51 | MOVV R0, R8 52 | MOVV R0, R9 53 | MOVV trap+0(FP), R2 // syscall entry 54 | SYSCALL 55 | MOVV R2, r1+32(FP) 56 | MOVV R3, r2+40(FP) 57 | RET 58 | -------------------------------------------------------------------------------- /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 | //go:build linux && (mips || mipsle) && gc 6 | // +build linux 7 | // +build mips mipsle 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for mips, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-28 20 | JMP syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 23 | JMP syscall·Syscall6(SB) 24 | 25 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 26 | JMP syscall·Syscall9(SB) 27 | 28 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 29 | JAL runtime·entersyscall(SB) 30 | MOVW a1+4(FP), R4 31 | MOVW a2+8(FP), R5 32 | MOVW a3+12(FP), R6 33 | MOVW R0, R7 34 | MOVW trap+0(FP), R2 // syscall entry 35 | SYSCALL 36 | MOVW R2, r1+16(FP) // r1 37 | MOVW R3, r2+20(FP) // r2 38 | JAL runtime·exitsyscall(SB) 39 | RET 40 | 41 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 42 | JMP syscall·RawSyscall(SB) 43 | 44 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 45 | JMP syscall·RawSyscall6(SB) 46 | 47 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 48 | MOVW a1+4(FP), R4 49 | MOVW a2+8(FP), R5 50 | MOVW a3+12(FP), R6 51 | MOVW trap+0(FP), R2 // syscall entry 52 | SYSCALL 53 | MOVW R2, r1+16(FP) 54 | MOVW R3, r2+20(FP) 55 | RET 56 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64 || ppc64le) && gc 6 | // +build linux 7 | // +build ppc64 ppc64le 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for ppc64, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 20 | BL runtime·entersyscall(SB) 21 | MOVD a1+8(FP), R3 22 | MOVD a2+16(FP), R4 23 | MOVD a3+24(FP), R5 24 | MOVD R0, R6 25 | MOVD R0, R7 26 | MOVD R0, R8 27 | MOVD trap+0(FP), R9 // syscall entry 28 | SYSCALL R9 29 | MOVD R3, r1+32(FP) 30 | MOVD R4, r2+40(FP) 31 | BL runtime·exitsyscall(SB) 32 | RET 33 | 34 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 35 | MOVD a1+8(FP), R3 36 | MOVD a2+16(FP), R4 37 | MOVD a3+24(FP), R5 38 | MOVD R0, R6 39 | MOVD R0, R7 40 | MOVD R0, R8 41 | MOVD trap+0(FP), R9 // syscall entry 42 | SYSCALL R9 43 | MOVD R3, r1+32(FP) 44 | MOVD R4, r2+40(FP) 45 | RET 46 | -------------------------------------------------------------------------------- /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 | //go:build riscv64 && gc 6 | // +build riscv64 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for linux/riscv64. 13 | // 14 | // Where available, just jump to package syscall's implementation of 15 | // these functions. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 24 | CALL runtime·entersyscall(SB) 25 | MOV a1+8(FP), A0 26 | MOV a2+16(FP), A1 27 | MOV a3+24(FP), A2 28 | MOV trap+0(FP), A7 // syscall entry 29 | ECALL 30 | MOV A0, r1+32(FP) // r1 31 | MOV A1, r2+40(FP) // r2 32 | CALL runtime·exitsyscall(SB) 33 | RET 34 | 35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 36 | JMP syscall·RawSyscall(SB) 37 | 38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 39 | JMP syscall·RawSyscall6(SB) 40 | 41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 42 | MOV a1+8(FP), A0 43 | MOV a2+16(FP), A1 44 | MOV a3+24(FP), A2 45 | MOV trap+0(FP), A7 // syscall entry 46 | ECALL 47 | MOV A0, r1+32(FP) 48 | MOV A1, r2+40(FP) 49 | RET 50 | -------------------------------------------------------------------------------- /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 | //go:build linux && s390x && gc 6 | // +build linux 7 | // +build s390x 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for s390x, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-56 20 | BR syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 23 | BR syscall·Syscall6(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 26 | BL runtime·entersyscall(SB) 27 | MOVD a1+8(FP), R2 28 | MOVD a2+16(FP), R3 29 | MOVD a3+24(FP), R4 30 | MOVD $0, R5 31 | MOVD $0, R6 32 | MOVD $0, R7 33 | MOVD trap+0(FP), R1 // syscall entry 34 | SYSCALL 35 | MOVD R2, r1+32(FP) 36 | MOVD R3, r2+40(FP) 37 | BL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 41 | BR syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 44 | BR syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 47 | MOVD a1+8(FP), R2 48 | MOVD a2+16(FP), R3 49 | MOVD a3+24(FP), R4 50 | MOVD $0, R5 51 | MOVD $0, R6 52 | MOVD $0, R7 53 | MOVD trap+0(FP), R1 // syscall entry 54 | SYSCALL 55 | MOVD R2, r1+32(FP) 56 | MOVD R3, r2+40(FP) 57 | RET 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for mips64, OpenBSD 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 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | JMP syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | JMP syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | JMP syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 12 | // 13 | 14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 15 | JMP syscall·sysvicall6(SB) 16 | 17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSysvicall6(SB) 19 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | const ( 11 | R_OK = 0x4 12 | W_OK = 0x2 13 | X_OK = 0x1 14 | ) 15 | -------------------------------------------------------------------------------- /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 | //go:build aix && ppc 6 | // +build aix,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 | //go:build aix && ppc64 6 | // +build aix,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_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used by the Linux kernel and glibc. 7 | // 8 | // The information below is extracted and adapted from bits/sysmacros.h in the 9 | // glibc sources: 10 | // 11 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's 12 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major 13 | // number and m is a hex digit of the minor number. This is backward compatible 14 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also 15 | // backward compatible with the Linux kernel, which for some architectures uses 16 | // 32-bit dev_t, encoded as mmmM MMmm. 17 | 18 | package unix 19 | 20 | // Major returns the major component of a Linux device number. 21 | func Major(dev uint64) uint32 { 22 | major := uint32((dev & 0x00000000000fff00) >> 8) 23 | major |= uint32((dev & 0xfffff00000000000) >> 32) 24 | return major 25 | } 26 | 27 | // Minor returns the minor component of a Linux device number. 28 | func Minor(dev uint64) uint32 { 29 | minor := uint32((dev & 0x00000000000000ff) >> 0) 30 | minor |= uint32((dev & 0x00000ffffff00000) >> 12) 31 | return minor 32 | } 33 | 34 | // Mkdev returns a Linux device number generated from the given major and minor 35 | // components. 36 | func Mkdev(major, minor uint32) uint64 { 37 | dev := (uint64(major) & 0x00000fff) << 8 38 | dev |= (uint64(major) & 0xfffff000) << 32 39 | dev |= (uint64(minor) & 0x000000ff) << 0 40 | dev |= (uint64(minor) & 0xffffff00) << 12 41 | return dev 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | // +build zos,s390x 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by z/OS. 10 | // 11 | // The information below is extracted and adapted from macros. 12 | 13 | package unix 14 | 15 | // Major returns the major component of a z/OS device number. 16 | func Major(dev uint64) uint32 { 17 | return uint32((dev >> 16) & 0x0000FFFF) 18 | } 19 | 20 | // Minor returns the minor component of a z/OS device number. 21 | func Minor(dev uint64) uint32 { 22 | return uint32(dev & 0x0000FFFF) 23 | } 24 | 25 | // Mkdev returns a z/OS device number generated from the given major and minor 26 | // components. 27 | func Mkdev(major, minor uint32) uint64 { 28 | return (uint64(major) << 16) | uint64(minor) 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 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 7 | 8 | package unix 9 | 10 | const isBigEndian = true 11 | -------------------------------------------------------------------------------- /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 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 7 | 8 | package unix 9 | 10 | const isBigEndian = false 11 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | // Unix environment variables. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | func Unsetenv(key string) error { 31 | return syscall.Unsetenv(key) 32 | } 33 | -------------------------------------------------------------------------------- /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 | //go:build dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 13 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 14 | var fcntl64Syscall uintptr = SYS_FCNTL 15 | 16 | func fcntl(fd int, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(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 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 26 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 27 | return fcntl(int(fd), cmd, arg) 28 | } 29 | 30 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 31 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 32 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 33 | if errno == 0 { 34 | return nil 35 | } 36 | return errno 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc 7 | 8 | package unix 9 | 10 | func init() { 11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 13 | fcntl64Syscall = SYS_FCNTL64 14 | } 15 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | // Set adds fd to the set fds. 11 | func (fds *FdSet) Set(fd int) { 12 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 13 | } 14 | 15 | // Clear removes fd from the set fds. 16 | func (fds *FdSet) Clear(fd int) { 17 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 18 | } 19 | 20 | // IsSet returns whether fd is in the set fds. 21 | func (fds *FdSet) IsSet(fd int) bool { 22 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 23 | } 24 | 25 | // Zero clears the set fds. 26 | func (fds *FdSet) Zero() { 27 | for i := range fds.Bits { 28 | fds.Bits[i] = 0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo.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 | //go:build gccgo && !aix 6 | // +build gccgo,!aix 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // We can't use the gc-syntax .s files for gccgo. On the plus side 13 | // much of the functionality can be written directly in Go. 14 | 15 | func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr) 16 | 17 | func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) 18 | 19 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { 20 | syscall.Entersyscall() 21 | r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 22 | syscall.Exitsyscall() 23 | return r, 0 24 | } 25 | 26 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 27 | syscall.Entersyscall() 28 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 29 | syscall.Exitsyscall() 30 | return r, 0, syscall.Errno(errno) 31 | } 32 | 33 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 34 | syscall.Entersyscall() 35 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) 36 | syscall.Exitsyscall() 37 | return r, 0, syscall.Errno(errno) 38 | } 39 | 40 | func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) { 41 | syscall.Entersyscall() 42 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9) 43 | syscall.Exitsyscall() 44 | return r, 0, syscall.Errno(errno) 45 | } 46 | 47 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { 48 | r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 49 | return r, 0 50 | } 51 | 52 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 53 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 54 | return r, 0, syscall.Errno(errno) 55 | } 56 | 57 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 58 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) 59 | return r, 0, syscall.Errno(errno) 60 | } 61 | -------------------------------------------------------------------------------- /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 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) 25 | __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscall"); 26 | 27 | struct ret 28 | 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) 29 | { 30 | struct ret r; 31 | 32 | errno = 0; 33 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 34 | r.err = errno; 35 | return r; 36 | } 37 | 38 | uintptr_t 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) 39 | __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscallNoError"); 40 | 41 | uintptr_t 42 | 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) 43 | { 44 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 45 | } 46 | -------------------------------------------------------------------------------- /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 | //go:build gccgo && linux && amd64 6 | // +build gccgo,linux,amd64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //extern gettimeofday 13 | func realGettimeofday(*Timeval, *byte) int32 14 | 15 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 16 | r := realGettimeofday(tv, nil) 17 | if r < 0 { 18 | return syscall.GetErrno() 19 | } 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | // For Unix, get the pagesize from the runtime. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getpagesize() int { 15 | return syscall.Getpagesize() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | // +build ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /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 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | // +build darwin,race linux,race freebsd,race 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /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 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /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 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build aix dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | // ReadDirent reads directory entries from fd and writes them into buf. 11 | func ReadDirent(fd int, buf []byte) (n int, err error) { 12 | return Getdents(fd, buf) 13 | } 14 | -------------------------------------------------------------------------------- /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 | //go:build darwin 6 | // +build darwin 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // ReadDirent reads directory entries from fd and writes them into buf. 13 | func ReadDirent(fd int, buf []byte) (n int, err error) { 14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 16 | // actual system call is getdirentries64, 64 is a good guess. 17 | // TODO(rsc): Can we use a single global basep for all calls? 18 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 19 | return Getdirentries(fd, buf, base) 20 | } 21 | -------------------------------------------------------------------------------- /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_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 | //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | ) 13 | 14 | // Round the length of a raw sockaddr up to align it properly. 15 | func cmsgAlignOf(salen int) int { 16 | salign := SizeofPtr 17 | 18 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in 19 | // sockcmsg_dragonfly.go 20 | switch runtime.GOOS { 21 | case "aix": 22 | // There is no alignment on AIX. 23 | salign = 1 24 | case "darwin", "ios", "illumos", "solaris": 25 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris 26 | // kernels still require 32-bit aligned access to network 27 | // subsystem. 28 | if SizeofPtr == 8 { 29 | salign = 4 30 | } 31 | case "netbsd", "openbsd": 32 | // NetBSD and OpenBSD armv7 require 64-bit alignment. 33 | if runtime.GOARCH == "arm" { 34 | salign = 8 35 | } 36 | // NetBSD aarch64 requires 128-bit alignment. 37 | if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" { 38 | salign = 16 39 | } 40 | case "zos": 41 | // z/OS socket macros use [32-bit] sizeof(int) alignment, 42 | // not pointer width. 43 | salign = SizeofInt 44 | } 45 | 46 | return (salen + salign - 1) & ^(salign - 1) 47 | } 48 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package unix 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + uitoa(uint(-val)) 13 | } 14 | return uitoa(uint(val)) 15 | } 16 | 17 | func uitoa(val uint) string { 18 | var buf [32]byte // big enough for int64 19 | i := len(buf) - 1 20 | for val >= 10 { 21 | buf[i] = byte(val%10 + '0') 22 | i-- 23 | val /= 10 24 | } 25 | buf[i] = byte(val + '0') 26 | return string(buf[i:]) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func Fstat(fd int, stat *Stat_t) error { 41 | return fstat(fd, stat) 42 | } 43 | 44 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { 45 | return fstatat(dirfd, path, stat, flags) 46 | } 47 | 48 | func Lstat(path string, stat *Stat_t) error { 49 | return lstat(path, stat) 50 | } 51 | 52 | func Stat(path string, statptr *Stat_t) error { 53 | return stat(path, statptr) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | // +build aix,ppc64 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: sec, Nsec: nsec} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int64(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // In order to only have Timespec structure, type of Stat_t's fields 41 | // Atim, Mtim and Ctim is changed from StTimespec to Timespec during 42 | // ztypes generation. 43 | // On ppc64, Timespec.Nsec is an int64 while StTimespec.Nsec is an 44 | // int32, so the fields' value must be modified. 45 | func fixStatTimFields(stat *Stat_t) { 46 | stat.Atim.Nsec >>= 32 47 | stat.Mtim.Nsec >>= 32 48 | stat.Ctim.Nsec >>= 32 49 | } 50 | 51 | func Fstat(fd int, stat *Stat_t) error { 52 | err := fstat(fd, stat) 53 | if err != nil { 54 | return err 55 | } 56 | fixStatTimFields(stat) 57 | return nil 58 | } 59 | 60 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { 61 | err := fstatat(dirfd, path, stat, flags) 62 | if err != nil { 63 | return err 64 | } 65 | fixStatTimFields(stat) 66 | return nil 67 | } 68 | 69 | func Lstat(path string, stat *Stat_t) error { 70 | err := lstat(path, stat) 71 | if err != nil { 72 | return err 73 | } 74 | fixStatTimFields(stat) 75 | return nil 76 | } 77 | 78 | func Stat(path string, statptr *Stat_t) error { 79 | err := stat(path, statptr) 80 | if err != nil { 81 | return err 82 | } 83 | fixStatTimFields(statptr) 84 | return nil 85 | } 86 | -------------------------------------------------------------------------------- /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 | //go:build darwin && go1.12 && !go1.13 6 | // +build darwin,go1.12,!go1.13 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const _SYS_GETDIRENTRIES64 = 344 15 | 16 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 17 | // To implement this using libSystem we'd need syscall_syscallPtr for 18 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall 19 | // back to raw syscalls for this func on Go 1.12. 20 | var p unsafe.Pointer 21 | if len(buf) > 0 { 22 | p = unsafe.Pointer(&buf[0]) 23 | } else { 24 | p = unsafe.Pointer(&_zero) 25 | } 26 | r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 27 | n = int(r0) 28 | if e1 != 0 { 29 | return n, errnoErr(e1) 30 | } 31 | return n, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_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 | //go:build amd64 && darwin 6 | // +build amd64,darwin 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func setTimespec(sec, nsec int64) Timespec { 13 | return Timespec{Sec: sec, Nsec: nsec} 14 | } 15 | 16 | func setTimeval(sec, usec int64) Timeval { 17 | return Timeval{Sec: sec, Usec: int32(usec)} 18 | } 19 | 20 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 21 | k.Ident = uint64(fd) 22 | k.Filter = int16(mode) 23 | k.Flags = uint16(flags) 24 | } 25 | 26 | func (iov *Iovec) SetLen(length int) { 27 | iov.Len = uint64(length) 28 | } 29 | 30 | func (msghdr *Msghdr) SetControllen(length int) { 31 | msghdr.Controllen = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetIovlen(length int) { 35 | msghdr.Iovlen = int32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | 42 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 43 | 44 | //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 45 | //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 46 | //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 47 | //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64 48 | //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 49 | //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace 50 | //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 51 | //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_arm64.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 | //go:build arm64 && darwin 6 | // +build arm64,darwin 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func setTimespec(sec, nsec int64) Timespec { 13 | return Timespec{Sec: sec, Nsec: nsec} 14 | } 15 | 16 | func setTimeval(sec, usec int64) Timeval { 17 | return Timeval{Sec: sec, Usec: int32(usec)} 18 | } 19 | 20 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 21 | k.Ident = uint64(fd) 22 | k.Filter = int16(mode) 23 | k.Flags = uint16(flags) 24 | } 25 | 26 | func (iov *Iovec) SetLen(length int) { 27 | iov.Len = uint64(length) 28 | } 29 | 30 | func (msghdr *Msghdr) SetControllen(length int) { 31 | msghdr.Controllen = uint32(length) 32 | } 33 | 34 | func (msghdr *Msghdr) SetIovlen(length int) { 35 | msghdr.Iovlen = int32(length) 36 | } 37 | 38 | func (cmsg *Cmsghdr) SetLen(length int) { 39 | cmsg.Len = uint32(length) 40 | } 41 | 42 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic 43 | 44 | //sys Fstat(fd int, stat *Stat_t) (err error) 45 | //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) 46 | //sys Fstatfs(fd int, stat *Statfs_t) (err error) 47 | //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT 48 | //sys Lstat(path string, stat *Stat_t) (err error) 49 | //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace 50 | //sys Stat(path string, stat *Stat_t) (err error) 51 | //sys Statfs(path string, stat *Statfs_t) (err error) 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.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 | //go:build darwin && go1.12 6 | // +build darwin,go1.12 7 | 8 | package unix 9 | 10 | import _ "unsafe" 11 | 12 | // Implemented in the runtime package (runtime/sys_darwin.go) 13 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 17 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 19 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 20 | 21 | //go:linkname syscall_syscall syscall.syscall 22 | //go:linkname syscall_syscall6 syscall.syscall6 23 | //go:linkname syscall_syscall6X syscall.syscall6X 24 | //go:linkname syscall_syscall9 syscall.syscall9 25 | //go:linkname syscall_rawSyscall syscall.rawSyscall 26 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 27 | //go:linkname syscall_syscallPtr syscall.syscallPtr 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && dragonfly 6 | // +build amd64,dragonfly 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: nsec} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: usec} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint64(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint64(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && freebsd 6 | // +build 386,freebsd 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint32(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint32(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | 59 | func PtraceGetFsBase(pid int, fsbase *int64) (err error) { 60 | return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0) 61 | } 62 | 63 | func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { 64 | ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)} 65 | err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) 66 | return int(ioDesc.Len), err 67 | } 68 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && freebsd 6 | // +build amd64,freebsd 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: nsec} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: usec} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint64(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint64(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | 59 | func PtraceGetFsBase(pid int, fsbase *int64) (err error) { 60 | return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0) 61 | } 62 | 63 | func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { 64 | ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} 65 | err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) 66 | return int(ioDesc.Len), err 67 | } 68 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && freebsd 6 | // +build arm,freebsd 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: int32(nsec)} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: int32(usec)} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint32(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint32(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | 59 | func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { 60 | ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)} 61 | err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) 62 | return int(ioDesc.Len), err 63 | } 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && freebsd 6 | // +build arm64,freebsd 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: nsec} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: usec} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint64(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint64(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | 59 | func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { 60 | ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} 61 | err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) 62 | return int(ioDesc.Len), err 63 | } 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && freebsd 6 | // +build riscv64,freebsd 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: nsec} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: usec} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint64(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint64(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | 59 | func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { 60 | ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} 61 | err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) 62 | return int(ioDesc.Len), err 63 | } 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | // +build linux 7 | // +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 8 | 9 | package unix 10 | 11 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 12 | // values. 13 | 14 | //sys Alarm(seconds uint) (remaining uint, err error) 15 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && linux && gc 6 | // +build amd64,linux,gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | // +build linux,gc 7 | 8 | package unix 9 | 10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 12 | 13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 14 | // fail. 15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 16 | -------------------------------------------------------------------------------- /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 | //go:build linux && gc && 386 6 | // +build linux,gc,386 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | 16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | // +build arm,gc,linux 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /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 | //go:build linux && gccgo && 386 6 | // +build linux,gccgo,386 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | 23 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 24 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 25 | return int(fd), err 26 | } 27 | 28 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 29 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 30 | return int(fd), err 31 | } 32 | -------------------------------------------------------------------------------- /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 | //go:build linux && gccgo && arm 6 | // +build linux,gccgo,arm 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | -------------------------------------------------------------------------------- /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 | //go:build 386 && netbsd 6 | // +build 386,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && netbsd 6 | // +build amd64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build arm && netbsd 6 | // +build arm,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build arm64 && netbsd 6 | // +build arm64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build 386 && openbsd 6 | // +build 386,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && openbsd 6 | // +build amd64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /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 | //go:build arm && openbsd 6 | // +build arm,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /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 | //go:build arm64 && openbsd 6 | // +build arm64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.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 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func (iov *Iovec) SetLen(length int) { 19 | iov.Len = uint64(length) 20 | } 21 | 22 | func (msghdr *Msghdr) SetIovlen(length int) { 23 | msghdr.Iovlen = int32(length) 24 | } 25 | 26 | func (cmsg *Cmsghdr) SetLen(length int) { 27 | cmsg.Len = uint32(length) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | // +build gc 8 | // +build !ppc64le 9 | // +build !ppc64 10 | 11 | package unix 12 | 13 | import "syscall" 14 | 15 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 18 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 19 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64le || ppc64) && gc 6 | // +build linux 7 | // +build ppc64le ppc64 8 | // +build gc 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall(trap, a1, a2, a3) 16 | } 17 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 19 | } 20 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall(trap, a1, a2, a3) 22 | } 23 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 24 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package unix 9 | 10 | import "runtime" 11 | 12 | // SysvShmCtl performs control operations on the shared memory segment 13 | // specified by id. 14 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 15 | if runtime.GOARCH == "arm" || 16 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 17 | cmd |= ipc_64 18 | } 19 | 20 | return shmctl(id, cmd, desc) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || linux 6 | // +build darwin,!ios linux 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | 13 | "golang.org/x/sys/internal/unsafeheader" 14 | ) 15 | 16 | // SysvShmAttach attaches the Sysv shared memory segment associated with the 17 | // shared memory identifier id. 18 | func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) { 19 | addr, errno := shmat(id, addr, flag) 20 | if errno != nil { 21 | return nil, errno 22 | } 23 | 24 | // Retrieve the size of the shared memory to enable slice creation 25 | var info SysvShmDesc 26 | 27 | _, err := SysvShmCtl(id, IPC_STAT, &info) 28 | if err != nil { 29 | // release the shared memory if we can't find the size 30 | 31 | // ignoring error from shmdt as there's nothing sensible to return here 32 | shmdt(addr) 33 | return nil, err 34 | } 35 | 36 | // Use unsafe to convert addr into a []byte. 37 | // TODO: convert to unsafe.Slice once we can assume Go 1.17 38 | var b []byte 39 | hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b)) 40 | hdr.Data = unsafe.Pointer(addr) 41 | hdr.Cap = int(info.Segsz) 42 | hdr.Len = int(info.Segsz) 43 | return b, nil 44 | } 45 | 46 | // SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach. 47 | // 48 | // It is not safe to use the slice after calling this function. 49 | func SysvShmDetach(data []byte) error { 50 | if len(data) == 0 { 51 | return EINVAL 52 | } 53 | 54 | return shmdt(uintptr(unsafe.Pointer(&data[0]))) 55 | } 56 | 57 | // SysvShmGet returns the Sysv shared memory identifier associated with key. 58 | // If the IPC_CREAT flag is specified a new segment is created. 59 | func SysvShmGet(key, size, flag int) (id int, err error) { 60 | return shmget(key, size, flag) 61 | } 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | // SysvShmCtl performs control operations on the shared memory segment 11 | // specified by id. 12 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 13 | return shmctl(id, cmd, desc) 14 | } 15 | -------------------------------------------------------------------------------- /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/zptrace_armnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. 2 | 3 | //go:build linux && (arm || arm64) 4 | // +build linux 5 | // +build arm arm64 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // PtraceRegsArm is the registers used by arm binaries. 12 | type PtraceRegsArm struct { 13 | Uregs [18]uint32 14 | } 15 | 16 | // PtraceGetRegsArm fetches the registers used by arm binaries. 17 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 18 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 19 | } 20 | 21 | // PtraceSetRegsArm sets the registers used by arm binaries. 22 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 23 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 24 | } 25 | 26 | // PtraceRegsArm64 is the registers used by arm64 binaries. 27 | type PtraceRegsArm64 struct { 28 | Regs [31]uint64 29 | Sp uint64 30 | Pc uint64 31 | Pstate uint64 32 | } 33 | 34 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 35 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 36 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 37 | } 38 | 39 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 40 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 41 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. 2 | 3 | //go:build linux && (mips || mips64) 4 | // +build linux 5 | // +build mips mips64 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // PtraceRegsMips is the registers used by mips binaries. 12 | type PtraceRegsMips struct { 13 | Regs [32]uint64 14 | Lo uint64 15 | Hi uint64 16 | Epc uint64 17 | Badvaddr uint64 18 | Status uint64 19 | Cause uint64 20 | } 21 | 22 | // PtraceGetRegsMips fetches the registers used by mips binaries. 23 | func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error { 24 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 25 | } 26 | 27 | // PtraceSetRegsMips sets the registers used by mips binaries. 28 | func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error { 29 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 30 | } 31 | 32 | // PtraceRegsMips64 is the registers used by mips64 binaries. 33 | type PtraceRegsMips64 struct { 34 | Regs [32]uint64 35 | Lo uint64 36 | Hi uint64 37 | Epc uint64 38 | Badvaddr uint64 39 | Status uint64 40 | Cause uint64 41 | } 42 | 43 | // PtraceGetRegsMips64 fetches the registers used by mips64 binaries. 44 | func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error { 45 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 46 | } 47 | 48 | // PtraceSetRegsMips64 sets the registers used by mips64 binaries. 49 | func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error { 50 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 51 | } 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. 2 | 3 | //go:build linux && (mipsle || mips64le) 4 | // +build linux 5 | // +build mipsle mips64le 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // PtraceRegsMipsle is the registers used by mipsle binaries. 12 | type PtraceRegsMipsle struct { 13 | Regs [32]uint64 14 | Lo uint64 15 | Hi uint64 16 | Epc uint64 17 | Badvaddr uint64 18 | Status uint64 19 | Cause uint64 20 | } 21 | 22 | // PtraceGetRegsMipsle fetches the registers used by mipsle binaries. 23 | func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error { 24 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 25 | } 26 | 27 | // PtraceSetRegsMipsle sets the registers used by mipsle binaries. 28 | func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error { 29 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 30 | } 31 | 32 | // PtraceRegsMips64le is the registers used by mips64le binaries. 33 | type PtraceRegsMips64le struct { 34 | Regs [32]uint64 35 | Lo uint64 36 | Hi uint64 37 | Epc uint64 38 | Badvaddr uint64 39 | Status uint64 40 | Cause uint64 41 | } 42 | 43 | // PtraceGetRegsMips64le fetches the registers used by mips64le binaries. 44 | func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error { 45 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 46 | } 47 | 48 | // PtraceSetRegsMips64le sets the registers used by mips64le binaries. 49 | func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error { 50 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 51 | } 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_x86_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. 2 | 3 | //go:build linux && (386 || amd64) 4 | // +build linux 5 | // +build 386 amd64 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // PtraceRegs386 is the registers used by 386 binaries. 12 | type PtraceRegs386 struct { 13 | Ebx int32 14 | Ecx int32 15 | Edx int32 16 | Esi int32 17 | Edi int32 18 | Ebp int32 19 | Eax int32 20 | Xds int32 21 | Xes int32 22 | Xfs int32 23 | Xgs int32 24 | Orig_eax int32 25 | Eip int32 26 | Xcs int32 27 | Eflags int32 28 | Esp int32 29 | Xss int32 30 | } 31 | 32 | // PtraceGetRegs386 fetches the registers used by 386 binaries. 33 | func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error { 34 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 35 | } 36 | 37 | // PtraceSetRegs386 sets the registers used by 386 binaries. 38 | func PtraceSetRegs386(pid int, regs *PtraceRegs386) error { 39 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 40 | } 41 | 42 | // PtraceRegsAmd64 is the registers used by amd64 binaries. 43 | type PtraceRegsAmd64 struct { 44 | R15 uint64 45 | R14 uint64 46 | R13 uint64 47 | R12 uint64 48 | Rbp uint64 49 | Rbx uint64 50 | R11 uint64 51 | R10 uint64 52 | R9 uint64 53 | R8 uint64 54 | Rax uint64 55 | Rcx uint64 56 | Rdx uint64 57 | Rsi uint64 58 | Rdi uint64 59 | Orig_rax uint64 60 | Rip uint64 61 | Cs uint64 62 | Eflags uint64 63 | Rsp uint64 64 | Ss uint64 65 | Fs_base uint64 66 | Gs_base uint64 67 | Ds uint64 68 | Es uint64 69 | Fs uint64 70 | Gs uint64 71 | } 72 | 73 | // PtraceGetRegsAmd64 fetches the registers used by amd64 binaries. 74 | func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error { 75 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 76 | } 77 | 78 | // PtraceSetRegsAmd64 sets the registers used by amd64 binaries. 79 | func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error { 80 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 81 | } 82 | -------------------------------------------------------------------------------- /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 | //go:build darwin && amd64 && go1.13 5 | // +build darwin,amd64,go1.13 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | var _ syscall.Errno 15 | 16 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 17 | 18 | func closedir(dir uintptr) (err error) { 19 | _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0) 20 | if e1 != 0 { 21 | err = errnoErr(e1) 22 | } 23 | return 24 | } 25 | 26 | var libc_closedir_trampoline_addr uintptr 27 | 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(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | var libc_readdir_r_trampoline_addr uintptr 39 | 40 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 41 | -------------------------------------------------------------------------------- /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 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /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 | //go:build darwin && arm64 && go1.13 5 | // +build darwin,arm64,go1.13 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | var _ syscall.Errno 15 | 16 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 17 | 18 | func closedir(dir uintptr) (err error) { 19 | _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0) 20 | if e1 != 0 { 21 | err = errnoErr(e1) 22 | } 23 | return 24 | } 25 | 26 | var libc_closedir_trampoline_addr uintptr 27 | 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(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | var libc_readdir_r_trampoline_addr uintptr 39 | 40 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 41 | -------------------------------------------------------------------------------- /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 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go: -------------------------------------------------------------------------------- 1 | // cgo -godefs types_illumos.go | go run mkpost.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | //go:build amd64 && illumos 5 | // +build amd64,illumos 6 | 7 | package unix 8 | 9 | const ( 10 | TUNNEWPPA = 0x540001 11 | TUNSETPPA = 0x540002 12 | 13 | I_STR = 0x5308 14 | I_POP = 0x5303 15 | I_PUSH = 0x5302 16 | I_LINK = 0x530c 17 | I_UNLINK = 0x530d 18 | I_PLINK = 0x5316 19 | I_PUNLINK = 0x5317 20 | 21 | IF_UNITSEL = -0x7ffb8cca 22 | ) 23 | 24 | type strbuf struct { 25 | Maxlen int32 26 | Len int32 27 | Buf *int8 28 | } 29 | 30 | type Strioctl struct { 31 | Cmd int32 32 | Timout int32 33 | Len int32 34 | Dp *int8 35 | } 36 | 37 | type Lifreq struct { 38 | Name [32]int8 39 | Lifru1 [4]byte 40 | Type uint32 41 | Lifru [336]byte 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/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/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.10 6 | // +build go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.10 6 | // +build !go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | if !t.isRTL() { 12 | return true 13 | } 14 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/bidi/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package bidi 4 | 5 | // Class is the Unicode BiDi class. Each rune has a single class. 6 | type Class uint 7 | 8 | const ( 9 | L Class = iota // LeftToRight 10 | R // RightToLeft 11 | EN // EuropeanNumber 12 | ES // EuropeanSeparator 13 | ET // EuropeanTerminator 14 | AN // ArabicNumber 15 | CS // CommonSeparator 16 | B // ParagraphSeparator 17 | S // SegmentSeparator 18 | WS // WhiteSpace 19 | ON // OtherNeutral 20 | BN // BoundaryNeutral 21 | NSM // NonspacingMark 22 | AL // ArabicLetter 23 | Control // Control LRO - PDI 24 | 25 | numClass 26 | 27 | LRO // LeftToRightOverride 28 | RLO // RightToLeftOverride 29 | LRE // LeftToRightEmbedding 30 | RLE // RightToLeftEmbedding 31 | PDF // PopDirectionalFormat 32 | LRI // LeftToRightIsolate 33 | RLI // RightToLeftIsolate 34 | FSI // FirstStrongIsolate 35 | PDI // PopDirectionalIsolate 36 | 37 | unknownClass = ^Class(0) 38 | ) 39 | 40 | var controlToClass = map[rune]Class{ 41 | 0x202D: LRO, // LeftToRightOverride, 42 | 0x202E: RLO, // RightToLeftOverride, 43 | 0x202A: LRE, // LeftToRightEmbedding, 44 | 0x202B: RLE, // RightToLeftEmbedding, 45 | 0x202C: PDF, // PopDirectionalFormat, 46 | 0x2066: LRI, // LeftToRightIsolate, 47 | 0x2067: RLI, // RightToLeftIsolate, 48 | 0x2068: FSI, // FirstStrongIsolate, 49 | 0x2069: PDI, // PopDirectionalIsolate, 50 | } 51 | 52 | // A trie entry has the following bits: 53 | // 7..5 XOR mask for brackets 54 | // 4 1: Bracket open, 0: Bracket close 55 | // 3..0 Class type 56 | 57 | const ( 58 | openMask = 0x10 59 | xorMaskShift = 5 60 | ) 61 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/norm/trie.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 norm 6 | 7 | type valueRange struct { 8 | value uint16 // header: value:stride 9 | lo, hi byte // header: lo:n 10 | } 11 | 12 | type sparseBlocks struct { 13 | values []valueRange 14 | offset []uint16 15 | } 16 | 17 | var nfcSparse = sparseBlocks{ 18 | values: nfcSparseValues[:], 19 | offset: nfcSparseOffset[:], 20 | } 21 | 22 | var nfkcSparse = sparseBlocks{ 23 | values: nfkcSparseValues[:], 24 | offset: nfkcSparseOffset[:], 25 | } 26 | 27 | var ( 28 | nfcData = newNfcTrie(0) 29 | nfkcData = newNfkcTrie(0) 30 | ) 31 | 32 | // lookupValue determines the type of block n and looks up the value for b. 33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block 34 | // is a list of ranges with an accompanying value. Given a matching range r, 35 | // the value for b is by r.value + (b - r.lo) * stride. 36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { 37 | offset := t.offset[n] 38 | header := t.values[offset] 39 | lo := offset + 1 40 | hi := lo + uint16(header.lo) 41 | for lo < hi { 42 | m := lo + (hi-lo)/2 43 | r := t.values[m] 44 | if r.lo <= b && b <= r.hi { 45 | return r.value + uint16(b-r.lo)*header.value 46 | } 47 | if b < r.lo { 48 | hi = m 49 | } else { 50 | lo = m + 1 51 | } 52 | } 53 | return 0 54 | } 55 | -------------------------------------------------------------------------------- /vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # github.com/dgrijalva/jwt-go v3.2.0+incompatible 2 | github.com/dgrijalva/jwt-go 3 | # github.com/gomodule/redigo v2.0.0+incompatible 4 | github.com/gomodule/redigo/internal 5 | github.com/gomodule/redigo/redis 6 | # github.com/labstack/echo/v4 v4.1.10 7 | github.com/labstack/echo/v4 8 | github.com/labstack/echo/v4/middleware 9 | # github.com/labstack/gommon v0.3.0 10 | github.com/labstack/gommon/bytes 11 | github.com/labstack/gommon/color 12 | github.com/labstack/gommon/log 13 | github.com/labstack/gommon/random 14 | # github.com/mattn/go-colorable v0.1.2 15 | github.com/mattn/go-colorable 16 | # github.com/mattn/go-isatty v0.0.9 17 | github.com/mattn/go-isatty 18 | # github.com/valyala/bytebufferpool v1.0.0 19 | github.com/valyala/bytebufferpool 20 | # github.com/valyala/fasttemplate v1.0.1 21 | github.com/valyala/fasttemplate 22 | # github.com/xyproto/cookie v0.0.0-20181220103240-f4de411f45ff 23 | github.com/xyproto/cookie 24 | # github.com/xyproto/permissions2 v0.0.0-20190729074010-6510c7590749 25 | github.com/xyproto/permissions2 26 | # github.com/xyproto/pinterface v0.0.0-20181004125811-9710ef24b684 27 | github.com/xyproto/pinterface 28 | # github.com/xyproto/randomstring v0.0.0-20181222003104-0f764aabc45a 29 | github.com/xyproto/randomstring 30 | # github.com/xyproto/simpleredis v0.0.0-20190919091103-4dd4111d2407 31 | github.com/xyproto/simpleredis 32 | # golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 33 | golang.org/x/crypto/acme 34 | golang.org/x/crypto/acme/autocert 35 | golang.org/x/crypto/bcrypt 36 | golang.org/x/crypto/blowfish 37 | # golang.org/x/net v0.0.0-20220722155237-a158d28d115b 38 | golang.org/x/net/idna 39 | # golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f 40 | golang.org/x/sys/internal/unsafeheader 41 | golang.org/x/sys/unix 42 | # golang.org/x/text v0.3.8 43 | golang.org/x/text/secure/bidirule 44 | golang.org/x/text/transform 45 | golang.org/x/text/unicode/bidi 46 | golang.org/x/text/unicode/norm 47 | --------------------------------------------------------------------------------