From 18a2049013cc75e01e162fb94ef8647807c9a833 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 21 Jan 2018 20:26:17 -0800 Subject: [PATCH] cmd/construct: start work on eclier frontend --- Gopkg.lock | 204 +- cmd/construct/main.go | 104 + mage.go | 54 +- .../route_twirp_eclier_backends_kill.lua | 31 + .../route_twirp_eclier_backends_list.lua | 34 + .../route_twirp_eclier_routes_delete.lua | 33 + .../eclier/route_twirp_eclier_routes_get.lua | 35 + .../route_twirp_eclier_routes_get_all.lua | 31 + .../eclier/route_twirp_eclier_routes_put.lua | 36 + .../route_twirp_eclier_tokens_deactivate.lua | 34 + .../route_twirp_eclier_tokens_delete.lua | 34 + .../eclier/route_twirp_eclier_tokens_get.lua | 36 + .../route_twirp_eclier_tokens_get_all.lua | 31 + .../eclier/route_twirp_eclier_tokens_put.lua | 38 + proto/regen.sh | 1 + .../github.com/ThomasRooney/gexpect/LICENCE | 7 + .../github.com/ThomasRooney/gexpect/README.md | 64 + .../ThomasRooney/gexpect/gexpect.go | 449 +++ .../ThomasRooney/gexpect/gexpect_test.go | 419 +++ vendor/github.com/Xe/eclier/.gitignore | 2 + vendor/github.com/Xe/eclier/Gopkg.lock | 223 ++ vendor/github.com/Xe/eclier/Gopkg.toml | 72 + vendor/github.com/Xe/eclier/LICENSE | 121 + vendor/github.com/Xe/eclier/README.md | 38 + vendor/github.com/Xe/eclier/builtin.go | 113 + vendor/github.com/Xe/eclier/command.go | 18 + vendor/github.com/Xe/eclier/config.ld | 8 + vendor/github.com/Xe/eclier/router.go | 140 + vendor/github.com/Xe/eclier/script.go | 92 + .../github.com/Xe/x/tools/glue/CHEATSHEET.md | 661 ++++ vendor/github.com/Xe/x/tools/glue/Dockerfile | 4 + vendor/github.com/Xe/x/tools/glue/Gopkg.lock | 181 ++ vendor/github.com/Xe/x/tools/glue/Gopkg.toml | 68 + vendor/github.com/Xe/x/tools/glue/README.md | 18 + vendor/github.com/Xe/x/tools/glue/box.rb | 6 + vendor/github.com/Xe/x/tools/glue/build.lua | 20 + vendor/github.com/Xe/x/tools/glue/glue | Bin 0 -> 13205315 bytes vendor/github.com/Xe/x/tools/glue/glue.go | 213 ++ .../Xe/x/tools/glue/libs/gluaexpect/expect.go | 35 + .../Xe/x/tools/glue/libs/gluasimplebox/sb.go | 100 + .../github.com/ailncode/gluaxmlpath/README.md | 40 + vendor/github.com/ailncode/gluaxmlpath/api.go | 37 + .../ailncode/gluaxmlpath/xmlpath.go | 21 + .../ailncode/gluaxmlpath/xmlpathtype.go | 135 + .../github.com/cjoudrey/gluahttp/.gitignore | 24 + .../github.com/cjoudrey/gluahttp/.travis.yml | 15 + vendor/github.com/cjoudrey/gluahttp/LICENSE | 22 + vendor/github.com/cjoudrey/gluahttp/README.md | 235 ++ .../github.com/cjoudrey/gluahttp/gluahttp.go | 212 ++ .../cjoudrey/gluahttp/gluahttp_test.go | 433 +++ .../cjoudrey/gluahttp/httpresponsetype.go | 98 + vendor/github.com/cjoudrey/gluaurl/.gitignore | 24 + .../github.com/cjoudrey/gluaurl/.travis.yml | 14 + vendor/github.com/cjoudrey/gluaurl/LICENSE | 22 + vendor/github.com/cjoudrey/gluaurl/README.md | 109 + vendor/github.com/cjoudrey/gluaurl/gluaurl.go | 178 ++ .../cjoudrey/gluaurl/gluaurl_test.go | 250 ++ vendor/github.com/howeyc/gopass/.travis.yml | 11 + vendor/github.com/howeyc/gopass/LICENSE.txt | 15 + .../howeyc/gopass/OPENSOLARIS.LICENSE | 384 +++ vendor/github.com/howeyc/gopass/README.md | 27 + vendor/github.com/howeyc/gopass/pass.go | 110 + vendor/github.com/howeyc/gopass/pass_test.go | 225 ++ vendor/github.com/howeyc/gopass/terminal.go | 25 + .../howeyc/gopass/terminal_solaris.go | 69 + .../github.com/kballard/go-shellquote/LICENSE | 19 + .../github.com/kballard/go-shellquote/README | 36 + .../kballard/go-shellquote/both_test.go | 29 + .../github.com/kballard/go-shellquote/doc.go | 3 + .../kballard/go-shellquote/quote.go | 102 + .../kballard/go-shellquote/quote_test.go | 31 + .../kballard/go-shellquote/unquote.go | 144 + .../kballard/go-shellquote/unquote_test.go | 53 + .../kohkimakimoto/gluaenv/.gitignore | 8 + .../github.com/kohkimakimoto/gluaenv/LICENSE | 20 + .../kohkimakimoto/gluaenv/README.md | 75 + .../kohkimakimoto/gluaenv/gluaenv.go | 193 ++ .../kohkimakimoto/gluaenv/gluaenv_test.go | 70 + .../kohkimakimoto/gluafs/.gitignore | 5 + .../github.com/kohkimakimoto/gluafs/README.md | 108 + vendor/github.com/kohkimakimoto/gluafs/fs.go | 327 ++ .../kohkimakimoto/gluafs/fs_test.go | 148 + .../kohkimakimoto/gluaquestion/.gitignore | 6 + .../kohkimakimoto/gluaquestion/LICENSE | 20 + .../kohkimakimoto/gluaquestion/README.md | 44 + .../kohkimakimoto/gluaquestion/question.go | 45 + .../kohkimakimoto/gluassh/.gitignore | 6 + .../github.com/kohkimakimoto/gluassh/LICENSE | 20 + .../github.com/kohkimakimoto/gluassh/Makefile | 10 + .../kohkimakimoto/gluassh/README.md | 4 + .../kohkimakimoto/gluassh/communicator.go | 380 +++ .../kohkimakimoto/gluassh/config.go | 106 + .../kohkimakimoto/gluassh/gluassh.go | 232 ++ .../kohkimakimoto/gluassh/gluassh_test.go | 120 + .../kohkimakimoto/gluassh/option.go | 70 + .../kohkimakimoto/gluassh/result.go | 31 + .../kohkimakimoto/gluatemplate/.gitignore | 6 + .../kohkimakimoto/gluatemplate/LICENSE | 20 + .../kohkimakimoto/gluatemplate/README.md | 67 + .../gluatemplate/gluatemplate.go | 106 + .../gluatemplate/gluatemplate_test.go | 145 + .../kohkimakimoto/gluayaml/.gitignore | 6 + .../kohkimakimoto/gluayaml/.travis.yml | 6 + .../kohkimakimoto/gluayaml/README.md | 58 + .../kohkimakimoto/gluayaml/gluatyaml_test.go | 176 ++ .../kohkimakimoto/gluayaml/gluayaml.go | 68 + vendor/github.com/kr/fs/LICENSE | 27 + vendor/github.com/kr/fs/Readme | 3 + vendor/github.com/kr/fs/example_test.go | 19 + vendor/github.com/kr/fs/filesystem.go | 36 + vendor/github.com/kr/fs/walk.go | 95 + vendor/github.com/kr/fs/walk_test.go | 209 ++ vendor/github.com/kr/pty/.gitignore | 4 + vendor/github.com/kr/pty/License | 23 + vendor/github.com/kr/pty/README.md | 100 + vendor/github.com/kr/pty/doc.go | 16 + vendor/github.com/kr/pty/ioctl.go | 13 + vendor/github.com/kr/pty/ioctl_bsd.go | 39 + vendor/github.com/kr/pty/mktypes.bash | 19 + vendor/github.com/kr/pty/pty_darwin.go | 65 + vendor/github.com/kr/pty/pty_dragonfly.go | 80 + vendor/github.com/kr/pty/pty_freebsd.go | 78 + vendor/github.com/kr/pty/pty_linux.go | 51 + vendor/github.com/kr/pty/pty_openbsd.go | 33 + vendor/github.com/kr/pty/pty_unsupported.go | 11 + vendor/github.com/kr/pty/run.go | 34 + vendor/github.com/kr/pty/types.go | 10 + vendor/github.com/kr/pty/types_dragonfly.go | 17 + vendor/github.com/kr/pty/types_freebsd.go | 15 + vendor/github.com/kr/pty/types_openbsd.go | 14 + vendor/github.com/kr/pty/util.go | 64 + vendor/github.com/kr/pty/ztypes_386.go | 9 + vendor/github.com/kr/pty/ztypes_amd64.go | 9 + vendor/github.com/kr/pty/ztypes_arm.go | 9 + vendor/github.com/kr/pty/ztypes_arm64.go | 11 + .../kr/pty/ztypes_dragonfly_amd64.go | 14 + .../github.com/kr/pty/ztypes_freebsd_386.go | 13 + .../github.com/kr/pty/ztypes_freebsd_amd64.go | 14 + .../github.com/kr/pty/ztypes_freebsd_arm.go | 13 + vendor/github.com/kr/pty/ztypes_mipsx.go | 12 + .../github.com/kr/pty/ztypes_openbsd_amd64.go | 13 + vendor/github.com/kr/pty/ztypes_ppc64.go | 11 + vendor/github.com/kr/pty/ztypes_ppc64le.go | 11 + vendor/github.com/kr/pty/ztypes_s390x.go | 11 + vendor/github.com/otm/gluaflag/LICENSE | 21 + vendor/github.com/otm/gluaflag/README.md | 3 + vendor/github.com/otm/gluaflag/flag.go | 310 ++ vendor/github.com/otm/gluaflag/flag_test.go | 602 ++++ vendor/github.com/otm/gluaflag/flagset.go | 769 +++++ vendor/github.com/otm/gluaflag/helpers.go | 62 + vendor/github.com/otm/gluaflag/intarg_test.go | 135 + vendor/github.com/otm/gluaflag/module.go | 36 + .../github.com/otm/gluaflag/numberarg_test.go | 136 + vendor/github.com/otm/gluaflag/types.go | 80 + vendor/github.com/otm/gluash/LICENSE | 21 + vendor/github.com/otm/gluash/README.md | 124 + vendor/github.com/otm/gluash/glob.go | 81 + vendor/github.com/otm/gluash/sh.go | 120 + vendor/github.com/otm/gluash/sh_test.go | 553 ++++ vendor/github.com/otm/gluash/shellcommand.go | 474 +++ vendor/github.com/pkg/sftp/.gitignore | 7 + vendor/github.com/pkg/sftp/.travis.yml | 38 + vendor/github.com/pkg/sftp/CONTRIBUTORS | 3 + vendor/github.com/pkg/sftp/LICENSE | 9 + vendor/github.com/pkg/sftp/README.md | 44 + vendor/github.com/pkg/sftp/attrs.go | 241 ++ vendor/github.com/pkg/sftp/attrs_stubs.go | 11 + vendor/github.com/pkg/sftp/attrs_test.go | 45 + vendor/github.com/pkg/sftp/attrs_unix.go | 17 + vendor/github.com/pkg/sftp/client.go | 1173 +++++++ .../sftp/client_integration_darwin_test.go | 42 + .../pkg/sftp/client_integration_linux_test.go | 42 + .../pkg/sftp/client_integration_test.go | 2188 +++++++++++++ vendor/github.com/pkg/sftp/client_test.go | 147 + vendor/github.com/pkg/sftp/conn.go | 133 + vendor/github.com/pkg/sftp/debug.go | 9 + vendor/github.com/pkg/sftp/example_test.go | 147 + vendor/github.com/pkg/sftp/match.go | 295 ++ vendor/github.com/pkg/sftp/other_test.go | 5 + vendor/github.com/pkg/sftp/packet-manager.go | 156 + .../pkg/sftp/packet-manager_go1.8.go | 21 + .../pkg/sftp/packet-manager_legacy.go | 21 + .../pkg/sftp/packet-manager_test.go | 154 + vendor/github.com/pkg/sftp/packet-typing.go | 135 + vendor/github.com/pkg/sftp/packet.go | 952 ++++++ vendor/github.com/pkg/sftp/packet_test.go | 345 +++ vendor/github.com/pkg/sftp/release.go | 5 + vendor/github.com/pkg/sftp/request-attrs.go | 63 + .../github.com/pkg/sftp/request-attrs_test.go | 51 + vendor/github.com/pkg/sftp/request-example.go | 262 ++ .../github.com/pkg/sftp/request-interfaces.go | 38 + vendor/github.com/pkg/sftp/request-readme.md | 53 + vendor/github.com/pkg/sftp/request-server.go | 230 ++ .../pkg/sftp/request-server_test.go | 376 +++ vendor/github.com/pkg/sftp/request-unix.go | 23 + vendor/github.com/pkg/sftp/request.go | 307 ++ vendor/github.com/pkg/sftp/request_test.go | 183 ++ vendor/github.com/pkg/sftp/request_windows.go | 11 + vendor/github.com/pkg/sftp/server.go | 665 ++++ .../pkg/sftp/server_integration_test.go | 718 +++++ .../pkg/sftp/server_statvfs_darwin.go | 21 + .../pkg/sftp/server_statvfs_impl.go | 25 + .../pkg/sftp/server_statvfs_linux.go | 22 + .../pkg/sftp/server_statvfs_stubs.go | 11 + vendor/github.com/pkg/sftp/server_stubs.go | 32 + vendor/github.com/pkg/sftp/server_test.go | 243 ++ vendor/github.com/pkg/sftp/server_unix.go | 54 + vendor/github.com/pkg/sftp/sftp.go | 217 ++ .../github.com/yookoala/realpath/.travis.yml | 8 + vendor/github.com/yookoala/realpath/LICENSE | 21 + vendor/github.com/yookoala/realpath/Makefile | 11 + vendor/github.com/yookoala/realpath/README.md | 60 + .../github.com/yookoala/realpath/realpath.go | 116 + .../yookoala/realpath/realpath_test.go | 54 + vendor/github.com/yuin/gluamapper/.travis.yml | 12 + vendor/github.com/yuin/gluamapper/LICENSE | 21 + vendor/github.com/yuin/gluamapper/README.rst | 79 + .../github.com/yuin/gluamapper/gluamapper.go | 108 + .../gluamapper/gluamapper_example_test.go | 45 + .../yuin/gluamapper/gluamapper_test.go | 139 + vendor/github.com/yuin/gluare/.travis.yml | 12 + vendor/github.com/yuin/gluare/LICENSE | 21 + vendor/github.com/yuin/gluare/README.rst | 62 + vendor/github.com/yuin/gluare/gluare.go | 284 ++ vendor/github.com/yuin/gluare/gluare_test.go | 32 + vendor/github.com/yuin/gopher-lua/.travis.yml | 15 + vendor/github.com/yuin/gopher-lua/LICENSE | 21 + vendor/github.com/yuin/gopher-lua/Makefile | 10 + vendor/github.com/yuin/gopher-lua/README.rst | 802 +++++ vendor/github.com/yuin/gopher-lua/_state.go | 1787 +++++++++++ vendor/github.com/yuin/gopher-lua/_vm.go | 1024 +++++++ vendor/github.com/yuin/gopher-lua/alloc.go | 73 + vendor/github.com/yuin/gopher-lua/ast/ast.go | 29 + vendor/github.com/yuin/gopher-lua/ast/expr.go | 137 + vendor/github.com/yuin/gopher-lua/ast/misc.go | 17 + vendor/github.com/yuin/gopher-lua/ast/stmt.go | 95 + .../github.com/yuin/gopher-lua/ast/token.go | 22 + vendor/github.com/yuin/gopher-lua/auxlib.go | 458 +++ .../github.com/yuin/gopher-lua/auxlib_test.go | 333 ++ vendor/github.com/yuin/gopher-lua/baselib.go | 586 ++++ .../github.com/yuin/gopher-lua/channellib.go | 152 + .../yuin/gopher-lua/channellib_test.go | 261 ++ vendor/github.com/yuin/gopher-lua/compile.go | 1656 ++++++++++ vendor/github.com/yuin/gopher-lua/config.go | 35 + .../yuin/gopher-lua/coroutinelib.go | 112 + vendor/github.com/yuin/gopher-lua/debuglib.go | 173 ++ vendor/github.com/yuin/gopher-lua/function.go | 193 ++ vendor/github.com/yuin/gopher-lua/iolib.go | 743 +++++ vendor/github.com/yuin/gopher-lua/linit.go | 54 + vendor/github.com/yuin/gopher-lua/loadlib.go | 125 + vendor/github.com/yuin/gopher-lua/mathlib.go | 231 ++ vendor/github.com/yuin/gopher-lua/opcode.go | 371 +++ vendor/github.com/yuin/gopher-lua/oslib.go | 206 ++ vendor/github.com/yuin/gopher-lua/package.go | 7 + .../github.com/yuin/gopher-lua/parse/Makefile | 4 + .../github.com/yuin/gopher-lua/parse/lexer.go | 537 ++++ .../yuin/gopher-lua/parse/parser.go | 1137 +++++++ .../yuin/gopher-lua/parse/parser.go.y | 524 ++++ vendor/github.com/yuin/gopher-lua/pm/pm.go | 639 ++++ .../github.com/yuin/gopher-lua/script_test.go | 87 + vendor/github.com/yuin/gopher-lua/state.go | 1872 ++++++++++++ .../github.com/yuin/gopher-lua/state_test.go | 433 +++ .../github.com/yuin/gopher-lua/stringlib.go | 448 +++ vendor/github.com/yuin/gopher-lua/table.go | 374 +++ .../github.com/yuin/gopher-lua/table_test.go | 187 ++ vendor/github.com/yuin/gopher-lua/tablelib.go | 100 + .../yuin/gopher-lua/testutils_test.go | 78 + vendor/github.com/yuin/gopher-lua/utils.go | 262 ++ vendor/github.com/yuin/gopher-lua/value.go | 247 ++ vendor/github.com/yuin/gopher-lua/vm.go | 1395 +++++++++ vendor/golang.org/x/crypto/ed25519/ed25519.go | 181 ++ .../x/crypto/ed25519/ed25519_test.go | 183 ++ .../ed25519/internal/edwards25519/const.go | 1422 +++++++++ .../internal/edwards25519/edwards25519.go | 1771 +++++++++++ .../internal/chacha20/chacha_generic.go | 198 ++ .../x/crypto/internal/chacha20/chacha_test.go | 33 + .../golang.org/x/crypto/ssh/agent/client.go | 683 +++++ .../x/crypto/ssh/agent/client_test.go | 379 +++ .../x/crypto/ssh/agent/example_test.go | 41 + .../golang.org/x/crypto/ssh/agent/forward.go | 103 + .../golang.org/x/crypto/ssh/agent/keyring.go | 215 ++ .../x/crypto/ssh/agent/keyring_test.go | 76 + .../golang.org/x/crypto/ssh/agent/server.go | 523 ++++ .../x/crypto/ssh/agent/server_test.go | 259 ++ .../x/crypto/ssh/agent/testdata_test.go | 64 + .../golang.org/x/crypto/ssh/benchmark_test.go | 123 + vendor/golang.org/x/crypto/ssh/buffer.go | 97 + vendor/golang.org/x/crypto/ssh/buffer_test.go | 87 + vendor/golang.org/x/crypto/ssh/certs.go | 519 ++++ vendor/golang.org/x/crypto/ssh/certs_test.go | 335 ++ vendor/golang.org/x/crypto/ssh/channel.go | 633 ++++ vendor/golang.org/x/crypto/ssh/cipher.go | 771 +++++ vendor/golang.org/x/crypto/ssh/cipher_test.go | 130 + vendor/golang.org/x/crypto/ssh/client.go | 278 ++ vendor/golang.org/x/crypto/ssh/client_auth.go | 510 ++++ .../x/crypto/ssh/client_auth_test.go | 628 ++++ vendor/golang.org/x/crypto/ssh/client_test.go | 166 + vendor/golang.org/x/crypto/ssh/common.go | 374 +++ vendor/golang.org/x/crypto/ssh/connection.go | 143 + vendor/golang.org/x/crypto/ssh/doc.go | 21 + .../golang.org/x/crypto/ssh/example_test.go | 320 ++ vendor/golang.org/x/crypto/ssh/handshake.go | 646 ++++ .../golang.org/x/crypto/ssh/handshake_test.go | 559 ++++ vendor/golang.org/x/crypto/ssh/kex.go | 540 ++++ vendor/golang.org/x/crypto/ssh/kex_test.go | 50 + vendor/golang.org/x/crypto/ssh/keys.go | 1031 +++++++ vendor/golang.org/x/crypto/ssh/keys_test.go | 500 +++ vendor/golang.org/x/crypto/ssh/mac.go | 61 + .../golang.org/x/crypto/ssh/mempipe_test.go | 110 + vendor/golang.org/x/crypto/ssh/messages.go | 766 +++++ .../golang.org/x/crypto/ssh/messages_test.go | 288 ++ vendor/golang.org/x/crypto/ssh/mux.go | 330 ++ vendor/golang.org/x/crypto/ssh/mux_test.go | 505 +++ vendor/golang.org/x/crypto/ssh/server.go | 582 ++++ vendor/golang.org/x/crypto/ssh/session.go | 647 ++++ .../golang.org/x/crypto/ssh/session_test.go | 774 +++++ vendor/golang.org/x/crypto/ssh/streamlocal.go | 115 + vendor/golang.org/x/crypto/ssh/tcpip.go | 465 +++ vendor/golang.org/x/crypto/ssh/tcpip_test.go | 20 + .../x/crypto/ssh/terminal/terminal.go | 951 ++++++ .../x/crypto/ssh/terminal/terminal_test.go | 350 +++ .../golang.org/x/crypto/ssh/terminal/util.go | 116 + .../x/crypto/ssh/terminal/util_bsd.go | 12 + .../x/crypto/ssh/terminal/util_linux.go | 10 + .../x/crypto/ssh/terminal/util_plan9.go | 58 + .../x/crypto/ssh/terminal/util_solaris.go | 128 + .../x/crypto/ssh/terminal/util_windows.go | 97 + .../golang.org/x/crypto/ssh/testdata_test.go | 63 + vendor/golang.org/x/crypto/ssh/transport.go | 382 +++ .../golang.org/x/crypto/ssh/transport_test.go | 113 + .../x/sys/windows/asm_windows_386.s | 13 + .../x/sys/windows/asm_windows_amd64.s | 13 + .../golang.org/x/sys/windows/dll_windows.go | 378 +++ .../golang.org/x/sys/windows/env_windows.go | 29 + vendor/golang.org/x/sys/windows/eventlog.go | 20 + .../golang.org/x/sys/windows/exec_windows.go | 97 + .../x/sys/windows/memory_windows.go | 26 + vendor/golang.org/x/sys/windows/mksyscall.go | 7 + vendor/golang.org/x/sys/windows/race.go | 30 + vendor/golang.org/x/sys/windows/race0.go | 25 + .../x/sys/windows/security_windows.go | 476 +++ vendor/golang.org/x/sys/windows/service.go | 164 + vendor/golang.org/x/sys/windows/str.go | 22 + vendor/golang.org/x/sys/windows/syscall.go | 71 + .../golang.org/x/sys/windows/syscall_test.go | 53 + .../x/sys/windows/syscall_windows.go | 1153 +++++++ .../x/sys/windows/syscall_windows_test.go | 107 + .../golang.org/x/sys/windows/types_windows.go | 1333 ++++++++ .../x/sys/windows/types_windows_386.go | 22 + .../x/sys/windows/types_windows_amd64.go | 22 + .../x/sys/windows/zsyscall_windows.go | 2687 ++++++++++++++++ vendor/gopkg.in/xmlpath.v2/LICENSE | 187 ++ vendor/gopkg.in/xmlpath.v2/README.md | 4 + vendor/gopkg.in/xmlpath.v2/all_test.go | 506 +++ vendor/gopkg.in/xmlpath.v2/doc.go | 75 + vendor/gopkg.in/xmlpath.v2/parser.go | 396 +++ vendor/gopkg.in/xmlpath.v2/path.go | 790 +++++ vendor/gopkg.in/yaml.v2/.travis.yml | 9 + vendor/gopkg.in/yaml.v2/LICENSE | 201 ++ vendor/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + vendor/gopkg.in/yaml.v2/README.md | 135 + vendor/gopkg.in/yaml.v2/apic.go | 742 +++++ vendor/gopkg.in/yaml.v2/decode.go | 685 +++++ vendor/gopkg.in/yaml.v2/decode_test.go | 1032 +++++++ vendor/gopkg.in/yaml.v2/emitterc.go | 1684 ++++++++++ vendor/gopkg.in/yaml.v2/encode.go | 306 ++ vendor/gopkg.in/yaml.v2/encode_test.go | 501 +++ .../gopkg.in/yaml.v2/example_embedded_test.go | 41 + vendor/gopkg.in/yaml.v2/parserc.go | 1095 +++++++ vendor/gopkg.in/yaml.v2/readerc.go | 394 +++ vendor/gopkg.in/yaml.v2/resolve.go | 208 ++ vendor/gopkg.in/yaml.v2/scannerc.go | 2711 +++++++++++++++++ vendor/gopkg.in/yaml.v2/sorter.go | 104 + vendor/gopkg.in/yaml.v2/suite_test.go | 12 + vendor/gopkg.in/yaml.v2/writerc.go | 89 + vendor/gopkg.in/yaml.v2/yaml.go | 357 +++ vendor/gopkg.in/yaml.v2/yamlh.go | 716 +++++ vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 ++ vendor/layeh.com/gopher-json/LICENSE | 22 + vendor/layeh.com/gopher-json/README.md | 7 + vendor/layeh.com/gopher-json/doc.go | 20 + vendor/layeh.com/gopher-json/json.go | 173 ++ vendor/layeh.com/gopher-json/json_test.go | 75 + vendor/layeh.com/gopher-luar/.gitignore | 1 + vendor/layeh.com/gopher-luar/LICENSE | 373 +++ vendor/layeh.com/gopher-luar/Makefile | 6 + vendor/layeh.com/gopher-luar/README.md | 7 + vendor/layeh.com/gopher-luar/array.go | 124 + vendor/layeh.com/gopher-luar/array_test.go | 72 + vendor/layeh.com/gopher-luar/cache.go | 201 ++ vendor/layeh.com/gopher-luar/chan.go | 81 + vendor/layeh.com/gopher-luar/chan_test.go | 65 + vendor/layeh.com/gopher-luar/config.go | 74 + vendor/layeh.com/gopher-luar/config_test.go | 79 + vendor/layeh.com/gopher-luar/doc.go | 45 + vendor/layeh.com/gopher-luar/examples_test.go | 53 + vendor/layeh.com/gopher-luar/func.go | 146 + vendor/layeh.com/gopher-luar/func_test.go | 241 ++ vendor/layeh.com/gopher-luar/helpers_test.go | 83 + vendor/layeh.com/gopher-luar/luar.go | 482 +++ vendor/layeh.com/gopher-luar/luar_test.go | 318 ++ vendor/layeh.com/gopher-luar/map.go | 76 + vendor/layeh.com/gopher-luar/map_test.go | 96 + vendor/layeh.com/gopher-luar/metatable.go | 42 + .../layeh.com/gopher-luar/metatable_test.go | 37 + vendor/layeh.com/gopher-luar/ptr.go | 76 + vendor/layeh.com/gopher-luar/ptr_test.go | 134 + vendor/layeh.com/gopher-luar/race_test.go | 42 + vendor/layeh.com/gopher-luar/slice.go | 91 + vendor/layeh.com/gopher-luar/slice_test.go | 62 + vendor/layeh.com/gopher-luar/struct.go | 97 + vendor/layeh.com/gopher-luar/struct_test.go | 308 ++ vendor/layeh.com/gopher-luar/type.go | 59 + vendor/layeh.com/gopher-luar/type_test.go | 42 + vendor/layeh.com/gopher-luar/util.go | 36 + 415 files changed, 88902 insertions(+), 56 deletions(-) create mode 100644 cmd/construct/main.go create mode 100644 proto/eclier/route_twirp_eclier_backends_kill.lua create mode 100644 proto/eclier/route_twirp_eclier_backends_list.lua create mode 100644 proto/eclier/route_twirp_eclier_routes_delete.lua create mode 100644 proto/eclier/route_twirp_eclier_routes_get.lua create mode 100644 proto/eclier/route_twirp_eclier_routes_get_all.lua create mode 100644 proto/eclier/route_twirp_eclier_routes_put.lua create mode 100644 proto/eclier/route_twirp_eclier_tokens_deactivate.lua create mode 100644 proto/eclier/route_twirp_eclier_tokens_delete.lua create mode 100644 proto/eclier/route_twirp_eclier_tokens_get.lua create mode 100644 proto/eclier/route_twirp_eclier_tokens_get_all.lua create mode 100644 proto/eclier/route_twirp_eclier_tokens_put.lua create mode 100644 vendor/github.com/ThomasRooney/gexpect/LICENCE create mode 100644 vendor/github.com/ThomasRooney/gexpect/README.md create mode 100644 vendor/github.com/ThomasRooney/gexpect/gexpect.go create mode 100644 vendor/github.com/ThomasRooney/gexpect/gexpect_test.go create mode 100644 vendor/github.com/Xe/eclier/.gitignore create mode 100644 vendor/github.com/Xe/eclier/Gopkg.lock create mode 100644 vendor/github.com/Xe/eclier/Gopkg.toml create mode 100644 vendor/github.com/Xe/eclier/LICENSE create mode 100644 vendor/github.com/Xe/eclier/README.md create mode 100644 vendor/github.com/Xe/eclier/builtin.go create mode 100644 vendor/github.com/Xe/eclier/command.go create mode 100644 vendor/github.com/Xe/eclier/config.ld create mode 100644 vendor/github.com/Xe/eclier/router.go create mode 100644 vendor/github.com/Xe/eclier/script.go create mode 100644 vendor/github.com/Xe/x/tools/glue/CHEATSHEET.md create mode 100644 vendor/github.com/Xe/x/tools/glue/Dockerfile create mode 100644 vendor/github.com/Xe/x/tools/glue/Gopkg.lock create mode 100644 vendor/github.com/Xe/x/tools/glue/Gopkg.toml create mode 100644 vendor/github.com/Xe/x/tools/glue/README.md create mode 100644 vendor/github.com/Xe/x/tools/glue/box.rb create mode 100644 vendor/github.com/Xe/x/tools/glue/build.lua create mode 100755 vendor/github.com/Xe/x/tools/glue/glue create mode 100644 vendor/github.com/Xe/x/tools/glue/glue.go create mode 100644 vendor/github.com/Xe/x/tools/glue/libs/gluaexpect/expect.go create mode 100644 vendor/github.com/Xe/x/tools/glue/libs/gluasimplebox/sb.go create mode 100644 vendor/github.com/ailncode/gluaxmlpath/README.md create mode 100644 vendor/github.com/ailncode/gluaxmlpath/api.go create mode 100644 vendor/github.com/ailncode/gluaxmlpath/xmlpath.go create mode 100644 vendor/github.com/ailncode/gluaxmlpath/xmlpathtype.go create mode 100644 vendor/github.com/cjoudrey/gluahttp/.gitignore create mode 100644 vendor/github.com/cjoudrey/gluahttp/.travis.yml create mode 100644 vendor/github.com/cjoudrey/gluahttp/LICENSE create mode 100644 vendor/github.com/cjoudrey/gluahttp/README.md create mode 100644 vendor/github.com/cjoudrey/gluahttp/gluahttp.go create mode 100644 vendor/github.com/cjoudrey/gluahttp/gluahttp_test.go create mode 100644 vendor/github.com/cjoudrey/gluahttp/httpresponsetype.go create mode 100644 vendor/github.com/cjoudrey/gluaurl/.gitignore create mode 100644 vendor/github.com/cjoudrey/gluaurl/.travis.yml create mode 100644 vendor/github.com/cjoudrey/gluaurl/LICENSE create mode 100644 vendor/github.com/cjoudrey/gluaurl/README.md create mode 100644 vendor/github.com/cjoudrey/gluaurl/gluaurl.go create mode 100644 vendor/github.com/cjoudrey/gluaurl/gluaurl_test.go create mode 100644 vendor/github.com/howeyc/gopass/.travis.yml create mode 100644 vendor/github.com/howeyc/gopass/LICENSE.txt create mode 100644 vendor/github.com/howeyc/gopass/OPENSOLARIS.LICENSE create mode 100644 vendor/github.com/howeyc/gopass/README.md create mode 100644 vendor/github.com/howeyc/gopass/pass.go create mode 100644 vendor/github.com/howeyc/gopass/pass_test.go create mode 100644 vendor/github.com/howeyc/gopass/terminal.go create mode 100644 vendor/github.com/howeyc/gopass/terminal_solaris.go create mode 100644 vendor/github.com/kballard/go-shellquote/LICENSE create mode 100644 vendor/github.com/kballard/go-shellquote/README create mode 100644 vendor/github.com/kballard/go-shellquote/both_test.go create mode 100644 vendor/github.com/kballard/go-shellquote/doc.go create mode 100644 vendor/github.com/kballard/go-shellquote/quote.go create mode 100644 vendor/github.com/kballard/go-shellquote/quote_test.go create mode 100644 vendor/github.com/kballard/go-shellquote/unquote.go create mode 100644 vendor/github.com/kballard/go-shellquote/unquote_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluaenv/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluaenv/LICENSE create mode 100644 vendor/github.com/kohkimakimoto/gluaenv/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluaenv/gluaenv.go create mode 100644 vendor/github.com/kohkimakimoto/gluaenv/gluaenv_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluafs/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluafs/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluafs/fs.go create mode 100644 vendor/github.com/kohkimakimoto/gluafs/fs_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluaquestion/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluaquestion/LICENSE create mode 100644 vendor/github.com/kohkimakimoto/gluaquestion/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluaquestion/question.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluassh/LICENSE create mode 100644 vendor/github.com/kohkimakimoto/gluassh/Makefile create mode 100644 vendor/github.com/kohkimakimoto/gluassh/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluassh/communicator.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/config.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/gluassh.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/gluassh_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/option.go create mode 100644 vendor/github.com/kohkimakimoto/gluassh/result.go create mode 100644 vendor/github.com/kohkimakimoto/gluatemplate/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluatemplate/LICENSE create mode 100644 vendor/github.com/kohkimakimoto/gluatemplate/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluatemplate/gluatemplate.go create mode 100644 vendor/github.com/kohkimakimoto/gluatemplate/gluatemplate_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluayaml/.gitignore create mode 100644 vendor/github.com/kohkimakimoto/gluayaml/.travis.yml create mode 100644 vendor/github.com/kohkimakimoto/gluayaml/README.md create mode 100644 vendor/github.com/kohkimakimoto/gluayaml/gluatyaml_test.go create mode 100644 vendor/github.com/kohkimakimoto/gluayaml/gluayaml.go create mode 100644 vendor/github.com/kr/fs/LICENSE create mode 100644 vendor/github.com/kr/fs/Readme create mode 100644 vendor/github.com/kr/fs/example_test.go create mode 100644 vendor/github.com/kr/fs/filesystem.go create mode 100644 vendor/github.com/kr/fs/walk.go create mode 100644 vendor/github.com/kr/fs/walk_test.go create mode 100644 vendor/github.com/kr/pty/.gitignore create mode 100644 vendor/github.com/kr/pty/License create mode 100644 vendor/github.com/kr/pty/README.md create mode 100644 vendor/github.com/kr/pty/doc.go create mode 100644 vendor/github.com/kr/pty/ioctl.go create mode 100644 vendor/github.com/kr/pty/ioctl_bsd.go create mode 100755 vendor/github.com/kr/pty/mktypes.bash create mode 100644 vendor/github.com/kr/pty/pty_darwin.go create mode 100644 vendor/github.com/kr/pty/pty_dragonfly.go create mode 100644 vendor/github.com/kr/pty/pty_freebsd.go create mode 100644 vendor/github.com/kr/pty/pty_linux.go create mode 100644 vendor/github.com/kr/pty/pty_openbsd.go create mode 100644 vendor/github.com/kr/pty/pty_unsupported.go create mode 100644 vendor/github.com/kr/pty/run.go create mode 100644 vendor/github.com/kr/pty/types.go create mode 100644 vendor/github.com/kr/pty/types_dragonfly.go create mode 100644 vendor/github.com/kr/pty/types_freebsd.go create mode 100644 vendor/github.com/kr/pty/types_openbsd.go create mode 100644 vendor/github.com/kr/pty/util.go create mode 100644 vendor/github.com/kr/pty/ztypes_386.go create mode 100644 vendor/github.com/kr/pty/ztypes_amd64.go create mode 100644 vendor/github.com/kr/pty/ztypes_arm.go create mode 100644 vendor/github.com/kr/pty/ztypes_arm64.go create mode 100644 vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go create mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_386.go create mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_amd64.go create mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_arm.go create mode 100644 vendor/github.com/kr/pty/ztypes_mipsx.go create mode 100644 vendor/github.com/kr/pty/ztypes_openbsd_amd64.go create mode 100644 vendor/github.com/kr/pty/ztypes_ppc64.go create mode 100644 vendor/github.com/kr/pty/ztypes_ppc64le.go create mode 100644 vendor/github.com/kr/pty/ztypes_s390x.go create mode 100644 vendor/github.com/otm/gluaflag/LICENSE create mode 100644 vendor/github.com/otm/gluaflag/README.md create mode 100644 vendor/github.com/otm/gluaflag/flag.go create mode 100644 vendor/github.com/otm/gluaflag/flag_test.go create mode 100644 vendor/github.com/otm/gluaflag/flagset.go create mode 100644 vendor/github.com/otm/gluaflag/helpers.go create mode 100644 vendor/github.com/otm/gluaflag/intarg_test.go create mode 100644 vendor/github.com/otm/gluaflag/module.go create mode 100644 vendor/github.com/otm/gluaflag/numberarg_test.go create mode 100644 vendor/github.com/otm/gluaflag/types.go create mode 100644 vendor/github.com/otm/gluash/LICENSE create mode 100644 vendor/github.com/otm/gluash/README.md create mode 100644 vendor/github.com/otm/gluash/glob.go create mode 100644 vendor/github.com/otm/gluash/sh.go create mode 100644 vendor/github.com/otm/gluash/sh_test.go create mode 100644 vendor/github.com/otm/gluash/shellcommand.go create mode 100644 vendor/github.com/pkg/sftp/.gitignore create mode 100644 vendor/github.com/pkg/sftp/.travis.yml create mode 100644 vendor/github.com/pkg/sftp/CONTRIBUTORS create mode 100644 vendor/github.com/pkg/sftp/LICENSE create mode 100644 vendor/github.com/pkg/sftp/README.md create mode 100644 vendor/github.com/pkg/sftp/attrs.go create mode 100644 vendor/github.com/pkg/sftp/attrs_stubs.go create mode 100644 vendor/github.com/pkg/sftp/attrs_test.go create mode 100644 vendor/github.com/pkg/sftp/attrs_unix.go create mode 100644 vendor/github.com/pkg/sftp/client.go create mode 100644 vendor/github.com/pkg/sftp/client_integration_darwin_test.go create mode 100644 vendor/github.com/pkg/sftp/client_integration_linux_test.go create mode 100644 vendor/github.com/pkg/sftp/client_integration_test.go create mode 100644 vendor/github.com/pkg/sftp/client_test.go create mode 100644 vendor/github.com/pkg/sftp/conn.go create mode 100644 vendor/github.com/pkg/sftp/debug.go create mode 100644 vendor/github.com/pkg/sftp/example_test.go create mode 100644 vendor/github.com/pkg/sftp/match.go create mode 100644 vendor/github.com/pkg/sftp/other_test.go create mode 100644 vendor/github.com/pkg/sftp/packet-manager.go create mode 100644 vendor/github.com/pkg/sftp/packet-manager_go1.8.go create mode 100644 vendor/github.com/pkg/sftp/packet-manager_legacy.go create mode 100644 vendor/github.com/pkg/sftp/packet-manager_test.go create mode 100644 vendor/github.com/pkg/sftp/packet-typing.go create mode 100644 vendor/github.com/pkg/sftp/packet.go create mode 100644 vendor/github.com/pkg/sftp/packet_test.go create mode 100644 vendor/github.com/pkg/sftp/release.go create mode 100644 vendor/github.com/pkg/sftp/request-attrs.go create mode 100644 vendor/github.com/pkg/sftp/request-attrs_test.go create mode 100644 vendor/github.com/pkg/sftp/request-example.go create mode 100644 vendor/github.com/pkg/sftp/request-interfaces.go create mode 100644 vendor/github.com/pkg/sftp/request-readme.md create mode 100644 vendor/github.com/pkg/sftp/request-server.go create mode 100644 vendor/github.com/pkg/sftp/request-server_test.go create mode 100644 vendor/github.com/pkg/sftp/request-unix.go create mode 100644 vendor/github.com/pkg/sftp/request.go create mode 100644 vendor/github.com/pkg/sftp/request_test.go create mode 100644 vendor/github.com/pkg/sftp/request_windows.go create mode 100644 vendor/github.com/pkg/sftp/server.go create mode 100644 vendor/github.com/pkg/sftp/server_integration_test.go create mode 100644 vendor/github.com/pkg/sftp/server_statvfs_darwin.go create mode 100644 vendor/github.com/pkg/sftp/server_statvfs_impl.go create mode 100644 vendor/github.com/pkg/sftp/server_statvfs_linux.go create mode 100644 vendor/github.com/pkg/sftp/server_statvfs_stubs.go create mode 100644 vendor/github.com/pkg/sftp/server_stubs.go create mode 100644 vendor/github.com/pkg/sftp/server_test.go create mode 100644 vendor/github.com/pkg/sftp/server_unix.go create mode 100644 vendor/github.com/pkg/sftp/sftp.go create mode 100644 vendor/github.com/yookoala/realpath/.travis.yml create mode 100644 vendor/github.com/yookoala/realpath/LICENSE create mode 100644 vendor/github.com/yookoala/realpath/Makefile create mode 100644 vendor/github.com/yookoala/realpath/README.md create mode 100644 vendor/github.com/yookoala/realpath/realpath.go create mode 100644 vendor/github.com/yookoala/realpath/realpath_test.go create mode 100644 vendor/github.com/yuin/gluamapper/.travis.yml create mode 100644 vendor/github.com/yuin/gluamapper/LICENSE create mode 100644 vendor/github.com/yuin/gluamapper/README.rst create mode 100644 vendor/github.com/yuin/gluamapper/gluamapper.go create mode 100644 vendor/github.com/yuin/gluamapper/gluamapper_example_test.go create mode 100644 vendor/github.com/yuin/gluamapper/gluamapper_test.go create mode 100644 vendor/github.com/yuin/gluare/.travis.yml create mode 100644 vendor/github.com/yuin/gluare/LICENSE create mode 100644 vendor/github.com/yuin/gluare/README.rst create mode 100644 vendor/github.com/yuin/gluare/gluare.go create mode 100644 vendor/github.com/yuin/gluare/gluare_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/.travis.yml create mode 100644 vendor/github.com/yuin/gopher-lua/LICENSE create mode 100644 vendor/github.com/yuin/gopher-lua/Makefile create mode 100644 vendor/github.com/yuin/gopher-lua/README.rst create mode 100644 vendor/github.com/yuin/gopher-lua/_state.go create mode 100644 vendor/github.com/yuin/gopher-lua/_vm.go create mode 100644 vendor/github.com/yuin/gopher-lua/alloc.go create mode 100644 vendor/github.com/yuin/gopher-lua/ast/ast.go create mode 100644 vendor/github.com/yuin/gopher-lua/ast/expr.go create mode 100644 vendor/github.com/yuin/gopher-lua/ast/misc.go create mode 100644 vendor/github.com/yuin/gopher-lua/ast/stmt.go create mode 100644 vendor/github.com/yuin/gopher-lua/ast/token.go create mode 100644 vendor/github.com/yuin/gopher-lua/auxlib.go create mode 100644 vendor/github.com/yuin/gopher-lua/auxlib_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/baselib.go create mode 100644 vendor/github.com/yuin/gopher-lua/channellib.go create mode 100644 vendor/github.com/yuin/gopher-lua/channellib_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/compile.go create mode 100644 vendor/github.com/yuin/gopher-lua/config.go create mode 100644 vendor/github.com/yuin/gopher-lua/coroutinelib.go create mode 100644 vendor/github.com/yuin/gopher-lua/debuglib.go create mode 100644 vendor/github.com/yuin/gopher-lua/function.go create mode 100644 vendor/github.com/yuin/gopher-lua/iolib.go create mode 100644 vendor/github.com/yuin/gopher-lua/linit.go create mode 100644 vendor/github.com/yuin/gopher-lua/loadlib.go create mode 100644 vendor/github.com/yuin/gopher-lua/mathlib.go create mode 100644 vendor/github.com/yuin/gopher-lua/opcode.go create mode 100644 vendor/github.com/yuin/gopher-lua/oslib.go create mode 100644 vendor/github.com/yuin/gopher-lua/package.go create mode 100644 vendor/github.com/yuin/gopher-lua/parse/Makefile create mode 100644 vendor/github.com/yuin/gopher-lua/parse/lexer.go create mode 100644 vendor/github.com/yuin/gopher-lua/parse/parser.go create mode 100644 vendor/github.com/yuin/gopher-lua/parse/parser.go.y create mode 100644 vendor/github.com/yuin/gopher-lua/pm/pm.go create mode 100644 vendor/github.com/yuin/gopher-lua/script_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/state.go create mode 100644 vendor/github.com/yuin/gopher-lua/state_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/stringlib.go create mode 100644 vendor/github.com/yuin/gopher-lua/table.go create mode 100644 vendor/github.com/yuin/gopher-lua/table_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/tablelib.go create mode 100644 vendor/github.com/yuin/gopher-lua/testutils_test.go create mode 100644 vendor/github.com/yuin/gopher-lua/utils.go create mode 100644 vendor/github.com/yuin/gopher-lua/value.go create mode 100644 vendor/github.com/yuin/gopher-lua/vm.go create mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519.go create mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519_test.go create mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go create mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go create mode 100644 vendor/golang.org/x/crypto/internal/chacha20/chacha_generic.go create mode 100644 vendor/golang.org/x/crypto/internal/chacha20/chacha_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/client.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/client_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/example_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/forward.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/server.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/server_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/testdata_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/benchmark_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go create mode 100644 vendor/golang.org/x/crypto/ssh/buffer_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/certs.go create mode 100644 vendor/golang.org/x/crypto/ssh/certs_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/channel.go create mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go create mode 100644 vendor/golang.org/x/crypto/ssh/cipher_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/client.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_auth_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/common.go create mode 100644 vendor/golang.org/x/crypto/ssh/connection.go create mode 100644 vendor/golang.org/x/crypto/ssh/doc.go create mode 100644 vendor/golang.org/x/crypto/ssh/example_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go create mode 100644 vendor/golang.org/x/crypto/ssh/handshake_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/kex.go create mode 100644 vendor/golang.org/x/crypto/ssh/kex_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/keys.go create mode 100644 vendor/golang.org/x/crypto/ssh/keys_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/mac.go create mode 100644 vendor/golang.org/x/crypto/ssh/mempipe_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/messages.go create mode 100644 vendor/golang.org/x/crypto/ssh/messages_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/mux.go create mode 100644 vendor/golang.org/x/crypto/ssh/mux_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/server.go create mode 100644 vendor/golang.org/x/crypto/ssh/session.go create mode 100644 vendor/golang.org/x/crypto/ssh/session_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go create mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go create mode 100644 vendor/golang.org/x/crypto/ssh/tcpip_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_windows.go create mode 100644 vendor/golang.org/x/crypto/ssh/testdata_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/transport.go create mode 100644 vendor/golang.org/x/crypto/ssh/transport_test.go create mode 100644 vendor/golang.org/x/sys/windows/asm_windows_386.s create mode 100644 vendor/golang.org/x/sys/windows/asm_windows_amd64.s create mode 100644 vendor/golang.org/x/sys/windows/dll_windows.go create mode 100644 vendor/golang.org/x/sys/windows/env_windows.go create mode 100644 vendor/golang.org/x/sys/windows/eventlog.go create mode 100644 vendor/golang.org/x/sys/windows/exec_windows.go create mode 100644 vendor/golang.org/x/sys/windows/memory_windows.go create mode 100644 vendor/golang.org/x/sys/windows/mksyscall.go create mode 100644 vendor/golang.org/x/sys/windows/race.go create mode 100644 vendor/golang.org/x/sys/windows/race0.go create mode 100644 vendor/golang.org/x/sys/windows/security_windows.go create mode 100644 vendor/golang.org/x/sys/windows/service.go create mode 100644 vendor/golang.org/x/sys/windows/str.go create mode 100644 vendor/golang.org/x/sys/windows/syscall.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_test.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_windows.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_windows_test.go create mode 100644 vendor/golang.org/x/sys/windows/types_windows.go create mode 100644 vendor/golang.org/x/sys/windows/types_windows_386.go create mode 100644 vendor/golang.org/x/sys/windows/types_windows_amd64.go create mode 100644 vendor/golang.org/x/sys/windows/zsyscall_windows.go create mode 100644 vendor/gopkg.in/xmlpath.v2/LICENSE create mode 100644 vendor/gopkg.in/xmlpath.v2/README.md create mode 100644 vendor/gopkg.in/xmlpath.v2/all_test.go create mode 100644 vendor/gopkg.in/xmlpath.v2/doc.go create mode 100644 vendor/gopkg.in/xmlpath.v2/parser.go create mode 100644 vendor/gopkg.in/xmlpath.v2/path.go create mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml create mode 100644 vendor/gopkg.in/yaml.v2/LICENSE create mode 100644 vendor/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 vendor/gopkg.in/yaml.v2/README.md create mode 100644 vendor/gopkg.in/yaml.v2/apic.go create mode 100644 vendor/gopkg.in/yaml.v2/decode.go create mode 100644 vendor/gopkg.in/yaml.v2/decode_test.go create mode 100644 vendor/gopkg.in/yaml.v2/emitterc.go create mode 100644 vendor/gopkg.in/yaml.v2/encode.go create mode 100644 vendor/gopkg.in/yaml.v2/encode_test.go create mode 100644 vendor/gopkg.in/yaml.v2/example_embedded_test.go create mode 100644 vendor/gopkg.in/yaml.v2/parserc.go create mode 100644 vendor/gopkg.in/yaml.v2/readerc.go create mode 100644 vendor/gopkg.in/yaml.v2/resolve.go create mode 100644 vendor/gopkg.in/yaml.v2/scannerc.go create mode 100644 vendor/gopkg.in/yaml.v2/sorter.go create mode 100644 vendor/gopkg.in/yaml.v2/suite_test.go create mode 100644 vendor/gopkg.in/yaml.v2/writerc.go create mode 100644 vendor/gopkg.in/yaml.v2/yaml.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlh.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlprivateh.go create mode 100644 vendor/layeh.com/gopher-json/LICENSE create mode 100644 vendor/layeh.com/gopher-json/README.md create mode 100644 vendor/layeh.com/gopher-json/doc.go create mode 100644 vendor/layeh.com/gopher-json/json.go create mode 100644 vendor/layeh.com/gopher-json/json_test.go create mode 100644 vendor/layeh.com/gopher-luar/.gitignore create mode 100644 vendor/layeh.com/gopher-luar/LICENSE create mode 100644 vendor/layeh.com/gopher-luar/Makefile create mode 100644 vendor/layeh.com/gopher-luar/README.md create mode 100644 vendor/layeh.com/gopher-luar/array.go create mode 100644 vendor/layeh.com/gopher-luar/array_test.go create mode 100644 vendor/layeh.com/gopher-luar/cache.go create mode 100644 vendor/layeh.com/gopher-luar/chan.go create mode 100644 vendor/layeh.com/gopher-luar/chan_test.go create mode 100644 vendor/layeh.com/gopher-luar/config.go create mode 100644 vendor/layeh.com/gopher-luar/config_test.go create mode 100644 vendor/layeh.com/gopher-luar/doc.go create mode 100644 vendor/layeh.com/gopher-luar/examples_test.go create mode 100644 vendor/layeh.com/gopher-luar/func.go create mode 100644 vendor/layeh.com/gopher-luar/func_test.go create mode 100644 vendor/layeh.com/gopher-luar/helpers_test.go create mode 100644 vendor/layeh.com/gopher-luar/luar.go create mode 100644 vendor/layeh.com/gopher-luar/luar_test.go create mode 100644 vendor/layeh.com/gopher-luar/map.go create mode 100644 vendor/layeh.com/gopher-luar/map_test.go create mode 100644 vendor/layeh.com/gopher-luar/metatable.go create mode 100644 vendor/layeh.com/gopher-luar/metatable_test.go create mode 100644 vendor/layeh.com/gopher-luar/ptr.go create mode 100644 vendor/layeh.com/gopher-luar/ptr_test.go create mode 100644 vendor/layeh.com/gopher-luar/race_test.go create mode 100644 vendor/layeh.com/gopher-luar/slice.go create mode 100644 vendor/layeh.com/gopher-luar/slice_test.go create mode 100644 vendor/layeh.com/gopher-luar/struct.go create mode 100644 vendor/layeh.com/gopher-luar/struct_test.go create mode 100644 vendor/layeh.com/gopher-luar/type.go create mode 100644 vendor/layeh.com/gopher-luar/type_test.go create mode 100644 vendor/layeh.com/gopher-luar/util.go diff --git a/Gopkg.lock b/Gopkg.lock index c66f80b..27e4b97 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1,6 +1,18 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. +[[projects]] + branch = "master" + name = "github.com/ThomasRooney/gexpect" + packages = ["."] + revision = "5482f03509440585d13d8f648989e05903001842" + +[[projects]] + branch = "master" + name = "github.com/Xe/eclier" + packages = ["."] + revision = "b586327df9d5a5e5023fa1338f44941745136d68" + [[projects]] branch = "master" name = "github.com/Xe/gopreload" @@ -22,6 +34,15 @@ packages = ["."] revision = "62b230097e9c9534ca2074782b25d738c4b68964" +[[projects]] + branch = "master" + name = "github.com/Xe/x" + packages = [ + "tools/glue/libs/gluaexpect", + "tools/glue/libs/gluasimplebox" + ] + revision = "860ea0dedb8beb93b60717510eabca2ef5ffe150" + [[projects]] branch = "master" name = "github.com/aclements/go-moremath" @@ -43,6 +64,12 @@ revision = "5f10fee965225ac1eecdc234c09daf5cd9e7f7b6" version = "v1.2.1" +[[projects]] + branch = "master" + name = "github.com/ailncode/gluaxmlpath" + packages = ["."] + revision = "6ce478ecb4a60c4fc8929838e0b21b7fb7ca7440" + [[projects]] branch = "master" name = "github.com/alecthomas/template" @@ -160,6 +187,18 @@ revision = "7cd7992b3bc86f920394f8de92c13900da1a46b7" version = "v3.2.0" +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluahttp" + packages = ["."] + revision = "b4bfe0c50fea948dcbf3966e120996d6607bbd89" + +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluaurl" + packages = ["."] + revision = "31cbb9bef199454415879f2e6d609d1136d60cad" + [[projects]] name = "github.com/coreos/bbolt" packages = ["."] @@ -354,6 +393,12 @@ packages = ["."] revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55" +[[projects]] + branch = "master" + name = "github.com/howeyc/gopass" + packages = ["."] + revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + [[projects]] name = "github.com/jmespath/go-jmespath" packages = ["."] @@ -380,6 +425,12 @@ packages = ["."] revision = "ae77be60afb1dcacde03767a8c37337fad28ac14" +[[projects]] + branch = "master" + name = "github.com/kballard/go-shellquote" + packages = ["."] + revision = "cd60e84ee657ff3dc51de0b4f55dd299a3e136f2" + [[projects]] name = "github.com/klauspost/cpuid" packages = ["."] @@ -392,27 +443,66 @@ revision = "6bb6130ff6a76a904c1841707d65603aec9cc288" version = "v1.6" +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaenv" + packages = ["."] + revision = "2888db6bbe38923d59c42e443895875cc8ce0820" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluafs" + packages = ["."] + revision = "01391ed2d7ab89dc80157605b073403f960aa223" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaquestion" + packages = ["."] + revision = "311437c29ba54d027ad2af383661725ae2bfdcdc" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluassh" + packages = ["."] + revision = "2a7bd48d7568de8230c87ac1ef4a4c481e45814d" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluatemplate" + packages = ["."] + revision = "d9e2c9d6b00f069a9da377a9ac529c827c1c7d71" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluayaml" + packages = ["."] + revision = "6fe413d49d73d785510ecf1529991ab0573e96c7" + +[[projects]] + branch = "master" + name = "github.com/kr/fs" + packages = ["."] + revision = "2788f0dbd16903de03cb8186e5c7d97b69ad387b" + [[projects]] branch = "master" name = "github.com/kr/pretty" packages = ["."] revision = "cfb55aafdaf3ec08f0db22699ab822c50091b1c4" +[[projects]] + name = "github.com/kr/pty" + packages = ["."] + revision = "282ce0e5322c82529687d609ee670fac7c7d917c" + version = "v1.1.1" + [[projects]] branch = "master" name = "github.com/kr/text" packages = ["."] revision = "7cafcd837844e784b526369c9bce262804aebc60" -[[projects]] - branch = "master" - name = "github.com/lib/pq" - packages = [ - ".", - "oid" - ] - revision = "27ea5d92de30060e7121ddd543fe14e9a327e0cc" - [[projects]] branch = "master" name = "github.com/lucas-clemente/aes12" @@ -463,18 +553,6 @@ revision = "ab3ca2f6f85577d7ec82e0a6df721147a2e737f9" version = "v2.0.1" -[[projects]] - name = "github.com/mattes/migrate" - packages = [ - ".", - "database", - "database/postgres", - "source", - "source/go-bindata" - ] - revision = "035c07716cd373d88456ec4d701402df52584cb4" - version = "v3.0.1" - [[projects]] name = "github.com/mattn/go-isatty" packages = ["."] @@ -559,12 +637,30 @@ packages = ["."] revision = "96aac992fc8b1a4c83841a6c3e7178d20d989625" +[[projects]] + branch = "master" + name = "github.com/otm/gluaflag" + packages = ["."] + revision = "078088de689148194436293886e8e39809167332" + +[[projects]] + branch = "master" + name = "github.com/otm/gluash" + packages = ["."] + revision = "e145c563986f0b91f740a758a84bca46c163aec7" + [[projects]] name = "github.com/pkg/errors" packages = ["."] revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" +[[projects]] + name = "github.com/pkg/sftp" + packages = ["."] + revision = "f6a9258a0f570c3a76681b897b6ded57cb0dfa88" + version = "1.2.0" + [[projects]] name = "github.com/posener/complete" packages = [ @@ -639,6 +735,35 @@ revision = "ebec7ef2574b42a7088cd7751176483e0a27d458" version = "v1.0.6" +[[projects]] + branch = "master" + name = "github.com/yookoala/realpath" + packages = ["."] + revision = "d19ef9c409d9817c1e685775e53d361b03eabbc8" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluamapper" + packages = ["."] + revision = "d836955830e75240d46ce9f0e6d148d94f2e1d3a" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluare" + packages = ["."] + revision = "d7c94f1a80ede93a621ed100866e6d4745ca8c22" + +[[projects]] + branch = "master" + name = "github.com/yuin/gopher-lua" + packages = [ + ".", + "ast", + "parse", + "pm" + ] + revision = "7d7bc8747e3f614c5c587729a341fe7d8903cdb8" + [[projects]] branch = "master" name = "github.com/zclconf/go-cty" @@ -669,7 +794,10 @@ "blowfish", "cast5", "curve25519", + "ed25519", + "ed25519/internal/edwards25519", "hkdf", + "internal/chacha20", "nacl/secretbox", "openpgp", "openpgp/armor", @@ -681,6 +809,9 @@ "poly1305", "salsa20", "salsa20/salsa", + "ssh", + "ssh/agent", + "ssh/terminal", "tea", "twofish", "xtea" @@ -710,7 +841,10 @@ [[projects]] branch = "master" name = "golang.org/x/sys" - packages = ["unix"] + packages = [ + "unix", + "windows" + ] revision = "2c42eef0765b9837fbdab12011af7830f55f88f0" [[projects]] @@ -777,9 +911,33 @@ revision = "947dcec5ba9c011838740e680966fd7087a71d0d" version = "v2.2.6" +[[projects]] + branch = "v2" + name = "gopkg.in/xmlpath.v2" + packages = ["."] + revision = "860cbeca3ebcc600db0b213c0e83ad6ce91f5739" + +[[projects]] + branch = "v2" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" + +[[projects]] + branch = "master" + name = "layeh.com/gopher-json" + packages = ["."] + revision = "1aab82196e3b418b56866938f28b6a693f2c6b18" + +[[projects]] + name = "layeh.com/gopher-luar" + packages = ["."] + revision = "7b2b96926970546e504881ee7364c1127508eb4e" + version = "v1.0.2" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "8cd1d7d7f5e846cb0b8d6bf78e6a7ecd32c6e24dd18c886ac99eaeb1b3109aff" + inputs-digest = "e0d2f0d7da737ab5517f0ff1c22588a2f835a8f37ef6b67e491ffd6e1e0defc3" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/construct/main.go b/cmd/construct/main.go new file mode 100644 index 0000000..77813d8 --- /dev/null +++ b/cmd/construct/main.go @@ -0,0 +1,104 @@ +package main + +import ( + "context" + "flag" + "log" + "net/http" + "os" + "path/filepath" + + "github.com/Xe/eclier" + "github.com/Xe/x/tools/glue/libs/gluaexpect" + "github.com/Xe/x/tools/glue/libs/gluasimplebox" + "github.com/ailncode/gluaxmlpath" + "github.com/cjoudrey/gluahttp" + "github.com/cjoudrey/gluaurl" + "github.com/kohkimakimoto/gluaenv" + "github.com/kohkimakimoto/gluafs" + "github.com/kohkimakimoto/gluaquestion" + "github.com/kohkimakimoto/gluassh" + "github.com/kohkimakimoto/gluatemplate" + "github.com/kohkimakimoto/gluayaml" + homedir "github.com/mitchellh/go-homedir" + "github.com/otm/gluaflag" + "github.com/otm/gluash" + "github.com/yuin/gluare" + lua "github.com/yuin/gopher-lua" + json "layeh.com/gopher-json" +) + +var hDir string +var cfgHome *string +var netrcFile *string + +func init() { + dir, err := homedir.Dir() + if err != nil { + log.Fatal(err) + } + + hDir = dir + + cfgHome = flag.String("home", filepath.Join(hDir, ".construct"), "construct's home directory") + netrcFile = flag.String("netrc", filepath.Join(hDir, ".netrc"), "location of netrc file to use for authentication") +} + +func main() { + flag.Parse() + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + pluginLoc := filepath.Join(*cfgHome, "plugins") + scriptsLoc := filepath.Join(*cfgHome, "local", "scripts") + + os.MkdirAll(pluginLoc, 0755) + os.MkdirAll(scriptsLoc, 0755) + fout, err := os.Create(*netrcFile) + if err != nil { + log.Fatal(err) + } + fout.Close() + + opts := []eclier.RouterOption{ + eclier.WithGluaCreationHook(preload), + eclier.WithScriptHome(scriptsLoc), + } + + err = filepath.Walk(pluginLoc, func(path string, info os.FileInfo, err error) error { + if info.IsDir() { + opts = append(opts, eclier.WithScriptHome(info.Name())) + } + + return nil + }) + if err != nil { + log.Fatal(err) + } + + r, err := eclier.NewRouter(opts...) + if err != nil { + log.Fatal(err) + } + + r.Run(ctx, flag.Args()) +} + +func preload(L *lua.LState) { + L.PreloadModule("re", gluare.Loader) + L.PreloadModule("sh", gluash.Loader) + L.PreloadModule("fs", gluafs.Loader) + L.PreloadModule("env", gluaenv.Loader) + L.PreloadModule("yaml", gluayaml.Loader) + L.PreloadModule("question", gluaquestion.Loader) + L.PreloadModule("ssh", gluassh.Loader) + L.PreloadModule("http", gluahttp.NewHttpModule(&http.Client{}).Loader) + L.PreloadModule("flag", gluaflag.Loader) + L.PreloadModule("template", gluatemplate.Loader) + L.PreloadModule("url", gluaurl.Loader) + gluaexpect.Preload(L) + gluasimplebox.Preload(L) + gluaxmlpath.Preload(L) + json.Preload(L) +} diff --git a/mage.go b/mage.go index 7bb9f60..3eba98d 100644 --- a/mage.go +++ b/mage.go @@ -14,11 +14,8 @@ import ( "github.com/magefile/mage/mg" ) -var ( - wd string - arches []string - bins []string -) +var wd string +var arches []string func init() { lwd, err := os.Getwd() @@ -26,15 +23,7 @@ func init() { wd = lwd - arches = []string{"amd64", "ppc64le", "arm64"} - bins = []string{ - "mage", - "route-httpagent", - "route-cli", - "routed", - "route-runmigrations", - "terraform-provider-route", - } + arches = []string{"amd64", "ppc64", "386", "arm", "arm64"} } const pkgBase = "git.xeserv.us/xena/route/" @@ -47,7 +36,7 @@ func buildBins(goos, goarch string) { os.MkdirAll(filepath.Join(d, goos, goarch), 0777) - for _, pkg := range bins { + for _, pkg := range []string{"route-httpagent", "route-cli", "routed", "terraform-provider-route"} { env := []string{"GOOS=" + goos, "GOARCH=" + goarch} goBuild(ctx, env, filepath.Join(d, goos, goarch), "cmd/"+pkg) goInstall(ctx, env, "cmd/"+pkg) @@ -73,12 +62,9 @@ func Docker() { ver, err := gitTag() qod.ANE(err) - shouldWork(ctx, nil, wd, "docker", "build", "-t", "xena/route-core", ".") - - run := filepath.Join(wd, "run") - - shouldWork(ctx, nil, run, "docker", "build", "-t", "xena/routed:"+ver, "-f", "Dockerfile.routed", ".") - shouldWork(ctx, nil, run, "docker", "build", "-t", "xena/route-httpagent:"+ver, "-f", "Dockerfile.agent", ".") + shouldWork(ctx, nil, wd, "docker", "build", "-t", "xena/route-core", "-f", "Dockerfile.core", ".") + shouldWork(ctx, nil, wd, "docker", "build", "-t", "xena/routed:"+ver, "-f", "Dockerfile.routed", ".") + shouldWork(ctx, nil, wd, "docker", "build", "-t", "xena/route-httpagent:"+ver, "-f", "Dockerfile.agent", ".") } // Linux builds binaries for linux @@ -102,6 +88,10 @@ func Darwin() { // Build builds the binaries for route and routed. func Build() { buildBins(runtime.GOOS, runtime.GOARCH) + + if runtime.GOOS == "linux" { + Plugin() + } } // Plugin builds all of the plugins for programs wanting to augment themselves with route. @@ -154,6 +144,13 @@ func Package() { } } +// Version is the version as git reports. +func Version() { + ver, err := gitTag() + qod.ANE(err) + qod.Printlnf("route-%s", ver) +} + // Test runs all of the functional and unit tests for the project. func Test() { ctx, cancel := context.WithCancel(context.Background()) @@ -168,7 +165,7 @@ func Tools(ctx context.Context) { "github.com/golang/dep/cmd/dep", "github.com/golang/protobuf/protoc-gen-go", "github.com/twitchtv/twirp/protoc-gen-twirp", - "github.com/jteeuwen/go-bindata/go-bindata", + "github.com/Xe/twirp-codegens/cmd/protoc-gen-twirp_eclier", } for _, t := range tools { @@ -178,26 +175,17 @@ func Tools(ctx context.Context) { // Generate runs code generators and the like. func Generate(ctx context.Context) { - protoDir := filepath.Join(wd, "proto") - databaseDir := filepath.Join(wd, "internal", "database", "migrations") - - os.Mkdir(filepath.Join(databaseDir, "dmigrations"), 0777) + dir := filepath.Join(wd, "proto") Tools(ctx) - shouldWork(ctx, nil, protoDir, "sh", "./regen.sh") - shouldWork(ctx, nil, databaseDir, "go-bindata", "-pkg", "dmigrations", "-o", "../dmigrations/bindata.go", ".") + shouldWork(ctx, nil, dir, "sh", "./regen.sh") } // Vars shows the various variables that this magefile uses. func Vars() { - ver, err := gitTag() - qod.ANE(err) - qod.Printlnf("arches:\t%v", arches) - qod.Printlnf("bins:\t%v", bins) qod.Printlnf("goarch:\t%s", runtime.GOARCH) qod.Printlnf("goos:\t%s", runtime.GOOS) qod.Printlnf("wd:\t%s", wd) - qod.Printlnf("ver:\t%s", ver) } diff --git a/proto/eclier/route_twirp_eclier_backends_kill.lua b/proto/eclier/route_twirp_eclier_backends_kill.lua new file mode 100644 index 0000000..a200080 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_backends_kill.lua @@ -0,0 +1,31 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "backends:kill" +script.help = "Executes method kill on service backends for twirp package xeserv.us.route.backends" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for BackendId +fs:string("id", "", "value for message arg id") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.backends.kill(flags) + +end diff --git a/proto/eclier/route_twirp_eclier_backends_list.lua b/proto/eclier/route_twirp_eclier_backends_list.lua new file mode 100644 index 0000000..9e8d8bd --- /dev/null +++ b/proto/eclier/route_twirp_eclier_backends_list.lua @@ -0,0 +1,34 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "backends:list" +script.help = "Executes method list on service backends for twirp package xeserv.us.route.backends" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for BackendSelector +fs:string("domain", "", "value for message arg domain") +fs:string("user", "", "value for message arg user") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.backends.list(flags) + + print("bs:\t\t" .. tostring(resp.bs)) + print("backends:\t\t" .. tostring(resp.backends)) +end diff --git a/proto/eclier/route_twirp_eclier_routes_delete.lua b/proto/eclier/route_twirp_eclier_routes_delete.lua new file mode 100644 index 0000000..f48f561 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_routes_delete.lua @@ -0,0 +1,33 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "routes:delete" +script.help = "Executes method delete on service routes for twirp package xeserv.us.route.routes" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Route +fs:string("id", "", "value for message arg id") +fs:string("creator", "", "value for message arg creator") +fs:string("host", "", "value for message arg host") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.routes.delete(flags) + +end diff --git a/proto/eclier/route_twirp_eclier_routes_get.lua b/proto/eclier/route_twirp_eclier_routes_get.lua new file mode 100644 index 0000000..1bfdac9 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_routes_get.lua @@ -0,0 +1,35 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "routes:get" +script.help = "Executes method get on service routes for twirp package xeserv.us.route.routes" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for GetRouteRequest +fs:string("unused", "", "value for message arg unused") +fs:string("id", "", "value for message arg id") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.routes.get(flags) + + print("id:\t\t" .. tostring(resp.id)) + print("creator:\t\t" .. tostring(resp.creator)) + print("host:\t\t" .. tostring(resp.host)) +end diff --git a/proto/eclier/route_twirp_eclier_routes_get_all.lua b/proto/eclier/route_twirp_eclier_routes_get_all.lua new file mode 100644 index 0000000..3f2be77 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_routes_get_all.lua @@ -0,0 +1,31 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "routes:get_all" +script.help = "Executes method get_all on service routes for twirp package xeserv.us.route.routes" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Nil + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.routes.get_all(flags) + + print("routes:\t\t" .. tostring(resp.routes)) +end diff --git a/proto/eclier/route_twirp_eclier_routes_put.lua b/proto/eclier/route_twirp_eclier_routes_put.lua new file mode 100644 index 0000000..baad522 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_routes_put.lua @@ -0,0 +1,36 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "routes:put" +script.help = "Executes method put on service routes for twirp package xeserv.us.route.routes" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Route +fs:string("id", "", "value for message arg id") +fs:string("creator", "", "value for message arg creator") +fs:string("host", "", "value for message arg host") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.routes.put(flags) + + print("id:\t\t" .. tostring(resp.id)) + print("creator:\t\t" .. tostring(resp.creator)) + print("host:\t\t" .. tostring(resp.host)) +end diff --git a/proto/eclier/route_twirp_eclier_tokens_deactivate.lua b/proto/eclier/route_twirp_eclier_tokens_deactivate.lua new file mode 100644 index 0000000..06cd8a0 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_tokens_deactivate.lua @@ -0,0 +1,34 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "tokens:deactivate" +script.help = "Executes method deactivate on service tokens for twirp package xeserv.us.route.tokens" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Token +fs:string("id", "", "value for message arg id") +fs:string("body", "", "value for message arg body") +fs:strings("scopes", "", "value for message arg scopes") +fs:bool("active", "", "value for message arg active") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.tokens.deactivate(flags) + +end diff --git a/proto/eclier/route_twirp_eclier_tokens_delete.lua b/proto/eclier/route_twirp_eclier_tokens_delete.lua new file mode 100644 index 0000000..70a30e4 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_tokens_delete.lua @@ -0,0 +1,34 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "tokens:delete" +script.help = "Executes method delete on service tokens for twirp package xeserv.us.route.tokens" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Token +fs:string("id", "", "value for message arg id") +fs:string("body", "", "value for message arg body") +fs:strings("scopes", "", "value for message arg scopes") +fs:bool("active", "", "value for message arg active") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.tokens.delete(flags) + +end diff --git a/proto/eclier/route_twirp_eclier_tokens_get.lua b/proto/eclier/route_twirp_eclier_tokens_get.lua new file mode 100644 index 0000000..e4e242a --- /dev/null +++ b/proto/eclier/route_twirp_eclier_tokens_get.lua @@ -0,0 +1,36 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "tokens:get" +script.help = "Executes method get on service tokens for twirp package xeserv.us.route.tokens" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for GetTokenRequest +fs:string("token", "", "value for message arg token") +fs:string("id", "", "value for message arg id") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.tokens.get(flags) + + print("id:\t\t" .. tostring(resp.id)) + print("body:\t\t" .. tostring(resp.body)) + print("scopes:\t\t" .. tostring(resp.scopes)) + print("active:\t\t" .. tostring(resp.active)) +end diff --git a/proto/eclier/route_twirp_eclier_tokens_get_all.lua b/proto/eclier/route_twirp_eclier_tokens_get_all.lua new file mode 100644 index 0000000..e039709 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_tokens_get_all.lua @@ -0,0 +1,31 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "tokens:get_all" +script.help = "Executes method get_all on service tokens for twirp package xeserv.us.route.tokens" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Nil + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.tokens.get_all(flags) + + print("tokens:\t\t" .. tostring(resp.tokens)) +end diff --git a/proto/eclier/route_twirp_eclier_tokens_put.lua b/proto/eclier/route_twirp_eclier_tokens_put.lua new file mode 100644 index 0000000..50838b9 --- /dev/null +++ b/proto/eclier/route_twirp_eclier_tokens_put.lua @@ -0,0 +1,38 @@ +-- Code generated by protoc-gen-twirp_eclier v5.0.0DO NOT EDIT +-- source: route.proto + +script.verb = "tokens:put" +script.help = "Executes method put on service tokens for twirp package xeserv.us.route.tokens" +script.author = "machine-generated" +script.version = "v5.0.0" +script.usage = "" + +local flag = require "flag" +local svc = require "svc" + +local fs = flag.new() + +-- flags for Token +fs:string("id", "", "value for message arg id") +fs:string("body", "", "value for message arg body") +fs:strings("scopes", "", "value for message arg scopes") +fs:bool("active", "", "value for message arg active") + +script.usage = fs:usage() + +function run(arg) + if arg[1] == "-help" or arg[1] == "--help" then + print(fs:usage()) + return + end + + arg[0] = script.verb + local flags = fs:parse(arg) + + local resp = svc.tokens.put(flags) + + print("id:\t\t" .. tostring(resp.id)) + print("body:\t\t" .. tostring(resp.body)) + print("scopes:\t\t" .. tostring(resp.scopes)) + print("active:\t\t" .. tostring(resp.active)) +end diff --git a/proto/regen.sh b/proto/regen.sh index 3e1ec53..20f7809 100755 --- a/proto/regen.sh +++ b/proto/regen.sh @@ -3,4 +3,5 @@ protoc -I. \ --go_out=:. \ --twirp_out=. \ + --twirp_eclier_out=./eclier \ route.proto diff --git a/vendor/github.com/ThomasRooney/gexpect/LICENCE b/vendor/github.com/ThomasRooney/gexpect/LICENCE new file mode 100644 index 0000000..50adb0f --- /dev/null +++ b/vendor/github.com/ThomasRooney/gexpect/LICENCE @@ -0,0 +1,7 @@ +Copyright (C) 2014 Thomas Rooney + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/vendor/github.com/ThomasRooney/gexpect/README.md b/vendor/github.com/ThomasRooney/gexpect/README.md new file mode 100644 index 0000000..c30e0e2 --- /dev/null +++ b/vendor/github.com/ThomasRooney/gexpect/README.md @@ -0,0 +1,64 @@ +# Gexpect + +Gexpect is a pure golang expect-like module. + +It makes it simpler to create and control other terminal applications. + + child, err := gexpect.Spawn("python") + if err != nil { + panic(err) + } + child.Expect(">>>") + child.SendLine("print 'Hello World'") + child.Interact() + child.Close() + +## Examples + +`Spawn` handles the argument parsing from a string + + child.Spawn("/bin/sh -c 'echo \"my complicated command\" | tee log | cat > log2'") + child.ReadLine() // ReadLine() (string, error) + child.ReadUntil(' ') // ReadUntil(delim byte) ([]byte, error) + +`ReadLine`, `ReadUntil` and `SendLine` send strings from/to `stdout/stdin` respectively + + child, _ := gexpect.Spawn("cat") + child.SendLine("echoing process_stdin") // SendLine(command string) (error) + msg, _ := child.ReadLine() // msg = echoing process_stdin + +`Wait` and `Close` allow for graceful and ungraceful termination. + + child.Wait() // Waits until the child terminates naturally. + child.Close() // Sends a kill command + +`AsyncInteractChannels` spawns two go routines to pipe into and from `stdout`/`stdin`, allowing for some usecases to be a little simpler. + + child, _ := gexpect.Spawn("sh") + sender, receiver := child.AsyncInteractChannels() + sender <- "echo Hello World\n" // Send to stdin + line, open := <- receiver // Recieve a line from stdout/stderr + // When the subprocess stops (e.g. with child.Close()) , receiver is closed + if open { + fmt.Printf("Received %s", line) + } + +`ExpectRegex` uses golang's internal regex engine to wait until a match from the process with the given regular expression (or an error on process termination with no match). + + child, _ := gexpect.Spawn("echo accb") + match, _ := child.ExpectRegex("a..b") + // (match=true) + +`ExpectRegexFind` allows for groups to be extracted from process stdout. The first element is an array of containing the total matched text, followed by each subexpression group match. + + child, _ := gexpect.Spawn("echo 123 456 789") + result, _ := child.ExpectRegexFind("\d+ (\d+) (\d+)") + // result = []string{"123 456 789", "456", "789"} + +See `gexpect_test.go` and the `examples` folder for full syntax + +## Credits + + github.com/kballard/go-shellquote + github.com/kr/pty + KMP Algorithm: "http://blog.databigbang.com/searching-for-substrings-in-streams-a-slight-modification-of-the-knuth-morris-pratt-algorithm-in-haxe/" diff --git a/vendor/github.com/ThomasRooney/gexpect/gexpect.go b/vendor/github.com/ThomasRooney/gexpect/gexpect.go new file mode 100644 index 0000000..6e918cb --- /dev/null +++ b/vendor/github.com/ThomasRooney/gexpect/gexpect.go @@ -0,0 +1,449 @@ +// +build !windows + +package gexpect + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "os/exec" + "regexp" + "time" + "unicode/utf8" + + shell "github.com/kballard/go-shellquote" + "github.com/kr/pty" +) + +var ( + ErrEmptySearch = errors.New("empty search string") +) + +type ExpectSubprocess struct { + Cmd *exec.Cmd + buf *buffer + outputBuffer []byte +} + +type buffer struct { + f *os.File + b bytes.Buffer + collect bool + + collection bytes.Buffer +} + +func (buf *buffer) StartCollecting() { + buf.collect = true +} + +func (buf *buffer) StopCollecting() (result string) { + result = string(buf.collection.Bytes()) + buf.collect = false + buf.collection.Reset() + return result +} + +func (buf *buffer) Read(chunk []byte) (int, error) { + nread := 0 + if buf.b.Len() > 0 { + n, err := buf.b.Read(chunk) + if err != nil { + return n, err + } + if n == len(chunk) { + return n, nil + } + nread = n + } + fn, err := buf.f.Read(chunk[nread:]) + return fn + nread, err +} + +func (buf *buffer) ReadRune() (r rune, size int, err error) { + l := buf.b.Len() + + chunk := make([]byte, utf8.UTFMax) + if l > 0 { + n, err := buf.b.Read(chunk) + if err != nil { + return 0, 0, err + } + if utf8.FullRune(chunk[:n]) { + r, rL := utf8.DecodeRune(chunk) + if n > rL { + buf.PutBack(chunk[rL:n]) + } + if buf.collect { + buf.collection.WriteRune(r) + } + return r, rL, nil + } + } + // else add bytes from the file, then try that + for l < utf8.UTFMax { + fn, err := buf.f.Read(chunk[l : l+1]) + if err != nil { + return 0, 0, err + } + l = l + fn + + if utf8.FullRune(chunk[:l]) { + r, rL := utf8.DecodeRune(chunk) + if buf.collect { + buf.collection.WriteRune(r) + } + return r, rL, nil + } + } + return 0, 0, errors.New("File is not a valid UTF=8 encoding") +} + +func (buf *buffer) PutBack(chunk []byte) { + if len(chunk) == 0 { + return + } + if buf.b.Len() == 0 { + buf.b.Write(chunk) + return + } + d := make([]byte, 0, len(chunk)+buf.b.Len()) + d = append(d, chunk...) + d = append(d, buf.b.Bytes()...) + buf.b.Reset() + buf.b.Write(d) +} + +func SpawnAtDirectory(command string, directory string) (*ExpectSubprocess, error) { + expect, err := _spawn(command) + if err != nil { + return nil, err + } + expect.Cmd.Dir = directory + return _start(expect) +} + +func Command(command string) (*ExpectSubprocess, error) { + expect, err := _spawn(command) + if err != nil { + return nil, err + } + return expect, nil +} + +func (expect *ExpectSubprocess) Start() error { + _, err := _start(expect) + return err +} + +func Spawn(command string) (*ExpectSubprocess, error) { + expect, err := _spawn(command) + if err != nil { + return nil, err + } + return _start(expect) +} + +func (expect *ExpectSubprocess) Close() error { + if err := expect.Cmd.Process.Kill(); err != nil { + return err + } + if err := expect.buf.f.Close(); err != nil { + return err + } + return nil +} + +func (expect *ExpectSubprocess) AsyncInteractChannels() (send chan string, receive chan string) { + receive = make(chan string) + send = make(chan string) + + go func() { + for { + str, err := expect.ReadLine() + if err != nil { + close(receive) + return + } + receive <- str + } + }() + + go func() { + for { + select { + case sendCommand, exists := <-send: + { + if !exists { + return + } + err := expect.Send(sendCommand) + if err != nil { + receive <- "gexpect Error: " + err.Error() + return + } + } + } + } + }() + + return +} + +func (expect *ExpectSubprocess) ExpectRegex(regex string) (bool, error) { + return regexp.MatchReader(regex, expect.buf) +} + +func (expect *ExpectSubprocess) expectRegexFind(regex string, output bool) ([]string, string, error) { + re, err := regexp.Compile(regex) + if err != nil { + return nil, "", err + } + expect.buf.StartCollecting() + pairs := re.FindReaderSubmatchIndex(expect.buf) + stringIndexedInto := expect.buf.StopCollecting() + l := len(pairs) + numPairs := l / 2 + result := make([]string, numPairs) + for i := 0; i < numPairs; i += 1 { + result[i] = stringIndexedInto[pairs[i*2]:pairs[i*2+1]] + } + // convert indexes to strings + + if len(result) == 0 { + err = fmt.Errorf("ExpectRegex didn't find regex '%v'.", regex) + } else { + // The number in pairs[1] is an index of a first + // character outside the whole match + putBackIdx := pairs[1] + if len(stringIndexedInto) > putBackIdx { + stringToPutBack := stringIndexedInto[putBackIdx:] + stringIndexedInto = stringIndexedInto[:putBackIdx] + expect.buf.PutBack([]byte(stringToPutBack)) + } + } + return result, stringIndexedInto, err +} + +func (expect *ExpectSubprocess) expectTimeoutRegexFind(regex string, timeout time.Duration) (result []string, out string, err error) { + t := make(chan bool) + go func() { + result, out, err = expect.ExpectRegexFindWithOutput(regex) + t <- false + }() + go func() { + time.Sleep(timeout) + err = fmt.Errorf("ExpectRegex timed out after %v finding '%v'.\nOutput:\n%s", timeout, regex, expect.Collect()) + t <- true + }() + <-t + return result, out, err +} + +func (expect *ExpectSubprocess) ExpectRegexFind(regex string) ([]string, error) { + result, _, err := expect.expectRegexFind(regex, false) + return result, err +} + +func (expect *ExpectSubprocess) ExpectTimeoutRegexFind(regex string, timeout time.Duration) ([]string, error) { + result, _, err := expect.expectTimeoutRegexFind(regex, timeout) + return result, err +} + +func (expect *ExpectSubprocess) ExpectRegexFindWithOutput(regex string) ([]string, string, error) { + return expect.expectRegexFind(regex, true) +} + +func (expect *ExpectSubprocess) ExpectTimeoutRegexFindWithOutput(regex string, timeout time.Duration) ([]string, string, error) { + return expect.expectTimeoutRegexFind(regex, timeout) +} + +func buildKMPTable(searchString string) []int { + pos := 2 + cnd := 0 + length := len(searchString) + + var table []int + if length < 2 { + length = 2 + } + + table = make([]int, length) + table[0] = -1 + table[1] = 0 + + for pos < len(searchString) { + if searchString[pos-1] == searchString[cnd] { + cnd += 1 + table[pos] = cnd + pos += 1 + } else if cnd > 0 { + cnd = table[cnd] + } else { + table[pos] = 0 + pos += 1 + } + } + return table +} + +func (expect *ExpectSubprocess) ExpectTimeout(searchString string, timeout time.Duration) (e error) { + result := make(chan error) + go func() { + result <- expect.Expect(searchString) + }() + select { + case e = <-result: + case <-time.After(timeout): + e = fmt.Errorf("Expect timed out after %v waiting for '%v'.\nOutput:\n%s", timeout, searchString, expect.Collect()) + } + return e +} + +func (expect *ExpectSubprocess) Expect(searchString string) (e error) { + target := len(searchString) + if target < 1 { + return ErrEmptySearch + } + chunk := make([]byte, target*2) + if expect.outputBuffer != nil { + expect.outputBuffer = expect.outputBuffer[0:] + } + m := 0 + i := 0 + // Build KMP Table + table := buildKMPTable(searchString) + + for { + n, err := expect.buf.Read(chunk) + if n == 0 && err != nil { + return err + } + if expect.outputBuffer != nil { + expect.outputBuffer = append(expect.outputBuffer, chunk[:n]...) + } + offset := m + i + for m+i-offset < n { + if searchString[i] == chunk[m+i-offset] { + i += 1 + if i == target { + unreadIndex := m + i - offset + if len(chunk) > unreadIndex { + expect.buf.PutBack(chunk[unreadIndex:n]) + } + return nil + } + } else { + m += i - table[i] + if table[i] > -1 { + i = table[i] + } else { + i = 0 + } + } + } + } +} + +func (expect *ExpectSubprocess) Send(command string) error { + _, err := io.WriteString(expect.buf.f, command) + return err +} + +func (expect *ExpectSubprocess) Capture() { + if expect.outputBuffer == nil { + expect.outputBuffer = make([]byte, 0) + } +} + +func (expect *ExpectSubprocess) Collect() []byte { + collectOutput := make([]byte, len(expect.outputBuffer)) + copy(collectOutput, expect.outputBuffer) + expect.outputBuffer = nil + return collectOutput +} + +func (expect *ExpectSubprocess) SendLine(command string) error { + _, err := io.WriteString(expect.buf.f, command+"\r\n") + return err +} + +func (expect *ExpectSubprocess) Interact() { + defer expect.Cmd.Wait() + io.Copy(os.Stdout, &expect.buf.b) + go io.Copy(os.Stdout, expect.buf.f) + go io.Copy(expect.buf.f, os.Stdin) +} + +func (expect *ExpectSubprocess) ReadUntil(delim byte) ([]byte, error) { + join := make([]byte, 0, 512) + chunk := make([]byte, 255) + + for { + n, err := expect.buf.Read(chunk) + + for i := 0; i < n; i++ { + if chunk[i] == delim { + if len(chunk) > i+1 { + expect.buf.PutBack(chunk[i+1:n]) + } + return join, nil + } else { + join = append(join, chunk[i]) + } + } + + if err != nil { + return join, err + } + } +} + +func (expect *ExpectSubprocess) Wait() error { + return expect.Cmd.Wait() +} + +func (expect *ExpectSubprocess) ReadLine() (string, error) { + str, err := expect.ReadUntil('\n') + return string(str), err +} + +func _start(expect *ExpectSubprocess) (*ExpectSubprocess, error) { + f, err := pty.Start(expect.Cmd) + if err != nil { + return nil, err + } + expect.buf.f = f + + return expect, nil +} + +func _spawn(command string) (*ExpectSubprocess, error) { + wrapper := new(ExpectSubprocess) + + wrapper.outputBuffer = nil + + splitArgs, err := shell.Split(command) + if err != nil { + return nil, err + } + numArguments := len(splitArgs) - 1 + if numArguments < 0 { + return nil, errors.New("gexpect: No command given to spawn") + } + path, err := exec.LookPath(splitArgs[0]) + if err != nil { + return nil, err + } + + if numArguments >= 1 { + wrapper.Cmd = exec.Command(path, splitArgs[1:]...) + } else { + wrapper.Cmd = exec.Command(path) + } + wrapper.buf = new(buffer) + + return wrapper, nil +} diff --git a/vendor/github.com/ThomasRooney/gexpect/gexpect_test.go b/vendor/github.com/ThomasRooney/gexpect/gexpect_test.go new file mode 100644 index 0000000..8d3771a --- /dev/null +++ b/vendor/github.com/ThomasRooney/gexpect/gexpect_test.go @@ -0,0 +1,419 @@ +// +build !windows + +package gexpect + +import ( + "bytes" + "fmt" + "io/ioutil" + "strings" + "testing" + "time" +) + +func TestEmptySearchString(t *testing.T) { + t.Logf("Testing empty search string...") + child, err := Spawn("echo Hello World") + if err != nil { + t.Fatal(err) + } + err = child.Expect("") + if err != ErrEmptySearch { + t.Fatalf("Expected empty search error, got %v", err) + } +} + +func TestHelloWorld(t *testing.T) { + t.Logf("Testing Hello World... ") + child, err := Spawn("echo \"Hello World\"") + if err != nil { + t.Fatal(err) + } + err = child.Expect("Hello World") + if err != nil { + t.Fatal(err) + } +} + +func TestDoubleHelloWorld(t *testing.T) { + t.Logf("Testing Double Hello World... ") + child, err := Spawn(`sh -c "echo Hello World ; echo Hello ; echo Hi"`) + if err != nil { + t.Fatal(err) + } + err = child.Expect("Hello World") + if err != nil { + t.Fatal(err) + } + err = child.Expect("Hello") + if err != nil { + t.Fatal(err) + } + err = child.Expect("Hi") + if err != nil { + t.Fatal(err) + } +} + +func TestHelloWorldFailureCase(t *testing.T) { + t.Logf("Testing Hello World Failure case... ") + child, err := Spawn("echo \"Hello World\"") + if err != nil { + t.Fatal(err) + } + err = child.Expect("YOU WILL NEVER FIND ME") + if err != nil { + return + } + t.Fatal("Expected an error for TestHelloWorldFailureCase") +} + +func TestBiChannel(t *testing.T) { + + t.Logf("Testing BiChannel screen... ") + child, err := Spawn("cat") + if err != nil { + t.Fatal(err) + } + sender, receiver := child.AsyncInteractChannels() + wait := func(str string) { + for { + msg, open := <-receiver + if !open { + return + } + if strings.Contains(msg, str) { + return + } + } + } + + endlChar := fmt.Sprintln("") + sender <- fmt.Sprintf("echo%v", endlChar) + wait("echo") + sender <- fmt.Sprintf("echo2%v", endlChar) + wait("echo2") + child.Close() + child.Wait() +} + +func TestCommandStart(t *testing.T) { + t.Logf("Testing Command... ") + + // Doing this allows you to modify the cmd struct prior to execution, for example to add environment variables + child, err := Command("echo 'Hello World'") + if err != nil { + t.Fatal(err) + } + child.Start() + child.Expect("Hello World") +} + +var regexMatchTests = []struct { + re string + good string + bad string +}{ + {`a`, `a`, `b`}, + {`.b`, `ab`, `ac`}, + {`a+hello`, `aaaahello`, `bhello`}, + {`(hello|world)`, `hello`, `unknown`}, + {`(hello|world)`, `world`, `unknown`}, + {"\u00a9", "\u00a9", `unknown`}, // 2 bytes long unicode character "copyright sign" +} + +func TestRegexMatch(t *testing.T) { + t.Logf("Testing Regular Expression Matching... ") + for _, tt := range regexMatchTests { + runTest := func(input string) bool { + var match bool + child, err := Spawn("echo \"" + input + "\"") + if err != nil { + t.Fatal(err) + } + match, err = child.ExpectRegex(tt.re) + if err != nil { + t.Fatal(err) + } + return match + } + if !runTest(tt.good) { + t.Errorf("Regex Not matching [%#q] with pattern [%#q]", tt.good, tt.re) + } + if runTest(tt.bad) { + t.Errorf("Regex Matching [%#q] with pattern [%#q]", tt.bad, tt.re) + } + } +} + +var regexFindTests = []struct { + re string + input string + matches []string +}{ + {`he(l)lo wo(r)ld`, `hello world`, []string{"hello world", "l", "r"}}, + {`(a)`, `a`, []string{"a", "a"}}, + {`so.. (hello|world)`, `so.. hello`, []string{"so.. hello", "hello"}}, + {`(a+)hello`, `aaaahello`, []string{"aaaahello", "aaaa"}}, + {`\d+ (\d+) (\d+)`, `123 456 789`, []string{"123 456 789", "456", "789"}}, + {`\d+ (\d+) (\d+)`, "\u00a9 123 456 789 \u00a9", []string{"123 456 789", "456", "789"}}, // check unicode characters +} + +func TestRegexFind(t *testing.T) { + t.Logf("Testing Regular Expression Search... ") + for _, tt := range regexFindTests { + runTest := func(input string) []string { + child, err := Spawn("echo \"" + input + "\"") + if err != nil { + t.Fatal(err) + } + matches, err := child.ExpectRegexFind(tt.re) + if err != nil { + t.Fatal(err) + } + return matches + } + matches := runTest(tt.input) + if len(matches) != len(tt.matches) { + t.Fatalf("Regex not producing the expected number of patterns.. got[%d] ([%s]) expected[%d] ([%s])", + len(matches), strings.Join(matches, ","), + len(tt.matches), strings.Join(tt.matches, ",")) + } + for i, _ := range matches { + if matches[i] != tt.matches[i] { + t.Errorf("Regex Expected group [%s] and got group [%s] with pattern [%#q] and input [%s]", + tt.matches[i], matches[i], tt.re, tt.input) + } + } + } +} + +func TestReadLine(t *testing.T) { + t.Logf("Testing ReadLine...") + + child, err := Spawn("echo \"foo\nbar\"") + + if err != nil { + t.Fatal(err) + } + s, err := child.ReadLine() + + if err != nil { + t.Fatal(err) + } + if s != "foo\r" { + t.Fatalf("expected 'foo\\r', got '%s'", s) + } + s, err = child.ReadLine() + if err != nil { + t.Fatal(err) + } + if s != "bar\r" { + t.Fatalf("expected 'bar\\r', got '%s'", s) + } +} + +func TestRegexWithOutput(t *testing.T) { + t.Logf("Testing Regular Expression search with output...") + + s := "You will not find me" + p, err := Spawn("echo -n " + s) + if err != nil { + t.Fatalf("Cannot exec rkt: %v", err) + } + searchPattern := `I should not find you` + result, out, err := p.ExpectRegexFindWithOutput(searchPattern) + if err == nil { + t.Fatalf("Shouldn't have found `%v` in `%v`", searchPattern, out) + } + if s != out { + t.Fatalf("Child output didn't match: %s", out) + } + + err = p.Wait() + if err != nil { + t.Fatalf("Child didn't terminate correctly: %v", err) + } + + p, err = Spawn("echo You will find me") + if err != nil { + t.Fatalf("Cannot exec rkt: %v", err) + } + searchPattern = `.*(You will).*` + result, out, err = p.ExpectRegexFindWithOutput(searchPattern) + if err != nil || result[1] != "You will" { + t.Fatalf("Did not find pattern `%v` in `%v'\n", searchPattern, out) + } + err = p.Wait() + if err != nil { + t.Fatalf("Child didn't terminate correctly: %v", err) + } +} + +func TestRegexTimeoutWithOutput(t *testing.T) { + t.Logf("Testing Regular Expression search with timeout and output...") + + seconds := 2 + timeout := time.Duration(seconds-1) * time.Second + + p, err := Spawn(fmt.Sprintf("sh -c 'sleep %d && echo You find me'", seconds)) + if err != nil { + t.Fatalf("Cannot exec rkt: %v", err) + } + searchPattern := `find me` + result, out, err := p.ExpectTimeoutRegexFindWithOutput(searchPattern, timeout) + if err == nil { + t.Fatalf("Shouldn't have finished call with result: %v", result) + } + + seconds = 2 + timeout = time.Duration(seconds+1) * time.Second + + p, err = Spawn(fmt.Sprintf("sh -c 'sleep %d && echo You find me'", seconds)) + if err != nil { + t.Fatalf("Cannot exec rkt: %v", err) + } + searchPattern = `find me` + result, out, err = p.ExpectTimeoutRegexFindWithOutput(searchPattern, timeout) + if err != nil { + t.Fatalf("Didn't find %v in output: %v", searchPattern, out) + } +} + +func TestRegexFindNoExcessBytes(t *testing.T) { + t.Logf("Testing Regular Expressions returning output with no excess strings") + repeats := 50 + tests := []struct { + desc string + loopBody string + searchPattern string + expectFullTmpl string + unmatchedData string + }{ + { + desc: `matching lines line by line with $ at the end of the regexp`, + loopBody: `echo "prefix: ${i} line"`, + searchPattern: `(?m)^prefix:\s+(\d+) line\s??$`, + expectFullTmpl: `prefix: %d line`, + unmatchedData: "\n", + // the "$" char at the end of regexp does not + // match the \n, so it is left as an unmatched + // data + }, + { + desc: `matching lines line by line with \n at the end of the regexp`, + loopBody: `echo "prefix: ${i} line"`, + searchPattern: `(?m)^prefix:\s+(\d+) line\s??\n`, + expectFullTmpl: `prefix: %d line`, + unmatchedData: "", + }, + { + desc: `matching chunks in single line chunk by chunk`, + loopBody: `printf "a ${i} b"`, + searchPattern: `a\s+(\d+)\s+b`, + expectFullTmpl: `a %d b`, + unmatchedData: "", + }, + } + seqCmd := fmt.Sprintf("`seq 1 %d`", repeats) + shCmdTmpl := fmt.Sprintf(`sh -c 'for i in %s; do %%s; done'`, seqCmd) + for _, tt := range tests { + t.Logf("Test: %s", tt.desc) + shCmd := fmt.Sprintf(shCmdTmpl, tt.loopBody) + t.Logf("Running command: %s", shCmd) + p, err := Spawn(shCmd) + if err != nil { + t.Fatalf("Cannot exec shell script: %v", err) + } + defer func() { + if err := p.Wait(); err != nil { + t.Fatalf("shell script didn't terminate correctly: %v", err) + } + }() + for i := 1; i <= repeats; i++ { + matches, output, err := p.ExpectRegexFindWithOutput(tt.searchPattern) + if err != nil { + t.Fatalf("Failed to get the match number %d: %v", i, err) + } + if len(matches) != 2 { + t.Fatalf("Expected only 2 matches, got %d", len(matches)) + } + full := strings.TrimSpace(matches[0]) + expFull := fmt.Sprintf(tt.expectFullTmpl, i) + partial := matches[1] + expPartial := fmt.Sprintf("%d", i) + if full != expFull { + t.Fatalf("Did not the expected full match %q, got %q", expFull, full) + } + if partial != expPartial { + t.Fatalf("Did not the expected partial match %q, got %q", expPartial, partial) + } + // The output variable usually contains the + // unmatched data followed by the whole match. + // The first line is special as it has no data + // preceding it. + var expectedOutput string + if i == 1 || tt.unmatchedData == "" { + expectedOutput = matches[0] + } else { + expectedOutput = fmt.Sprintf("%s%s", tt.unmatchedData, matches[0]) + } + if output != expectedOutput { + t.Fatalf("The collected output %q should be the same as the whole match %q", output, expectedOutput) + } + } + } +} + +func TestBufferReadRune(t *testing.T) { + tests := []struct { + bufferContent []byte + fileContent []byte + expectedRune rune + }{ + // unicode "copyright char" is \u00a9 is encoded as two bytes in utf8 0xc2 0xa9 + {[]byte{0xc2, 0xa9}, []byte{}, '\u00a9'}, // whole rune is already in buffer.b + {[]byte{0xc2}, []byte{0xa9}, '\u00a9'}, // half of is in the buffer.b and another half still in buffer.f (file) + {[]byte{}, []byte{0xc2, 0xa9}, '\u00a9'}, // whole rune is the file + // some random noise in the end of file + {[]byte{0xc2, 0xa9}, []byte{0x20, 0x20, 0x20, 0x20}, '\u00a9'}, + {[]byte{0xc2}, []byte{0xa9, 0x20, 0x20, 0x20, 0x20}, '\u00a9'}, + {[]byte{}, []byte{0xc2, 0xa9, 0x20, 0x20, 0x20, 0x20}, '\u00a9'}, + } + + for i, tt := range tests { + + // prepare tmp file with fileContent + f, err := ioutil.TempFile("", "") + if err != nil { + t.Fatal(err) + } + n, err := f.Write(tt.fileContent) + if err != nil { + t.Fatal(err) + } + if n != len(tt.fileContent) { + t.Fatal("expected fileContent written to temp file") + } + _, err = f.Seek(0, 0) + if err != nil { + t.Fatal(err) + } + + // new buffer + buf := buffer{f: f, b: *bytes.NewBuffer(tt.bufferContent)} + + // call ReadRune + r, size, err := buf.ReadRune() + + if r != tt.expectedRune { + t.Fatalf("#%d: expected rune %+q but go is %+q", i, tt.expectedRune, r) + } + + if size != len(string(tt.expectedRune)) { + t.Fatalf("#%d: expected rune %d bytes long but got just %d bytes long", i, len(string(tt.expectedRune)), size) + } + + } + +} diff --git a/vendor/github.com/Xe/eclier/.gitignore b/vendor/github.com/Xe/eclier/.gitignore new file mode 100644 index 0000000..28f7b7d --- /dev/null +++ b/vendor/github.com/Xe/eclier/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +doc \ No newline at end of file diff --git a/vendor/github.com/Xe/eclier/Gopkg.lock b/vendor/github.com/Xe/eclier/Gopkg.lock new file mode 100644 index 0000000..4e650ea --- /dev/null +++ b/vendor/github.com/Xe/eclier/Gopkg.lock @@ -0,0 +1,223 @@ +memo = "b40e77e679fec09015bfda27b7d1fc37f4ba6240cbe95cf9fb88b5c56e40ebdf" + +[[projects]] + branch = "master" + name = "github.com/ThomasRooney/gexpect" + packages = ["."] + revision = "5482f03509440585d13d8f648989e05903001842" + +[[projects]] + branch = "master" + name = "github.com/Xe/x" + packages = ["tools/glue/libs/gluaexpect","tools/glue/libs/gluasimplebox"] + revision = "d0ebe3970f361daa31a135f1e0c7304eb1442f61" + +[[projects]] + branch = "master" + name = "github.com/ailncode/gluaxmlpath" + packages = ["."] + revision = "6ce478ecb4a60c4fc8929838e0b21b7fb7ca7440" + +[[projects]] + branch = "master" + name = "github.com/brandur/simplebox" + packages = ["."] + revision = "84e9865bb03ad38c464043bf5382ce8c68ca5f0c" + +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluahttp" + packages = ["."] + revision = "b4bfe0c50fea948dcbf3966e120996d6607bbd89" + +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluaurl" + packages = ["."] + revision = "31cbb9bef199454415879f2e6d609d1136d60cad" + +[[projects]] + branch = "master" + name = "github.com/cyberdelia/heroku-go" + packages = ["v3"] + revision = "bb8b6b1e9656ec0728638961f8e8b4211fee735d" + +[[projects]] + branch = "master" + name = "github.com/dickeyxxx/netrc" + packages = ["."] + revision = "3acf1b3de25d89c7688c63bb45f6b07f566555ec" + +[[projects]] + branch = "master" + name = "github.com/google/go-querystring" + packages = ["query"] + revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" + +[[projects]] + branch = "master" + name = "github.com/howeyc/gopass" + packages = ["."] + revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + +[[projects]] + branch = "master" + name = "github.com/kballard/go-shellquote" + packages = ["."] + revision = "d8ec1a69a250a17bb0e419c386eac1f3711dc142" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaenv" + packages = ["."] + revision = "2888db6bbe38923d59c42e443895875cc8ce0820" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluafs" + packages = ["."] + revision = "01391ed2d7ab89dc80157605b073403f960aa223" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaquestion" + packages = ["."] + revision = "311437c29ba54d027ad2af383661725ae2bfdcdc" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluassh" + packages = ["."] + revision = "2a7bd48d7568de8230c87ac1ef4a4c481e45814d" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluatemplate" + packages = ["."] + revision = "d9e2c9d6b00f069a9da377a9ac529c827c1c7d71" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluayaml" + packages = ["."] + revision = "6fe413d49d73d785510ecf1529991ab0573e96c7" + +[[projects]] + branch = "master" + name = "github.com/kr/fs" + packages = ["."] + revision = "2788f0dbd16903de03cb8186e5c7d97b69ad387b" + +[[projects]] + branch = "master" + name = "github.com/kr/pty" + packages = ["."] + revision = "ce7fa45920dc37a92de8377972e52bc55ffa8d57" + +[[projects]] + branch = "master" + name = "github.com/mattn/go-runewidth" + packages = ["."] + revision = "737072b4e32b7a5018b4a7125da8d12de90e8045" + +[[projects]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "cc8532a8e9a55ea36402aa21efdf403a60d34096" + +[[projects]] + branch = "master" + name = "github.com/olekukonko/tablewriter" + packages = ["."] + revision = "44e365d423f4f06769182abfeeae2b91be9d529b" + +[[projects]] + branch = "master" + name = "github.com/otm/gluaflag" + packages = ["."] + revision = "078088de689148194436293886e8e39809167332" + +[[projects]] + branch = "master" + name = "github.com/otm/gluash" + packages = ["."] + revision = "e145c563986f0b91f740a758a84bca46c163aec7" + +[[projects]] + name = "github.com/pborman/uuid" + packages = ["."] + revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" + version = "v1.1" + +[[projects]] + branch = "master" + name = "github.com/pkg/sftp" + packages = ["."] + revision = "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" + +[[projects]] + branch = "master" + name = "github.com/yookoala/realpath" + packages = ["."] + revision = "c416d99ab5ed256fa30c1f3bab73152deb59bb69" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluamapper" + packages = ["."] + revision = "d836955830e75240d46ce9f0e6d148d94f2e1d3a" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluare" + packages = ["."] + revision = "8e2742cd1bf2b904720ac66eca3c2091b2ea0720" + +[[projects]] + branch = "master" + name = "github.com/yuin/gopher-lua" + packages = [".","ast","parse","pm"] + revision = "33ebc07735566cd0c3c4b69e2839d522cc389852" + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["curve25519","ed25519","ed25519/internal/edwards25519","nacl/secretbox","poly1305","salsa20/salsa","ssh","ssh/agent","ssh/terminal"] + revision = "dd85ac7e6a88fc6ca420478e934de5f1a42dd3c6" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["html","html/atom"] + revision = "66aacef3dd8a676686c7ae3716979581e8b03c47" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix"] + revision = "9ccfe848b9db8435a24c424abbc07a921adf1df5" + +[[projects]] + branch = "v2" + name = "gopkg.in/xmlpath.v2" + packages = ["."] + revision = "860cbeca3ebcc600db0b213c0e83ad6ce91f5739" + +[[projects]] + branch = "master" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b" + +[[projects]] + branch = "master" + name = "layeh.com/gopher-json" + packages = ["."] + revision = "c128cc74278be889c4381681712931976fe0d88b" + +[[projects]] + branch = "master" + name = "layeh.com/gopher-luar" + packages = ["."] + revision = "80196fe2abc5682963fc7a5261f5a5d77509938b" diff --git a/vendor/github.com/Xe/eclier/Gopkg.toml b/vendor/github.com/Xe/eclier/Gopkg.toml new file mode 100644 index 0000000..4219096 --- /dev/null +++ b/vendor/github.com/Xe/eclier/Gopkg.toml @@ -0,0 +1,72 @@ + +[[dependencies]] + branch = "master" + name = "github.com/Xe/x" + +[[dependencies]] + branch = "master" + name = "github.com/ailncode/gluaxmlpath" + +[[dependencies]] + branch = "master" + name = "github.com/cjoudrey/gluahttp" + +[[dependencies]] + branch = "master" + name = "github.com/cjoudrey/gluaurl" + +[[dependencies]] + branch = "master" + name = "github.com/dickeyxxx/netrc" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluaenv" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluafs" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluaquestion" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluassh" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluatemplate" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluayaml" + +[[dependencies]] + branch = "master" + name = "github.com/olekukonko/tablewriter" + +[[dependencies]] + branch = "master" + name = "github.com/otm/gluaflag" + +[[dependencies]] + branch = "master" + name = "github.com/otm/gluash" + +[[dependencies]] + branch = "master" + name = "github.com/yuin/gluare" + +[[dependencies]] + branch = "master" + name = "github.com/yuin/gopher-lua" + +[[dependencies]] + branch = "master" + name = "layeh.com/gopher-json" + +[[dependencies]] + branch = "master" + name = "layeh.com/gopher-luar" diff --git a/vendor/github.com/Xe/eclier/LICENSE b/vendor/github.com/Xe/eclier/LICENSE new file mode 100644 index 0000000..1625c17 --- /dev/null +++ b/vendor/github.com/Xe/eclier/LICENSE @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. \ No newline at end of file diff --git a/vendor/github.com/Xe/eclier/README.md b/vendor/github.com/Xe/eclier/README.md new file mode 100644 index 0000000..7f99158 --- /dev/null +++ b/vendor/github.com/Xe/eclier/README.md @@ -0,0 +1,38 @@ +# eclier + +Pronounced like eclair + +The core of a command line application allowing for trivial user extension. + +Every command and subcommand is its own `.lua` file that is either shipped as +part of the built-in cartridge of commands or a plugin that the user installs. + +The core contains the following: + +- A module loading system for preparing different commands for use +- The core subcommand router + +## How to write plugins + +Create a new file in the script home named after the plugin subcommand, for +example: `scripts/hello.lua`: + +```lua +script.verb = "hello" +script.help = "prints everyone's favorite hello world message" +script.author = "Xe" -- put your github username here +script.version = "1.0" +script.usage = "" + +function(run) + print "Hello, world!" +end +``` + +And then run it using the example shell cli: + +```console +~/go/src/github.com/Xe/eclier:master λ go run ./example/main.go hello +Hello, world! +``` + diff --git a/vendor/github.com/Xe/eclier/builtin.go b/vendor/github.com/Xe/eclier/builtin.go new file mode 100644 index 0000000..3e63ca7 --- /dev/null +++ b/vendor/github.com/Xe/eclier/builtin.go @@ -0,0 +1,113 @@ +package eclier + +import ( + "context" + "flag" + "fmt" +) + +// Constants for built-in commands. +const ( + BuiltinScriptPath = "" + BuiltinAuthor = "" + BuiltinVersion = "" +) + +type pluginCommand struct { + r *Router + fs *flag.FlagSet + + dontShowBuiltin *bool +} + +// Close is a no-op. +func (p *pluginCommand) Close() error { return nil } + +// Init sets up the flags for this command. +func (p *pluginCommand) Init() { + p.fs = flag.NewFlagSet(p.Verb(), flag.ExitOnError) + + p.dontShowBuiltin = p.fs.Bool("no-builtin", false, "if set, don't show built-in commands") +} + +// ScriptPath returns the built-in script path. +func (p *pluginCommand) ScriptPath() string { return BuiltinScriptPath } + +// Verb returns the command verb. +func (p *pluginCommand) Verb() string { return "plugins" } + +// Help returns the command help +func (p *pluginCommand) Help() string { + return `plugin lists all of the loaded commands and their script paths.` +} + +func (p *pluginCommand) Usage() string { + return ` -no-builtin + if set, don't show built-in commands` +} + +func (p *pluginCommand) Author() string { return BuiltinAuthor } + +func (p *pluginCommand) Version() string { return BuiltinVersion } + +// Run executes the command. +func (p *pluginCommand) Run(ctx context.Context, arg []string) error { + p.fs.Parse(arg) + + for _, c := range p.r.cmds { + if c.ScriptPath() == BuiltinScriptPath && *p.dontShowBuiltin { + continue + } + + fmt.Printf("%s\t%s\n", c.Verb(), c.ScriptPath()) + } + + return nil +} + +// NewBuiltinCommand makes it easier to write core commands for eclier. +func NewBuiltinCommand(verb, help, usage string, doer func(context.Context, []string) error) Command { + return &commandFunc{ + verb: verb, + help: help, + usage: usage, + doer: doer, + } +} + +// commandFunc is a simple alias for creating builtin commands. +type commandFunc struct { + verb string + help string + usage string + doer func(context.Context, []string) error +} + +// Close deallocates resources set up by the initialization of the command. +func (c *commandFunc) Close() error { return nil } + +// Init is a no-op. +func (c *commandFunc) Init() {} + +// ScriptPath returns the built-in script path. +func (c *commandFunc) ScriptPath() string { return BuiltinScriptPath } + +// Verb returns the command verb. +func (c *commandFunc) Verb() string { return c.verb } + +// Help returns the command help. +func (c *commandFunc) Help() string { return c.help } + +// Usage returns the command usage. +func (c *commandFunc) Usage() string { return c.usage } + +// Author returns the built-in author. +func (c *commandFunc) Author() string { return BuiltinAuthor } + +// Version returns the built-in version. +func (c *commandFunc) Version() string { return BuiltinVersion } + +// Run runs the command handler. +func (c *commandFunc) Run(ctx context.Context, arg []string) error { + return c.doer(ctx, arg) +} diff --git a/vendor/github.com/Xe/eclier/command.go b/vendor/github.com/Xe/eclier/command.go new file mode 100644 index 0000000..9a20031 --- /dev/null +++ b/vendor/github.com/Xe/eclier/command.go @@ -0,0 +1,18 @@ +package eclier + +import ( + "context" +) + +// Command is an individual subcommand. +type Command interface { + Close() error + Init() + ScriptPath() string + Verb() string + Help() string + Usage() string + Author() string + Version() string + Run(ctx context.Context, arg []string) error +} diff --git a/vendor/github.com/Xe/eclier/config.ld b/vendor/github.com/Xe/eclier/config.ld new file mode 100644 index 0000000..3ccf99c --- /dev/null +++ b/vendor/github.com/Xe/eclier/config.ld @@ -0,0 +1,8 @@ +file = { + "./internal/gluanetrc/netrc.lua", + "./internal/gluaheroku/heroku.lua", +} + +title = "eclier lua libraries" +project = "eclier" +description = "The lua libraries created for eclier demos and common utility." diff --git a/vendor/github.com/Xe/eclier/router.go b/vendor/github.com/Xe/eclier/router.go new file mode 100644 index 0000000..0669dcd --- /dev/null +++ b/vendor/github.com/Xe/eclier/router.go @@ -0,0 +1,140 @@ +package eclier + +import ( + "context" + "fmt" + "log" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/olekukonko/tablewriter" + lua "github.com/yuin/gopher-lua" +) + +// Router is the main subcommand router for eclier. At a high level what this is +// doing is similar to http.ServeMux, but for CLI commands instead of HTTP handlers. +type Router struct { + lock sync.Mutex + cmds map[string]Command + + // configured data + gluaCreationHook func(*lua.LState) + scriptHomes []string + cartridge map[string]string +} + +// NewRouter creates a new instance of Router and sets it up for use. +func NewRouter(opts ...RouterOption) (*Router, error) { + r := &Router{ + cmds: map[string]Command{}, + cartridge: map[string]string{}, + } + + for _, opt := range opts { + opt(r) + } + + // scan r.scriptHome for lua scripts, load them into their own lua states and + // make a wrapper around them for the Command type. + + for _, home := range r.scriptHomes { + err := filepath.Walk(home, func(path string, info os.FileInfo, err error) error { + if err != nil { + log.Printf("error in arg: %v", err) + return err + } + + if strings.HasSuffix(info.Name(), ".lua") { + fname := filepath.Join(home, info.Name()) + fin, err := os.Open(fname) + if err != nil { + return err + } + defer fin.Close() + + c := newGluaCommand(r.gluaCreationHook, fname, fin) + + r.cmds[c.Verb()] = c + } + + return nil + }) + + if err != nil { + return nil, err + } + } + + var helpCommand Command = NewBuiltinCommand("help", "shows help for subcommands", "[subcommand]", func(ctx context.Context, arg []string) error { + if len(arg) == 0 { + table := tablewriter.NewWriter(os.Stdout) + table.SetHeader([]string{"Verb", "Author", "Version", "Help"}) + + for _, cmd := range r.cmds { + table.Append([]string{cmd.Verb(), cmd.Author(), cmd.Version(), cmd.Help()}) + } + + table.Render() + return nil + } + + cmd, ok := r.cmds[arg[0]] + if !ok { + fmt.Printf("can't find help for %s", arg[0]) + os.Exit(2) + } + + fmt.Printf("Verb: %s\nAuthor: %s\nVersion: %s\nHelp: %s\nUsage: %s %s\n", cmd.Verb(), cmd.Author(), cmd.Version(), cmd.Help(), cmd.Verb(), cmd.Usage()) + return nil + }) + + r.cmds["plugins"] = &pluginCommand{r: r} + r.cmds["help"] = helpCommand + + return r, nil +} + +// Run executes a single command given in slot 0 of the argument array. +func (r *Router) Run(ctx context.Context, arg []string) error { + r.lock.Lock() + defer r.lock.Unlock() + + if len(arg) == 0 { + fmt.Printf("please specify a subcommand, such as `%s help`\n", filepath.Base(os.Args[0])) + os.Exit(2) + } + + cmd := arg[0] + arg = arg[1:] + + ci, ok := r.cmds[cmd] + if !ok { + fmt.Printf("No such command %s could be run.\n", cmd) + os.Exit(2) + } + + ci.Init() + return ci.Run(ctx, arg) +} + +// RouterOption is a functional option for Router. +type RouterOption func(*Router) + +// WithScriptHome sets the router's script home to the given directory. This is +// where lua files will be walked and parsed. +func WithScriptHome(dir string) RouterOption { + return func(r *Router) { + r.scriptHomes = append(r.scriptHomes, dir) + } +} + +// WithGluaCreationHook adds a custom bit of code that runs every time a new +// gopher-lua LState is created. This allows users of this library to register +// custom libraries to the pile of states. +func WithGluaCreationHook(hook func(*lua.LState)) RouterOption { + return func(r *Router) { + r.gluaCreationHook = hook + } +} diff --git a/vendor/github.com/Xe/eclier/script.go b/vendor/github.com/Xe/eclier/script.go new file mode 100644 index 0000000..d4b88b2 --- /dev/null +++ b/vendor/github.com/Xe/eclier/script.go @@ -0,0 +1,92 @@ +package eclier + +import ( + "context" + "errors" + "io" + "io/ioutil" + "sync" + + lua "github.com/yuin/gopher-lua" + luar "layeh.com/gopher-luar" +) + +type Script struct { + Verb string + Help string + Usage string + Author string + Version string +} + +type gluaCommand struct { + sync.Mutex + script *Script + L *lua.LState + + filename string +} + +func newGluaCommand(preload func(*lua.LState), filename string, r io.Reader) Command { + L := lua.NewState() + preload(L) + + script := &Script{} + L.SetGlobal("script", luar.New(L, script)) + + data, err := ioutil.ReadAll(r) + if err != nil { + panic(err) + } + + err = L.DoString(string(data)) + if err != nil { + panic(err) + } + + return &gluaCommand{script: script, L: L, filename: filename} +} + +func (g *gluaCommand) Close() error { + g.L.Close() + return nil +} + +func (g *gluaCommand) Init() {} + +func (g *gluaCommand) ScriptPath() string { return g.filename } + +func (g *gluaCommand) Verb() string { return g.script.Verb } + +func (g *gluaCommand) Help() string { return g.script.Help } + +func (g *gluaCommand) Usage() string { return g.script.Usage } + +func (g *gluaCommand) Author() string { return g.script.Author } + +func (g *gluaCommand) Version() string { return g.script.Version } + +func (g *gluaCommand) Run(ctx context.Context, arg []string) error { + runf := g.L.GetGlobal("run") + + if runf.Type() == lua.LTNil { + return errors.New("no global function run in this script") + } + + tab := g.L.NewTable() + + for _, a := range arg { + tab.Append(lua.LString(a)) + } + + err := g.L.CallByParam(lua.P{ + Fn: runf, + NRet: 0, + Protect: false, + }, tab) + if err != nil { + panic(err) + } + + return nil +} diff --git a/vendor/github.com/Xe/x/tools/glue/CHEATSHEET.md b/vendor/github.com/Xe/x/tools/glue/CHEATSHEET.md new file mode 100644 index 0000000..0536567 --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/CHEATSHEET.md @@ -0,0 +1,661 @@ +## `json` + +```lua +local json = require "json" +``` + +Json encoder/decoder + +The following functions are exposed by the library: + + decode(string): Decodes a JSON string. Returns nil and an error string if + the string could not be decoded. + encode(value): Encodes a value into a JSON string. Returns nil and an error + string if the value could not be encoded. + +## `xmlpath` + +```lua +local xmlpath = require "xmlpath" +``` + +XMLPath style iteration + + xml ="x1x2x3" + local xmlpath = require("xmlpath") + node,err = xmlpath.loadxml(xml) + path,err = xmlpath.compile("//book") + + it = path:iter(node) + for k,v in pairs(it) do + print(k,v:string()) + end + +## `http` + +```lua +local http = require("http") +``` + +HTTP client library + +### API + +- [`http.delete(url [, options])`](#httpdeleteurl--options) +- [`http.get(url [, options])`](#httpgeturl--options) +- [`http.head(url [, options])`](#httpheadurl--options) +- [`http.patch(url [, options])`](#httppatchurl--options) +- [`http.post(url [, options])`](#httpposturl--options) +- [`http.put(url [, options])`](#httpputurl--options) +- [`http.request(method, url [, options])`](#httprequestmethod-url--options) +- [`http.request_batch(requests)`](#httprequest_batchrequests) +- [`http.response`](#httpresponse) + +#### http.delete(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.get(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.head(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.patch(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| body | String | Request body. | +| form | String | Deprecated. URL encoded request body. This will also set the `Content-Type` header to `application/x-www-form-urlencoded` | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.post(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| body | String | Request body. | +| form | String | Deprecated. URL encoded request body. This will also set the `Content-Type` header to `application/x-www-form-urlencoded` | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.put(url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| body | String | Request body. | +| form | String | Deprecated. URL encoded request body. This will also set the `Content-Type` header to `application/x-www-form-urlencoded` | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.request(method, url [, options]) + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| method | String | The HTTP request method | +| url | String | URL of the resource to load | +| options | Table | Additional options | + +**Options** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| query | String | URL encoded query params | +| cookies | Table | Additional cookies to send with the request | +| body | String | Request body. | +| form | String | Deprecated. URL encoded request body. This will also set the `Content-Type` header to `application/x-www-form-urlencoded` | +| headers | Table | Additional headers to send with the request | + +**Returns** + +[http.response](#httpresponse) or (nil, error message) + +#### http.request_batch(requests) + +**Attributes** + +| Name | Type | Description | +| -------- | ----- | ----------- | +| requests | Table | A table of requests to send. Each request item is by itself a table containing [http.request](#httprequestmethod-url--options) parameters for the request | + +**Returns** + +[[http.response](#httpresponse)] or ([[http.response](#httpresponse)], [error message]) + +#### http.response + +The `http.response` table contains information about a completed HTTP request. + +**Attributes** + +| Name | Type | Description | +| ----------- | ------ | ----------- | +| body | String | The HTTP response body | +| body_size | Number | The size of the HTTP reponse body in bytes | +| headers | Table | The HTTP response headers | +| cookies | Table | The cookies sent by the server in the HTTP response | +| status_code | Number | The HTTP response status code | +| url | String | The final URL the request ended pointing to after redirects | + +## `url` + +```lua +local url = require "url" +``` + +URL parsing library + +### API + +- [`url.parse(url)`](#urlparseurl) +- [`url.build(options)`](#urlbuildoptions) +- [`url.build_query_string(query_params)`](#urlbuild_query_stringquery_params) +- [`url.resolve(from, to)`](#urlresolvefrom-to) + +#### url.parse(url) + +Parse URL into a table of key/value components. + +**Attributes** + +| Name | Type | Description | +| ------- | ------ | ----------- | +| url | String | URL to parsed | + +**Returns** + +Table with parsed URL or (nil, error message) + +| Name | Type | Description | +| -------- | ------ | ----------- | +| scheme | String | Scheme of the URL | +| username | String | Username | +| password | String | Password | +| host | String | Host and port of the URL | +| path | String | Path | +| query | String | Query string | +| fragment | String | Fragment | + +#### url.build(options) + +Assemble a URL string from a table of URL components. + +**Attributes** + +| Name | Type | Description | +| ------- | ----- | ----------- | +| options | Table | Table with URL components, see [`url.parse`](#urlparseurl) for list of valid components | + +**Returns** + +String + +#### url.build_query_string(query_params) + +Assemble table of query string parameters into a string. + +**Attributes** + +| Name | Type | Description | +| ------------ | ----- | ----------- | +| query_params | Table | Table with query parameters | + +**Returns** + +String + +#### url.resolve(from, to) + +Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag. + +| Name | Type | Description | +| ---- | ------ | ----------- | +| from | String | base URL | +| to | String | href URL | + +**Returns** + +String or (nil, error message) + +## `env` + +```lua +local env = require "env" +``` + +Environment manipulation + +### API + +#### `env.set(key, value)` + +Same `os.setenv` + +#### `env.get(key)` + +Same `os.getenv` + +#### `env.loadfile(file)` + +Loads environment variables from a file. The file is as the following: + +``` +AAA=BBB +CCC=DDD +``` + +If this function fails, it returns `nil`, plus a string describing the error. + +## `fs` + +```lua +local fs = require "fs" +``` + +Filesystem manipulation + +### API + +#### `fs.exists(file)` + +Returns true if the file exists. + +#### `fs.read(file)` + +Reads file content and return it. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.write(file, content, [mode])` + +Writes content to the file. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.mkdir(path, [mode, recursive])` + +Create directory. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.remove(path, [recursive])` + +Remove path. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.symlink(target, link)` + +Create symbolic link. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.dirname(path)` + +Returns all but the last element of path. + +#### `fs.basename(path)` + +Returns the last element of path. + +#### `fs.realpath(path)` + +Returns the real path of a given path in the os. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.getcwd()` + +Returns the current working directory. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.chdir(path)` + +Changes the current working directory. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.file()` + +Returns the script file path. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.dir()` + +Returns the directory path that is parent of the script file. If this function fails, it returns `nil`, plus a string describing the error. + +#### `fs.glob(pattern, function)` + +Run the callback function with the files matching pattern. See below example: + +```lua +local fs = require("fs") +local ret, err = fs.glob("/tmp/*", function(file) + print(file.path) + print(file.realpath) +end) +``` + +## `markdown` + +```lua +local markdown = require "markdown" +``` + +Markdown -> HTML for string and file + +### API + +#### `markdown.dostring(text)` + +Returns HTML string generated from the markdown text. + +#### `markdown.dofile(file)` + +Returns HTML string generated from the markdown text file. If this function fails, it returns `nil`, plus a string describing the error. + +## `question` + +```lua +local question = require "question" +``` + +Prompt library + +### API + +* `question.ask(text)` +* `question.secret(text)` + +## `ssh` + +```lua +local ssh = require "ssh" +``` + +SSH client library + +https://github.com/kohkimakimoto/gluassh/blob/master/gluassh_test.go + +## `template` + +```lua +local template = require "template" +``` + +Go text templates + +### API + +#### `template.dostring(text, table)` + +Returns string generated by text template with the table values. If this function fails, it returns `nil`, plus a string describing the error. + +#### `template.dofile(file, table)` + +Returns string generated by file template with the table values. If this function fails, it returns `nil`, plus a string describing the error. + +## `yaml` + +```lua +local yaml = require "yaml" +``` + +Yaml -> table parser + +### API + +#### `yaml.parse(string)` + +Parses yaml formatted string and returns a table. If this function fails, it returns `nil`, plus a string describing the error. + +## `flag` + +```lua +local flag = require "flag" +``` + +Command line flag parsing. + +See the tests here: https://github.com/otm/gluaflag + +```lua +local flag = require "flag" + +fs = flag.new() + +fs:string("name", "foo", "String help string") +fs:intArg("title", 1, "Title") +fs:numberArg("title", 1, "Title") + +flags = fs:parse(arg) -- arg is the remaining command line arguments +assert(flags.title == 2, "expected title to be 2") +assert(flags.title == 2.32, "expected title to be 2.32") +``` + +## `sh` + +```lua +local sh = require "sh" +``` + +gluash is a interface to call any program as it were a function. Programs are executed asynchronously to enable streaming of data in pipes. + +In all discussions bellow the imported module will be referred to as `sh`. + +Commands are called just like functions, executed on the sh module. + +```lua +sh.ls("/") +``` + +For commands that have exotic names, names that are reserved words, or to execute absolute or relative paths call the sh module directly. + +```lua +sh("/bin/ls", "/") +``` + +#### Multiple Arguments +Commands with multiple arguments have to be invoked with a separate string for each argument. + +```lua +-- this works +sh.ls("-la", "/") + +-- this does not work +sh.ls("-la /") +``` + +#### Piping +Piping in sh is done almost like piping in the shell. Just call next command as a method on the previous command. + +```lua +sh.du("-sb"):sort("-rn"):print() +``` + +If the command has a exotic name, or a reserved word, call the command through `cmd(path, ...args)`. The first argument in `cmd` is the path. + +```lua +sh.du("-sb"):cmd("sort", "-rn"):print() +``` + +### Waiting for Processes +All commands are executed by default in the background, so one have to explicitly wait for a process to finish. There are several ways to wait for the command to finish. + +* `print()` - write stdout and stderr to stdout. +* `ok()` - aborts execution if the command's exit code is not zero +* `success()` - returns true of the commands exit code is zero +* `exitcode()` - returns the exit code of the command + +### Abort by Default +It is possible to set the module to abort on errors without checking. It can be practical in some occasions, however performance will be degraded. When global exit code checks are done the commands are run in series, even in pipes, and output is saved in memory buffers. + +To enable global exit code settings call the sh module with an table with the key `abort` set to true. + +```lua +sh{abort=true} +``` + +To read current settings in the module call the module with an empty table. +```lua +configuration = sh{} +print("abort:", configuration.abort) +``` + +### Analyzing Output +There are several options to analyze the output of a command. + +#### lines() +An iterator is accessible by calling the method `lines()` on the command. + +```lua +for line in sh.cat("/etc/hosts"):lines() do + print(line) +end +``` + +#### stdout([filename]), stderr([filename]), combinedOutput([filename]) +`stdout()`, `stderr()`, and `combinedOutput()` all returns the output of the command as a string. An optional `filename` can be given to the method, in that case the output is also written to the file. The file will be truncated. + +```lua +-- print output of command +output = sh.echo("hello world"):combinedOutput("/tmp/output") +print(output) +``` + +In the example above will print `hello world` and it will write it to `/tmp/output` + +### Glob Expansion +There is no glob expansion done on arguments, however there is a glob functionality in sh. + +```lua +sh.ls(sh.glob("*.go")) +``` + +## `re` + +```lua +local re = require "re" +``` + +Regular Expressions + +### API + +re.find , re.gsub, re.match, re.gmatch are available. These functions have the same API as Lua pattern match. +gluare uses the Go regexp package, so you can use regular expressions that are supported in the Go regexp package. + +In addition, the following functions are defined: +``` +gluare.quote(s string) -> string +Arguments: + +s string: a string value to escape meta characters + +Returns: + +string: escaped string +gluare.quote returns a string that quotes all regular expression metacharacters inside the given text. +``` + +## `simplebox` + +```lua +local simplebox = require "simplebox" +``` + +Simple encryption + +### API + +#### Create a new instance of simplebox with a newly generated key + +```lua +local simplebox = require "simplebox" +local key = simplebox.genkey() +print("key is: " .. key) +local sb = simplebox.new() + + +``` diff --git a/vendor/github.com/Xe/x/tools/glue/Dockerfile b/vendor/github.com/Xe/x/tools/glue/Dockerfile new file mode 100644 index 0000000..23ddabe --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/Dockerfile @@ -0,0 +1,4 @@ +FROM busybox + +ADD glue /glue +CMD /glue diff --git a/vendor/github.com/Xe/x/tools/glue/Gopkg.lock b/vendor/github.com/Xe/x/tools/glue/Gopkg.lock new file mode 100644 index 0000000..966fa45 --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/Gopkg.lock @@ -0,0 +1,181 @@ +memo = "" + +[[projects]] + branch = "master" + name = "github.com/ThomasRooney/gexpect" + packages = ["."] + revision = "5482f03509440585d13d8f648989e05903001842" + +[[projects]] + branch = "master" + name = "github.com/ailncode/gluaxmlpath" + packages = ["."] + revision = "6ce478ecb4a60c4fc8929838e0b21b7fb7ca7440" + +[[projects]] + branch = "master" + name = "github.com/brandur/simplebox" + packages = ["."] + revision = "84e9865bb03ad38c464043bf5382ce8c68ca5f0c" + +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluahttp" + packages = ["."] + revision = "b4bfe0c50fea948dcbf3966e120996d6607bbd89" + +[[projects]] + branch = "master" + name = "github.com/cjoudrey/gluaurl" + packages = ["."] + revision = "31cbb9bef199454415879f2e6d609d1136d60cad" + +[[projects]] + branch = "master" + name = "github.com/howeyc/gopass" + packages = ["."] + revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + +[[projects]] + branch = "master" + name = "github.com/kballard/go-shellquote" + packages = ["."] + revision = "d8ec1a69a250a17bb0e419c386eac1f3711dc142" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaenv" + packages = ["."] + revision = "2888db6bbe38923d59c42e443895875cc8ce0820" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluafs" + packages = ["."] + revision = "01391ed2d7ab89dc80157605b073403f960aa223" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluaquestion" + packages = ["."] + revision = "311437c29ba54d027ad2af383661725ae2bfdcdc" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluassh" + packages = ["."] + revision = "2a7bd48d7568de8230c87ac1ef4a4c481e45814d" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluatemplate" + packages = ["."] + revision = "d9e2c9d6b00f069a9da377a9ac529c827c1c7d71" + +[[projects]] + branch = "master" + name = "github.com/kohkimakimoto/gluayaml" + packages = ["."] + revision = "6fe413d49d73d785510ecf1529991ab0573e96c7" + +[[projects]] + branch = "master" + name = "github.com/kr/fs" + packages = ["."] + revision = "2788f0dbd16903de03cb8186e5c7d97b69ad387b" + +[[projects]] + branch = "master" + name = "github.com/kr/pty" + packages = ["."] + revision = "ce7fa45920dc37a92de8377972e52bc55ffa8d57" + +[[projects]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "cc8532a8e9a55ea36402aa21efdf403a60d34096" + +[[projects]] + branch = "master" + name = "github.com/otm/gluaflag" + packages = ["."] + revision = "078088de689148194436293886e8e39809167332" + +[[projects]] + branch = "master" + name = "github.com/otm/gluash" + packages = ["."] + revision = "e145c563986f0b91f740a758a84bca46c163aec7" + +[[projects]] + branch = "master" + name = "github.com/pkg/sftp" + packages = ["."] + revision = "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" + +[[projects]] + branch = "master" + name = "github.com/yookoala/realpath" + packages = ["."] + revision = "c416d99ab5ed256fa30c1f3bab73152deb59bb69" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluamapper" + packages = ["."] + revision = "d836955830e75240d46ce9f0e6d148d94f2e1d3a" + +[[projects]] + branch = "master" + name = "github.com/yuin/gluare" + packages = ["."] + revision = "8e2742cd1bf2b904720ac66eca3c2091b2ea0720" + +[[projects]] + branch = "master" + name = "github.com/yuin/gopher-lua" + packages = [".","parse"] + revision = "33ebc07735566cd0c3c4b69e2839d522cc389852" + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["nacl/secretbox","ssh/terminal","ssh","ssh/agent"] + revision = "dd85ac7e6a88fc6ca420478e934de5f1a42dd3c6" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["html"] + revision = "66aacef3dd8a676686c7ae3716979581e8b03c47" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix"] + revision = "9ccfe848b9db8435a24c424abbc07a921adf1df5" + +[[projects]] + branch = "v2" + name = "gopkg.in/xmlpath.v2" + packages = ["."] + revision = "860cbeca3ebcc600db0b213c0e83ad6ce91f5739" + +[[projects]] + branch = "master" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b" + +[[projects]] + branch = "master" + name = "layeh.com/gopher-json" + packages = ["."] + revision = "c128cc74278be889c4381681712931976fe0d88b" + +[[projects]] + branch = "master" + name = "layeh.com/gopher-luar" + packages = ["."] + revision = "80196fe2abc5682963fc7a5261f5a5d77509938b" diff --git a/vendor/github.com/Xe/x/tools/glue/Gopkg.toml b/vendor/github.com/Xe/x/tools/glue/Gopkg.toml new file mode 100644 index 0000000..243127a --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/Gopkg.toml @@ -0,0 +1,68 @@ + +[[dependencies]] + branch = "master" + name = "github.com/ThomasRooney/gexpect" + +[[dependencies]] + branch = "master" + name = "github.com/ailncode/gluaxmlpath" + +[[dependencies]] + branch = "master" + name = "github.com/brandur/simplebox" + +[[dependencies]] + branch = "master" + name = "github.com/cjoudrey/gluahttp" + +[[dependencies]] + branch = "master" + name = "github.com/cjoudrey/gluaurl" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluaenv" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluafs" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluaquestion" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluassh" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluatemplate" + +[[dependencies]] + branch = "master" + name = "github.com/kohkimakimoto/gluayaml" + +[[dependencies]] + branch = "master" + name = "github.com/otm/gluaflag" + +[[dependencies]] + branch = "master" + name = "github.com/otm/gluash" + +[[dependencies]] + branch = "master" + name = "github.com/yuin/gluare" + +[[dependencies]] + branch = "master" + name = "github.com/yuin/gopher-lua" + +[[dependencies]] + branch = "master" + name = "layeh.com/gopher-json" + +[[dependencies]] + branch = "master" + name = "layeh.com/gopher-luar" diff --git a/vendor/github.com/Xe/x/tools/glue/README.md b/vendor/github.com/Xe/x/tools/glue/README.md new file mode 100644 index 0000000..dd33582 --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/README.md @@ -0,0 +1,18 @@ +glue +==== + +Basically gopher-lua's cmd/glua with the following modules imported: +- https://godoc.org/layeh.com/gopher-json +- https://github.com/ailncode/gluaxmlpath +- https://github.com/cjoudrey/gluahttp +- https://github.com/cjoudrey/gluaurl +- https://github.com/kohkimakimoto/gluaenv +- https://github.com/kohkimakimoto/gluafs +- https://github.com/kohkimakimoto/gluamarkdown +- https://github.com/kohkimakimoto/gluaquestion +- https://github.com/kohkimakimoto/gluassh +- https://github.com/kohkimakimoto/gluatemplate +- https://github.com/kohkimakimoto/gluayaml +- https://github.com/otm/gluaflag +- https://github.com/otm/gluash +- https://github.com/yuin/gluare diff --git a/vendor/github.com/Xe/x/tools/glue/box.rb b/vendor/github.com/Xe/x/tools/glue/box.rb new file mode 100644 index 0000000..3b4d18e --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/box.rb @@ -0,0 +1,6 @@ +from "alpine:edge" + +copy "glue", "/glue" +cmd "/glue" +flatten +tag "xena/glue" diff --git a/vendor/github.com/Xe/x/tools/glue/build.lua b/vendor/github.com/Xe/x/tools/glue/build.lua new file mode 100644 index 0000000..31fe844 --- /dev/null +++ b/vendor/github.com/Xe/x/tools/glue/build.lua @@ -0,0 +1,20 @@ +-- expects glue, $ go get -u github.com/Xe/tools/glue +local sh = require "sh" +sh { abort = true } + +if os.getenv("CGO_ENABLED") ~= "0" then + error("CGO_ENABLED must be set to 1") +end + +print "building glue..." +sh.go("build"):print() +sh.upx("--ultra-brute", "glue"):print() +sh.box("box.rb"):print() + +print "releasing to docker hub" +sh.docker("push", "xena/glue"):print() + +print "moving glue binary to $GOPATH/bin" +sh.mv("glue", (os.getenv("GOPATH") .. "/bin/glue")) + +print "build/release complete" diff --git a/vendor/github.com/Xe/x/tools/glue/glue b/vendor/github.com/Xe/x/tools/glue/glue new file mode 100755 index 0000000000000000000000000000000000000000..f2112bb1576887e3de6dbab0b927d5d46c4fa6c3 GIT binary patch literal 13205315 zcmeFa3wRXO`9HoPEG|Nvpdvv*7Q1RtYZC!Y6zWETPGBPeQ6r*6MT#wIlmt*w6E}g3 z!zkXh-e{|>T5Ywp!D~$j5-uvYwt}>ZR%O=pf~Z_A`F%d`IkP((g4*Bj|9gJV|9QT7 zp6tw=>wDhYdEfV(Idk*q*qPn3vI5>;x4=&We5!kOv?N7!Ms+uRgG)3}6gUvSkwDKt z4?K65G?gDkI{&j&k|`-$oseYMKevv<{SvYxcDQ0FhSR5^X^^+d5edslCKtVi4gqH)O& zMB6g2&nw7w?vYXfuO89$UG)kyBD`xzwHi18S8uF3smqI3-n)+fsAj5$pv&@|6TNzM zeY;;CIIeT<{-3>i`!Dgsaya}HZdoNa%HI_JZl0y-q*6V!>Zd?p5-R)a*UeM(tedCm z)oFh9Drh!HwR09SSU*)P#Sf}})%-lKs$9bvPl3P~R3@Fg`c?gYEhVb@T`E_vb}wDe z!<(00(W(9%U4M?Q{{#gKf2_|wI@h0p`g=P%uJ-y5AEEjWAEElMU}gLrh<|^5NyN_- z)bH@suhaGGbp1+Q(1YLW$GZ+heafNtyjj=Ztn2@+Q+*G9kGFfFz8<13sV*%8E|r@b zknjKN^cXlp*Z2C59{Fo29z9akzrf4TjdZSmDiS>0vdE&as=p|#>W4L;#2^1W_&xfK zLmJ!kx@n21`YjPve=-@&_ZRlv^Y#M#`|F2isQTdx~_3c-}URAkfJ_Q1WXps6QMZ=U{j7xb>uXVu&BvQ+&ChabRZQh)xkOne;w{RnlIuUtR4G86y)vMlfp{{3m=-epQ4Fz%82yGB_MT@4diI{zLg)HFMg}SD)%WZ^&mJuDD(Y({HUoht2>eH=?Y>AK_^h zI`{ZDPZzGkH6?pGjTiT^7J0hx9j}HwX5dPt{LkDg zIQgW@hfY0d*hxc&UN-cy;f0r-GVPRt!eJ*DUpnlhONL)|+3=xLhZkIO>B%SmWX2Vj zo;>U)Gp7D{#uZo9&iV12qLY7o@~{(UUVY+8fpgC>tvzP^(~xQZ#I(L}=fZz78(V4& z(;5{r<4Z#qUesm`iX!c^+D~7jHg+#Sk>qA$P#qouCFhn*Ots-Y@<=dHX1(s7i6ZUH z4w%;K_NWusfju_Qw9m=4XNF4cvH3B3RM@mnt8kA;QTxh3iM7G?X;1g&4wIgi>b9lfv3Z@_UR_%j05lPS$p{?xAP1M4pP z2R_c|)WEb1d_?wNzgX4p_MP=Vd~kp8AE>Igp}=>*|CrPlHX#u|nyHBBs9Gdqt_<57 zZw)dOy;tg@m!^w$LGMy&Ux^SpPz>olg1SJ>v8rkp1kR6 zBBr&aV-2`A_d=gMfIsR#-2lQgw3t>+B;T|qMhZ+T7AcBZrIBb1cV^8g#*orTg)t-+ zsWOI4j8q##9*WeVjxpr1$U?b39a$vT=OfR`^_55quBP=L(-}FrvMTUW4j%tXbz<5B zLnp>@>E&*|7D#g%B3mW-G}D$^0?5nRm@ zEj9lJY_F)yzvJRALS|tL@z=*}?;b&SfMrX^deiP6(Rf^lhMr^LsQf+q&6iNiq8G`YGUGxj=neULRsrQ_n)xg z(P5~t1@oI9pVW{4d5vBK(P3J{$D)QijrAK_OslQtY*yb67)+;z?D?L%OCA~`pSl9#9!m~7{~@xf%k~VXHf1m)UL1`a)EWyAWL^4^r|GZ_A4BDXAG$W}lzujOs9r z-z=G#wBAKoqdhueK!bPWl(tHb{1}mIkllOt9vAQK>R;ZD_N88{2~irTc5ipNad{BE!M^t2&|Pf z*KaQCiJB-`yTQDyAyS0&GHA+BspTe*DBNx~t}_~M21Ep)aGkpm6d|P!20e)+pU}ED z&H#4?k{_k$;Zq#nn%4T5^(H8o&shTFq+YhRq;w46R62J`Dz{N`-M4-g3?x=S*(l`USEDiY zoZ!@vdIG)BF{ne%vSX3Ft)}r@dBC_ElfSCjWqB62TDKalqXSv3K%_@3v@7i~fBxtI zTky3nDTyQy=<7d&zOydem$n6h3BU&2kz^i!xf5y>PT}>$XhQXd)+M5Tj_{Ql5FVpx z#JbN-3kH(6`}*c>X8-4Q)xQlQV)_#vvM1sGV6%8lO>SXJQ%3s&r+|n_Jl8!3h!!46 zZg5Xw&-X~rDabU=GW#FZRsZA!U{v!C$4^D%PMGP9ztcEZT#nv;r^orf)xOMf+pgVD z`&axQx8I%c-?_i`d;TA{PjPim+F$!mPW?Z{4;7rd?wbAJr)>Z2pV<|Cp&CW=Q3lDy zDO$rG+fNrCUxpz(wh#Xr^R@u8F8cV&$PF0huP{z*t?gmhccGARVoPne8zzH2x-0c+ zM+@wxuaRS|Y~3}e{{1g*YkFes2ZbxGg_5|2QdVRZE;nBs{M++>{;R8M17=~X`NC_L z-Tv|~zL*d&jXy4@fcgYZ1R^yU5nLhs1JzxR%6uW!a;h(1^Q{zbU-Rz!mqOWn>sNN2 z<=L2*=o%l}6h5YDgxrl%xc`5F5nBNQ!Y*c7V1~|*$=UUDyTS5Luq9?DQ>sArlJTNtv*%cU^_51@kDz zxP#27lqe^-_@xTP1aSJ*G~+)1FOMY^L7QDQd1 z`C!e7%s<>L-Uwr#^P4>;WEQu2&=j^LcX0la@|>P{lZ%@Wbh2@GtMOpV;MS%L(~`wi zd8%(IkDCyc`2H(+?MJ(_ZLgCGKIIuFuJS4xCoVDWUcye73|{N+R_ddhXo!7zomTKE z4?U+EzZW|^rhGOBC7QA?qo!wHZq)XrNu`nxrBZ;ffmXtlaOlIy z2+i%iAt**>IJw?kcOf+5!p#1@-=00(v?qWr8@|(?MSpG^B-^uRf5xtqJ^O#HKSme4 z{&r02x<6xH|NZD2__@CTVxi>6!|_~KbEVN7?e|2u=6J?6p;UoN+)Pg^b#|2tIjQz* zajz)I^xZ`vh1FTUnrPqc_O+6ENP+k*I-u$Fz4;}-rr?4+m9fnIVfTcwsup-dCS*~_ zG^?CopTF#*DGu7uwWgSLhiHn|E`X+3sWpX&Po}?P%;R>kuJkqVceRq*|ED$d&i z@U$1d1BY(eesTEbpZCGx%71i?!;=;Y4sWOg4wt2Hn8EMHysH)d!fBhzXbz71mxb`Y z(eSRYaB!@CT&*5Y)sHQBTo(KZp0e!VJ)0R3uRRZB-u?L`FhuZ2cg#l&Cit~_I$Aw_ zuAWX&PgNgSC<#_(grW}3$+XWK_vks@pdmf$4DI}FA(|7m4?ZA`a5BI8fGqa0Je}8= z$~#Bpy^+qlCY5&z@)9>NDB}cg0OTnk!X6O3aTm=d5Wx#rBECEegF2hHc5qxerBtPi zPN$rzQcg>!6iA9U7&mbqC{m*-0_KI}%z#3KLWQW6a@7JTf%L$}St-_#dp^g4ED@@( zIbTFI7g{y1?K|p2QS18sGV5b%D`23ckDAP&!Pzxi!~FC^;A!un;L)HGFfp#)`<#|= zx-rgo68&Rv2;&QL5CBV!FPegHwr)>nc}5&dqYxCE8$`>ZO`+msP6-3ve88K*&$EVf z0^bP^ewu=&dF%*M_0)SsE-pJ4I=MBozAW-}sf>u|OFAI*sEx<<{O``~?riw;dly`G@XW9*sI<$w| z3fwXbj@ya2ZBn_^&dkVQ2jz6w~G4)a|)A(nL?Av95^n#jei z?&DD0>OS&ttNR$>ns=(E!zSX<3sEiIw0putFmHQGon+!~Rt@kE@Y41{@b12XyP6{4 zW6@xR4`Fk$(=oqk5`#bJl~|Z~uA9K_Q)UB7psX57w_`mP!ik3y za6JK-A?gSxoW!M7ZD2$liEv_Ubfs|27g8qAEPiJu=A$lpi?O#DIQ&PdgFLT;_|C&> z@9nZm*8sNNmIg2}iMowOYw?nqP1LFdf(6_Zc{fq-#`JC~g%z2EZLy@6n!*9U zAPEAf!LHyMEC_yR#BHkp5k^VB-!;q;3QQSh;!s61HM6T<&=1s}L7Bl1Xmwm}TqYy& zi~&JZ@XBr0Y0(e{_fo)+7)Ju2!F{?vW4SXBUb9S_w*D)WjA5Pa<3KJ}~58ADWC(Kp}=W1F{AYsLnuP6$fcFTgy?b zVTI9f2#d?OnF2s^{wkZjTp3Xhe^hCCIJ=CafQ~jUyR}sbLx39 zi@!2%pUfMp``aZz1_Wl_EAl*<>{5WPb zSO^K2!HYg3n6%-30V50GHEt5{=&@itw(Nyy#0Y$z~1g*+F7S5X-3A;b?zSe`x&fvFUxb=skv?FUegl;FfP+CD@L0fYlQuc3_|hmN zxR|R@3F84^fM*&?=3*vrg6|x$PvvX<40{fvz821vzGVSLh z`SMT$aXn4Ot)Nl@K?|t^`;~f{HuY!LM$=klTHNzs+LciR7_V(IZ9Sa&r5q*5XGYEV zF0jhaWHmSnrOyF^9~e~3RiteYsD-*lbAtk|6#N04DB!5#@SuPLqqvU%%boioh8j*r zH;KdWQ@867qhUN?sM~d@(KtwY*Zs&A2%{k)LybXk(Z+?X#8*zB6+;bKFN$`zyTeuX zV8h(-A~xP>k*K-I1C-){xn0Dd@_Pmc^!Gu*{f=rmmE4P63=R9;O0Q_bg!Ybci!zCa zkC5kWMtqFWX?W>0e=s#qUWq_2Plvh@~!MMec zhhNrV+v%ZFoq0i-p3@c;?83?^UQ-r=Fb-b9cDCqMck(v!yM)rKBc}E8(u{zKjQyLOAECqIpk5bd<5yCV@P?J z7@3~DTr0JSG&g<1;3*P&f#$Lpx$Gg$Wt_2!WEW1ldA66I7J-UP5qL;rVrH&c{N>zR z6I-Qr=iz5Q`*2yC9zJmCW4klJj2_!X{iFXg3H%bD@BytDrJ&jnym!&7DP5n=0g!z zu6OIbt_$=t^wC=E23nv{mZicwT07mX6u?9(fc`H>>z9jrqtxo@-Yiq-J@k+A1xc( z&{V=AuJ+NOneF?DTHLYw@6sYK1&IF|}H2--$=PcCuwr}U@ z?ESc8rMRgfQYV0U45cFmPB4_}P8X4uyXhXm3X~{L-e4N+2U0!ynxz?*9)j932#B70 z*c*k8+DNm%Z&3s3-0UIyG`px%vrq8Z2~P4gD@CN)i7j0>`^t5lk??G%X2ryGg4w=i zrHC~9ANYh_q5X1c*1dRo=hgv61}>KK*$F=WP#PCfL|T7Tx84~S2PmMO;IW5xCTj0n zG`)N8ll5hNXJFQJ0)}QSfXVX#BSi$5gZBf>^$2}qg}N;YtLXFXDMNi9d)+BT$WiPg zaaHR-UC7>GA2ms@`f3NyxRf(o&M3LuE&EHcF%wH>#{5euYQ?Lf#+}Qe4cm=IzFUk? z+4Sey7v} zQFh%oBG6Rx7^Xf%@7}uhLDO!kBP7Ld&Ac6paZ^WR)y|h73+(C;GSuP)Z`}L$5Mr%6 z3S{zw{h{vGZD+lWt8bR44eDufaL0 z!C&bHJ4=60Y0&L9Rpf5$NXXs2nDUjt5m#7&g|*s~Y+<$1FKnzQ=yuNO&rwiTaH$c? zw02J=B&{KnLbCqG38oE8FH=ZbDFMUNLQ*>jCH5~MHP6cI-lhfQEk1$$SAgPof_tZt zd$BM0maD}i9eA-kZ#3dl)bmvrlF5fp;l)~Q4q0oqCcxwyXO1@Q-fwXz4a246crf|f z#x41HfTKFKV?Is7^y&!Mi+{t|&qDYVCU` z>wBFEobtt=7Ac{zNnrj2nex<7!+f2EK9O}_I;(aX-k<_cR3*y@gyssH1GRy;i9X9n zR*TV2z&&5L7B)MiGRndTo(zIzy+cnMDtHd|JkNcGqtS8m@4QpI#9!ba`e+8m0Q^@G zVbv;v_)w&dy~4Ge_d2IJc#enz$Rt(#4`bewNHdzN`$e}eiy95pG7%0po}s?jZZw=P z&p$QoSt07(IhX@5yS77dv~n77R-oyaZIs)0u#NAeQDpX+>Fk;(%Ix|@qPjrln6;*S$OmJc-rXn>WkZ&hIo$^+vJ