├── .env ├── .eslintrc ├── .gitignore ├── .nvmrc ├── .prettierrc ├── .travis.yml ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE.md ├── README.md ├── db ├── init_sql.sh ├── migrate.sh ├── postgrest.conf └── sql │ ├── init001.sql │ ├── migration0001.sql │ ├── migration0002.sql │ ├── migration0003.sql │ ├── migration0005.sql │ ├── migration0006.sql │ ├── migration0007.sql │ ├── migration0008.sql │ ├── migration0009.sql │ ├── pre.sql │ ├── table01_pursuances.sql │ ├── table02_users.sql │ ├── table03_tasks.sql │ ├── table04_memberships.sql │ ├── table05_pursuance_hierarchical_relationships.sql │ └── table06_task_lists.sql ├── debian_install.sh ├── docker-compose.yml ├── email.go ├── email_templates.go ├── install_linux.sh ├── json.go ├── package.json ├── public ├── assets │ ├── css │ │ └── bootstrap.min.css │ ├── img │ │ ├── HypothesisLogo.png │ │ ├── WorkingOn.gif │ │ └── pursuance_logo.svg │ └── js │ │ ├── bootstrap.min.js │ │ └── jquery.min.js ├── favicon.ico ├── index.html └── manifest.json ├── pursuance.go ├── server.go ├── server_test.go ├── src ├── App.css ├── App.js ├── App.test.js ├── actions │ └── index.js ├── api │ ├── postgrest.js │ ├── pursuances.js │ ├── tasks.js │ └── users.js ├── components │ ├── Content │ │ ├── Calendar │ │ │ ├── Calendar.css │ │ │ └── Calendar.js │ │ ├── Content.css │ │ ├── Notifications │ │ │ ├── Notification.css │ │ │ ├── Notification.js │ │ │ ├── NotificationAction.css │ │ │ ├── NotificationAction.js │ │ │ ├── NotificationIcon.js │ │ │ └── NotificationList.js │ │ ├── ParticipantList │ │ │ ├── Participant │ │ │ │ ├── Participant.css │ │ │ │ └── Participant.js │ │ │ └── ParticipantList.js │ │ ├── Pursuance │ │ │ ├── PursuanceMenu.css │ │ │ ├── PursuanceMenu.js │ │ │ ├── PursuanceMenuItem.css │ │ │ ├── PursuanceMenuItem.js │ │ │ ├── PursuancePage.css │ │ │ ├── PursuancePage.js │ │ │ └── views │ │ │ │ ├── CalendarView.js │ │ │ │ ├── DiscussView.css │ │ │ │ ├── DiscussView.js │ │ │ │ ├── ParticipantsView.js │ │ │ │ └── TaskListView.js │ │ ├── PursuanceList │ │ │ ├── PursuanceList.css │ │ │ └── PursuanceList.js │ │ ├── RightPanel │ │ │ ├── RightPanel.css │ │ │ ├── RightPanel.js │ │ │ ├── TaskDetails │ │ │ │ ├── TaskDetails.css │ │ │ │ ├── TaskDetails.js │ │ │ │ ├── TaskDetailsTopbar.css │ │ │ │ ├── TaskDetailsTopbar.js │ │ │ │ ├── TaskIcons │ │ │ │ │ ├── TaskIcons.css │ │ │ │ │ └── TaskIcons.js │ │ │ │ ├── TaskOptions │ │ │ │ │ ├── TaskOptions.css │ │ │ │ │ └── TaskOptions.js │ │ │ │ └── TaskTitle │ │ │ │ │ ├── TaskTitle.css │ │ │ │ │ └── TaskTitle.js │ │ │ └── TaskList │ │ │ │ ├── TaskList.css │ │ │ │ └── TaskList.js │ │ ├── TaskDueDate │ │ │ └── TaskDueDate.js │ │ ├── TaskHierarchy │ │ │ ├── Task │ │ │ │ ├── Task.css │ │ │ │ ├── Task.js │ │ │ │ └── TaskAssigner │ │ │ │ │ ├── AssignerButton │ │ │ │ │ ├── AssignerButton.css │ │ │ │ │ └── AssignerButton.js │ │ │ │ │ ├── TaskAssigner.css │ │ │ │ │ └── TaskAssigner.js │ │ │ ├── TaskHierarchy.css │ │ │ └── TaskHierarchy.js │ │ ├── TaskManager │ │ │ ├── TaskForm │ │ │ │ ├── AssignerInput │ │ │ │ │ ├── AssignerInput.css │ │ │ │ │ └── AssignerInput.js │ │ │ │ ├── DatePicker │ │ │ │ │ ├── DatePicker.css │ │ │ │ │ └── DatePicker.js │ │ │ │ ├── ReactDatePicker.css │ │ │ │ ├── Suggestions │ │ │ │ │ ├── AssignerSuggestions.css │ │ │ │ │ └── AssignerSuggestions.js │ │ │ │ ├── TaskForm.css │ │ │ │ └── TaskForm.js │ │ │ ├── TaskManager.css │ │ │ ├── TaskManager.js │ │ │ └── TaskManager.test.js │ │ └── TaskStatus │ │ │ ├── TaskStatus.css │ │ │ └── TaskStatus.js │ ├── CreatePursuance │ │ ├── CreatePursuance.css │ │ ├── CreatePursuance.js │ │ ├── CreatePursuanceForm │ │ │ ├── CreatePursuanceForm.css │ │ │ └── CreatePursuanceForm.js │ │ └── SettingsInfoModal │ │ │ └── SettingsInfoModal.js │ ├── Dashboard │ │ ├── Dashboard.css │ │ ├── Dashboard.js │ │ └── Dashboard.test.js │ ├── Footer │ │ ├── Footer.css │ │ ├── Footer.js │ │ └── Footer.test.js │ ├── HomePage │ │ ├── HomePage.css │ │ ├── HomePage.js │ │ └── HomePage.test.js │ ├── NavBar │ │ ├── LogIn │ │ │ ├── LogIn.css │ │ │ ├── LogIn.js │ │ │ └── LogIn.test.js │ │ ├── NavBar.css │ │ ├── NavBar.js │ │ ├── NavBar.test.js │ │ ├── NotificationsModal │ │ │ ├── NotificationsModal.css │ │ │ ├── NotificationsModal.js │ │ │ └── NotificationsTab │ │ │ │ ├── NotificationsTab.css │ │ │ │ └── NotificationsTab.js │ │ ├── SignUp │ │ │ ├── SignUp.css │ │ │ ├── SignUp.js │ │ │ └── SignUp.test.js │ │ ├── SignUpLogInModal.css │ │ └── UserSettingsPopover │ │ │ ├── ContributionPointsCounter.css │ │ │ ├── ContributionPointsCounter.js │ │ │ ├── UserSettingsPopover.css │ │ │ └── index.js │ ├── NotFound │ │ ├── NotFound.css │ │ └── NotFound.js │ ├── PublicPursuances │ │ ├── PublicPursuanceList.js │ │ └── PublicPursuances.js │ └── common │ │ └── widgets │ │ └── LoadingGauge │ │ ├── LoadingGauge.css │ │ └── LoadingGauge.js ├── constants │ └── index.js ├── index.css ├── index.js ├── reducers │ ├── autoCompleteReducer.js │ ├── createPursuanceReducer.js │ ├── currentPursuanceIdReducer.js │ ├── index.js │ ├── notificationsReducer.js │ ├── publicPursuancesReducer.js │ ├── pursuancesReducer.js │ ├── rightPanelReducer.js │ ├── settingsInfoReducer.js │ ├── showSuccessToastReducer.js │ ├── taskFormReducer.js │ ├── tasksReducer.js │ ├── userReducer.js │ └── usersReducer.js ├── static │ ├── background_img │ │ └── home_background.jpg │ └── placeholder │ │ └── 1280x720.png ├── store.js └── utils │ ├── detect_browser.js │ ├── detect_mobile.js │ ├── generateId.js │ ├── object_values_polyfill.js │ ├── origin_polyfill.js │ ├── suggestions.js │ └── tasks.js ├── static.json ├── types.go └── vendor ├── github.com ├── Sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── alt_exit_test.go │ │ ├── appveyor.yml │ │ ├── doc.go │ │ ├── entry.go │ │ ├── entry_test.go │ │ ├── example_basic_test.go │ │ ├── example_hook_test.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── formatter_bench_test.go │ │ ├── hook_test.go │ │ ├── hooks.go │ │ ├── hooks │ │ ├── syslog │ │ │ ├── README.md │ │ │ ├── syslog.go │ │ │ └── syslog_test.go │ │ └── test │ │ │ ├── test.go │ │ │ └── test_test.go │ │ ├── json_formatter.go │ │ ├── json_formatter_test.go │ │ ├── logger.go │ │ ├── logger_bench_test.go │ │ ├── logrus.go │ │ ├── logrus_test.go │ │ ├── terminal_bsd.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_linux.go │ │ ├── text_formatter.go │ │ ├── text_formatter_test.go │ │ └── writer.go ├── cathalgarvey │ ├── base58 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── base58.go │ │ ├── base58_test.go │ │ ├── bench_test.go │ │ └── cmd │ │ │ ├── base58-decode │ │ │ └── decode.go │ │ │ └── base58-encode │ │ │ └── encode.go │ └── go-minilock │ │ ├── HACKING.txt │ │ ├── README.md │ │ ├── binary_samples │ │ ├── mye.go │ │ └── mye.go.minilock │ │ ├── binary_samples_test.go │ │ ├── const.go │ │ ├── decrypt.go │ │ ├── decrypt_test.go │ │ ├── encrypt.go │ │ ├── encrypt_test.go │ │ ├── errors.go │ │ ├── godochdr.go │ │ ├── header.go │ │ ├── keygen.go │ │ ├── minilock-cli │ │ └── main.go │ │ ├── preset_keys_test.go │ │ ├── taber │ │ ├── ReadMe.md │ │ ├── box_block.go │ │ ├── box_chunk.go │ │ ├── box_decrypt.go │ │ ├── box_encrypt.go │ │ ├── box_encrypt_test.go │ │ ├── box_errors.go │ │ ├── box_large_testcase_test.go │ │ ├── const.go │ │ ├── godoctaber.go │ │ ├── harden.go │ │ ├── keys_encrypt.go │ │ ├── keys_encrypt_test.go │ │ ├── keys_errors.go │ │ ├── keys_gen.go │ │ ├── keys_gen_test.go │ │ ├── utils.go │ │ └── utils_test.go │ │ └── utils.go ├── cryptag │ ├── gosecure │ │ ├── .gitignore │ │ ├── canary │ │ │ └── canary.go │ │ ├── content │ │ │ └── content.go │ │ ├── csp │ │ │ └── csp.go │ │ ├── frame │ │ │ └── frame.go │ │ ├── gosecure.go │ │ ├── hsts │ │ │ └── hsts.go │ │ ├── referrer │ │ │ └── referrer.go │ │ ├── set │ │ │ └── set.go │ │ └── xss │ │ │ └── xss.go │ └── minishare │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── miniware │ │ └── miniware.go ├── davecgh │ └── go-spew │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cov_report.sh │ │ ├── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── common_test.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── dump_test.go │ │ ├── dumpcgo_test.go │ │ ├── dumpnocgo_test.go │ │ ├── example_test.go │ │ ├── format.go │ │ ├── format_test.go │ │ ├── internal_test.go │ │ ├── internalunsafe_test.go │ │ ├── spew.go │ │ ├── spew_test.go │ │ └── testdata │ │ │ └── dumpcgo.go │ │ └── test_coverage.txt ├── dchest │ └── blake2s │ │ ├── README │ │ ├── blake2s.go │ │ ├── blake2s_test.go │ │ └── block.go ├── gorilla │ ├── context │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── context.go │ │ ├── context_test.go │ │ └── doc.go │ ├── mux │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bench_test.go │ │ ├── context_gorilla.go │ │ ├── context_gorilla_test.go │ │ ├── context_native.go │ │ ├── context_native_test.go │ │ ├── doc.go │ │ ├── mux.go │ │ ├── mux_test.go │ │ ├── old_test.go │ │ ├── regexp.go │ │ └── route.go │ └── websocket │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── client.go │ │ ├── client_clone.go │ │ ├── client_clone_legacy.go │ │ ├── client_server_test.go │ │ ├── client_test.go │ │ ├── compression.go │ │ ├── compression_test.go │ │ ├── conn.go │ │ ├── conn_broadcast_test.go │ │ ├── conn_read.go │ │ ├── conn_read_legacy.go │ │ ├── conn_test.go │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── examples │ │ ├── autobahn │ │ │ ├── README.md │ │ │ ├── fuzzingclient.json │ │ │ └── server.go │ │ ├── chat │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ ├── home.html │ │ │ ├── hub.go │ │ │ └── main.go │ │ ├── command │ │ │ ├── README.md │ │ │ ├── home.html │ │ │ └── main.go │ │ ├── echo │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ └── server.go │ │ └── filewatch │ │ │ ├── README.md │ │ │ └── main.go │ │ ├── json.go │ │ ├── json_test.go │ │ ├── mask.go │ │ ├── mask_safe.go │ │ ├── mask_test.go │ │ ├── prepared.go │ │ ├── prepared_test.go │ │ ├── server.go │ │ ├── server_test.go │ │ ├── util.go │ │ └── util_test.go ├── justinas │ └── alice │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── chain.go │ │ └── chain_test.go ├── nu7hatch │ └── gouuid │ │ ├── .gitignore │ │ ├── COPYING │ │ ├── README.md │ │ ├── example_test.go │ │ ├── uuid.go │ │ └── uuid_test.go ├── pmezard │ └── go-difflib │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── difflib │ │ ├── difflib.go │ │ └── difflib_test.go └── stretchr │ └── testify │ ├── .gitignore │ ├── .travis.gofmt.sh │ ├── .travis.gogenerate.sh │ ├── .travis.govet.sh │ ├── .travis.yml │ ├── Gopkg.lock │ ├── Gopkg.toml │ ├── LICENSE │ ├── README.md │ ├── _codegen │ └── main.go │ ├── assert │ ├── assertion_format.go │ ├── assertion_format.go.tmpl │ ├── assertion_forward.go │ ├── assertion_forward.go.tmpl │ ├── assertions.go │ ├── assertions_test.go │ ├── doc.go │ ├── errors.go │ ├── forward_assertions.go │ ├── forward_assertions_test.go │ ├── http_assertions.go │ └── http_assertions_test.go │ ├── doc.go │ ├── http │ ├── doc.go │ ├── test_response_writer.go │ └── test_round_tripper.go │ ├── mock │ ├── doc.go │ ├── mock.go │ └── mock_test.go │ ├── package_test.go │ ├── require │ ├── doc.go │ ├── forward_requirements.go │ ├── forward_requirements_test.go │ ├── require.go │ ├── require.go.tmpl │ ├── require_forward.go │ ├── require_forward.go.tmpl │ ├── requirements.go │ └── requirements_test.go │ └── suite │ ├── doc.go │ ├── interfaces.go │ ├── suite.go │ └── suite_test.go └── golang.org └── x ├── crypto ├── .gitattributes ├── .gitignore ├── AUTHORS ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── LICENSE ├── PATENTS ├── README.md ├── acme │ ├── acme.go │ ├── acme_test.go │ ├── autocert │ │ ├── autocert.go │ │ ├── autocert_test.go │ │ ├── cache.go │ │ ├── cache_test.go │ │ ├── example_test.go │ │ ├── listener.go │ │ ├── renewal.go │ │ └── renewal_test.go │ ├── jws.go │ ├── jws_test.go │ ├── types.go │ └── types_test.go ├── argon2 │ ├── argon2.go │ ├── argon2_test.go │ ├── blake2b.go │ ├── blamka_amd64.go │ ├── blamka_amd64.s │ ├── blamka_generic.go │ └── blamka_ref.go ├── bcrypt │ ├── base64.go │ ├── bcrypt.go │ └── bcrypt_test.go ├── blake2b │ ├── blake2b.go │ ├── blake2bAVX2_amd64.go │ ├── blake2bAVX2_amd64.s │ ├── blake2b_amd64.go │ ├── blake2b_amd64.s │ ├── blake2b_generic.go │ ├── blake2b_ref.go │ ├── blake2b_test.go │ ├── blake2x.go │ └── register.go ├── blake2s │ ├── blake2s.go │ ├── blake2s_386.go │ ├── blake2s_386.s │ ├── blake2s_amd64.go │ ├── blake2s_amd64.s │ ├── blake2s_generic.go │ ├── blake2s_ref.go │ ├── blake2s_test.go │ ├── blake2x.go │ └── register.go ├── blowfish │ ├── block.go │ ├── blowfish_test.go │ ├── cipher.go │ └── const.go ├── bn256 │ ├── bn256.go │ ├── bn256_test.go │ ├── constants.go │ ├── curve.go │ ├── example_test.go │ ├── gfp12.go │ ├── gfp2.go │ ├── gfp6.go │ ├── optate.go │ └── twist.go ├── cast5 │ ├── cast5.go │ └── cast5_test.go ├── chacha20poly1305 │ ├── chacha20poly1305.go │ ├── chacha20poly1305_amd64.go │ ├── chacha20poly1305_amd64.s │ ├── chacha20poly1305_generic.go │ ├── chacha20poly1305_noasm.go │ ├── chacha20poly1305_test.go │ └── chacha20poly1305_vectors_test.go ├── codereview.cfg ├── cryptobyte │ ├── asn1.go │ ├── asn1 │ │ └── asn1.go │ ├── asn1_test.go │ ├── builder.go │ ├── cryptobyte_test.go │ ├── example_test.go │ └── string.go ├── curve25519 │ ├── const_amd64.h │ ├── const_amd64.s │ ├── cswap_amd64.s │ ├── curve25519.go │ ├── curve25519_test.go │ ├── doc.go │ ├── freeze_amd64.s │ ├── ladderstep_amd64.s │ ├── mont25519_amd64.go │ ├── mul_amd64.s │ └── square_amd64.s ├── ed25519 │ ├── ed25519.go │ ├── ed25519_test.go │ ├── internal │ │ └── edwards25519 │ │ │ ├── const.go │ │ │ └── edwards25519.go │ └── testdata │ │ └── sign.input.gz ├── hkdf │ ├── example_test.go │ ├── hkdf.go │ └── hkdf_test.go ├── internal │ └── chacha20 │ │ ├── chacha_generic.go │ │ └── chacha_test.go ├── md4 │ ├── example_test.go │ ├── md4.go │ ├── md4_test.go │ └── md4block.go ├── nacl │ ├── auth │ │ ├── auth.go │ │ ├── auth_test.go │ │ └── example_test.go │ ├── box │ │ ├── box.go │ │ ├── box_test.go │ │ └── example_test.go │ └── secretbox │ │ ├── example_test.go │ │ ├── secretbox.go │ │ └── secretbox_test.go ├── ocsp │ ├── ocsp.go │ └── ocsp_test.go ├── openpgp │ ├── armor │ │ ├── armor.go │ │ ├── armor_test.go │ │ └── encode.go │ ├── canonical_text.go │ ├── canonical_text_test.go │ ├── clearsign │ │ ├── clearsign.go │ │ └── clearsign_test.go │ ├── elgamal │ │ ├── elgamal.go │ │ └── elgamal_test.go │ ├── errors │ │ └── errors.go │ ├── keys.go │ ├── keys_test.go │ ├── packet │ │ ├── compressed.go │ │ ├── compressed_test.go │ │ ├── config.go │ │ ├── encrypted_key.go │ │ ├── encrypted_key_test.go │ │ ├── literal.go │ │ ├── ocfb.go │ │ ├── ocfb_test.go │ │ ├── one_pass_signature.go │ │ ├── opaque.go │ │ ├── opaque_test.go │ │ ├── packet.go │ │ ├── packet_test.go │ │ ├── private_key.go │ │ ├── private_key_test.go │ │ ├── public_key.go │ │ ├── public_key_test.go │ │ ├── public_key_v3.go │ │ ├── public_key_v3_test.go │ │ ├── reader.go │ │ ├── signature.go │ │ ├── signature_test.go │ │ ├── signature_v3.go │ │ ├── signature_v3_test.go │ │ ├── symmetric_key_encrypted.go │ │ ├── symmetric_key_encrypted_test.go │ │ ├── symmetrically_encrypted.go │ │ ├── symmetrically_encrypted_test.go │ │ ├── userattribute.go │ │ ├── userattribute_test.go │ │ ├── userid.go │ │ └── userid_test.go │ ├── read.go │ ├── read_test.go │ ├── s2k │ │ ├── s2k.go │ │ └── s2k_test.go │ ├── write.go │ └── write_test.go ├── otr │ ├── libotr_test_helper.c │ ├── otr.go │ ├── otr_test.go │ └── smp.go ├── pbkdf2 │ ├── pbkdf2.go │ └── pbkdf2_test.go ├── pkcs12 │ ├── bmp-string.go │ ├── bmp-string_test.go │ ├── crypto.go │ ├── crypto_test.go │ ├── errors.go │ ├── internal │ │ └── rc2 │ │ │ ├── bench_test.go │ │ │ ├── rc2.go │ │ │ └── rc2_test.go │ ├── mac.go │ ├── mac_test.go │ ├── pbkdf.go │ ├── pbkdf_test.go │ ├── pkcs12.go │ ├── pkcs12_test.go │ └── safebags.go ├── poly1305 │ ├── poly1305.go │ ├── poly1305_test.go │ ├── sum_amd64.go │ ├── sum_amd64.s │ ├── sum_arm.go │ ├── sum_arm.s │ └── sum_ref.go ├── ripemd160 │ ├── ripemd160.go │ ├── ripemd160_test.go │ └── ripemd160block.go ├── salsa20 │ ├── salsa │ │ ├── hsalsa20.go │ │ ├── salsa2020_amd64.s │ │ ├── salsa208.go │ │ ├── salsa20_amd64.go │ │ ├── salsa20_ref.go │ │ └── salsa_test.go │ ├── salsa20.go │ └── salsa20_test.go ├── scrypt │ ├── example_test.go │ ├── scrypt.go │ └── scrypt_test.go ├── sha3 │ ├── doc.go │ ├── hashes.go │ ├── keccakf.go │ ├── keccakf_amd64.go │ ├── keccakf_amd64.s │ ├── register.go │ ├── sha3.go │ ├── sha3_test.go │ ├── shake.go │ ├── testdata │ │ └── keccakKats.json.deflate │ ├── xor.go │ ├── xor_generic.go │ └── xor_unaligned.go ├── ssh │ ├── agent │ │ ├── client.go │ │ ├── client_test.go │ │ ├── example_test.go │ │ ├── forward.go │ │ ├── keyring.go │ │ ├── keyring_test.go │ │ ├── server.go │ │ ├── server_test.go │ │ └── testdata_test.go │ ├── benchmark_test.go │ ├── buffer.go │ ├── buffer_test.go │ ├── certs.go │ ├── certs_test.go │ ├── channel.go │ ├── cipher.go │ ├── cipher_test.go │ ├── client.go │ ├── client_auth.go │ ├── client_auth_test.go │ ├── client_test.go │ ├── common.go │ ├── connection.go │ ├── doc.go │ ├── example_test.go │ ├── handshake.go │ ├── handshake_test.go │ ├── kex.go │ ├── kex_test.go │ ├── keys.go │ ├── keys_test.go │ ├── knownhosts │ │ ├── knownhosts.go │ │ └── knownhosts_test.go │ ├── mac.go │ ├── mempipe_test.go │ ├── messages.go │ ├── messages_test.go │ ├── mux.go │ ├── mux_test.go │ ├── server.go │ ├── session.go │ ├── session_test.go │ ├── streamlocal.go │ ├── tcpip.go │ ├── tcpip_test.go │ ├── terminal │ │ ├── terminal.go │ │ ├── terminal_test.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ ├── test │ │ ├── agent_unix_test.go │ │ ├── banner_test.go │ │ ├── cert_test.go │ │ ├── dial_unix_test.go │ │ ├── doc.go │ │ ├── forward_unix_test.go │ │ ├── session_test.go │ │ ├── test_unix_test.go │ │ └── testdata_test.go │ ├── testdata │ │ ├── doc.go │ │ └── keys.go │ ├── testdata_test.go │ ├── transport.go │ └── transport_test.go ├── tea │ ├── cipher.go │ └── tea_test.go ├── twofish │ ├── twofish.go │ └── twofish_test.go ├── xtea │ ├── block.go │ ├── cipher.go │ └── xtea_test.go └── xts │ ├── xts.go │ └── xts_test.go └── sys ├── .gitattributes ├── .gitignore ├── AUTHORS ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── LICENSE ├── PATENTS ├── README.md ├── codereview.cfg ├── plan9 ├── asm.s ├── asm_plan9_386.s ├── asm_plan9_amd64.s ├── const_plan9.go ├── dir_plan9.go ├── env_plan9.go ├── errors_plan9.go ├── mkall.sh ├── mkerrors.sh ├── mksyscall.pl ├── mksysnum_plan9.sh ├── pwd_go15_plan9.go ├── pwd_plan9.go ├── race.go ├── race0.go ├── str.go ├── syscall.go ├── syscall_plan9.go ├── syscall_test.go ├── zsyscall_plan9_386.go ├── zsyscall_plan9_amd64.go └── zsysnum_plan9.go ├── unix ├── .gitignore ├── README.md ├── affinity_linux.go ├── asm_darwin_386.s ├── asm_darwin_amd64.s ├── asm_darwin_arm.s ├── asm_darwin_arm64.s ├── asm_dragonfly_amd64.s ├── asm_freebsd_386.s ├── asm_freebsd_amd64.s ├── asm_freebsd_arm.s ├── asm_linux_386.s ├── asm_linux_amd64.s ├── asm_linux_arm.s ├── asm_linux_arm64.s ├── asm_linux_mips64x.s ├── asm_linux_mipsx.s ├── asm_linux_ppc64x.s ├── asm_linux_s390x.s ├── asm_netbsd_386.s ├── asm_netbsd_amd64.s ├── asm_netbsd_arm.s ├── asm_openbsd_386.s ├── asm_openbsd_amd64.s ├── asm_openbsd_arm.s ├── asm_solaris_amd64.s ├── bluetooth_linux.go ├── cap_freebsd.go ├── constants.go ├── creds_test.go ├── dev_darwin.go ├── dev_darwin_test.go ├── dev_dragonfly.go ├── dev_dragonfly_test.go ├── dev_freebsd.go ├── dev_linux.go ├── dev_linux_test.go ├── dev_netbsd.go ├── dev_netbsd_test.go ├── dev_openbsd.go ├── dev_openbsd_test.go ├── dev_solaris_test.go ├── dirent.go ├── endian_big.go ├── endian_little.go ├── env_unix.go ├── errors_freebsd_386.go ├── errors_freebsd_amd64.go ├── errors_freebsd_arm.go ├── export_test.go ├── flock.go ├── flock_linux_32bit.go ├── gccgo.go ├── gccgo_c.c ├── gccgo_linux_amd64.go ├── linux │ ├── Dockerfile │ ├── mkall.go │ ├── mksysnum.pl │ └── types.go ├── mkall.sh ├── mkerrors.sh ├── mkpost.go ├── mksyscall.pl ├── mksyscall_solaris.pl ├── mksysctl_openbsd.pl ├── mksysnum_darwin.pl ├── mksysnum_dragonfly.pl ├── mksysnum_freebsd.pl ├── mksysnum_netbsd.pl ├── mksysnum_openbsd.pl ├── mmap_unix_test.go ├── openbsd_pledge.go ├── openbsd_test.go ├── pagesize_unix.go ├── race.go ├── race0.go ├── sockcmsg_linux.go ├── sockcmsg_unix.go ├── str.go ├── syscall.go ├── syscall_bsd.go ├── syscall_bsd_test.go ├── syscall_darwin.go ├── syscall_darwin_386.go ├── syscall_darwin_amd64.go ├── syscall_darwin_arm.go ├── syscall_darwin_arm64.go ├── syscall_dragonfly.go ├── syscall_dragonfly_amd64.go ├── syscall_freebsd.go ├── syscall_freebsd_386.go ├── syscall_freebsd_amd64.go ├── syscall_freebsd_arm.go ├── syscall_freebsd_test.go ├── syscall_linux.go ├── syscall_linux_386.go ├── syscall_linux_amd64.go ├── syscall_linux_amd64_gc.go ├── syscall_linux_arm.go ├── syscall_linux_arm64.go ├── syscall_linux_mips64x.go ├── syscall_linux_mipsx.go ├── syscall_linux_ppc64x.go ├── syscall_linux_s390x.go ├── syscall_linux_sparc64.go ├── syscall_linux_test.go ├── syscall_netbsd.go ├── syscall_netbsd_386.go ├── syscall_netbsd_amd64.go ├── syscall_netbsd_arm.go ├── syscall_openbsd.go ├── syscall_openbsd_386.go ├── syscall_openbsd_amd64.go ├── syscall_openbsd_arm.go ├── syscall_solaris.go ├── syscall_solaris_amd64.go ├── syscall_solaris_test.go ├── syscall_test.go ├── syscall_unix.go ├── syscall_unix_gc.go ├── syscall_unix_test.go ├── timestruct.go ├── timestruct_test.go ├── types_darwin.go ├── types_dragonfly.go ├── types_freebsd.go ├── types_netbsd.go ├── types_openbsd.go ├── types_solaris.go ├── zerrors_darwin_386.go ├── zerrors_darwin_amd64.go ├── zerrors_darwin_arm.go ├── zerrors_darwin_arm64.go ├── zerrors_dragonfly_amd64.go ├── zerrors_freebsd_386.go ├── zerrors_freebsd_amd64.go ├── zerrors_freebsd_arm.go ├── zerrors_linux_386.go ├── zerrors_linux_amd64.go ├── zerrors_linux_arm.go ├── zerrors_linux_arm64.go ├── zerrors_linux_mips.go ├── zerrors_linux_mips64.go ├── zerrors_linux_mips64le.go ├── zerrors_linux_mipsle.go ├── zerrors_linux_ppc64.go ├── zerrors_linux_ppc64le.go ├── zerrors_linux_s390x.go ├── zerrors_linux_sparc64.go ├── zerrors_netbsd_386.go ├── zerrors_netbsd_amd64.go ├── zerrors_netbsd_arm.go ├── zerrors_openbsd_386.go ├── zerrors_openbsd_amd64.go ├── zerrors_openbsd_arm.go ├── zerrors_solaris_amd64.go ├── zptrace386_linux.go ├── zptracearm_linux.go ├── zptracemips_linux.go ├── zptracemipsle_linux.go ├── zsyscall_darwin_386.go ├── zsyscall_darwin_amd64.go ├── zsyscall_darwin_arm.go ├── zsyscall_darwin_arm64.go ├── zsyscall_dragonfly_amd64.go ├── zsyscall_freebsd_386.go ├── zsyscall_freebsd_amd64.go ├── zsyscall_freebsd_arm.go ├── zsyscall_linux_386.go ├── zsyscall_linux_amd64.go ├── zsyscall_linux_arm.go ├── zsyscall_linux_arm64.go ├── zsyscall_linux_mips.go ├── zsyscall_linux_mips64.go ├── zsyscall_linux_mips64le.go ├── zsyscall_linux_mipsle.go ├── zsyscall_linux_ppc64.go ├── zsyscall_linux_ppc64le.go ├── zsyscall_linux_s390x.go ├── zsyscall_linux_sparc64.go ├── zsyscall_netbsd_386.go ├── zsyscall_netbsd_amd64.go ├── zsyscall_netbsd_arm.go ├── zsyscall_openbsd_386.go ├── zsyscall_openbsd_amd64.go ├── zsyscall_openbsd_arm.go ├── zsyscall_solaris_amd64.go ├── zsysctl_openbsd_386.go ├── zsysctl_openbsd_amd64.go ├── zsysctl_openbsd_arm.go ├── zsysnum_darwin_386.go ├── zsysnum_darwin_amd64.go ├── zsysnum_darwin_arm.go ├── zsysnum_darwin_arm64.go ├── zsysnum_dragonfly_amd64.go ├── zsysnum_freebsd_386.go ├── zsysnum_freebsd_amd64.go ├── zsysnum_freebsd_arm.go ├── zsysnum_linux_386.go ├── zsysnum_linux_amd64.go ├── zsysnum_linux_arm.go ├── zsysnum_linux_arm64.go ├── zsysnum_linux_mips.go ├── zsysnum_linux_mips64.go ├── zsysnum_linux_mips64le.go ├── zsysnum_linux_mipsle.go ├── zsysnum_linux_ppc64.go ├── zsysnum_linux_ppc64le.go ├── zsysnum_linux_s390x.go ├── zsysnum_linux_sparc64.go ├── zsysnum_netbsd_386.go ├── zsysnum_netbsd_amd64.go ├── zsysnum_netbsd_arm.go ├── zsysnum_openbsd_386.go ├── zsysnum_openbsd_amd64.go ├── zsysnum_openbsd_arm.go ├── ztypes_darwin_386.go ├── ztypes_darwin_amd64.go ├── ztypes_darwin_arm.go ├── ztypes_darwin_arm64.go ├── ztypes_dragonfly_amd64.go ├── ztypes_freebsd_386.go ├── ztypes_freebsd_amd64.go ├── ztypes_freebsd_arm.go ├── ztypes_linux_386.go ├── ztypes_linux_amd64.go ├── ztypes_linux_arm.go ├── ztypes_linux_arm64.go ├── ztypes_linux_mips.go ├── ztypes_linux_mips64.go ├── ztypes_linux_mips64le.go ├── ztypes_linux_mipsle.go ├── ztypes_linux_ppc64.go ├── ztypes_linux_ppc64le.go ├── ztypes_linux_s390x.go ├── ztypes_linux_sparc64.go ├── ztypes_netbsd_386.go ├── ztypes_netbsd_amd64.go ├── ztypes_netbsd_arm.go ├── ztypes_openbsd_386.go ├── ztypes_openbsd_amd64.go ├── ztypes_openbsd_arm.go └── ztypes_solaris_amd64.go └── windows ├── asm_windows_386.s ├── asm_windows_amd64.s ├── dll_windows.go ├── env_windows.go ├── eventlog.go ├── exec_windows.go ├── memory_windows.go ├── mksyscall.go ├── race.go ├── race0.go ├── registry ├── export_test.go ├── key.go ├── mksyscall.go ├── registry_test.go ├── syscall.go ├── value.go └── zsyscall_windows.go ├── security_windows.go ├── service.go ├── str.go ├── svc ├── debug │ ├── log.go │ └── service.go ├── event.go ├── eventlog │ ├── install.go │ ├── log.go │ └── log_test.go ├── example │ ├── beep.go │ ├── install.go │ ├── main.go │ ├── manage.go │ └── service.go ├── go12.c ├── go12.go ├── go13.go ├── mgr │ ├── config.go │ ├── mgr.go │ ├── mgr_test.go │ └── service.go ├── security.go ├── service.go ├── svc_test.go ├── sys_386.s └── sys_amd64.s ├── syscall.go ├── syscall_test.go ├── syscall_windows.go ├── syscall_windows_test.go ├── types_windows.go ├── types_windows_386.go ├── types_windows_amd64.go └── zsyscall_windows.go /.env: -------------------------------------------------------------------------------- 1 | PORT=8080 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["react-app", "prettier"], 3 | "rules": { 4 | "no-unused-vars": "error" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | /_docker-volumes 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | # Custom 25 | *~ 26 | *.swp 27 | /pursuance 28 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 7 -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | } 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | 3 | language: node_js 4 | node_js: 5 | - 7 6 | cache: 7 | directories: 8 | - node_modules 9 | script: 10 | - npm run ci 11 | - npm run build 12 | 13 | 14 | language: go 15 | go: 16 | - 1.8 17 | - 1.9 18 | - tip 19 | script: 20 | - go test -race -v ./... 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2017 Pursuance Project 2 | 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Affero General Public License as 5 | published by the Free Software Foundation, either version 3 of the 6 | License, or (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Affero General Public License for more details. 12 | 13 | You should have received a copy of the GNU Affero General Public License 14 | along with this program. If not, see . 15 | -------------------------------------------------------------------------------- /db/init_sql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Create 'leapchat' database, associated role 6 | psql < sql/pre.sql 7 | 8 | export pg_user=postgres 9 | if [ "`uname -s`" != "Linux" ]; then 10 | # For Mac OS X 11 | pg_user=superuser 12 | fi 13 | 14 | # More initialization 15 | for file in sql/init*.sql; do 16 | psql -U $pg_user -d leapchat -f "$file" 17 | done 18 | 19 | # Create tables 20 | for file in sql/table*.sql; do 21 | psql -U $pg_user -d leapchat -f "$file" 22 | done 23 | 24 | /bin/bash migrate.sh sql/migration*.sql 25 | -------------------------------------------------------------------------------- /db/migrate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Steve Phillips / elimisteve 3 | # 2017.05.18 4 | 5 | set -euo pipefail 6 | 7 | # Run migrations 8 | for file in $*; do 9 | psql -U ${pg_user:-postgres} -d leapchat -f "$file" 10 | done 11 | -------------------------------------------------------------------------------- /db/postgrest.conf: -------------------------------------------------------------------------------- 1 | db-uri = "postgres://superuser:superuser@localhost:5432/leapchat" 2 | db-schema = "public" 3 | db-anon-role = "superuser" 4 | db-pool = 10 5 | 6 | server-host = "127.0.0.1" 7 | server-port = 3000 8 | server-proxy-uri = "https://app.pursuanceproject.org/postgrest/" 9 | -------------------------------------------------------------------------------- /db/sql/init001.sql: -------------------------------------------------------------------------------- 1 | create extension if not exists "uuid-ossp"; 2 | -------------------------------------------------------------------------------- /db/sql/migration0001.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS subtasks_recursive_flat(text); 2 | 3 | CREATE FUNCTION subtasks_recursive_flat(parent_gid text) RETURNS TABLE(gid text, pursuance_id integer, id integer, title text, title_enc text, deliverables text, deliverables_enc text, assigned_to text, assigned_to_pursuance_id integer, due_date timestamp WITH time zone, created timestamp WITH time zone, parent_task_gid text) AS $$ 4 | WITH RECURSIVE parent_task AS ( 5 | SELECT * 6 | FROM tasks WHERE parent_task_gid IS NOT DISTINCT FROM parent_gid 7 | UNION ALL 8 | SELECT tasks.* 9 | FROM tasks, parent_task WHERE tasks.parent_task_gid IS NOT DISTINCT FROM parent_task.gid 10 | ) 11 | SELECT * 12 | FROM parent_task; 13 | $$ LANGUAGE SQL STABLE; 14 | ALTER FUNCTION subtasks_recursive_flat(parent_gid text) OWNER TO superuser; 15 | -------------------------------------------------------------------------------- /db/sql/migration0002.sql: -------------------------------------------------------------------------------- 1 | CREATE FUNCTION subtasks(parent_gid text, subtask_pursuance_id integer) RETURNS SETOF tasks AS $$ 2 | SELECT * FROM tasks WHERE parent_task_gid IS NOT DISTINCT FROM parent_gid 3 | AND pursuance_id IS NOT DISTINCT FROM subtask_pursuance_id 4 | ORDER BY pursuance_id, id; 5 | $$ LANGUAGE SQL STABLE; 6 | ALTER FUNCTION subtasks(parent_gid text, subtask_pursuance_id integer) OWNER TO superuser; 7 | -------------------------------------------------------------------------------- /db/sql/migration0003.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION IF EXISTS subtasks_recursive_flat(text, integer); 2 | 3 | CREATE FUNCTION subtasks_recursive_flat(parent_gid text, subtask_pursuance_id integer) RETURNS TABLE(gid text, pursuance_id integer, id integer, title text, title_enc text, deliverables text, deliverables_enc text, assigned_to text, assigned_to_pursuance_id integer, due_date timestamp WITH time zone, created timestamp WITH time zone, parent_task_gid text) AS $$ 4 | WITH RECURSIVE parent_task AS ( 5 | SELECT * 6 | FROM tasks WHERE parent_task_gid IS NOT DISTINCT FROM parent_gid 7 | AND pursuance_id IS NOT DISTINCT FROM subtask_pursuance_id 8 | UNION ALL 9 | SELECT tasks.* 10 | FROM tasks, parent_task WHERE tasks.parent_task_gid IS NOT DISTINCT FROM parent_task.gid 11 | AND tasks.pursuance_id IS NOT DISTINCT FROM parent_task.pursuance_id 12 | ) 13 | SELECT * 14 | FROM parent_task; 15 | $$ LANGUAGE SQL STABLE; 16 | ALTER FUNCTION subtasks_recursive_flat(parent_gid text, subtask_pursuance_id integer) OWNER TO superuser; 17 | -------------------------------------------------------------------------------- /db/sql/migration0005.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX tasks_parent_gid_idx ON tasks (parent_task_gid); 2 | ALTER INDEX tasks_parent_gid_idx OWNER TO superuser; 3 | -------------------------------------------------------------------------------- /db/sql/migration0006.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pursuances RENAME COLUMN description TO mission; 2 | ALTER TABLE pursuances RENAME COLUMN description_enc TO mission_enc; 3 | -------------------------------------------------------------------------------- /db/sql/migration0007.sql: -------------------------------------------------------------------------------- 1 | CREATE TYPE tasks_status AS ENUM ( 2 | 'New', 3 | 'Started', 4 | 'WorkingOn', 5 | 'HelpWanted', 6 | 'ReadyForReview', 7 | 'Reviewing', 8 | 'Done' 9 | ); 10 | 11 | ALTER TABLE tasks ADD COLUMN status tasks_status NOT NULL DEFAULT 'New'; 12 | -------------------------------------------------------------------------------- /db/sql/migration0008.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE users ADD COLUMN email_id uuid; 2 | -------------------------------------------------------------------------------- /db/sql/migration0009.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tasks ADD COLUMN is_archived bool NOT NULL DEFAULT false; 2 | -------------------------------------------------------------------------------- /db/sql/pre.sql: -------------------------------------------------------------------------------- 1 | CREATE USER superuser WITH PASSWORD 'superuser'; 2 | CREATE DATABASE leapchat OWNER superuser ENCODING 'UTF8'; 3 | GRANT ALL ON DATABASE leapchat TO superuser; 4 | ALTER USER superuser CREATEDB; 5 | -------------------------------------------------------------------------------- /db/sql/table01_pursuances.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE pursuances ( 2 | id serial NOT NULL UNIQUE PRIMARY KEY, 3 | minilock_id text UNIQUE CHECK (40 <= LENGTH(minilock_id) AND LENGTH(minilock_id) <= 55), 4 | name text NOT NULL CHECK (LENGTH(name) <= 100) DEFAULT '', 5 | name_enc text NOT NULL CHECK (LENGTH(name_enc) <= 2100) DEFAULT '', 6 | /* Renamed description{,_enc} to mission{,_enc}; see migration006.sql */ 7 | description text NOT NULL CHECK (LENGTH(description) <= 10000) DEFAULT '', 8 | description_enc text NOT NULL CHECK (LENGTH(description_enc) <= 12000) DEFAULT '', 9 | is_encrypted bool NOT NULL, 10 | created timestamp WITH time zone NOT NULL DEFAULT now() 11 | ); 12 | ALTER TABLE pursuances OWNER TO superuser; 13 | -------------------------------------------------------------------------------- /db/sql/table02_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE users ( 2 | username text PRIMARY KEY CONSTRAINT proper_username CHECK (username ~ '^[a-z][a-z0-9._-]{0,45}$'), 3 | minilock_id text NOT NULL DEFAULT '', 4 | default_profile json NOT NULL DEFAULT '{}', 5 | default_profile_enc text NOT NULL DEFAULT '', 6 | created timestamp WITH time zone NOT NULL DEFAULT now() 7 | /* email_id uuid */ 8 | ); 9 | ALTER TABLE users OWNER TO superuser; 10 | -------------------------------------------------------------------------------- /db/sql/table04_memberships.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE memberships ( 2 | user_username text NOT NULL REFERENCES users(username) ON DELETE CASCADE, 3 | pursuance_id integer NOT NULL REFERENCES pursuances ON DELETE CASCADE, 4 | invited_by text REFERENCES users ON DELETE CASCADE, 5 | created timestamp WITH time zone NOT NULL DEFAULT now(), 6 | PRIMARY KEY (user_username, pursuance_id) 7 | ); 8 | ALTER TABLE memberships OWNER TO superuser; 9 | -------------------------------------------------------------------------------- /db/sql/table05_pursuance_hierarchical_relationships.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE pursuance_hierarchical_relationships ( 2 | parent_id integer NOT NULL REFERENCES pursuances ON DELETE CASCADE, 3 | child_id integer NOT NULL REFERENCES pursuances ON DELETE CASCADE, 4 | PRIMARY KEY (parent_id, child_id) 5 | ); 6 | ALTER TABLE pursuance_hierarchical_relationships OWNER TO superuser; 7 | -------------------------------------------------------------------------------- /debian_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Steve Phillips / elimisteve 3 | # 2017.05.13 4 | 5 | sudo apt-get install postgresql-9.4 postgresql-contrib-9.4 6 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.1' 2 | 3 | services: 4 | postgres: 5 | image: postgres:latest 6 | ports: 7 | - 5432:5432 8 | environment: 9 | - POSTGRES_PASSWORD=superuser 10 | - POSTGRES_USER=superuser 11 | - POSTGRES_DB=pursuance 12 | volumes: 13 | - ./_docker-volumes/postgres:/var/lib/postgresql/data 14 | postgrest: 15 | image: erasche/postgrest:latest 16 | ports: 17 | - "3000:3000" 18 | environment: 19 | PGUSER: superuser 20 | PGPASSWORD: superuser 21 | PGHOST: postgres 22 | PGPORT: 5432 23 | PGDATABASE: pursuance 24 | PGSCHEMA: public 25 | DB_ANON_ROLE: postgres 26 | depends_on: 27 | - postgres 28 | adminer: 29 | image: adminer 30 | ports: 31 | - 8090:8080 -------------------------------------------------------------------------------- /email_templates.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2018.04.23 3 | 4 | package main 5 | 6 | import "text/template" 7 | 8 | var tmplDailyDigest = template.Must(template.New("DailyDigest").Parse(`Hey there! 9 | 10 | Here's a list of tasks assigned to you that are due soon, or past due: 11 | {{range .Tasks}} 12 | "{{.Title}}" 13 | Status: {{.Status}} || Due {{.DueDateFmt}} 14 | From pursuance: {{.PursuanceName}} 15 | Discuss: {{.DiscussURL}} 16 | {{end}} 17 | `)) 18 | -------------------------------------------------------------------------------- /json.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | log "github.com/Sirupsen/logrus" 8 | "github.com/gorilla/websocket" 9 | ) 10 | 11 | const contentTypeJSON = "application/json; charset=utf-8" 12 | 13 | func WriteError(w http.ResponseWriter, errStr string, secretErr error) error { 14 | return WriteErrorStatus(w, errStr, secretErr, http.StatusInternalServerError) 15 | } 16 | 17 | func WriteErrorStatus(w http.ResponseWriter, errStr string, secretErr error, status int) error { 18 | log.Debugf("Real error: %v", secretErr) 19 | log.Debugf("Returning HTTP %d w/error: %q", status, errStr) 20 | 21 | w.Header().Set("Content-Type", contentTypeJSON) 22 | w.WriteHeader(status) 23 | _, err := fmt.Fprintf(w, `{"error":%q}`, errStr) 24 | return err 25 | } 26 | 27 | // WebSockets 28 | 29 | func WSWriteError(wsConn *websocket.Conn, errStr string, secretErr error) error { 30 | log.Debugf("WebSocket error: " + secretErr.Error()) 31 | 32 | wsErr := fmt.Sprintf(`{"error":%q}`, errStr) 33 | err := wsConn.WriteMessage(websocket.TextMessage, []byte(wsErr)) 34 | wsConn.Close() // TODO: Will this panic? 35 | return err 36 | } 37 | -------------------------------------------------------------------------------- /public/assets/img/HypothesisLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/public/assets/img/HypothesisLogo.png -------------------------------------------------------------------------------- /public/assets/img/WorkingOn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/public/assets/img/WorkingOn.gif -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Pursuance 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "pursuance", 3 | "name": "Pursuance", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | position: relative; 3 | } 4 | 5 | .overflow-x-ctn { 6 | overflow-x: auto; 7 | } 8 | 9 | .overflow-y-ctn { 10 | overflow-y: auto; 11 | } 12 | 13 | .content-ctn { 14 | background-color: #1c1c1c; 15 | min-height: calc(100vh - 110px); 16 | margin-top: 60px; 17 | width: 100%; 18 | } 19 | 20 | .modal-backdrop { 21 | position: relative; 22 | } 23 | 24 | @media (max-width: 639px) { 25 | .hide-xsmall { 26 | display: none; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { Provider } from 'react-redux'; 4 | import './utils/detect_browser'; 5 | import './utils/origin_polyfill'; 6 | import store from './store'; 7 | import App from './App'; 8 | import './index.css'; 9 | 10 | 11 | it('renders without crashing', () => { 12 | const div = document.createElement('div'); 13 | ReactDOM.render( 14 | 15 | 16 | , 17 | div); 18 | }); 19 | -------------------------------------------------------------------------------- /src/api/users.js: -------------------------------------------------------------------------------- 1 | import * as postgrest from './postgrest'; 2 | 3 | export const getUsersReq = () => { 4 | return postgrest 5 | .getJSON('/users?select=username') 6 | .then(usersArray => { 7 | const usersObject = {}; 8 | for (var i = 0; i < usersArray.length; i++) { 9 | usersObject[usersArray[i].username] = usersArray[i]; 10 | usersObject[usersArray[i].username].suggestionName = 11 | usersArray[i].username; 12 | } 13 | return usersObject; 14 | }) 15 | .catch(err => console.log('Error fetching users:', err)); 16 | }; 17 | -------------------------------------------------------------------------------- /src/components/Content/Content.css: -------------------------------------------------------------------------------- 1 | .content { 2 | background-color: #212121; 3 | height: 100%; 4 | width: 100%; 5 | padding: 20px; 6 | border-bottom-left-radius: 5px; 7 | border: 1px solid #6d6d6d; 8 | border-right: none; 9 | } 10 | 11 | @media (max-width: 1279px) { 12 | .content { 13 | padding: 5px; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/components/Content/Notifications/Notification.css: -------------------------------------------------------------------------------- 1 | .Notification { 2 | display: flex; 3 | } 4 | 5 | .NotificationIconContainer { 6 | padding-top: 5px; 7 | } 8 | 9 | .NotificationContentContainer { 10 | padding: 5px; 11 | max-width: 360px; 12 | overflow: auto; 13 | } 14 | 15 | .NotificationContentContainer a { 16 | overflow-wrap: break-word; 17 | } 18 | -------------------------------------------------------------------------------- /src/components/Content/Notifications/NotificationAction.css: -------------------------------------------------------------------------------- 1 | .NotificationAction { 2 | font-size: 10px; 3 | min-width: 40px; 4 | text-align: center; 5 | } 6 | 7 | .NotificationAction span { 8 | display: block; 9 | } -------------------------------------------------------------------------------- /src/components/Content/Notifications/NotificationIcon.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import FaBolt from 'react-icons/lib/fa/bolt'; 3 | import FaBell from 'react-icons/lib/fa/bell'; 4 | import FaAt from 'react-icons/lib/fa/at'; 5 | import FaThumbsUpO from 'react-icons/lib/fa/thumbs-o-up'; 6 | import FaExclamation from 'react-icons/lib/fa/exclamation'; 7 | import FaRocket from 'react-icons/lib/fa/rocket'; 8 | 9 | const iconSize = 34; 10 | 11 | const NotificationIcon = ({ type }) => { 12 | switch (type) { 13 | case 'MICRO_TASK': 14 | return 15 | case 'APPRECIATION': 16 | return 17 | case 'MENTION': 18 | return 19 | case 'HELP_WANTED': 20 | return 21 | case 'PROGRESS': 22 | return 23 | default: 24 | return 25 | } 26 | }; 27 | 28 | export default NotificationIcon; -------------------------------------------------------------------------------- /src/components/Content/ParticipantList/Participant/Participant.css: -------------------------------------------------------------------------------- 1 | #participant-list { 2 | display: flex; 3 | flex-flow: row wrap; 4 | } 5 | 6 | .participant-ctn { 7 | color: #efefef; 8 | padding: 0.5em; 9 | } 10 | 11 | .participant-avatar { 12 | height: 75px; 13 | width: 75px; 14 | border: 1px solid #666666; 15 | border-radius: 5px; 16 | vertical-align: center; 17 | text-align: center; 18 | } 19 | 20 | .participant-name { 21 | text-align: center; 22 | } -------------------------------------------------------------------------------- /src/components/Content/ParticipantList/Participant/Participant.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Participant = ({ username }) => { 4 | return
5 |
6 |
7 | {username} 8 |
9 |
10 | }; 11 | 12 | export default Participant; -------------------------------------------------------------------------------- /src/components/Content/ParticipantList/ParticipantList.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { connect } from 'react-redux'; 3 | 4 | import { getUsers } from "../../../actions"; 5 | import Participant from './Participant/Participant'; 6 | import './Participant/Participant.css' 7 | 8 | class ParticipantList extends React.Component { 9 | componentWillMount() { 10 | const { getUsers } = this.props; 11 | getUsers(); 12 | } 13 | 14 | renderList() { 15 | const { users } = this.props; 16 | const participants = []; 17 | 18 | for(const key in users) { 19 | const { username } = users[key]; 20 | participants.push(); 21 | } 22 | 23 | return participants; 24 | } 25 | 26 | render() { 27 | return
28 |
29 | {this.renderList()} 30 |
31 |
32 | } 33 | } 34 | 35 | export default connect(({ pursuances, currentPursuanceId, users }) => 36 | ({ pursuances, currentPursuanceId, users }), { 37 | getUsers 38 | })(ParticipantList); -------------------------------------------------------------------------------- /src/components/Content/Pursuance/PursuanceMenu.css: -------------------------------------------------------------------------------- 1 | .pursuance-btn-group a { 2 | background-color: #212121; 3 | border: 1px solid #6d6d6d; 4 | border-right: none; 5 | border-bottom: none; 6 | width: 100px; 7 | height: 66px; 8 | padding-top: 10px; 9 | } 10 | 11 | @media (max-width: 1279px) { 12 | .pursuance-btn-group a { 13 | width: 80px; 14 | height: 60px; 15 | } 16 | .pursuance-btn-group svg { 17 | width: 24px; 18 | height: 24px; 19 | } 20 | } 21 | 22 | a.pursuance-top-btn { 23 | border-top-right-radius: 0px; 24 | } 25 | 26 | a.pursuance-bottom-btn { 27 | border-bottom-right-radius: 0px; 28 | border-bottom: 1px solid #6d6d6d; 29 | } 30 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/PursuanceMenuItem.css: -------------------------------------------------------------------------------- 1 | .menu-item { 2 | display: block; 3 | text-align: center; 4 | font-size: 9px; 5 | } 6 | 7 | .menu-item:hover { 8 | text-decoration: none; 9 | } 10 | 11 | .menu-item span { 12 | display: block; 13 | } 14 | 15 | .menu-item { 16 | color: #50b3fe; 17 | } 18 | 19 | .menu-item.Active { 20 | color: #9b77ff; 21 | } 22 | 23 | .menu-btn-label { 24 | font-size: 1.42em; 25 | } 26 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/PursuancePage.css: -------------------------------------------------------------------------------- 1 | #pursuance-page { 2 | display: flex; 3 | flex-direction: row; 4 | min-height: calc(100vh - 60px); 5 | width: 100%; 6 | margin-top: 60px; 7 | padding-left: 12px; 8 | } 9 | 10 | #pursuance-page > article { 11 | display: flex; 12 | flex: 1; 13 | order: 2; 14 | margin-left: 100px; 15 | min-width: 0; /* Firefox flexbox workaround */ 16 | } 17 | 18 | #pursuance-page > nav { 19 | position: fixed; 20 | flex: 0 0 5em; 21 | order: 1; 22 | } 23 | 24 | @media (max-width: 1279px) { 25 | #pursuance-page { 26 | padding-left: 0; 27 | } 28 | #pursuance-page > article { 29 | margin-left: 80px; 30 | } 31 | } 32 | 33 | @media (max-width: 639px) { 34 | #pursuance-page { 35 | padding-left: 0; 36 | } 37 | #pursuance-page > article { 38 | margin-left: 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/views/CalendarView.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Calendar from '../../Calendar/Calendar'; 3 | 4 | const CalendarView = ({ match: { params: { pursuanceId } } }) => { 5 | return ( 6 | 7 | ); 8 | }; 9 | 10 | export default CalendarView; 11 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/views/DiscussView.css: -------------------------------------------------------------------------------- 1 | .discuss-ctn { 2 | display: flex; 3 | width: 100%; 4 | background-color: #1c1c1c; 5 | word-break: break-word; 6 | word-wrap: break-word; 7 | overflow-wrap: break-word; 8 | min-width: 0; /* Firefox workaround; see https://github.com/philipwalton/flexbugs/issues/39 */ 9 | } 10 | 11 | .leapchat-frame { 12 | display: flex; 13 | flex: 1; 14 | height: calc(100vh - 60px); 15 | border: 1px solid #6d6d6d; 16 | border-right: none; 17 | border-bottom-left-radius: 4px; 18 | margin-right: 50px; 19 | min-width: 270px; 20 | } 21 | 22 | .leapchat-frame-narrow { 23 | max-width: calc(100vw - 662px); 24 | } 25 | 26 | @media (min-width: 1429px) { 27 | .leapchat-frame-narrow { 28 | max-width: calc(65vw - 162px); 29 | } 30 | } 31 | 32 | @media (max-width: 1279px) { 33 | .leapchat-frame-narrow { 34 | max-width: calc(100vw - 628px); 35 | } 36 | } 37 | 38 | @media (max-width: 399px) { 39 | /* FIXME(elimisteve): Not affecting UI when screen width < 350px for some reason */ 40 | .leapchat-frame-narrow { 41 | max-width: calc(100vw - 50px); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/views/ParticipantsView.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import ParticipantList from '../../ParticipantList/ParticipantList'; 4 | 5 | const ParticipantsView = ({ match: { params: { pursuanceId } } }) => { 6 | return ( 7 | 8 | ) 9 | }; 10 | 11 | export default ParticipantsView; 12 | -------------------------------------------------------------------------------- /src/components/Content/Pursuance/views/TaskListView.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TaskHierarchy from '../../TaskHierarchy/TaskHierarchy'; 3 | 4 | const TaskListView = ({ match: { params: { pursuanceId } } }) => { 5 | return ( 6 | 7 | ); 8 | }; 9 | 10 | export default TaskListView; 11 | -------------------------------------------------------------------------------- /src/components/Content/PursuanceList/PursuanceList.css: -------------------------------------------------------------------------------- 1 | .pursuance-list p { 2 | color: #efefef; 3 | } 4 | 5 | .pursuance-list a { 6 | color: #50b3fe; 7 | text-decoration: none; 8 | } 9 | 10 | .pursuance-list-ctn a:hover { 11 | text-decoration: underline; 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Content/PursuanceList/PursuanceList.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { Link } from 'react-router-dom'; 4 | import './PursuanceList.css'; 5 | import '../Content.css'; 6 | 7 | class PursuanceList extends Component { 8 | 9 | getPursuanceList = () => { 10 | const pursuanceArr = Object.values(this.props.pursuances); 11 | return pursuanceArr.map((pursuance) => ( 12 |
13 | 14 |

{pursuance.name}

15 | 16 | {pursuance.mission &&

Mission: {pursuance.mission}

} 17 |
18 | )); 19 | } 20 | 21 | render() { 22 | return ( 23 |
24 | {this.getPursuanceList()} 25 |
26 | ); 27 | } 28 | } 29 | 30 | export default connect(({ pursuances }) => ({ pursuances }))(PursuanceList); 31 | -------------------------------------------------------------------------------- /src/components/Content/RightPanel/TaskDetails/TaskDetailsTopbar.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Content/RightPanel/TaskDetails/TaskIcons/TaskIcons.css: -------------------------------------------------------------------------------- 1 | .task-icons { 2 | display: flex; 3 | } 4 | 5 | .icon { 6 | color: #fff; 7 | margin-top: 8px; 8 | margin-right: 10px; 9 | cursor: pointer; 10 | border: 1px solid rgba(255, 255, 255, .5); 11 | border-radius: 8px; 12 | padding: 0 4px; 13 | background-color: #000; 14 | } 15 | 16 | .icon:hover { 17 | cursor: pointer; 18 | color: #eaeaea; 19 | border-color: #fff; 20 | } 21 | 22 | .hyp-logo { 23 | margin-top: 8px; 24 | width: 34px; 25 | margin-bottom: -6px; 26 | border-radius: 4px; 27 | margin-right: 10px; 28 | cursor: pointer; 29 | } 30 | -------------------------------------------------------------------------------- /src/components/Content/RightPanel/TaskDetails/TaskOptions/TaskOptions.css: -------------------------------------------------------------------------------- 1 | #task-options-dropdown { 2 | height: 100%; 3 | width: 100%; 4 | padding: 0; 5 | text-align: left; 6 | background: none; 7 | color: #e0e0e0; 8 | border: none; 9 | } 10 | 11 | .task-options-menu-item { 12 | display: flex; 13 | flex-direction: row; 14 | justify-content: center; 15 | align-items: center; 16 | } 17 | 18 | .task-options-menu-item div { 19 | display: flex; 20 | align-items: center; 21 | font-size: 15px; 22 | } 23 | 24 | .action-icon { 25 | margin-right: 5px; 26 | } 27 | 28 | .task-options-ctn:hover { 29 | display: block; 30 | } 31 | 32 | .task-options-ctn .dropdown ul { 33 | z-index: 9001; 34 | border-radius: 5px; 35 | margin: 4px 0 0 -7px; 36 | padding: 0; 37 | min-width: 0; 38 | } 39 | 40 | .dropdown ul li a { 41 | padding: 2px 6px; 42 | } 43 | -------------------------------------------------------------------------------- /src/components/Content/RightPanel/TaskDetails/TaskTitle/TaskTitle.css: -------------------------------------------------------------------------------- 1 | #discuss-task-title-update { 2 | color: #1c1c1c; 3 | outline: none; 4 | border: none; 5 | border-bottom: 2px solid #50b3fe; 6 | font-size: 1.5em; 7 | max-width: 100%; 8 | width: 95%; 9 | height: 60px; 10 | border-radius: 4px; 11 | padding-left: 5px; 12 | resize: none; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/Content/TaskHierarchy/Task/TaskAssigner/AssignerButton/AssignerButton.css: -------------------------------------------------------------------------------- 1 | .edit-assignee-button { 2 | border-radius: 5px; 3 | background-color: #288bd6; 4 | } 5 | 6 | .edit-assignee-button:hover { 7 | border-color: #fff; 8 | } 9 | 10 | .assignee-button { 11 | text-align: left; 12 | white-space: nowrap; 13 | overflow: hidden; 14 | text-overflow: ellipsis; 15 | max-width: 100%; 16 | border-radius: 5px; 17 | background-color: #aa00ff; 18 | } 19 | 20 | .assignee-button:hover { 21 | border-color: #fff; 22 | } 23 | -------------------------------------------------------------------------------- /src/components/Content/TaskManager/TaskForm/AssignerInput/AssignerInput.css: -------------------------------------------------------------------------------- 1 | .assign-autocomplete-ctn { 2 | position: relative; 3 | display: flex; 4 | width: 240px; 5 | max-height: 32px; 6 | } 7 | 8 | .at-symbol { 9 | background-color: #333333; 10 | border: 1px solid #a5a5a5; 11 | padding: 6px 2px; 12 | text-align: center; 13 | font-weight: normal; 14 | font-size: 14px; 15 | color: #efefef; 16 | } 17 | 18 | .assign-to { 19 | position: relative; 20 | min-width: 150px; 21 | border-radius: 0; 22 | border-color: #a5a5a5; 23 | } 24 | 25 | .unassign-user-icon { 26 | position: absolute; 27 | max-height: 34px; 28 | height: 100%; 29 | right: -34px; 30 | padding: 2px 8px; 31 | text-align: center; 32 | border: 1px solid rgba(255, 255, 255, .5); 33 | background-color: #288bd6; 34 | } 35 | 36 | .unassign-user-icon:hover { 37 | cursor: pointer; 38 | } 39 | -------------------------------------------------------------------------------- /src/components/Content/TaskManager/TaskForm/DatePicker/DatePicker.css: -------------------------------------------------------------------------------- 1 | .date-picker-ctn { 2 | height: 34px; 3 | color: #333; 4 | } 5 | 6 | .react-datepicker-wrapper { 7 | height: 34px; 8 | margin-top: 1px; 9 | margin-bottom: -1px; 10 | } 11 | 12 | .react-datepicker__input-container { 13 | height: 100%; 14 | } 15 | 16 | .react-datepicker__input-container input { 17 | height: 32px; 18 | padding: 4px; 19 | width: 104px; 20 | } 21 | 22 | .task-due-date .react-datepicker__input-container input { 23 | height: 32px; 24 | } 25 | -------------------------------------------------------------------------------- /src/components/Content/TaskManager/TaskManager.css: -------------------------------------------------------------------------------- 1 | .task-manager-container { 2 | height: 90%; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Content/TaskManager/TaskManager.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import TaskForm from './TaskForm/TaskForm'; 3 | import './TaskManager.css'; 4 | import '../Content.css'; 5 | 6 | class TaskManager extends Component { 7 | 8 | render () { 9 | return ( 10 |
11 | 12 |
13 | ); 14 | } 15 | } 16 | 17 | export default TaskManager; 18 | -------------------------------------------------------------------------------- /src/components/Content/TaskManager/TaskManager.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/Content/TaskManager/TaskManager.test.js -------------------------------------------------------------------------------- /src/components/CreatePursuance/CreatePursuance.css: -------------------------------------------------------------------------------- 1 | .create-pursuance-container { 2 | text-align: center; 3 | background-color: #1c1c1c; 4 | margin-top: 60px; 5 | width: 100%; 6 | height: calc(100vh - 60px); 7 | top: 0; 8 | right: 0; 9 | bottom: 0; 10 | left: 0; 11 | } 12 | 13 | .create-pursuance-header{ 14 | color: rgb(255, 255, 255); 15 | padding-top: 20px; 16 | } 17 | -------------------------------------------------------------------------------- /src/components/CreatePursuance/CreatePursuance.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import CreatePursuanceForm from './CreatePursuanceForm/CreatePursuanceForm'; 3 | import SettingsInfoModal from './SettingsInfoModal/SettingsInfoModal'; 4 | import './CreatePursuance.css'; 5 | 6 | class CreatePursuance extends Component { 7 | render(){ 8 | return ( 9 |
10 |
11 |

Create a

12 |

Pursuance

13 |
14 | 15 | 16 |
17 | ) 18 | } 19 | } 20 | 21 | export default CreatePursuance; 22 | -------------------------------------------------------------------------------- /src/components/CreatePursuance/CreatePursuanceForm/CreatePursuanceForm.css: -------------------------------------------------------------------------------- 1 | .create-pursuance-form { 2 | width: 70%; 3 | margin: 0 auto; 4 | height: 80%; 5 | display: flex; 6 | flex-direction: column; 7 | } 8 | 9 | .create-pursuance-input { 10 | width: 80%; 11 | margin: 7px auto; 12 | font-size: 18px; 13 | border-radius: 4px; 14 | border: none; 15 | outline: none; 16 | padding-left: 5px; 17 | } 18 | 19 | .create-pursuance-setting { 20 | display: flex; 21 | flex-direction: row; 22 | margin-left: 10%; 23 | width: 45%; 24 | } 25 | 26 | .create-pursuance-info-icon { 27 | cursor: pointer; 28 | margin: 0 10px; 29 | color: white; 30 | } 31 | 32 | .radio-field-span { 33 | margin: 0 15px 0 5px; 34 | color: rgb(255, 255, 255); 35 | } 36 | 37 | .create-pursuance-button { 38 | font-size: 26px; 39 | width: 40%; 40 | margin: 15px auto; 41 | border-radius: 10px; 42 | color: #fff; 43 | background-color: #288bd6; 44 | } 45 | -------------------------------------------------------------------------------- /src/components/Dashboard/Dashboard.css: -------------------------------------------------------------------------------- 1 | #dashboard { 2 | background-color: #1c1c1c; 3 | height: calc(100vh - 60px); 4 | padding: 30px; 5 | margin-top: 60px; 6 | padding-bottom: 50px; 7 | overflow: auto; 8 | } 9 | 10 | @media (max-width: 799px) { 11 | #dashboard { 12 | padding: 30px 0; 13 | } 14 | } 15 | 16 | #dashboard-title { 17 | text-align: center; 18 | color: #fcfcfc; 19 | } 20 | 21 | #dash-first-row { 22 | display: flex; 23 | } 24 | 25 | #dash-second-row { 26 | display: flex; 27 | } 28 | 29 | .dash-ctn { 30 | flex: 1; 31 | padding: 10px; 32 | } 33 | 34 | .dash-box { 35 | padding: 12px; 36 | border: 2px solid #808080; 37 | border-radius: 6px; 38 | } 39 | 40 | .dash-box-header { 41 | position: relative; 42 | } 43 | 44 | .dash-box-title { 45 | color: #eee; 46 | display: inline; 47 | } 48 | 49 | .add-icon { 50 | color: #fff; 51 | position: absolute; 52 | margin-left: 15px; 53 | margin-top: 5px; 54 | } 55 | -------------------------------------------------------------------------------- /src/components/Dashboard/Dashboard.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/Dashboard/Dashboard.test.js -------------------------------------------------------------------------------- /src/components/Footer/Footer.css: -------------------------------------------------------------------------------- 1 | footer { 2 | background-color: #141414; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | height: 50px; 7 | bottom: 0; 8 | width: 100%; 9 | font-size: 0.90em; 10 | color: #efefef; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './Footer.css'; 3 | 4 | const Footer = () => ( 5 |
6 | Copyright © 2018 Pursuance 7 |
8 | ); 9 | 10 | export default Footer; 11 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/Footer/Footer.test.js -------------------------------------------------------------------------------- /src/components/HomePage/HomePage.css: -------------------------------------------------------------------------------- 1 | #home-background { 2 | background: url('../../static/background_img/home_background.jpg'); 3 | background-repeat: no-repeat; 4 | background-position: center; 5 | background-size: auto 100%; 6 | background-color: #1c1c1c; 7 | height: calc(100vh - 110px); 8 | margin-top: 60px; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/HomePage/HomePage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './HomePage.css'; 3 | import Footer from '../../components/Footer/Footer'; 4 | 5 | const HomePage = () => ( 6 |
7 |
8 |
9 |
10 | ); 11 | 12 | export default HomePage; 13 | -------------------------------------------------------------------------------- /src/components/HomePage/HomePage.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/HomePage/HomePage.test.js -------------------------------------------------------------------------------- /src/components/NavBar/LogIn/LogIn.css: -------------------------------------------------------------------------------- 1 | .checkbox { 2 | text-align: left; 3 | padding-left: 20px; 4 | } 5 | 6 | #remember-username { 7 | height: 16px; 8 | width: 16px; 9 | margin-top: 2px; 10 | } 11 | 12 | .checkbox span { 13 | color: #efefef; 14 | } 15 | -------------------------------------------------------------------------------- /src/components/NavBar/LogIn/LogIn.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/NavBar/LogIn/LogIn.test.js -------------------------------------------------------------------------------- /src/components/NavBar/NavBar.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/NavBar/NavBar.test.js -------------------------------------------------------------------------------- /src/components/NavBar/NotificationsModal/NotificationsTab/NotificationsTab.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/NavBar/NotificationsModal/NotificationsTab/NotificationsTab.css -------------------------------------------------------------------------------- /src/components/NavBar/SignUp/SignUp.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/components/NavBar/SignUp/SignUp.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/NavBar/SignUp/SignUp.test.js -------------------------------------------------------------------------------- /src/components/NavBar/SignUpLogInModal.css: -------------------------------------------------------------------------------- 1 | .sign-login-dialog { 2 | margin-top: 20vh; 3 | } 4 | 5 | .signup-login-content { 6 | background-color: #1c1c1c; 7 | border: 2px solid #808080; 8 | } 9 | 10 | .sign-login-title { 11 | font-size: 1.6em; 12 | color: #1fc7d3; 13 | } 14 | 15 | .close { 16 | color: #969696; 17 | opacity: 1; 18 | } 19 | 20 | .close:hover { 21 | color: #efefef; 22 | opacity: 1; 23 | } 24 | 25 | .signup-login-body { 26 | padding: 36px 26px 12px 26px; 27 | } 28 | 29 | .signup-login-label { 30 | color: #efefef; 31 | font-size: 1.1em; 32 | } 33 | 34 | .btn-close { 35 | background-color: #969696; 36 | color: #dddddd; 37 | } 38 | 39 | .btn-close:hover { 40 | background-color: #efefef; 41 | } 42 | 43 | .btn-primary { 44 | background-color: #288bd6; 45 | } 46 | 47 | .btn-primary:hover { 48 | background-color: #8662ea; 49 | } 50 | -------------------------------------------------------------------------------- /src/components/NavBar/UserSettingsPopover/ContributionPointsCounter.css: -------------------------------------------------------------------------------- 1 | .points-ctn { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | background-color: #288bd6; 6 | color: #f4f4f4; 7 | display: inline; 8 | padding: .2em .6em .3em; 9 | font-size: 75%; 10 | font-weight: 700; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | } 17 | 18 | .point-total { 19 | vertical-align: middle; 20 | } 21 | -------------------------------------------------------------------------------- /src/components/NavBar/UserSettingsPopover/ContributionPointsCounter.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Label } from 'react-bootstrap'; 3 | import FaStar from 'react-icons/lib/fa/star'; 4 | import AnimatedNumber from 'react-animated-number'; 5 | import './ContributionPointsCounter.css'; 6 | 7 | const ContributionPointsCounter = ({ username, contributionPoints }) => ( 8 | ( 18 | 23 | )}/> 24 | 25 | ); 26 | 27 | export default ContributionPointsCounter; 28 | -------------------------------------------------------------------------------- /src/components/NavBar/UserSettingsPopover/UserSettingsPopover.css: -------------------------------------------------------------------------------- 1 | .UserSettingsButton { 2 | background: none; 3 | border: none; 4 | color: white; 5 | } 6 | 7 | .UserSettingsButton span.Username { 8 | vertical-align: middle; 9 | } 10 | 11 | .UserSettingsButton span { 12 | margin-left: 5px; 13 | } 14 | 15 | .ContributionPointsContainer { 16 | position: relative; 17 | } 18 | 19 | .ContributionPointsContainer .ContributionStar { 20 | position: absolute; 21 | } 22 | -------------------------------------------------------------------------------- /src/components/NavBar/UserSettingsPopover/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { Popover, OverlayTrigger, Button } from 'react-bootstrap'; 4 | import ContributionPointsCounter from './ContributionPointsCounter'; 5 | import { userLogoutSuccess } from '../../../actions'; 6 | import './UserSettingsPopover.css'; 7 | 8 | const UserSettingsPopover = ({ username, contributionPoints, userLogoutSuccess }) => ( 9 | 14 | 17 | 18 | )}> 19 | 23 | 24 | ); 25 | 26 | export default connect(null, { userLogoutSuccess })(UserSettingsPopover); 27 | -------------------------------------------------------------------------------- /src/components/NotFound/NotFound.css: -------------------------------------------------------------------------------- 1 | #not-found { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | padding-bottom: 10%; 6 | text-align: center; 7 | color: #efefef; 8 | } 9 | -------------------------------------------------------------------------------- /src/components/NotFound/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './NotFound.css'; 3 | 4 | const NotFound = () => ( 5 |
6 |

404: Not Found

7 |
8 | ); 9 | 10 | export default NotFound; 11 | -------------------------------------------------------------------------------- /src/components/PublicPursuances/PublicPursuanceList.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { Link } from 'react-router-dom'; 4 | import * as postgrest from '../../api/postgrest'; 5 | 6 | 7 | class PublicPursuanceList extends Component { 8 | 9 | getPublicPursuanceList = () => { 10 | const pursuanceArr = Object.values(this.props.publicPursuances); 11 | return pursuanceArr.map((pursuance) => ( 12 |
13 | 14 |

{pursuance.name}

15 | 16 |

Mission: {pursuance.mission}

17 |

Created {postgrest.formatDate(pursuance.created)}

18 |
19 | )); 20 | } 21 | 22 | render() { 23 | return ( 24 |
25 | {this.getPublicPursuanceList()} 26 |
27 | ) 28 | } 29 | 30 | } 31 | 32 | export default connect(({ publicPursuances }) => ({ publicPursuances }))(PublicPursuanceList); 33 | -------------------------------------------------------------------------------- /src/components/PublicPursuances/PublicPursuances.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PublicPursuanceList from './PublicPursuanceList'; 3 | import { getPublicPursuances } from '../../actions'; 4 | import { connect } from 'react-redux'; 5 | 6 | 7 | class PublicPursuances extends Component { 8 | 9 | componentWillMount() { 10 | this.props.getPublicPursuances(); 11 | } 12 | 13 | render () { 14 | return ( 15 |
16 |
17 |

All Pursuances

18 |
19 |
20 |
21 |
22 |

Recently Created

23 | 24 |
25 |
26 |
27 |
28 | ); 29 | } 30 | } 31 | 32 | export default connect(null, { getPublicPursuances })(PublicPursuances); 33 | -------------------------------------------------------------------------------- /src/components/common/widgets/LoadingGauge/LoadingGauge.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/common/widgets/LoadingGauge/LoadingGauge.css -------------------------------------------------------------------------------- /src/components/common/widgets/LoadingGauge/LoadingGauge.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/components/common/widgets/LoadingGauge/LoadingGauge.js -------------------------------------------------------------------------------- /src/constants/index.js: -------------------------------------------------------------------------------- 1 | export const PURSUANCE_DISPLAY_PREFIX = '(P) '; 2 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | height: 100%; 6 | } 7 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { Provider } from 'react-redux'; 4 | import 'string.prototype.startswith'; 5 | import './utils/detect_mobile'; 6 | import './utils/detect_browser'; 7 | import './utils/origin_polyfill'; 8 | import './utils/object_values_polyfill'; 9 | import store from './store'; 10 | import App from './App'; 11 | import './index.css'; 12 | 13 | ReactDOM.render( 14 | 15 | 16 | , 17 | document.getElementById('root'), 18 | ); 19 | 20 | if (module.hot) { 21 | module.hot.accept(); 22 | } 23 | -------------------------------------------------------------------------------- /src/reducers/createPursuanceReducer.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | name: '', 3 | mission: '', 4 | is_encrypted: false, 5 | isPending: false, 6 | redirect: false 7 | }; 8 | 9 | export default function(state = initialState, action) { 10 | switch (action.type) { 11 | case 'UPDATE_CREATE_PURSUANCE_FORM': 12 | const { fieldId, value } = action; 13 | return Object.assign({}, state, { 14 | [fieldId]: value 15 | }); 16 | 17 | case 'POST_PURSUANCE_PENDING': 18 | return Object.assign({}, state, { 19 | isPending: true 20 | }); 21 | 22 | case 'POST_PURSUANCE_FULFILLED': 23 | return Object.assign({}, state, { 24 | isPending: false, 25 | redirect: true 26 | }); 27 | 28 | case 'POST_PURSUANCE_REJECTED': 29 | return Object.assign({}, state, { 30 | isPending: false 31 | }); 32 | 33 | case 'PURSUANCE_FORM_CLEAR_FIELDS': 34 | return Object.assign({}, state, initialState); 35 | 36 | default: 37 | return state; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/reducers/currentPursuanceIdReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = null, action) { 2 | switch (action.type) { 3 | case 'SET_CURRENT_PURSUANCE': 4 | return action.currentPursuanceId; 5 | 6 | case 'UNSET_CURRENT_PURSUANCE': 7 | return null; 8 | 9 | case 'POST_PURSUANCE_FULFILLED': 10 | return action.payload.id; 11 | 12 | default: 13 | return state; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import taskForm from './taskFormReducer'; 3 | import users from './usersReducer'; 4 | import pursuances from './pursuancesReducer'; 5 | import publicPursuances from './publicPursuancesReducer'; 6 | import currentPursuanceId from './currentPursuanceIdReducer'; 7 | import tasks from './tasksReducer'; 8 | import notificationsReducer from './notificationsReducer'; 9 | import userReducer from './userReducer'; 10 | import showSettingsInfoModal from './settingsInfoReducer'; 11 | import createPursuance from './createPursuanceReducer'; 12 | import autoComplete from './autoCompleteReducer'; 13 | import showSuccessToast from './showSuccessToastReducer'; 14 | import rightPanel from './rightPanelReducer'; 15 | 16 | const rootReducer = combineReducers({ 17 | notifications: notificationsReducer, 18 | user: userReducer, 19 | taskForm, 20 | users, 21 | pursuances, 22 | publicPursuances, 23 | currentPursuanceId, 24 | tasks, 25 | showSettingsInfoModal, 26 | createPursuance, 27 | autoComplete, 28 | showSuccessToast, 29 | rightPanel 30 | }); 31 | 32 | export default rootReducer; 33 | -------------------------------------------------------------------------------- /src/reducers/publicPursuancesReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = {}, action) { 2 | switch (action.type) { 3 | case 'GET_PUBLIC_PURSUANCES_PENDING': 4 | return state; 5 | 6 | case 'GET_PUBLIC_PURSUANCES_FULFILLED': 7 | return action.payload; 8 | 9 | case 'GET_PUBLIC_PURSUANCES_REJECTED': 10 | return state; 11 | 12 | case 'POST_PUBLIC_PURSUANCE_FULFILLED': 13 | return Object.assign({}, state, { 14 | [action.payload.id]: action.payload 15 | }); 16 | 17 | default: 18 | return state; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/reducers/pursuancesReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = {}, action) { 2 | switch (action.type) { 3 | case 'GET_PURSUANCES_BY_IDS_PENDING': 4 | return state; 5 | 6 | case 'GET_PURSUANCES_BY_IDS_FULFILLED': 7 | return Object.assign({}, state, action.payload); 8 | 9 | case 'GET_PURSUANCES_BY_IDS_REJECTED': 10 | return state; 11 | 12 | case 'GET_PURSUANCES_PENDING': 13 | return state; 14 | 15 | case 'GET_PURSUANCES_FULFILLED': 16 | return action.payload; 17 | 18 | case 'GET_PURSUANCES_REJECTED': 19 | return state; 20 | 21 | case 'POST_PURSUANCE_FULFILLED': 22 | return Object.assign({}, state, { 23 | [action.payload.id]: action.payload 24 | }); 25 | 26 | default: 27 | return state; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/reducers/settingsInfoReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = false, action) { 2 | switch (action.type) { 3 | case 'TOGGLE_SETTINGS_INFO_MODAL': 4 | return !state; 5 | 6 | default: 7 | return state; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/reducers/showSuccessToastReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = false, action) { 2 | switch (action.type) { 3 | case 'POST_PURSUANCE_FULFILLED': 4 | return true; 5 | 6 | case 'REMOVE_SUCCESS_TOAST': 7 | return false; 8 | 9 | default: 10 | return state; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/reducers/userReducer.js: -------------------------------------------------------------------------------- 1 | const lsUsername = localStorage.getItem('username') || ''; 2 | 3 | const initialState = { 4 | authenticated: lsUsername !== '', 5 | username: lsUsername, 6 | contributionPoints: 160 7 | }; 8 | 9 | export default function(state = initialState, action) { 10 | switch (action.type) { 11 | case 'USER_LOGIN_SUCCESS': 12 | return { 13 | ...state, 14 | authenticated: true, 15 | username: action.username 16 | }; 17 | 18 | case 'USER_LOGOUT_SUCCESS': 19 | return { 20 | ...state, 21 | authenticated: false, 22 | username: '' 23 | }; 24 | 25 | case 'ADD_CONTRIBUTION_POINTS': 26 | return { 27 | ...state, 28 | contributionPoints: state.contributionPoints + action.amount 29 | }; 30 | 31 | case 'POST_TASK_FULFILLED': 32 | return { 33 | ...state, 34 | contributionPoints: state.contributionPoints + 3 35 | }; 36 | 37 | default: 38 | return state; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/reducers/usersReducer.js: -------------------------------------------------------------------------------- 1 | export default function(state = {}, action) { 2 | switch (action.type) { 3 | case 'GET_USERS_PENDING': 4 | return state; 5 | 6 | case 'GET_USERS_FULFILLED': 7 | return action.payload; 8 | 9 | case 'GET_USERS_REJECTED': 10 | return state; 11 | 12 | default: 13 | return state; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/static/background_img/home_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/static/background_img/home_background.jpg -------------------------------------------------------------------------------- /src/static/placeholder/1280x720.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/src/static/placeholder/1280x720.png -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux'; 2 | import promiseMiddleware from 'redux-promise-middleware'; 3 | import thunkMiddleware from 'redux-thunk'; 4 | import rootReducer from './reducers'; 5 | 6 | export default createStore( 7 | rootReducer, 8 | window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(), 9 | applyMiddleware(thunkMiddleware, promiseMiddleware()) 10 | ); 11 | -------------------------------------------------------------------------------- /src/utils/detect_browser.js: -------------------------------------------------------------------------------- 1 | if (!window.browser) { 2 | const ua = navigator.userAgent; 3 | const browsers = ['Safari', 'MSIE', 'Firefox']; 4 | for (var i = 0; i < browsers.length; i++) { 5 | if (ua.indexOf(browsers[i]) > -1) { 6 | window.browser = browsers[i]; 7 | break; 8 | } 9 | } 10 | let Chrome = ua.indexOf('Chrome') > -1; 11 | if (window.browser === 'Safari' && Chrome) window.browser = 'Chrome'; 12 | } 13 | -------------------------------------------------------------------------------- /src/utils/detect_mobile.js: -------------------------------------------------------------------------------- 1 | if (typeof window.hasVirtualKeyboard === 'undefined') { 2 | window.hasVirtualKeyboard = 'ontouchstart' in document.documentElement; 3 | } 4 | -------------------------------------------------------------------------------- /src/utils/generateId.js: -------------------------------------------------------------------------------- 1 | let prevId = 0; 2 | 3 | const generateId = prefix => { 4 | prevId++; 5 | return prefix + prevId; 6 | }; 7 | 8 | export default generateId; 9 | -------------------------------------------------------------------------------- /src/utils/object_values_polyfill.js: -------------------------------------------------------------------------------- 1 | if (Object && !Object.values) { 2 | Object.values = function(obj) { 3 | var arr = []; 4 | for (var key in obj) { 5 | arr.push(obj[key]); 6 | } 7 | return arr; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /src/utils/origin_polyfill.js: -------------------------------------------------------------------------------- 1 | // window.location.origin polyfill, as per 2 | // https://stackoverflow.com/a/25495161/197160 -- 3 | if (!window.location.origin) { 4 | window.location.origin = 5 | window.location.protocol + 6 | '//' + 7 | window.location.hostname + 8 | (window.location.port ? ':' + window.location.port : ''); 9 | } 10 | -------------------------------------------------------------------------------- /src/utils/suggestions.js: -------------------------------------------------------------------------------- 1 | export const filterSuggestion = (value, suggestionsObj) => { 2 | const suggestionsArr = Object.values(suggestionsObj); 3 | const lowerCaseVal = value.toLowerCase(); 4 | const filtered = suggestionsArr.filter(suggestion => { 5 | const suggest = suggestion.name || suggestion.suggestionName; 6 | const lowerCaseSuggestion = suggest.toLowerCase(); 7 | return lowerCaseSuggestion.startsWith(lowerCaseVal); 8 | }); 9 | return filtered.sort(sortBySuggest); 10 | }; 11 | 12 | const sortBySuggest = (suggest1, suggest2) => { 13 | return suggest1.suggestionName.localeCompare(suggest2.suggestionName); 14 | }; 15 | 16 | export const scrollIntoViewOptions = { behavior: 'instant', block: 'nearest' }; 17 | if (window.browser === 'Firefox') { 18 | delete scrollIntoViewOptions.block; 19 | } 20 | -------------------------------------------------------------------------------- /src/utils/tasks.js: -------------------------------------------------------------------------------- 1 | export const showTaskInPursuance = (task, pursuanceId) => { 2 | return ( 3 | task.pursuance_id === pursuanceId || 4 | task.assigned_to_pursuance_id === pursuanceId 5 | ); 6 | }; 7 | 8 | export const showAssignee = (task, currentPursuanceId, pursuances) => { 9 | const assignedPursuanceId = task.assigned_to_pursuance_id; 10 | const assignedByThisPursuance = assignedPursuanceId === currentPursuanceId; 11 | let placeholder = ''; 12 | let assignedTo; 13 | if ( 14 | assignedPursuanceId && 15 | !assignedByThisPursuance && 16 | pursuances[assignedPursuanceId] 17 | ) { 18 | placeholder = pursuances[assignedPursuanceId].suggestionName; 19 | assignedTo = pursuances[assignedPursuanceId].id; 20 | } else if (task.assigned_to) { 21 | placeholder = '@' + task.assigned_to; 22 | assignedTo = task.assigned_to; 23 | } 24 | 25 | return { 26 | placeholder, 27 | assignedTo 28 | }; 29 | }; 30 | 31 | export const isRootTaskInPursuance = (task, pursuanceId) => { 32 | return !task.parent_task_gid || task.assigned_to_pursuance_id === pursuanceId; 33 | }; 34 | -------------------------------------------------------------------------------- /static.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "build/", 3 | "clean_urls": false, 4 | "routes": { 5 | "/**": "index.html" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.6.x 4 | - 1.7.x 5 | - 1.8.x 6 | - tip 7 | env: 8 | - GOMAXPROCS=4 GORACE=halt_on_error=1 9 | install: 10 | - go get github.com/stretchr/testify/assert 11 | - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2 12 | - go get golang.org/x/sys/unix 13 | - go get golang.org/x/sys/windows 14 | script: 15 | - go test -race -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/example_hook_test.go: -------------------------------------------------------------------------------- 1 | package logrus_test 2 | 3 | import ( 4 | "github.com/sirupsen/logrus" 5 | "gopkg.in/gemnasium/logrus-airbrake-hook.v2" 6 | "os" 7 | ) 8 | 9 | func Example_hook() { 10 | var log = logrus.New() 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output 13 | log.Hooks.Add(airbrake.NewHook(123, "xyz", "development")) 14 | log.Out = os.Stdout 15 | 16 | log.WithFields(logrus.Fields{ 17 | "animal": "walrus", 18 | "size": 10, 19 | }).Info("A group of walrus emerges from the ocean") 20 | 21 | log.WithFields(logrus.Fields{ 22 | "omg": true, 23 | "number": 122, 24 | }).Warn("The group's number increased tremendously!") 25 | 26 | log.WithFields(logrus.Fields{ 27 | "omg": true, 28 | "number": 100, 29 | }).Error("The ice breaks!") 30 | 31 | // Output: 32 | // level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 33 | // level=warning msg="The group's number increased tremendously!" number=122 omg=true 34 | // level=error msg="The ice breaks!" number=100 omg=true 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/sirupsen/logrus" 9 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | 22 | If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. 23 | 24 | ```go 25 | import ( 26 | "log/syslog" 27 | "github.com/sirupsen/logrus" 28 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 29 | ) 30 | 31 | func main() { 32 | log := logrus.New() 33 | hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "") 34 | 35 | if err == nil { 36 | log.Hooks.Add(hook) 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package syslog 2 | 3 | import ( 4 | "log/syslog" 5 | "testing" 6 | 7 | "github.com/sirupsen/logrus" 8 | ) 9 | 10 | func TestLocalhostAddAndPrint(t *testing.T) { 11 | log := logrus.New() 12 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 13 | 14 | if err != nil { 15 | t.Errorf("Unable to connect to local syslog.") 16 | } 17 | 18 | log.Hooks.Add(hook) 19 | 20 | for _, level := range hook.Levels() { 21 | if len(log.Hooks[level]) != 1 { 22 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 23 | } 24 | } 25 | 26 | log.Info("Congratulations!") 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/sirupsen/logrus" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestAllHooks(t *testing.T) { 11 | 12 | assert := assert.New(t) 13 | 14 | logger, hook := NewNullLogger() 15 | assert.Nil(hook.LastEntry()) 16 | assert.Equal(0, len(hook.Entries)) 17 | 18 | logger.Error("Hello error") 19 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) 20 | assert.Equal("Hello error", hook.LastEntry().Message) 21 | assert.Equal(1, len(hook.Entries)) 22 | 23 | logger.Warn("Hello warning") 24 | assert.Equal(logrus.WarnLevel, hook.LastEntry().Level) 25 | assert.Equal("Hello warning", hook.LastEntry().Message) 26 | assert.Equal(2, len(hook.Entries)) 27 | 28 | hook.Reset() 29 | assert.Nil(hook.LastEntry()) 30 | assert.Equal(0, len(hook.Entries)) 31 | 32 | hook = NewGlobal() 33 | 34 | logrus.Error("Hello error") 35 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) 36 | assert.Equal("Hello error", hook.LastEntry().Message) 37 | assert.Equal(1, len(hook.Entries)) 38 | 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/base58/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Tommi Virtanen 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 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/base58/README.md: -------------------------------------------------------------------------------- 1 | Base58 encoding for Go 2 | ====================== 3 | 4 | Base58 is a less known encoding, but it is popular when embedding 5 | resource identifiers into URLs. 6 | 7 | The encoded data contains only alphanumericals, and avoids the easily 8 | confused characters 0, i, l and O (zero, india, lima, capital oscar). 9 | 10 | The API docs for this package are online at 11 | http://godoc.org/github.com/tv42/base58 12 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/base58/cmd/base58-decode/decode.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "log" 7 | "os" 8 | "path/filepath" 9 | 10 | "github.com/tv42/base58" 11 | ) 12 | 13 | var prog = filepath.Base(os.Args[0]) 14 | 15 | func usage() { 16 | fmt.Fprintf(os.Stderr, "Usage:\n") 17 | fmt.Fprintf(os.Stderr, " %s BASE58..\n", prog) 18 | flag.PrintDefaults() 19 | } 20 | 21 | func main() { 22 | log.SetFlags(0) 23 | log.SetPrefix(prog + ": ") 24 | 25 | flag.Usage = usage 26 | flag.Parse() 27 | 28 | if flag.NArg() < 1 { 29 | usage() 30 | os.Exit(1) 31 | } 32 | 33 | for _, enc := range flag.Args() { 34 | buf := []byte(enc) 35 | dec, err := base58.DecodeToBig(buf) 36 | if err != nil { 37 | log.Fatal(err) 38 | } 39 | _, err = fmt.Println(dec) 40 | if err != nil { 41 | log.Fatal(err) 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/base58/cmd/base58-encode/encode.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "log" 7 | "math/big" 8 | "os" 9 | "path/filepath" 10 | 11 | "github.com/tv42/base58" 12 | ) 13 | 14 | var prog = filepath.Base(os.Args[0]) 15 | 16 | func usage() { 17 | fmt.Fprintf(os.Stderr, "Usage:\n") 18 | fmt.Fprintf(os.Stderr, " %s NUMBER..\n", prog) 19 | flag.PrintDefaults() 20 | } 21 | 22 | func main() { 23 | log.SetFlags(0) 24 | log.SetPrefix(prog + ": ") 25 | 26 | flag.Usage = usage 27 | flag.Parse() 28 | 29 | if flag.NArg() < 1 { 30 | usage() 31 | os.Exit(1) 32 | } 33 | 34 | for _, dec := range flag.Args() { 35 | num := new(big.Int) 36 | if _, ok := num.SetString(dec, 10); !ok { 37 | log.Fatalf("not a number: %s", dec) 38 | } 39 | 40 | buf := base58.EncodeBig(nil, num) 41 | if _, err := fmt.Printf("%s\n", buf); err != nil { 42 | log.Fatal(err) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/binary_samples/mye.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type MyError string 4 | func (self MyError) Error() string { 5 | return string(self) 6 | } 7 | 8 | func main() { 9 | myE := MyError("This is an error.") 10 | e := *myE.(MyError) 11 | print("Done") 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/binary_samples/mye.go.minilock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/vendor/github.com/cathalgarvey/go-minilock/binary_samples/mye.go.minilock -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/const.go: -------------------------------------------------------------------------------- 1 | package minilock 2 | 3 | const magicBytes = "miniLock" 4 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/keygen.go: -------------------------------------------------------------------------------- 1 | package minilock 2 | 3 | import ( 4 | "github.com/cathalgarvey/go-minilock/taber" 5 | ) 6 | 7 | // GenerateKey makes a key from an email address and passphrase, consistent 8 | // with the miniLock algorithm. Passphrase is *not* currently checked 9 | // for strength so it is, at present, the caller's responsibility to 10 | // provide passphrases that don't suck! 11 | func GenerateKey(email string, passphrase string) (*taber.Keys, error) { 12 | return taber.FromEmailAndPassphrase(email, passphrase) 13 | } 14 | 15 | // EphemeralKey generates a fully random key, usually for ephemeral uses. 16 | func EphemeralKey() (*taber.Keys, error) { 17 | return taber.RandomKey() 18 | } 19 | 20 | // ImportID imports a miniLock ID as a public key. 21 | func ImportID(id string) (*taber.Keys, error) { 22 | return taber.FromID(id) 23 | } 24 | 25 | // LoadKey manually loads a key from public and private binary strings. 26 | func LoadKey(private, public []byte) *taber.Keys { 27 | return &taber.Keys{Private: private, Public: public} 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/preset_keys_test.go: -------------------------------------------------------------------------------- 1 | package minilock 2 | 3 | import ( 4 | "github.com/cathalgarvey/go-minilock/taber" 5 | ) 6 | 7 | var ( 8 | testKey1ID = "2453m8h7r3stzV8NeG4WzrFhsXTTsXTodQA2S6R9J2dfuh" 9 | testKey2ID = "xjjCm44Nuj4DyTBuzguJ1d7K6EdP2TWRYzsqiiAbfcGTr" 10 | testKey1, testKey2 *taber.Keys 11 | ) 12 | 13 | // Because of the work involved creating keys, they shouldn't be made within 14 | // test cases as they wildly skew the time required. 15 | func init() { 16 | testKey1, _ = taber.FromEmailAndPassphrase("cathalgarvey@some.where", "this is a password that totally works for minilock purposes") 17 | testKey2, _ = taber.FromEmailAndPassphrase("joeblocks@else.where", "whatever I write won't be good enough for the NSA") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/taber/box_chunk.go: -------------------------------------------------------------------------------- 1 | package taber 2 | 3 | // Whereas block represents a section of ciphertext, enumeratedChunk represents 4 | // a section of plaintext. 5 | type enumeratedChunk struct { 6 | index int 7 | chunk []byte 8 | err error 9 | } 10 | 11 | func (enChk *enumeratedChunk) beginsLocation() int { 12 | return enChk.index * ConstChunkSize 13 | } 14 | 15 | func (enChk *enumeratedChunk) endsLocation() int { 16 | return enChk.beginsLocation() + len(enChk.chunk) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/taber/const.go: -------------------------------------------------------------------------------- 1 | package taber 2 | 3 | const ( 4 | // ConstChunkSize is the maximum length of chunks. 5 | ConstChunkSize = 1048576 6 | // ConstFilenameBlockLength is the length of the block that contains the filename, 7 | // also the first block in the raw ciphertext. 8 | ConstFilenameBlockLength = (256 + 16 + 4) 9 | // ConstBlockLength is the length of the encrypted chunks. 10 | ConstBlockLength = ConstChunkSize + 16 + 4 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/taber/godoctaber.go: -------------------------------------------------------------------------------- 1 | /*Package taber - for all your NaCL needs. A set of constructs for go-miniLock that enclose the NaCL operations and more. 2 | */ 3 | package taber 4 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/taber/harden.go: -------------------------------------------------------------------------------- 1 | package taber 2 | 3 | import ( 4 | "github.com/dchest/blake2s" 5 | "golang.org/x/crypto/scrypt" 6 | ) 7 | 8 | func Harden(salt, passphrase string) ([]byte, error) { 9 | pp_blake := blake2s.Sum256([]byte(passphrase)) 10 | return scrypt.Key(pp_blake[:], []byte(salt), 131072, 8, 1, 32) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/taber/utils_test.go: -------------------------------------------------------------------------------- 1 | package taber 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func VPrint(things ...interface{}) { 9 | if testing.Verbose() { 10 | fmt.Println(things...) 11 | } 12 | } 13 | 14 | func TestChunkify(t *testing.T) { 15 | input := []byte("123456789012345678901234567890112345678901234567890123456789012345678901") 16 | cs := chunkify(input, 31) 17 | if len(cs[0]) != 31 || len(cs[1]) != 31 || len(cs[2]) != 10 { 18 | VPrint("Expected lengths 31, 31, 10 for chunked slice, got: ", len(cs[0]), len(cs[1]), len(cs[2])) 19 | VPrint("Input: ", input) 20 | VPrint("cs: ", cs) 21 | t.Fail() 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cathalgarvey/go-minilock/utils.go: -------------------------------------------------------------------------------- 1 | package minilock 2 | 3 | import ( 4 | "bytes" 5 | "crypto/rand" 6 | "encoding/binary" 7 | ) 8 | 9 | func randBytes(i int) ([]byte, error) { 10 | randBytes := make([]byte, i) 11 | read, err := rand.Read(randBytes) 12 | if err != nil { 13 | return nil, err 14 | } 15 | if read != i { 16 | return nil, ErrInsufficientEntropy 17 | } 18 | return randBytes, nil 19 | } 20 | 21 | func makeFullNonce() ([]byte, error) { 22 | return randBytes(24) 23 | } 24 | 25 | func toLittleEndian(i int32) ([]byte, error) { 26 | buf := new(bytes.Buffer) 27 | err := binary.Write(buf, binary.LittleEndian, i) 28 | if err != nil { 29 | return nil, err 30 | } 31 | return buf.Bytes(), nil 32 | } 33 | 34 | func fromLittleEndian(buf []byte) (int32, error) { 35 | var output int32 36 | bufReader := bytes.NewReader(buf) 37 | err := binary.Read(bufReader, binary.LittleEndian, &output) 38 | if err != nil { 39 | return 0, err 40 | } 41 | return output, nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/canary/canary.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.16 3 | 4 | package canary 5 | 6 | import "net/http" 7 | 8 | func GetHandler(gotWarrant *bool) func(h http.Handler) http.Handler { 9 | denyMsg := "We have not received a warrant from the US government." 10 | return GetCustomHandler(gotWarrant, denyMsg) 11 | } 12 | 13 | func GetCustomHandler(gotWarrant *bool, denyMsg string) func(h http.Handler) http.Handler { 14 | return func(h http.Handler) http.Handler { 15 | return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { 16 | if *gotWarrant { 17 | denyMsg = "" 18 | } 19 | w.Header().Set("X-Warrant-Canary", denyMsg) 20 | h.ServeHTTP(w, req) 21 | }) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/content/content.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.20 3 | 4 | package content 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/cryptag/gosecure/set" 10 | ) 11 | 12 | // GetHandler is middleware that sets the header `X-Content-Type-Options: nosniff`. 13 | func GetHandler(h http.Handler) http.Handler { 14 | return set.Header(h, "X-Content-Type-Options", "nosniff") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/frame/frame.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.20 3 | 4 | package frame 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/cryptag/gosecure/set" 10 | ) 11 | 12 | func GetHandler(origin string) func(h http.Handler) http.Handler { 13 | return func(h http.Handler) http.Handler { 14 | return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { 15 | w.Header().Set("X-Frame-Options", "ALLOW-FROM https://"+origin) 16 | w.Header().Set("Content-Security-Policy", "frame-ancestors 'self' https://"+origin) 17 | h.ServeHTTP(w, req) 18 | }) 19 | } 20 | } 21 | 22 | // SameOriginHandler is middleware that sets the header `X-Frame-Options: SAMEORIGIN`. 23 | func SameOriginHandler(h http.Handler) http.Handler { 24 | return set.Header(h, "X-Frame-Options", "SAMEORIGIN") 25 | } 26 | 27 | // DenyHandler is middleware that sets the header `X-Frame-Options: DENY`. 28 | func DenyHandler(h http.Handler) http.Handler { 29 | return set.Header(h, "X-Frame-Options", "DENY") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/hsts/hsts.go: -------------------------------------------------------------------------------- 1 | package hsts 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "github.com/cryptag/gosecure/set" 8 | ) 9 | 10 | const oneYearInSeconds = 31536000 // 365 * 24 * 60 * 60 11 | 12 | func Handler(h http.Handler) http.Handler { 13 | preload := false 14 | return CustomHandler(h, preload, oneYearInSeconds) 15 | } 16 | 17 | func PreloadHandler(h http.Handler) http.Handler { 18 | preload := true 19 | return CustomHandler(h, preload, oneYearInSeconds) 20 | } 21 | 22 | func CustomHandler(h http.Handler, preload bool, maxAgeInSecs int) http.Handler { 23 | header := fmt.Sprintf("max-age=%d; includeSubDomains", maxAgeInSecs) 24 | if preload { 25 | header += "; preload" 26 | } 27 | return set.Header(h, "Strict-Transport-Security", header) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/referrer/referrer.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.20 3 | 4 | package referrer 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/cryptag/gosecure/set" 10 | ) 11 | 12 | // NoHandler is middleware that sets the header `Referrer-Policy: no-referrer`. 13 | func NoHandler(h http.Handler) http.Handler { 14 | return set.Header(h, "Referrer-Policy", "no-referrer") 15 | } 16 | 17 | // SameOriginHandler is middleware that sets the header `Referrer-Policy: same-origin`. 18 | func SameOriginHandler(h http.Handler) http.Handler { 19 | return set.Header(h, "Referrer-Policy", "same-origin") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/set/set.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.20 3 | 4 | package set 5 | 6 | import "net/http" 7 | 8 | func Header(h http.Handler, header, value string) http.Handler { 9 | return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { 10 | w.Header().Add(header, value) 11 | h.ServeHTTP(w, req) 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/gosecure/xss/xss.go: -------------------------------------------------------------------------------- 1 | // Steve Phillips / elimisteve 2 | // 2017.03.20 3 | 4 | package xss 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/cryptag/gosecure/set" 10 | ) 11 | 12 | // GetHandler is middleware that sets the header `X-Xss-Protection: 1; mode=block`. 13 | func GetHandler(h http.Handler) http.Handler { 14 | return set.Header(h, "X-Xss-Protection", "1; mode=block") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/minishare/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /vendor/github.com/cryptag/minishare/README.md: -------------------------------------------------------------------------------- 1 | # minishare 2 | miniShare: Share files or text by sending someone a link 3 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.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 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.5.4 4 | - 1.6.3 5 | - 1.7 6 | install: 7 | - go get -v golang.org/x/tools/cmd/cover 8 | script: 9 | - go test -v -tags=safe ./spew 10 | - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov 11 | after_success: 12 | - go get -v github.com/mattn/goveralls 13 | - export PATH=$PATH:$HOME/gopath/bin 14 | - goveralls -coverprofile=profile.cov -service=travis-ci 15 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/cov_report.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script uses gocov to generate a test coverage report. 4 | # The gocov tool my be obtained with the following command: 5 | # go get github.com/axw/gocov/gocov 6 | # 7 | # It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. 8 | 9 | # Check for gocov. 10 | if ! type gocov >/dev/null 2>&1; then 11 | echo >&2 "This script requires the gocov tool." 12 | echo >&2 "You may obtain it with the following command:" 13 | echo >&2 "go get github.com/axw/gocov/gocov" 14 | exit 1 15 | fi 16 | 17 | # Only run the cgo tests if gcc is installed. 18 | if type gcc >/dev/null 2>&1; then 19 | (cd spew && gocov test -tags testcgo | gocov report) 20 | else 21 | (cd spew && gocov test | gocov report) 22 | fi 23 | -------------------------------------------------------------------------------- /vendor/github.com/dchest/blake2s/README: -------------------------------------------------------------------------------- 1 | Go implementation of BLAKE2s collision-resistant cryptographic hash function 2 | created by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and 3 | Christian Winnerlein (https://blake2.net). 4 | 5 | INSTALLATION 6 | 7 | $ go get github.com/dchest/blake2s 8 | 9 | 10 | DOCUMENTATION 11 | 12 | See http://godoc.org/github.com/dchest/blake2s 13 | 14 | 15 | PUBLIC DOMAIN DEDICATION 16 | 17 | Written in 2012 by Dmitry Chestnykh. 18 | 19 | To the extent possible under law, the author have dedicated all copyright 20 | and related and neighboring rights to this software to the public domain 21 | worldwide. This software is distributed without any warranty. 22 | http://creativecommons.org/publicdomain/zero/1.0/ 23 | 24 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.3 7 | - go: 1.4 8 | - go: 1.5 9 | - go: 1.6 10 | - go: tip 11 | 12 | install: 13 | - go get golang.org/x/tools/cmd/vet 14 | 15 | script: 16 | - go get -t -v ./... 17 | - diff -u <(echo -n) <(gofmt -d .) 18 | - go tool vet . 19 | - go test -v -race ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.5 7 | - go: 1.6 8 | - go: 1.7 9 | - go: 1.8 10 | - go: 1.9 11 | - go: tip 12 | allow_failures: 13 | - go: tip 14 | 15 | install: 16 | - # Skip 17 | 18 | script: 19 | - go get -t -v ./... 20 | - diff -u <(echo -n) <(gofmt -d .) 21 | - go tool vet . 22 | - go test -v -race ./... 23 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/context_gorilla.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package mux 4 | 5 | import ( 6 | "net/http" 7 | 8 | "github.com/gorilla/context" 9 | ) 10 | 11 | func contextGet(r *http.Request, key interface{}) interface{} { 12 | return context.Get(r, key) 13 | } 14 | 15 | func contextSet(r *http.Request, key, val interface{}) *http.Request { 16 | if val == nil { 17 | return r 18 | } 19 | 20 | context.Set(r, key, val) 21 | return r 22 | } 23 | 24 | func contextClear(r *http.Request) { 25 | context.Clear(r) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/context_gorilla_test.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package mux 4 | 5 | import ( 6 | "net/http" 7 | "testing" 8 | 9 | "github.com/gorilla/context" 10 | ) 11 | 12 | // Tests that the context is cleared or not cleared properly depending on 13 | // the configuration of the router 14 | func TestKeepContext(t *testing.T) { 15 | func1 := func(w http.ResponseWriter, r *http.Request) {} 16 | 17 | r := NewRouter() 18 | r.HandleFunc("/", func1).Name("func1") 19 | 20 | req, _ := http.NewRequest("GET", "http://localhost/", nil) 21 | context.Set(req, "t", 1) 22 | 23 | res := new(http.ResponseWriter) 24 | r.ServeHTTP(*res, req) 25 | 26 | if _, ok := context.GetOk(req, "t"); ok { 27 | t.Error("Context should have been cleared at end of request") 28 | } 29 | 30 | r.KeepContext = true 31 | 32 | req, _ = http.NewRequest("GET", "http://localhost/", nil) 33 | context.Set(req, "t", 1) 34 | 35 | r.ServeHTTP(*res, req) 36 | if _, ok := context.GetOk(req, "t"); !ok { 37 | t.Error("Context should NOT have been cleared at end of request") 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/context_native.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package mux 4 | 5 | import ( 6 | "context" 7 | "net/http" 8 | ) 9 | 10 | func contextGet(r *http.Request, key interface{}) interface{} { 11 | return r.Context().Value(key) 12 | } 13 | 14 | func contextSet(r *http.Request, key, val interface{}) *http.Request { 15 | if val == nil { 16 | return r 17 | } 18 | 19 | return r.WithContext(context.WithValue(r.Context(), key, val)) 20 | } 21 | 22 | func contextClear(r *http.Request) { 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/context_native_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package mux 4 | 5 | import ( 6 | "context" 7 | "net/http" 8 | "testing" 9 | "time" 10 | ) 11 | 12 | func TestNativeContextMiddleware(t *testing.T) { 13 | withTimeout := func(h http.Handler) http.Handler { 14 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | ctx, cancel := context.WithTimeout(r.Context(), time.Minute) 16 | defer cancel() 17 | h.ServeHTTP(w, r.WithContext(ctx)) 18 | }) 19 | } 20 | 21 | r := NewRouter() 22 | r.Handle("/path/{foo}", withTimeout(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 23 | vars := Vars(r) 24 | if vars["foo"] != "bar" { 25 | t.Fatal("Expected foo var to be set") 26 | } 27 | }))) 28 | 29 | rec := NewRecorder() 30 | req := newRequest("GET", "/path/bar") 31 | r.ServeHTTP(rec, req) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.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 | 24 | .idea/ 25 | *.iml -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.4 7 | - go: 1.5 8 | - go: 1.6 9 | - go: 1.7 10 | - go: 1.8 11 | - go: tip 12 | allow_failures: 13 | - go: tip 14 | 15 | script: 16 | - go get -t -v ./... 17 | - diff -u <(echo -n) <(gofmt -d .) 18 | - go vet $(go list ./... | grep -v /vendor/) 19 | - go test -v -race ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/client_clone.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket 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 go1.8 6 | 7 | package websocket 8 | 9 | import "crypto/tls" 10 | 11 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 12 | if cfg == nil { 13 | return &tls.Config{} 14 | } 15 | return cfg.Clone() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/conn_read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket 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 go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | c.br.Discard(len(p)) 17 | return p, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/conn_read_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket 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 !go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | if len(p) > 0 { 17 | // advance over the bytes just read 18 | io.ReadFull(c.br, p) 19 | } 20 | return p, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/autobahn/README.md: -------------------------------------------------------------------------------- 1 | # Test Server 2 | 3 | This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite). 4 | 5 | To test the server, run 6 | 7 | go run server.go 8 | 9 | and start the client test driver 10 | 11 | wstest -m fuzzingclient -s fuzzingclient.json 12 | 13 | When the client completes, it writes a report to reports/clients/index.html. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "options": {"failByDrop": false}, 4 | "outdir": "./reports/clients", 5 | "servers": [ 6 | {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}}, 7 | {"agent": "ReadAllWritePreparedMessage", "url": "ws://localhost:9000/p", "options": {"version": 18}}, 8 | {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}}, 9 | {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}}, 10 | {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}} 11 | ], 12 | "cases": ["*"], 13 | "exclude-cases": [], 14 | "exclude-agent-cases": {} 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/chat/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket 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 main 6 | 7 | import ( 8 | "flag" 9 | "log" 10 | "net/http" 11 | ) 12 | 13 | var addr = flag.String("addr", ":8080", "http service address") 14 | 15 | func serveHome(w http.ResponseWriter, r *http.Request) { 16 | log.Println(r.URL) 17 | if r.URL.Path != "/" { 18 | http.Error(w, "Not found", 404) 19 | return 20 | } 21 | if r.Method != "GET" { 22 | http.Error(w, "Method not allowed", 405) 23 | return 24 | } 25 | http.ServeFile(w, r, "home.html") 26 | } 27 | 28 | func main() { 29 | flag.Parse() 30 | hub := newHub() 31 | go hub.run() 32 | http.HandleFunc("/", serveHome) 33 | http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) { 34 | serveWs(hub, w, r) 35 | }) 36 | err := http.ListenAndServe(*addr, nil) 37 | if err != nil { 38 | log.Fatal("ListenAndServe: ", err) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/command/README.md: -------------------------------------------------------------------------------- 1 | # Command example 2 | 3 | This example connects a websocket connection to stdin and stdout of a command. 4 | Received messages are written to stdin followed by a `\n`. Each line read from 5 | standard out is sent as a message to the client. 6 | 7 | $ go get github.com/gorilla/websocket 8 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command` 9 | $ go run main.go 10 | # Open http://localhost:8080/ . 11 | 12 | Try the following commands. 13 | 14 | # Echo sent messages to the output area. 15 | $ go run main.go cat 16 | 17 | # Run a shell.Try sending "ls" and "cat main.go". 18 | $ go run main.go sh 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/echo/README.md: -------------------------------------------------------------------------------- 1 | # Client and server example 2 | 3 | This example shows a simple client and server. 4 | 5 | The server echoes messages sent to it. The client sends a message every second 6 | and prints all messages received. 7 | 8 | To run the example, start the server: 9 | 10 | $ go run server.go 11 | 12 | Next, start the client: 13 | 14 | $ go run client.go 15 | 16 | The server includes a simple web client. To use the client, open 17 | http://127.0.0.1:8080 in the browser and follow the instructions on the page. 18 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/filewatch/README.md: -------------------------------------------------------------------------------- 1 | # File Watch example. 2 | 3 | This example sends a file to the browser client for display whenever the file is modified. 4 | 5 | $ go get github.com/gorilla/websocket 6 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` 7 | $ go run main.go 8 | # Open http://localhost:8080/ . 9 | # Modify the file to see it update in the browser. 10 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/mask_safe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of 2 | // this source code is governed by a BSD-style license that can be found in the 3 | // LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package websocket 8 | 9 | func maskBytes(key [4]byte, pos int, b []byte) int { 10 | for i := range b { 11 | b[i] ^= key[pos&3] 12 | pos++ 13 | } 14 | return pos & 3 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/justinas/alice/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | include: 5 | - go: 1.0.x 6 | - go: 1.1.x 7 | - go: 1.2.x 8 | - go: 1.3.x 9 | - go: 1.4.x 10 | - go: 1.5.x 11 | - go: 1.6.x 12 | - go: 1.7.x 13 | - go: 1.8.x 14 | - go: 1.9.x 15 | - go: tip 16 | allow_failures: 17 | - go: tip 18 | -------------------------------------------------------------------------------- /vendor/github.com/nu7hatch/gouuid/.gitignore: -------------------------------------------------------------------------------- 1 | _obj 2 | _test 3 | *.6 4 | *.out 5 | _testmain.go 6 | \#* 7 | .\#* 8 | *.log 9 | _cgo* 10 | *.o 11 | *.a 12 | -------------------------------------------------------------------------------- /vendor/github.com/nu7hatch/gouuid/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Krzysztof Kowalik 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | 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 THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/nu7hatch/gouuid/README.md: -------------------------------------------------------------------------------- 1 | # Pure Go UUID implementation 2 | 3 | This package provides immutable UUID structs and the functions 4 | NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 5 | and 5 UUIDs as specified in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt). 6 | 7 | ## Installation 8 | 9 | Use the `go` tool: 10 | 11 | $ go get github.com/nu7hatch/gouuid 12 | 13 | ## Usage 14 | 15 | See [documentation and examples](http://godoc.org/github.com/nu7hatch/gouuid) 16 | for more information. 17 | 18 | ## Copyright 19 | 20 | Copyright (C) 2011 by Krzysztof Kowalik . See [COPYING](https://github.com/nu7hatch/gouuid/tree/master/COPYING) 21 | file for details. 22 | -------------------------------------------------------------------------------- /vendor/github.com/nu7hatch/gouuid/example_test.go: -------------------------------------------------------------------------------- 1 | package uuid_test 2 | 3 | import ( 4 | "fmt" 5 | "github.com/nu7hatch/gouuid" 6 | ) 7 | 8 | func ExampleNewV4() { 9 | u4, err := uuid.NewV4() 10 | if err != nil { 11 | fmt.Println("error:", err) 12 | return 13 | } 14 | fmt.Println(u4) 15 | } 16 | 17 | func ExampleNewV5() { 18 | u5, err := uuid.NewV5(uuid.NamespaceURL, []byte("nu7hat.ch")) 19 | if err != nil { 20 | fmt.Println("error:", err) 21 | return 22 | } 23 | fmt.Println(u5) 24 | } 25 | 26 | func ExampleParseHex() { 27 | u, err := uuid.ParseHex("6ba7b810-9dad-11d1-80b4-00c04fd430c8") 28 | if err != nil { 29 | fmt.Println("error:", err) 30 | return 31 | } 32 | fmt.Println(u) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/pmezard/go-difflib/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.5 4 | - tip 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.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 | 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.travis.gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$(gofmt -l .)" ]; then 4 | echo "Go code is not formatted:" 5 | gofmt -d . 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.travis.gogenerate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$TRAVIS_GO_VERSION" =~ ^1\.[45](\..*)?$ ]]; then 4 | exit 0 5 | fi 6 | 7 | go get github.com/ernesto-jimenez/gogen/imports 8 | go generate ./... 9 | if [ -n "$(git diff)" ]; then 10 | echo "Go generate had not been run" 11 | git diff 12 | exit 1 13 | fi 14 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.travis.govet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | DIRS=". assert require mock _codegen" 5 | set -e 6 | for subdir in $DIRS; do 7 | pushd $subdir 8 | go vet 9 | popd 10 | done 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.7 7 | - 1.8 8 | - 1.9 9 | - tip 10 | 11 | script: 12 | - ./.travis.gogenerate.sh 13 | - ./.travis.gofmt.sh 14 | - ./.travis.govet.sh 15 | - go test -v -race ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/davecgh/go-spew" 6 | packages = ["spew"] 7 | revision = "346938d642f2ec3594ed81d874461961cd0faa76" 8 | version = "v1.1.0" 9 | 10 | [[projects]] 11 | name = "github.com/pmezard/go-difflib" 12 | packages = ["difflib"] 13 | revision = "d8ed2627bdf02c080bf22230dbb337003b7aba2d" 14 | 15 | [[projects]] 16 | name = "github.com/stretchr/objx" 17 | packages = ["."] 18 | revision = "cbeaeb16a013161a98496fad62933b1d21786672" 19 | 20 | [solve-meta] 21 | analyzer-name = "dep" 22 | analyzer-version = 1 23 | inputs-digest = "6bd8fb1f11a0d3df245fc01bd8853f6dac40b83457e780f7978ca30244647c7b" 24 | solver-name = "gps-cdcl" 25 | solver-version = 1 26 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/davecgh/go-spew" 26 | version = ">=1.0.0, <=3.0.0-g6d21280" 27 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/doc.go: -------------------------------------------------------------------------------- 1 | // Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend. 2 | // 3 | // testify contains the following packages: 4 | // 5 | // The assert package provides a comprehensive set of assertion functions that tie in to the Go testing system. 6 | // 7 | // The http package contains tools to make it easier to test http activity using the Go testing system. 8 | // 9 | // The mock package provides a system by which it is possible to mock your objects and verify calls are happening as expected. 10 | // 11 | // The suite package provides a basic structure for using structs as testing suites, and methods on those structs as tests. It includes setup/teardown functionality in the way of interfaces. 12 | package testify 13 | 14 | // blank imports help docs. 15 | import ( 16 | // assert package 17 | _ "github.com/stretchr/testify/assert" 18 | // http package 19 | _ "github.com/stretchr/testify/http" 20 | // mock package 21 | _ "github.com/stretchr/testify/mock" 22 | ) 23 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/http/doc.go: -------------------------------------------------------------------------------- 1 | // Package http DEPRECATED USE net/http/httptest 2 | package http 3 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/http/test_round_tripper.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | "net/http" 6 | ) 7 | 8 | // TestRoundTripper DEPRECATED USE net/http/httptest 9 | type TestRoundTripper struct { 10 | mock.Mock 11 | } 12 | 13 | // RoundTrip DEPRECATED USE net/http/httptest 14 | func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { 15 | args := t.Called(req) 16 | return args.Get(0).(*http.Response), args.Error(1) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/package_test.go: -------------------------------------------------------------------------------- 1 | package testify 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestImports(t *testing.T) { 9 | if assert.Equal(t, 1, 1) != true { 10 | t.Error("Something is wrong.") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/doc.go: -------------------------------------------------------------------------------- 1 | // Package require implements the same assertions as the `assert` package but 2 | // stops test execution when a test fails. 3 | // 4 | // Example Usage 5 | // 6 | // The following is a complete example using require in a standard test function: 7 | // import ( 8 | // "testing" 9 | // "github.com/stretchr/testify/require" 10 | // ) 11 | // 12 | // func TestSomething(t *testing.T) { 13 | // 14 | // var a string = "Hello" 15 | // var b string = "Hello" 16 | // 17 | // require.Equal(t, a, b, "The two words should be the same.") 18 | // 19 | // } 20 | // 21 | // Assertions 22 | // 23 | // The `require` package have same global functions as in the `assert` package, 24 | // but instead of returning a boolean result they call `t.FailNow()`. 25 | // 26 | // Every assertion function also takes an optional string message as the final argument, 27 | // allowing custom error messages to be appended to the message the assertion method outputs. 28 | package require 29 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/forward_requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl -include-format-funcs 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { 4 | t.FailNow() 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // TestingT is an interface wrapper around *testing.T 4 | type TestingT interface { 5 | Errorf(format string, args ...interface{}) 6 | FailNow() 7 | } 8 | 9 | //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/README.md: -------------------------------------------------------------------------------- 1 | # Go Cryptography 2 | 3 | This repository holds supplementary Go cryptography libraries. 4 | 5 | ## Download/Install 6 | 7 | The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You 8 | can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. 9 | 10 | ## Report Issues / Send Patches 11 | 12 | This repository uses Gerrit for code changes. To learn how to submit changes to 13 | this repository, see https://golang.org/doc/contribute.html. 14 | 15 | The main issue tracker for the crypto repository is located at 16 | https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the 17 | subject line, so it is easy to find. 18 | 19 | Note that contributions to the cryptography package receive additional scrutiny 20 | due to their sensitive nature. Patches may take longer than normal to receive 21 | feedback. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/acme/autocert/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package autocert_test 6 | 7 | import ( 8 | "crypto/tls" 9 | "fmt" 10 | "log" 11 | "net/http" 12 | 13 | "golang.org/x/crypto/acme/autocert" 14 | ) 15 | 16 | func ExampleNewListener() { 17 | mux := http.NewServeMux() 18 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 19 | fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS) 20 | }) 21 | log.Fatal(http.Serve(autocert.NewListener("example.com"), mux)) 22 | } 23 | 24 | func ExampleManager() { 25 | m := &autocert.Manager{ 26 | Cache: autocert.DirCache("secret-dir"), 27 | Prompt: autocert.AcceptTOS, 28 | HostPolicy: autocert.HostWhitelist("example.org"), 29 | } 30 | go http.ListenAndServe(":http", m.HTTPHandler(nil)) 31 | s := &http.Server{ 32 | Addr: ":https", 33 | TLSConfig: &tls.Config{GetCertificate: m.GetCertificate}, 34 | } 35 | s.ListenAndServeTLS("", "") 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/argon2/blamka_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64 appengine gccgo 6 | 7 | package argon2 8 | 9 | func processBlock(out, in1, in2 *block) { 10 | processBlockGeneric(out, in1, in2, false) 11 | } 12 | 13 | func processBlockXOR(out, in1, in2 *block) { 14 | processBlockGeneric(out, in1, in2, true) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.7,amd64,!gccgo,!appengine 6 | 7 | package blake2b 8 | 9 | func init() { 10 | useSSE4 = supportsSSE4() 11 | } 12 | 13 | //go:noescape 14 | func supportsSSE4() bool 15 | 16 | //go:noescape 17 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 18 | 19 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 20 | if useSSE4 { 21 | hashBlocksSSE4(h, c, flag, blocks) 22 | } else { 23 | hashBlocksGeneric(h, c, flag, blocks) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64 appengine gccgo 6 | 7 | package blake2b 8 | 9 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 10 | hashBlocksGeneric(h, c, flag, blocks) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package blake2b 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | newHash384 := func() hash.Hash { 20 | h, _ := New384(nil) 21 | return h 22 | } 23 | 24 | newHash512 := func() hash.Hash { 25 | h, _ := New512(nil) 26 | return h 27 | } 28 | 29 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) 30 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) 31 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = false 11 | useSSSE3 = supportSSSE3() 12 | useSSE2 = supportSSE2() 13 | ) 14 | 15 | //go:noescape 16 | func supportSSE2() bool 17 | 18 | //go:noescape 19 | func supportSSSE3() bool 20 | 21 | //go:noescape 22 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 23 | 24 | //go:noescape 25 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 26 | 27 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 28 | if useSSSE3 { 29 | hashBlocksSSSE3(h, c, flag, blocks) 30 | } else if useSSE2 { 31 | hashBlocksSSE2(h, c, flag, blocks) 32 | } else { 33 | hashBlocksGeneric(h, c, flag, blocks) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = supportSSE4() 11 | useSSSE3 = supportSSSE3() 12 | useSSE2 = true // Always available on amd64 13 | ) 14 | 15 | //go:noescape 16 | func supportSSSE3() bool 17 | 18 | //go:noescape 19 | func supportSSE4() bool 20 | 21 | //go:noescape 22 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 23 | 24 | //go:noescape 25 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 26 | 27 | //go:noescape 28 | func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 29 | 30 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 31 | if useSSE4 { 32 | hashBlocksSSE4(h, c, flag, blocks) 33 | } else if useSSSE3 { 34 | hashBlocksSSSE3(h, c, flag, blocks) 35 | } else if useSSE2 { 36 | hashBlocksSSE2(h, c, flag, blocks) 37 | } else { 38 | hashBlocksGeneric(h, c, flag, blocks) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64,!386 gccgo appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = false 11 | useSSSE3 = false 12 | useSSE2 = false 13 | ) 14 | 15 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 16 | hashBlocksGeneric(h, c, flag, blocks) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package blake2s 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | 20 | crypto.RegisterHash(crypto.BLAKE2s_256, newHash256) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64 !go1.7 gccgo appengine 6 | 7 | package chacha20poly1305 8 | 9 | func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte { 10 | return c.sealGeneric(dst, nonce, plaintext, additionalData) 11 | } 12 | 13 | func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { 14 | return c.openGeneric(dst, nonce, ciphertext, additionalData) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.h: -------------------------------------------------------------------------------- 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 code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | #define REDMASK51 0x0007FFFFFFFFFFFF 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | // These constants cannot be encoded in non-MOVQ immediates. 11 | // We access them directly from memory instead. 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/curve25519_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 | package curve25519 6 | 7 | import ( 8 | "fmt" 9 | "testing" 10 | ) 11 | 12 | const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a" 13 | 14 | func TestBaseScalarMult(t *testing.T) { 15 | var a, b [32]byte 16 | in := &a 17 | out := &b 18 | a[0] = 1 19 | 20 | for i := 0; i < 200; i++ { 21 | ScalarBaseMult(out, in) 22 | in, out = out, in 23 | } 24 | 25 | result := fmt.Sprintf("%x", in[:]) 26 | if result != expectedHex { 27 | t.Errorf("incorrect result: got %s, want %s", result, expectedHex) 28 | } 29 | } 30 | 31 | func BenchmarkScalarBaseMult(b *testing.B) { 32 | var in, out [32]byte 33 | in[0] = 1 34 | 35 | b.SetBytes(32) 36 | for i := 0; i < b.N; i++ { 37 | ScalarBaseMult(&out, &in) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/doc.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 | // Package curve25519 provides an implementation of scalar multiplication on 6 | // the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html 7 | package curve25519 // import "golang.org/x/crypto/curve25519" 8 | 9 | // basePoint is the x coordinate of the generator of the curve. 10 | var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} 11 | 12 | // ScalarMult sets dst to the product in*base where dst and base are the x 13 | // coordinates of group points and all values are in little-endian form. 14 | func ScalarMult(dst, in, base *[32]byte) { 15 | scalarMult(dst, in, base) 16 | } 17 | 18 | // ScalarBaseMult sets dst to the product in*base where dst and base are the x 19 | // coordinates of group points, base is the standard generator and all values 20 | // are in little-endian form. 21 | func ScalarBaseMult(dst, in *[32]byte) { 22 | ScalarMult(dst, in, &basePoint) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/chacha20/chacha_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package chacha20 6 | 7 | import ( 8 | "encoding/hex" 9 | "testing" 10 | ) 11 | 12 | func TestCore(t *testing.T) { 13 | // This is just a smoke test that checks the example from 14 | // https://tools.ietf.org/html/rfc7539#section-2.3.2. The 15 | // chacha20poly1305 package contains much more extensive tests of this 16 | // code. 17 | var key [32]byte 18 | for i := range key { 19 | key[i] = byte(i) 20 | } 21 | 22 | var input [16]byte 23 | input[0] = 1 24 | input[7] = 9 25 | input[11] = 0x4a 26 | 27 | var out [64]byte 28 | XORKeyStream(out[:], out[:], &input, &key) 29 | const expected = "10f1e7e4d13b5915500fdd1fa32071c4c7d1f4c733c068030422aa9ac3d46c4ed2826446079faa0914c2d705d98b02a2b5129cd1de164eb9cbd083e8a2503c4e" 30 | if result := hex.EncodeToString(out[:]); result != expected { 31 | t.Errorf("wanted %x but got %x", expected, result) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/md4/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package md4_test 6 | 7 | import ( 8 | "fmt" 9 | "io" 10 | 11 | "golang.org/x/crypto/md4" 12 | ) 13 | 14 | func ExampleNew() { 15 | h := md4.New() 16 | data := "These pretzels are making me thirsty." 17 | io.WriteString(h, data) 18 | fmt.Printf("%x", h.Sum(nil)) 19 | // Output: 48c4e365090b30a32f084c4888deceaa 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/openpgp/packet/compressed_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 packet 6 | 7 | import ( 8 | "bytes" 9 | "encoding/hex" 10 | "io" 11 | "io/ioutil" 12 | "testing" 13 | ) 14 | 15 | func TestCompressed(t *testing.T) { 16 | packet, err := Read(readerFromHex(compressedHex)) 17 | if err != nil { 18 | t.Errorf("failed to read Compressed: %s", err) 19 | return 20 | } 21 | 22 | c, ok := packet.(*Compressed) 23 | if !ok { 24 | t.Error("didn't find Compressed packet") 25 | return 26 | } 27 | 28 | contents, err := ioutil.ReadAll(c.Body) 29 | if err != nil && err != io.EOF { 30 | t.Error(err) 31 | return 32 | } 33 | 34 | expected, _ := hex.DecodeString(compressedExpectedHex) 35 | if !bytes.Equal(expected, contents) { 36 | t.Errorf("got:%x want:%x", contents, expected) 37 | } 38 | } 39 | 40 | const compressedHex = "a3013b2d90c4e02b72e25f727e5e496a5e49b11e1700" 41 | const compressedExpectedHex = "cb1062004d14c8fe636f6e74656e74732e0a" 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/errors.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 | package pkcs12 6 | 7 | import "errors" 8 | 9 | var ( 10 | // ErrDecryption represents a failure to decrypt the input. 11 | ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") 12 | 13 | // ErrIncorrectPassword is returned when an incorrect password is detected. 14 | // Usually, P12/PFX data is signed to be able to verify the password. 15 | ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") 16 | ) 17 | 18 | // NotImplementedError indicates that the input is not currently supported. 19 | type NotImplementedError string 20 | 21 | func (e NotImplementedError) Error() string { 22 | return "pkcs12: " + string(e) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_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 | package rc2 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func BenchmarkEncrypt(b *testing.B) { 12 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 13 | b.ResetTimer() 14 | var src [8]byte 15 | for i := 0; i < b.N; i++ { 16 | r.Encrypt(src[:], src[:]) 17 | } 18 | } 19 | 20 | func BenchmarkDecrypt(b *testing.B) { 21 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 22 | b.ResetTimer() 23 | var src [8]byte 24 | for i := 0; i < b.N; i++ { 25 | r.Decrypt(src[:], src[:]) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!gccgo,!appengine 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_amd64.s 10 | //go:noescape 11 | func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305(out, mPtr, uint64(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_arm.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 arm,!gccgo,!appengine,!nacl 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_arm.s 10 | //go:noescape 11 | func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | package salsa 8 | 9 | // This function is implemented in salsa2020_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out must overlap entirely or not at all. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | _ = out[len(in)-1] 23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/scrypt/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scrypt_test 6 | 7 | import ( 8 | "encoding/base64" 9 | "fmt" 10 | "log" 11 | 12 | "golang.org/x/crypto/scrypt" 13 | ) 14 | 15 | func Example() { 16 | // DO NOT use this salt value; generate your own random salt. 8 bytes is 17 | // a good length. 18 | salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b} 19 | 20 | dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32) 21 | if err != nil { 22 | log.Fatal(err) 23 | } 24 | fmt.Println(base64.StdEncoding.EncodeToString(dk)) 25 | // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M= 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/keccakf_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | package sha3 8 | 9 | // This function is implemented in keccakf_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func keccakF1600(a *[25]uint64) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package sha3 8 | 9 | import ( 10 | "crypto" 11 | ) 12 | 13 | func init() { 14 | crypto.RegisterHash(crypto.SHA3_224, New224) 15 | crypto.RegisterHash(crypto.SHA3_256, New256) 16 | crypto.RegisterHash(crypto.SHA3_384, New384) 17 | crypto.RegisterHash(crypto.SHA3_512, New512) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PursuanceProject/pursuance/179b502c1a4fe65f4468beb7cc9797b66e151abf/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor.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 !amd64,!386,!ppc64le appengine 6 | 7 | package sha3 8 | 9 | var ( 10 | xorIn = xorInGeneric 11 | copyOut = copyOutGeneric 12 | xorInUnaligned = xorInGeneric 13 | copyOutUnaligned = copyOutGeneric 14 | ) 15 | 16 | const xorImplementationUnaligned = "generic" 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor_generic.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 | package sha3 6 | 7 | import "encoding/binary" 8 | 9 | // xorInGeneric xors the bytes in buf into the state; it 10 | // makes no non-portable assumptions about memory layout 11 | // or alignment. 12 | func xorInGeneric(d *state, buf []byte) { 13 | n := len(buf) / 8 14 | 15 | for i := 0; i < n; i++ { 16 | a := binary.LittleEndian.Uint64(buf) 17 | d.a[i] ^= a 18 | buf = buf[8:] 19 | } 20 | } 21 | 22 | // copyOutGeneric copies ulint64s to a byte buffer. 23 | func copyOutGeneric(d *state, b []byte) { 24 | for i := 0; len(b) >= 8; i++ { 25 | binary.LittleEndian.PutUint64(b, d.a[i]) 26 | b = b[8:] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/agent/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package agent_test 6 | 7 | import ( 8 | "log" 9 | "net" 10 | "os" 11 | 12 | "golang.org/x/crypto/ssh" 13 | "golang.org/x/crypto/ssh/agent" 14 | ) 15 | 16 | func ExampleClientAgent() { 17 | // ssh-agent has a UNIX socket under $SSH_AUTH_SOCK 18 | socket := os.Getenv("SSH_AUTH_SOCK") 19 | conn, err := net.Dial("unix", socket) 20 | if err != nil { 21 | log.Fatalf("net.Dial: %v", err) 22 | } 23 | agentClient := agent.NewClient(conn) 24 | config := &ssh.ClientConfig{ 25 | User: "username", 26 | Auth: []ssh.AuthMethod{ 27 | // Use a callback rather than PublicKeys 28 | // so we only consult the agent once the remote server 29 | // wants it. 30 | ssh.PublicKeysCallback(agentClient.Signers), 31 | }, 32 | HostKeyCallback: ssh.InsecureIgnoreHostKey(), 33 | } 34 | 35 | sshc, err := ssh.Dial("tcp", "localhost:22", config) 36 | if err != nil { 37 | log.Fatalf("Dial: %v", err) 38 | } 39 | // .. use sshc 40 | sshc.Close() 41 | } 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/doc.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 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | 18 | This package does not fall under the stability promise of the Go language itself, 19 | so its API may be changed when pressing needs arise. 20 | */ 21 | package ssh // import "golang.org/x/crypto/ssh" 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/tcpip_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 ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/banner_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 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package test 8 | 9 | import ( 10 | "testing" 11 | ) 12 | 13 | func TestBannerCallbackAgainstOpenSSH(t *testing.T) { 14 | server := newServer(t) 15 | defer server.Shutdown() 16 | 17 | clientConf := clientConfig() 18 | 19 | var receivedBanner string 20 | clientConf.BannerCallback = func(message string) error { 21 | receivedBanner = message 22 | return nil 23 | } 24 | 25 | conn := server.Dial(clientConf) 26 | defer conn.Close() 27 | 28 | expected := "Server Banner" 29 | if receivedBanner != expected { 30 | t.Fatalf("got %v; want %v", receivedBanner, expected) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/doc.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 | // Package test contains integration tests for the 6 | // golang.org/x/crypto/ssh package. 7 | package test // import "golang.org/x/crypto/ssh/test" 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/testdata/doc.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 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata // import "golang.org/x/crypto/ssh/testdata" 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.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 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/syscall_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build plan9 6 | 7 | package plan9_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/plan9" 13 | ) 14 | 15 | func testSetGetenv(t *testing.T, key, value string) { 16 | err := plan9.Setenv(key, value) 17 | if err != nil { 18 | t.Fatalf("Setenv failed to set %q: %v", value, err) 19 | } 20 | newvalue, found := plan9.Getenv(key) 21 | if !found { 22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) 23 | } 24 | if newvalue != value { 25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) 26 | } 27 | } 28 | 29 | func TestEnv(t *testing.T) { 30 | testSetGetenv(t, "TESTENV", "AVALUE") 31 | // make sure TESTENV gets set to "", not deleted 32 | testSetGetenv(t, "TESTENV", "") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/export_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 darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | var Itoa = itoa 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | 25 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 26 | // TODO(aram): implement this, see issue 5847. 27 | panic("unimplemented") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | 27 | func Unsetenv(key string) error { 28 | return syscall.Unsetenv(key) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/export_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 windows 6 | 7 | package registry 8 | 9 | func (k Key) SetValue(name string, valtype uint32, data []byte) error { 10 | return k.setValue(name, valtype, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.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 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/example/beep.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package main 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | // BUG(brainman): MessageBeep Windows api is broken on Windows 7, 14 | // so this example does not beep when runs as service on Windows 7. 15 | 16 | var ( 17 | beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") 18 | ) 19 | 20 | func beep() { 21 | beepFunc.Call(0xffffffff) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.c: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build !go1.3 7 | 8 | // copied from pkg/runtime 9 | typedef unsigned int uint32; 10 | typedef unsigned long long int uint64; 11 | #ifdef _64BIT 12 | typedef uint64 uintptr; 13 | #else 14 | typedef uint32 uintptr; 15 | #endif 16 | 17 | // from sys_386.s or sys_amd64.s 18 | void ·servicemain(void); 19 | 20 | void 21 | ·getServiceMain(uintptr *r) 22 | { 23 | *r = (uintptr)·servicemain; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build !go1.3 7 | 8 | package svc 9 | 10 | // from go12.c 11 | func getServiceMain(r *uintptr) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go13.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.3 7 | 8 | package svc 9 | 10 | import "unsafe" 11 | 12 | const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const 13 | 14 | // Should be a built-in for unsafe.Pointer? 15 | func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { 16 | return unsafe.Pointer(uintptr(p) + x) 17 | } 18 | 19 | // funcPC returns the entry PC of the function f. 20 | // It assumes that f is a func value. Otherwise the behavior is undefined. 21 | func funcPC(f interface{}) uintptr { 22 | return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) 23 | } 24 | 25 | // from sys_386.s and sys_amd64.s 26 | func servicectlhandler(ctl uint32) uintptr 27 | func servicemain(argc uint32, argv **uint16) 28 | 29 | func getServiceMain(r *uintptr) { 30 | *r = funcPC(servicemain) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | --------------------------------------------------------------------------------