├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── api ├── .dockerignore ├── .gitignore ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── Makefile ├── config │ └── config.go ├── docker-compose.tools.yml ├── docker-compose.yml ├── handlers │ ├── frames.go │ ├── frames_test.go │ ├── handlers.go │ ├── handlers_test.go │ ├── projects.go │ ├── projects_test.go │ ├── teams.go │ ├── teams_test.go │ ├── users.go │ └── users_test.go ├── main.go ├── middleware │ ├── auth.go │ └── middleware.go ├── migrations │ ├── 00001_create_users_table.up.sql │ ├── 00002_update_user_table_with_auth0_field.up.sql │ ├── 00003_drop_extension_uuid.up.sql │ ├── 00004_create_projects_table.up.sql │ ├── 00005_create_create_frames_table.up.sql │ ├── 00006_add_synchronized_at_field_to_frames.up.sql │ ├── 00007_add_watson_token_to_users.up.sql │ ├── 00008_add_tags_column_to_frames.up.sql │ ├── 00009_add_unique_constraint_to_user_auth0_id.up.sql │ ├── 00010_change_watson_token_col_to_api_token.up.sql │ ├── 00011_change_frame_id_type_to_uuid.up.sql │ ├── 00012_create_table_teams.up.sql │ ├── 00013_add_not_null_constraints.up.sql │ ├── 00014_add_avatar_url_to_users.up.sql │ ├── 00015_create_project_activities_view.up.sql │ ├── 00016_add_unique_constraint_to_teams.up.sql │ └── Dockerfile ├── models │ ├── frames.go │ ├── models.go │ ├── projects.go │ ├── sql.go │ ├── sql_test.go │ ├── teams.go │ ├── users.go │ ├── users_test.go │ └── workloads.go ├── scripts │ └── watson_push.py └── vendor │ ├── github.com │ ├── NYTimes │ │ └── gziphandler │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── gzip.go │ │ │ ├── gzip_go18.go │ │ │ ├── gzip_go18_test.go │ │ │ ├── gzip_test.go │ │ │ └── testdata │ │ │ └── benchmark.json │ ├── auth0-community │ │ └── go-auth0 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth0.go │ │ │ ├── auth0_test.go │ │ │ ├── common_test.go │ │ │ ├── jwk_client.go │ │ │ ├── middlewares │ │ │ ├── auth0.go │ │ │ └── gin │ │ │ │ └── auth_group.go │ │ │ ├── token_extraction.go │ │ │ └── token_extraction_test.go │ ├── coreos │ │ └── go-systemd │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── DCO │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── activation │ │ │ ├── files.go │ │ │ ├── files_test.go │ │ │ ├── listeners.go │ │ │ ├── listeners_test.go │ │ │ ├── packetconns.go │ │ │ └── packetconns_test.go │ │ │ ├── daemon │ │ │ ├── sdnotify.go │ │ │ ├── sdnotify_test.go │ │ │ ├── watchdog.go │ │ │ └── watchdog_test.go │ │ │ ├── dbus │ │ │ ├── dbus.go │ │ │ ├── dbus_test.go │ │ │ ├── methods.go │ │ │ ├── methods_test.go │ │ │ ├── properties.go │ │ │ ├── set.go │ │ │ ├── set_test.go │ │ │ ├── subscription.go │ │ │ ├── subscription_set.go │ │ │ ├── subscription_set_test.go │ │ │ └── subscription_test.go │ │ │ ├── examples │ │ │ └── activation │ │ │ │ ├── activation.go │ │ │ │ ├── httpserver │ │ │ │ ├── README.md │ │ │ │ ├── hello.service │ │ │ │ ├── hello.socket │ │ │ │ └── httpserver.go │ │ │ │ ├── listen.go │ │ │ │ └── udpconn.go │ │ │ ├── fixtures │ │ │ ├── enable-disable.service │ │ │ ├── mask-unmask.service │ │ │ ├── reload.service │ │ │ ├── start-failed.service │ │ │ ├── start-stop.service │ │ │ ├── subscribe-events-set.service │ │ │ └── subscribe-events.service │ │ │ ├── journal │ │ │ └── journal.go │ │ │ ├── login1 │ │ │ ├── dbus.go │ │ │ └── dbus_test.go │ │ │ ├── machine1 │ │ │ ├── dbus.go │ │ │ └── dbus_test.go │ │ │ ├── sdjournal │ │ │ ├── functions.go │ │ │ ├── functions_test.go │ │ │ ├── journal.go │ │ │ ├── journal_test.go │ │ │ └── read.go │ │ │ ├── test │ │ │ ├── unit │ │ │ ├── deserialize.go │ │ │ ├── deserialize_test.go │ │ │ ├── end_to_end_test.go │ │ │ ├── escape.go │ │ │ ├── escape_test.go │ │ │ ├── option.go │ │ │ ├── option_test.go │ │ │ ├── serialize.go │ │ │ └── serialize_test.go │ │ │ └── util │ │ │ ├── util.go │ │ │ ├── util_cgo.go │ │ │ ├── util_stub.go │ │ │ └── util_test.go │ ├── go-errors │ │ └── errors │ │ │ ├── LICENSE.MIT │ │ │ ├── README.md │ │ │ ├── cover.out │ │ │ ├── error.go │ │ │ ├── error_test.go │ │ │ ├── parse_panic.go │ │ │ ├── parse_panic_test.go │ │ │ └── stackframe.go │ ├── jmoiron │ │ └── sqlx │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bind.go │ │ │ ├── doc.go │ │ │ ├── named.go │ │ │ ├── named_context.go │ │ │ ├── named_context_test.go │ │ │ ├── named_test.go │ │ │ ├── reflectx │ │ │ ├── README.md │ │ │ ├── reflect.go │ │ │ └── reflect_test.go │ │ │ ├── sqlx.go │ │ │ ├── sqlx_context.go │ │ │ ├── sqlx_context_test.go │ │ │ ├── sqlx_test.go │ │ │ └── types │ │ │ ├── README.md │ │ │ ├── types.go │ │ │ └── types_test.go │ ├── julienschmidt │ │ └── httprouter │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── path.go │ │ │ ├── path_test.go │ │ │ ├── router.go │ │ │ ├── router_test.go │ │ │ ├── tree.go │ │ │ └── tree_test.go │ ├── justinas │ │ └── alice │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── chain.go │ │ │ └── chain_test.go │ ├── lib │ │ └── pq │ │ │ ├── .gitignore │ │ │ ├── .travis.sh │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── array.go │ │ │ ├── array_test.go │ │ │ ├── bench_test.go │ │ │ ├── buf.go │ │ │ ├── certs │ │ │ ├── README │ │ │ ├── bogus_root.crt │ │ │ ├── postgresql.crt │ │ │ ├── postgresql.key │ │ │ ├── root.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ │ ├── conn.go │ │ │ ├── conn_go18.go │ │ │ ├── conn_test.go │ │ │ ├── copy.go │ │ │ ├── copy_test.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── encode_test.go │ │ │ ├── error.go │ │ │ ├── go18_test.go │ │ │ ├── hstore │ │ │ ├── hstore.go │ │ │ └── hstore_test.go │ │ │ ├── issues_test.go │ │ │ ├── listen_example │ │ │ └── doc.go │ │ │ ├── notify.go │ │ │ ├── notify_test.go │ │ │ ├── oid │ │ │ ├── doc.go │ │ │ ├── gen.go │ │ │ └── types.go │ │ │ ├── ssl.go │ │ │ ├── ssl_go1.7.go │ │ │ ├── ssl_permissions.go │ │ │ ├── ssl_renegotiation.go │ │ │ ├── ssl_test.go │ │ │ ├── ssl_windows.go │ │ │ ├── url.go │ │ │ ├── url_test.go │ │ │ ├── user_posix.go │ │ │ ├── user_windows.go │ │ │ ├── uuid.go │ │ │ └── uuid_test.go │ ├── rs │ │ ├── cors │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bench_test.go │ │ │ ├── cors.go │ │ │ ├── cors_test.go │ │ │ ├── examples │ │ │ │ ├── alice │ │ │ │ │ └── server.go │ │ │ │ ├── default │ │ │ │ │ └── server.go │ │ │ │ ├── goji │ │ │ │ │ └── server.go │ │ │ │ ├── martini │ │ │ │ │ └── server.go │ │ │ │ ├── negroni │ │ │ │ │ └── server.go │ │ │ │ ├── nethttp │ │ │ │ │ └── server.go │ │ │ │ ├── openbar │ │ │ │ │ └── server.go │ │ │ │ └── xhandler │ │ │ │ │ └── server.go │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ └── xhandler │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── chain.go │ │ │ ├── chain_example_test.go │ │ │ ├── chain_test.go │ │ │ ├── middleware.go │ │ │ ├── middleware_test.go │ │ │ ├── xhandler.go │ │ │ ├── xhandler_example_test.go │ │ │ ├── xhandler_test.go │ │ │ └── xmux │ │ │ └── README.md │ ├── satori │ │ └── go.uuid │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── benchmarks_test.go │ │ │ ├── uuid.go │ │ │ └── uuid_test.go │ └── square │ │ └── go-jose │ │ ├── .gitcookies.sh.enc │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── BUG-BOUNTY.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── asymmetric.go │ │ ├── asymmetric_test.go │ │ ├── cipher │ │ ├── cbc_hmac.go │ │ ├── cbc_hmac_test.go │ │ ├── concat_kdf.go │ │ ├── concat_kdf_test.go │ │ ├── ecdh_es.go │ │ ├── ecdh_es_test.go │ │ ├── key_wrap.go │ │ └── key_wrap_test.go │ │ ├── crypter.go │ │ ├── crypter_test.go │ │ ├── doc.go │ │ ├── doc_test.go │ │ ├── encoding.go │ │ ├── encoding_test.go │ │ ├── jose-util │ │ ├── README.md │ │ ├── jose-util.t │ │ └── main.go │ │ ├── json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bench_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── indent.go │ │ ├── number_test.go │ │ ├── scanner.go │ │ ├── scanner_test.go │ │ ├── stream.go │ │ ├── stream_test.go │ │ ├── tagkey_test.go │ │ ├── tags.go │ │ ├── tags_test.go │ │ └── testdata │ │ │ └── code.json.gz │ │ ├── json_fork_test.go │ │ ├── jwe.go │ │ ├── jwe_test.go │ │ ├── jwk.go │ │ ├── jwk_test.go │ │ ├── jws.go │ │ ├── jws_test.go │ │ ├── shared.go │ │ ├── signing.go │ │ ├── signing_test.go │ │ ├── symmetric.go │ │ ├── symmetric_test.go │ │ ├── utils.go │ │ └── utils_test.go │ ├── go.uber.org │ ├── atomic │ │ ├── .github │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── atomic.go │ │ ├── atomic_test.go │ │ ├── example_test.go │ │ ├── glide.lock │ │ ├── glide.yaml │ │ ├── scripts │ │ │ ├── cover.sh │ │ │ └── test-ubergo.sh │ │ ├── stress_test.go │ │ ├── string.go │ │ └── string_test.go │ └── zap │ │ ├── .gitignore │ │ ├── .readme.tmpl │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── array.go │ │ ├── array_test.go │ │ ├── benchmarks │ │ ├── apex_test.go │ │ ├── doc.go │ │ ├── kit_test.go │ │ ├── lion_test.go │ │ ├── log15_test.go │ │ ├── logrus_test.go │ │ ├── scenario_bench_test.go │ │ └── zap_test.go │ │ ├── buffer │ │ ├── buffer.go │ │ ├── buffer_test.go │ │ ├── pool.go │ │ └── pool_test.go │ │ ├── check_license.sh │ │ ├── common_test.go │ │ ├── config.go │ │ ├── config_test.go │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── encoder_test.go │ │ ├── field.go │ │ ├── field_test.go │ │ ├── flag.go │ │ ├── flag_test.go │ │ ├── glide.lock │ │ ├── glide.yaml │ │ ├── global.go │ │ ├── global_test.go │ │ ├── http_handler.go │ │ ├── http_handler_test.go │ │ ├── internal │ │ ├── bufferpool │ │ │ └── bufferpool.go │ │ ├── color │ │ │ ├── color.go │ │ │ └── color_test.go │ │ ├── exit │ │ │ ├── exit.go │ │ │ └── exit_test.go │ │ ├── multierror │ │ │ ├── multierror.go │ │ │ └── multierror_test.go │ │ └── readme │ │ │ └── readme.go │ │ ├── level.go │ │ ├── level_test.go │ │ ├── logger.go │ │ ├── logger_bench_test.go │ │ ├── logger_test.go │ │ ├── options.go │ │ ├── stacktrace.go │ │ ├── stacktrace_test.go │ │ ├── sugar.go │ │ ├── sugar_test.go │ │ ├── time.go │ │ ├── time_test.go │ │ ├── writer.go │ │ ├── writer_test.go │ │ ├── zapcore │ │ ├── console_encoder.go │ │ ├── console_encoder_bench_test.go │ │ ├── core.go │ │ ├── core_test.go │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── encoder_test.go │ │ ├── entry.go │ │ ├── entry_test.go │ │ ├── field.go │ │ ├── field_test.go │ │ ├── hook.go │ │ ├── hook_test.go │ │ ├── json_encoder.go │ │ ├── json_encoder_bench_test.go │ │ ├── json_encoder_impl_test.go │ │ ├── level.go │ │ ├── level_strings.go │ │ ├── level_strings_test.go │ │ ├── level_test.go │ │ ├── marshaler.go │ │ ├── memory_encoder.go │ │ ├── memory_encoder_test.go │ │ ├── sampler.go │ │ ├── sampler_bench_test.go │ │ ├── sampler_test.go │ │ ├── tee.go │ │ ├── tee_logger_bench_test.go │ │ ├── tee_test.go │ │ ├── write_syncer.go │ │ ├── write_syncer_bench_test.go │ │ └── write_syncer_test.go │ │ ├── zapgrpc │ │ ├── zapgrpc.go │ │ └── zapgrpc_test.go │ │ └── zaptest │ │ ├── observer │ │ ├── observer.go │ │ └── observer_test.go │ │ ├── timeout.go │ │ └── writer.go │ ├── golang.org │ └── x │ │ └── net │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README │ │ ├── bpf │ │ ├── asm.go │ │ ├── constants.go │ │ ├── doc.go │ │ ├── instructions.go │ │ ├── instructions_test.go │ │ ├── testdata │ │ │ ├── all_instructions.bpf │ │ │ └── all_instructions.txt │ │ ├── vm.go │ │ ├── vm_aluop_test.go │ │ ├── vm_bpf_test.go │ │ ├── vm_extension_test.go │ │ ├── vm_instructions.go │ │ ├── vm_jump_test.go │ │ ├── vm_load_test.go │ │ ├── vm_ret_test.go │ │ ├── vm_scratch_test.go │ │ └── vm_test.go │ │ ├── codereview.cfg │ │ ├── context │ │ ├── context.go │ │ ├── context_test.go │ │ ├── ctxhttp │ │ │ ├── ctxhttp.go │ │ │ ├── ctxhttp_17_test.go │ │ │ ├── ctxhttp_pre17.go │ │ │ ├── ctxhttp_pre17_test.go │ │ │ └── ctxhttp_test.go │ │ ├── go17.go │ │ ├── pre_go17.go │ │ └── withtimeout_test.go │ │ ├── dict │ │ └── dict.go │ │ ├── dns │ │ └── dnsmessage │ │ │ ├── message.go │ │ │ └── message_test.go │ │ ├── html │ │ ├── atom │ │ │ ├── atom.go │ │ │ ├── atom_test.go │ │ │ ├── gen.go │ │ │ ├── table.go │ │ │ └── table_test.go │ │ ├── charset │ │ │ ├── charset.go │ │ │ ├── charset_test.go │ │ │ └── testdata │ │ │ │ ├── HTTP-charset.html │ │ │ │ ├── HTTP-vs-UTF-8-BOM.html │ │ │ │ ├── HTTP-vs-meta-charset.html │ │ │ │ ├── HTTP-vs-meta-content.html │ │ │ │ ├── No-encoding-declaration.html │ │ │ │ ├── README │ │ │ │ ├── UTF-16BE-BOM.html │ │ │ │ ├── UTF-16LE-BOM.html │ │ │ │ ├── UTF-8-BOM-vs-meta-charset.html │ │ │ │ ├── UTF-8-BOM-vs-meta-content.html │ │ │ │ ├── meta-charset-attribute.html │ │ │ │ └── meta-content-attribute.html │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── entity_test.go │ │ ├── escape.go │ │ ├── escape_test.go │ │ ├── example_test.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── node_test.go │ │ ├── parse.go │ │ ├── parse_test.go │ │ ├── render.go │ │ ├── render_test.go │ │ ├── testdata │ │ │ ├── go1.html │ │ │ └── webkit │ │ │ │ ├── README │ │ │ │ ├── adoption01.dat │ │ │ │ ├── adoption02.dat │ │ │ │ ├── comments01.dat │ │ │ │ ├── doctype01.dat │ │ │ │ ├── entities01.dat │ │ │ │ ├── entities02.dat │ │ │ │ ├── html5test-com.dat │ │ │ │ ├── inbody01.dat │ │ │ │ ├── isindex.dat │ │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ │ ├── pending-spec-changes.dat │ │ │ │ ├── plain-text-unsafe.dat │ │ │ │ ├── scriptdata01.dat │ │ │ │ ├── scripted │ │ │ │ ├── adoption01.dat │ │ │ │ └── webkit01.dat │ │ │ │ ├── tables01.dat │ │ │ │ ├── tests1.dat │ │ │ │ ├── tests10.dat │ │ │ │ ├── tests11.dat │ │ │ │ ├── tests12.dat │ │ │ │ ├── tests14.dat │ │ │ │ ├── tests15.dat │ │ │ │ ├── tests16.dat │ │ │ │ ├── tests17.dat │ │ │ │ ├── tests18.dat │ │ │ │ ├── tests19.dat │ │ │ │ ├── tests2.dat │ │ │ │ ├── tests20.dat │ │ │ │ ├── tests21.dat │ │ │ │ ├── tests22.dat │ │ │ │ ├── tests23.dat │ │ │ │ ├── tests24.dat │ │ │ │ ├── tests25.dat │ │ │ │ ├── tests26.dat │ │ │ │ ├── tests3.dat │ │ │ │ ├── tests4.dat │ │ │ │ ├── tests5.dat │ │ │ │ ├── tests6.dat │ │ │ │ ├── tests7.dat │ │ │ │ ├── tests8.dat │ │ │ │ ├── tests9.dat │ │ │ │ ├── tests_innerHTML_1.dat │ │ │ │ ├── tricky01.dat │ │ │ │ ├── webkit01.dat │ │ │ │ └── webkit02.dat │ │ ├── token.go │ │ └── token_test.go │ │ ├── http2 │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── README │ │ ├── ciphers.go │ │ ├── ciphers_test.go │ │ ├── client_conn_pool.go │ │ ├── configure_transport.go │ │ ├── databuffer.go │ │ ├── databuffer_test.go │ │ ├── errors.go │ │ ├── errors_test.go │ │ ├── flow.go │ │ ├── flow_test.go │ │ ├── frame.go │ │ ├── frame_test.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── go17_not18.go │ │ ├── go18.go │ │ ├── go18_test.go │ │ ├── go19.go │ │ ├── go19_test.go │ │ ├── gotrack.go │ │ ├── gotrack_test.go │ │ ├── h2demo │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── h2demo.go │ │ │ ├── launch.go │ │ │ ├── rootCA.key │ │ │ ├── rootCA.pem │ │ │ ├── rootCA.srl │ │ │ ├── server.crt │ │ │ ├── server.key │ │ │ └── tmpl.go │ │ ├── h2i │ │ │ ├── README.md │ │ │ └── h2i.go │ │ ├── headermap.go │ │ ├── hpack │ │ │ ├── encode.go │ │ │ ├── encode_test.go │ │ │ ├── hpack.go │ │ │ ├── hpack_test.go │ │ │ ├── huffman.go │ │ │ ├── tables.go │ │ │ └── tables_test.go │ │ ├── http2.go │ │ ├── http2_test.go │ │ ├── not_go16.go │ │ ├── not_go17.go │ │ ├── not_go18.go │ │ ├── not_go19.go │ │ ├── pipe.go │ │ ├── pipe_test.go │ │ ├── server.go │ │ ├── server_push_test.go │ │ ├── server_test.go │ │ ├── testdata │ │ │ └── draft-ietf-httpbis-http2.xml │ │ ├── transport.go │ │ ├── transport_test.go │ │ ├── write.go │ │ ├── writesched.go │ │ ├── writesched_priority.go │ │ ├── writesched_priority_test.go │ │ ├── writesched_random.go │ │ ├── writesched_random_test.go │ │ ├── writesched_test.go │ │ └── z_spec_test.go │ │ ├── icmp │ │ ├── dstunreach.go │ │ ├── echo.go │ │ ├── endpoint.go │ │ ├── example_test.go │ │ ├── extension.go │ │ ├── extension_test.go │ │ ├── helper.go │ │ ├── helper_posix.go │ │ ├── interface.go │ │ ├── ipv4.go │ │ ├── ipv4_test.go │ │ ├── ipv6.go │ │ ├── listen_posix.go │ │ ├── listen_stub.go │ │ ├── message.go │ │ ├── message_test.go │ │ ├── messagebody.go │ │ ├── mpls.go │ │ ├── multipart.go │ │ ├── multipart_test.go │ │ ├── packettoobig.go │ │ ├── paramprob.go │ │ ├── ping_test.go │ │ ├── sys_freebsd.go │ │ └── timeexceeded.go │ │ ├── idna │ │ ├── example_test.go │ │ ├── idna.go │ │ ├── idna_test.go │ │ ├── punycode.go │ │ ├── punycode_test.go │ │ ├── tables.go │ │ ├── trie.go │ │ └── trieval.go │ │ ├── internal │ │ ├── iana │ │ │ ├── const.go │ │ │ └── gen.go │ │ ├── nettest │ │ │ ├── helper_bsd.go │ │ │ ├── helper_nobsd.go │ │ │ ├── helper_posix.go │ │ │ ├── helper_stub.go │ │ │ ├── helper_unix.go │ │ │ ├── helper_windows.go │ │ │ ├── interface.go │ │ │ ├── rlimit.go │ │ │ └── stack.go │ │ ├── socket │ │ │ ├── cmsghdr.go │ │ │ ├── cmsghdr_bsd.go │ │ │ ├── cmsghdr_linux_32bit.go │ │ │ ├── cmsghdr_linux_64bit.go │ │ │ ├── cmsghdr_solaris_64bit.go │ │ │ ├── cmsghdr_stub.go │ │ │ ├── defs_darwin.go │ │ │ ├── defs_dragonfly.go │ │ │ ├── defs_freebsd.go │ │ │ ├── defs_linux.go │ │ │ ├── defs_netbsd.go │ │ │ ├── defs_openbsd.go │ │ │ ├── defs_solaris.go │ │ │ ├── error_unix.go │ │ │ ├── error_windows.go │ │ │ ├── iovec_32bit.go │ │ │ ├── iovec_64bit.go │ │ │ ├── iovec_solaris_64bit.go │ │ │ ├── iovec_stub.go │ │ │ ├── mmsghdr_stub.go │ │ │ ├── mmsghdr_unix.go │ │ │ ├── msghdr_bsd.go │ │ │ ├── msghdr_bsdvar.go │ │ │ ├── msghdr_linux.go │ │ │ ├── msghdr_linux_32bit.go │ │ │ ├── msghdr_linux_64bit.go │ │ │ ├── msghdr_openbsd.go │ │ │ ├── msghdr_solaris_64bit.go │ │ │ ├── msghdr_stub.go │ │ │ ├── rawconn.go │ │ │ ├── rawconn_mmsg.go │ │ │ ├── rawconn_msg.go │ │ │ ├── rawconn_nommsg.go │ │ │ ├── rawconn_nomsg.go │ │ │ ├── rawconn_stub.go │ │ │ ├── reflect.go │ │ │ ├── socket.go │ │ │ ├── socket_go1_9_test.go │ │ │ ├── socket_test.go │ │ │ ├── sys.go │ │ │ ├── sys_bsd.go │ │ │ ├── sys_bsdvar.go │ │ │ ├── sys_darwin.go │ │ │ ├── sys_dragonfly.go │ │ │ ├── sys_freebsd.go │ │ │ ├── sys_linux.go │ │ │ ├── sys_linux_386.go │ │ │ ├── sys_linux_386.s │ │ │ ├── sys_linux_amd64.go │ │ │ ├── sys_linux_arm.go │ │ │ ├── sys_linux_arm64.go │ │ │ ├── sys_linux_mips.go │ │ │ ├── sys_linux_mips64.go │ │ │ ├── sys_linux_mips64le.go │ │ │ ├── sys_linux_mipsle.go │ │ │ ├── sys_linux_ppc64.go │ │ │ ├── sys_linux_ppc64le.go │ │ │ ├── sys_linux_s390x.go │ │ │ ├── sys_linux_s390x.s │ │ │ ├── sys_netbsd.go │ │ │ ├── sys_posix.go │ │ │ ├── sys_solaris.go │ │ │ ├── sys_solaris_amd64.s │ │ │ ├── sys_stub.go │ │ │ ├── sys_unix.go │ │ │ ├── sys_windows.go │ │ │ ├── zsys_darwin_386.go │ │ │ ├── zsys_darwin_amd64.go │ │ │ ├── zsys_darwin_arm.go │ │ │ ├── zsys_dragonfly_amd64.go │ │ │ ├── zsys_freebsd_386.go │ │ │ ├── zsys_freebsd_amd64.go │ │ │ ├── zsys_freebsd_arm.go │ │ │ ├── zsys_linux_386.go │ │ │ ├── zsys_linux_amd64.go │ │ │ ├── zsys_linux_arm.go │ │ │ ├── zsys_linux_arm64.go │ │ │ ├── zsys_linux_mips.go │ │ │ ├── zsys_linux_mips64.go │ │ │ ├── zsys_linux_mips64le.go │ │ │ ├── zsys_linux_mipsle.go │ │ │ ├── zsys_linux_ppc64.go │ │ │ ├── zsys_linux_ppc64le.go │ │ │ ├── zsys_linux_s390x.go │ │ │ ├── zsys_netbsd_386.go │ │ │ ├── zsys_netbsd_amd64.go │ │ │ ├── zsys_netbsd_arm.go │ │ │ ├── zsys_openbsd_386.go │ │ │ ├── zsys_openbsd_amd64.go │ │ │ ├── zsys_openbsd_arm.go │ │ │ └── zsys_solaris_amd64.go │ │ └── timeseries │ │ │ ├── timeseries.go │ │ │ └── timeseries_test.go │ │ ├── ipv4 │ │ ├── batch.go │ │ ├── bpf_test.go │ │ ├── control.go │ │ ├── control_bsd.go │ │ ├── control_pktinfo.go │ │ ├── control_stub.go │ │ ├── control_unix.go │ │ ├── control_windows.go │ │ ├── defs_darwin.go │ │ ├── defs_dragonfly.go │ │ ├── defs_freebsd.go │ │ ├── defs_linux.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── defs_solaris.go │ │ ├── dgramopt.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── genericopt.go │ │ ├── header.go │ │ ├── header_test.go │ │ ├── helper.go │ │ ├── iana.go │ │ ├── icmp.go │ │ ├── icmp_linux.go │ │ ├── icmp_stub.go │ │ ├── icmp_test.go │ │ ├── multicast_test.go │ │ ├── multicastlistener_test.go │ │ ├── multicastsockopt_test.go │ │ ├── packet.go │ │ ├── packet_go1_8.go │ │ ├── packet_go1_9.go │ │ ├── payload.go │ │ ├── payload_cmsg.go │ │ ├── payload_cmsg_go1_8.go │ │ ├── payload_cmsg_go1_9.go │ │ ├── payload_nocmsg.go │ │ ├── readwrite_go1_8_test.go │ │ ├── readwrite_go1_9_test.go │ │ ├── readwrite_test.go │ │ ├── sockopt.go │ │ ├── sockopt_posix.go │ │ ├── sockopt_stub.go │ │ ├── sys_asmreq.go │ │ ├── sys_asmreq_stub.go │ │ ├── sys_asmreqn.go │ │ ├── sys_asmreqn_stub.go │ │ ├── sys_bpf.go │ │ ├── sys_bpf_stub.go │ │ ├── sys_bsd.go │ │ ├── sys_darwin.go │ │ ├── sys_dragonfly.go │ │ ├── sys_freebsd.go │ │ ├── sys_linux.go │ │ ├── sys_solaris.go │ │ ├── sys_ssmreq.go │ │ ├── sys_ssmreq_stub.go │ │ ├── sys_stub.go │ │ ├── sys_windows.go │ │ ├── unicast_test.go │ │ ├── unicastsockopt_test.go │ │ ├── zsys_darwin.go │ │ ├── zsys_dragonfly.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd.go │ │ ├── zsys_openbsd.go │ │ └── zsys_solaris.go │ │ ├── ipv6 │ │ ├── batch.go │ │ ├── bpf_test.go │ │ ├── control.go │ │ ├── control_rfc2292_unix.go │ │ ├── control_rfc3542_unix.go │ │ ├── control_stub.go │ │ ├── control_unix.go │ │ ├── control_windows.go │ │ ├── defs_darwin.go │ │ ├── defs_dragonfly.go │ │ ├── defs_freebsd.go │ │ ├── defs_linux.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── defs_solaris.go │ │ ├── dgramopt.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── genericopt.go │ │ ├── header.go │ │ ├── header_test.go │ │ ├── helper.go │ │ ├── iana.go │ │ ├── icmp.go │ │ ├── icmp_bsd.go │ │ ├── icmp_linux.go │ │ ├── icmp_solaris.go │ │ ├── icmp_stub.go │ │ ├── icmp_test.go │ │ ├── icmp_windows.go │ │ ├── mocktransponder_test.go │ │ ├── multicast_test.go │ │ ├── multicastlistener_test.go │ │ ├── multicastsockopt_test.go │ │ ├── payload.go │ │ ├── payload_cmsg.go │ │ ├── payload_cmsg_go1_8.go │ │ ├── payload_cmsg_go1_9.go │ │ ├── payload_nocmsg.go │ │ ├── readwrite_go1_8_test.go │ │ ├── readwrite_go1_9_test.go │ │ ├── readwrite_test.go │ │ ├── sockopt.go │ │ ├── sockopt_posix.go │ │ ├── sockopt_stub.go │ │ ├── sockopt_test.go │ │ ├── sys_asmreq.go │ │ ├── sys_asmreq_stub.go │ │ ├── sys_bpf.go │ │ ├── sys_bpf_stub.go │ │ ├── sys_bsd.go │ │ ├── sys_darwin.go │ │ ├── sys_freebsd.go │ │ ├── sys_linux.go │ │ ├── sys_solaris.go │ │ ├── sys_ssmreq.go │ │ ├── sys_ssmreq_stub.go │ │ ├── sys_stub.go │ │ ├── sys_windows.go │ │ ├── unicast_test.go │ │ ├── unicastsockopt_test.go │ │ ├── zsys_darwin.go │ │ ├── zsys_dragonfly.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd.go │ │ ├── zsys_openbsd.go │ │ └── zsys_solaris.go │ │ ├── lex │ │ └── httplex │ │ │ ├── httplex.go │ │ │ └── httplex_test.go │ │ ├── lif │ │ ├── address.go │ │ ├── address_test.go │ │ ├── binary.go │ │ ├── defs_solaris.go │ │ ├── lif.go │ │ ├── link.go │ │ ├── link_test.go │ │ ├── sys.go │ │ ├── sys_solaris_amd64.s │ │ ├── syscall.go │ │ └── zsys_solaris_amd64.go │ │ ├── nettest │ │ ├── conntest.go │ │ ├── conntest_go16.go │ │ ├── conntest_go17.go │ │ └── conntest_test.go │ │ ├── netutil │ │ ├── listen.go │ │ └── listen_test.go │ │ ├── proxy │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── per_host_test.go │ │ ├── proxy.go │ │ ├── proxy_test.go │ │ └── socks5.go │ │ ├── publicsuffix │ │ ├── gen.go │ │ ├── list.go │ │ ├── list_test.go │ │ ├── table.go │ │ └── table_test.go │ │ ├── route │ │ ├── address.go │ │ ├── address_darwin_test.go │ │ ├── address_test.go │ │ ├── binary.go │ │ ├── defs_darwin.go │ │ ├── defs_dragonfly.go │ │ ├── defs_freebsd.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── interface.go │ │ ├── interface_announce.go │ │ ├── interface_classic.go │ │ ├── interface_freebsd.go │ │ ├── interface_multicast.go │ │ ├── interface_openbsd.go │ │ ├── message.go │ │ ├── message_darwin_test.go │ │ ├── message_freebsd_test.go │ │ ├── message_test.go │ │ ├── route.go │ │ ├── route_classic.go │ │ ├── route_openbsd.go │ │ ├── route_test.go │ │ ├── sys.go │ │ ├── sys_darwin.go │ │ ├── sys_dragonfly.go │ │ ├── sys_freebsd.go │ │ ├── sys_netbsd.go │ │ ├── sys_openbsd.go │ │ ├── syscall.go │ │ ├── zsys_darwin.go │ │ ├── zsys_dragonfly.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_netbsd.go │ │ └── zsys_openbsd.go │ │ ├── trace │ │ ├── events.go │ │ ├── histogram.go │ │ ├── histogram_test.go │ │ ├── trace.go │ │ ├── trace_go16.go │ │ ├── trace_go17.go │ │ └── trace_test.go │ │ ├── webdav │ │ ├── file.go │ │ ├── file_go1.6.go │ │ ├── file_go1.7.go │ │ ├── file_test.go │ │ ├── if.go │ │ ├── if_test.go │ │ ├── internal │ │ │ └── xml │ │ │ │ ├── README │ │ │ │ ├── atom_test.go │ │ │ │ ├── example_test.go │ │ │ │ ├── marshal.go │ │ │ │ ├── marshal_test.go │ │ │ │ ├── read.go │ │ │ │ ├── read_test.go │ │ │ │ ├── typeinfo.go │ │ │ │ ├── xml.go │ │ │ │ └── xml_test.go │ │ ├── litmus_test_server.go │ │ ├── lock.go │ │ ├── lock_test.go │ │ ├── prop.go │ │ ├── prop_test.go │ │ ├── webdav.go │ │ ├── webdav_test.go │ │ ├── xml.go │ │ └── xml_test.go │ │ ├── websocket │ │ ├── client.go │ │ ├── dial.go │ │ ├── dial_test.go │ │ ├── exampledial_test.go │ │ ├── examplehandler_test.go │ │ ├── hybi.go │ │ ├── hybi_test.go │ │ ├── server.go │ │ ├── websocket.go │ │ └── websocket_test.go │ │ └── xsrftoken │ │ ├── xsrf.go │ │ └── xsrf_test.go │ └── gopkg.in │ └── square │ ├── go-jose.v1 │ ├── .gitcookies.sh.enc │ ├── .gitignore │ ├── .travis.yml │ ├── BUG-BOUNTY.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── asymmetric.go │ ├── asymmetric_test.go │ ├── cipher │ │ ├── cbc_hmac.go │ │ ├── cbc_hmac_test.go │ │ ├── concat_kdf.go │ │ ├── concat_kdf_test.go │ │ ├── ecdh_es.go │ │ ├── ecdh_es_test.go │ │ ├── key_wrap.go │ │ └── key_wrap_test.go │ ├── crypter.go │ ├── crypter_test.go │ ├── doc.go │ ├── doc_test.go │ ├── encoding.go │ ├── encoding_test.go │ ├── jose-util │ │ ├── README.md │ │ ├── ec.key │ │ ├── ec.pub │ │ ├── jose-util.t │ │ ├── main.go │ │ ├── test-keys │ │ │ ├── ecdh.key │ │ │ ├── ecdh.pub │ │ │ ├── rsa.key │ │ │ └── rsa.pub │ │ └── utils.go │ ├── json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bench_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── indent.go │ │ ├── number_test.go │ │ ├── scanner.go │ │ ├── scanner_test.go │ │ ├── stream.go │ │ ├── stream_test.go │ │ ├── tagkey_test.go │ │ ├── tags.go │ │ ├── tags_test.go │ │ └── testdata │ │ │ └── code.json.gz │ ├── jwe.go │ ├── jwe_test.go │ ├── jwk.go │ ├── jwk_test.go │ ├── jws.go │ ├── jws_test.go │ ├── jwt │ │ ├── builder.go │ │ ├── builder_test.go │ │ ├── claims.go │ │ ├── claims_test.go │ │ ├── errors.go │ │ ├── example_test.go │ │ ├── jwt.go │ │ ├── jwt_test.go │ │ ├── validation.go │ │ └── validation_test.go │ ├── shared.go │ ├── signing.go │ ├── signing_test.go │ ├── symmetric.go │ ├── symmetric_test.go │ └── utils_test.go │ └── go-jose.v2 │ ├── .gitcookies.sh.enc │ ├── .gitignore │ ├── .travis.yml │ ├── BUG-BOUNTY.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── asymmetric.go │ ├── asymmetric_test.go │ ├── cipher │ ├── cbc_hmac.go │ ├── cbc_hmac_test.go │ ├── concat_kdf.go │ ├── concat_kdf_test.go │ ├── ecdh_es.go │ ├── ecdh_es_test.go │ ├── key_wrap.go │ └── key_wrap_test.go │ ├── crypter.go │ ├── crypter_test.go │ ├── doc.go │ ├── doc_test.go │ ├── encoding.go │ ├── encoding_test.go │ ├── jose-util │ ├── README.md │ ├── ec.key │ ├── ec.pub │ ├── jose-util.t │ ├── main.go │ ├── test-keys │ │ ├── ecdh.key │ │ ├── ecdh.pub │ │ ├── rsa.key │ │ └── rsa.pub │ └── utils.go │ ├── json │ ├── LICENSE │ ├── README.md │ ├── bench_test.go │ ├── decode.go │ ├── decode_test.go │ ├── encode.go │ ├── encode_test.go │ ├── indent.go │ ├── number_test.go │ ├── scanner.go │ ├── scanner_test.go │ ├── stream.go │ ├── stream_test.go │ ├── tagkey_test.go │ ├── tags.go │ ├── tags_test.go │ └── testdata │ │ └── code.json.gz │ ├── jwe.go │ ├── jwe_test.go │ ├── jwk.go │ ├── jwk_test.go │ ├── jws.go │ ├── jws_test.go │ ├── jwt │ ├── builder.go │ ├── builder_test.go │ ├── claims.go │ ├── claims_test.go │ ├── errors.go │ ├── example_test.go │ ├── jwt.go │ ├── jwt_test.go │ ├── validation.go │ └── validation_test.go │ ├── shared.go │ ├── signing.go │ ├── signing_test.go │ ├── symmetric.go │ ├── symmetric_test.go │ └── utils_test.go ├── apiary.apib ├── circle.yml ├── doc └── project-report.gif └── web ├── .env ├── .env.production ├── .flowconfig ├── .gitignore ├── Makefile ├── flow-typed └── npm │ ├── auth0-lock_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── material-ui-chip-input_vx.x.x.js │ ├── material-ui_vx.x.x.js │ ├── moment_v2.x.x.js │ ├── react-redux_v5.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── react-router_v4.x.x.js │ ├── react-scripts_vx.x.x.js │ ├── react-tap-event-plugin_vx.x.x.js │ ├── redux-api-middleware_vx.x.x.js │ ├── redux-thunk_vx.x.x.js │ ├── redux_v3.x.x.js │ └── roboto-fontface_vx.x.x.js ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── src ├── App │ ├── __tests__ │ │ └── presenter.js │ ├── index.css │ ├── index.js │ └── presenter.js ├── Auth │ ├── __tests__ │ │ ├── presenter.js │ │ └── reducer.js │ ├── index.css │ ├── index.js │ ├── presenter.js │ └── reducer.js ├── Common │ ├── ChallengeConfirmationDialog.js │ ├── ClipboardInput.js │ ├── Loading.js │ ├── Report │ │ ├── Form.js │ │ ├── Summary.js │ │ ├── TagReport.js │ │ ├── form.css │ │ ├── index.css │ │ ├── index.js │ │ ├── summary.css │ │ └── utils.js │ └── style.css ├── Errors │ ├── __tests__ │ │ ├── presenter.js │ │ └── reducer.js │ ├── index.js │ ├── presenter.js │ └── reducer.js ├── Home │ ├── NotConnected.js │ ├── __tests__ │ │ ├── NotConnected.js │ │ └── presenter.js │ ├── img │ │ ├── crick_bg.jpg │ │ └── logo-crick.png │ ├── index.css │ ├── index.js │ └── presenter.js ├── ProjectReport │ ├── index.css │ ├── index.js │ ├── presenter.js │ └── reducer.js ├── Projects │ └── reducer.js ├── ProjectsList │ ├── Empty.js │ ├── Project.js │ ├── index.css │ ├── index.js │ └── presenter.js ├── Routing │ ├── NotFound.js │ ├── PrivateRoute.js │ └── style.css ├── TeamReport │ ├── index.css │ ├── index.js │ ├── presenter.js │ └── reducer.js ├── Teams │ ├── Empty.js │ ├── Form.js │ ├── List.js │ ├── index.css │ ├── index.js │ ├── presenter.js │ └── reducer.js ├── TeamsList │ ├── Team.js │ ├── index.css │ ├── index.js │ └── presenter.js ├── __tests__ │ └── utils.js ├── index.css ├── index.js ├── middleware │ ├── apiAuthToken.js │ └── apiError.js ├── registerServiceWorker.js ├── setupTests.js ├── shared │ └── emptyStyle.js ├── store │ ├── configureStore.js │ └── rootReducer.js ├── types.js └── utils.js └── yarn.lock /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017+ TailorDev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /api/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git/ 3 | .gitignore 4 | docker-compose.* 5 | Dockerfile 6 | gin-bin 7 | Makefile 8 | migrations/ 9 | -------------------------------------------------------------------------------- /api/.gitignore: -------------------------------------------------------------------------------- 1 | /gin-bin 2 | -------------------------------------------------------------------------------- /api/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.8-alpine 2 | MAINTAINER William Durand 3 | 4 | ARG app_env 5 | ENV APP_ENV $app_env 6 | 7 | RUN apk update && \ 8 | apk add git && \ 9 | rm -r /var/cache/apk/* 10 | 11 | COPY . /go/src/github.com/TailorDev/crick/api 12 | WORKDIR /go/src/github.com/TailorDev/crick/api 13 | 14 | CMD if [ "${APP_ENV}" == "production" ]; \ 15 | then \ 16 | go build && ./api; \ 17 | else \ 18 | go get -u github.com/codegangsta/gin && gin --port 8000 run; \ 19 | fi 20 | 21 | EXPOSE 8000 22 | -------------------------------------------------------------------------------- /api/Makefile: -------------------------------------------------------------------------------- 1 | DOCKER_COMPOSE=docker-compose -p crick 2 | RUN_MIGRATE=$(DOCKER_COMPOSE) -f docker-compose.yml -f docker-compose.tools.yml run --rm migrate 3 | 4 | default: help 5 | 6 | dev: ## start the API with Docker 7 | @docker-compose -p crick up -d 8 | @echo "\033[92mYou can browse the application at: http://api.crick.dev:8000\033[0m" 9 | .PHONY: dev 10 | 11 | logs: ## show the API logs 12 | $(DOCKER_COMPOSE) logs -f api 13 | .PHONY: logs 14 | 15 | migrate-up: ## apply database migrations 16 | $(RUN_MIGRATE) up 17 | .PHONY: migrate-up 18 | 19 | migrate-version: ## show database migration version 20 | $(RUN_MIGRATE) version 21 | .PHONY: migrate-version 22 | 23 | down: ## run docker-compose down 24 | $(DOCKER_COMPOSE) down 25 | .PHONY: logs 26 | 27 | test: ## run the test suite 28 | go test -v $$(go list ./... | grep -v /vendor/) 29 | .PHONY: test 30 | 31 | exec-db: ## exec the database container 32 | $(DOCKER_COMPOSE) exec db sh 33 | .PHONY: exec-db 34 | 35 | help: 36 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 37 | .PHONY: help 38 | -------------------------------------------------------------------------------- /api/docker-compose.tools.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | migrate: 5 | build: 6 | context: ./migrations 7 | entrypoint: migrate -database 'postgres://crick:crickIsChic@db:5432/crick?sslmode=disable&x-migrations-table=migrations' -source 'file:///migrations' 8 | volumes: 9 | - ./migrations:/migrations 10 | depends_on: 11 | - db 12 | -------------------------------------------------------------------------------- /api/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | api: 5 | build: 6 | context: . 7 | volumes: 8 | - .:/go/src/github.com/TailorDev/crick/api 9 | environment: 10 | CRICK_DSN: postgres://crick:crickIsChic@db:5432/crick?sslmode=disable 11 | AUTH0_DOMAIN: https://crick.eu.auth0.com/ 12 | AUTH0_AUDIENCE: https://dev.api.crick.io/,https://crick.eu.auth0.com/userinfo 13 | AUTH0_JWKS_URI: https://crick.eu.auth0.com/.well-known/jwks.json 14 | CORS_ALLOWED_ORIGINS: http://crick.dev:3000 15 | ports: 16 | - 8000:8000 17 | depends_on: 18 | - db 19 | 20 | db: 21 | image: postgres:9.6-alpine 22 | environment: 23 | POSTGRES_DB: crick 24 | POSTGRES_USER: crick 25 | POSTGRES_PASSWORD: crickIsChic 26 | -------------------------------------------------------------------------------- /api/handlers/users_test.go: -------------------------------------------------------------------------------- 1 | package handlers_test 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | 8 | "github.com/TailorDev/crick/api/handlers" 9 | "github.com/julienschmidt/httprouter" 10 | ) 11 | 12 | func TestUsersGetMe(t *testing.T) { 13 | h := handlers.New(nil, nil) 14 | 15 | router := httprouter.New() 16 | router.GET("/test-endpoint", h.UsersGetMe) 17 | 18 | req, err := http.NewRequest("GET", "/test-endpoint", nil) 19 | if err != nil { 20 | t.Fatal(err) 21 | } 22 | 23 | req = req.WithContext(AddUserToContext(req.Context(), GetFakeUser())) 24 | 25 | rr := httptest.NewRecorder() 26 | router.ServeHTTP(rr, req) 27 | 28 | if status := rr.Code; status != http.StatusOK { 29 | t.Errorf("handler returned wrong status code: got %v want %v", 30 | status, http.StatusOK) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/migrations/00001_create_users_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE users ( 2 | id uuid NOT NULL, 3 | login varchar(50) 4 | ); 5 | -------------------------------------------------------------------------------- /api/migrations/00002_update_user_table_with_auth0_field.up.sql: -------------------------------------------------------------------------------- 1 | /* needed to use uuid_generate_v4() */ 2 | CREATE EXTENSION "uuid-ossp"; 3 | 4 | ALTER TABLE users ADD COLUMN auth0_id VARCHAR(50); 5 | -------------------------------------------------------------------------------- /api/migrations/00003_drop_extension_uuid.up.sql: -------------------------------------------------------------------------------- 1 | /* we actually do not use it... */ 2 | DROP EXTENSION "uuid-ossp"; 3 | -------------------------------------------------------------------------------- /api/migrations/00004_create_projects_table.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ADD PRIMARY KEY (id); 2 | 3 | CREATE TABLE projects ( 4 | id uuid PRIMARY KEY, 5 | name text, 6 | user_id uuid REFERENCES users (id) 7 | ); 8 | -------------------------------------------------------------------------------- /api/migrations/00005_create_create_frames_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE frames ( 2 | id varchar(50) PRIMARY KEY, 3 | start_at timestamp WITHOUT TIME ZONE, 4 | end_at timestamp WITHOUT TIME ZONE, 5 | project_id uuid REFERENCES projects (id) 6 | ); 7 | -------------------------------------------------------------------------------- /api/migrations/00006_add_synchronized_at_field_to_frames.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE frames ADD COLUMN synchronized_at timestamp WITHOUT TIME ZONE; 2 | -------------------------------------------------------------------------------- /api/migrations/00007_add_watson_token_to_users.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ADD COLUMN watson_token text; 2 | -------------------------------------------------------------------------------- /api/migrations/00008_add_tags_column_to_frames.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE frames ADD COLUMN tags text[]; 2 | -------------------------------------------------------------------------------- /api/migrations/00009_add_unique_constraint_to_user_auth0_id.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ADD CONSTRAINT auth0_id_unique UNIQUE (auth0_id); 2 | -------------------------------------------------------------------------------- /api/migrations/00010_change_watson_token_col_to_api_token.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users RENAME COLUMN watson_token TO api_token; 2 | -------------------------------------------------------------------------------- /api/migrations/00011_change_frame_id_type_to_uuid.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE frames ALTER COLUMN id TYPE uuid USING id::uuid; 2 | -------------------------------------------------------------------------------- /api/migrations/00012_create_table_teams.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE teams ( 2 | id uuid PRIMARY KEY, 3 | name text NOT NULL, 4 | projects text[], 5 | user_ids uuid[], 6 | owner_id uuid NOT NULL REFERENCES users (id) 7 | ); 8 | -------------------------------------------------------------------------------- /api/migrations/00013_add_not_null_constraints.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ALTER COLUMN login SET NOT NULL; 2 | ALTER TABLE users ALTER COLUMN api_token SET NOT NULL; 3 | 4 | ALTER TABLE frames ALTER COLUMN start_at SET NOT NULL; 5 | ALTER TABLE frames ALTER COLUMN end_at SET NOT NULL; 6 | ALTER TABLE frames ALTER COLUMN project_id SET NOT NULL; 7 | 8 | ALTER TABLE projects ALTER COLUMN name SET NOT NULL; 9 | ALTER TABLE projects ALTER COLUMN user_id SET NOT NULL; 10 | -------------------------------------------------------------------------------- /api/migrations/00014_add_avatar_url_to_users.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ADD COLUMN avatar_url text; 2 | -------------------------------------------------------------------------------- /api/migrations/00015_create_project_activities_view.up.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE VIEW project_workloads AS SELECT 2 | SUM( 3 | (DATE_PART('day', end_at - start_at) * 24 + 4 | DATE_PART('hour', end_at - start_at)) 5 | ) as nb_hours, 6 | start_at::date as date, 7 | projects.id as project_id, 8 | projects.user_id as user_id 9 | FROM frames 10 | INNER JOIN projects ON (frames.project_id = projects.id) 11 | GROUP BY (projects.id, projects.user_id, date) 12 | ; 13 | -------------------------------------------------------------------------------- /api/migrations/00016_add_unique_constraint_to_teams.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE teams ADD CONSTRAINT unique_name_for_user UNIQUE (name, owner_id); 2 | -------------------------------------------------------------------------------- /api/migrations/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.8-alpine 2 | MAINTAINER William Durand 3 | 4 | RUN apk update && \ 5 | apk add git && \ 6 | rm -r /var/cache/apk/* 7 | 8 | # db migration tool 9 | RUN go get -u -d github.com/mattes/migrate/cli \ 10 | github.com/lib/pq 11 | RUN go build -tags 'postgres' -o /usr/local/bin/migrate github.com/mattes/migrate/cli 12 | -------------------------------------------------------------------------------- /api/models/users_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/TailorDev/crick/api/models" 7 | ) 8 | 9 | func TestIsOwnerOfTeam(t *testing.T) { 10 | user := models.NewUser("auth0ID", "login", "avatar_url") 11 | team1 := models.Team{OwnerID: user.ID} 12 | team2 := models.Team{} 13 | 14 | if !user.IsOwnerOfTeam(team1) { 15 | t.Fatalf("expected user to be owner of the team") 16 | } 17 | 18 | if user.IsOwnerOfTeam(team2) { 19 | t.Fatalf("expected user NOT to be owner of the team") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /api/vendor/github.com/NYTimes/gziphandler/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /api/vendor/github.com/NYTimes/gziphandler/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.7 5 | - 1.8 6 | - tip 7 | -------------------------------------------------------------------------------- /api/vendor/github.com/NYTimes/gziphandler/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 The New York Times Company 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this library except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /api/vendor/github.com/auth0-community/go-auth0/.gitignore: -------------------------------------------------------------------------------- 1 | gin-bin 2 | .vscode/ 3 | *.test 4 | *.out 5 | *.coverprofile 6 | .idea/ 7 | *.iml 8 | jwk_client_test.go -------------------------------------------------------------------------------- /api/vendor/github.com/auth0-community/go-auth0/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - tip 5 | before_install: 6 | - go get github.com/axw/gocov/gocov 7 | - go get github.com/mattn/goveralls 8 | - go get github.com/modocache/gover 9 | - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi 10 | script: 11 | - go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c 12 | - gover 13 | - $HOME/gopath/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci 14 | -------------------------------------------------------------------------------- /api/vendor/github.com/auth0-community/go-auth0/common_test.go: -------------------------------------------------------------------------------- 1 | package auth0 2 | 3 | var ( 4 | // The default generated token by Chrome jwt extension 5 | defaultToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdWJqZWN0IiwiaXNzIjoiaXNzdWVyIiwiYXVkIjoiYXVkaWVuY2UifQ.XjWtlyDjBoFDREk1WbvxriSdLve5jI7uyamzCiGdg9U" 6 | defaultAudience = []string{"audience"} 7 | defaultIssuer = "issuer" 8 | defaultSecretProvider = NewKeyProvider([]byte("secret")) 9 | ) 10 | -------------------------------------------------------------------------------- /api/vendor/github.com/auth0-community/go-auth0/middlewares/gin/auth_group.go: -------------------------------------------------------------------------------- 1 | package gin 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /api/vendor/github.com/auth0-community/go-auth0/token_extraction_test.go: -------------------------------------------------------------------------------- 1 | package auth0 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "reflect" 7 | "testing" 8 | 9 | "gopkg.in/square/go-jose.v2/jwt" 10 | ) 11 | 12 | func TestFromRequestExtraction(t *testing.T) { 13 | 14 | headerTokenRequest, _ := http.NewRequest("", "http://localhost", nil) 15 | headerValue := fmt.Sprintf("Bearer %s", defaultToken) 16 | headerTokenRequest.Header.Add("Authorization", headerValue) 17 | 18 | token, err := FromHeader(headerTokenRequest) 19 | 20 | if err != nil { 21 | t.Error(err) 22 | return 23 | } 24 | 25 | claims := jwt.Claims{} 26 | err = token.Claims([]byte("secret"), &claims) 27 | if err != nil { 28 | t.Errorf("Claims should be decoded correctly with default token: %q \n", err) 29 | t.FailNow() 30 | } 31 | 32 | if claims.Issuer != defaultIssuer || !reflect.DeepEqual(claims.Audience, jwt.Audience(defaultAudience)) { 33 | t.Error("Invalid issuer, audience or subject:", claims.Issuer, claims.Audience) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | services: 4 | - docker 5 | 6 | env: 7 | global: 8 | - GOPATH=/opt 9 | - BUILD_DIR=/opt/src/github.com/coreos/go-systemd 10 | matrix: 11 | - DOCKER_BASE=ubuntu:16.04 12 | - DOCKER_BASE=debian:stretch 13 | 14 | before_install: 15 | - docker pull ${DOCKER_BASE} 16 | - docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${DOCKER_BASE} /bin/bash -c "apt-get update && apt-get install -y build-essential git golang dbus libsystemd-dev libpam-systemd && go get github.com/coreos/pkg/dlopen && go get github.com/godbus/dbus" 17 | - docker commit `cat /tmp/cidfile` go-systemd/container-tests 18 | - rm -f /tmp/cidfile 19 | 20 | install: 21 | - docker run -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system 22 | 23 | script: 24 | - docker exec `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./test" 25 | 26 | after_script: 27 | - docker kill `cat /tmp/cidfile` 28 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/examples/activation/httpserver/README.md: -------------------------------------------------------------------------------- 1 | ## socket activated http server 2 | 3 | This is a simple example of using socket activation with systemd to serve a 4 | simple HTTP server on http://127.0.0.1:8076 5 | 6 | To try it out `go get` the httpserver and run it under the systemd-activate helper 7 | 8 | ```bash 9 | export GOPATH="$PWD" 10 | go get github.com/coreos/go-systemd/examples/activation/httpserver 11 | /usr/lib/systemd/systemd-activate -l 127.0.0.1:8076 ./bin/httpserver 12 | ``` 13 | 14 | Then curl the URL and you will notice that it starts up: 15 | 16 | ``` 17 | curl 127.0.0.1:8076 18 | hello socket activated world! 19 | ``` 20 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/examples/activation/httpserver/hello.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Hello World HTTP 3 | Requires=network.target 4 | After=multi-user.target 5 | 6 | [Service] 7 | Type=simple 8 | ExecStart=/usr/local/bin/httpserver 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/examples/activation/httpserver/hello.socket: -------------------------------------------------------------------------------- 1 | [Socket] 2 | ListenStream=127.0.0.1:8076 3 | 4 | [Install] 5 | WantedBy=sockets.target 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/enable-disable.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=enable disable test 3 | 4 | [Service] 5 | ExecStart=/bin/sleep 400 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/mask-unmask.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=mask unmask test 3 | 4 | [Service] 5 | ExecStart=/bin/sleep 400 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/reload.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=reload test 3 | 4 | [Service] 5 | ExecStart=/bin/bash -c "trap '' HUP; /bin/sleep 400" 6 | ExecReload=-/bin/systemctl kill -s HUP reload.service 7 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/start-failed.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=starting a failed test 3 | 4 | [Service] 5 | ExecStartPre=/bin/false 6 | ExecStart=/bin/sleep 400 7 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/start-stop.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=start stop test 3 | 4 | [Service] 5 | ExecStart=/bin/sleep 400 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/subscribe-events-set.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=start stop test 3 | 4 | [Service] 5 | ExecStart=/bin/sleep 400 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/fixtures/subscribe-events.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=start stop test 3 | 4 | [Service] 5 | ExecStart=/bin/sleep 400 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/login1/dbus_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 CoreOS, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package login1 16 | 17 | import ( 18 | "testing" 19 | ) 20 | 21 | // TestNew ensures that New() works without errors. 22 | func TestNew(t *testing.T) { 23 | _, err := New() 24 | 25 | if err != nil { 26 | t.Fatal(err) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/machine1/dbus_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 CoreOS Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package machine1 18 | 19 | import ( 20 | "testing" 21 | ) 22 | 23 | // TestNew ensures that New() works without errors. 24 | func TestNew(t *testing.T) { 25 | _, err := New() 26 | 27 | if err != nil { 28 | t.Fatal(err) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/vendor/github.com/coreos/go-systemd/util/util_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 CoreOS, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build !cgo 16 | 17 | package util 18 | 19 | func getRunningSlice() (string, error) { return "", ErrNoCGO } 20 | 21 | func runningFromSystemService() (bool, error) { return false, ErrNoCGO } 22 | 23 | func currentUnitName() (string, error) { return "", ErrNoCGO } 24 | -------------------------------------------------------------------------------- /api/vendor/github.com/go-errors/errors/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Conrad Irwin 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /api/vendor/github.com/jmoiron/sqlx/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | tags 24 | environ 25 | -------------------------------------------------------------------------------- /api/vendor/github.com/jmoiron/sqlx/doc.go: -------------------------------------------------------------------------------- 1 | // Package sqlx provides general purpose extensions to database/sql. 2 | // 3 | // It is intended to seamlessly wrap database/sql and provide convenience 4 | // methods which are useful in the development of database driven applications. 5 | // None of the underlying database/sql methods are changed. Instead all extended 6 | // behavior is implemented through new methods defined on wrapper types. 7 | // 8 | // Additions include scanning into structs, named query support, rebinding 9 | // queries for different drivers, convenient shorthands for common error handling 10 | // and more. 11 | // 12 | package sqlx 13 | -------------------------------------------------------------------------------- /api/vendor/github.com/jmoiron/sqlx/reflectx/README.md: -------------------------------------------------------------------------------- 1 | # reflectx 2 | 3 | The sqlx package has special reflect needs. In particular, it needs to: 4 | 5 | * be able to map a name to a field 6 | * understand embedded structs 7 | * understand mapping names to fields by a particular tag 8 | * user specified name -> field mapping functions 9 | 10 | These behaviors mimic the behaviors by the standard library marshallers and also the 11 | behavior of standard Go accessors. 12 | 13 | The first two are amply taken care of by `Reflect.Value.FieldByName`, and the third is 14 | addressed by `Reflect.Value.FieldByNameFunc`, but these don't quite understand struct 15 | tags in the ways that are vital to most marshallers, and they are slow. 16 | 17 | This reflectx package extends reflect to achieve these goals. 18 | -------------------------------------------------------------------------------- /api/vendor/github.com/jmoiron/sqlx/types/README.md: -------------------------------------------------------------------------------- 1 | # types 2 | 3 | The types package provides some useful types which implement the `sql.Scanner` 4 | and `driver.Valuer` interfaces, suitable for use as scan and value targets with 5 | database/sql. 6 | -------------------------------------------------------------------------------- /api/vendor/github.com/julienschmidt/httprouter/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - tip 9 | -------------------------------------------------------------------------------- /api/vendor/github.com/justinas/alice/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | install: 4 | - go get github.com/stretchr/testify/assert 5 | 6 | go: 7 | - 1.1 8 | - 1.2 9 | - 1.3 10 | - 1.4 11 | - 1.5 12 | - 1.6 13 | - tip 14 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/.gitignore: -------------------------------------------------------------------------------- 1 | .db 2 | *.test 3 | *~ 4 | *.swp 5 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5.x 5 | - 1.6.x 6 | - 1.7.x 7 | - 1.8.x 8 | - master 9 | 10 | sudo: true 11 | 12 | env: 13 | global: 14 | - PGUSER=postgres 15 | - PQGOSSLTESTS=1 16 | - PQSSLCERTTEST_PATH=$PWD/certs 17 | - PGHOST=127.0.0.1 18 | matrix: 19 | - PGVERSION=9.6 20 | - PGVERSION=9.5 21 | - PGVERSION=9.4 22 | - PGVERSION=9.3 23 | - PGVERSION=9.2 24 | - PGVERSION=9.1 25 | - PGVERSION=9.0 26 | 27 | before_install: 28 | - ./.travis.sh postgresql_uninstall 29 | - ./.travis.sh pgdg_repository 30 | - ./.travis.sh postgresql_install 31 | - ./.travis.sh postgresql_configure 32 | - ./.travis.sh client_configure 33 | - go get golang.org/x/tools/cmd/goimports 34 | 35 | before_script: 36 | - createdb pqgotest 37 | - createuser -DRS pqgossltest 38 | - createuser -DRS pqgosslcert 39 | 40 | script: 41 | - > 42 | goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }' 43 | - go vet ./... 44 | - PQTEST_BINARY_PARAMETERS=no go test -race -v ./... 45 | - PQTEST_BINARY_PARAMETERS=yes go test -race -v ./... 46 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2013, 'pq' Contributors 2 | Portions Copyright (C) 2011 Blake Mizerany 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/certs/README: -------------------------------------------------------------------------------- 1 | This directory contains certificates and private keys for testing some 2 | SSL-related functionality in Travis. Do NOT use these certificates for 3 | anything other than testing. 4 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/certs/postgresql.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICWwIBAAKBgQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0 3 | WAKy55RYwejlu9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+ 4 | bE0rlJc8VbzR0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQAB 5 | AoGAM5dM6/kp9P700i8qjOgRPym96Zoh5nGfz/rIE5z/r36NBkdvIg8OVZfR96nH 6 | b0b9TOMR5lsPp0sI9yivTWvX6qyvLJRWy2vvx17hXK9NxXUNTAm0PYZUTvCtcPeX 7 | RnJpzQKNZQPkFzF0uXBc4CtPK2Vz0+FGvAelrhYAxnw1dIkCQQD+9qaW5QhXjsjb 8 | Nl85CmXgxPmGROcgLQCO+omfrjf9UXrituU9Dz6auym5lDGEdMFnkzfr+wpasEy9 9 | mf5ZZOhDAkEA5HjXfVGaCtpydOt6hDon/uZsyssCK2lQ7NSuE3vP+sUsYMzIpEoy 10 | t3VWXqKbo+g9KNDTP4WEliqp1aiSIylzzQJANPeqzihQnlgEdD4MdD4rwhFJwVIp 11 | Le8Lcais1KaN7StzOwxB/XhgSibd2TbnPpw+3bSg5n5lvUdo+e62/31OHwJAU1jS 12 | I+F09KikQIr28u3UUWT2IzTT4cpVv1AHAQyV3sG3YsjSGT0IK20eyP9BEBZU2WL0 13 | 7aNjrvR5aHxKc5FXsQJABsFtyGpgI5X4xufkJZVZ+Mklz2n7iXa+XPatMAHFxAtb 14 | EEMt60rngwMjXAzBSC6OYuYogRRAY3UCacNC5VhLYQ== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/issues_test.go: -------------------------------------------------------------------------------- 1 | package pq 2 | 3 | import "testing" 4 | 5 | func TestIssue494(t *testing.T) { 6 | db := openTestConn(t) 7 | defer db.Close() 8 | 9 | query := `CREATE TEMP TABLE t (i INT PRIMARY KEY)` 10 | if _, err := db.Exec(query); err != nil { 11 | t.Fatal(err) 12 | } 13 | 14 | txn, err := db.Begin() 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | 19 | if _, err := txn.Prepare(CopyIn("t", "i")); err != nil { 20 | t.Fatal(err) 21 | } 22 | 23 | if _, err := txn.Query("SELECT 1"); err == nil { 24 | t.Fatal("expected error") 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/oid/doc.go: -------------------------------------------------------------------------------- 1 | // Package oid contains OID constants 2 | // as defined by the Postgres server. 3 | package oid 4 | 5 | // Oid is a Postgres Object ID. 6 | type Oid uint32 7 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/ssl_go1.7.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package pq 4 | 5 | import "crypto/tls" 6 | 7 | // Accept renegotiation requests initiated by the backend. 8 | // 9 | // Renegotiation was deprecated then removed from PostgreSQL 9.5, but 10 | // the default configuration of older versions has it enabled. Redshift 11 | // also initiates renegotiations and cannot be reconfigured. 12 | func sslRenegotiation(conf *tls.Config) { 13 | conf.Renegotiation = tls.RenegotiateFreelyAsClient 14 | } 15 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/ssl_permissions.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package pq 4 | 5 | import "os" 6 | 7 | // sslKeyPermissions checks the permissions on user-supplied ssl key files. 8 | // The key file should have very little access. 9 | // 10 | // libpq does not check key file permissions on Windows. 11 | func sslKeyPermissions(sslkey string) error { 12 | info, err := os.Stat(sslkey) 13 | if err != nil { 14 | return err 15 | } 16 | if info.Mode().Perm()&0077 != 0 { 17 | return ErrSSLKeyHasWorldPermissions 18 | } 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/ssl_renegotiation.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package pq 4 | 5 | import "crypto/tls" 6 | 7 | // Renegotiation is not supported by crypto/tls until Go 1.7. 8 | func sslRenegotiation(*tls.Config) {} 9 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/ssl_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package pq 4 | 5 | // sslKeyPermissions checks the permissions on user-supplied ssl key files. 6 | // The key file should have very little access. 7 | // 8 | // libpq does not check key file permissions on Windows. 9 | func sslKeyPermissions(string) error { return nil } 10 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/user_posix.go: -------------------------------------------------------------------------------- 1 | // Package pq is a pure Go Postgres driver for the database/sql package. 2 | 3 | // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris rumprun 4 | 5 | package pq 6 | 7 | import ( 8 | "os" 9 | "os/user" 10 | ) 11 | 12 | func userCurrent() (string, error) { 13 | u, err := user.Current() 14 | if err == nil { 15 | return u.Username, nil 16 | } 17 | 18 | name := os.Getenv("USER") 19 | if name != "" { 20 | return name, nil 21 | } 22 | 23 | return "", ErrCouldNotDetectUsername 24 | } 25 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/user_windows.go: -------------------------------------------------------------------------------- 1 | // Package pq is a pure Go Postgres driver for the database/sql package. 2 | package pq 3 | 4 | import ( 5 | "path/filepath" 6 | "syscall" 7 | ) 8 | 9 | // Perform Windows user name lookup identically to libpq. 10 | // 11 | // The PostgreSQL code makes use of the legacy Win32 function 12 | // GetUserName, and that function has not been imported into stock Go. 13 | // GetUserNameEx is available though, the difference being that a 14 | // wider range of names are available. To get the output to be the 15 | // same as GetUserName, only the base (or last) component of the 16 | // result is returned. 17 | func userCurrent() (string, error) { 18 | pw_name := make([]uint16, 128) 19 | pwname_size := uint32(len(pw_name)) - 1 20 | err := syscall.GetUserNameEx(syscall.NameSamCompatible, &pw_name[0], &pwname_size) 21 | if err != nil { 22 | return "", ErrCouldNotDetectUsername 23 | } 24 | s := syscall.UTF16ToString(pw_name) 25 | u := filepath.Base(s) 26 | return u, nil 27 | } 28 | -------------------------------------------------------------------------------- /api/vendor/github.com/lib/pq/uuid.go: -------------------------------------------------------------------------------- 1 | package pq 2 | 3 | import ( 4 | "encoding/hex" 5 | "fmt" 6 | ) 7 | 8 | // decodeUUIDBinary interprets the binary format of a uuid, returning it in text format. 9 | func decodeUUIDBinary(src []byte) ([]byte, error) { 10 | if len(src) != 16 { 11 | return nil, fmt.Errorf("pq: unable to decode uuid; bad length: %d", len(src)) 12 | } 13 | 14 | dst := make([]byte, 36) 15 | dst[8], dst[13], dst[18], dst[23] = '-', '-', '-', '-' 16 | hex.Encode(dst[0:], src[0:4]) 17 | hex.Encode(dst[9:], src[4:6]) 18 | hex.Encode(dst[14:], src[6:8]) 19 | hex.Encode(dst[19:], src[8:10]) 20 | hex.Encode(dst[24:], src[10:16]) 21 | 22 | return dst, nil 23 | } 24 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - 1.4 5 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/alice/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/justinas/alice" 7 | "github.com/rs/cors" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | 15 | mux := http.NewServeMux() 16 | 17 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 18 | w.Header().Set("Content-Type", "application/json") 19 | w.Write([]byte("{\"hello\": \"world\"}")) 20 | }) 21 | 22 | chain := alice.New(c.Handler).Then(mux) 23 | http.ListenAndServe(":8080", chain) 24 | } 25 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/default/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | mux := http.NewServeMux() 11 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 12 | w.Header().Set("Content-Type", "application/json") 13 | w.Write([]byte("{\"hello\": \"world\"}")) 14 | }) 15 | 16 | // Use default options 17 | handler := cors.Default().Handler(mux) 18 | http.ListenAndServe(":8080", handler) 19 | } 20 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/goji/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | "github.com/zenazn/goji" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | goji.Use(c.Handler) 15 | 16 | goji.Get("/", func(w http.ResponseWriter, r *http.Request) { 17 | w.Header().Set("Content-Type", "application/json") 18 | w.Write([]byte("{\"hello\": \"world\"}")) 19 | }) 20 | 21 | goji.Serve() 22 | } 23 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/martini/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/go-martini/martini" 5 | "github.com/martini-contrib/render" 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"http://foo.com"}, 12 | }) 13 | 14 | m := martini.Classic() 15 | m.Use(render.Renderer()) 16 | m.Use(c.HandlerFunc) 17 | 18 | m.Get("/", func(r render.Render) { 19 | r.JSON(200, map[string]interface{}{"hello": "world"}) 20 | }) 21 | 22 | m.Run() 23 | } 24 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/negroni/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/codegangsta/negroni" 7 | "github.com/rs/cors" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | 15 | mux := http.NewServeMux() 16 | 17 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 18 | w.Header().Set("Content-Type", "application/json") 19 | w.Write([]byte("{\"hello\": \"world\"}")) 20 | }) 21 | 22 | n := negroni.Classic() 23 | n.Use(c) 24 | n.UseHandler(mux) 25 | n.Run(":3000") 26 | } 27 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/nethttp/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"http://foo.com"}, 12 | }) 13 | 14 | handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | w.Header().Set("Content-Type", "application/json") 16 | w.Write([]byte("{\"hello\": \"world\"}")) 17 | }) 18 | 19 | http.ListenAndServe(":8080", c.Handler(handler)) 20 | } 21 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/openbar/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"*"}, 12 | AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, 13 | AllowCredentials: true, 14 | }) 15 | 16 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 17 | w.Header().Set("Content-Type", "application/json") 18 | w.Write([]byte("{\"hello\": \"world\"}")) 19 | }) 20 | 21 | http.ListenAndServe(":8080", c.Handler(h)) 22 | } 23 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/cors/examples/xhandler/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | "github.com/rs/xhandler" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | func main() { 12 | c := xhandler.Chain{} 13 | 14 | // Use default options 15 | c.UseC(cors.Default().HandlerC) 16 | 17 | mux := http.NewServeMux() 18 | mux.Handle("/", c.Handler(xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { 19 | w.Header().Set("Content-Type", "application/json") 20 | w.Write([]byte("{\"hello\": \"world\"}")) 21 | }))) 22 | 23 | http.ListenAndServe(":8080", mux) 24 | } 25 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/xhandler/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.5 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | -------------------------------------------------------------------------------- /api/vendor/github.com/rs/xhandler/xmux/README.md: -------------------------------------------------------------------------------- 1 | Xmux did move to it's [own repository](https://github.com/rs/xmux/blob/master/README.md) 2 | -------------------------------------------------------------------------------- /api/vendor/github.com/satori/go.uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | before_install: 10 | - go get github.com/mattn/goveralls 11 | - go get golang.org/x/tools/cmd/cover 12 | script: 13 | - $HOME/gopath/bin/goveralls -service=travis-ci 14 | notifications: 15 | email: false 16 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/.gitcookies.sh.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TailorDev/crick/00c8e8dd4ff91d9f65facf494d35af278723ffca/api/vendor/github.com/square/go-jose/.gitcookies.sh.enc -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .*.swp 3 | *.out 4 | *.test 5 | *.pem 6 | *.cov 7 | jose-util/jose-util 8 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/BUG-BOUNTY.md: -------------------------------------------------------------------------------- 1 | Serious about security 2 | ====================== 3 | 4 | Square recognizes the important contributions the security research community 5 | can make. We therefore encourage reporting security issues with the code 6 | contained in this repository. 7 | 8 | If you believe you have discovered a security vulnerability, please follow the 9 | guidelines at . 10 | 11 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | If you would like to contribute code to go-jose you can do so through GitHub by 4 | forking the repository and sending a pull request. 5 | 6 | When submitting code, please make every effort to follow existing conventions 7 | and style in order to keep the code as readable as possible. Please also make 8 | sure all tests pass by running `go test`, and format your code with `go fmt`. 9 | We also recommend using `golint` and `errcheck`. 10 | 11 | Before your code can be accepted into the project you must also sign the 12 | [Individual Contributor License Agreement][1]. 13 | 14 | [1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1 15 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/doc.go: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright 2014 Square Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | 19 | Package jose aims to provide an implementation of the Javascript Object Signing 20 | and Encryption set of standards. For the moment, it mainly focuses on 21 | encryption and signing based on the JSON Web Encryption and JSON Web Signature 22 | standards. The library supports both the compact and full serialization 23 | formats, and has optional support for multiple recipients. 24 | 25 | */ 26 | package jose // import "gopkg.in/square/go-jose.v1" 27 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/json/README.md: -------------------------------------------------------------------------------- 1 | # Safe JSON 2 | 3 | This repository contains a fork of the `encoding/json` package from Go 1.6. 4 | 5 | The following changes were made: 6 | 7 | * Object deserialization uses case-sensitive member name matching instead of 8 | [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html). 9 | This is to avoid differences in the interpretation of JOSE messages between 10 | go-jose and libraries written in other languages. 11 | * When deserializing a JSON object, we check for duplicate keys and reject the 12 | input whenever we detect a duplicate. Rather than trying to work with malformed 13 | data, we prefer to reject it right away. 14 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/json/tags_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package json 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestTagParsing(t *testing.T) { 12 | name, opts := parseTag("field,foobar,foo") 13 | if name != "field" { 14 | t.Fatalf("name = %q, want field", name) 15 | } 16 | for _, tt := range []struct { 17 | opt string 18 | want bool 19 | }{ 20 | {"foobar", true}, 21 | {"foo", true}, 22 | {"bar", false}, 23 | } { 24 | if opts.Contains(tt.opt) != tt.want { 25 | t.Errorf("Contains(%q) = %v", tt.opt, !tt.want) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api/vendor/github.com/square/go-jose/json/testdata/code.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TailorDev/crick/00c8e8dd4ff91d9f65facf494d35af278723ffca/api/vendor/github.com/square/go-jose/json/testdata/code.json.gz -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before opening your pull request, please make sure that you've: 2 | 3 | - [ ] [signed Uber's Contributor License Agreement](https://docs.google.com/a/uber.com/forms/d/1pAwS_-dA1KhPlfxzYLBqK6rsSWwRwH95OCCZrcsY5rk/viewform); 4 | - [ ] added tests to cover your changes; 5 | - [ ] run the test suite locally (`make test`); and finally, 6 | - [ ] run the linters locally (`make lint`). 7 | 8 | Thanks for your contribution! 9 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /vendor 3 | /cover 4 | cover.out 5 | lint.log 6 | 7 | # Binaries 8 | *.test 9 | 10 | # Profiling output 11 | *.prof 12 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go_import_path: go.uber.org/atomic 4 | 5 | go: 6 | - 1.5 7 | - 1.6 8 | - tip 9 | 10 | cache: 11 | directories: 12 | - vendor 13 | 14 | install: 15 | - make install_ci 16 | 17 | script: 18 | - make test_ci 19 | - scripts/test-ubergo.sh 20 | - make lint 21 | - travis_retry goveralls -coverprofile=cover.out -service=travis-ci 22 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Uber Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/glide.lock: -------------------------------------------------------------------------------- 1 | hash: f14d51408e3e0e4f73b34e4039484c78059cd7fc5f4996fdd73db20dc8d24f53 2 | updated: 2016-10-27T00:10:51.16960137-07:00 3 | imports: [] 4 | testImports: 5 | - name: github.com/davecgh/go-spew 6 | version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d 7 | subpackages: 8 | - spew 9 | - name: github.com/pmezard/go-difflib 10 | version: d8ed2627bdf02c080bf22230dbb337003b7aba2d 11 | subpackages: 12 | - difflib 13 | - name: github.com/stretchr/testify 14 | version: d77da356e56a7428ad25149ca77381849a6a5232 15 | subpackages: 16 | - assert 17 | - require 18 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/glide.yaml: -------------------------------------------------------------------------------- 1 | package: go.uber.org/atomic 2 | testImport: 3 | - package: github.com/stretchr/testify 4 | subpackages: 5 | - assert 6 | - require 7 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/scripts/cover.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | COVER=cover 6 | ROOT_PKG=go.uber.org/atomic 7 | 8 | if [[ -d "$COVER" ]]; then 9 | rm -rf "$COVER" 10 | fi 11 | mkdir -p "$COVER" 12 | 13 | i=0 14 | for pkg in "$@"; do 15 | i=$((i + 1)) 16 | 17 | extracoverpkg="" 18 | if [[ -f "$GOPATH/src/$pkg/.extra-coverpkg" ]]; then 19 | extracoverpkg=$( \ 20 | sed -e "s|^|$pkg/|g" < "$GOPATH/src/$pkg/.extra-coverpkg" \ 21 | | tr '\n' ',') 22 | fi 23 | 24 | coverpkg=$(go list -json "$pkg" | jq -r ' 25 | .Deps 26 | | map(select(startswith("'"$ROOT_PKG"'"))) 27 | | map(select(contains("/vendor/") | not)) 28 | | . + ["'"$pkg"'"] 29 | | join(",") 30 | ') 31 | if [[ -n "$extracoverpkg" ]]; then 32 | coverpkg="$extracoverpkg$coverpkg" 33 | fi 34 | 35 | go test \ 36 | -coverprofile "$COVER/cover.${i}.out" -coverpkg "$coverpkg" \ 37 | -v "$pkg" 38 | done 39 | 40 | gocovmerge "$COVER"/*.out > cover.out 41 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/atomic/scripts/test-ubergo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euox pipefail 3 | IFS=$'\n\t' 4 | 5 | # This script creates a fake GOPATH, symlinks in the current 6 | # directory as uber-go/atomic and verifies that tests still pass. 7 | 8 | WORK_DIR=`mktemp -d` 9 | function cleanup { 10 | rm -rf "$WORK_DIR" 11 | } 12 | trap cleanup EXIT 13 | 14 | 15 | export GOPATH="$WORK_DIR" 16 | PKG_PARENT="$WORK_DIR/src/github.com/uber-go" 17 | PKG_DIR="$PKG_PARENT/atomic" 18 | 19 | mkdir -p "$PKG_PARENT" 20 | cp -R `pwd` "$PKG_DIR" 21 | cd "$PKG_DIR" 22 | 23 | # The example imports go.uber.org, fix the import. 24 | sed -e 's/go.uber.org\/atomic/github.com\/uber-go\/atomic/' -i="" example_test.go 25 | 26 | make test 27 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/zap/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | vendor 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | *.pprof 27 | *.out 28 | *.log 29 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/zap/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.7 5 | - 1.8 6 | go_import_path: go.uber.org/zap 7 | env: 8 | global: 9 | - GO15VENDOREXPERIMENT=1 10 | - TEST_TIMEOUT_SCALE=10 11 | cache: 12 | directories: 13 | - vendor 14 | install: 15 | - make dependencies 16 | script: 17 | - make lint 18 | - make test 19 | - make bench 20 | after_success: 21 | - travis_retry make coveralls 22 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/zap/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Uber Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/zap/check_license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | text=`head -1 LICENSE.txt` 4 | 5 | ERROR_COUNT=0 6 | while read file 7 | do 8 | head -1 ${file} | grep -q "${text}" 9 | if [ $? -ne 0 ]; then 10 | echo "$file is missing license header." 11 | (( ERROR_COUNT++ )) 12 | fi 13 | done < <(git ls-files "*\.go") 14 | 15 | exit $ERROR_COUNT 16 | -------------------------------------------------------------------------------- /api/vendor/go.uber.org/zap/glide.yaml: -------------------------------------------------------------------------------- 1 | package: go.uber.org/zap 2 | license: MIT 3 | import: 4 | - package: go.uber.org/atomic 5 | version: ^1 6 | testImport: 7 | - package: github.com/satori/go.uuid 8 | - package: github.com/sirupsen/logrus 9 | - package: github.com/apex/log 10 | subpackages: 11 | - handlers/json 12 | - package: github.com/go-kit/kit 13 | subpackages: 14 | - log 15 | - package: github.com/stretchr/testify 16 | subpackages: 17 | - assert 18 | - require 19 | - package: gopkg.in/inconshreveable/log15.v2 20 | - package: github.com/mattn/goveralls 21 | - package: github.com/pborman/uuid 22 | - package: github.com/pkg/errors 23 | - package: go.pedge.io/lion 24 | - package: golang.org/x/tools 25 | subpackages: 26 | - cover 27 | - package: github.com/golang/lint 28 | subpackages: 29 | - golint 30 | - package: github.com/axw/gocov 31 | subpackages: 32 | - gocov 33 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf: -------------------------------------------------------------------------------- 1 | 50,0 0 0 42,1 0 0 42,96 0 0 3,97 0 0 3,48 0 0 42,40 0 0 42,32 0 0 42,80 0 0 42,72 0 0 42,64 0 0 42,177 0 0 42,128 0 0 0,32 0 0 4294963200,32 0 0 4294963204,32 0 0 4294963256,2 0 0 3,3 0 0 3,4 0 0 42,20 0 0 42,36 0 0 42,52 0 0 42,68 0 0 42,84 0 0 42,100 0 0 42,116 0 0 42,148 0 0 42,164 0 0 42,12 0 0 0,28 0 0 0,44 0 0 0,60 0 0 0,76 0 0 0,92 0 0 0,108 0 0 0,124 0 0 0,156 0 0 0,172 0 0 0,132 0 0 0,5 0 0 10,21 8 9 42,21 0 8 42,53 0 7 42,37 0 6 42,37 4 5 42,53 3 4 42,69 2 3 42,7 0 0 0,135 0 0 0,22 0 0 0,6 0 0 0, 2 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !plan9,go1.7 6 | 7 | package ctxhttp 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | "net/http/httptest" 13 | "testing" 14 | 15 | "context" 16 | ) 17 | 18 | func TestGo17Context(t *testing.T) { 19 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 20 | io.WriteString(w, "ok") 21 | })) 22 | defer ts.Close() 23 | ctx := context.Background() 24 | resp, err := Get(ctx, http.DefaultClient, ts.URL) 25 | if resp == nil || err != nil { 26 | t.Fatalf("error received from client: %v %v", err, resp) 27 | } 28 | resp.Body.Close() 29 | } 30 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/context/withtimeout_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package context_test 6 | 7 | import ( 8 | "fmt" 9 | "time" 10 | 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | func ExampleWithTimeout() { 15 | // Pass a context with a timeout to tell a blocking function that it 16 | // should abandon its work after the timeout elapses. 17 | ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) 18 | select { 19 | case <-time.After(200 * time.Millisecond): 20 | fmt.Println("overslept") 21 | case <-ctx.Done(): 22 | fmt.Println(ctx.Err()) // prints "context deadline exceeded" 23 | } 24 | // Output: 25 | // context deadline exceeded 26 | } 27 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/html/charset/testdata/README: -------------------------------------------------------------------------------- 1 | These test cases come from 2 | http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics 3 | 4 | Distributed under both the W3C Test Suite License 5 | (http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) 6 | and the W3C 3-clause BSD License 7 | (http://www.w3.org/Consortium/Legal/2008/03-bsd-license). 8 | To contribute to a W3C Test Suite, see the policies and contribution 9 | forms (http://www.w3.org/2004/10/27-testcases). 10 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TailorDev/crick/00c8e8dd4ff91d9f65facf494d35af278723ffca/api/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TailorDev/crick/00c8e8dd4ff91d9f65facf494d35af278723ffca/api/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/html/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This example demonstrates parsing HTML data and walking the resulting tree. 6 | package html_test 7 | 8 | import ( 9 | "fmt" 10 | "log" 11 | "strings" 12 | 13 | "golang.org/x/net/html" 14 | ) 15 | 16 | func ExampleParse() { 17 | s := `

Links:

` 18 | doc, err := html.Parse(strings.NewReader(s)) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | var f func(*html.Node) 23 | f = func(n *html.Node) { 24 | if n.Type == html.ElementNode && n.Data == "a" { 25 | for _, a := range n.Attr { 26 | if a.Key == "href" { 27 | fmt.Println(a.Val) 28 | break 29 | } 30 | } 31 | } 32 | for c := n.FirstChild; c != nil; c = c.NextSibling { 33 | f(c) 34 | } 35 | } 36 | f(doc) 37 | // Output: 38 | // foo 39 | // /bar/baz 40 | } 41 | -------------------------------------------------------------------------------- /api/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat: -------------------------------------------------------------------------------- 1 | #data 2 | 12

34 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | 9 | | "1" 10 | | 11 | | "2" 12 | | 13 | |

14 | | 15 | | "3" 16 | | "4" 17 | 18 | #data 19 |

20 | #errors 21 | #document 22 | | 23 | | 24 | | 25 | | 26 | |
27 | | 28 | |