From 2a1c947808a9421594274ccd25fb85fc8ff412e5 Mon Sep 17 00:00:00 2001 From: 18650180552 Date: Mon, 28 Jan 2019 11:19:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0vendor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- const/const.go | 21 + controller/hanlder.go | 23 +- vendor/cloud.google.com/go/civil/LICENSE | 201 + vendor/cloud.google.com/go/civil/civil.go | 277 + vendor/document/logs/logs.go | 148 + .../git.jiaxianghudong.com/go/utils/README.md | 0 .../go/utils/bytebuffer.go | 87 + .../git.jiaxianghudong.com/go/utils/coding.go | 289 + .../git.jiaxianghudong.com/go/utils/conf.go | 80 + .../go/utils/convert.go | 329 + .../go/utils/counter.go | 25 + .../git.jiaxianghudong.com/go/utils/file.go | 75 + .../go/utils/http_helper.go | 144 + .../git.jiaxianghudong.com/go/utils/human.go | 36 + .../git.jiaxianghudong.com/go/utils/image.go | 118 + vendor/git.jiaxianghudong.com/go/utils/lua.go | 107 + .../go/utils/progressbar.go | 91 + .../git.jiaxianghudong.com/go/utils/regexp.go | 89 + .../git.jiaxianghudong.com/go/utils/strip.go | 3713 ++ .../git.jiaxianghudong.com/go/utils/utils.go | 364 + .../go/utils/verifier.go | 253 + .../go/utils/verions_compare.go | 144 + .../denisenkom/go-mssqldb/LICENSE.txt | 27 + .../denisenkom/go-mssqldb/README.md | 215 + .../denisenkom/go-mssqldb/appveyor.yml | 48 + .../github.com/denisenkom/go-mssqldb/buf.go | 258 + .../denisenkom/go-mssqldb/bulkcopy.go | 554 + .../denisenkom/go-mssqldb/bulkcopy_sql.go | 93 + .../denisenkom/go-mssqldb/convert.go | 306 + .../denisenkom/go-mssqldb/decimal.go | 131 + .../github.com/denisenkom/go-mssqldb/doc.go | 14 + .../github.com/denisenkom/go-mssqldb/error.go | 73 + .../go-mssqldb/internal/cp/charset.go | 113 + .../go-mssqldb/internal/cp/collation.go | 20 + .../go-mssqldb/internal/cp/cp1250.go | 262 + .../go-mssqldb/internal/cp/cp1251.go | 262 + .../go-mssqldb/internal/cp/cp1252.go | 262 + .../go-mssqldb/internal/cp/cp1253.go | 262 + .../go-mssqldb/internal/cp/cp1254.go | 262 + .../go-mssqldb/internal/cp/cp1255.go | 262 + .../go-mssqldb/internal/cp/cp1256.go | 262 + .../go-mssqldb/internal/cp/cp1257.go | 262 + .../go-mssqldb/internal/cp/cp1258.go | 262 + .../go-mssqldb/internal/cp/cp437.go | 262 + .../go-mssqldb/internal/cp/cp850.go | 262 + .../go-mssqldb/internal/cp/cp874.go | 262 + .../go-mssqldb/internal/cp/cp932.go | 7988 +++ .../go-mssqldb/internal/cp/cp936.go | 22055 ++++++++ .../go-mssqldb/internal/cp/cp949.go | 17312 ++++++ .../go-mssqldb/internal/cp/cp950.go | 13767 +++++ .../github.com/denisenkom/go-mssqldb/log.go | 30 + .../github.com/denisenkom/go-mssqldb/mssql.go | 962 + .../denisenkom/go-mssqldb/mssql_go110.go | 50 + .../denisenkom/go-mssqldb/mssql_go19.go | 171 + .../denisenkom/go-mssqldb/mssql_go19pre.go | 16 + .../github.com/denisenkom/go-mssqldb/net.go | 103 + .../github.com/denisenkom/go-mssqldb/ntlm.go | 283 + .../denisenkom/go-mssqldb/parser.go | 257 + .../github.com/denisenkom/go-mssqldb/rpc.go | 89 + .../denisenkom/go-mssqldb/sspi_windows.go | 266 + .../github.com/denisenkom/go-mssqldb/tds.go | 1367 + .../github.com/denisenkom/go-mssqldb/token.go | 804 + .../denisenkom/go-mssqldb/token_string.go | 53 + .../github.com/denisenkom/go-mssqldb/tran.go | 110 + .../github.com/denisenkom/go-mssqldb/types.go | 1566 + .../denisenkom/go-mssqldb/uniqueidentifier.go | 74 + .../github.com/disintegration/imaging/LICENSE | 21 + .../disintegration/imaging/README.md | 188 + .../disintegration/imaging/adjust.go | 222 + .../disintegration/imaging/convolution.go | 146 + .../github.com/disintegration/imaging/doc.go | 7 + .../disintegration/imaging/effects.go | 173 + .../github.com/disintegration/imaging/go.mod | 3 + .../github.com/disintegration/imaging/go.sum | 2 + .../disintegration/imaging/histogram.go | 51 + .../github.com/disintegration/imaging/io.go | 463 + .../disintegration/imaging/resize.go | 576 + .../disintegration/imaging/scanner.go | 285 + .../disintegration/imaging/tools.go | 247 + .../disintegration/imaging/transform.go | 271 + .../disintegration/imaging/utils.go | 83 + vendor/github.com/dustin/go-humanize/LICENSE | 21 + .../dustin/go-humanize/README.markdown | 124 + vendor/github.com/dustin/go-humanize/big.go | 31 + .../github.com/dustin/go-humanize/bigbytes.go | 173 + vendor/github.com/dustin/go-humanize/bytes.go | 143 + vendor/github.com/dustin/go-humanize/comma.go | 116 + .../github.com/dustin/go-humanize/commaf.go | 40 + vendor/github.com/dustin/go-humanize/ftoa.go | 46 + .../github.com/dustin/go-humanize/humanize.go | 8 + .../github.com/dustin/go-humanize/number.go | 192 + .../github.com/dustin/go-humanize/ordinals.go | 25 + vendor/github.com/dustin/go-humanize/si.go | 123 + vendor/github.com/dustin/go-humanize/times.go | 117 + vendor/github.com/fatih/structs/LICENSE | 21 + vendor/github.com/fatih/structs/README.md | 170 + vendor/github.com/fatih/structs/field.go | 141 + vendor/github.com/fatih/structs/structs.go | 584 + vendor/github.com/fatih/structs/tags.go | 32 + vendor/github.com/gin-contrib/sse/LICENSE | 21 + vendor/github.com/gin-contrib/sse/README.md | 58 + .../github.com/gin-contrib/sse/sse-decoder.go | 116 + .../github.com/gin-contrib/sse/sse-encoder.go | 110 + vendor/github.com/gin-contrib/sse/writer.go | 24 + vendor/github.com/gin-gonic/gin/AUTHORS.md | 231 + vendor/github.com/gin-gonic/gin/BENCHMARKS.md | 604 + vendor/github.com/gin-gonic/gin/CHANGELOG.md | 213 + .../gin-gonic/gin/CODE_OF_CONDUCT.md | 46 + .../github.com/gin-gonic/gin/CONTRIBUTING.md | 13 + vendor/github.com/gin-gonic/gin/LICENSE | 21 + vendor/github.com/gin-gonic/gin/Makefile | 81 + vendor/github.com/gin-gonic/gin/README.md | 2004 + vendor/github.com/gin-gonic/gin/auth.go | 96 + .../gin-gonic/gin/binding/binding.go | 111 + .../gin/binding/default_validator.go | 51 + .../github.com/gin-gonic/gin/binding/form.go | 56 + .../gin-gonic/gin/binding/form_mapping.go | 217 + .../github.com/gin-gonic/gin/binding/json.go | 47 + .../gin-gonic/gin/binding/msgpack.go | 35 + .../gin-gonic/gin/binding/protobuf.go | 36 + .../github.com/gin-gonic/gin/binding/query.go | 21 + .../github.com/gin-gonic/gin/binding/uri.go | 18 + .../github.com/gin-gonic/gin/binding/xml.go | 33 + .../github.com/gin-gonic/gin/binding/yaml.go | 35 + vendor/github.com/gin-gonic/gin/codecov.yml | 5 + vendor/github.com/gin-gonic/gin/context.go | 975 + vendor/github.com/gin-gonic/gin/context_17.go | 17 + .../gin-gonic/gin/context_appengine.go | 11 + vendor/github.com/gin-gonic/gin/debug.go | 103 + vendor/github.com/gin-gonic/gin/deprecated.go | 21 + vendor/github.com/gin-gonic/gin/doc.go | 6 + vendor/github.com/gin-gonic/gin/errors.go | 169 + vendor/github.com/gin-gonic/gin/fs.go | 45 + vendor/github.com/gin-gonic/gin/gin.go | 465 + vendor/github.com/gin-gonic/gin/go.mod | 30 + vendor/github.com/gin-gonic/gin/go.sum | 72 + .../gin-gonic/gin/internal/json/json.go | 20 + .../gin-gonic/gin/internal/json/jsoniter.go | 21 + vendor/github.com/gin-gonic/gin/logger.go | 152 + vendor/github.com/gin-gonic/gin/mode.go | 83 + vendor/github.com/gin-gonic/gin/path.go | 123 + vendor/github.com/gin-gonic/gin/recovery.go | 144 + .../github.com/gin-gonic/gin/render/data.go | 25 + .../github.com/gin-gonic/gin/render/html.go | 92 + .../github.com/gin-gonic/gin/render/json.go | 161 + .../gin-gonic/gin/render/json_17.go | 31 + .../gin-gonic/gin/render/msgpack.go | 35 + .../gin-gonic/gin/render/protobuf.go | 36 + .../github.com/gin-gonic/gin/render/reader.go | 43 + .../gin-gonic/gin/render/redirect.go | 31 + .../github.com/gin-gonic/gin/render/render.go | 41 + .../github.com/gin-gonic/gin/render/text.go | 40 + vendor/github.com/gin-gonic/gin/render/xml.go | 28 + .../github.com/gin-gonic/gin/render/yaml.go | 36 + .../gin-gonic/gin/response_writer.go | 115 + .../gin-gonic/gin/response_writer_1.7.go | 12 + .../gin-gonic/gin/response_writer_1.8.go | 25 + .../github.com/gin-gonic/gin/routergroup.go | 228 + .../github.com/gin-gonic/gin/test_helpers.go | 16 + vendor/github.com/gin-gonic/gin/tools.go | 25 + vendor/github.com/gin-gonic/gin/tree.go | 627 + vendor/github.com/gin-gonic/gin/utils.go | 151 + vendor/github.com/gin-gonic/gin/version.go | 8 + vendor/github.com/go-sql-driver/mysql/AUTHORS | 94 + .../go-sql-driver/mysql/CHANGELOG.md | 167 + .../go-sql-driver/mysql/CONTRIBUTING.md | 23 + vendor/github.com/go-sql-driver/mysql/LICENSE | 373 + .../github.com/go-sql-driver/mysql/README.md | 490 + .../go-sql-driver/mysql/appengine.go | 19 + vendor/github.com/go-sql-driver/mysql/auth.go | 422 + .../github.com/go-sql-driver/mysql/buffer.go | 160 + .../go-sql-driver/mysql/collations.go | 251 + .../go-sql-driver/mysql/connection.go | 643 + .../github.com/go-sql-driver/mysql/const.go | 174 + .../github.com/go-sql-driver/mysql/driver.go | 169 + vendor/github.com/go-sql-driver/mysql/dsn.go | 611 + .../github.com/go-sql-driver/mysql/errors.go | 65 + .../github.com/go-sql-driver/mysql/fields.go | 194 + .../github.com/go-sql-driver/mysql/infile.go | 182 + .../github.com/go-sql-driver/mysql/packets.go | 1292 + .../github.com/go-sql-driver/mysql/result.go | 22 + vendor/github.com/go-sql-driver/mysql/rows.go | 216 + .../go-sql-driver/mysql/statement.go | 211 + .../go-sql-driver/mysql/transaction.go | 31 + .../github.com/go-sql-driver/mysql/utils.go | 755 + vendor/github.com/golang/protobuf/LICENSE | 28 + .../github.com/golang/protobuf/proto/clone.go | 253 + .../golang/protobuf/proto/decode.go | 427 + .../golang/protobuf/proto/deprecated.go | 63 + .../golang/protobuf/proto/discard.go | 350 + .../golang/protobuf/proto/encode.go | 203 + .../github.com/golang/protobuf/proto/equal.go | 301 + .../golang/protobuf/proto/extensions.go | 607 + .../github.com/golang/protobuf/proto/lib.go | 965 + .../golang/protobuf/proto/message_set.go | 181 + .../golang/protobuf/proto/pointer_reflect.go | 360 + .../golang/protobuf/proto/pointer_unsafe.go | 313 + .../golang/protobuf/proto/properties.go | 545 + .../golang/protobuf/proto/table_marshal.go | 2776 + .../golang/protobuf/proto/table_merge.go | 654 + .../golang/protobuf/proto/table_unmarshal.go | 2053 + .../github.com/golang/protobuf/proto/text.go | 843 + .../golang/protobuf/proto/text_parser.go | 880 + .../github.com/golang/protobuf/ptypes/any.go | 141 + .../golang/protobuf/ptypes/any/any.pb.go | 200 + .../golang/protobuf/ptypes/any/any.proto | 154 + .../github.com/golang/protobuf/ptypes/doc.go | 35 + .../golang/protobuf/ptypes/duration.go | 102 + .../protobuf/ptypes/duration/duration.pb.go | 161 + .../protobuf/ptypes/duration/duration.proto | 117 + .../golang/protobuf/ptypes/timestamp.go | 134 + .../protobuf/ptypes/timestamp/timestamp.pb.go | 179 + .../protobuf/ptypes/timestamp/timestamp.proto | 135 + vendor/github.com/gorilla/context/LICENSE | 27 + vendor/github.com/gorilla/context/README.md | 10 + vendor/github.com/gorilla/context/context.go | 143 + vendor/github.com/gorilla/context/doc.go | 88 + .../github.com/gorilla/securecookie/AUTHORS | 19 + .../github.com/gorilla/securecookie/LICENSE | 27 + .../github.com/gorilla/securecookie/README.md | 82 + vendor/github.com/gorilla/securecookie/doc.go | 61 + .../github.com/gorilla/securecookie/fuzz.go | 25 + vendor/github.com/gorilla/securecookie/go.mod | 1 + .../gorilla/securecookie/securecookie.go | 650 + vendor/github.com/gorilla/sessions/AUTHORS | 43 + vendor/github.com/gorilla/sessions/LICENSE | 27 + vendor/github.com/gorilla/sessions/README.md | 95 + vendor/github.com/gorilla/sessions/cookie.go | 19 + .../gorilla/sessions/cookie_go111.go | 20 + vendor/github.com/gorilla/sessions/doc.go | 202 + vendor/github.com/gorilla/sessions/go.mod | 6 + vendor/github.com/gorilla/sessions/go.sum | 2 + vendor/github.com/gorilla/sessions/lex.go | 102 + vendor/github.com/gorilla/sessions/options.go | 18 + .../gorilla/sessions/options_go111.go | 22 + .../github.com/gorilla/sessions/sessions.go | 218 + vendor/github.com/gorilla/sessions/store.go | 292 + vendor/github.com/mattn/go-isatty/LICENSE | 9 + vendor/github.com/mattn/go-isatty/README.md | 50 + vendor/github.com/mattn/go-isatty/doc.go | 2 + .../github.com/mattn/go-isatty/isatty_bsd.go | 24 + .../mattn/go-isatty/isatty_linux.go | 24 + .../mattn/go-isatty/isatty_linux_ppc64x.go | 25 + .../mattn/go-isatty/isatty_others.go | 15 + .../mattn/go-isatty/isatty_solaris.go | 22 + .../mattn/go-isatty/isatty_windows.go | 94 + .../github.com/tommy351/gin-sessions/LICENSE | 20 + .../tommy351/gin-sessions/README.md | 39 + .../tommy351/gin-sessions/cookie_store.go | 28 + .../tommy351/gin-sessions/middleware.go | 34 + .../tommy351/gin-sessions/sessions.go | 93 + vendor/github.com/ugorji/go/LICENSE | 22 + vendor/github.com/ugorji/go/codec/0doc.go | 227 + vendor/github.com/ugorji/go/codec/README.md | 207 + vendor/github.com/ugorji/go/codec/binc.go | 1204 + vendor/github.com/ugorji/go/codec/build.sh | 225 + vendor/github.com/ugorji/go/codec/cbor.go | 769 + vendor/github.com/ugorji/go/codec/codecgen.go | 13 + vendor/github.com/ugorji/go/codec/decode.go | 3200 ++ vendor/github.com/ugorji/go/codec/encode.go | 1767 + .../ugorji/go/codec/fast-path.generated.go | 35072 ++++++++++++ .../ugorji/go/codec/fast-path.go.tmpl | 554 + .../ugorji/go/codec/fast-path.not.go | 47 + .../ugorji/go/codec/gen-dec-array.go.tmpl | 78 + .../ugorji/go/codec/gen-dec-map.go.tmpl | 42 + .../ugorji/go/codec/gen-enc-chan.go.tmpl | 27 + .../ugorji/go/codec/gen-helper.generated.go | 351 + .../ugorji/go/codec/gen-helper.go.tmpl | 317 + .../ugorji/go/codec/gen.generated.go | 164 + vendor/github.com/ugorji/go/codec/gen.go | 2149 + vendor/github.com/ugorji/go/codec/go.mod | 1 + .../go/codec/goversion_arrayof_gte_go15.go | 14 + .../go/codec/goversion_arrayof_lt_go15.go | 14 + .../go/codec/goversion_makemap_gte_go19.go | 15 + .../go/codec/goversion_makemap_lt_go19.go | 12 + ...version_unexportedembeddedptr_gte_go110.go | 8 + ...oversion_unexportedembeddedptr_lt_go110.go | 8 + .../go/codec/goversion_unsupported_lt_go14.go | 17 + .../go/codec/goversion_vendor_eq_go15.go | 10 + .../go/codec/goversion_vendor_eq_go16.go | 10 + .../go/codec/goversion_vendor_gte_go17.go | 8 + .../go/codec/goversion_vendor_lt_go15.go | 8 + vendor/github.com/ugorji/go/codec/helper.go | 2604 + .../ugorji/go/codec/helper_internal.go | 121 + .../ugorji/go/codec/helper_not_unsafe.go | 303 + .../ugorji/go/codec/helper_unsafe.go | 673 + vendor/github.com/ugorji/go/codec/json.go | 1508 + .../ugorji/go/codec/mammoth-test.go.tmpl | 154 + .../ugorji/go/codec/mammoth2-test.go.tmpl | 94 + vendor/github.com/ugorji/go/codec/msgpack.go | 1123 + vendor/github.com/ugorji/go/codec/rpc.go | 225 + vendor/github.com/ugorji/go/codec/simple.go | 667 + .../ugorji/go/codec/test-cbor-goldens.json | 639 + vendor/github.com/ugorji/go/codec/test.py | 126 + vendor/github.com/ugorji/go/codec/xml.go | 508 + vendor/golang.org/x/crypto/LICENSE | 27 + vendor/golang.org/x/crypto/PATENTS | 22 + .../x/crypto/acme/autocert/autocert.go | 836 + .../x/crypto/acme/autocert/cache.go | 130 + .../x/crypto/acme/autocert/renewal.go | 125 + vendor/golang.org/x/crypto/md4/md4.go | 118 + vendor/golang.org/x/crypto/md4/md4block.go | 89 + vendor/golang.org/x/image/LICENSE | 27 + vendor/golang.org/x/image/PATENTS | 22 + vendor/golang.org/x/image/bmp/reader.go | 199 + vendor/golang.org/x/image/bmp/writer.go | 262 + vendor/golang.org/x/image/tiff/buffer.go | 69 + vendor/golang.org/x/image/tiff/compress.go | 58 + vendor/golang.org/x/image/tiff/consts.go | 133 + vendor/golang.org/x/image/tiff/lzw/reader.go | 272 + vendor/golang.org/x/image/tiff/reader.go | 684 + vendor/golang.org/x/image/tiff/writer.go | 438 + vendor/golang.org/x/net/LICENSE | 27 + vendor/golang.org/x/net/PATENTS | 22 + vendor/golang.org/x/net/context/context.go | 56 + vendor/golang.org/x/net/context/go17.go | 72 + vendor/golang.org/x/net/context/go19.go | 20 + vendor/golang.org/x/net/context/pre_go17.go | 300 + vendor/golang.org/x/net/context/pre_go19.go | 109 + vendor/golang.org/x/net/http/httpguts/guts.go | 50 + .../golang.org/x/net/http/httpguts/httplex.go | 346 + vendor/golang.org/x/net/http2/Dockerfile | 51 + vendor/golang.org/x/net/http2/Makefile | 3 + vendor/golang.org/x/net/http2/README | 20 + vendor/golang.org/x/net/http2/ciphers.go | 641 + .../x/net/http2/client_conn_pool.go | 282 + vendor/golang.org/x/net/http2/databuffer.go | 146 + vendor/golang.org/x/net/http2/errors.go | 133 + vendor/golang.org/x/net/http2/fixed_buffer.go | 60 + vendor/golang.org/x/net/http2/flow.go | 50 + vendor/golang.org/x/net/http2/frame.go | 1614 + vendor/golang.org/x/net/http2/go111.go | 29 + vendor/golang.org/x/net/http2/go15.go | 11 + vendor/golang.org/x/net/http2/gotrack.go | 170 + vendor/golang.org/x/net/http2/headermap.go | 88 + vendor/golang.org/x/net/http2/hpack/encode.go | 240 + vendor/golang.org/x/net/http2/hpack/hpack.go | 496 + .../golang.org/x/net/http2/hpack/huffman.go | 222 + vendor/golang.org/x/net/http2/hpack/tables.go | 479 + vendor/golang.org/x/net/http2/http2.go | 384 + vendor/golang.org/x/net/http2/not_go111.go | 20 + vendor/golang.org/x/net/http2/not_go15.go | 11 + vendor/golang.org/x/net/http2/pipe.go | 163 + vendor/golang.org/x/net/http2/server.go | 2901 + vendor/golang.org/x/net/http2/transport.go | 2603 + vendor/golang.org/x/net/http2/write.go | 365 + vendor/golang.org/x/net/http2/writesched.go | 242 + .../x/net/http2/writesched_priority.go | 452 + .../x/net/http2/writesched_random.go | 72 + vendor/golang.org/x/net/idna/idna.go | 732 + vendor/golang.org/x/net/idna/punycode.go | 203 + vendor/golang.org/x/net/idna/tables.go | 4557 ++ vendor/golang.org/x/net/idna/trie.go | 72 + vendor/golang.org/x/net/idna/trieval.go | 119 + .../x/net/internal/timeseries/timeseries.go | 525 + vendor/golang.org/x/net/trace/events.go | 532 + vendor/golang.org/x/net/trace/histogram.go | 365 + vendor/golang.org/x/net/trace/trace.go | 1124 + vendor/golang.org/x/sys/LICENSE | 27 + vendor/golang.org/x/sys/PATENTS | 22 + vendor/golang.org/x/sys/unix/asm.s | 10 + vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 + .../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 + .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 + .../golang.org/x/sys/unix/asm_dragonfly_386.s | 29 + .../x/sys/unix/asm_dragonfly_amd64.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_386.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 + vendor/golang.org/x/sys/unix/asm_linux_386.s | 35 + .../golang.org/x/sys/unix/asm_linux_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_linux_arm.s | 29 + .../golang.org/x/sys/unix/asm_linux_arm64.s | 24 + .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 28 + vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 + .../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 + .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 + .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 + .../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 + vendor/golang.org/x/sys/unix/bpf_bsd.go | 170 + vendor/golang.org/x/sys/unix/constants.go | 13 + vendor/golang.org/x/sys/unix/env_unix.go | 27 + vendor/golang.org/x/sys/unix/env_unset.go | 14 + vendor/golang.org/x/sys/unix/flock.go | 24 + .../x/sys/unix/flock_linux_32bit.go | 13 + vendor/golang.org/x/sys/unix/gccgo.go | 46 + vendor/golang.org/x/sys/unix/gccgo_c.c | 41 + .../x/sys/unix/gccgo_linux_amd64.go | 20 + vendor/golang.org/x/sys/unix/lsf_linux.go | 79 + vendor/golang.org/x/sys/unix/mkall.sh | 274 + vendor/golang.org/x/sys/unix/mkerrors.sh | 476 + vendor/golang.org/x/sys/unix/mksyscall.pl | 323 + .../x/sys/unix/mksyscall_solaris.pl | 294 + .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 + .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 + .../x/sys/unix/mksysnum_dragonfly.pl | 50 + .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 63 + .../golang.org/x/sys/unix/mksysnum_linux.pl | 58 + .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 + .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 + vendor/golang.org/x/sys/unix/netlink_linux.go | 178 + vendor/golang.org/x/sys/unix/race.go | 30 + vendor/golang.org/x/sys/unix/race0.go | 25 + vendor/golang.org/x/sys/unix/route_bsd.go | 224 + vendor/golang.org/x/sys/unix/route_darwin.go | 61 + .../golang.org/x/sys/unix/route_dragonfly.go | 72 + vendor/golang.org/x/sys/unix/route_freebsd.go | 78 + .../x/sys/unix/route_freebsd_32bit.go | 24 + .../x/sys/unix/route_freebsd_64bit.go | 14 + vendor/golang.org/x/sys/unix/route_netbsd.go | 35 + vendor/golang.org/x/sys/unix/route_openbsd.go | 35 + vendor/golang.org/x/sys/unix/so_solaris.go | 261 + .../golang.org/x/sys/unix/sockcmsg_linux.go | 36 + vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 103 + vendor/golang.org/x/sys/unix/str.go | 26 + vendor/golang.org/x/sys/unix/syscall.go | 74 + vendor/golang.org/x/sys/unix/syscall_bsd.go | 628 + .../golang.org/x/sys/unix/syscall_darwin.go | 509 + .../x/sys/unix/syscall_darwin_386.go | 79 + .../x/sys/unix/syscall_darwin_amd64.go | 81 + .../x/sys/unix/syscall_darwin_arm.go | 73 + .../x/sys/unix/syscall_darwin_arm64.go | 79 + .../x/sys/unix/syscall_dragonfly.go | 411 + .../x/sys/unix/syscall_dragonfly_386.go | 63 + .../x/sys/unix/syscall_dragonfly_amd64.go | 63 + .../golang.org/x/sys/unix/syscall_freebsd.go | 682 + .../x/sys/unix/syscall_freebsd_386.go | 63 + .../x/sys/unix/syscall_freebsd_amd64.go | 63 + .../x/sys/unix/syscall_freebsd_arm.go | 63 + vendor/golang.org/x/sys/unix/syscall_linux.go | 1086 + .../x/sys/unix/syscall_linux_386.go | 388 + .../x/sys/unix/syscall_linux_amd64.go | 146 + .../x/sys/unix/syscall_linux_arm.go | 233 + .../x/sys/unix/syscall_linux_arm64.go | 150 + .../x/sys/unix/syscall_linux_ppc64x.go | 96 + .../golang.org/x/sys/unix/syscall_netbsd.go | 492 + .../x/sys/unix/syscall_netbsd_386.go | 44 + .../x/sys/unix/syscall_netbsd_amd64.go | 44 + .../x/sys/unix/syscall_netbsd_arm.go | 44 + .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 + .../golang.org/x/sys/unix/syscall_openbsd.go | 303 + .../x/sys/unix/syscall_openbsd_386.go | 44 + .../x/sys/unix/syscall_openbsd_amd64.go | 44 + .../golang.org/x/sys/unix/syscall_solaris.go | 713 + .../x/sys/unix/syscall_solaris_amd64.go | 37 + vendor/golang.org/x/sys/unix/syscall_unix.go | 297 + vendor/golang.org/x/sys/unix/types_darwin.go | 250 + .../golang.org/x/sys/unix/types_dragonfly.go | 242 + vendor/golang.org/x/sys/unix/types_freebsd.go | 353 + vendor/golang.org/x/sys/unix/types_linux.go | 406 + vendor/golang.org/x/sys/unix/types_netbsd.go | 232 + vendor/golang.org/x/sys/unix/types_openbsd.go | 244 + vendor/golang.org/x/sys/unix/types_solaris.go | 260 + .../x/sys/unix/zerrors_darwin_386.go | 1576 + .../x/sys/unix/zerrors_darwin_amd64.go | 1576 + .../x/sys/unix/zerrors_darwin_arm.go | 1293 + .../x/sys/unix/zerrors_darwin_arm64.go | 1576 + .../x/sys/unix/zerrors_dragonfly_386.go | 1530 + .../x/sys/unix/zerrors_dragonfly_amd64.go | 1530 + .../x/sys/unix/zerrors_freebsd_386.go | 1743 + .../x/sys/unix/zerrors_freebsd_amd64.go | 1748 + .../x/sys/unix/zerrors_freebsd_arm.go | 1729 + .../x/sys/unix/zerrors_linux_386.go | 1817 + .../x/sys/unix/zerrors_linux_amd64.go | 1818 + .../x/sys/unix/zerrors_linux_arm.go | 1742 + .../x/sys/unix/zerrors_linux_arm64.go | 1896 + .../x/sys/unix/zerrors_linux_ppc64.go | 1969 + .../x/sys/unix/zerrors_linux_ppc64le.go | 1968 + .../x/sys/unix/zerrors_netbsd_386.go | 1712 + .../x/sys/unix/zerrors_netbsd_amd64.go | 1702 + .../x/sys/unix/zerrors_netbsd_arm.go | 1688 + .../x/sys/unix/zerrors_openbsd_386.go | 1584 + .../x/sys/unix/zerrors_openbsd_amd64.go | 1583 + .../x/sys/unix/zerrors_solaris_amd64.go | 1436 + .../x/sys/unix/zsyscall_darwin_386.go | 1426 + .../x/sys/unix/zsyscall_darwin_amd64.go | 1442 + .../x/sys/unix/zsyscall_darwin_arm.go | 1426 + .../x/sys/unix/zsyscall_darwin_arm64.go | 1426 + .../x/sys/unix/zsyscall_dragonfly_386.go | 1412 + .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1412 + .../x/sys/unix/zsyscall_freebsd_386.go | 1664 + .../x/sys/unix/zsyscall_freebsd_amd64.go | 1664 + .../x/sys/unix/zsyscall_freebsd_arm.go | 1664 + .../x/sys/unix/zsyscall_linux_386.go | 1628 + .../x/sys/unix/zsyscall_linux_amd64.go | 1822 + .../x/sys/unix/zsyscall_linux_arm.go | 1756 + .../x/sys/unix/zsyscall_linux_arm64.go | 1750 + .../x/sys/unix/zsyscall_linux_ppc64.go | 1792 + .../x/sys/unix/zsyscall_linux_ppc64le.go | 1792 + .../x/sys/unix/zsyscall_netbsd_386.go | 1326 + .../x/sys/unix/zsyscall_netbsd_amd64.go | 1326 + .../x/sys/unix/zsyscall_netbsd_arm.go | 1326 + .../x/sys/unix/zsyscall_openbsd_386.go | 1386 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 1386 + .../x/sys/unix/zsyscall_solaris_amd64.go | 1559 + .../golang.org/x/sys/unix/zsysctl_openbsd.go | 270 + .../x/sys/unix/zsysnum_darwin_386.go | 398 + .../x/sys/unix/zsysnum_darwin_amd64.go | 398 + .../x/sys/unix/zsysnum_darwin_arm.go | 358 + .../x/sys/unix/zsysnum_darwin_arm64.go | 398 + .../x/sys/unix/zsysnum_dragonfly_386.go | 304 + .../x/sys/unix/zsysnum_dragonfly_amd64.go | 304 + .../x/sys/unix/zsysnum_freebsd_386.go | 351 + .../x/sys/unix/zsysnum_freebsd_amd64.go | 351 + .../x/sys/unix/zsysnum_freebsd_arm.go | 351 + .../x/sys/unix/zsysnum_linux_386.go | 355 + .../x/sys/unix/zsysnum_linux_amd64.go | 321 + .../x/sys/unix/zsysnum_linux_arm.go | 356 + .../x/sys/unix/zsysnum_linux_arm64.go | 272 + .../x/sys/unix/zsysnum_linux_ppc64.go | 360 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 353 + .../x/sys/unix/zsysnum_netbsd_386.go | 273 + .../x/sys/unix/zsysnum_netbsd_amd64.go | 273 + .../x/sys/unix/zsysnum_netbsd_arm.go | 273 + .../x/sys/unix/zsysnum_openbsd_386.go | 207 + .../x/sys/unix/zsysnum_openbsd_amd64.go | 207 + .../x/sys/unix/zsysnum_solaris_amd64.go | 13 + .../x/sys/unix/ztypes_darwin_386.go | 447 + .../x/sys/unix/ztypes_darwin_amd64.go | 462 + .../x/sys/unix/ztypes_darwin_arm.go | 449 + .../x/sys/unix/ztypes_darwin_arm64.go | 457 + .../x/sys/unix/ztypes_dragonfly_386.go | 437 + .../x/sys/unix/ztypes_dragonfly_amd64.go | 443 + .../x/sys/unix/ztypes_freebsd_386.go | 502 + .../x/sys/unix/ztypes_freebsd_amd64.go | 505 + .../x/sys/unix/ztypes_freebsd_arm.go | 497 + .../golang.org/x/sys/unix/ztypes_linux_386.go | 590 + .../x/sys/unix/ztypes_linux_amd64.go | 608 + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 579 + .../x/sys/unix/ztypes_linux_arm64.go | 595 + .../x/sys/unix/ztypes_linux_ppc64.go | 605 + .../x/sys/unix/ztypes_linux_ppc64le.go | 605 + .../x/sys/unix/ztypes_netbsd_386.go | 396 + .../x/sys/unix/ztypes_netbsd_amd64.go | 403 + .../x/sys/unix/ztypes_netbsd_arm.go | 401 + .../x/sys/unix/ztypes_openbsd_386.go | 441 + .../x/sys/unix/ztypes_openbsd_amd64.go | 448 + .../x/sys/unix/ztypes_solaris_amd64.go | 422 + vendor/golang.org/x/text/LICENSE | 27 + vendor/golang.org/x/text/PATENTS | 22 + vendor/golang.org/x/text/encoding/encoding.go | 335 + .../text/encoding/internal/identifier/gen.go | 137 + .../internal/identifier/identifier.go | 81 + .../text/encoding/internal/identifier/mib.go | 1621 + .../x/text/encoding/internal/internal.go | 75 + .../x/text/encoding/simplifiedchinese/all.go | 12 + .../x/text/encoding/simplifiedchinese/gbk.go | 269 + .../encoding/simplifiedchinese/hzgb2312.go | 245 + .../encoding/simplifiedchinese/maketables.go | 161 + .../text/encoding/simplifiedchinese/tables.go | 43999 ++++++++++++++++ .../x/text/secure/bidirule/bidirule.go | 336 + .../x/text/secure/bidirule/bidirule10.0.0.go | 11 + .../x/text/secure/bidirule/bidirule9.0.0.go | 14 + .../golang.org/x/text/transform/transform.go | 705 + vendor/golang.org/x/text/unicode/bidi/bidi.go | 198 + .../golang.org/x/text/unicode/bidi/bracket.go | 335 + vendor/golang.org/x/text/unicode/bidi/core.go | 1058 + vendor/golang.org/x/text/unicode/bidi/gen.go | 133 + .../x/text/unicode/bidi/gen_ranges.go | 57 + .../x/text/unicode/bidi/gen_trieval.go | 64 + vendor/golang.org/x/text/unicode/bidi/prop.go | 206 + .../x/text/unicode/bidi/tables10.0.0.go | 1815 + .../x/text/unicode/bidi/tables9.0.0.go | 1781 + .../golang.org/x/text/unicode/bidi/trieval.go | 60 + .../x/text/unicode/norm/composition.go | 512 + .../x/text/unicode/norm/forminfo.go | 278 + .../golang.org/x/text/unicode/norm/input.go | 109 + vendor/golang.org/x/text/unicode/norm/iter.go | 458 + .../x/text/unicode/norm/maketables.go | 986 + .../x/text/unicode/norm/normalize.go | 609 + .../x/text/unicode/norm/readwriter.go | 125 + .../x/text/unicode/norm/tables10.0.0.go | 7657 +++ .../x/text/unicode/norm/tables9.0.0.go | 7637 +++ .../x/text/unicode/norm/transform.go | 88 + vendor/golang.org/x/text/unicode/norm/trie.go | 54 + .../golang.org/x/text/unicode/norm/triegen.go | 117 + vendor/google.golang.org/grpc/AUTHORS | 1 + vendor/google.golang.org/grpc/CONTRIBUTING.md | 36 + vendor/google.golang.org/grpc/LICENSE | 202 + vendor/google.golang.org/grpc/Makefile | 55 + vendor/google.golang.org/grpc/README.md | 45 + vendor/google.golang.org/grpc/backoff.go | 38 + vendor/google.golang.org/grpc/balancer.go | 416 + .../grpc/balancer/balancer.go | 274 + .../grpc/balancer/base/balancer.go | 208 + .../grpc/balancer/base/base.go | 52 + .../grpc/balancer/roundrobin/roundrobin.go | 79 + .../grpc/balancer_conn_wrappers.go | 300 + .../grpc/balancer_v1_wrapper.go | 328 + vendor/google.golang.org/grpc/call.go | 74 + vendor/google.golang.org/grpc/clientconn.go | 1274 + vendor/google.golang.org/grpc/codec.go | 50 + vendor/google.golang.org/grpc/codegen.sh | 17 + .../grpc/codes/code_string.go | 62 + vendor/google.golang.org/grpc/codes/codes.go | 197 + .../grpc/connectivity/connectivity.go | 72 + .../grpc/credentials/credentials.go | 293 + .../grpc/credentials/go16.go | 57 + .../grpc/credentials/go17.go | 59 + .../grpc/credentials/go18.go | 46 + .../grpc/credentials/go19.go | 35 + vendor/google.golang.org/grpc/dialoptions.go | 450 + vendor/google.golang.org/grpc/doc.go | 24 + .../grpc/encoding/encoding.go | 118 + .../grpc/encoding/proto/proto.go | 110 + vendor/google.golang.org/grpc/go16.go | 71 + vendor/google.golang.org/grpc/go17.go | 72 + .../google.golang.org/grpc/grpclog/grpclog.go | 126 + .../google.golang.org/grpc/grpclog/logger.go | 85 + .../grpc/grpclog/loggerv2.go | 195 + vendor/google.golang.org/grpc/install_gae.sh | 6 + vendor/google.golang.org/grpc/interceptor.go | 77 + .../grpc/internal/backoff/backoff.go | 78 + .../grpc/internal/channelz/funcs.go | 573 + .../grpc/internal/channelz/types.go | 419 + .../grpc/internal/channelz/types_linux.go | 54 + .../grpc/internal/channelz/types_nonlinux.go | 38 + .../grpc/internal/channelz/util_linux_go19.go | 39 + .../channelz/util_nonlinux_pre_go19.go | 26 + .../grpc/internal/envconfig/envconfig.go | 35 + .../grpc/internal/grpcrand/grpcrand.go | 56 + .../grpc/internal/internal.go | 36 + .../grpc/internal/transport/bdp_estimator.go | 140 + .../grpc/internal/transport/controlbuf.go | 856 + .../grpc/internal/transport/defaults.go | 49 + .../grpc/internal/transport/flowcontrol.go | 218 + .../grpc/internal/transport/go16.go | 52 + .../grpc/internal/transport/go17.go | 53 + .../grpc/internal/transport/handler_server.go | 446 + .../grpc/internal/transport/http2_client.go | 1360 + .../grpc/internal/transport/http2_server.go | 1203 + .../grpc/internal/transport/http_util.go | 613 + .../grpc/internal/transport/log.go | 50 + .../grpc/internal/transport/transport.go | 685 + .../grpc/keepalive/keepalive.go | 65 + .../grpc/metadata/metadata.go | 210 + .../grpc/naming/dns_resolver.go | 290 + vendor/google.golang.org/grpc/naming/go17.go | 34 + vendor/google.golang.org/grpc/naming/go18.go | 28 + .../google.golang.org/grpc/naming/naming.go | 69 + vendor/google.golang.org/grpc/peer/peer.go | 51 + .../google.golang.org/grpc/picker_wrapper.go | 180 + vendor/google.golang.org/grpc/pickfirst.go | 108 + vendor/google.golang.org/grpc/proxy.go | 130 + .../grpc/resolver/dns/dns_resolver.go | 397 + .../grpc/resolver/dns/go17.go | 35 + .../grpc/resolver/dns/go18.go | 29 + .../grpc/resolver/passthrough/passthrough.go | 57 + .../grpc/resolver/resolver.go | 158 + .../grpc/resolver_conn_wrapper.go | 158 + vendor/google.golang.org/grpc/rpc_util.go | 767 + vendor/google.golang.org/grpc/server.go | 1489 + .../google.golang.org/grpc/service_config.go | 358 + .../google.golang.org/grpc/stats/handlers.go | 64 + vendor/google.golang.org/grpc/stats/stats.go | 296 + vendor/google.golang.org/grpc/status/go16.go | 42 + vendor/google.golang.org/grpc/status/go17.go | 44 + .../google.golang.org/grpc/status/status.go | 189 + vendor/google.golang.org/grpc/stream.go | 1023 + vendor/google.golang.org/grpc/tap/tap.go | 51 + vendor/google.golang.org/grpc/trace.go | 113 + vendor/google.golang.org/grpc/version.go | 22 + vendor/google.golang.org/grpc/vet.sh | 89 + vendor/gopkg.in/bsm/ratelimit.v1/Makefile | 16 + vendor/gopkg.in/bsm/ratelimit.v1/README.md | 54 + vendor/gopkg.in/bsm/ratelimit.v1/ratelimit.go | 96 + .../go-playground/validator.v8/LICENSE | 22 + .../go-playground/validator.v8/README.md | 366 + .../go-playground/validator.v8/baked_in.go | 1410 + .../go-playground/validator.v8/cache.go | 263 + .../go-playground/validator.v8/doc.go | 852 + .../go-playground/validator.v8/logo.png | Bin 0 -> 13443 bytes .../go-playground/validator.v8/regexes.go | 59 + .../go-playground/validator.v8/util.go | 252 + .../go-playground/validator.v8/validator.go | 782 + vendor/gopkg.in/redis.v3/LICENSE | 25 + vendor/gopkg.in/redis.v3/Makefile | 17 + vendor/gopkg.in/redis.v3/README.md | 127 + vendor/gopkg.in/redis.v3/cluster.go | 371 + vendor/gopkg.in/redis.v3/cluster_pipeline.go | 140 + vendor/gopkg.in/redis.v3/command.go | 869 + vendor/gopkg.in/redis.v3/commands.go | 1881 + vendor/gopkg.in/redis.v3/doc.go | 4 + vendor/gopkg.in/redis.v3/error.go | 81 + .../internal/consistenthash/consistenthash.go | 81 + .../redis.v3/internal/hashtag/hashtag.go | 73 + vendor/gopkg.in/redis.v3/internal/log.go | 22 + .../gopkg.in/redis.v3/internal/pool/conn.go | 78 + .../gopkg.in/redis.v3/internal/pool/pool.go | 382 + .../redis.v3/internal/pool/pool_single.go | 55 + .../redis.v3/internal/pool/pool_sticky.go | 135 + vendor/gopkg.in/redis.v3/multi.go | 192 + vendor/gopkg.in/redis.v3/options.go | 125 + vendor/gopkg.in/redis.v3/parser.go | 697 + vendor/gopkg.in/redis.v3/pipeline.go | 137 + vendor/gopkg.in/redis.v3/pubsub.go | 328 + vendor/gopkg.in/redis.v3/redis.go | 174 + vendor/gopkg.in/redis.v3/ring.go | 356 + vendor/gopkg.in/redis.v3/safe.go | 7 + vendor/gopkg.in/redis.v3/script.go | 52 + vendor/gopkg.in/redis.v3/sentinel.go | 330 + vendor/gopkg.in/redis.v3/unsafe.go | 14 + vendor/gopkg.in/yaml.v2/LICENSE | 201 + vendor/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + vendor/gopkg.in/yaml.v2/NOTICE | 13 + vendor/gopkg.in/yaml.v2/README.md | 133 + vendor/gopkg.in/yaml.v2/apic.go | 739 + vendor/gopkg.in/yaml.v2/decode.go | 775 + vendor/gopkg.in/yaml.v2/emitterc.go | 1685 + vendor/gopkg.in/yaml.v2/encode.go | 390 + vendor/gopkg.in/yaml.v2/go.mod | 3 + vendor/gopkg.in/yaml.v2/go.sum | 1 + vendor/gopkg.in/yaml.v2/parserc.go | 1095 + vendor/gopkg.in/yaml.v2/readerc.go | 412 + vendor/gopkg.in/yaml.v2/resolve.go | 258 + vendor/gopkg.in/yaml.v2/scannerc.go | 2696 + vendor/gopkg.in/yaml.v2/sorter.go | 113 + vendor/gopkg.in/yaml.v2/writerc.go | 26 + vendor/gopkg.in/yaml.v2/yaml.go | 466 + vendor/gopkg.in/yaml.v2/yamlh.go | 738 + vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 + vendor/vendor.json | 474 + 724 files changed, 405656 insertions(+), 4 deletions(-) create mode 100644 const/const.go create mode 100644 vendor/cloud.google.com/go/civil/LICENSE create mode 100644 vendor/cloud.google.com/go/civil/civil.go create mode 100644 vendor/document/logs/logs.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/README.md create mode 100644 vendor/git.jiaxianghudong.com/go/utils/bytebuffer.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/coding.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/conf.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/convert.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/counter.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/file.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/http_helper.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/human.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/image.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/lua.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/progressbar.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/regexp.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/strip.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/utils.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/verifier.go create mode 100644 vendor/git.jiaxianghudong.com/go/utils/verions_compare.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/LICENSE.txt create mode 100644 vendor/github.com/denisenkom/go-mssqldb/README.md create mode 100644 vendor/github.com/denisenkom/go-mssqldb/appveyor.yml create mode 100644 vendor/github.com/denisenkom/go-mssqldb/buf.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/bulkcopy.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/bulkcopy_sql.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/convert.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/decimal.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/doc.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/error.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/charset.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/collation.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1250.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1251.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1252.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1253.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1254.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1255.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1256.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1257.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp1258.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp437.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp850.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp874.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp932.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp936.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp949.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/internal/cp/cp950.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/log.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/mssql.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/mssql_go110.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/mssql_go19.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/mssql_go19pre.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/net.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/ntlm.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/parser.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/rpc.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/sspi_windows.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/tds.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/token.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/token_string.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/tran.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/types.go create mode 100644 vendor/github.com/denisenkom/go-mssqldb/uniqueidentifier.go create mode 100644 vendor/github.com/disintegration/imaging/LICENSE create mode 100644 vendor/github.com/disintegration/imaging/README.md create mode 100644 vendor/github.com/disintegration/imaging/adjust.go create mode 100644 vendor/github.com/disintegration/imaging/convolution.go create mode 100644 vendor/github.com/disintegration/imaging/doc.go create mode 100644 vendor/github.com/disintegration/imaging/effects.go create mode 100644 vendor/github.com/disintegration/imaging/go.mod create mode 100644 vendor/github.com/disintegration/imaging/go.sum create mode 100644 vendor/github.com/disintegration/imaging/histogram.go create mode 100644 vendor/github.com/disintegration/imaging/io.go create mode 100644 vendor/github.com/disintegration/imaging/resize.go create mode 100644 vendor/github.com/disintegration/imaging/scanner.go create mode 100644 vendor/github.com/disintegration/imaging/tools.go create mode 100644 vendor/github.com/disintegration/imaging/transform.go create mode 100644 vendor/github.com/disintegration/imaging/utils.go create mode 100644 vendor/github.com/dustin/go-humanize/LICENSE create mode 100644 vendor/github.com/dustin/go-humanize/README.markdown create mode 100644 vendor/github.com/dustin/go-humanize/big.go create mode 100644 vendor/github.com/dustin/go-humanize/bigbytes.go create mode 100644 vendor/github.com/dustin/go-humanize/bytes.go create mode 100644 vendor/github.com/dustin/go-humanize/comma.go create mode 100644 vendor/github.com/dustin/go-humanize/commaf.go create mode 100644 vendor/github.com/dustin/go-humanize/ftoa.go create mode 100644 vendor/github.com/dustin/go-humanize/humanize.go create mode 100644 vendor/github.com/dustin/go-humanize/number.go create mode 100644 vendor/github.com/dustin/go-humanize/ordinals.go create mode 100644 vendor/github.com/dustin/go-humanize/si.go create mode 100644 vendor/github.com/dustin/go-humanize/times.go create mode 100644 vendor/github.com/fatih/structs/LICENSE create mode 100644 vendor/github.com/fatih/structs/README.md create mode 100644 vendor/github.com/fatih/structs/field.go create mode 100644 vendor/github.com/fatih/structs/structs.go create mode 100644 vendor/github.com/fatih/structs/tags.go create mode 100644 vendor/github.com/gin-contrib/sse/LICENSE create mode 100644 vendor/github.com/gin-contrib/sse/README.md create mode 100644 vendor/github.com/gin-contrib/sse/sse-decoder.go create mode 100644 vendor/github.com/gin-contrib/sse/sse-encoder.go create mode 100644 vendor/github.com/gin-contrib/sse/writer.go create mode 100644 vendor/github.com/gin-gonic/gin/AUTHORS.md create mode 100644 vendor/github.com/gin-gonic/gin/BENCHMARKS.md create mode 100644 vendor/github.com/gin-gonic/gin/CHANGELOG.md create mode 100644 vendor/github.com/gin-gonic/gin/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/gin-gonic/gin/CONTRIBUTING.md create mode 100644 vendor/github.com/gin-gonic/gin/LICENSE create mode 100644 vendor/github.com/gin-gonic/gin/Makefile create mode 100644 vendor/github.com/gin-gonic/gin/README.md create mode 100644 vendor/github.com/gin-gonic/gin/auth.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/binding.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/default_validator.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/form.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/form_mapping.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/json.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/msgpack.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/protobuf.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/query.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/uri.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/xml.go create mode 100644 vendor/github.com/gin-gonic/gin/binding/yaml.go create mode 100644 vendor/github.com/gin-gonic/gin/codecov.yml create mode 100644 vendor/github.com/gin-gonic/gin/context.go create mode 100644 vendor/github.com/gin-gonic/gin/context_17.go create mode 100644 vendor/github.com/gin-gonic/gin/context_appengine.go create mode 100644 vendor/github.com/gin-gonic/gin/debug.go create mode 100644 vendor/github.com/gin-gonic/gin/deprecated.go create mode 100644 vendor/github.com/gin-gonic/gin/doc.go create mode 100644 vendor/github.com/gin-gonic/gin/errors.go create mode 100644 vendor/github.com/gin-gonic/gin/fs.go create mode 100644 vendor/github.com/gin-gonic/gin/gin.go create mode 100644 vendor/github.com/gin-gonic/gin/go.mod create mode 100644 vendor/github.com/gin-gonic/gin/go.sum create mode 100644 vendor/github.com/gin-gonic/gin/internal/json/json.go create mode 100644 vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go create mode 100644 vendor/github.com/gin-gonic/gin/logger.go create mode 100644 vendor/github.com/gin-gonic/gin/mode.go create mode 100644 vendor/github.com/gin-gonic/gin/path.go create mode 100644 vendor/github.com/gin-gonic/gin/recovery.go create mode 100644 vendor/github.com/gin-gonic/gin/render/data.go create mode 100644 vendor/github.com/gin-gonic/gin/render/html.go create mode 100644 vendor/github.com/gin-gonic/gin/render/json.go create mode 100644 vendor/github.com/gin-gonic/gin/render/json_17.go create mode 100644 vendor/github.com/gin-gonic/gin/render/msgpack.go create mode 100644 vendor/github.com/gin-gonic/gin/render/protobuf.go create mode 100644 vendor/github.com/gin-gonic/gin/render/reader.go create mode 100644 vendor/github.com/gin-gonic/gin/render/redirect.go create mode 100644 vendor/github.com/gin-gonic/gin/render/render.go create mode 100644 vendor/github.com/gin-gonic/gin/render/text.go create mode 100644 vendor/github.com/gin-gonic/gin/render/xml.go create mode 100644 vendor/github.com/gin-gonic/gin/render/yaml.go create mode 100644 vendor/github.com/gin-gonic/gin/response_writer.go create mode 100644 vendor/github.com/gin-gonic/gin/response_writer_1.7.go create mode 100644 vendor/github.com/gin-gonic/gin/response_writer_1.8.go create mode 100644 vendor/github.com/gin-gonic/gin/routergroup.go create mode 100644 vendor/github.com/gin-gonic/gin/test_helpers.go create mode 100644 vendor/github.com/gin-gonic/gin/tools.go create mode 100644 vendor/github.com/gin-gonic/gin/tree.go create mode 100644 vendor/github.com/gin-gonic/gin/utils.go create mode 100644 vendor/github.com/gin-gonic/gin/version.go create mode 100644 vendor/github.com/go-sql-driver/mysql/AUTHORS create mode 100644 vendor/github.com/go-sql-driver/mysql/CHANGELOG.md create mode 100644 vendor/github.com/go-sql-driver/mysql/CONTRIBUTING.md create mode 100644 vendor/github.com/go-sql-driver/mysql/LICENSE create mode 100644 vendor/github.com/go-sql-driver/mysql/README.md create mode 100644 vendor/github.com/go-sql-driver/mysql/appengine.go create mode 100644 vendor/github.com/go-sql-driver/mysql/auth.go create mode 100644 vendor/github.com/go-sql-driver/mysql/buffer.go create mode 100644 vendor/github.com/go-sql-driver/mysql/collations.go create mode 100644 vendor/github.com/go-sql-driver/mysql/connection.go create mode 100644 vendor/github.com/go-sql-driver/mysql/const.go create mode 100644 vendor/github.com/go-sql-driver/mysql/driver.go create mode 100644 vendor/github.com/go-sql-driver/mysql/dsn.go create mode 100644 vendor/github.com/go-sql-driver/mysql/errors.go create mode 100644 vendor/github.com/go-sql-driver/mysql/fields.go create mode 100644 vendor/github.com/go-sql-driver/mysql/infile.go create mode 100644 vendor/github.com/go-sql-driver/mysql/packets.go create mode 100644 vendor/github.com/go-sql-driver/mysql/result.go create mode 100644 vendor/github.com/go-sql-driver/mysql/rows.go create mode 100644 vendor/github.com/go-sql-driver/mysql/statement.go create mode 100644 vendor/github.com/go-sql-driver/mysql/transaction.go create mode 100644 vendor/github.com/go-sql-driver/mysql/utils.go create mode 100644 vendor/github.com/golang/protobuf/LICENSE create mode 100644 vendor/github.com/golang/protobuf/proto/clone.go create mode 100644 vendor/github.com/golang/protobuf/proto/decode.go create mode 100644 vendor/github.com/golang/protobuf/proto/deprecated.go create mode 100644 vendor/github.com/golang/protobuf/proto/discard.go create mode 100644 vendor/github.com/golang/protobuf/proto/encode.go create mode 100644 vendor/github.com/golang/protobuf/proto/equal.go create mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go create mode 100644 vendor/github.com/golang/protobuf/proto/lib.go create mode 100644 vendor/github.com/golang/protobuf/proto/message_set.go create mode 100644 vendor/github.com/golang/protobuf/proto/pointer_reflect.go create mode 100644 vendor/github.com/golang/protobuf/proto/pointer_unsafe.go create mode 100644 vendor/github.com/golang/protobuf/proto/properties.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_marshal.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_merge.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_unmarshal.go create mode 100644 vendor/github.com/golang/protobuf/proto/text.go create mode 100644 vendor/github.com/golang/protobuf/proto/text_parser.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/doc.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto create mode 100644 vendor/github.com/gorilla/context/LICENSE create mode 100644 vendor/github.com/gorilla/context/README.md create mode 100644 vendor/github.com/gorilla/context/context.go create mode 100644 vendor/github.com/gorilla/context/doc.go create mode 100644 vendor/github.com/gorilla/securecookie/AUTHORS create mode 100644 vendor/github.com/gorilla/securecookie/LICENSE create mode 100644 vendor/github.com/gorilla/securecookie/README.md create mode 100644 vendor/github.com/gorilla/securecookie/doc.go create mode 100644 vendor/github.com/gorilla/securecookie/fuzz.go create mode 100644 vendor/github.com/gorilla/securecookie/go.mod create mode 100644 vendor/github.com/gorilla/securecookie/securecookie.go create mode 100644 vendor/github.com/gorilla/sessions/AUTHORS create mode 100644 vendor/github.com/gorilla/sessions/LICENSE create mode 100644 vendor/github.com/gorilla/sessions/README.md create mode 100644 vendor/github.com/gorilla/sessions/cookie.go create mode 100644 vendor/github.com/gorilla/sessions/cookie_go111.go create mode 100644 vendor/github.com/gorilla/sessions/doc.go create mode 100644 vendor/github.com/gorilla/sessions/go.mod create mode 100644 vendor/github.com/gorilla/sessions/go.sum create mode 100644 vendor/github.com/gorilla/sessions/lex.go create mode 100644 vendor/github.com/gorilla/sessions/options.go create mode 100644 vendor/github.com/gorilla/sessions/options_go111.go create mode 100644 vendor/github.com/gorilla/sessions/sessions.go create mode 100644 vendor/github.com/gorilla/sessions/store.go create mode 100644 vendor/github.com/mattn/go-isatty/LICENSE create mode 100644 vendor/github.com/mattn/go-isatty/README.md create mode 100644 vendor/github.com/mattn/go-isatty/doc.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_bsd.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_linux.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_others.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_solaris.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_windows.go create mode 100644 vendor/github.com/tommy351/gin-sessions/LICENSE create mode 100644 vendor/github.com/tommy351/gin-sessions/README.md create mode 100644 vendor/github.com/tommy351/gin-sessions/cookie_store.go create mode 100644 vendor/github.com/tommy351/gin-sessions/middleware.go create mode 100644 vendor/github.com/tommy351/gin-sessions/sessions.go create mode 100644 vendor/github.com/ugorji/go/LICENSE create mode 100644 vendor/github.com/ugorji/go/codec/0doc.go create mode 100644 vendor/github.com/ugorji/go/codec/README.md create mode 100644 vendor/github.com/ugorji/go/codec/binc.go create mode 100644 vendor/github.com/ugorji/go/codec/build.sh create mode 100644 vendor/github.com/ugorji/go/codec/cbor.go create mode 100644 vendor/github.com/ugorji/go/codec/codecgen.go create mode 100644 vendor/github.com/ugorji/go/codec/decode.go create mode 100644 vendor/github.com/ugorji/go/codec/encode.go create mode 100644 vendor/github.com/ugorji/go/codec/fast-path.generated.go create mode 100644 vendor/github.com/ugorji/go/codec/fast-path.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/fast-path.not.go create mode 100644 vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-helper.generated.go create mode 100644 vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen.generated.go create mode 100644 vendor/github.com/ugorji/go/codec/gen.go create mode 100644 vendor/github.com/ugorji/go/codec/go.mod create mode 100644 vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/helper.go create mode 100644 vendor/github.com/ugorji/go/codec/helper_internal.go create mode 100644 vendor/github.com/ugorji/go/codec/helper_not_unsafe.go create mode 100644 vendor/github.com/ugorji/go/codec/helper_unsafe.go create mode 100644 vendor/github.com/ugorji/go/codec/json.go create mode 100644 vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/msgpack.go create mode 100644 vendor/github.com/ugorji/go/codec/rpc.go create mode 100644 vendor/github.com/ugorji/go/codec/simple.go create mode 100644 vendor/github.com/ugorji/go/codec/test-cbor-goldens.json create mode 100644 vendor/github.com/ugorji/go/codec/test.py create mode 100644 vendor/github.com/ugorji/go/codec/xml.go create mode 100644 vendor/golang.org/x/crypto/LICENSE create mode 100644 vendor/golang.org/x/crypto/PATENTS create mode 100644 vendor/golang.org/x/crypto/acme/autocert/autocert.go create mode 100644 vendor/golang.org/x/crypto/acme/autocert/cache.go create mode 100644 vendor/golang.org/x/crypto/acme/autocert/renewal.go create mode 100644 vendor/golang.org/x/crypto/md4/md4.go create mode 100644 vendor/golang.org/x/crypto/md4/md4block.go create mode 100644 vendor/golang.org/x/image/LICENSE create mode 100644 vendor/golang.org/x/image/PATENTS create mode 100644 vendor/golang.org/x/image/bmp/reader.go create mode 100644 vendor/golang.org/x/image/bmp/writer.go create mode 100644 vendor/golang.org/x/image/tiff/buffer.go create mode 100644 vendor/golang.org/x/image/tiff/compress.go create mode 100644 vendor/golang.org/x/image/tiff/consts.go create mode 100644 vendor/golang.org/x/image/tiff/lzw/reader.go create mode 100644 vendor/golang.org/x/image/tiff/reader.go create mode 100644 vendor/golang.org/x/image/tiff/writer.go create mode 100644 vendor/golang.org/x/net/LICENSE create mode 100644 vendor/golang.org/x/net/PATENTS create mode 100644 vendor/golang.org/x/net/context/context.go create mode 100644 vendor/golang.org/x/net/context/go17.go create mode 100644 vendor/golang.org/x/net/context/go19.go create mode 100644 vendor/golang.org/x/net/context/pre_go17.go create mode 100644 vendor/golang.org/x/net/context/pre_go19.go create mode 100644 vendor/golang.org/x/net/http/httpguts/guts.go create mode 100644 vendor/golang.org/x/net/http/httpguts/httplex.go create mode 100644 vendor/golang.org/x/net/http2/Dockerfile create mode 100644 vendor/golang.org/x/net/http2/Makefile create mode 100644 vendor/golang.org/x/net/http2/README create mode 100644 vendor/golang.org/x/net/http2/ciphers.go create mode 100644 vendor/golang.org/x/net/http2/client_conn_pool.go create mode 100644 vendor/golang.org/x/net/http2/databuffer.go create mode 100644 vendor/golang.org/x/net/http2/errors.go create mode 100644 vendor/golang.org/x/net/http2/fixed_buffer.go create mode 100644 vendor/golang.org/x/net/http2/flow.go create mode 100644 vendor/golang.org/x/net/http2/frame.go create mode 100644 vendor/golang.org/x/net/http2/go111.go create mode 100644 vendor/golang.org/x/net/http2/go15.go create mode 100644 vendor/golang.org/x/net/http2/gotrack.go create mode 100644 vendor/golang.org/x/net/http2/headermap.go create mode 100644 vendor/golang.org/x/net/http2/hpack/encode.go create mode 100644 vendor/golang.org/x/net/http2/hpack/hpack.go create mode 100644 vendor/golang.org/x/net/http2/hpack/huffman.go create mode 100644 vendor/golang.org/x/net/http2/hpack/tables.go create mode 100644 vendor/golang.org/x/net/http2/http2.go create mode 100644 vendor/golang.org/x/net/http2/not_go111.go create mode 100644 vendor/golang.org/x/net/http2/not_go15.go create mode 100644 vendor/golang.org/x/net/http2/pipe.go create mode 100644 vendor/golang.org/x/net/http2/server.go create mode 100644 vendor/golang.org/x/net/http2/transport.go create mode 100644 vendor/golang.org/x/net/http2/write.go create mode 100644 vendor/golang.org/x/net/http2/writesched.go create mode 100644 vendor/golang.org/x/net/http2/writesched_priority.go create mode 100644 vendor/golang.org/x/net/http2/writesched_random.go create mode 100644 vendor/golang.org/x/net/idna/idna.go create mode 100644 vendor/golang.org/x/net/idna/punycode.go create mode 100644 vendor/golang.org/x/net/idna/tables.go create mode 100644 vendor/golang.org/x/net/idna/trie.go create mode 100644 vendor/golang.org/x/net/idna/trieval.go create mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries.go create mode 100644 vendor/golang.org/x/net/trace/events.go create mode 100644 vendor/golang.org/x/net/trace/histogram.go create mode 100644 vendor/golang.org/x/net/trace/trace.go create mode 100644 vendor/golang.org/x/sys/LICENSE create mode 100644 vendor/golang.org/x/sys/PATENTS create mode 100644 vendor/golang.org/x/sys/unix/asm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/bpf_bsd.go create mode 100644 vendor/golang.org/x/sys/unix/constants.go create mode 100644 vendor/golang.org/x/sys/unix/env_unix.go create mode 100644 vendor/golang.org/x/sys/unix/env_unset.go create mode 100644 vendor/golang.org/x/sys/unix/flock.go create mode 100644 vendor/golang.org/x/sys/unix/flock_linux_32bit.go create mode 100644 vendor/golang.org/x/sys/unix/gccgo.go create mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c create mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/lsf_linux.go create mode 100644 vendor/golang.org/x/sys/unix/mkall.sh create mode 100644 vendor/golang.org/x/sys/unix/mkerrors.sh create mode 100644 vendor/golang.org/x/sys/unix/mksyscall.pl create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_linux.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/netlink_linux.go create mode 100644 vendor/golang.org/x/sys/unix/race.go create mode 100644 vendor/golang.org/x/sys/unix/race0.go create mode 100644 vendor/golang.org/x/sys/unix/route_bsd.go create mode 100644 vendor/golang.org/x/sys/unix/route_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/route_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/route_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/route_freebsd_32bit.go create mode 100644 vendor/golang.org/x/sys/unix/route_freebsd_64bit.go create mode 100644 vendor/golang.org/x/sys/unix/route_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/route_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/so_solaris.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go create mode 100644 vendor/golang.org/x/sys/unix/str.go create mode 100644 vendor/golang.org/x/sys/unix/syscall.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go create mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_linux.go create mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go create mode 100644 vendor/golang.org/x/text/LICENSE create mode 100644 vendor/golang.org/x/text/PATENTS create mode 100644 vendor/golang.org/x/text/encoding/encoding.go create mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/gen.go create mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/identifier.go create mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/mib.go create mode 100644 vendor/golang.org/x/text/encoding/internal/internal.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/all.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go create mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule.go create mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go create mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go create mode 100644 vendor/golang.org/x/text/transform/transform.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/bidi.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/bracket.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/core.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen_ranges.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/gen_trieval.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/prop.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/trieval.go create mode 100644 vendor/golang.org/x/text/unicode/norm/composition.go create mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo.go create mode 100644 vendor/golang.org/x/text/unicode/norm/input.go create mode 100644 vendor/golang.org/x/text/unicode/norm/iter.go create mode 100644 vendor/golang.org/x/text/unicode/norm/maketables.go create mode 100644 vendor/golang.org/x/text/unicode/norm/normalize.go create mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter.go create mode 100644 vendor/golang.org/x/text/unicode/norm/tables10.0.0.go create mode 100644 vendor/golang.org/x/text/unicode/norm/tables9.0.0.go create mode 100644 vendor/golang.org/x/text/unicode/norm/transform.go create mode 100644 vendor/golang.org/x/text/unicode/norm/trie.go create mode 100644 vendor/golang.org/x/text/unicode/norm/triegen.go create mode 100644 vendor/google.golang.org/grpc/AUTHORS create mode 100644 vendor/google.golang.org/grpc/CONTRIBUTING.md create mode 100644 vendor/google.golang.org/grpc/LICENSE create mode 100644 vendor/google.golang.org/grpc/Makefile create mode 100644 vendor/google.golang.org/grpc/README.md create mode 100644 vendor/google.golang.org/grpc/backoff.go create mode 100644 vendor/google.golang.org/grpc/balancer.go create mode 100644 vendor/google.golang.org/grpc/balancer/balancer.go create mode 100644 vendor/google.golang.org/grpc/balancer/base/balancer.go create mode 100644 vendor/google.golang.org/grpc/balancer/base/base.go create mode 100644 vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go create mode 100644 vendor/google.golang.org/grpc/balancer_conn_wrappers.go create mode 100644 vendor/google.golang.org/grpc/balancer_v1_wrapper.go create mode 100644 vendor/google.golang.org/grpc/call.go create mode 100644 vendor/google.golang.org/grpc/clientconn.go create mode 100644 vendor/google.golang.org/grpc/codec.go create mode 100644 vendor/google.golang.org/grpc/codegen.sh create mode 100644 vendor/google.golang.org/grpc/codes/code_string.go create mode 100644 vendor/google.golang.org/grpc/codes/codes.go create mode 100644 vendor/google.golang.org/grpc/connectivity/connectivity.go create mode 100644 vendor/google.golang.org/grpc/credentials/credentials.go create mode 100644 vendor/google.golang.org/grpc/credentials/go16.go create mode 100644 vendor/google.golang.org/grpc/credentials/go17.go create mode 100644 vendor/google.golang.org/grpc/credentials/go18.go create mode 100644 vendor/google.golang.org/grpc/credentials/go19.go create mode 100644 vendor/google.golang.org/grpc/dialoptions.go create mode 100644 vendor/google.golang.org/grpc/doc.go create mode 100644 vendor/google.golang.org/grpc/encoding/encoding.go create mode 100644 vendor/google.golang.org/grpc/encoding/proto/proto.go create mode 100644 vendor/google.golang.org/grpc/go16.go create mode 100644 vendor/google.golang.org/grpc/go17.go create mode 100644 vendor/google.golang.org/grpc/grpclog/grpclog.go create mode 100644 vendor/google.golang.org/grpc/grpclog/logger.go create mode 100644 vendor/google.golang.org/grpc/grpclog/loggerv2.go create mode 100644 vendor/google.golang.org/grpc/install_gae.sh create mode 100644 vendor/google.golang.org/grpc/interceptor.go create mode 100644 vendor/google.golang.org/grpc/internal/backoff/backoff.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/funcs.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/types.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/types_linux.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/util_linux_go19.go create mode 100644 vendor/google.golang.org/grpc/internal/channelz/util_nonlinux_pre_go19.go create mode 100644 vendor/google.golang.org/grpc/internal/envconfig/envconfig.go create mode 100644 vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go create mode 100644 vendor/google.golang.org/grpc/internal/internal.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/bdp_estimator.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/controlbuf.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/defaults.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/flowcontrol.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/go16.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/go17.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/handler_server.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/http2_client.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/http2_server.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/http_util.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/log.go create mode 100644 vendor/google.golang.org/grpc/internal/transport/transport.go create mode 100644 vendor/google.golang.org/grpc/keepalive/keepalive.go create mode 100644 vendor/google.golang.org/grpc/metadata/metadata.go create mode 100644 vendor/google.golang.org/grpc/naming/dns_resolver.go create mode 100644 vendor/google.golang.org/grpc/naming/go17.go create mode 100644 vendor/google.golang.org/grpc/naming/go18.go create mode 100644 vendor/google.golang.org/grpc/naming/naming.go create mode 100644 vendor/google.golang.org/grpc/peer/peer.go create mode 100644 vendor/google.golang.org/grpc/picker_wrapper.go create mode 100644 vendor/google.golang.org/grpc/pickfirst.go create mode 100644 vendor/google.golang.org/grpc/proxy.go create mode 100644 vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go create mode 100644 vendor/google.golang.org/grpc/resolver/dns/go17.go create mode 100644 vendor/google.golang.org/grpc/resolver/dns/go18.go create mode 100644 vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go create mode 100644 vendor/google.golang.org/grpc/resolver/resolver.go create mode 100644 vendor/google.golang.org/grpc/resolver_conn_wrapper.go create mode 100644 vendor/google.golang.org/grpc/rpc_util.go create mode 100644 vendor/google.golang.org/grpc/server.go create mode 100644 vendor/google.golang.org/grpc/service_config.go create mode 100644 vendor/google.golang.org/grpc/stats/handlers.go create mode 100644 vendor/google.golang.org/grpc/stats/stats.go create mode 100644 vendor/google.golang.org/grpc/status/go16.go create mode 100644 vendor/google.golang.org/grpc/status/go17.go create mode 100644 vendor/google.golang.org/grpc/status/status.go create mode 100644 vendor/google.golang.org/grpc/stream.go create mode 100644 vendor/google.golang.org/grpc/tap/tap.go create mode 100644 vendor/google.golang.org/grpc/trace.go create mode 100644 vendor/google.golang.org/grpc/version.go create mode 100644 vendor/google.golang.org/grpc/vet.sh create mode 100644 vendor/gopkg.in/bsm/ratelimit.v1/Makefile create mode 100644 vendor/gopkg.in/bsm/ratelimit.v1/README.md create mode 100644 vendor/gopkg.in/bsm/ratelimit.v1/ratelimit.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/LICENSE create mode 100644 vendor/gopkg.in/go-playground/validator.v8/README.md create mode 100644 vendor/gopkg.in/go-playground/validator.v8/baked_in.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/cache.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/doc.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/logo.png create mode 100644 vendor/gopkg.in/go-playground/validator.v8/regexes.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/util.go create mode 100644 vendor/gopkg.in/go-playground/validator.v8/validator.go create mode 100644 vendor/gopkg.in/redis.v3/LICENSE create mode 100644 vendor/gopkg.in/redis.v3/Makefile create mode 100644 vendor/gopkg.in/redis.v3/README.md create mode 100644 vendor/gopkg.in/redis.v3/cluster.go create mode 100644 vendor/gopkg.in/redis.v3/cluster_pipeline.go create mode 100644 vendor/gopkg.in/redis.v3/command.go create mode 100644 vendor/gopkg.in/redis.v3/commands.go create mode 100644 vendor/gopkg.in/redis.v3/doc.go create mode 100644 vendor/gopkg.in/redis.v3/error.go create mode 100644 vendor/gopkg.in/redis.v3/internal/consistenthash/consistenthash.go create mode 100644 vendor/gopkg.in/redis.v3/internal/hashtag/hashtag.go create mode 100644 vendor/gopkg.in/redis.v3/internal/log.go create mode 100644 vendor/gopkg.in/redis.v3/internal/pool/conn.go create mode 100644 vendor/gopkg.in/redis.v3/internal/pool/pool.go create mode 100644 vendor/gopkg.in/redis.v3/internal/pool/pool_single.go create mode 100644 vendor/gopkg.in/redis.v3/internal/pool/pool_sticky.go create mode 100644 vendor/gopkg.in/redis.v3/multi.go create mode 100644 vendor/gopkg.in/redis.v3/options.go create mode 100644 vendor/gopkg.in/redis.v3/parser.go create mode 100644 vendor/gopkg.in/redis.v3/pipeline.go create mode 100644 vendor/gopkg.in/redis.v3/pubsub.go create mode 100644 vendor/gopkg.in/redis.v3/redis.go create mode 100644 vendor/gopkg.in/redis.v3/ring.go create mode 100644 vendor/gopkg.in/redis.v3/safe.go create mode 100644 vendor/gopkg.in/redis.v3/script.go create mode 100644 vendor/gopkg.in/redis.v3/sentinel.go create mode 100644 vendor/gopkg.in/redis.v3/unsafe.go 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/NOTICE 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/emitterc.go create mode 100644 vendor/gopkg.in/yaml.v2/encode.go create mode 100644 vendor/gopkg.in/yaml.v2/go.mod create mode 100644 vendor/gopkg.in/yaml.v2/go.sum 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/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/vendor.json diff --git a/const/const.go b/const/const.go new file mode 100644 index 0000000..96a9bec --- /dev/null +++ b/const/const.go @@ -0,0 +1,21 @@ +package _const + +var RespCode map[int]string + +const ( + RESP_ERR_COMON = 101 + RESP_ERR_OK = 0 +) + +func init() { + RespCode[RESP_ERR_OK] = "OK" + RespCode[RESP_ERR_COMON] = "Err" +} +func M(key int) string{ + v,ok := RespCode[key] + if ok{ + return v + }else { + return "" + } +} \ No newline at end of file diff --git a/controller/hanlder.go b/controller/hanlder.go index 012c96b..a2d42f1 100644 --- a/controller/hanlder.go +++ b/controller/hanlder.go @@ -74,14 +74,29 @@ func Auth(c *gin.Context) { // @Produce json // @Param q query string false "name search by q" // @Success 200 {array} util.RespBase -// @Failure 400 {object} util.RespBase -// @Failure 404 {object} util.RespBase -// @Failure 500 {object} util.RespBase // @Router /accounts [get] func SetUser(c *gin.Context){ - + var req model.Users + var resp RespBase + resp.Msg = "操作失败" + resp.Status = 20 + defer func() { + c.JSON(200,resp) + }() + e := c.BindJSON(&req) + if nil != e{ + logs.Error(e.Error()) + return + } + } func DelUser(c *gin.Context){ + var resp RespBase + resp.Msg = "操作失败" + resp.Status = 20 + defer func() { + c.JSON(200,resp) + }() } diff --git a/vendor/cloud.google.com/go/civil/LICENSE b/vendor/cloud.google.com/go/civil/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/vendor/cloud.google.com/go/civil/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/cloud.google.com/go/civil/civil.go b/vendor/cloud.google.com/go/civil/civil.go new file mode 100644 index 0000000..1cb2675 --- /dev/null +++ b/vendor/cloud.google.com/go/civil/civil.go @@ -0,0 +1,277 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package civil implements types for civil time, a time-zone-independent +// representation of time that follows the rules of the proleptic +// Gregorian calendar with exactly 24-hour days, 60-minute hours, and 60-second +// minutes. +// +// Because they lack location information, these types do not represent unique +// moments or intervals of time. Use time.Time for that purpose. +package civil + +import ( + "fmt" + "time" +) + +// A Date represents a date (year, month, day). +// +// This type does not include location information, and therefore does not +// describe a unique 24-hour timespan. +type Date struct { + Year int // Year (e.g., 2014). + Month time.Month // Month of the year (January = 1, ...). + Day int // Day of the month, starting at 1. +} + +// DateOf returns the Date in which a time occurs in that time's location. +func DateOf(t time.Time) Date { + var d Date + d.Year, d.Month, d.Day = t.Date() + return d +} + +// ParseDate parses a string in RFC3339 full-date format and returns the date value it represents. +func ParseDate(s string) (Date, error) { + t, err := time.Parse("2006-01-02", s) + if err != nil { + return Date{}, err + } + return DateOf(t), nil +} + +// String returns the date in RFC3339 full-date format. +func (d Date) String() string { + return fmt.Sprintf("%04d-%02d-%02d", d.Year, d.Month, d.Day) +} + +// IsValid reports whether the date is valid. +func (d Date) IsValid() bool { + return DateOf(d.In(time.UTC)) == d +} + +// In returns the time corresponding to time 00:00:00 of the date in the location. +// +// In is always consistent with time.Date, even when time.Date returns a time +// on a different day. For example, if loc is America/Indiana/Vincennes, then both +// time.Date(1955, time.May, 1, 0, 0, 0, 0, loc) +// and +// civil.Date{Year: 1955, Month: time.May, Day: 1}.In(loc) +// return 23:00:00 on April 30, 1955. +// +// In panics if loc is nil. +func (d Date) In(loc *time.Location) time.Time { + return time.Date(d.Year, d.Month, d.Day, 0, 0, 0, 0, loc) +} + +// AddDays returns the date that is n days in the future. +// n can also be negative to go into the past. +func (d Date) AddDays(n int) Date { + return DateOf(d.In(time.UTC).AddDate(0, 0, n)) +} + +// DaysSince returns the signed number of days between the date and s, not including the end day. +// This is the inverse operation to AddDays. +func (d Date) DaysSince(s Date) (days int) { + // We convert to Unix time so we do not have to worry about leap seconds: + // Unix time increases by exactly 86400 seconds per day. + deltaUnix := d.In(time.UTC).Unix() - s.In(time.UTC).Unix() + return int(deltaUnix / 86400) +} + +// Before reports whether d1 occurs before d2. +func (d1 Date) Before(d2 Date) bool { + if d1.Year != d2.Year { + return d1.Year < d2.Year + } + if d1.Month != d2.Month { + return d1.Month < d2.Month + } + return d1.Day < d2.Day +} + +// After reports whether d1 occurs after d2. +func (d1 Date) After(d2 Date) bool { + return d2.Before(d1) +} + +// MarshalText implements the encoding.TextMarshaler interface. +// The output is the result of d.String(). +func (d Date) MarshalText() ([]byte, error) { + return []byte(d.String()), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// The date is expected to be a string in a format accepted by ParseDate. +func (d *Date) UnmarshalText(data []byte) error { + var err error + *d, err = ParseDate(string(data)) + return err +} + +// A Time represents a time with nanosecond precision. +// +// This type does not include location information, and therefore does not +// describe a unique moment in time. +// +// This type exists to represent the TIME type in storage-based APIs like BigQuery. +// Most operations on Times are unlikely to be meaningful. Prefer the DateTime type. +type Time struct { + Hour int // The hour of the day in 24-hour format; range [0-23] + Minute int // The minute of the hour; range [0-59] + Second int // The second of the minute; range [0-59] + Nanosecond int // The nanosecond of the second; range [0-999999999] +} + +// TimeOf returns the Time representing the time of day in which a time occurs +// in that time's location. It ignores the date. +func TimeOf(t time.Time) Time { + var tm Time + tm.Hour, tm.Minute, tm.Second = t.Clock() + tm.Nanosecond = t.Nanosecond() + return tm +} + +// ParseTime parses a string and returns the time value it represents. +// ParseTime accepts an extended form of the RFC3339 partial-time format. After +// the HH:MM:SS part of the string, an optional fractional part may appear, +// consisting of a decimal point followed by one to nine decimal digits. +// (RFC3339 admits only one digit after the decimal point). +func ParseTime(s string) (Time, error) { + t, err := time.Parse("15:04:05.999999999", s) + if err != nil { + return Time{}, err + } + return TimeOf(t), nil +} + +// String returns the date in the format described in ParseTime. If Nanoseconds +// is zero, no fractional part will be generated. Otherwise, the result will +// end with a fractional part consisting of a decimal point and nine digits. +func (t Time) String() string { + s := fmt.Sprintf("%02d:%02d:%02d", t.Hour, t.Minute, t.Second) + if t.Nanosecond == 0 { + return s + } + return s + fmt.Sprintf(".%09d", t.Nanosecond) +} + +// IsValid reports whether the time is valid. +func (t Time) IsValid() bool { + // Construct a non-zero time. + tm := time.Date(2, 2, 2, t.Hour, t.Minute, t.Second, t.Nanosecond, time.UTC) + return TimeOf(tm) == t +} + +// MarshalText implements the encoding.TextMarshaler interface. +// The output is the result of t.String(). +func (t Time) MarshalText() ([]byte, error) { + return []byte(t.String()), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// The time is expected to be a string in a format accepted by ParseTime. +func (t *Time) UnmarshalText(data []byte) error { + var err error + *t, err = ParseTime(string(data)) + return err +} + +// A DateTime represents a date and time. +// +// This type does not include location information, and therefore does not +// describe a unique moment in time. +type DateTime struct { + Date Date + Time Time +} + +// Note: We deliberately do not embed Date into DateTime, to avoid promoting AddDays and Sub. + +// DateTimeOf returns the DateTime in which a time occurs in that time's location. +func DateTimeOf(t time.Time) DateTime { + return DateTime{ + Date: DateOf(t), + Time: TimeOf(t), + } +} + +// ParseDateTime parses a string and returns the DateTime it represents. +// ParseDateTime accepts a variant of the RFC3339 date-time format that omits +// the time offset but includes an optional fractional time, as described in +// ParseTime. Informally, the accepted format is +// YYYY-MM-DDTHH:MM:SS[.FFFFFFFFF] +// where the 'T' may be a lower-case 't'. +func ParseDateTime(s string) (DateTime, error) { + t, err := time.Parse("2006-01-02T15:04:05.999999999", s) + if err != nil { + t, err = time.Parse("2006-01-02t15:04:05.999999999", s) + if err != nil { + return DateTime{}, err + } + } + return DateTimeOf(t), nil +} + +// String returns the date in the format described in ParseDate. +func (dt DateTime) String() string { + return dt.Date.String() + "T" + dt.Time.String() +} + +// IsValid reports whether the datetime is valid. +func (dt DateTime) IsValid() bool { + return dt.Date.IsValid() && dt.Time.IsValid() +} + +// In returns the time corresponding to the DateTime in the given location. +// +// If the time is missing or ambigous at the location, In returns the same +// result as time.Date. For example, if loc is America/Indiana/Vincennes, then +// both +// time.Date(1955, time.May, 1, 0, 30, 0, 0, loc) +// and +// civil.DateTime{ +// civil.Date{Year: 1955, Month: time.May, Day: 1}}, +// civil.Time{Minute: 30}}.In(loc) +// return 23:30:00 on April 30, 1955. +// +// In panics if loc is nil. +func (dt DateTime) In(loc *time.Location) time.Time { + return time.Date(dt.Date.Year, dt.Date.Month, dt.Date.Day, dt.Time.Hour, dt.Time.Minute, dt.Time.Second, dt.Time.Nanosecond, loc) +} + +// Before reports whether dt1 occurs before dt2. +func (dt1 DateTime) Before(dt2 DateTime) bool { + return dt1.In(time.UTC).Before(dt2.In(time.UTC)) +} + +// After reports whether dt1 occurs after dt2. +func (dt1 DateTime) After(dt2 DateTime) bool { + return dt2.Before(dt1) +} + +// MarshalText implements the encoding.TextMarshaler interface. +// The output is the result of dt.String(). +func (dt DateTime) MarshalText() ([]byte, error) { + return []byte(dt.String()), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// The datetime is expected to be a string in a format accepted by ParseDateTime +func (dt *DateTime) UnmarshalText(data []byte) error { + var err error + *dt, err = ParseDateTime(string(data)) + return err +} diff --git a/vendor/document/logs/logs.go b/vendor/document/logs/logs.go new file mode 100644 index 0000000..ee29b8f --- /dev/null +++ b/vendor/document/logs/logs.go @@ -0,0 +1,148 @@ +package logs + +import ( + "fmt" + "os" + "runtime" + "time" +) + +const ( + LOG_ERROR = iota + LOG_WARING + LOG_INFO + LOG_DEBUG +) + +var log *mylog + +/* + * 初始化 + */ +func init() { + log = newMylog() +} + +func Init(dir string, file string, level int, savefile bool) { + log.setDir(dir) + log.setFile(file) + log.setLevel(level) + log.setSavefile(savefile) +} + +func Error(err ...interface{}) { + log.write(LOG_ERROR, fmt.Sprint(err...)) +} + +func Waring(war ...interface{}) { + log.write(LOG_WARING, fmt.Sprint(war...)) +} +func SetLevel(level int) { + log.setLevel(level) +} +func Info(info ...interface{}) { + log.write(LOG_INFO, fmt.Sprint(info...)) +} + +func Debug(deb ...interface{}) { + log.write(LOG_DEBUG, fmt.Sprint(deb...)) +} + +/* + * 日志执行函数 + */ +type mylog struct { + log chan string // 日志chan + dir string // 日志存放目录 + file string // 日志文件名 + savefile bool // 是否保存到文件 + level int // 日志级别 +} + +func newMylog() *mylog { + log := &mylog{} + + log.log = make(chan string, 100) + log.dir = "/opt/logs" + log.file = "out" + log.savefile = false + + go log.run() + return log +} + +func (l *mylog) setDir(dir string) { + l.dir = dir +} + +func (l *mylog) setFile(file string) { + l.file = file +} + +func (l *mylog) setSavefile(b bool) { + l.savefile = b +} + +func (l *mylog) setLevel(level int) { + l.level = level +} + +func (l *mylog) getLevelString(level int) string { + switch level { + case LOG_ERROR: + return "ERROR" + case LOG_WARING: + return "WARING" + case LOG_INFO: + return "INFO" + case LOG_DEBUG: + return "DEBUG" + } + + return "unknown" +} + +func (l *mylog) write(level int, str string) { + // 判断级别 + if level > l.level { + return + } + + // 输出日志 + pc, _, line, _ := runtime.Caller(2) + p := runtime.FuncForPC(pc) + t := time.Now() + str = fmt.Sprintf("[%04d-%02d-%02d %02d:%02d:%02d] [%s] %s(%d): %s\n", + t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), + l.getLevelString(level), p.Name(), line, str) + // 输出到控制台 + if false == l.savefile { + fmt.Print(str) + return + } + + // 输出到文件 + l.log <- str +} + +func (l *mylog) run() { + for { + str := <-l.log + + // 判断文件夹是否存在 + _, err := os.Stat(l.dir) + if nil != err { + os.MkdirAll(l.dir, os.ModePerm) + } + + // 获取时间 + t := time.Now() + path := fmt.Sprintf("%s/%s-%04d-%02d-%02d.log", l.dir, l.file, + t.Year(), t.Month(), t.Day()) + fp, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.ModePerm) + if nil == err { + fp.WriteString(str) + fp.Close() + } + } +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/README.md b/vendor/git.jiaxianghudong.com/go/utils/README.md new file mode 100644 index 0000000..e69de29 diff --git a/vendor/git.jiaxianghudong.com/go/utils/bytebuffer.go b/vendor/git.jiaxianghudong.com/go/utils/bytebuffer.go new file mode 100644 index 0000000..73b1216 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/bytebuffer.go @@ -0,0 +1,87 @@ +package utils + +// 加入8字节 +func Put8bit(buf []byte, n byte) []byte { + return append(buf, n) +} + +// 加入16字节 +func Put16bit(buf []byte, n uint16) []byte { + var by [2]byte + + by[0] = byte((n >> 8) & 0xff) + by[1] = byte(n & 0xff) + + return append(buf, by[:]...) +} + +// 加入32字节 +func Put32bit(buf []byte, n uint32) []byte { + var by [4]byte + + by[0] = byte((n >> 24) & 0xff) + by[1] = byte((n >> 16) & 0xff) + by[2] = byte((n >> 8) & 0xff) + by[3] = byte(n & 0xff) + + return append(buf, by[:]...) +} + +// 加入64字节 +func Put64bit(buf []byte, n uint64) []byte { + var by [8]byte + + by[0] = byte((n >> 56) & 0xff) + by[1] = byte((n >> 48) & 0xff) + by[2] = byte((n >> 40) & 0xff) + by[3] = byte((n >> 32) & 0xff) + by[4] = byte((n >> 24) & 0xff) + by[5] = byte((n >> 16) & 0xff) + by[6] = byte((n >> 8) & 0xff) + by[7] = byte(n & 0xff) + + return append(buf, by[:]...) +} + +// 获取8bit +func Get8bit(buf []byte, start int) byte { + return buf[start] +} + +// 获取16bit +func Get16bit(buf []byte, start int) uint16 { + var ret uint16 + + ret = uint16(buf[start]) << 8 + ret |= uint16(buf[start+1]) + + return ret +} + +// 获取32big +func Get32bit(buf []byte, start int) uint32 { + var ret uint32 + + ret = uint32(buf[start]) << 24 + ret |= uint32(buf[start+1]) << 16 + ret |= uint32(buf[start+2]) << 8 + ret |= uint32(buf[start+3]) + + return ret +} + +// 获取64bit +func Get64bit(buf []byte, start int) uint64 { + var ret uint64 + + ret = uint64(buf[start]) << 56 + ret |= uint64(buf[start+1]) << 48 + ret |= uint64(buf[start+2]) << 40 + ret |= uint64(buf[start+3]) << 32 + ret |= uint64(buf[start+4]) << 24 + ret |= uint64(buf[start+5]) << 16 + ret |= uint64(buf[start+6]) << 8 + ret |= uint64(buf[start+7]) + + return ret +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/coding.go b/vendor/git.jiaxianghudong.com/go/utils/coding.go new file mode 100644 index 0000000..18180b2 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/coding.go @@ -0,0 +1,289 @@ +package utils + +import ( + "encoding/json" + "strings" + "log" + "time" + "fmt" + "encoding/pem" + "crypto/x509" + "crypto/rsa" + "encoding/base64" + "errors" + "io" + "net/url" + "hash/crc32" + crand "crypto/rand" + "crypto/hmac" + "crypto/sha1" + "crypto/md5" +) + +// md5 +func Md5Sum(text string) string { + h := md5.New() + io.WriteString(h, text) + return fmt.Sprintf("%x", h.Sum(nil)) +} + +// 加解密函数 根据dz的Authcode改写的go版本 +// params[0] 加密or解密 bool true:加密 false:解密 默认false +// params[1] 秘钥 +// params[2] 加密:过期时间 +// params[3] 动态秘钥长度 默认:4位 不能大于32位 +func Authcode(text string, params ...interface{}) string { + defer func() { + if err := recover(); err != nil { + log.Printf("authcode error:%#v", err) + } + }() + + l := len(params) + + isEncode := false + key := "DH-Framework" + expiry := 0 + cKeyLen := 10 + + if l > 0 { + isEncode = params[0].(bool) + } + + if l > 1 { + key = params[1].(string) + } + + if l > 2 { + expiry = params[2].(int) + if expiry < 0 { + expiry = 0 + } + } + + if l > 3 { + cKeyLen = params[3].(int) + if cKeyLen < 0 { + cKeyLen = 0 + } + } + if cKeyLen > 32 { + cKeyLen = 32 + } + + timestamp := time.Now().Unix() + + // md5加密key + mKey := Md5Sum(key) + + // 参与加密的 + keyA := Md5Sum(mKey[0:16]) + // 用于验证数据有效性的 + keyB := Md5Sum(mKey[16:]) + // 动态部分 + var keyC string + if cKeyLen > 0 { + if isEncode { + // 加密的时候,动态获取一个秘钥 + keyC = Md5Sum(fmt.Sprint(timestamp))[32 - cKeyLen:] + } else { + // 解密的时候从头部获取动态秘钥部分 + keyC = text[0:cKeyLen] + } + } + + // 加入了动态的秘钥 + cryptKey := keyA + Md5Sum(keyA + keyC) + // 秘钥长度 + keyLen := len(cryptKey) + if isEncode { + // 加密 前10位是过期验证字符串 10-26位字符串验证 + var d int64 + if expiry > 0 { + d = timestamp + int64(expiry) + } + text = fmt.Sprintf("%010d%s%s", d, Md5Sum(text + keyB)[0:16], text) + } else { + // 解密 + text = string(Base64Decode(text[cKeyLen:])) + } + + // 字符串长度 + textLen := len(text) + if textLen <= 0 { + panic(fmt.Sprintf("auth[%s]textLen<=0", text)) + } + + // 密匙簿 + box := Range(0, 256) + // 对称算法 + var rndKey []int + cryptKeyB := []byte(cryptKey) + for i := 0; i < 256; i++ { + pos := i % keyLen + rndKey = append(rndKey, int(cryptKeyB[pos])) + } + + j := 0 + for i := 0; i < 256; i++ { + j = (j + box[i] + rndKey[i]) % 256 + box[i], box[j] = box[j], box[i] + } + + textB := []byte(text) + a := 0 + j = 0 + var result []byte + for i := 0; i < textLen; i++ { + a = (a + 1) % 256 + j = (j + box[a]) % 256 + box[a], box[j] = box[j], box[a] + result = append(result, byte(int(textB[i]) ^ (box[(box[a] + box[j]) % 256]))) + } + + if isEncode { + return keyC + strings.Replace(Base64Encode(result), "=", "", -1) + } + + // 获取前10位,判断过期时间 + d := Atoi64(string(result[0:10]), 0) + if (d == 0 || d - timestamp > 0) && string(result[10:26]) == Md5Sum(string(result[26:]) + keyB)[0:16] { + return string(result[26:]) + } + + panic(fmt.Sprintf("auth[%s]", text)) + + return "" +} + +// AuthcodeUrl 处理Authcode函数的加密解密结果以便url传输 +func AuthcodeUrl(text string, params ...interface{}) string { + isEncode := false + if len(params) > 0 { + isEncode = params[0].(bool) + } + if isEncode { //加密 + return strings.Replace(strings.Replace(Authcode(text, params...), "+", ",", -1), "/", "-", -1) + } else { + return Authcode(strings.Replace(strings.Replace(text, ",", "+", -1), "-", "/", -1), params...) + } +} + +// JsonEncode 编码JSON +func JsonEncode(m interface{}) string { + b, err := json.Marshal(m) + if err != nil { + log.Printf("Json Encode[%#v] Error:%s", m, err.Error()) + return "" + } + return string(b) +} + +// JsonDecode 解码JSON +func JsonDecode(str string, v ...interface{}) (interface{}, error) { + var m interface{} + if len(v) > 0 { + m = v[0] + } else { + m = make(map[string]interface{}) + } + + err := json.Unmarshal([]byte(str), &m) + if err != nil { + return nil, err + } + + return m, nil +} + +func Crc32(text string) string { + h := crc32.NewIEEE() + io.WriteString(h, text) + return fmt.Sprintf("%d", h.Sum32()) +} + +// RsaEncode rsa加密 +func RsaEncode(b, rsaKey []byte) ([]byte, error) { + block, _ := pem.Decode(rsaKey) + if block == nil { + return b, errors.New("key error") + } + pub, err := x509.ParsePKIXPublicKey(block.Bytes) + if err != nil { + return b, err + } + return rsa.EncryptPKCS1v15(crand.Reader, pub.(*rsa.PublicKey), b) +} + +// RsaDecode rsa解密 +func RsaDecode(b, rsaKey []byte) ([]byte, error) { + block, _ := pem.Decode(rsaKey) + if block == nil { + return b, errors.New("key error") + } + priv, err := x509.ParsePKCS1PrivateKey(block.Bytes) + if err != nil { + return b, err + } + return rsa.DecryptPKCS1v15(crand.Reader, priv, b) +} + +func HashHmac(data, key string) string { + mac := hmac.New(sha1.New, []byte(key)) + mac.Write([]byte(data)) + return fmt.Sprintf("%x", mac.Sum(nil)) +} + +func HashHmacRaw(data, key string) string { + mac := hmac.New(sha1.New, []byte(key)) + mac.Write([]byte(data)) + return fmt.Sprintf("%s", mac.Sum(nil)) +} + +// Base64Encode Base64编码 +func Base64Encode(b []byte) string { + return base64.StdEncoding.EncodeToString(b) +} + +// Base64Decode Base64解码 +func Base64Decode(str string) []byte { + var b []byte + var err error + x := len(str) * 3 % 4 + switch { + case x == 2: + str += "==" + case x == 1: + str += "=" + } + if b, err = base64.StdEncoding.DecodeString(str); err != nil { + return b + } + + return b +} + +// UrlEncode 编码 +func UrlEncode(str string) string { + return url.QueryEscape(str) +} + +// UrlDecode 解码 +func UrlDecode(str string) string { + ret, _ := url.QueryUnescape(str) + return ret +} + +/*func Urlencode(str string) string { + return base64.URLEncoding.EncodeToString([]byte(str)) +} + +func Urldecode(str string) string { + b, e := base64.URLEncoding.DecodeString(str) + if e != nil { + log.Printf("urldecode error:%s", e.Error()) + return "" + } + + return string(b) +}*/ diff --git a/vendor/git.jiaxianghudong.com/go/utils/conf.go b/vendor/git.jiaxianghudong.com/go/utils/conf.go new file mode 100644 index 0000000..af8814f --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/conf.go @@ -0,0 +1,80 @@ +package utils + +import ( + "errors" + "io/ioutil" + "os" + "os/exec" + "path/filepath" +) + +const ( + FILE_OPEN_TYPE_READ int = 0 + FILE_OPEN_TYPE_WRITE int = 1 + FILE_OPEN_TYPE_APPEND int = 2 +) + +// ReadTextFile 读取文件 +func ReadTextFile(path string) string { + fp, err := os.Open(path) + if nil != err { + return "" + } + defer fp.Close() + d, err := ioutil.ReadAll(fp) + if nil != err { + return "" + } + return string(d) +} + +/* + * 读取配置文件 + */ +func ReadConfFile(file string) string { + return ReadTextFile(GetConfPath(file)) +} + +// 获取配置文件路径 +func GetConfPath(fname string) string { + // 绝对路径 + if len(fname) > 2 && ('/' == fname[0] || ':' == fname[1]) { + return fname + } + return GetFilePathBaseExe("./" + fname) +} + +// 以exe为根节点获取文件路径 +func GetFilePathBaseExe(fname string) string { + // 绝对路径 + if len(fname) > 2 && ('/' == fname[0] || ':' == fname[1]) { + return fname + } + // 相对路径 + file, _ := exec.LookPath(os.Args[0]) + return filepath.Join(filepath.Dir(file), fname) +} + +// 创建目录 +func CreateDir(dirName string) error { + // 判断目录是否存在 + if _, err := os.Stat(dirName); false == os.IsNotExist(err) { + return nil + } + + // 分解上层目录 + pdir := filepath.Dir(dirName) + if "" == pdir { + return errors.New("error dir format") + } + + // 判断目录是否存在 + if _, err := os.Stat(pdir); os.IsNotExist(err) { + err = CreateDir(pdir) + if nil != err { + return err + } + } + + return os.Mkdir(dirName, 0755) +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/convert.go b/vendor/git.jiaxianghudong.com/go/utils/convert.go new file mode 100644 index 0000000..c159409 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/convert.go @@ -0,0 +1,329 @@ +package utils + +import ( + "bytes" + "fmt" + "io/ioutil" + "reflect" + "regexp" + "strconv" + "strings" + "time" + + "golang.org/x/text/encoding/simplifiedchinese" + "golang.org/x/text/transform" +) + +// GetTypeName 获取参数类型 +func GetTypeName(v interface{}) string { + return reflect.TypeOf(v).String() +} + +// Btoi 布尔值转整形 +func Btoi(b bool) int { + if b { + return 1 + } + return 0 +} + +// Itoa 整型转字符串 +func Itoa(i int) string { + return strconv.Itoa(i) +} + +// Atoi 转换成整型 +func Atoi(s string, d ...int) int { + i, err := strconv.Atoi(s) + if err != nil { + if len(d) > 0 { + return d[0] + } else { + return 0 + } + } + + return i +} + +// AtoUi 转换成无符号整型 +func AtoUi(s string) uint { + return uint(Atoi64(s)) +} + +// Atoi64 转换成整型int64 +func Atoi64(s string, d ...int64) int64 { + i, err := strconv.ParseInt(s, 10, 64) + if err != nil { + if len(d) > 0 { + return d[0] + } else { + return 0 + } + } + + return i +} + +// AtoUi64 转换成整型float64 +func AtoUi64(s string, d ...uint64) uint64 { + i, err := strconv.ParseUint(s, 10, 64) + if err != nil { + if len(d) > 0 { + return d[0] + } else { + return 0 + } + } + + return i +} + +// Atof 转换成float32整型 +func Atof(s string, d ...float32) float32 { + f, err := strconv.ParseFloat(s, 32) + if err != nil { + if len(d) > 0 { + return d[0] + } else { + return 0 + } + } + + return float32(f) +} + +// Atof64 转换成整型float64 +func Atof64(s string, d ...float64) float64 { + f, err := strconv.ParseFloat(s, 64) + if err != nil { + if len(d) > 0 { + return d[0] + } else { + return 0 + } + } + + return f +} + +// UitoA 32位无符号整形转字符串 +func UitoA(i uint) string { + return strconv.FormatUint(uint64(i), 10) +} + +// Ui32toA 32位无符号整形转字符串 +func Ui32toA(i uint32) string { + return strconv.FormatUint(uint64(i), 10) +} + +// Ui64toA 64位无符号整形转字符串 +func Ui64toA(i uint64) string { + return strconv.FormatUint(i, 10) +} + +// I64toA 64位整形转字符串 +func I64toA(i int64) string { + return strconv.FormatInt(i, 10) +} + +// F32toA 32位浮点数转字符串 +func F32toA(f float32) string { + return F64toA(float64(f)) +} + +// F64toA 64位浮点数转字符串 +func F64toA(f float64) string { + return strconv.FormatFloat(f, 'f', -1, 64) +} + +// DateFormat 日期格式化 +func DateFormat(format string, t time.Time) string { + patterns := []string{ + // 年 + "Y", "2006", // 4 位数字完整表示的年份 + "y", "06", // 2 位数字表示的年份 + + // 月 + "m", "01", // 数字表示的月份,有前导零 + "n", "1", // 数字表示的月份,没有前导零 + "M", "Jan", // 三个字母缩写表示的月份 + "F", "January", // 月份,完整的文本格式,例如 January 或者 March + + // 日 + "d", "02", // 月份中的第几天,有前导零的 2 位数字 + "j", "2", // 月份中的第几天,没有前导零 + + "D", "Mon", // 星期几,文本表示,3 个字母 + "l", "Monday", // 星期几,完整的文本格式;L的小写字母 + + // 时间 + "g", "3", // 小时,12 小时格式,没有前导零 + "G", "15", // 小时,24 小时格式,没有前导零 + "h", "03", // 小时,12 小时格式,有前导零 + "H", "15", // 小时,24 小时格式,有前导零 + + "a", "pm", // 小写的上午和下午值 + "A", "PM", // 小写的上午和下午值 + + "i", "04", // 有前导零的分钟数 + "s", "05", // 秒数,有前导零 + } + replacer := strings.NewReplacer(patterns...) + format = replacer.Replace(format) + return t.Format(format) +} + +// StrToLocalTime 字符串转本地时间 +func StrToLocalTime(value string) (time.Time, error) { + if value == "" { + return time.Time{}, nil + } + zoneName, offset := time.Now().Zone() + + zoneValue := offset / 3600 * 100 + if zoneValue > 0 { + value += fmt.Sprintf(" +%04d", zoneValue) + } else { + value += fmt.Sprintf(" -%04d", zoneValue) + } + + if zoneName != "" { + value += " " + zoneName + } + return StrToTime(value) +} + +// StrToTime 字符串转时间 +func StrToTime(value string) (time.Time, error) { + if value == "" { + return time.Time{}, nil + } + layouts := []string{ + "2006-01-02 15:04:05 -0700 MST", + "2006-01-02 15:04:05 -0700", + "2006-01-02 15:04:05", + "2006/01/02 15:04:05 -0700 MST", + "2006/01/02 15:04:05 -0700", + "2006/01/02 15:04:05", + "2006-01-02 -0700 MST", + "2006-01-02 -0700", + "2006-01-02", + "2006/01/02 -0700 MST", + "2006/01/02 -0700", + "2006/01/02", + "2006-01-02 15:04:05 -0700 -0700", + "2006/01/02 15:04:05 -0700 -0700", + "2006-01-02 -0700 -0700", + "2006/01/02 -0700 -0700", + time.ANSIC, + time.UnixDate, + time.RubyDate, + time.RFC822, + time.RFC822Z, + time.RFC850, + time.RFC1123, + time.RFC1123Z, + time.RFC3339, + time.RFC3339Nano, + time.Kitchen, + time.Stamp, + time.StampMilli, + time.StampMicro, + time.StampNano, + } + + var t time.Time + var err error + for _, layout := range layouts { + t, err = time.ParseInLocation(layout, value, time.Local) + if err == nil { + return t, nil + } + } + return time.Time{}, err +} + +// StructToMap 结构转map +func StructToMap(data interface{}) map[string]interface{} { + result := make(map[string]interface{}) + elem := reflect.ValueOf(data).Elem() + size := elem.NumField() + + for i := 0; i < size; i++ { + field := elem.Type().Field(i).Name + value := elem.Field(i).Interface() + result[field] = value + } + + return result +} + +// 带xml标签的Struct结构转map,用xml标注做key +func XMLStructToMap(data interface{}) map[string]interface{} { + result := make(map[string]interface{}) + elem := reflect.ValueOf(data).Elem() + size := elem.NumField() + + for i := 0; i < size; i++ { + field := elem.Type().Field(i).Tag.Get("xml") + value := elem.Field(i).Interface() + result[field] = value + } + + return result +} + +// Ip2long IP转长整型 +func Ip2long(ipstr string) (ip uint32) { + r := `^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})` + reg, err := regexp.Compile(r) + if err != nil { + return + } + ips := reg.FindStringSubmatch(ipstr) + if ips == nil { + return + } + + ip1, _ := strconv.Atoi(ips[1]) + ip2, _ := strconv.Atoi(ips[2]) + ip3, _ := strconv.Atoi(ips[3]) + ip4, _ := strconv.Atoi(ips[4]) + + if ip1 > 255 || ip2 > 255 || ip3 > 255 || ip4 > 255 { + return + } + + ip += uint32(ip1 * 0x1000000) + ip += uint32(ip2 * 0x10000) + ip += uint32(ip3 * 0x100) + ip += uint32(ip4) + + return +} + +// Long2ip 长整型转IP +func Long2ip(ip uint32) string { + return fmt.Sprintf("%d.%d.%d.%d", ip>>24, ip<<8>>24, ip<<16>>24, ip<<24>>24) +} + +// GbkToUtf8 GBK转UTF-8 +func GbkToUtf8(s []byte) ([]byte, error) { + reader := transform.NewReader(bytes.NewReader(s), simplifiedchinese.GBK.NewDecoder()) + d, e := ioutil.ReadAll(reader) + if e != nil { + return nil, e + } + return d, nil +} + +// Utf8ToGbk UTF-8转GBK +func Utf8ToGbk(s []byte) ([]byte, error) { + reader := transform.NewReader(bytes.NewReader(s), simplifiedchinese.GBK.NewEncoder()) + d, e := ioutil.ReadAll(reader) + if e != nil { + return nil, e + } + return d, nil +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/counter.go b/vendor/git.jiaxianghudong.com/go/utils/counter.go new file mode 100644 index 0000000..0965e6e --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/counter.go @@ -0,0 +1,25 @@ +package utils + +import ( + "sync/atomic" +) + +// Counter 原子计数器 +type Counter struct { + v int64 +} + +// Add 计数加 +func (c *Counter) Add(i int64) { + atomic.AddInt64(&c.v, i) +} + +// Get 取计数 +func (c *Counter) Get() int64 { + return c.v +} + +// Reset 重置计数器 +func (c *Counter) Reset() { + c.Add(c.v * -1) +} \ No newline at end of file diff --git a/vendor/git.jiaxianghudong.com/go/utils/file.go b/vendor/git.jiaxianghudong.com/go/utils/file.go new file mode 100644 index 0000000..c017aa0 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/file.go @@ -0,0 +1,75 @@ +package utils + +import ( + "bytes" + "errors" + "io/ioutil" + "os" + "runtime" +) + +// FileIsExist 检查文件是否存在 +func FileIsExist(path string) bool { + _, err := os.Stat(path) + if err != nil && os.IsNotExist(err) { + return false + } + return true +} + +// GetFileContents 读取文件内容 +func GetFileContents(path string) string { + fi, err := os.Open(path) + if err != nil { + return "" + } + defer fi.Close() + fd, err := ioutil.ReadAll(fi) + return string(bytes.Trim(fd, "\xef\xbb\xbf")) +} + +// DirIsExist 检查目录是否存在 +func DirIsExist(path string) bool { + fileinfo, err := os.Stat(path) + if err != nil { + return os.IsExist(err) + } else { + return fileinfo.IsDir() + } +} + +// 打开文件 +func OpenFile(path string, fileName string, openType int) (*os.File, error) { + + fileFullPath := path + "/" + fileName + if runtime.GOOS == "windows" { + fileFullPath = path + "\\" + fileName + } + isFileExist := FileIsExist(fileFullPath) + + switch openType { + case FILE_OPEN_TYPE_READ: + if isFileExist { + f, err := os.OpenFile(fileFullPath, os.O_RDONLY, 0644) + return f, err + } else { + return nil, errors.New("file not exist") + } + case FILE_OPEN_TYPE_WRITE: + if isFileExist { + return nil, errors.New("file already existed") + } else { + f, err := os.OpenFile(fileFullPath, os.O_CREATE|os.O_WRONLY, 0644) + return f, err + } + case FILE_OPEN_TYPE_APPEND: + if !isFileExist { + f, err := os.OpenFile(fileFullPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) + return f, err + } else { + f, err := os.OpenFile(fileFullPath, os.O_APPEND|os.O_WRONLY, 0644) + return f, err + } + } + return nil, nil +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/http_helper.go b/vendor/git.jiaxianghudong.com/go/utils/http_helper.go new file mode 100644 index 0000000..04ed988 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/http_helper.go @@ -0,0 +1,144 @@ +package utils + +import ( + "bytes" + "strings" + + "crypto/tls" + "errors" + "fmt" + "io/ioutil" + "net/http" + "net/url" +) + +// Get +func Get(apiUrl string, parm map[string]string, header map[string]string, isHttps bool) ([]byte, error) { + + if len(parm) > 0 { + apiUrl = fmt.Sprintf("%s%s", apiUrl, "?") + p := "" + for k, v := range parm { + if p == "" { + p = fmt.Sprintf("%s=%s", k, v) + } else { + p = fmt.Sprintf("%s&%s=%s", p, k, v) + } + } + apiUrl = fmt.Sprintf("%s%s", apiUrl, p) + } + + client := &http.Client{} + + if isHttps { + client.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + } + reqest, _ := http.NewRequest("GET", apiUrl, nil) + + for k, v := range header { + reqest.Header.Set(k, v) + } + + response, err := client.Do(reqest) + if nil != err { + return nil, err + } + + defer response.Body.Close() + if response.StatusCode != 200 { + return nil, errors.New(response.Status) + } + + body, err := ioutil.ReadAll(response.Body) + if nil != err { + return nil, err + } + + return body, nil +} + +// post +func Post(apiUrl string, data []byte, header map[string]string, isHttps bool) ([]byte, error) { + + client := &http.Client{} + + if isHttps { + client.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + } + reqest, _ := http.NewRequest("POST", apiUrl, bytes.NewReader(data)) + + for k, v := range header { + reqest.Header.Set(k, v) + } + + response, err := client.Do(reqest) + if nil != err { + return nil, err + } + + defer response.Body.Close() + if response.StatusCode != 200 { + return nil, errors.New(response.Status) + } + + body, err := ioutil.ReadAll(response.Body) + if nil != err { + return nil, err + } + + return body, nil +} + +// post +func PostMap(apiUrl string, parm map[string]string, header map[string]string, isHttps bool) ([]byte, error) { + + data := url.Values{} + for k, v := range parm { + data.Set(k, v) + } + + reqParams := ioutil.NopCloser(strings.NewReader(data.Encode())) + client := &http.Client{} + + if isHttps { + client.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + } + reqest, _ := http.NewRequest("POST", apiUrl, reqParams) + + for k, v := range header { + reqest.Header.Set(k, v) + } + + response, err := client.Do(reqest) + if nil != err { + return nil, err + } + + defer response.Body.Close() + if response.StatusCode != 200 { + return nil, errors.New(response.Status) + } + + body, err := ioutil.ReadAll(response.Body) + if nil != err { + return nil, err + } + + return body, nil +} + +// 获取远程ip +func GetRemoteIP(r *http.Request) string { + addr := r.Header.Get("Remote_addr") + if addr == "" { + addr = r.RemoteAddr + } + + return strings.Split(addr, ":")[0] +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/human.go b/vendor/git.jiaxianghudong.com/go/utils/human.go new file mode 100644 index 0000000..500ae42 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/human.go @@ -0,0 +1,36 @@ +package utils + +import ( + "fmt" +) + +// HumanTimeSecond 格式化秒数 +func HumanTimeSecond(s int64, separator ...string) string { + const ( + Minute = 60 + Hour = 60 * Minute + Day = 24 * Hour + ) + var d, h, m int64 + + d = s / Day + s = s % Day + h = s / Hour + s = s % Hour + m = s / Minute + s = s % Minute + + var sep string + if len(separator) == 1 { + sep = separator[0] + } + + if d > 0 { + return fmt.Sprintf("%dd%s%dh%s%dm%s%ds", d, sep, h, sep, m, sep, s) + } else if h > 0 { + return fmt.Sprintf("%dh%s%dm%s%ds", h, sep, m, sep, s) + } else if m > 0 { + return fmt.Sprintf("%dm%s%ds", m, sep, s) + } + return fmt.Sprintf("%ds", s) +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/image.go b/vendor/git.jiaxianghudong.com/go/utils/image.go new file mode 100644 index 0000000..353f015 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/image.go @@ -0,0 +1,118 @@ +package utils + +import ( + "net/http" + "os" + "strconv" + "time" + "path" + "io" + "strings" + "errors" + "github.com/dustin/go-humanize" + "github.com/disintegration/imaging" +) + +type Size interface { + Size() int64 //字节 +} + +// 图片上传器 +type ImageUploader struct { + UploadPath string //图片保存的磁盘目录 + UrlPath string //上传图片的URL路径 + FileName string //文件名(不含扩展名) + AllowExtName string //允许的扩展名 + Rename bool //是否重命名文件 + Cut bool //是否裁剪图片 + Resize bool //是否重新调整大小 + ToWidth int //要操作的图片宽度 + ToHeight int //要操作的图片高度 + MaxSize uint64 //图片大小,字节 +} + +// 创建一个新的图片上传器 +func NewImageUploader(path string) *ImageUploader { + return &ImageUploader{ + UploadPath: path, + UrlPath: "/upload", + AllowExtName: "gif,jpg,png,jpeg", + Rename: true, + MaxSize: 2000000, //2M + } +} + +// 上传图片 +func (this *ImageUploader) Upload(r *http.Request) (string, error) { + r.ParseMultipartForm(32 << 20) + if r.MultipartForm != nil && r.MultipartForm.File != nil { + file, handler, err := r.FormFile("file") + if err != nil { + return "", err + } + defer file.Close() + + //检查图片大小 + if sizeInterface, ok := file.(Size); ok { + size := uint64(sizeInterface.Size()) + if size > this.MaxSize { + return "", errors.New("图片过大,请换一张小于 " + humanize.Bytes(size) + " 的图片重新上传") + } + } else { + return "", errors.New("图片尺寸超限或未能取得图片大小,请尝试换一张图片") + } + + if !DirIsExist(this.UploadPath) { + err := os.MkdirAll(this.UploadPath, os.ModePerm) + if err != nil { + return "", err + } + } + + extname := strings.ToLower(path.Ext(handler.Filename)) + allowExt := strings.Split(this.AllowExtName, ",") + if InArray(Substr(extname, 1), allowExt) == -1 { + return "", errors.New("不允许上传该格式的文件") + } + + filename := this.FileName + if filename == "" { + filename = path.Base(handler.Filename) + //唯一文件名 + if this.Rename { + filename = Md5Sum(strconv.FormatInt(time.Now().UnixNano(), 10)) + } + } + + if (this.Cut || this.Resize) && this.ToWidth > 0 && this.ToHeight > 0 { + srcImg, err := imaging.Decode(file) + if err != nil { + return "", err + } + + if this.Cut { + srcImg = imaging.CropAnchor(srcImg, this.ToWidth, this.ToHeight, imaging.Center) + } + + if this.Resize { + srcImg = imaging.Resize(srcImg, this.ToWidth, this.ToHeight, imaging.Lanczos) + } + err = imaging.Save(srcImg, this.UploadPath + filename + extname) + if err != nil { + return "", err + } + } else { + f, err := os.OpenFile(this.UploadPath + filename + extname, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + return "", err + } + defer f.Close() + _, err = io.Copy(f, file) + if err != nil { + return "", err + } + } + return filename + extname, nil; + } + return "", errors.New("没有发现上传的图片") +} \ No newline at end of file diff --git a/vendor/git.jiaxianghudong.com/go/utils/lua.go b/vendor/git.jiaxianghudong.com/go/utils/lua.go new file mode 100644 index 0000000..dee2540 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/lua.go @@ -0,0 +1,107 @@ +package utils + +import ( + "strconv" + "strings" + "net/http" +) + +// buildLuaResponse构造Lua响应结果 +func BuildLuaResponse(m interface{}) string { + var ret string + if mm, ok := m.(map[interface{}]interface{}); ok { + for k, i := range mm { + vStr := "" + switch v := i.(type) { + case int: + vStr = strconv.Itoa(v) + case int8: + vStr = strconv.Itoa(int(v)) + case int16: + vStr = strconv.Itoa(int(v)) + case int32: + vStr = I64toA(int64(v)) + case int64: + vStr = I64toA(v) + case uint: + vStr = UitoA(v) + case uint8: + vStr = UitoA(uint(v)) + case uint16: + vStr = UitoA(uint(v)) + case uint32: + vStr = Ui32toA(v) + case uint64: + vStr = Ui64toA(v) + case bool: + if v { + vStr = "true" + } + case []interface{}: + tmp := make(map[interface{}]interface{}) + for kk, vv := range v { + tmp[kk] = vv + } + vStr = BuildLuaResponse(tmp) + case map[interface{}]interface{}: + vStr = BuildLuaResponse(v) + case map[string]string: + for ks, vs := range v { + vStr += `,` + ks + `=` + strings.Replace(vs, `"`, `\"`, -1) + } + vStr = "{" + Substr(vStr, 1) + "}" + case string: + vStr = `"` + strings.Replace(v, `"`, `\"`, -1) + `"` + default: + if vv, ok := v.(map[interface{}]interface{}); ok { + vStr = BuildLuaResponse(vv) + } + } + if vStr != "" { + switch v := k.(type) { + case int: + ret += `,[` + strconv.Itoa(v) + `]=` + vStr + case string: + ret += `,` + v + `=` + vStr + } + } + } + return "{" + Substr(ret, 1) + "}" + } + return "{}" +} + +// outputLuaMsg 输出lua格式提示信息 +func OutputLua(w http.ResponseWriter, m map[interface{}]interface{}) { + w.Write([]byte("return " + BuildLuaResponse(m))) +} + +// outputLuaMsg 输出lua格式提示信息 +func OutputLuaMsg(w http.ResponseWriter, msg string, code ...int) bool { + var c int = 120 + if len(code) >= 1 { + c = code[0] + } + OutputLua(w, NewLuaResult(msg, c)) + return c == 0 +} + +// outputLuaOk 输出lua格式成功信息 +func OutputLuaOk(w http.ResponseWriter, msg string) { + OutputLuaMsg(w, msg, 0) +} + +// 获取lua返回结果map +func NewLuaResult(params ...interface{}) map[interface{}]interface{} { + ret := make(map[interface{}]interface{}) + if len(params) > 0 { + ret["msg"] = params[0] + + if len(params) > 1 { + ret["status"] = params[1] + } else { + ret["status"] = 0 + } + } + return ret +} \ No newline at end of file diff --git a/vendor/git.jiaxianghudong.com/go/utils/progressbar.go b/vendor/git.jiaxianghudong.com/go/utils/progressbar.go new file mode 100644 index 0000000..7488b97 --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/progressbar.go @@ -0,0 +1,91 @@ +package utils + +import ( + "fmt" + "time" +) + +// 进度条定义 +type ProgressBar struct { + Name string // 名称 + Total Counter // 总任务数 + Current *Counter // 当前已完成数量 + startTime time.Time // 任务开始时间 + exit chan struct{} // 是否退出进度条 + alreadyOutput bool +} + +// 完成指定数量的任务 +func (pgb *ProgressBar) Done(i ...int64) { + if len(i) == 1 { + pgb.Current.Add(i[0]) + } else { + pgb.Current.Add(1) + } +} + +// 退出进度条 +func (pgb *ProgressBar) Exit() { + pgb.exit <- struct{}{} + if pgb.alreadyOutput { + fmt.Println("") + } +} + +// 启动并显示进度条 +func (pgb *ProgressBar) Run() { + for { + select { + case <-pgb.exit: + return + case <-time.After(time.Second): + pgb.print() + } + } +} + +// 输出进度 +func (pgb *ProgressBar) print() { + var percent float64 = 0 + var per, surplus int64 + + cur := pgb.Current.Get() + if pgb.Total.Get() > 0 { + percent = float64(cur) / float64(pgb.Total.Get()) + } + useTime := int64(time.Now().Sub(pgb.startTime) / time.Second) + if useTime > 0 { + per = cur / useTime + } + if per > 0 { + surplus = (pgb.Total.Get() - cur) / per + } + + fmt.Printf("\r\x1b[36m%s[%.2f%%] %d/%d %d/ps used:%s surplus:%s\x1b[0m", pgb.Name, percent * 100, cur, pgb.Total.Get(), per, HumanTimeSecond(useTime), HumanTimeSecond(surplus)) + + if !pgb.alreadyOutput { + pgb.alreadyOutput = true + } +} + +// 创建一个进度条 +func NewPGBar(total int64, name ...string) *ProgressBar { + var n string + if len(name) == 1 && name[0] != "" { + n = name[0] + " " + } + return &ProgressBar{ + Name: n, + Total: Counter{v : total}, + Current: &Counter{}, + startTime: time.Now(), + exit: make(chan struct{}, 1), + } +} + +// 生成一个新的进度条并运行 +func NewAndRunPGBar(total int64, name ...string) *ProgressBar { + pgb := NewPGBar(total, name...) + go pgb.Run() + return pgb +} \ No newline at end of file diff --git a/vendor/git.jiaxianghudong.com/go/utils/regexp.go b/vendor/git.jiaxianghudong.com/go/utils/regexp.go new file mode 100644 index 0000000..170776f --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/regexp.go @@ -0,0 +1,89 @@ +package utils + +import ( + // "log" + "regexp" +) + +const ( + regUsername = `^[a-zA-Z0-9_]{4,22}$` + regPwd = `^[\@A-Za-z0-9\!\#\$\%\^\&\*\.\~]{3,60}$` + regNickname = `^{0,40}$` + regEmail = `^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$` + regPhone = `^((\d3)|(\d{3}\-))?13[0-9]\d{8}|14[0-9]\d{8}|15[0-9]\d{8}|17[0-9]\d{8}|18[0-9]\d{8}` + regUrl = `^((https?|ftp|news|http):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?$` + regGuid = `[a-zA-Z0-9-_]{0,40}` + regDescription = `^{0,64}$` + regOutTypeDescription = `^{0,20}$` + regMac = `^{0,40}$` + regTradeNo = `^[a-zA-Z0-9_-]{1,40}$` + regAttach = `^{0,127}$` +) + +func CheckString(data string, pat string) bool { + bFlag := false + reg := regexp.MustCompile(pat) + bFlag = reg.MatchString(data) + return bFlag +} + +// 检测用户名 +func CheckUserName(username string) bool { + return CheckString(username, regUsername) +} + +// 昵称 +func CheckNickname(nickname string) bool { + return CheckString(nickname, regNickname) + +} + +// 密码 +func CheckPwd(password string) bool { + return CheckString(password, regPwd) +} + +// 邮箱 +func CheckEmail(email string) bool { + return CheckString(email, regEmail) +} + +// 手机号 +func CheckPhone(phone string) bool { + return CheckString(phone, regPhone) +} + +// 网址 +func CheckUrl(url string) bool { + return CheckString(url, regUrl) +} + +// guid +func CheckGuid(guid string) bool { + return CheckString(guid, regGuid) +} + +// 描述 +func CheckDescription(description string) bool { + return CheckString(description, regDescription) +} + +// 平台交易类型描述 +func CheckOutTypeDescription(description string) bool { + return CheckString(description, regOutTypeDescription) +} + +// mac 地址 +func CheckMac(mac string) bool { + return CheckString(mac, regMac) +} + +// 订单号 +func CheckTradeNo(tradeNo string) bool { + return CheckString(tradeNo, regTradeNo) +} + +// 附加参数 +func CheckAttach(attach string) bool { + return CheckString(attach, regAttach) +} diff --git a/vendor/git.jiaxianghudong.com/go/utils/strip.go b/vendor/git.jiaxianghudong.com/go/utils/strip.go new file mode 100644 index 0000000..312d0bc --- /dev/null +++ b/vendor/git.jiaxianghudong.com/go/utils/strip.go @@ -0,0 +1,3713 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package utils +//package strip + +import ( + "bytes" + "encoding/json" + "fmt" + "html" + "io" + "io/ioutil" + "path/filepath" + "reflect" + "strings" + "sync" + "text/template" + "text/template/parse" + "unicode" + "unicode/utf8" +) + +// htmlNospaceEscaper escapes for inclusion in unquoted attribute values. +func htmlNospaceEscaper(args ...interface{}) string { + s, t := stringify(args...) + if t == contentTypeHTML { + return htmlReplacer(StripTags(s), htmlNospaceNormReplacementTable, false) + } + return htmlReplacer(s, htmlNospaceReplacementTable, false) +} + +// attrEscaper escapes for inclusion in quoted attribute values. +func attrEscaper(args ...interface{}) string { + s, t := stringify(args...) + if t == contentTypeHTML { + return htmlReplacer(StripTags(s), htmlNormReplacementTable, true) + } + return htmlReplacer(s, htmlReplacementTable, true) +} + +// rcdataEscaper escapes for inclusion in an RCDATA element body. +func rcdataEscaper(args ...interface{}) string { + s, t := stringify(args...) + if t == contentTypeHTML { + return htmlReplacer(s, htmlNormReplacementTable, true) + } + return htmlReplacer(s, htmlReplacementTable, true) +} + +// htmlEscaper escapes for inclusion in HTML text. +func htmlEscaper(args ...interface{}) string { + s, t := stringify(args...) + if t == contentTypeHTML { + return s + } + return htmlReplacer(s, htmlReplacementTable, true) +} + +// htmlReplacementTable contains the runes that need to be escaped +// inside a quoted attribute value or in a text node. +var htmlReplacementTable = []string{ + // http://www.w3.org/TR/html5/syntax.html#attribute-value-(unquoted)-state + // U+0000 NULL Parse error. Append a U+FFFD REPLACEMENT + // CHARACTER character to the current attribute's value. + // " + // and similarly + // http://www.w3.org/TR/html5/syntax.html#before-attribute-value-state + 0: "\uFFFD", + '"': """, + '&': "&", + '\'': "'", + '+': "+", + '<': "<", + '>': ">", +} + +// htmlNormReplacementTable is like htmlReplacementTable but without '&' to +// avoid over-encoding existing entities. +var htmlNormReplacementTable = []string{ + 0: "\uFFFD", + '"': """, + '\'': "'", + '+': "+", + '<': "<", + '>': ">", +} + +// htmlNospaceReplacementTable contains the runes that need to be escaped +// inside an unquoted attribute value. +// The set of runes escaped is the union of the HTML specials and +// those determined by running the JS below in browsers: +//
+// +var htmlNospaceReplacementTable = []string{ + 0: "�", + '\t': " ", + '\n': " ", + '\v': " ", + '\f': " ", + '\r': " ", + ' ': " ", + '"': """, + '&': "&", + '\'': "'", + '+': "+", + '<': "<", + '=': "=", + '>': ">", + // A parse error in the attribute value (unquoted) and + // before attribute value states. + // Treated as a quoting character by IE. + '`': "`", +} + +// htmlNospaceNormReplacementTable is like htmlNospaceReplacementTable but +// without '&' to avoid over-encoding existing entities. +var htmlNospaceNormReplacementTable = []string{ + 0: "�", + '\t': " ", + '\n': " ", + '\v': " ", + '\f': " ", + '\r': " ", + ' ': " ", + '"': """, + '\'': "'", + '+': "+", + '<': "<", + '=': "=", + '>': ">", + // A parse error in the attribute value (unquoted) and + // before attribute value states. + // Treated as a quoting character by IE. + '`': "`", +} + +// htmlReplacer returns s with runes replaced according to replacementTable +// and when badRunes is true, certain bad runes are allowed through unescaped. +func htmlReplacer(s string, replacementTable []string, badRunes bool) string { + written, b := 0, new(bytes.Buffer) + for i, r := range s { + if int(r) < len(replacementTable) { + if repl := replacementTable[r]; len(repl) != 0 { + b.WriteString(s[written:i]) + b.WriteString(repl) + // Valid as long as replacementTable doesn't + // include anything above 0x7f. + written = i + utf8.RuneLen(r) + } + } else if badRunes { + // No-op. + // IE does not allow these ranges in unquoted attrs. + } else if 0xfdd0 <= r && r <= 0xfdef || 0xfff0 <= r && r <= 0xffff { + fmt.Fprintf(b, "%s&#x%x;", s[written:i], r) + written = i + utf8.RuneLen(r) + } + } + if written == 0 { + return s + } + b.WriteString(s[written:]) + return b.String() +} + +// stripTags takes a snippet of HTML and returns only the text content. +// For example, `¡Hi! ` -> `¡Hi! `. +func StripTags(html string) string { + var b bytes.Buffer + s, c, i, allText := []byte(html), context{}, 0, true + // Using the transition funcs helps us avoid mangling + // `
` or `I <3 Ponies!`. + for i != len(s) { + if c.delim == delimNone { + st := c.state + // Use RCDATA instead of parsing into JS or CSS styles. + if c.element != elementNone && !isInTag(st) { + st = stateRCDATA + } + d, nread := transitionFunc[st](c, s[i:]) + i1 := i + nread + if c.state == stateText || c.state == stateRCDATA { + // Emit text up to the start of the tag or comment. + j := i1 + if d.state != c.state { + for j1 := j - 1; j1 >= i; j1-- { + if s[j1] == '<' { + j = j1 + break + } + } + } + b.Write(s[i:j]) + } else { + allText = false + } + c, i = d, i1 + continue + } + i1 := i + bytes.IndexAny(s[i:], delimEnds[c.delim]) + if i1 < i { + break + } + if c.delim != delimSpaceOrTagEnd { + // Consume any quote. + i1++ + } + c, i = context{state: stateTag, element: c.element}, i1 + } + if allText { + return html + } else if c.state == stateText || c.state == stateRCDATA { + b.Write(s[i:]) + } + return b.String() +} + +// htmlNameFilter accepts valid parts of an HTML attribute or tag name or +// a known-safe HTML attribute. +func htmlNameFilter(args ...interface{}) string { + s, t := stringify(args...) + if t == contentTypeHTMLAttr { + return s + } + if len(s) == 0 { + // Avoid violation of structure preservation. + // . + // Without this, if .K is empty then .V is the value of + // checked, but otherwise .V is the value of the attribute + // named .K. + return filterFailsafe + } + s = strings.ToLower(s) + if t := attrType(s); t != contentTypePlain { + // TODO: Split attr and element name part filters so we can whitelist + // attributes. + return filterFailsafe + } + for _, r := range s { + switch { + case '0' <= r && r <= '9': + case 'a' <= r && r <= 'z': + default: + return filterFailsafe + } + } + return s +} + +// commentEscaper returns the empty string regardless of input. +// Comment content does not correspond to any parsed structure or +// human-readable content, so the simplest and most secure policy is to drop +// content interpolated into comments. +// This approach is equally valid whether or not static comment content is +// removed from the template. +func commentEscaper(args ...interface{}) string { + return "" +} + +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// context describes the state an HTML parser must be in when it reaches the +// portion of HTML produced by evaluating a particular template node. +// +// The zero value of type context is the start context for a template that +// produces an HTML fragment as defined at +// http://www.w3.org/TR/html5/syntax.html#the-end +// where the context element is null. +type context struct { + state state + delim delim + urlPart urlPart + jsCtx jsCtx + attr attr + element element + err *Error +} + +func (c context) String() string { + return fmt.Sprintf("{%v %v %v %v %v %v %v}", c.state, c.delim, c.urlPart, c.jsCtx, c.attr, c.element, c.err) +} + +// eq reports whether two contexts are equal. +func (c context) eq(d context) bool { + return c.state == d.state && + c.delim == d.delim && + c.urlPart == d.urlPart && + c.jsCtx == d.jsCtx && + c.attr == d.attr && + c.element == d.element && + c.err == d.err +} + +// mangle produces an identifier that includes a suffix that distinguishes it +// from template names mangled with different contexts. +func (c context) mangle(templateName string) string { + // The mangled name for the default context is the input templateName. + if c.state == stateText { + return templateName + } + s := templateName + "$htmltemplate_" + c.state.String() + if c.delim != 0 { + s += "_" + c.delim.String() + } + if c.urlPart != 0 { + s += "_" + c.urlPart.String() + } + if c.jsCtx != 0 { + s += "_" + c.jsCtx.String() + } + if c.attr != 0 { + s += "_" + c.attr.String() + } + if c.element != 0 { + s += "_" + c.element.String() + } + return s +} + +// state describes a high-level HTML parser state. +// +// It bounds the top of the element stack, and by extension the HTML insertion +// mode, but also contains state that does not correspond to anything in the +// HTML5 parsing algorithm because a single token production in the HTML +// grammar may contain embedded actions in a template. For instance, the quoted +// HTML attribute produced by +//
+// is a single token in HTML's grammar but in a template spans several nodes. +type state uint8 + +const ( + // stateText is parsed character data. An HTML parser is in + // this state when its parse position is outside an HTML tag, + // directive, comment, and special element body. + stateText state = iota + // stateTag occurs before an HTML attribute or the end of a tag. + stateTag + // stateAttrName occurs inside an attribute name. + // It occurs between the ^'s in ` ^name^ = value`. + stateAttrName + // stateAfterName occurs after an attr name has ended but before any + // equals sign. It occurs between the ^'s in ` name^ ^= value`. + stateAfterName + // stateBeforeValue occurs after the equals sign but before the value. + // It occurs between the ^'s in ` name =^ ^value`. + stateBeforeValue + // stateHTMLCmt occurs inside an . + stateHTMLCmt + // stateRCDATA occurs inside an RCDATA element (