├── .gitattributes
├── .gitignore
├── .golangci.yml
├── Makefile
├── README.md
├── cfg
└── local.toml.dist
├── cmd
└── gradebot
│ └── main.go
├── deployments
└── Dockerfile
├── docs
├── init.sql
├── ludoman.pdd
├── ludoman.sql
├── model
│ ├── common.xml
│ └── ludoman.mfd
└── pathes
│ ├── 2025-04-16-fix-pr.sql
│ ├── 2025-04-17-add-transactions.sql
│ ├── 2025-04-28-adsLimit.sql
│ ├── 2025-04-28-fix-null.sql
│ ├── 2025-04-30-add-coef.sql
│ └── 2025-04-30-add-data.sql
├── go.mod
├── go.sum
├── pkg
├── app
│ ├── app.go
│ └── conn_metrics.go
├── db
│ ├── common.go
│ ├── common_ext.go
│ ├── db.go
│ ├── filter.go
│ ├── filter_json.go
│ ├── logger.go
│ ├── model.go
│ ├── model_params.go
│ ├── model_search.go
│ ├── model_validate.go
│ └── options.go
├── embedlog
│ └── logger.go
└── ludomania
│ ├── ads_handlers.go
│ ├── blackjack_handlers.go
│ ├── bot.go
│ ├── cron.go
│ ├── extra_options_handlers.go
│ └── github.go
└── vendor
├── github.com
├── BurntSushi
│ └── toml
│ │ ├── .gitignore
│ │ ├── COPYING
│ │ ├── README.md
│ │ ├── decode.go
│ │ ├── decode_go116.go
│ │ ├── deprecated.go
│ │ ├── doc.go
│ │ ├── encode.go
│ │ ├── error.go
│ │ ├── internal
│ │ └── tz.go
│ │ ├── lex.go
│ │ ├── meta.go
│ │ ├── parse.go
│ │ ├── type_fields.go
│ │ └── type_toml.go
├── ProtonMail
│ └── go-crypto
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── bitcurves
│ │ └── bitcurve.go
│ │ ├── brainpool
│ │ ├── brainpool.go
│ │ └── rcurve.go
│ │ ├── eax
│ │ ├── eax.go
│ │ ├── eax_test_vectors.go
│ │ └── random_vectors.go
│ │ ├── internal
│ │ └── byteutil
│ │ │ └── byteutil.go
│ │ ├── ocb
│ │ ├── ocb.go
│ │ ├── random_vectors.go
│ │ ├── rfc7253_test_vectors_suite_a.go
│ │ └── rfc7253_test_vectors_suite_b.go
│ │ └── openpgp
│ │ ├── aes
│ │ └── keywrap
│ │ │ └── keywrap.go
│ │ ├── armor
│ │ ├── armor.go
│ │ └── encode.go
│ │ ├── canonical_text.go
│ │ ├── ecdh
│ │ └── ecdh.go
│ │ ├── ecdsa
│ │ └── ecdsa.go
│ │ ├── eddsa
│ │ └── eddsa.go
│ │ ├── elgamal
│ │ └── elgamal.go
│ │ ├── errors
│ │ └── errors.go
│ │ ├── internal
│ │ ├── algorithm
│ │ │ ├── aead.go
│ │ │ ├── cipher.go
│ │ │ └── hash.go
│ │ ├── ecc
│ │ │ ├── curve25519.go
│ │ │ ├── curve_info.go
│ │ │ ├── curves.go
│ │ │ ├── ed25519.go
│ │ │ ├── ed448.go
│ │ │ ├── generic.go
│ │ │ └── x448.go
│ │ └── encoding
│ │ │ ├── encoding.go
│ │ │ ├── mpi.go
│ │ │ └── oid.go
│ │ ├── key_generation.go
│ │ ├── keys.go
│ │ ├── keys_test_data.go
│ │ ├── packet
│ │ ├── aead_config.go
│ │ ├── aead_crypter.go
│ │ ├── aead_encrypted.go
│ │ ├── compressed.go
│ │ ├── config.go
│ │ ├── encrypted_key.go
│ │ ├── literal.go
│ │ ├── notation.go
│ │ ├── ocfb.go
│ │ ├── one_pass_signature.go
│ │ ├── opaque.go
│ │ ├── packet.go
│ │ ├── private_key.go
│ │ ├── private_key_test_data.go
│ │ ├── public_key.go
│ │ ├── public_key_test_data.go
│ │ ├── reader.go
│ │ ├── signature.go
│ │ ├── symmetric_key_encrypted.go
│ │ ├── symmetrically_encrypted.go
│ │ ├── symmetrically_encrypted_aead.go
│ │ ├── symmetrically_encrypted_mdc.go
│ │ ├── userattribute.go
│ │ └── userid.go
│ │ ├── read.go
│ │ ├── read_write_test_data.go
│ │ ├── s2k
│ │ └── s2k.go
│ │ └── write.go
├── beorn7
│ └── perks
│ │ ├── LICENSE
│ │ └── quantile
│ │ ├── exampledata.txt
│ │ └── stream.go
├── cespare
│ └── xxhash
│ │ └── v2
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── xxhash.go
│ │ ├── xxhash_amd64.go
│ │ ├── xxhash_amd64.s
│ │ ├── xxhash_other.go
│ │ ├── xxhash_safe.go
│ │ └── xxhash_unsafe.go
├── cloudflare
│ └── circl
│ │ ├── LICENSE
│ │ ├── dh
│ │ ├── x25519
│ │ │ ├── curve.go
│ │ │ ├── curve_amd64.go
│ │ │ ├── curve_amd64.h
│ │ │ ├── curve_amd64.s
│ │ │ ├── curve_generic.go
│ │ │ ├── curve_noasm.go
│ │ │ ├── doc.go
│ │ │ ├── key.go
│ │ │ └── table.go
│ │ └── x448
│ │ │ ├── curve.go
│ │ │ ├── curve_amd64.go
│ │ │ ├── curve_amd64.h
│ │ │ ├── curve_amd64.s
│ │ │ ├── curve_generic.go
│ │ │ ├── curve_noasm.go
│ │ │ ├── doc.go
│ │ │ ├── key.go
│ │ │ └── table.go
│ │ ├── ecc
│ │ └── goldilocks
│ │ │ ├── constants.go
│ │ │ ├── curve.go
│ │ │ ├── isogeny.go
│ │ │ ├── point.go
│ │ │ ├── scalar.go
│ │ │ ├── twist.go
│ │ │ ├── twistPoint.go
│ │ │ ├── twistTables.go
│ │ │ └── twist_basemult.go
│ │ ├── internal
│ │ ├── conv
│ │ │ └── conv.go
│ │ └── sha3
│ │ │ ├── doc.go
│ │ │ ├── hashes.go
│ │ │ ├── keccakf.go
│ │ │ ├── rc.go
│ │ │ ├── sha3.go
│ │ │ ├── sha3_s390x.s
│ │ │ ├── shake.go
│ │ │ ├── xor.go
│ │ │ ├── xor_generic.go
│ │ │ └── xor_unaligned.go
│ │ ├── math
│ │ ├── fp25519
│ │ │ ├── fp.go
│ │ │ ├── fp_amd64.go
│ │ │ ├── fp_amd64.h
│ │ │ ├── fp_amd64.s
│ │ │ ├── fp_generic.go
│ │ │ └── fp_noasm.go
│ │ ├── fp448
│ │ │ ├── fp.go
│ │ │ ├── fp_amd64.go
│ │ │ ├── fp_amd64.h
│ │ │ ├── fp_amd64.s
│ │ │ ├── fp_generic.go
│ │ │ ├── fp_noasm.go
│ │ │ └── fuzzer.go
│ │ ├── mlsbset
│ │ │ ├── mlsbset.go
│ │ │ └── power.go
│ │ └── wnaf.go
│ │ └── sign
│ │ ├── ed25519
│ │ ├── ed25519.go
│ │ ├── modular.go
│ │ ├── mult.go
│ │ ├── point.go
│ │ ├── pubkey.go
│ │ ├── pubkey112.go
│ │ ├── signapi.go
│ │ └── tables.go
│ │ ├── ed448
│ │ ├── ed448.go
│ │ └── signapi.go
│ │ └── sign.go
├── codemodus
│ └── kace
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── kace.go
│ │ └── ktrie
│ │ └── ktrie.go
├── go-pg
│ ├── pg
│ │ └── v10
│ │ │ ├── .golangci.yml
│ │ │ ├── .prettierrc
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── base.go
│ │ │ ├── db.go
│ │ │ ├── doc.go
│ │ │ ├── error.go
│ │ │ ├── hook.go
│ │ │ ├── internal
│ │ │ ├── context.go
│ │ │ ├── error.go
│ │ │ ├── internal.go
│ │ │ ├── log.go
│ │ │ ├── parser
│ │ │ │ ├── parser.go
│ │ │ │ └── streaming_parser.go
│ │ │ ├── pool
│ │ │ │ ├── conn.go
│ │ │ │ ├── pool.go
│ │ │ │ ├── pool_single.go
│ │ │ │ ├── pool_sticky.go
│ │ │ │ ├── reader.go
│ │ │ │ ├── reader_buf.go
│ │ │ │ ├── reader_bytes.go
│ │ │ │ └── write_buffer.go
│ │ │ ├── safe.go
│ │ │ ├── strconv.go
│ │ │ ├── underscore.go
│ │ │ ├── unsafe.go
│ │ │ └── util.go
│ │ │ ├── listener.go
│ │ │ ├── messages.go
│ │ │ ├── options.go
│ │ │ ├── orm
│ │ │ ├── composite.go
│ │ │ ├── composite_create.go
│ │ │ ├── composite_drop.go
│ │ │ ├── composite_parser.go
│ │ │ ├── count_estimate.go
│ │ │ ├── delete.go
│ │ │ ├── field.go
│ │ │ ├── format.go
│ │ │ ├── hook.go
│ │ │ ├── insert.go
│ │ │ ├── join.go
│ │ │ ├── model.go
│ │ │ ├── model_discard.go
│ │ │ ├── model_func.go
│ │ │ ├── model_map.go
│ │ │ ├── model_map_slice.go
│ │ │ ├── model_scan.go
│ │ │ ├── model_slice.go
│ │ │ ├── model_table.go
│ │ │ ├── model_table_m2m.go
│ │ │ ├── model_table_many.go
│ │ │ ├── model_table_slice.go
│ │ │ ├── model_table_struct.go
│ │ │ ├── msgpack.go
│ │ │ ├── orm.go
│ │ │ ├── query.go
│ │ │ ├── relation.go
│ │ │ ├── result.go
│ │ │ ├── select.go
│ │ │ ├── table.go
│ │ │ ├── table_create.go
│ │ │ ├── table_drop.go
│ │ │ ├── table_params.go
│ │ │ ├── tables.go
│ │ │ ├── types.go
│ │ │ ├── update.go
│ │ │ └── util.go
│ │ │ ├── pg.go
│ │ │ ├── pgjson
│ │ │ ├── json.go
│ │ │ └── provider.go
│ │ │ ├── result.go
│ │ │ ├── stmt.go
│ │ │ ├── tx.go
│ │ │ ├── types
│ │ │ ├── append.go
│ │ │ ├── append_ident.go
│ │ │ ├── append_jsonb.go
│ │ │ ├── append_value.go
│ │ │ ├── array.go
│ │ │ ├── array_append.go
│ │ │ ├── array_parser.go
│ │ │ ├── array_scan.go
│ │ │ ├── column.go
│ │ │ ├── doc.go
│ │ │ ├── flags.go
│ │ │ ├── hex.go
│ │ │ ├── hstore.go
│ │ │ ├── hstore_append.go
│ │ │ ├── hstore_parser.go
│ │ │ ├── hstore_scan.go
│ │ │ ├── in_op.go
│ │ │ ├── null_time.go
│ │ │ ├── scan.go
│ │ │ ├── scan_value.go
│ │ │ ├── time.go
│ │ │ └── types.go
│ │ │ └── version.go
│ ├── urlstruct
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── field.go
│ │ ├── pager.go
│ │ ├── renovate.json
│ │ ├── scan.go
│ │ ├── struct_decoder.go
│ │ ├── struct_info.go
│ │ ├── struct_info_map.go
│ │ ├── urlstruct.go
│ │ └── values.go
│ └── zerochecker
│ │ ├── LICENSE
│ │ └── zerochecker.go
├── go-telegram
│ └── bot
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bot.go
│ │ ├── build_request_form.go
│ │ ├── common.go
│ │ ├── errors.go
│ │ ├── get_updates.go
│ │ ├── handlers.go
│ │ ├── methods.go
│ │ ├── methods_params.go
│ │ ├── models
│ │ ├── animation.go
│ │ ├── audio.go
│ │ ├── boost.go
│ │ ├── bot_command.go
│ │ ├── bot_commands_scope.go
│ │ ├── business.go
│ │ ├── callback_query.go
│ │ ├── chat.go
│ │ ├── chat_action.go
│ │ ├── chat_background.go
│ │ ├── chat_member.go
│ │ ├── chosen_inline_result.go
│ │ ├── contact.go
│ │ ├── dice.go
│ │ ├── document.go
│ │ ├── file.go
│ │ ├── forum.go
│ │ ├── game.go
│ │ ├── gift.go
│ │ ├── giveaway.go
│ │ ├── inline_query.go
│ │ ├── input_file.go
│ │ ├── input_media.go
│ │ ├── invoice.go
│ │ ├── link_preview.go
│ │ ├── location.go
│ │ ├── menu_button.go
│ │ ├── message.go
│ │ ├── message_entity.go
│ │ ├── order_info.go
│ │ ├── paid.go
│ │ ├── parse_mode.go
│ │ ├── passport_data.go
│ │ ├── passport_element_error.go
│ │ ├── photo_size.go
│ │ ├── poll.go
│ │ ├── pre_checkout_query.go
│ │ ├── proximity_alert_triggered.go
│ │ ├── reaction.go
│ │ ├── reply.go
│ │ ├── reply_markup.go
│ │ ├── shipping_query.go
│ │ ├── star.go
│ │ ├── sticker.go
│ │ ├── sticker_set.go
│ │ ├── story.go
│ │ ├── successful_payment.go
│ │ ├── update.go
│ │ ├── user.go
│ │ ├── venue.go
│ │ ├── video.go
│ │ ├── video_chat.go
│ │ ├── video_note.go
│ │ ├── voice.go
│ │ ├── voice_chat.go
│ │ ├── web_app.go
│ │ └── web_hook_info.go
│ │ ├── options.go
│ │ ├── process_update.go
│ │ ├── raw_request.go
│ │ ├── wait_updates.go
│ │ └── webhook_handler.go
├── golang
│ └── protobuf
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── proto
│ │ ├── buffer.go
│ │ ├── defaults.go
│ │ ├── deprecated.go
│ │ ├── discard.go
│ │ ├── extensions.go
│ │ ├── properties.go
│ │ ├── proto.go
│ │ ├── registry.go
│ │ ├── text_decode.go
│ │ ├── text_encode.go
│ │ ├── wire.go
│ │ └── wrappers.go
│ │ └── ptypes
│ │ └── timestamp
│ │ └── timestamp.pb.go
├── google
│ ├── go-github
│ │ └── v55
│ │ │ ├── AUTHORS
│ │ │ ├── LICENSE
│ │ │ └── github
│ │ │ ├── actions.go
│ │ │ ├── actions_artifacts.go
│ │ │ ├── actions_cache.go
│ │ │ ├── actions_oidc.go
│ │ │ ├── actions_required_workflows.go
│ │ │ ├── actions_runner_groups.go
│ │ │ ├── actions_runners.go
│ │ │ ├── actions_secrets.go
│ │ │ ├── actions_variables.go
│ │ │ ├── actions_workflow_jobs.go
│ │ │ ├── actions_workflow_runs.go
│ │ │ ├── actions_workflows.go
│ │ │ ├── activity.go
│ │ │ ├── activity_events.go
│ │ │ ├── activity_notifications.go
│ │ │ ├── activity_star.go
│ │ │ ├── activity_watching.go
│ │ │ ├── admin.go
│ │ │ ├── admin_orgs.go
│ │ │ ├── admin_stats.go
│ │ │ ├── admin_users.go
│ │ │ ├── apps.go
│ │ │ ├── apps_hooks.go
│ │ │ ├── apps_hooks_deliveries.go
│ │ │ ├── apps_installation.go
│ │ │ ├── apps_manifest.go
│ │ │ ├── apps_marketplace.go
│ │ │ ├── authorizations.go
│ │ │ ├── billing.go
│ │ │ ├── checks.go
│ │ │ ├── code-scanning.go
│ │ │ ├── codespaces.go
│ │ │ ├── codespaces_secrets.go
│ │ │ ├── dependabot.go
│ │ │ ├── dependabot_alerts.go
│ │ │ ├── dependabot_secrets.go
│ │ │ ├── dependency_graph.go
│ │ │ ├── doc.go
│ │ │ ├── enterprise.go
│ │ │ ├── enterprise_actions_runners.go
│ │ │ ├── enterprise_audit_log.go
│ │ │ ├── enterprise_code_security_and_analysis.go
│ │ │ ├── event.go
│ │ │ ├── event_types.go
│ │ │ ├── gists.go
│ │ │ ├── gists_comments.go
│ │ │ ├── git.go
│ │ │ ├── git_blobs.go
│ │ │ ├── git_commits.go
│ │ │ ├── git_refs.go
│ │ │ ├── git_tags.go
│ │ │ ├── git_trees.go
│ │ │ ├── github-accessors.go
│ │ │ ├── github.go
│ │ │ ├── gitignore.go
│ │ │ ├── interactions.go
│ │ │ ├── interactions_orgs.go
│ │ │ ├── interactions_repos.go
│ │ │ ├── issue_import.go
│ │ │ ├── issues.go
│ │ │ ├── issues_assignees.go
│ │ │ ├── issues_comments.go
│ │ │ ├── issues_events.go
│ │ │ ├── issues_labels.go
│ │ │ ├── issues_milestones.go
│ │ │ ├── issues_timeline.go
│ │ │ ├── licenses.go
│ │ │ ├── messages.go
│ │ │ ├── migrations.go
│ │ │ ├── migrations_source_import.go
│ │ │ ├── migrations_user.go
│ │ │ ├── misc.go
│ │ │ ├── orgs.go
│ │ │ ├── orgs_actions_allowed.go
│ │ │ ├── orgs_actions_permissions.go
│ │ │ ├── orgs_audit_log.go
│ │ │ ├── orgs_credential_authorizations.go
│ │ │ ├── orgs_custom_roles.go
│ │ │ ├── orgs_hooks.go
│ │ │ ├── orgs_hooks_configuration.go
│ │ │ ├── orgs_hooks_deliveries.go
│ │ │ ├── orgs_members.go
│ │ │ ├── orgs_outside_collaborators.go
│ │ │ ├── orgs_packages.go
│ │ │ ├── orgs_personal_access_tokens.go
│ │ │ ├── orgs_projects.go
│ │ │ ├── orgs_rules.go
│ │ │ ├── orgs_security_managers.go
│ │ │ ├── orgs_users_blocking.go
│ │ │ ├── packages.go
│ │ │ ├── projects.go
│ │ │ ├── pulls.go
│ │ │ ├── pulls_comments.go
│ │ │ ├── pulls_reviewers.go
│ │ │ ├── pulls_reviews.go
│ │ │ ├── pulls_threads.go
│ │ │ ├── reactions.go
│ │ │ ├── repos.go
│ │ │ ├── repos_actions_access.go
│ │ │ ├── repos_actions_allowed.go
│ │ │ ├── repos_actions_permissions.go
│ │ │ ├── repos_autolinks.go
│ │ │ ├── repos_codeowners.go
│ │ │ ├── repos_collaborators.go
│ │ │ ├── repos_comments.go
│ │ │ ├── repos_commits.go
│ │ │ ├── repos_community_health.go
│ │ │ ├── repos_contents.go
│ │ │ ├── repos_deployment_branch_policies.go
│ │ │ ├── repos_deployments.go
│ │ │ ├── repos_environments.go
│ │ │ ├── repos_forks.go
│ │ │ ├── repos_hooks.go
│ │ │ ├── repos_hooks_configuration.go
│ │ │ ├── repos_hooks_deliveries.go
│ │ │ ├── repos_invitations.go
│ │ │ ├── repos_keys.go
│ │ │ ├── repos_lfs.go
│ │ │ ├── repos_merging.go
│ │ │ ├── repos_pages.go
│ │ │ ├── repos_prereceive_hooks.go
│ │ │ ├── repos_projects.go
│ │ │ ├── repos_releases.go
│ │ │ ├── repos_rules.go
│ │ │ ├── repos_stats.go
│ │ │ ├── repos_statuses.go
│ │ │ ├── repos_tags.go
│ │ │ ├── repos_traffic.go
│ │ │ ├── scim.go
│ │ │ ├── search.go
│ │ │ ├── secret_scanning.go
│ │ │ ├── security_advisories.go
│ │ │ ├── strings.go
│ │ │ ├── teams.go
│ │ │ ├── teams_discussion_comments.go
│ │ │ ├── teams_discussions.go
│ │ │ ├── teams_members.go
│ │ │ ├── timestamp.go
│ │ │ ├── users.go
│ │ │ ├── users_administration.go
│ │ │ ├── users_blocking.go
│ │ │ ├── users_emails.go
│ │ │ ├── users_followers.go
│ │ │ ├── users_gpg_keys.go
│ │ │ ├── users_keys.go
│ │ │ ├── users_packages.go
│ │ │ ├── users_projects.go
│ │ │ ├── users_ssh_signing_keys.go
│ │ │ ├── with_appengine.go
│ │ │ └── without_appengine.go
│ └── go-querystring
│ │ ├── LICENSE
│ │ └── query
│ │ └── encode.go
├── jinzhu
│ └── inflection
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── inflections.go
│ │ └── wercker.yml
├── matttproud
│ └── golang_protobuf_extensions
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── pbutil
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── decode.go
│ │ ├── doc.go
│ │ └── encode.go
├── namsral
│ └── flag
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── flag.go
├── prometheus
│ ├── client_golang
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── prometheus
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── build_info_collector.go
│ │ │ ├── collector.go
│ │ │ ├── counter.go
│ │ │ ├── desc.go
│ │ │ ├── doc.go
│ │ │ ├── expvar_collector.go
│ │ │ ├── fnv.go
│ │ │ ├── gauge.go
│ │ │ ├── get_pid.go
│ │ │ ├── get_pid_gopherjs.go
│ │ │ ├── go_collector.go
│ │ │ ├── go_collector_go116.go
│ │ │ ├── go_collector_latest.go
│ │ │ ├── histogram.go
│ │ │ ├── internal
│ │ │ ├── almost_equal.go
│ │ │ ├── difflib.go
│ │ │ ├── go_collector_options.go
│ │ │ ├── go_runtime_metrics.go
│ │ │ └── metric.go
│ │ │ ├── labels.go
│ │ │ ├── metric.go
│ │ │ ├── num_threads.go
│ │ │ ├── num_threads_gopherjs.go
│ │ │ ├── observer.go
│ │ │ ├── process_collector.go
│ │ │ ├── process_collector_js.go
│ │ │ ├── process_collector_other.go
│ │ │ ├── process_collector_windows.go
│ │ │ ├── registry.go
│ │ │ ├── summary.go
│ │ │ ├── timer.go
│ │ │ ├── untyped.go
│ │ │ ├── value.go
│ │ │ ├── vec.go
│ │ │ └── wrap.go
│ ├── client_model
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── go
│ │ │ └── metrics.pb.go
│ ├── common
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ ├── expfmt
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── expfmt.go
│ │ │ ├── fuzz.go
│ │ │ ├── openmetrics_create.go
│ │ │ ├── text_create.go
│ │ │ └── text_parse.go
│ │ ├── internal
│ │ │ └── bitbucket.org
│ │ │ │ └── ww
│ │ │ │ └── goautoneg
│ │ │ │ ├── README.txt
│ │ │ │ └── autoneg.go
│ │ └── model
│ │ │ ├── alert.go
│ │ │ ├── fingerprinting.go
│ │ │ ├── fnv.go
│ │ │ ├── labels.go
│ │ │ ├── labelset.go
│ │ │ ├── metric.go
│ │ │ ├── model.go
│ │ │ ├── signature.go
│ │ │ ├── silence.go
│ │ │ ├── time.go
│ │ │ └── value.go
│ └── procfs
│ │ ├── .gitignore
│ │ ├── .golangci.yml
│ │ ├── CODE_OF_CONDUCT.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── MAINTAINERS.md
│ │ ├── Makefile
│ │ ├── Makefile.common
│ │ ├── NOTICE
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ ├── arp.go
│ │ ├── buddyinfo.go
│ │ ├── cmdline.go
│ │ ├── cpuinfo.go
│ │ ├── cpuinfo_armx.go
│ │ ├── cpuinfo_mipsx.go
│ │ ├── cpuinfo_others.go
│ │ ├── cpuinfo_ppcx.go
│ │ ├── cpuinfo_riscvx.go
│ │ ├── cpuinfo_s390x.go
│ │ ├── cpuinfo_x86.go
│ │ ├── crypto.go
│ │ ├── doc.go
│ │ ├── fs.go
│ │ ├── fscache.go
│ │ ├── internal
│ │ ├── fs
│ │ │ └── fs.go
│ │ └── util
│ │ │ ├── parse.go
│ │ │ ├── readfile.go
│ │ │ ├── sysreadfile.go
│ │ │ ├── sysreadfile_compat.go
│ │ │ └── valueparser.go
│ │ ├── ipvs.go
│ │ ├── kernel_random.go
│ │ ├── loadavg.go
│ │ ├── mdstat.go
│ │ ├── meminfo.go
│ │ ├── mountinfo.go
│ │ ├── mountstats.go
│ │ ├── net_conntrackstat.go
│ │ ├── net_dev.go
│ │ ├── net_ip_socket.go
│ │ ├── net_protocols.go
│ │ ├── net_sockstat.go
│ │ ├── net_softnet.go
│ │ ├── net_tcp.go
│ │ ├── net_udp.go
│ │ ├── net_unix.go
│ │ ├── net_xfrm.go
│ │ ├── netstat.go
│ │ ├── proc.go
│ │ ├── proc_cgroup.go
│ │ ├── proc_cgroups.go
│ │ ├── proc_environ.go
│ │ ├── proc_fdinfo.go
│ │ ├── proc_io.go
│ │ ├── proc_limits.go
│ │ ├── proc_maps.go
│ │ ├── proc_netstat.go
│ │ ├── proc_ns.go
│ │ ├── proc_psi.go
│ │ ├── proc_smaps.go
│ │ ├── proc_snmp.go
│ │ ├── proc_snmp6.go
│ │ ├── proc_stat.go
│ │ ├── proc_status.go
│ │ ├── proc_sys.go
│ │ ├── schedstat.go
│ │ ├── slab.go
│ │ ├── softirqs.go
│ │ ├── stat.go
│ │ ├── swaps.go
│ │ ├── ttar
│ │ ├── vm.go
│ │ └── zoneinfo.go
├── robfig
│ └── cron
│ │ └── v3
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── chain.go
│ │ ├── constantdelay.go
│ │ ├── cron.go
│ │ ├── doc.go
│ │ ├── logger.go
│ │ ├── option.go
│ │ ├── parser.go
│ │ └── spec.go
├── tmthrgd
│ └── go-hex
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── hex.go
│ │ ├── hex_amd64.go
│ │ ├── hex_decode_amd64.s
│ │ ├── hex_encode_amd64.s
│ │ └── hex_other.go
└── vmihailenco
│ ├── bufpool
│ ├── .travis.yml
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── buf_pool.go
│ ├── buffer.go
│ ├── buffer_ext.go
│ └── pool.go
│ ├── msgpack
│ └── v5
│ │ ├── .prettierrc
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── commitlint.config.js
│ │ ├── decode.go
│ │ ├── decode_map.go
│ │ ├── decode_number.go
│ │ ├── decode_query.go
│ │ ├── decode_slice.go
│ │ ├── decode_string.go
│ │ ├── decode_value.go
│ │ ├── encode.go
│ │ ├── encode_map.go
│ │ ├── encode_number.go
│ │ ├── encode_slice.go
│ │ ├── encode_value.go
│ │ ├── ext.go
│ │ ├── intern.go
│ │ ├── msgpack.go
│ │ ├── msgpcode
│ │ └── msgpcode.go
│ │ ├── package.json
│ │ ├── safe.go
│ │ ├── time.go
│ │ ├── types.go
│ │ ├── unsafe.go
│ │ └── version.go
│ └── tagparser
│ ├── .travis.yml
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── internal
│ ├── parser
│ │ └── parser.go
│ ├── safe.go
│ └── unsafe.go
│ ├── tagparser.go
│ └── v2
│ ├── .travis.yml
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── internal
│ ├── parser
│ │ └── parser.go
│ ├── safe.go
│ └── unsafe.go
│ └── tagparser.go
├── golang.org
└── x
│ ├── crypto
│ ├── LICENSE
│ ├── PATENTS
│ ├── cast5
│ │ └── cast5.go
│ ├── hkdf
│ │ └── hkdf.go
│ ├── pbkdf2
│ │ └── pbkdf2.go
│ └── sha3
│ │ ├── doc.go
│ │ ├── hashes.go
│ │ ├── hashes_generic.go
│ │ ├── keccakf.go
│ │ ├── keccakf_amd64.go
│ │ ├── keccakf_amd64.s
│ │ ├── register.go
│ │ ├── sha3.go
│ │ ├── sha3_s390x.go
│ │ ├── sha3_s390x.s
│ │ ├── shake.go
│ │ ├── shake_generic.go
│ │ ├── xor.go
│ │ ├── xor_generic.go
│ │ └── xor_unaligned.go
│ ├── sys
│ ├── LICENSE
│ ├── PATENTS
│ ├── cpu
│ │ ├── asm_aix_ppc64.s
│ │ ├── byteorder.go
│ │ ├── cpu.go
│ │ ├── cpu_aix.go
│ │ ├── cpu_arm.go
│ │ ├── cpu_arm64.go
│ │ ├── cpu_arm64.s
│ │ ├── cpu_gc_arm64.go
│ │ ├── cpu_gc_s390x.go
│ │ ├── cpu_gc_x86.go
│ │ ├── cpu_gccgo_arm64.go
│ │ ├── cpu_gccgo_s390x.go
│ │ ├── cpu_gccgo_x86.c
│ │ ├── cpu_gccgo_x86.go
│ │ ├── cpu_linux.go
│ │ ├── cpu_linux_arm.go
│ │ ├── cpu_linux_arm64.go
│ │ ├── cpu_linux_mips64x.go
│ │ ├── cpu_linux_noinit.go
│ │ ├── cpu_linux_ppc64x.go
│ │ ├── cpu_linux_s390x.go
│ │ ├── cpu_loong64.go
│ │ ├── cpu_mips64x.go
│ │ ├── cpu_mipsx.go
│ │ ├── cpu_netbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.s
│ │ ├── cpu_other_arm.go
│ │ ├── cpu_other_arm64.go
│ │ ├── cpu_other_mips64x.go
│ │ ├── cpu_other_ppc64x.go
│ │ ├── cpu_other_riscv64.go
│ │ ├── cpu_ppc64x.go
│ │ ├── cpu_riscv64.go
│ │ ├── cpu_s390x.go
│ │ ├── cpu_s390x.s
│ │ ├── cpu_wasm.go
│ │ ├── cpu_x86.go
│ │ ├── cpu_x86.s
│ │ ├── cpu_zos.go
│ │ ├── cpu_zos_s390x.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── hwcap_linux.go
│ │ ├── parse.go
│ │ ├── proc_cpuinfo_linux.go
│ │ ├── runtime_auxv.go
│ │ ├── runtime_auxv_go121.go
│ │ ├── syscall_aix_gccgo.go
│ │ └── syscall_aix_ppc64_gc.go
│ ├── internal
│ │ └── unsafeheader
│ │ │ └── unsafeheader.go
│ ├── unix
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_bsd_386.s
│ │ ├── asm_bsd_amd64.s
│ │ ├── asm_bsd_arm.s
│ │ ├── asm_bsd_arm64.s
│ │ ├── asm_bsd_ppc64.s
│ │ ├── asm_bsd_riscv64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_loong64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_riscv64.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_openbsd_mips64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── asm_zos_s390x.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dev_zos.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── epoll_zos.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── fstatfs_zos.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ifreq_linux.go
│ │ ├── ioctl_linux.go
│ │ ├── ioctl_signed.go
│ │ ├── ioctl_unsigned.go
│ │ ├── ioctl_zos.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mmap_nomremap.go
│ │ ├── mremap.go
│ │ ├── pagesize_unix.go
│ │ ├── pledge_openbsd.go
│ │ ├── ptrace_darwin.go
│ │ ├── ptrace_ios.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── readdirent_getdents.go
│ │ ├── readdirent_getdirentries.go
│ │ ├── sockcmsg_dragonfly.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── sockcmsg_unix_other.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_freebsd_riscv64.go
│ │ ├── syscall_hurd.go
│ │ ├── syscall_hurd_386.go
│ │ ├── syscall_illumos.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_alarm.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gc_arm.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_loong64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_openbsd_libc.go
│ │ ├── syscall_openbsd_mips64.go
│ │ ├── syscall_openbsd_ppc64.go
│ │ ├── syscall_openbsd_riscv64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── syscall_zos_s390x.go
│ │ ├── sysvshm_linux.go
│ │ ├── sysvshm_unix.go
│ │ ├── sysvshm_unix_other.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_freebsd_riscv64.go
│ │ ├── zerrors_linux.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_loong64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_openbsd_mips64.go
│ │ ├── zerrors_openbsd_ppc64.go
│ │ ├── zerrors_openbsd_riscv64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zerrors_zos_s390x.go
│ │ ├── zptrace_armnn_linux.go
│ │ ├── zptrace_linux_arm64.go
│ │ ├── zptrace_mipsnn_linux.go
│ │ ├── zptrace_mipsnnle_linux.go
│ │ ├── zptrace_x86_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_freebsd_riscv64.go
│ │ ├── zsyscall_illumos_amd64.go
│ │ ├── zsyscall_linux.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_loong64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_386.s
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_amd64.s
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm.s
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_openbsd_arm64.s
│ │ ├── zsyscall_openbsd_mips64.go
│ │ ├── zsyscall_openbsd_mips64.s
│ │ ├── zsyscall_openbsd_ppc64.go
│ │ ├── zsyscall_openbsd_ppc64.s
│ │ ├── zsyscall_openbsd_riscv64.go
│ │ ├── zsyscall_openbsd_riscv64.s
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsyscall_zos_s390x.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysctl_openbsd_mips64.go
│ │ ├── zsysctl_openbsd_ppc64.go
│ │ ├── zsysctl_openbsd_riscv64.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_freebsd_riscv64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_loong64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── zsysnum_openbsd_mips64.go
│ │ ├── zsysnum_openbsd_ppc64.go
│ │ ├── zsysnum_openbsd_riscv64.go
│ │ ├── zsysnum_zos_s390x.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_freebsd_riscv64.go
│ │ ├── ztypes_linux.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_loong64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ ├── ztypes_openbsd_mips64.go
│ │ ├── ztypes_openbsd_ppc64.go
│ │ ├── ztypes_openbsd_riscv64.go
│ │ ├── ztypes_solaris_amd64.go
│ │ └── ztypes_zos_s390x.go
│ └── windows
│ │ ├── aliases.go
│ │ ├── dll_windows.go
│ │ ├── empty.s
│ │ ├── env_windows.go
│ │ ├── eventlog.go
│ │ ├── exec_windows.go
│ │ ├── memory_windows.go
│ │ ├── mkerrors.bash
│ │ ├── mkknownfolderids.bash
│ │ ├── mksyscall.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── security_windows.go
│ │ ├── service.go
│ │ ├── setupapi_windows.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_windows.go
│ │ ├── types_windows.go
│ │ ├── types_windows_386.go
│ │ ├── types_windows_amd64.go
│ │ ├── types_windows_arm.go
│ │ ├── types_windows_arm64.go
│ │ ├── zerrors_windows.go
│ │ ├── zknownfolderids_windows.go
│ │ └── zsyscall_windows.go
│ └── text
│ ├── LICENSE
│ ├── PATENTS
│ ├── feature
│ └── plural
│ │ ├── common.go
│ │ ├── message.go
│ │ ├── plural.go
│ │ └── tables.go
│ ├── internal
│ ├── catmsg
│ │ ├── catmsg.go
│ │ ├── codec.go
│ │ └── varint.go
│ ├── format
│ │ ├── format.go
│ │ └── parser.go
│ ├── internal.go
│ ├── language
│ │ ├── common.go
│ │ ├── compact.go
│ │ ├── compact
│ │ │ ├── compact.go
│ │ │ ├── language.go
│ │ │ ├── parents.go
│ │ │ ├── tables.go
│ │ │ └── tags.go
│ │ ├── compose.go
│ │ ├── coverage.go
│ │ ├── language.go
│ │ ├── lookup.go
│ │ ├── match.go
│ │ ├── parse.go
│ │ ├── tables.go
│ │ └── tags.go
│ ├── match.go
│ ├── number
│ │ ├── common.go
│ │ ├── decimal.go
│ │ ├── format.go
│ │ ├── number.go
│ │ ├── pattern.go
│ │ ├── roundingmode_string.go
│ │ └── tables.go
│ ├── stringset
│ │ └── set.go
│ └── tag
│ │ └── tag.go
│ ├── language
│ ├── coverage.go
│ ├── doc.go
│ ├── language.go
│ ├── match.go
│ ├── parse.go
│ ├── tables.go
│ └── tags.go
│ └── message
│ ├── catalog.go
│ ├── catalog
│ ├── catalog.go
│ ├── dict.go
│ ├── go19.go
│ └── gopre19.go
│ ├── doc.go
│ ├── format.go
│ ├── message.go
│ └── print.go
├── google.golang.org
└── protobuf
│ ├── LICENSE
│ ├── PATENTS
│ ├── encoding
│ ├── prototext
│ │ ├── decode.go
│ │ ├── doc.go
│ │ └── encode.go
│ └── protowire
│ │ └── wire.go
│ ├── internal
│ ├── descfmt
│ │ └── stringer.go
│ ├── descopts
│ │ └── options.go
│ ├── detrand
│ │ └── rand.go
│ ├── encoding
│ │ ├── defval
│ │ │ └── default.go
│ │ ├── messageset
│ │ │ └── messageset.go
│ │ ├── tag
│ │ │ └── tag.go
│ │ └── text
│ │ │ ├── decode.go
│ │ │ ├── decode_number.go
│ │ │ ├── decode_string.go
│ │ │ ├── decode_token.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ ├── errors
│ │ ├── errors.go
│ │ ├── is_go112.go
│ │ └── is_go113.go
│ ├── filedesc
│ │ ├── build.go
│ │ ├── desc.go
│ │ ├── desc_init.go
│ │ ├── desc_lazy.go
│ │ ├── desc_list.go
│ │ ├── desc_list_gen.go
│ │ └── placeholder.go
│ ├── filetype
│ │ └── build.go
│ ├── flags
│ │ ├── flags.go
│ │ ├── proto_legacy_disable.go
│ │ └── proto_legacy_enable.go
│ ├── genid
│ │ ├── any_gen.go
│ │ ├── api_gen.go
│ │ ├── descriptor_gen.go
│ │ ├── doc.go
│ │ ├── duration_gen.go
│ │ ├── empty_gen.go
│ │ ├── field_mask_gen.go
│ │ ├── goname.go
│ │ ├── map_entry.go
│ │ ├── source_context_gen.go
│ │ ├── struct_gen.go
│ │ ├── timestamp_gen.go
│ │ ├── type_gen.go
│ │ ├── wrappers.go
│ │ └── wrappers_gen.go
│ ├── impl
│ │ ├── api_export.go
│ │ ├── checkinit.go
│ │ ├── codec_extension.go
│ │ ├── codec_field.go
│ │ ├── codec_gen.go
│ │ ├── codec_map.go
│ │ ├── codec_map_go111.go
│ │ ├── codec_map_go112.go
│ │ ├── codec_message.go
│ │ ├── codec_messageset.go
│ │ ├── codec_reflect.go
│ │ ├── codec_tables.go
│ │ ├── codec_unsafe.go
│ │ ├── convert.go
│ │ ├── convert_list.go
│ │ ├── convert_map.go
│ │ ├── decode.go
│ │ ├── encode.go
│ │ ├── enum.go
│ │ ├── extension.go
│ │ ├── legacy_enum.go
│ │ ├── legacy_export.go
│ │ ├── legacy_extension.go
│ │ ├── legacy_file.go
│ │ ├── legacy_message.go
│ │ ├── merge.go
│ │ ├── merge_gen.go
│ │ ├── message.go
│ │ ├── message_reflect.go
│ │ ├── message_reflect_field.go
│ │ ├── message_reflect_gen.go
│ │ ├── pointer_reflect.go
│ │ ├── pointer_unsafe.go
│ │ ├── validate.go
│ │ └── weak.go
│ ├── order
│ │ ├── order.go
│ │ └── range.go
│ ├── pragma
│ │ └── pragma.go
│ ├── set
│ │ └── ints.go
│ ├── strs
│ │ ├── strings.go
│ │ ├── strings_pure.go
│ │ └── strings_unsafe.go
│ └── version
│ │ └── version.go
│ ├── proto
│ ├── checkinit.go
│ ├── decode.go
│ ├── decode_gen.go
│ ├── doc.go
│ ├── encode.go
│ ├── encode_gen.go
│ ├── equal.go
│ ├── extension.go
│ ├── merge.go
│ ├── messageset.go
│ ├── proto.go
│ ├── proto_methods.go
│ ├── proto_reflect.go
│ ├── reset.go
│ ├── size.go
│ ├── size_gen.go
│ └── wrappers.go
│ ├── reflect
│ ├── protodesc
│ │ ├── desc.go
│ │ ├── desc_init.go
│ │ ├── desc_resolve.go
│ │ ├── desc_validate.go
│ │ └── proto.go
│ ├── protoreflect
│ │ ├── methods.go
│ │ ├── proto.go
│ │ ├── source.go
│ │ ├── source_gen.go
│ │ ├── type.go
│ │ ├── value.go
│ │ ├── value_pure.go
│ │ ├── value_union.go
│ │ └── value_unsafe.go
│ └── protoregistry
│ │ └── registry.go
│ ├── runtime
│ ├── protoiface
│ │ ├── legacy.go
│ │ └── methods.go
│ └── protoimpl
│ │ ├── impl.go
│ │ └── version.go
│ └── types
│ ├── descriptorpb
│ └── descriptor.pb.go
│ └── known
│ └── timestamppb
│ └── timestamp.pb.go
├── mellium.im
└── sasl
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── DCO
│ ├── LICENSE
│ ├── README.md
│ ├── doc.go
│ ├── mechanism.go
│ ├── negotiator.go
│ ├── nonce.go
│ ├── options.go
│ ├── plain.go
│ ├── scram.go
│ ├── xor.go
│ ├── xor_amd64.go
│ ├── xor_amd64.s
│ ├── xor_arm64.go
│ ├── xor_arm64.s
│ ├── xor_generic.go
│ ├── xor_go.go
│ ├── xor_ppc64x.go
│ └── xor_ppc64x.s
└── modules.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | vendor/* -diff
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .vscode
3 | cfg/local.toml
4 | coverage.txt
5 | coverage.xml
6 |
--------------------------------------------------------------------------------
/cfg/local.toml.dist:
--------------------------------------------------------------------------------
1 | [Database]
2 | Addr = "localhost:5432"
3 | User = "postgres"
4 | Database = "ludoman"
5 | Password = ""
6 | PoolSize = 5
7 | ApplicationName = "apisrv"
8 |
9 | [Server]
10 | Host = "test.example"
11 | Port = 8078
12 | IsDevel = true
13 |
14 | [Bot]
15 | Token = ""
16 | TournamentChatID = -1
--------------------------------------------------------------------------------
/deployments/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:latest
2 |
3 | ARG CI_PROJECT_NAME=apisrv
4 | ENV CI_PROJECT_NAME=$CI_PROJECT_NAME
5 |
6 | ENV TZ=Europe/Moscow
7 | RUN apk --no-cache add ca-certificates tzdata && cp -r -f /usr/share/zoneinfo/$TZ /etc/localtime
8 |
9 | ADD ./$CI_PROJECT_NAME ./$CI_PROJECT_NAME
10 |
11 | LABEL description="$CI_PROJECT_NAME"
12 |
13 | ENTRYPOINT "/$CI_PROJECT_NAME"
14 | EXPOSE 8075
15 |
--------------------------------------------------------------------------------
/docs/init.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kroexov/ludomania/4a0eae265c4d3f7fcd77d94e2fe1107510569785/docs/init.sql
--------------------------------------------------------------------------------
/docs/model/ludoman.mfd:
--------------------------------------------------------------------------------
1 |
2 | ludoman.mfd
3 |
4 | common
5 |
6 |
7 | ru
8 |
9 | 10
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/pathes/2025-04-16-fix-pr.sql:
--------------------------------------------------------------------------------
1 | SELECT column_name
2 | FROM information_schema.key_column_usage
3 | WHERE table_name = 'ludomans' AND constraint_name = 'PRIMARY';
4 | ALTER TABLE "ludomans" ADD PRIMARY KEY ("ludomanId");
--------------------------------------------------------------------------------
/docs/pathes/2025-04-17-add-transactions.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS "transactions" (
2 | "transactionId" int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
3 | "fromLudomanId" int4 NOT NULL,
4 | "toLudomanId" int4 NOT NULL,
5 | "amount" int8 NOT NULL,
6 | "createdAt" timestamp with time zone NOT NULL DEFAULT now(),
7 | CONSTRAINT "fk_fromLudomanId" FOREIGN KEY ("fromLudomanId")
8 | REFERENCES "ludomans" ("ludomanId"),
9 | CONSTRAINT "fk_toLudomanId" FOREIGN KEY ("toLudomanId")
10 | REFERENCES "ludomans" ("ludomanId")
11 | );
--------------------------------------------------------------------------------
/docs/pathes/2025-04-28-adsLimit.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "ludomans" ADD "adsWatched" int4 not null default 0;
--------------------------------------------------------------------------------
/docs/pathes/2025-04-28-fix-null.sql:
--------------------------------------------------------------------------------
1 | UPDATE ludomans
2 | SET "totalLost" = 0
3 | WHERE "totalLost" IS NULL;
4 |
5 | UPDATE ludomans
6 | SET "totalWon" = 0
7 | WHERE "totalWon" IS NULL;
8 |
9 | ALTER TABLE ludomans
10 | ALTER COLUMN "totalLost" SET DEFAULT 0,
11 | ALTER COLUMN "totalWon" SET DEFAULT 0;
12 |
13 | ALTER TABLE ludomans
14 | ALTER COLUMN "totalLost" SET NOT NULL,
15 | ALTER COLUMN "totalWon" SET NOT NULL;
16 |
17 |
--------------------------------------------------------------------------------
/docs/pathes/2025-04-30-add-coef.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "ludomans" ADD "coefficient" integer NOT NULL DEFAULT 1;
--------------------------------------------------------------------------------
/docs/pathes/2025-04-30-add-data.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "ludomans" ADD "data" jsonb NOT NULL DEFAULT '{}'::jsonb;
--------------------------------------------------------------------------------
/pkg/db/common_ext.go:
--------------------------------------------------------------------------------
1 | package db
2 |
3 | type Ludomans []Ludoman
4 |
5 | func (l Ludomans) IDs() []int {
6 | var res []int
7 | for _, ludoman := range l {
8 | res = append(res, ludoman.ID)
9 | }
10 | return res
11 | }
12 |
--------------------------------------------------------------------------------
/pkg/db/logger.go:
--------------------------------------------------------------------------------
1 | package db
2 |
3 | import (
4 | "context"
5 | "log"
6 | "time"
7 |
8 | "github.com/go-pg/pg/v10"
9 | )
10 |
11 | type QueryLogger struct {
12 | logger *log.Logger
13 | }
14 |
15 | func (ql QueryLogger) BeforeQuery(ctx context.Context, event *pg.QueryEvent) (context.Context, error) {
16 | if event.Stash == nil {
17 | event.Stash = make(map[interface{}]interface{})
18 | }
19 |
20 | event.Stash["startedAt"] = time.Now()
21 | return ctx, nil
22 | }
23 |
24 | func (ql QueryLogger) AfterQuery(ctx context.Context, event *pg.QueryEvent) error {
25 | query, err := event.FormattedQuery()
26 | if err != nil {
27 | ql.logger.Printf("formatted query err=%s", err)
28 | }
29 |
30 | var since time.Duration
31 | if event.Stash != nil {
32 | if v, ok := event.Stash["startedAt"]; ok {
33 | if startAt, ok := v.(time.Time); ok {
34 | since = time.Since(startAt)
35 | }
36 | }
37 | }
38 |
39 | ql.logger.Printf("query=%s duration=%v", query, since)
40 | return nil
41 | }
42 |
43 | func NewQueryLogger(logger *log.Logger) QueryLogger {
44 | return QueryLogger{logger: logger}
45 | }
46 |
--------------------------------------------------------------------------------
/pkg/db/model_params.go:
--------------------------------------------------------------------------------
1 | package db
2 |
3 | type LudomanData struct {
4 | K1 bool `json:"k1"`
5 | K10 bool `json:"k10"`
6 | K100 bool `json:"k100"`
7 | K200 bool `json:"k200"`
8 | K500 bool `json:"k500"`
9 | }
10 |
--------------------------------------------------------------------------------
/pkg/db/model_validate.go:
--------------------------------------------------------------------------------
1 | // Code generated by mfd-generator v0.4.5; DO NOT EDIT.
2 |
3 | //nolint:all
4 | //lint:file-ignore U1000 ignore unused code, it's generated
5 | package db
6 |
7 | import (
8 | "unicode/utf8"
9 | )
10 |
11 | const (
12 | ErrEmptyValue = "empty"
13 | ErrMaxLength = "len"
14 | ErrWrongValue = "value"
15 | )
16 |
17 | func (l Ludoman) Validate() (errors map[string]string, valid bool) {
18 | errors = map[string]string{}
19 |
20 | if utf8.RuneCountInString(l.LudomanNickname) > 255 {
21 | errors[Columns.Ludoman.LudomanNickname] = ErrMaxLength
22 | }
23 |
24 | return errors, len(errors) == 0
25 | }
26 |
--------------------------------------------------------------------------------
/pkg/ludomania/github.go:
--------------------------------------------------------------------------------
1 | package ludomania
2 |
3 | import (
4 | "context"
5 | "github.com/google/go-github/v55/github"
6 | )
7 |
8 | type GithubService struct {
9 | client *github.Client
10 | owner string
11 | repo string
12 | }
13 |
14 | func NewGithubService(owner, repo string) *GithubService {
15 | return &GithubService{
16 | client: github.NewClient(nil),
17 | owner: owner,
18 | repo: repo,
19 | }
20 | }
21 |
22 | func (s *GithubService) GetStarsCount(ctx context.Context) (int, error) {
23 | r, _, err := s.client.Repositories.Get(ctx, s.owner, s.repo)
24 | if err != nil {
25 | return 0, err
26 | }
27 | return r.GetStargazersCount(), nil
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/BurntSushi/toml/.gitignore:
--------------------------------------------------------------------------------
1 | /toml.test
2 | /toml-test
3 |
--------------------------------------------------------------------------------
/vendor/github.com/BurntSushi/toml/decode_go116.go:
--------------------------------------------------------------------------------
1 | //go:build go1.16
2 | // +build go1.16
3 |
4 | package toml
5 |
6 | import (
7 | "io/fs"
8 | )
9 |
10 | // DecodeFS reads the contents of a file from [fs.FS] and decodes it with
11 | // [Decode].
12 | func DecodeFS(fsys fs.FS, path string, v interface{}) (MetaData, error) {
13 | fp, err := fsys.Open(path)
14 | if err != nil {
15 | return MetaData{}, err
16 | }
17 | defer fp.Close()
18 | return NewDecoder(fp).Decode(v)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/BurntSushi/toml/deprecated.go:
--------------------------------------------------------------------------------
1 | package toml
2 |
3 | import (
4 | "encoding"
5 | "io"
6 | )
7 |
8 | // Deprecated: use encoding.TextMarshaler
9 | type TextMarshaler encoding.TextMarshaler
10 |
11 | // Deprecated: use encoding.TextUnmarshaler
12 | type TextUnmarshaler encoding.TextUnmarshaler
13 |
14 | // Deprecated: use MetaData.PrimitiveDecode.
15 | func PrimitiveDecode(primValue Primitive, v interface{}) error {
16 | md := MetaData{decoded: make(map[string]struct{})}
17 | return md.unify(primValue.undecoded, rvalue(v))
18 | }
19 |
20 | // Deprecated: use NewDecoder(reader).Decode(&value).
21 | func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/BurntSushi/toml/doc.go:
--------------------------------------------------------------------------------
1 | // Package toml implements decoding and encoding of TOML files.
2 | //
3 | // This package supports TOML v1.0.0, as specified at https://toml.io
4 | //
5 | // There is also support for delaying decoding with the Primitive type, and
6 | // querying the set of keys in a TOML document with the MetaData type.
7 | //
8 | // The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator,
9 | // and can be used to verify if TOML document is valid. It can also be used to
10 | // print the type of each key.
11 | package toml
12 |
--------------------------------------------------------------------------------
/vendor/github.com/ProtonMail/go-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/github.com/ProtonMail/go-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/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go:
--------------------------------------------------------------------------------
1 | package ocb
2 |
3 | // Second set of test vectors from https://tools.ietf.org/html/rfc7253
4 | var rfc7253TestVectorTaglen96 = struct {
5 | key, nonce, header, plaintext, ciphertext string
6 | }{"0F0E0D0C0B0A09080706050403020100",
7 | "BBAA9988776655443322110D",
8 | "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
9 | "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
10 | "1792A4E31E0755FB03E31B22116E6C2DDF9EFD6E33D536F1A0124B0A55BAE884ED93481529C76B6AD0C515F4D1CDD4FDAC4F02AA"}
11 |
12 | var rfc7253AlgorithmTest = []struct {
13 | KEYLEN, TAGLEN int
14 | OUTPUT string }{
15 | {128, 128, "67E944D23256C5E0B6C61FA22FDF1EA2"},
16 | {192, 128, "F673F2C3E7174AAE7BAE986CA9F29E17"},
17 | {256, 128, "D90EB8E9C977C88B79DD793D7FFA161C"},
18 | {128, 96, "77A3D8E73589158D25D01209"},
19 | {192, 96, "05D56EAD2752C86BE6932C5E"},
20 | {256, 96, "5458359AC23B0CBA9E6330DD"},
21 | {128, 64, "192C9B7BD90BA06A"},
22 | {192, 64, "0066BC6E0EF34E24"},
23 | {256, 64, "7D4EA5D445501CBE"},
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.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 encoding implements openpgp packet field encodings as specified in
6 | // RFC 4880 and 6637.
7 | package encoding
8 |
9 | import "io"
10 |
11 | // Field is an encoded field of an openpgp packet.
12 | type Field interface {
13 | // Bytes returns the decoded data.
14 | Bytes() []byte
15 |
16 | // BitLength is the size in bits of the decoded data.
17 | BitLength() uint16
18 |
19 | // EncodedBytes returns the encoded data.
20 | EncodedBytes() []byte
21 |
22 | // EncodedLength is the size in bytes of the encoded data.
23 | EncodedLength() uint16
24 |
25 | // ReadFrom reads the next Field from r.
26 | ReadFrom(r io.Reader) (int64, error)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go:
--------------------------------------------------------------------------------
1 | package packet
2 |
3 | // Notation type represents a Notation Data subpacket
4 | // see https://tools.ietf.org/html/rfc4880#section-5.2.3.16
5 | type Notation struct {
6 | Name string
7 | Value []byte
8 | IsCritical bool
9 | IsHumanReadable bool
10 | }
11 |
12 | func (notation *Notation) getData() []byte {
13 | nameData := []byte(notation.Name)
14 | nameLen := len(nameData)
15 | valueLen := len(notation.Value)
16 |
17 | data := make([]byte, 8+nameLen+valueLen)
18 | if notation.IsHumanReadable {
19 | data[0] = 0x80
20 | }
21 |
22 | data[4] = byte(nameLen >> 8)
23 | data[5] = byte(nameLen)
24 | data[6] = byte(valueLen >> 8)
25 | data[7] = byte(valueLen)
26 | copy(data[8:8+nameLen], nameData)
27 | copy(data[8+nameLen:], notation.Value)
28 | return data
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 | // +build gc
3 | // +build !purego
4 |
5 | package xxhash
6 |
7 | // Sum64 computes the 64-bit xxHash digest of b.
8 | //
9 | //go:noescape
10 | func Sum64(b []byte) uint64
11 |
12 | //go:noescape
13 | func writeBlocks(d *Digest, b []byte) int
14 |
--------------------------------------------------------------------------------
/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | // This file contains the safe implementations of otherwise unsafe-using code.
4 |
5 | package xxhash
6 |
7 | // Sum64String computes the 64-bit xxHash digest of s.
8 | func Sum64String(s string) uint64 {
9 | return Sum64([]byte(s))
10 | }
11 |
12 | // WriteString adds more data to d. It always returns len(s), nil.
13 | func (d *Digest) WriteString(s string) (n int, err error) {
14 | return d.Write([]byte(s))
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !purego
2 | // +build amd64,!purego
3 |
4 | package x25519
5 |
6 | import (
7 | fp "github.com/cloudflare/circl/math/fp25519"
8 | "golang.org/x/sys/cpu"
9 | )
10 |
11 | var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
12 |
13 | var _ = hasBmi2Adx
14 |
15 | func double(x, z *fp.Elt) { doubleAmd64(x, z) }
16 | func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
17 | func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
18 | func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
19 |
20 | //go:noescape
21 | func ladderStepAmd64(w *[5]fp.Elt, b uint)
22 |
23 | //go:noescape
24 | func diffAddAmd64(w *[5]fp.Elt, b uint)
25 |
26 | //go:noescape
27 | func doubleAmd64(x, z *fp.Elt)
28 |
29 | //go:noescape
30 | func mulA24Amd64(z, x *fp.Elt)
31 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || purego
2 | // +build !amd64 purego
3 |
4 | package x25519
5 |
6 | import fp "github.com/cloudflare/circl/math/fp25519"
7 |
8 | func double(x, z *fp.Elt) { doubleGeneric(x, z) }
9 | func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
10 | func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
11 | func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x25519/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
3 |
4 | Validation of public keys.
5 |
6 | The Diffie-Hellman function, as described in RFC-7748 [1], works for any
7 | public key. However, if a different protocol requires contributory
8 | behaviour [2,3], then the public keys must be validated against low-order
9 | points [3,4]. To do that, the Shared function performs this validation
10 | internally and returns false when the public key is invalid (i.e., it
11 | is a low-order point).
12 |
13 | References:
14 | - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
15 | - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
16 | - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
17 | - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
18 | */
19 | package x25519
20 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !purego
2 | // +build amd64,!purego
3 |
4 | package x448
5 |
6 | import (
7 | fp "github.com/cloudflare/circl/math/fp448"
8 | "golang.org/x/sys/cpu"
9 | )
10 |
11 | var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
12 |
13 | var _ = hasBmi2Adx
14 |
15 | func double(x, z *fp.Elt) { doubleAmd64(x, z) }
16 | func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
17 | func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
18 | func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
19 |
20 | //go:noescape
21 | func doubleAmd64(x, z *fp.Elt)
22 |
23 | //go:noescape
24 | func diffAddAmd64(w *[5]fp.Elt, b uint)
25 |
26 | //go:noescape
27 | func ladderStepAmd64(w *[5]fp.Elt, b uint)
28 |
29 | //go:noescape
30 | func mulA24Amd64(z, x *fp.Elt)
31 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || purego
2 | // +build !amd64 purego
3 |
4 | package x448
5 |
6 | import fp "github.com/cloudflare/circl/math/fp448"
7 |
8 | func double(x, z *fp.Elt) { doubleGeneric(x, z) }
9 | func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
10 | func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
11 | func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/dh/x448/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
3 |
4 | Validation of public keys.
5 |
6 | The Diffie-Hellman function, as described in RFC-7748 [1], works for any
7 | public key. However, if a different protocol requires contributory
8 | behaviour [2,3], then the public keys must be validated against low-order
9 | points [3,4]. To do that, the Shared function performs this validation
10 | internally and returns false when the public key is invalid (i.e., it
11 | is a low-order point).
12 |
13 | References:
14 | - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
15 | - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
16 | - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
17 | - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
18 | */
19 | package x448
20 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/internal/sha3/rc.go:
--------------------------------------------------------------------------------
1 | package sha3
2 |
3 | // RC stores the round constants for use in the ι step.
4 | var RC = [24]uint64{
5 | 0x0000000000000001,
6 | 0x0000000000008082,
7 | 0x800000000000808A,
8 | 0x8000000080008000,
9 | 0x000000000000808B,
10 | 0x0000000080000001,
11 | 0x8000000080008081,
12 | 0x8000000000008009,
13 | 0x000000000000008A,
14 | 0x0000000000000088,
15 | 0x0000000080008009,
16 | 0x000000008000000A,
17 | 0x000000008000808B,
18 | 0x800000000000008B,
19 | 0x8000000000008089,
20 | 0x8000000000008003,
21 | 0x8000000000008002,
22 | 0x8000000000000080,
23 | 0x000000000000800A,
24 | 0x800000008000000A,
25 | 0x8000000080008081,
26 | 0x8000000000008080,
27 | 0x0000000080000001,
28 | 0x8000000080008008,
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/internal/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 | //go:build (!amd64 && !386 && !ppc64le) || appengine
6 | // +build !amd64,!386,!ppc64le appengine
7 |
8 | package sha3
9 |
10 | // A storageBuf is an aligned array of maxRate bytes.
11 | type storageBuf [maxRate]byte
12 |
13 | func (b *storageBuf) asBytes() *[maxRate]byte {
14 | return (*[maxRate]byte)(b)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/internal/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 | //go:build (!amd64 || appengine) && (!386 || appengine) && (!ppc64le || appengine)
6 | // +build !amd64 appengine
7 | // +build !386 appengine
8 | // +build !ppc64le appengine
9 |
10 | package sha3
11 |
12 | import "encoding/binary"
13 |
14 | // xorIn xors the bytes in buf into the state; it
15 | // makes no non-portable assumptions about memory layout
16 | // or alignment.
17 | func xorIn(d *State, buf []byte) {
18 | n := len(buf) / 8
19 |
20 | for i := 0; i < n; i++ {
21 | a := binary.LittleEndian.Uint64(buf)
22 | d.a[i] ^= a
23 | buf = buf[8:]
24 | }
25 | }
26 |
27 | // copyOut copies ulint64s to a byte buffer.
28 | func copyOut(d *State, b []byte) {
29 | for i := 0; len(b) >= 8; i++ {
30 | binary.LittleEndian.PutUint64(b, d.a[i])
31 | b = b[8:]
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || purego
2 | // +build !amd64 purego
3 |
4 | package fp25519
5 |
6 | func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
7 | func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
8 | func add(z, x, y *Elt) { addGeneric(z, x, y) }
9 | func sub(z, x, y *Elt) { subGeneric(z, x, y) }
10 | func addsub(x, y *Elt) { addsubGeneric(x, y) }
11 | func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
12 | func sqr(z, x *Elt) { sqrGeneric(z, x) }
13 | func modp(z *Elt) { modpGeneric(z) }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !purego
2 | // +build amd64,!purego
3 |
4 | package fp448
5 |
6 | import (
7 | "golang.org/x/sys/cpu"
8 | )
9 |
10 | var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
11 |
12 | var _ = hasBmi2Adx
13 |
14 | func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
15 | func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
16 | func add(z, x, y *Elt) { addAmd64(z, x, y) }
17 | func sub(z, x, y *Elt) { subAmd64(z, x, y) }
18 | func addsub(x, y *Elt) { addsubAmd64(x, y) }
19 | func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
20 | func sqr(z, x *Elt) { sqrAmd64(z, x) }
21 |
22 | /* Functions defined in fp_amd64.s */
23 |
24 | //go:noescape
25 | func cmovAmd64(x, y *Elt, n uint)
26 |
27 | //go:noescape
28 | func cswapAmd64(x, y *Elt, n uint)
29 |
30 | //go:noescape
31 | func addAmd64(z, x, y *Elt)
32 |
33 | //go:noescape
34 | func subAmd64(z, x, y *Elt)
35 |
36 | //go:noescape
37 | func addsubAmd64(x, y *Elt)
38 |
39 | //go:noescape
40 | func mulAmd64(z, x, y *Elt)
41 |
42 | //go:noescape
43 | func sqrAmd64(z, x *Elt)
44 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || purego
2 | // +build !amd64 purego
3 |
4 | package fp448
5 |
6 | func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
7 | func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
8 | func add(z, x, y *Elt) { addGeneric(z, x, y) }
9 | func sub(z, x, y *Elt) { subGeneric(z, x, y) }
10 | func addsub(x, y *Elt) { addsubGeneric(x, y) }
11 | func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
12 | func sqr(z, x *Elt) { sqrGeneric(z, x) }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go:
--------------------------------------------------------------------------------
1 | //go:build go1.13
2 | // +build go1.13
3 |
4 | package ed25519
5 |
6 | import cryptoEd25519 "crypto/ed25519"
7 |
8 | // PublicKey is the type of Ed25519 public keys.
9 | type PublicKey cryptoEd25519.PublicKey
10 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go:
--------------------------------------------------------------------------------
1 | //go:build !go1.13
2 | // +build !go1.13
3 |
4 | package ed25519
5 |
6 | // PublicKey is the type of Ed25519 public keys.
7 | type PublicKey []byte
8 |
--------------------------------------------------------------------------------
/vendor/github.com/codemodus/kace/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/.golangci.yml:
--------------------------------------------------------------------------------
1 | run:
2 | concurrency: 8
3 | deadline: 5m
4 | tests: false
5 | linters:
6 | enable-all: true
7 | disable:
8 | - gochecknoglobals
9 | - gocognit
10 | - gomnd
11 | - wsl
12 | - funlen
13 | - godox
14 | - goerr113
15 | - exhaustive
16 | - nestif
17 | - gofumpt
18 | - goconst
19 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/.prettierrc:
--------------------------------------------------------------------------------
1 | semi: false
2 | singleQuote: true
3 | proseWrap: always
4 | printWidth: 100
5 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/Makefile:
--------------------------------------------------------------------------------
1 | PACKAGE_DIRS := $(shell find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | sort)
2 |
3 | all:
4 | TZ= go test ./...
5 | TZ= go test ./... -short -race
6 | TZ= go test ./... -run=NONE -bench=. -benchmem
7 | env GOOS=linux GOARCH=386 go test ./...
8 | go vet
9 | golangci-lint run
10 |
11 | .PHONY: test
12 | test:
13 | TZ= PGSSLMODE=disable go test ./... -v -race
14 |
15 | tag:
16 | git tag $(VERSION)
17 | git tag extra/pgdebug/$(VERSION)
18 | git tag extra/pgotel/$(VERSION)
19 | git tag extra/pgsegment/$(VERSION)
20 |
21 | fmt:
22 | gofmt -w -s ./
23 | goimports -w -local github.com/go-pg/pg ./
24 |
25 | go_mod_tidy:
26 | go get -u && go mod tidy
27 | set -e; for dir in $(PACKAGE_DIRS); do \
28 | echo "go mod tidy in $${dir}"; \
29 | (cd "$${dir}" && \
30 | go get -u && \
31 | go mod tidy); \
32 | done
33 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | pg provides PostgreSQL client.
3 | */
4 | package pg
5 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/context.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "context"
5 | "time"
6 | )
7 |
8 | type UndoneContext struct {
9 | context.Context
10 | }
11 |
12 | func UndoContext(ctx context.Context) UndoneContext {
13 | return UndoneContext{Context: ctx}
14 | }
15 |
16 | func (UndoneContext) Deadline() (deadline time.Time, ok bool) {
17 | return time.Time{}, false
18 | }
19 |
20 | func (UndoneContext) Done() <-chan struct{} {
21 | return nil
22 | }
23 |
24 | func (UndoneContext) Err() error {
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/internal.go:
--------------------------------------------------------------------------------
1 | /*
2 | internal is a private internal package.
3 | */
4 | package internal
5 |
6 | import (
7 | "math/rand"
8 | "time"
9 | )
10 |
11 | func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration {
12 | if retry < 0 {
13 | panic("not reached")
14 | }
15 | if minBackoff == 0 {
16 | return 0
17 | }
18 |
19 | d := minBackoff << uint(retry)
20 | d = minBackoff + time.Duration(rand.Int63n(int64(d)))
21 |
22 | if d > maxBackoff || d < minBackoff {
23 | d = maxBackoff
24 | }
25 |
26 | return d
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/log.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "log"
7 | "os"
8 | )
9 |
10 | var Warn = log.New(os.Stderr, "WARN: pg: ", log.LstdFlags)
11 |
12 | var Deprecated = log.New(os.Stderr, "DEPRECATED: pg: ", log.LstdFlags)
13 |
14 | type Logging interface {
15 | Printf(ctx context.Context, format string, v ...interface{})
16 | }
17 |
18 | type logger struct {
19 | log *log.Logger
20 | }
21 |
22 | func (l *logger) Printf(ctx context.Context, format string, v ...interface{}) {
23 | _ = l.log.Output(2, fmt.Sprintf(format, v...))
24 | }
25 |
26 | var Logger Logging = &logger{
27 | log: log.New(os.Stderr, "pg: ", log.LstdFlags|log.Lshortfile),
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/safe.go:
--------------------------------------------------------------------------------
1 | //go:build appengine
2 | // +build appengine
3 |
4 | package internal
5 |
6 | func BytesToString(b []byte) string {
7 | return string(b)
8 | }
9 |
10 | func StringToBytes(s string) []byte {
11 | return []byte(s)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/strconv.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import "strconv"
4 |
5 | func Atoi(b []byte) (int, error) {
6 | return strconv.Atoi(BytesToString(b))
7 | }
8 |
9 | func ParseInt(b []byte, base int, bitSize int) (int64, error) {
10 | return strconv.ParseInt(BytesToString(b), base, bitSize)
11 | }
12 |
13 | func ParseUint(b []byte, base int, bitSize int) (uint64, error) {
14 | return strconv.ParseUint(BytesToString(b), base, bitSize)
15 | }
16 |
17 | func ParseFloat(b []byte, bitSize int) (float64, error) {
18 | return strconv.ParseFloat(BytesToString(b), bitSize)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/internal/unsafe.go:
--------------------------------------------------------------------------------
1 | //go:build !appengine
2 | // +build !appengine
3 |
4 | package internal
5 |
6 | import (
7 | "unsafe"
8 | )
9 |
10 | // BytesToString converts byte slice to string.
11 | func BytesToString(b []byte) string {
12 | return *(*string)(unsafe.Pointer(&b))
13 | }
14 |
15 | // StringToBytes converts string to byte slice.
16 | func StringToBytes(s string) []byte {
17 | return *(*[]byte)(unsafe.Pointer(
18 | &struct {
19 | string
20 | Cap int
21 | }{s, len(s)},
22 | ))
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/model_discard.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | import (
4 | "github.com/go-pg/pg/v10/types"
5 | )
6 |
7 | type Discard struct {
8 | hookStubs
9 | }
10 |
11 | var _ Model = (*Discard)(nil)
12 |
13 | func (Discard) Init() error {
14 | return nil
15 | }
16 |
17 | func (m Discard) NextColumnScanner() ColumnScanner {
18 | return m
19 | }
20 |
21 | func (m Discard) AddColumnScanner(ColumnScanner) error {
22 | return nil
23 | }
24 |
25 | func (m Discard) ScanColumn(col types.ColumnInfo, rd types.Reader, n int) error {
26 | return nil
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/model_map.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | import (
4 | "github.com/go-pg/pg/v10/types"
5 | )
6 |
7 | type mapModel struct {
8 | hookStubs
9 | ptr *map[string]interface{}
10 | m map[string]interface{}
11 | }
12 |
13 | var _ Model = (*mapModel)(nil)
14 |
15 | func newMapModel(ptr *map[string]interface{}) *mapModel {
16 | model := &mapModel{
17 | ptr: ptr,
18 | }
19 | if ptr != nil {
20 | model.m = *ptr
21 | }
22 | return model
23 | }
24 |
25 | func (m *mapModel) Init() error {
26 | return nil
27 | }
28 |
29 | func (m *mapModel) NextColumnScanner() ColumnScanner {
30 | if m.m == nil {
31 | m.m = make(map[string]interface{})
32 | *m.ptr = m.m
33 | }
34 | return m
35 | }
36 |
37 | func (m mapModel) AddColumnScanner(ColumnScanner) error {
38 | return nil
39 | }
40 |
41 | func (m *mapModel) ScanColumn(col types.ColumnInfo, rd types.Reader, n int) error {
42 | val, err := types.ReadColumnValue(col, rd, n)
43 | if err != nil {
44 | return err
45 | }
46 |
47 | m.m[col.Name] = val
48 | return nil
49 | }
50 |
51 | func (mapModel) useQueryOne() bool {
52 | return true
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/model_map_slice.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | type mapSliceModel struct {
4 | mapModel
5 | slice *[]map[string]interface{}
6 | }
7 |
8 | var _ Model = (*mapSliceModel)(nil)
9 |
10 | func newMapSliceModel(ptr *[]map[string]interface{}) *mapSliceModel {
11 | return &mapSliceModel{
12 | slice: ptr,
13 | }
14 | }
15 |
16 | func (m *mapSliceModel) Init() error {
17 | slice := *m.slice
18 | if len(slice) > 0 {
19 | *m.slice = slice[:0]
20 | }
21 | return nil
22 | }
23 |
24 | func (m *mapSliceModel) NextColumnScanner() ColumnScanner {
25 | slice := *m.slice
26 | if len(slice) == cap(slice) {
27 | m.mapModel.m = make(map[string]interface{})
28 | *m.slice = append(slice, m.mapModel.m) //nolint:gocritic
29 | return m
30 | }
31 |
32 | slice = slice[:len(slice)+1]
33 | el := slice[len(slice)-1]
34 | if el != nil {
35 | m.mapModel.m = el
36 | } else {
37 | el = make(map[string]interface{})
38 | slice[len(slice)-1] = el
39 | m.mapModel.m = el
40 | }
41 | *m.slice = slice
42 | return m
43 | }
44 |
45 | func (mapSliceModel) useQueryOne() {} //nolint:unused
46 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/model_slice.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | import (
4 | "reflect"
5 |
6 | "github.com/go-pg/pg/v10/internal"
7 | "github.com/go-pg/pg/v10/types"
8 | )
9 |
10 | type sliceModel struct {
11 | Discard
12 | slice reflect.Value
13 | nextElem func() reflect.Value
14 | scan func(reflect.Value, types.Reader, int) error
15 | }
16 |
17 | var _ Model = (*sliceModel)(nil)
18 |
19 | func newSliceModel(slice reflect.Value, elemType reflect.Type) *sliceModel {
20 | return &sliceModel{
21 | slice: slice,
22 | scan: types.Scanner(elemType),
23 | }
24 | }
25 |
26 | func (m *sliceModel) Init() error {
27 | if m.slice.IsValid() && m.slice.Len() > 0 {
28 | m.slice.Set(m.slice.Slice(0, 0))
29 | }
30 | return nil
31 | }
32 |
33 | func (m *sliceModel) NextColumnScanner() ColumnScanner {
34 | return m
35 | }
36 |
37 | func (m *sliceModel) ScanColumn(col types.ColumnInfo, rd types.Reader, n int) error {
38 | if m.nextElem == nil {
39 | m.nextElem = internal.MakeSliceNextElemFunc(m.slice)
40 | }
41 | v := m.nextElem()
42 | return m.scan(v, rd, n)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/relation.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/go-pg/pg/v10/types"
7 | )
8 |
9 | const (
10 | InvalidRelation = iota
11 | HasOneRelation
12 | BelongsToRelation
13 | HasManyRelation
14 | Many2ManyRelation
15 | )
16 |
17 | type Relation struct {
18 | Type int
19 | Field *Field
20 | JoinTable *Table
21 | BaseFKs []*Field
22 | JoinFKs []*Field
23 | Polymorphic *Field
24 |
25 | M2MTableName types.Safe
26 | M2MTableAlias types.Safe
27 | M2MBaseFKs []string
28 | M2MJoinFKs []string
29 | }
30 |
31 | func (r *Relation) String() string {
32 | return fmt.Sprintf("relation=%s", r.Field.GoName)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/result.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | // Result summarizes an executed SQL command.
4 | type Result interface {
5 | Model() Model
6 |
7 | // RowsAffected returns the number of rows affected by SELECT, INSERT, UPDATE,
8 | // or DELETE queries. It returns -1 if query can't possibly affect any rows,
9 | // e.g. in case of CREATE or SHOW queries.
10 | RowsAffected() int
11 |
12 | // RowsReturned returns the number of rows returned by the query.
13 | RowsReturned() int
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/orm/table_params.go:
--------------------------------------------------------------------------------
1 | package orm
2 |
3 | import "reflect"
4 |
5 | type tableParams struct {
6 | table *Table
7 | strct reflect.Value
8 | }
9 |
10 | func newTableParams(strct interface{}) (*tableParams, bool) {
11 | v := reflect.ValueOf(strct)
12 | if !v.IsValid() {
13 | return nil, false
14 | }
15 |
16 | v = reflect.Indirect(v)
17 | if v.Kind() != reflect.Struct {
18 | return nil, false
19 | }
20 |
21 | return &tableParams{
22 | table: GetTable(v.Type()),
23 | strct: v,
24 | }, true
25 | }
26 |
27 | func (m *tableParams) AppendParam(fmter QueryFormatter, b []byte, name string) ([]byte, bool) {
28 | return m.table.AppendParam(b, m.strct, name)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/pgjson/json.go:
--------------------------------------------------------------------------------
1 | package pgjson
2 |
3 | import (
4 | "encoding/json"
5 | "io"
6 | )
7 |
8 | var _ Provider = (*StdProvider)(nil)
9 |
10 | type StdProvider struct{}
11 |
12 | func (StdProvider) Marshal(v interface{}) ([]byte, error) {
13 | return json.Marshal(v)
14 | }
15 |
16 | func (StdProvider) Unmarshal(data []byte, v interface{}) error {
17 | return json.Unmarshal(data, v)
18 | }
19 |
20 | func (StdProvider) NewEncoder(w io.Writer) Encoder {
21 | return json.NewEncoder(w)
22 | }
23 |
24 | func (StdProvider) NewDecoder(r io.Reader) Decoder {
25 | return json.NewDecoder(r)
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/pgjson/provider.go:
--------------------------------------------------------------------------------
1 | package pgjson
2 |
3 | import (
4 | "io"
5 | )
6 |
7 | var provider Provider = StdProvider{}
8 |
9 | func SetProvider(p Provider) {
10 | provider = p
11 | }
12 |
13 | type Provider interface {
14 | Marshal(v interface{}) ([]byte, error)
15 | Unmarshal(data []byte, v interface{}) error
16 | NewEncoder(w io.Writer) Encoder
17 | NewDecoder(r io.Reader) Decoder
18 | }
19 |
20 | type Decoder interface {
21 | Decode(v interface{}) error
22 | UseNumber()
23 | }
24 |
25 | type Encoder interface {
26 | Encode(v interface{}) error
27 | }
28 |
29 | func Marshal(v interface{}) ([]byte, error) {
30 | return provider.Marshal(v)
31 | }
32 |
33 | func Unmarshal(data []byte, v interface{}) error {
34 | return provider.Unmarshal(data, v)
35 | }
36 |
37 | func NewEncoder(w io.Writer) Encoder {
38 | return provider.NewEncoder(w)
39 | }
40 |
41 | func NewDecoder(r io.Reader) Decoder {
42 | return provider.NewDecoder(r)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/result.go:
--------------------------------------------------------------------------------
1 | package pg
2 |
3 | import (
4 | "bytes"
5 | "strconv"
6 |
7 | "github.com/go-pg/pg/v10/internal"
8 | "github.com/go-pg/pg/v10/orm"
9 | )
10 |
11 | // Result summarizes an executed SQL command.
12 | type Result = orm.Result
13 |
14 | // A result summarizes an executed SQL command.
15 | type result struct {
16 | model orm.Model
17 |
18 | affected int
19 | returned int
20 | }
21 |
22 | var _ Result = (*result)(nil)
23 |
24 | //nolint
25 | func (res *result) parse(b []byte) error {
26 | res.affected = -1
27 |
28 | ind := bytes.LastIndexByte(b, ' ')
29 | if ind == -1 {
30 | return nil
31 | }
32 |
33 | s := internal.BytesToString(b[ind+1 : len(b)-1])
34 |
35 | affected, err := strconv.Atoi(s)
36 | if err == nil {
37 | res.affected = affected
38 | }
39 |
40 | return nil
41 | }
42 |
43 | func (res *result) Model() orm.Model {
44 | return res.model
45 | }
46 |
47 | func (res *result) RowsAffected() int {
48 | return res.affected
49 | }
50 |
51 | func (res *result) RowsReturned() int {
52 | return res.returned
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/types/append_ident.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import "github.com/go-pg/pg/v10/internal"
4 |
5 | func AppendIdent(b []byte, field string, flags int) []byte {
6 | return appendIdent(b, internal.StringToBytes(field), flags)
7 | }
8 |
9 | func AppendIdentBytes(b []byte, field []byte, flags int) []byte {
10 | return appendIdent(b, field, flags)
11 | }
12 |
13 | func appendIdent(b, src []byte, flags int) []byte {
14 | var quoted bool
15 | loop:
16 | for _, c := range src {
17 | switch c {
18 | case '*':
19 | if !quoted {
20 | b = append(b, '*')
21 | continue loop
22 | }
23 | case '.':
24 | if quoted && hasFlag(flags, quoteFlag) {
25 | b = append(b, '"')
26 | quoted = false
27 | }
28 | b = append(b, '.')
29 | continue loop
30 | }
31 |
32 | if !quoted && hasFlag(flags, quoteFlag) {
33 | b = append(b, '"')
34 | quoted = true
35 | }
36 | if c == '"' {
37 | b = append(b, '"', '"')
38 | } else {
39 | b = append(b, c)
40 | }
41 | }
42 | if quoted && hasFlag(flags, quoteFlag) {
43 | b = append(b, '"')
44 | }
45 | return b
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/types/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | The API in this package is not stable and may change without any notice.
3 | */
4 | package types
5 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/types/flags.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import "reflect"
4 |
5 | const (
6 | quoteFlag = 1 << iota
7 | arrayFlag
8 | subArrayFlag
9 | )
10 |
11 | func hasFlag(flags, flag int) bool {
12 | return flags&flag == flag
13 | }
14 |
15 | func shouldQuoteArray(flags int) bool {
16 | return hasFlag(flags, quoteFlag) && !hasFlag(flags, subArrayFlag)
17 | }
18 |
19 | func nilable(v reflect.Value) bool {
20 | switch v.Kind() {
21 | case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
22 | return true
23 | }
24 | return false
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/types/types.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import (
4 | "github.com/go-pg/pg/v10/internal/pool"
5 | )
6 |
7 | type Reader = pool.Reader
8 |
9 | type ValueScanner interface {
10 | ScanValue(rd Reader, n int) error
11 | }
12 |
13 | type ValueAppender interface {
14 | AppendValue(b []byte, flags int) ([]byte, error)
15 | }
16 |
17 | //------------------------------------------------------------------------------
18 |
19 | // Safe represents a safe SQL query.
20 | type Safe string
21 |
22 | var _ ValueAppender = (*Safe)(nil)
23 |
24 | func (q Safe) AppendValue(b []byte, flags int) ([]byte, error) {
25 | return append(b, q...), nil
26 | }
27 |
28 | //------------------------------------------------------------------------------
29 |
30 | // Ident represents a SQL identifier, e.g. table or column name.
31 | type Ident string
32 |
33 | var _ ValueAppender = (*Ident)(nil)
34 |
35 | func (f Ident) AppendValue(b []byte, flags int) ([]byte, error) {
36 | return AppendIdent(b, string(f), flags), nil
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/pg/v10/version.go:
--------------------------------------------------------------------------------
1 | package pg
2 |
3 | // Version is the current release version.
4 | func Version() string {
5 | return "10.11.0"
6 | }
7 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: xenial
2 | sudo: false
3 | language: go
4 |
5 | go:
6 | - 1.13.x
7 | - 1.14.x
8 | - tip
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | env:
15 | - GO111MODULE=on
16 |
17 | go_import_path: github.com/go-pg/urlstruct
18 |
19 | before_install:
20 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
21 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | go test ./...
3 | go test ./... -short -race
4 | go test ./... -run=NONE -bench=. -benchmem
5 | env GOOS=linux GOARCH=386 go test ./...
6 | golangci-lint run
7 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/field.go:
--------------------------------------------------------------------------------
1 | package urlstruct
2 |
3 | import (
4 | "reflect"
5 |
6 | "github.com/vmihailenco/tagparser"
7 | )
8 |
9 | type Field struct {
10 | Type reflect.Type
11 | Name string
12 | Index []int
13 | Tag *tagparser.Tag
14 |
15 | noDecode bool
16 | scanValue scannerFunc
17 | }
18 |
19 | func (f *Field) init() {
20 | _, f.noDecode = f.Tag.Options["nodecode"]
21 |
22 | if f.Type.Kind() == reflect.Slice {
23 | f.scanValue = sliceScanner(f.Type)
24 | } else {
25 | f.scanValue = scanner(f.Type)
26 | }
27 | }
28 |
29 | func (f *Field) Value(strct reflect.Value) reflect.Value {
30 | return strct.FieldByIndex(f.Index)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:base"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/struct_info_map.go:
--------------------------------------------------------------------------------
1 | package urlstruct
2 |
3 | import (
4 | "fmt"
5 | "reflect"
6 | "sync"
7 | )
8 |
9 | var globalMap structInfoMap
10 |
11 | func DescribeStruct(typ reflect.Type) *StructInfo {
12 | return globalMap.DescribeStruct(typ)
13 | }
14 |
15 | type structInfoMap struct {
16 | m sync.Map
17 | }
18 |
19 | func (m *structInfoMap) DescribeStruct(typ reflect.Type) *StructInfo {
20 | if typ.Kind() == reflect.Ptr {
21 | typ = typ.Elem()
22 | }
23 | if typ.Kind() != reflect.Struct {
24 | panic(fmt.Errorf("got %s, wanted %s", typ.Kind(), reflect.Struct))
25 | }
26 |
27 | if v, ok := m.m.Load(typ); ok {
28 | return v.(*StructInfo)
29 | }
30 |
31 | sinfo := newStructInfo(typ)
32 | if v, loaded := m.m.LoadOrStore(typ, sinfo); loaded {
33 | return v.(*StructInfo)
34 | }
35 | return sinfo
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/go-pg/urlstruct/urlstruct.go:
--------------------------------------------------------------------------------
1 | package urlstruct
2 |
3 | import (
4 | "context"
5 | "net/url"
6 | "reflect"
7 | )
8 |
9 | // Unmarshal unmarshals the URL query values into the struct.
10 | func Unmarshal(ctx context.Context, values url.Values, strct interface{}) error {
11 | d := newStructDecoder(reflect.ValueOf(strct))
12 | return d.Decode(ctx, values)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .debug
3 | .vscode
4 | .env*
5 | coverage.txt
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/animation.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Animation https://core.telegram.org/bots/api#animation
4 | type Animation struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Width int `json:"width"`
8 | Height int `json:"height"`
9 | Duration int `json:"duration"`
10 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
11 | FileName string `json:"file_name,omitempty"`
12 | MimeType string `json:"mime_type,omitempty"`
13 | FileSize int64 `json:"file_size,omitempty"`
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/audio.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Audio https://core.telegram.org/bots/api#audio
4 | type Audio struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Duration int `json:"duration"`
8 | Performer string `json:"performer,omitempty"`
9 | Title string `json:"title,omitempty"`
10 | FileName string `json:"file_name,omitempty"`
11 | MimeType string `json:"mime_type,omitempty"`
12 | FileSize int64 `json:"file_size,omitempty"`
13 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/bot_command.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // BotCommand https://core.telegram.org/bots/api#botcommand
4 | type BotCommand struct {
5 | Command string `json:"command" rules:"min:1,max:32"`
6 | Description string `json:"description" rules:"min:1,max:256"`
7 | }
8 |
9 | // BotName https://core.telegram.org/bots/api#botname
10 | type BotName struct {
11 | Name string `json:"name"`
12 | }
13 |
14 | // BotDescription https://core.telegram.org/bots/api#botdescription
15 | type BotDescription struct {
16 | Description string `json:"description"`
17 | }
18 |
19 | // BotShortDescription https://core.telegram.org/bots/api#botshortdescription
20 | type BotShortDescription struct {
21 | ShortDescription string `json:"short_description"`
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/callback_query.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // CallbackQuery https://core.telegram.org/bots/api#callbackquery
4 | type CallbackQuery struct {
5 | ID string `json:"id"`
6 | From User `json:"from,omitempty"`
7 | Message MaybeInaccessibleMessage `json:"message,omitempty"`
8 | InlineMessageID string `json:"inline_message_id,omitempty"`
9 | ChatInstance string `json:"chat_instance,omitempty"`
10 | Data string `json:"data,omitempty"`
11 | GameShortName string `json:"game_short_name,omitempty"`
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/chat_action.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | type ChatAction string
4 |
5 | const (
6 | ChatActionTyping ChatAction = "typing"
7 | ChatActionUploadPhoto ChatAction = "upload_photo"
8 | ChatActionRecordVideo ChatAction = "record_video"
9 | ChatActionUploadVideo ChatAction = "upload_video"
10 | ChatActionRecordVoice ChatAction = "record_voice"
11 | ChatActionUploadVoice ChatAction = "upload_voice"
12 | ChatActionUploadDocument ChatAction = "upload_document"
13 | ChatActionChooseSticker ChatAction = "choose_sticker"
14 | ChatActionFindLocation ChatAction = "find_location"
15 | ChatActionRecordVideoNote ChatAction = "record_video_note"
16 | ChatActionUploadVideoNote ChatAction = "upload_video_note"
17 | )
18 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/chosen_inline_result.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // ChosenInlineResult https://core.telegram.org/bots/api#choseninlineresult
4 | type ChosenInlineResult struct {
5 | ResultID string `json:"result_id"`
6 | From User `json:"from"`
7 | Location *Location `json:"location,omitempty"`
8 | InlineMessageID string `json:"inline_message_id,omitempty"`
9 | Query string `json:"query"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/contact.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Contact https://core.telegram.org/bots/api#contact
4 | type Contact struct {
5 | PhoneNumber string `json:"phone_number"`
6 | FirstName string `json:"first_name"`
7 | LastName string `json:"last_name,omitempty"`
8 | UserID int64 `json:"user_id,omitempty"`
9 | VCard string `json:"vcard,omitempty"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/dice.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Dice https://core.telegram.org/bots/api#dice
4 | type Dice struct {
5 | Emoji string `json:"emoji"`
6 | Value int `json:"value"`
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/document.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Document https://core.telegram.org/bots/api#document
4 | type Document struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
8 | FileName string `json:"file_name,omitempty"`
9 | MimeType string `json:"mime_type,omitempty"`
10 | FileSize int64 `json:"file_size,omitempty"`
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/file.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // File https://core.telegram.org/bots/api#file
4 | type File struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | FileSize int64 `json:"file_size,omitempty"`
8 | FilePath string `json:"file_path,omitempty"`
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/game.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Game https://core.telegram.org/bots/api#game
4 | type Game struct {
5 | Title string `json:"title"`
6 | Description string `json:"description"`
7 | Photo []PhotoSize `json:"photo"`
8 | Text string `json:"text,omitempty"`
9 | TextEntities []MessageEntity `json:"text_entities,omitempty"`
10 | Animation *Animation `json:"animation,omitempty"`
11 | }
12 |
13 | // GameHighScore https://core.telegram.org/bots/api#gamehighscore
14 | type GameHighScore struct {
15 | Position int `json:"position"`
16 | User User `json:"user"`
17 | Score int `json:"score"`
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/gift.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Gifts https://core.telegram.org/bots/api#gifts
4 | type Gifts struct {
5 | Gifts []Gift `json:"gifts"`
6 | }
7 |
8 | // Gift https://core.telegram.org/bots/api#gift
9 | type Gift struct {
10 | ID string `json:"id"`
11 | Sticker Sticker `json:"sticker"`
12 | StarCount int `json:"star_count"`
13 | UpgradeStarCount int `json:"upgrade_star_count,omitempty"`
14 | TotalCount int `json:"total_count,omitempty"`
15 | RemainingCount int `json:"remaining_count,omitempty"`
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/input_file.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | import (
4 | "encoding/json"
5 | "io"
6 | )
7 |
8 | type InputFileType int
9 |
10 | // InputFile https://core.telegram.org/bots/api#inputfile
11 | type InputFile interface {
12 | inputFileTag()
13 | }
14 |
15 | type InputFileUpload struct {
16 | Filename string
17 | Data io.Reader
18 | }
19 |
20 | func (*InputFileUpload) inputFileTag() {}
21 |
22 | func (i *InputFileUpload) MarshalJSON() ([]byte, error) {
23 | return []byte(`"@` + i.Filename + `"`), nil
24 | }
25 |
26 | type InputFileString struct {
27 | Data string
28 | }
29 |
30 | func (*InputFileString) inputFileTag() {}
31 |
32 | func (i *InputFileString) MarshalJSON() ([]byte, error) {
33 | return []byte(`"` + i.Data + `"`), nil
34 | }
35 |
36 | func (i *InputFileString) UnmarshalJSON(data []byte) error {
37 | return json.Unmarshal(data, &i.Data)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/invoice.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Invoice https://core.telegram.org/bots/api#invoice
4 | type Invoice struct {
5 | Title string `json:"title"`
6 | Description string `json:"description"`
7 | StartParameter string `json:"start_parameter"`
8 | Currency string `json:"currency"`
9 | TotalAmount int `json:"total_amount"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/link_preview.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // LinkPreviewOptions https://core.telegram.org/bots/api#linkpreviewoptions
4 | type LinkPreviewOptions struct {
5 | IsDisabled *bool `json:"is_disabled,omitempty"`
6 | URL *string `json:"url,omitempty"`
7 | PreferSmallMedia *bool `json:"prefer_small_media,omitempty"`
8 | PreferLargeMedia *bool `json:"prefer_large_media,omitempty"`
9 | ShowAboveText *bool `json:"show_above_text,omitempty"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/location.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Location https://core.telegram.org/bots/api#location
4 | type Location struct {
5 | Longitude float64 `json:"longitude"`
6 | Latitude float64 `json:"latitude"`
7 | HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
8 | LivePeriod int `json:"live_period,omitempty"`
9 | Heading int `json:"heading,omitempty"`
10 | ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/order_info.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // OrderInfo https://core.telegram.org/bots/api#orderinfo
4 | type OrderInfo struct {
5 | Name string `json:"name,omitempty"`
6 | PhoneNumber string `json:"phone_number,omitempty"`
7 | Email string `json:"email,omitempty"`
8 | ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/parse_mode.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | type ParseMode string
4 |
5 | const (
6 | ParseModeMarkdownV1 ParseMode = "Markdown"
7 | ParseModeMarkdown ParseMode = "MarkdownV2"
8 | ParseModeHTML ParseMode = "HTML"
9 | )
10 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/photo_size.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // PhotoSize https://core.telegram.org/bots/api#photosize
4 | type PhotoSize struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Width int `json:"width"`
8 | Height int `json:"height"`
9 | FileSize int `json:"file_size"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/pre_checkout_query.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // PreCheckoutQuery https://core.telegram.org/bots/api#precheckoutquery
4 | type PreCheckoutQuery struct {
5 | ID string `json:"id"`
6 | From *User `json:"from"`
7 | Currency string `json:"currency"`
8 | TotalAmount int `json:"total_amount"`
9 | InvoicePayload string `json:"invoice_payload"`
10 | ShippingOptionID string `json:"shipping_option_id,omitempty"`
11 | OrderInfo *OrderInfo `json:"order_info,omitempty"`
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/proximity_alert_triggered.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // ProximityAlertTriggered https://core.telegram.org/bots/api#proximityalerttriggered
4 | type ProximityAlertTriggered struct {
5 | Traveler User `json:"traveler"`
6 | Watcher User `json:"watcher"`
7 | Distance int `json:"distance"`
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/shipping_query.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // ShippingAddress https://core.telegram.org/bots/api#shippingaddress
4 | type ShippingAddress struct {
5 | CountryCode string `json:"country_code"`
6 | State string `json:"state"`
7 | City string `json:"city"`
8 | StreetLine1 string `json:"street_line1"`
9 | StreetLine2 string `json:"street_line2"`
10 | PostCode string `json:"post_code"`
11 | }
12 |
13 | // ShippingQuery https://core.telegram.org/bots/api#shippingquery
14 | type ShippingQuery struct {
15 | ID string `json:"id"`
16 | From *User `json:"from"`
17 | InvoicePayload string `json:"invoice_payload"`
18 | ShippingAddress ShippingAddress `json:"shipping_address"`
19 | }
20 |
21 | // ShippingOption https://core.telegram.org/bots/api#shippingoption
22 | type ShippingOption struct {
23 | ID string `json:"id"`
24 | Title string `json:"title"`
25 | Prices []LabeledPrice `json:"prices"`
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/sticker_set.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // StickerSet https://core.telegram.org/bots/api#stickerset
4 | type StickerSet struct {
5 | Name string `json:"name"`
6 | Title string `json:"title"`
7 | StickerType string `json:"sticker_type"`
8 | Stickers []Sticker `json:"stickers"`
9 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/story.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | type Story struct {
4 | Chat Chat `json:"chat"`
5 | ID int `json:"id"`
6 | }
7 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/venue.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Venue https://core.telegram.org/bots/api#venue
4 | type Venue struct {
5 | Location Location `json:"location"`
6 | Title string `json:"title"`
7 | Address string `json:"address"`
8 | FoursquareID string `json:"foursquare_id,omitempty"`
9 | FoursquareType string `json:"foursquare_type,omitempty"`
10 | GooglePlaceID string `json:"google_place_id,omitempty"`
11 | GooglePlaceType string `json:"google_place_type,omitempty"`
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/video.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Video https://core.telegram.org/bots/api#video
4 | type Video struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Width int `json:"width"`
8 | Height int `json:"height"`
9 | Duration int `json:"duration"`
10 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
11 | Cover []PhotoSize `json:"cover,omitempty"`
12 | StartTimestamp int `json:"start_timestamp,omitempty"`
13 | FileName string `json:"file_name,omitempty"`
14 | MimeType string `json:"mime_type,omitempty"`
15 | FileSize int64 `json:"file_size,omitempty"`
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/video_chat.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // VideoChatScheduled https://core.telegram.org/bots/api#videochatscheduled
4 | type VideoChatScheduled struct {
5 | StartDate int `json:"start_date"`
6 | }
7 |
8 | // VideoChatStarted https://core.telegram.org/bots/api#videochatstarted
9 | type VideoChatStarted struct {
10 | Duration int `json:"duration"`
11 | }
12 |
13 | // VideoChatEnded https://core.telegram.org/bots/api#videochatended
14 | type VideoChatEnded struct {
15 | Duration int `json:"duration"`
16 | }
17 |
18 | // VideoChatParticipantsInvited https://core.telegram.org/bots/api#videochatparticipantsinvited
19 | type VideoChatParticipantsInvited struct {
20 | Users []User `json:"users"`
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/video_note.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // VideoNote https://core.telegram.org/bots/api#videonote
4 | type VideoNote struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Length int `json:"length"`
8 | Duration int `json:"duration"`
9 | Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
10 | FileSize int `json:"file_size,omitempty"`
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/voice.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // Voice https://core.telegram.org/bots/api#voice
4 | type Voice struct {
5 | FileID string `json:"file_id"`
6 | FileUniqueID string `json:"file_unique_id"`
7 | Duration int `json:"duration"`
8 | MimeType string `json:"mime_type,omitempty"`
9 | FileSize int64 `json:"file_size,omitempty"`
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/voice_chat.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // VoiceChatScheduled https://core.telegram.org/bots/api#videochatscheduled
4 | type VoiceChatScheduled struct {
5 | StartDate int `json:"start_date"`
6 | }
7 |
8 | // VoiceChatStarted https://core.telegram.org/bots/api#videochatstarted
9 | type VoiceChatStarted struct {
10 | Duration int `json:"duration"`
11 | }
12 |
13 | // VoiceChatEnded https://core.telegram.org/bots/api#videochatended
14 | type VoiceChatEnded struct {
15 | Duration int `json:"duration"`
16 | }
17 |
18 | // VoiceChatParticipantsInvited https://core.telegram.org/bots/api#videochatparticipantsinvited
19 | type VoiceChatParticipantsInvited struct {
20 | Users []User `json:"users"`
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/web_app.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // WebAppData https://core.telegram.org/bots/api#webappdata
4 | type WebAppData struct {
5 | Data string `json:"data"`
6 | ButtonText string `json:"button_text"`
7 | }
8 |
9 | // WebAppInfo https://core.telegram.org/bots/api#webappinfo
10 | type WebAppInfo struct {
11 | URL string `json:"url"`
12 | }
13 |
14 | // SentWebAppMessage https://core.telegram.org/bots/api#sentwebappmessage
15 | type SentWebAppMessage struct {
16 | InlineMessageID string `json:"inline_message_id"`
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/models/web_hook_info.go:
--------------------------------------------------------------------------------
1 | package models
2 |
3 | // WebhookInfo https://core.telegram.org/bots/api#webhookinfo
4 | type WebhookInfo struct {
5 | URL string `json:"url"`
6 | HasCustomCertificate bool `json:"has_custom_certificate"`
7 | PendingUpdateCount int `json:"pending_update_count"`
8 | IPAddress string `json:"ip_address,omitempty"`
9 | LastErrorDate int `json:"last_error_date,omitempty"`
10 | LastErrorMessage string `json:"last_error_message,omitempty"`
11 | LastSynchronizationErrorDate int `json:"last_synchronization_error_date,omitempty"`
12 | MaxConnections int `json:"max_connections,omitempty"`
13 | AllowedUpdates []string `json:"allowed_updates,omitempty"`
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/process_update.go:
--------------------------------------------------------------------------------
1 | package bot
2 |
3 | import (
4 | "context"
5 |
6 | "github.com/go-telegram/bot/models"
7 | )
8 |
9 | func applyMiddlewares(h HandlerFunc, m ...Middleware) HandlerFunc {
10 | if len(m) < 1 {
11 | return h
12 | }
13 | wrapped := h
14 | for i := len(m) - 1; i >= 0; i-- {
15 | wrapped = m[i](wrapped)
16 | }
17 | return wrapped
18 | }
19 |
20 | // ProcessUpdate allows you to process update
21 | func (b *Bot) ProcessUpdate(ctx context.Context, upd *models.Update) {
22 | h := b.findHandler(upd)
23 |
24 | r := applyMiddlewares(h, b.middlewares...)
25 |
26 | if b.notAsyncHandlers {
27 | r(ctx, b, upd)
28 | return
29 | }
30 |
31 | go r(ctx, b, upd)
32 | }
33 |
34 | func (b *Bot) findHandler(upd *models.Update) HandlerFunc {
35 | b.handlersMx.RLock()
36 | defer b.handlersMx.RUnlock()
37 |
38 | for _, h := range b.handlers {
39 | if h.match(upd) {
40 | return h.handler
41 | }
42 | }
43 |
44 | return b.defaultHandlerFunc
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/go-telegram/bot/wait_updates.go:
--------------------------------------------------------------------------------
1 | package bot
2 |
3 | import (
4 | "context"
5 | "sync"
6 | )
7 |
8 | // waitUpdates listen Updates channel and run ProcessUpdate
9 | func (b *Bot) waitUpdates(ctx context.Context, wg *sync.WaitGroup) {
10 | defer wg.Done()
11 |
12 | for {
13 | select {
14 | case <-ctx.Done():
15 | return
16 | case upd := <-b.updates:
17 | b.ProcessUpdate(ctx, upd)
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/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/github.com/golang/protobuf/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/github.com/google/go-github/v55/github/actions.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | // ActionsService handles communication with the actions related
9 | // methods of the GitHub API.
10 | //
11 | // GitHub API docs: https://docs.github.com/en/rest/actions/
12 | type ActionsService service
13 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/dependabot.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | // DependabotService handles communication with the Dependabot related
9 | // methods of the GitHub API.
10 | //
11 | // GitHub API docs: https://docs.github.com/en/rest/dependabot/
12 | type DependabotService service
13 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/enterprise.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | // EnterpriseService provides access to the enterprise related functions
9 | // in the GitHub API.
10 | //
11 | // GitHub API docs: https://docs.github.com/en/rest/enterprise-admin/
12 | type EnterpriseService service
13 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/enterprise_audit_log.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | import (
9 | "context"
10 | "fmt"
11 | )
12 |
13 | // GetAuditLog gets the audit-log entries for an organization.
14 | //
15 | // GitHub API docs: https://docs.github.com/en/rest/enterprise-admin/audit-log#get-the-audit-log-for-an-enterprise
16 | func (s *EnterpriseService) GetAuditLog(ctx context.Context, enterprise string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error) {
17 | u := fmt.Sprintf("enterprises/%v/audit-log", enterprise)
18 | u, err := addOptions(u, opts)
19 | if err != nil {
20 | return nil, nil, err
21 | }
22 |
23 | req, err := s.client.NewRequest("GET", u, nil)
24 | if err != nil {
25 | return nil, nil, err
26 | }
27 |
28 | var auditEntries []*AuditEntry
29 | resp, err := s.client.Do(ctx, req, &auditEntries)
30 | if err != nil {
31 | return nil, resp, err
32 | }
33 |
34 | return auditEntries, resp, nil
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/git.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | // GitService handles communication with the git data related
9 | // methods of the GitHub API.
10 | //
11 | // GitHub API docs: https://docs.github.com/en/rest/git/
12 | type GitService service
13 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/pulls_threads.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package github
7 |
8 | // PullRequestThread represents a thread of comments on a pull request.
9 | type PullRequestThread struct {
10 | ID *int64 `json:"id,omitempty"`
11 | NodeID *string `json:"node_id,omitempty"`
12 | Comments []*PullRequestComment `json:"comments,omitempty"`
13 | }
14 |
15 | func (p PullRequestThread) String() string {
16 | return Stringify(p)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/with_appengine.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | //go:build appengine
7 | // +build appengine
8 |
9 | // This file provides glue for making github work on App Engine.
10 |
11 | package github
12 |
13 | import (
14 | "context"
15 | "net/http"
16 | )
17 |
18 | func withContext(ctx context.Context, req *http.Request) *http.Request {
19 | // No-op because App Engine adds context to a request differently.
20 | return req
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-github/v55/github/without_appengine.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The go-github AUTHORS. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | //go:build !appengine
7 | // +build !appengine
8 |
9 | // This file provides glue for making github work without App Engine.
10 |
11 | package github
12 |
13 | import (
14 | "context"
15 | "net/http"
16 | )
17 |
18 | func withContext(ctx context.Context, req *http.Request) *http.Request {
19 | return req.WithContext(ctx)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/inflection/wercker.yml:
--------------------------------------------------------------------------------
1 | box: golang
2 |
3 | build:
4 | steps:
5 | - setup-go-workspace
6 |
7 | # Gets the dependencies
8 | - script:
9 | name: go get
10 | code: |
11 | go get
12 |
13 | # Build the project
14 | - script:
15 | name: go build
16 | code: |
17 | go build ./...
18 |
19 | # Test the project
20 | - script:
21 | name: go test
22 | code: |
23 | go test ./...
24 |
--------------------------------------------------------------------------------
/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2012 Matt T. Proud (matt.proud@gmail.com)
2 |
--------------------------------------------------------------------------------
/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore:
--------------------------------------------------------------------------------
1 | cover.dat
2 |
--------------------------------------------------------------------------------
/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 |
3 | cover:
4 | go test -cover -v -coverprofile=cover.dat ./...
5 | go tool cover -func cover.dat
6 |
7 | .PHONY: cover
8 |
--------------------------------------------------------------------------------
/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 Matt T. Proud
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | // Package pbutil provides record length-delimited Protocol Buffer streaming.
16 | package pbutil
17 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/NOTICE:
--------------------------------------------------------------------------------
1 | Prometheus instrumentation library for Go applications
2 | Copyright 2012-2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
7 |
8 | The following components are included in this product:
9 |
10 | perks - a fork of https://github.com/bmizerany/perks
11 | https://github.com/beorn7/perks
12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein
13 | See https://github.com/beorn7/perks/blob/master/README.md for license details.
14 |
15 | Go support for Protocol Buffers - Google's data interchange format
16 | http://github.com/golang/protobuf/
17 | Copyright 2010 The Go Authors
18 | See source code for license details.
19 |
20 | Support for streaming Protocol Buffer messages for the Go language (golang).
21 | https://github.com/matttproud/golang_protobuf_extensions
22 | Copyright 2013 Matt T. Proud
23 | Licensed under the Apache License, Version 2.0
24 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/.gitignore:
--------------------------------------------------------------------------------
1 | command-line-arguments.test
2 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/README.md:
--------------------------------------------------------------------------------
1 | See [](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus).
2 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/get_pid.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !js || wasm
15 | // +build !js wasm
16 |
17 | package prometheus
18 |
19 | import "os"
20 |
21 | func getPIDFn() func() (int, error) {
22 | pid := os.Getpid()
23 | return func() (int, error) {
24 | return pid, nil
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js && !wasm
15 | // +build js,!wasm
16 |
17 | package prometheus
18 |
19 | func getPIDFn() func() (int, error) {
20 | return func() (int, error) {
21 | return 1, nil
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/num_threads.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !js || wasm
15 | // +build !js wasm
16 |
17 | package prometheus
18 |
19 | import "runtime"
20 |
21 | // getRuntimeNumThreads returns the number of open OS threads.
22 | func getRuntimeNumThreads() float64 {
23 | n, _ := runtime.ThreadCreateProfile(nil)
24 | return float64(n)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js && !wasm
15 | // +build js,!wasm
16 |
17 | package prometheus
18 |
19 | // getRuntimeNumThreads returns the number of open OS threads.
20 | func getRuntimeNumThreads() float64 {
21 | return 1
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js
15 | // +build js
16 |
17 | package prometheus
18 |
19 | func canCollectProcess() bool {
20 | return false
21 | }
22 |
23 | func (c *processCollector) processCollect(ch chan<- Metric) {
24 | // noop on this platform
25 | return
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/client_model/NOTICE:
--------------------------------------------------------------------------------
1 | Data model artifacts for Prometheus.
2 | Copyright 2012-2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/common/NOTICE:
--------------------------------------------------------------------------------
1 | Common libraries shared by Prometheus Go components.
2 | Copyright 2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/common/model/model.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | // Package model contains common data structures that are shared across
15 | // Prometheus components and libraries.
16 | package model
17 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/.gitignore:
--------------------------------------------------------------------------------
1 | /testdata/fixtures/
2 | /fixtures
3 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/.golangci.yml:
--------------------------------------------------------------------------------
1 | ---
2 | linters:
3 | enable:
4 | - godot
5 | - revive
6 |
7 | linter-settings:
8 | godot:
9 | capital: true
10 | exclude:
11 | # Ignore "See: URL"
12 | - 'See:'
13 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Prometheus Community Code of Conduct
2 |
3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
4 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | * Johannes 'fish' Ziemke @discordianfish
2 | * Paul Gier @pgier
3 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 The Prometheus Authors
2 | # Licensed under the Apache License, Version 2.0 (the "License");
3 | # you may not use this file except in compliance with the License.
4 | # You may obtain a copy of the License at
5 | #
6 | # http://www.apache.org/licenses/LICENSE-2.0
7 | #
8 | # Unless required by applicable law or agreed to in writing, software
9 | # distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and
12 | # limitations under the License.
13 |
14 | include Makefile.common
15 |
16 | %/.unpacked: %.ttar
17 | @echo ">> extracting fixtures $*"
18 | ./ttar -C $(dir $*) -x -f $*.ttar
19 | touch $@
20 |
21 | fixtures: testdata/fixtures/.unpacked
22 |
23 | update_fixtures:
24 | rm -vf testdata/fixtures/.unpacked
25 | ./ttar -c -f testdata/fixtures.ttar -C testdata/ fixtures/
26 |
27 | .PHONY: build
28 | build:
29 |
30 | .PHONY: test
31 | test: testdata/fixtures/.unpacked common-test
32 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/NOTICE:
--------------------------------------------------------------------------------
1 | procfs provides functions to retrieve system, kernel and process
2 | metrics from the pseudo-filesystem proc.
3 |
4 | Copyright 2014-2015 The Prometheus Authors
5 |
6 | This product includes software developed at
7 | SoundCloud Ltd. (http://soundcloud.com/).
8 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Reporting a security issue
2 |
3 | The Prometheus security policy, including how to report vulnerabilities, can be
4 | found here:
5 |
6 |
7 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cmdline.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package procfs
15 |
16 | import (
17 | "strings"
18 |
19 | "github.com/prometheus/procfs/internal/util"
20 | )
21 |
22 | // CmdLine returns the command line of the kernel.
23 | func (fs FS) CmdLine() ([]string, error) {
24 | data, err := util.ReadFileNoStat(fs.proc.Path("cmdline"))
25 | if err != nil {
26 | return nil, err
27 | }
28 |
29 | return strings.Fields(string(data)), nil
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_armx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (arm || arm64)
15 | // +build linux
16 | // +build arm arm64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoARM
21 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (mips || mipsle || mips64 || mips64le)
15 | // +build linux
16 | // +build mips mipsle mips64 mips64le
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoMips
21 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_others.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && !386 && !amd64 && !arm && !arm64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x
15 | // +build linux,!386,!amd64,!arm,!arm64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x
16 |
17 | package procfs
18 |
19 | var parseCPUInfo = parseCPUInfoDummy
20 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (ppc64 || ppc64le)
15 | // +build linux
16 | // +build ppc64 ppc64le
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoPPC
21 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (riscv || riscv64)
15 | // +build linux
16 | // +build riscv riscv64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoRISCV
21 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux
15 | // +build linux
16 |
17 | package procfs
18 |
19 | var parseCPUInfo = parseCPUInfoS390X
20 |
--------------------------------------------------------------------------------
/vendor/github.com/prometheus/procfs/cpuinfo_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (386 || amd64)
15 | // +build linux
16 | // +build 386 amd64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoX86
21 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/v3/.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/robfig/cron/v3/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/v3/constantdelay.go:
--------------------------------------------------------------------------------
1 | package cron
2 |
3 | import "time"
4 |
5 | // ConstantDelaySchedule represents a simple recurring duty cycle, e.g. "Every 5 minutes".
6 | // It does not support jobs more frequent than once a second.
7 | type ConstantDelaySchedule struct {
8 | Delay time.Duration
9 | }
10 |
11 | // Every returns a crontab Schedule that activates once every duration.
12 | // Delays of less than a second are not supported (will round up to 1 second).
13 | // Any fields less than a Second are truncated.
14 | func Every(duration time.Duration) ConstantDelaySchedule {
15 | if duration < time.Second {
16 | duration = time.Second
17 | }
18 | return ConstantDelaySchedule{
19 | Delay: duration - time.Duration(duration.Nanoseconds())%time.Second,
20 | }
21 | }
22 |
23 | // Next returns the next time this should be run.
24 | // This rounds so that the next activation time will be on the second.
25 | func (schedule ConstantDelaySchedule) Next(t time.Time) time.Time {
26 | return t.Add(schedule.Delay - time.Duration(t.Nanosecond())*time.Nanosecond)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/tmthrgd/go-hex/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.10.x
4 | - 1.11.x
5 | - 1.12.x
6 | - 1.13.x
7 | - tip
8 | matrix:
9 | fast_finish: true
10 | allow_failures:
11 | - go: tip
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/bufpool/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.11.x
6 | - 1.12.x
7 | - 1.13.x
8 | - tip
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | env:
15 | - GO111MODULE=on
16 |
17 | go_import_path: github.com/vmihailenco/bufpool
18 |
19 | before_install:
20 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
21 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/bufpool/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | go test ./...
3 | go test ./... -short -race
4 | go test ./... -run=NONE -bench=. -benchmem
5 | env GOOS=linux GOARCH=386 go test ./...
6 | golangci-lint run
7 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/.prettierrc:
--------------------------------------------------------------------------------
1 | semi: false
2 | singleQuote: true
3 | proseWrap: always
4 | printWidth: 100
5 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.15.x
6 | - 1.16.x
7 | - tip
8 |
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 |
13 | env:
14 | - GO111MODULE=on
15 |
16 | go_import_path: github.com/vmihailenco/msgpack
17 |
18 | before_install:
19 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go
20 | env GOPATH)/bin v1.31.0
21 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | go test ./...
3 | go test ./... -short -race
4 | go test ./... -run=NONE -bench=. -benchmem
5 | env GOOS=linux GOARCH=386 go test ./...
6 | go vet
7 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = { extends: ['@commitlint/config-conventional'] }
2 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "msgpack",
3 | "version": "5.3.5"
4 | }
5 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/safe.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package msgpack
4 |
5 | // bytesToString converts byte slice to string.
6 | func bytesToString(b []byte) string {
7 | return string(b)
8 | }
9 |
10 | // stringToBytes converts string to byte slice.
11 | func stringToBytes(s string) []byte {
12 | return []byte(s)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/unsafe.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 |
3 | package msgpack
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | // bytesToString converts byte slice to string.
10 | func bytesToString(b []byte) string {
11 | return *(*string)(unsafe.Pointer(&b))
12 | }
13 |
14 | // stringToBytes converts string to byte slice.
15 | func stringToBytes(s string) []byte {
16 | return *(*[]byte)(unsafe.Pointer(
17 | &struct {
18 | string
19 | Cap int
20 | }{s, len(s)},
21 | ))
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/msgpack/v5/version.go:
--------------------------------------------------------------------------------
1 | package msgpack
2 |
3 | // Version is the current release version.
4 | func Version() string {
5 | return "5.3.5"
6 | }
7 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: xenial
2 | sudo: false
3 | language: go
4 |
5 | go:
6 | - 1.11.x
7 | - 1.12.x
8 | - tip
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | env:
15 | - GO111MODULE=on
16 |
17 | go_import_path: github.com/vmihailenco/tagparser
18 |
19 | before_install:
20 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
21 |
22 | script:
23 | - make
24 | - golangci-lint run
25 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | go test ./...
3 | go test ./... -short -race
4 | go test ./... -run=NONE -bench=. -benchmem
5 | env GOOS=linux GOARCH=386 go test ./...
6 | go vet ./...
7 | go get github.com/gordonklaus/ineffassign
8 | ineffassign .
9 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/README.md:
--------------------------------------------------------------------------------
1 | # Opinionated Golang tag parser
2 |
3 | [](https://travis-ci.org/vmihailenco/tagparser)
4 | [](https://godoc.org/github.com/vmihailenco/tagparser)
5 |
6 | ## Installation
7 |
8 | Install:
9 |
10 | ```shell
11 | go get -u github.com/vmihailenco/tagparser
12 | ```
13 |
14 | ## Quickstart
15 |
16 | ```go
17 | func ExampleParse() {
18 | tag := tagparser.Parse("some_name,key:value,key2:'complex value'")
19 | fmt.Println(tag.Name)
20 | fmt.Println(tag.Options)
21 | // Output: some_name
22 | // map[key:value key2:'complex value']
23 | }
24 | ```
25 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/internal/safe.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package internal
4 |
5 | func BytesToString(b []byte) string {
6 | return string(b)
7 | }
8 |
9 | func StringToBytes(s string) []byte {
10 | return []byte(s)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/internal/unsafe.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 |
3 | package internal
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | // BytesToString converts byte slice to string.
10 | func BytesToString(b []byte) string {
11 | return *(*string)(unsafe.Pointer(&b))
12 | }
13 |
14 | // StringToBytes converts string to byte slice.
15 | func StringToBytes(s string) []byte {
16 | return *(*[]byte)(unsafe.Pointer(
17 | &struct {
18 | string
19 | Cap int
20 | }{s, len(s)},
21 | ))
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/v2/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: xenial
2 | language: go
3 |
4 | go:
5 | - 1.14.x
6 | - 1.15.x
7 | - tip
8 |
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 |
13 | env:
14 | - GO111MODULE=on
15 |
16 | go_import_path: github.com/vmihailenco/tagparser
17 |
18 | before_install:
19 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
20 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/v2/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | go test ./...
3 | go test ./... -short -race
4 | go test ./... -run=NONE -bench=. -benchmem
5 | env GOOS=linux GOARCH=386 go test ./...
6 | go vet ./...
7 | go get github.com/gordonklaus/ineffassign
8 | ineffassign .
9 | golangci-lint run
10 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/v2/README.md:
--------------------------------------------------------------------------------
1 | # Opinionated Golang tag parser
2 |
3 | [](https://travis-ci.org/vmihailenco/tagparser)
4 | [](https://godoc.org/github.com/vmihailenco/tagparser)
5 |
6 | ## Installation
7 |
8 | Install:
9 |
10 | ```shell
11 | go get github.com/vmihailenco/tagparser/v2
12 | ```
13 |
14 | ## Quickstart
15 |
16 | ```go
17 | func ExampleParse() {
18 | tag := tagparser.Parse("some_name,key:value,key2:'complex value'")
19 | fmt.Println(tag.Name)
20 | fmt.Println(tag.Options)
21 | // Output: some_name
22 | // map[key:value key2:'complex value']
23 | }
24 | ```
25 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/v2/internal/safe.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package internal
4 |
5 | func BytesToString(b []byte) string {
6 | return string(b)
7 | }
8 |
9 | func StringToBytes(s string) []byte {
10 | return []byte(s)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vmihailenco/tagparser/v2/internal/unsafe.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 |
3 | package internal
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | // BytesToString converts byte slice to string.
10 | func BytesToString(b []byte) string {
11 | return *(*string)(unsafe.Pointer(&b))
12 | }
13 |
14 | // StringToBytes converts string to byte slice.
15 | func StringToBytes(s string) []byte {
16 | return *(*[]byte)(unsafe.Pointer(
17 | &struct {
18 | string
19 | Cap int
20 | }{s, len(s)},
21 | ))
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/hashes_generic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !gc || purego || !s390x
6 | // +build !gc purego !s390x
7 |
8 | package sha3
9 |
10 | import (
11 | "hash"
12 | )
13 |
14 | // new224Asm returns an assembly implementation of SHA3-224 if available,
15 | // otherwise it returns nil.
16 | func new224Asm() hash.Hash { return nil }
17 |
18 | // new256Asm returns an assembly implementation of SHA3-256 if available,
19 | // otherwise it returns nil.
20 | func new256Asm() hash.Hash { return nil }
21 |
22 | // new384Asm returns an assembly implementation of SHA3-384 if available,
23 | // otherwise it returns nil.
24 | func new384Asm() hash.Hash { return nil }
25 |
26 | // new512Asm returns an assembly implementation of SHA3-512 if available,
27 | // otherwise it returns nil.
28 | func new512Asm() hash.Hash { return nil }
29 |
--------------------------------------------------------------------------------
/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 | //go:build amd64 && !purego && gc
6 | // +build amd64,!purego,gc
7 |
8 | package sha3
9 |
10 | // This function is implemented in keccakf_amd64.s.
11 |
12 | //go:noescape
13 |
14 | func keccakF1600(a *[25]uint64)
15 |
--------------------------------------------------------------------------------
/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 | //go:build go1.4
6 | // +build go1.4
7 |
8 | package sha3
9 |
10 | import (
11 | "crypto"
12 | )
13 |
14 | func init() {
15 | crypto.RegisterHash(crypto.SHA3_224, New224)
16 | crypto.RegisterHash(crypto.SHA3_256, New256)
17 | crypto.RegisterHash(crypto.SHA3_384, New384)
18 | crypto.RegisterHash(crypto.SHA3_512, New512)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/shake_generic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !gc || purego || !s390x
6 | // +build !gc purego !s390x
7 |
8 | package sha3
9 |
10 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available,
11 | // otherwise it returns nil.
12 | func newShake128Asm() ShakeHash {
13 | return nil
14 | }
15 |
16 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available,
17 | // otherwise it returns nil.
18 | func newShake256Asm() ShakeHash {
19 | return nil
20 | }
21 |
--------------------------------------------------------------------------------
/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 | //go:build (!amd64 && !386 && !ppc64le) || purego
6 | // +build !amd64,!386,!ppc64le purego
7 |
8 | package sha3
9 |
10 | // A storageBuf is an aligned array of maxRate bytes.
11 | type storageBuf [maxRate]byte
12 |
13 | func (b *storageBuf) asBytes() *[maxRate]byte {
14 | return (*[maxRate]byte)(b)
15 | }
16 |
17 | var (
18 | xorIn = xorInGeneric
19 | copyOut = copyOutGeneric
20 | xorInUnaligned = xorInGeneric
21 | copyOutUnaligned = copyOutGeneric
22 | )
23 |
24 | const xorImplementationUnaligned = "generic"
25 |
--------------------------------------------------------------------------------
/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 uint64s 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/sys/cpu/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
12 | //
13 |
14 | TEXT ·syscall6(SB),NOSPLIT,$0-88
15 | JMP syscall·syscall6(SB)
16 |
17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSyscall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_aix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix
6 | // +build aix
7 |
8 | package cpu
9 |
10 | const (
11 | // getsystemcfg constants
12 | _SC_IMPL = 2
13 | _IMPL_POWER8 = 0x10000
14 | _IMPL_POWER9 = 0x20000
15 | )
16 |
17 | func archInit() {
18 | impl := getsystemcfg(_SC_IMPL)
19 | if impl&_IMPL_POWER8 != 0 {
20 | PPC64.IsPOWER8 = true
21 | }
22 | if impl&_IMPL_POWER9 != 0 {
23 | PPC64.IsPOWER8 = true
24 | PPC64.IsPOWER9 = true
25 | }
26 |
27 | Initialized = true
28 | }
29 |
30 | func getsystemcfg(label int) (n uint64) {
31 | r0, _ := callgetsystemcfg(label)
32 | n = uint64(r0)
33 | return
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | // func getisar0() uint64
11 | TEXT ·getisar0(SB),NOSPLIT,$0-8
12 | // get Instruction Set Attributes 0 into x0
13 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600
14 | WORD $0xd5380600
15 | MOVD R0, ret+0(FP)
16 | RET
17 |
18 | // func getisar1() uint64
19 | TEXT ·getisar1(SB),NOSPLIT,$0-8
20 | // get Instruction Set Attributes 1 into x0
21 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620
22 | WORD $0xd5380620
23 | MOVD R0, ret+0(FP)
24 | RET
25 |
26 | // func getpfr0() uint64
27 | TEXT ·getpfr0(SB),NOSPLIT,$0-8
28 | // get Processor Feature Register 0 into x0
29 | // mrs x0, ID_AA64PFR0_EL1 = d5380400
30 | WORD $0xd5380400
31 | MOVD R0, ret+0(FP)
32 | RET
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | package cpu
9 |
10 | func getisar0() uint64
11 | func getisar1() uint64
12 | func getpfr0() uint64
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | package cpu
9 |
10 | // haveAsmFunctions reports whether the other functions in this file can
11 | // be safely called.
12 | func haveAsmFunctions() bool { return true }
13 |
14 | // The following feature detection functions are defined in cpu_s390x.s.
15 | // They are likely to be expensive to call so the results should be cached.
16 | func stfle() facilityList
17 | func kmQuery() queryResult
18 | func kmcQuery() queryResult
19 | func kmctrQuery() queryResult
20 | func kmaQuery() queryResult
21 | func kimdQuery() queryResult
22 | func klmdQuery() queryResult
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 | // +build 386 amd64 amd64p32
7 | // +build gc
8 |
9 | package cpu
10 |
11 | // cpuid is implemented in cpu_x86.s for gc compiler
12 | // and in cpu_gccgo.c for gccgo.
13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
14 |
15 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
16 | // and in cpu_gccgo.c for gccgo.
17 | func xgetbv() (eax, edx uint32)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo
6 | // +build gccgo
7 |
8 | package cpu
9 |
10 | func getisar0() uint64 { return 0 }
11 | func getisar1() uint64 { return 0 }
12 | func getpfr0() uint64 { return 0 }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gccgo
6 | // +build 386 amd64 amd64p32
7 | // +build gccgo
8 |
9 | package cpu
10 |
11 | //extern gccgoGetCpuidCount
12 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
13 |
14 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
15 | var a, b, c, d uint32
16 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
17 | return a, b, c, d
18 | }
19 |
20 | //extern gccgoXgetbv
21 | func gccgoXgetbv(eax, edx *uint32)
22 |
23 | func xgetbv() (eax, edx uint32) {
24 | var a, d uint32
25 | gccgoXgetbv(&a, &d)
26 | return a, d
27 | }
28 |
29 | // gccgo doesn't build on Darwin, per:
30 | // https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L76
31 | func darwinSupportsAVX512() bool {
32 | return false
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !386 && !amd64 && !amd64p32 && !arm64
6 | // +build !386,!amd64,!amd64p32,!arm64
7 |
8 | package cpu
9 |
10 | func archInit() {
11 | if err := readHWCAP(); err != nil {
12 | return
13 | }
14 | doinit()
15 | Initialized = true
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (mips64 || mips64le)
6 | // +build linux
7 | // +build mips64 mips64le
8 |
9 | package cpu
10 |
11 | // HWCAP bits. These are exposed by the Linux kernel 5.4.
12 | const (
13 | // CPU features
14 | hwcap_MIPS_MSA = 1 << 1
15 | )
16 |
17 | func doinit() {
18 | // HWCAP feature bits
19 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
20 | }
21 |
22 | func isSet(hwc uint, value uint) bool {
23 | return hwc&value != 0
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
6 | // +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x
7 |
8 | package cpu
9 |
10 | func doinit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64 || ppc64le)
6 | // +build linux
7 | // +build ppc64 ppc64le
8 |
9 | package cpu
10 |
11 | // HWCAP/HWCAP2 bits. These are exposed by the kernel.
12 | const (
13 | // ISA Level
14 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000
15 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000
16 |
17 | // CPU features
18 | _PPC_FEATURE2_DARN = 0x00200000
19 | _PPC_FEATURE2_SCV = 0x00100000
20 | )
21 |
22 | func doinit() {
23 | // HWCAP2 feature bits
24 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
25 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
26 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
27 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
28 | }
29 |
30 | func isSet(hwc uint, value uint) bool {
31 | return hwc&value != 0
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | const (
8 | // bit mask values from /usr/include/bits/hwcap.h
9 | hwcap_ZARCH = 2
10 | hwcap_STFLE = 4
11 | hwcap_MSA = 8
12 | hwcap_LDISP = 16
13 | hwcap_EIMM = 32
14 | hwcap_DFP = 64
15 | hwcap_ETF3EH = 256
16 | hwcap_VX = 2048
17 | hwcap_VXE = 8192
18 | )
19 |
20 | func initS390Xbase() {
21 | // test HWCAP bit vector
22 | has := func(featureMask uint) bool {
23 | return hwCap&featureMask == featureMask
24 | }
25 |
26 | // mandatory
27 | S390X.HasZARCH = has(hwcap_ZARCH)
28 |
29 | // optional
30 | S390X.HasSTFLE = has(hwcap_STFLE)
31 | S390X.HasLDISP = has(hwcap_LDISP)
32 | S390X.HasEIMM = has(hwcap_EIMM)
33 | S390X.HasETF3EH = has(hwcap_ETF3EH)
34 | S390X.HasDFP = has(hwcap_DFP)
35 | S390X.HasMSA = has(hwcap_MSA)
36 | S390X.HasVX = has(hwcap_VX)
37 | if S390X.HasVX {
38 | S390X.HasVXE = has(hwcap_VXE)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build loong64
6 | // +build loong64
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 64
11 |
12 | func initOptions() {
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips64 || mips64le
6 | // +build mips64 mips64le
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {
13 | options = []option{
14 | {Name: "msa", Feature: &MIPS64X.HasMSA},
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips || mipsle
6 | // +build mips mipsle
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
8 | JMP libc_sysctl(SB)
9 |
10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && arm
6 | // +build !linux,arm
7 |
8 | package cpu
9 |
10 | func archInit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && !netbsd && !openbsd && arm64
6 | // +build !linux,!netbsd,!openbsd,arm64
7 |
8 | package cpu
9 |
10 | func doinit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && (mips64 || mips64le)
6 | // +build !linux
7 | // +build mips64 mips64le
8 |
9 | package cpu
10 |
11 | func archInit() {
12 | Initialized = true
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !linux && (ppc64 || ppc64le)
6 | // +build !aix
7 | // +build !linux
8 | // +build ppc64 ppc64le
9 |
10 | package cpu
11 |
12 | func archInit() {
13 | PPC64.IsPOWER8 = true
14 | Initialized = true
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && riscv64
6 | // +build !linux,riscv64
7 |
8 | package cpu
9 |
10 | func archInit() {
11 | Initialized = true
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ppc64 || ppc64le
6 | // +build ppc64 ppc64le
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 128
11 |
12 | func initOptions() {
13 | options = []option{
14 | {Name: "darn", Feature: &PPC64.HasDARN},
15 | {Name: "scv", Feature: &PPC64.HasSCV},
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build riscv64
6 | // +build riscv64
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_wasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build wasm
6 | // +build wasm
7 |
8 | package cpu
9 |
10 | // We're compiling the cpu package for an unknown (software-abstracted) CPU.
11 | // Make CacheLinePad an empty struct and hope that the usual struct alignment
12 | // rules are good enough.
13 |
14 | const cacheLineSize = 0
15 |
16 | func initOptions() {}
17 |
18 | func archInit() {}
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_x86.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 | // +build 386 amd64 amd64p32
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
12 | TEXT ·cpuid(SB), NOSPLIT, $0-24
13 | MOVL eaxArg+0(FP), AX
14 | MOVL ecxArg+4(FP), CX
15 | CPUID
16 | MOVL AX, eax+8(FP)
17 | MOVL BX, ebx+12(FP)
18 | MOVL CX, ecx+16(FP)
19 | MOVL DX, edx+20(FP)
20 | RET
21 |
22 | // func xgetbv() (eax, edx uint32)
23 | TEXT ·xgetbv(SB),NOSPLIT,$0-8
24 | MOVL $0, CX
25 | XGETBV
26 | MOVL AX, eax+0(FP)
27 | MOVL DX, edx+4(FP)
28 | RET
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func archInit() {
8 | doinit()
9 | Initialized = true
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func initS390Xbase() {
8 | // get the facilities list
9 | facilities := stfle()
10 |
11 | // mandatory
12 | S390X.HasZARCH = facilities.Has(zarch)
13 | S390X.HasSTFLE = facilities.Has(stflef)
14 | S390X.HasLDISP = facilities.Has(ldisp)
15 | S390X.HasEIMM = facilities.Has(eimm)
16 |
17 | // optional
18 | S390X.HasETF3EH = facilities.Has(etf3eh)
19 | S390X.HasDFP = facilities.Has(dfp)
20 | S390X.HasMSA = facilities.Has(msa)
21 | S390X.HasVX = facilities.Has(vx)
22 | if S390X.HasVX {
23 | S390X.HasVXE = facilities.Has(vxe)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
7 |
8 | package cpu
9 |
10 | // IsBigEndian records whether the GOARCH's byte order is big endian.
11 | const IsBigEndian = true
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm
7 |
8 | package cpu
9 |
10 | // IsBigEndian records whether the GOARCH's byte order is big endian.
11 | const IsBigEndian = false
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 cpu
6 |
7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
8 | // on platforms that use auxv.
9 | var getAuxvFn func() []uintptr
10 |
11 | func getAuxv() []uintptr {
12 | if getAuxvFn == nil {
13 | return nil
14 | }
15 | return getAuxvFn()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.21
6 | // +build go1.21
7 |
8 | package cpu
9 |
10 | import (
11 | _ "unsafe" // for linkname
12 | )
13 |
14 | //go:linkname runtime_getAuxv runtime.getAuxv
15 | func runtime_getAuxv() []uintptr
16 |
17 | func init() {
18 | getAuxvFn = runtime_getAuxv
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Recreate a getsystemcfg syscall handler instead of
6 | // using the one provided by x/sys/unix to avoid having
7 | // the dependency between them. (See golang.org/issue/32102)
8 | // Moreover, this file will be used during the building of
9 | // gccgo's libgo and thus must not used a CGo method.
10 |
11 | //go:build aix && gccgo
12 | // +build aix,gccgo
13 |
14 | package cpu
15 |
16 | import (
17 | "syscall"
18 | )
19 |
20 | //extern getsystemcfg
21 | func gccgoGetsystemcfg(label uint32) (r uint64)
22 |
23 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
24 | r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
25 | e1 = syscall.GetErrno()
26 | return
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package unsafeheader contains header declarations for the Go runtime's
6 | // slice and string implementations.
7 | //
8 | // This package allows x/sys to use types equivalent to
9 | // reflect.SliceHeader and reflect.StringHeader without introducing
10 | // a dependency on the (relatively heavy) "reflect" package.
11 | package unsafeheader
12 |
13 | import (
14 | "unsafe"
15 | )
16 |
17 | // Slice is the runtime representation of a slice.
18 | // It cannot be used safely or portably and its representation may change in a later release.
19 | type Slice struct {
20 | Data unsafe.Pointer
21 | Len int
22 | Cap int
23 | }
24 |
25 | // String is the runtime representation of a string.
26 | // It cannot be used safely or portably and its representation may change in a later release.
27 | type String struct {
28 | Data unsafe.Pointer
29 | Len int
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 | // +build go1.9
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | type Signal = syscall.Signal
14 | type Errno = syscall.Errno
15 | type SysProcAttr = syscall.SysProcAttr
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
12 | //
13 |
14 | TEXT ·syscall6(SB),NOSPLIT,$0-88
15 | JMP syscall·syscall6(SB)
16 |
17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSyscall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (freebsd || netbsd || openbsd) && gc
6 | // +build freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for 386 BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
6 | // +build darwin dragonfly freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for AMD64 BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (freebsd || netbsd || openbsd) && gc
6 | // +build freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for ARM BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 | // +build darwin freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for ARM64 BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 | // +build darwin freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System call support for ppc64, BSD
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
28 | JMP syscall·RawSyscall(SB)
29 |
30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
31 | JMP syscall·RawSyscall6(SB)
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 | // +build darwin freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for RISCV64 BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for mips64, OpenBSD
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | JMP syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | JMP syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | JMP syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | JMP syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | JMP syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
12 | //
13 |
14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
15 | JMP syscall·sysvicall6(SB)
16 |
17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSysvicall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package unix
9 |
10 | const (
11 | R_OK = 0x4
12 | W_OK = 0x2
13 | X_OK = 0x1
14 | )
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix && ppc
6 | // +build aix,ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev >> 16) & 0xffff)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32(dev & 0xffff)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | return uint64(((major) << 16) | (minor))
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix && ppc64
6 | // +build aix,ppc64
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev & 0x3fffffff00000000) >> 32)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32((dev & 0x00000000ffffffff) >> 0)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | var DEVNO64 uint64
27 | DEVNO64 = 0x8000000000000000
28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build zos && s390x
6 | // +build zos,s390x
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by z/OS.
10 | //
11 | // The information below is extracted and adapted from macros.
12 |
13 | package unix
14 |
15 | // Major returns the major component of a z/OS device number.
16 | func Major(dev uint64) uint32 {
17 | return uint32((dev >> 16) & 0x0000FFFF)
18 | }
19 |
20 | // Minor returns the minor component of a z/OS device number.
21 | func Minor(dev uint64) uint32 {
22 | return uint32(dev & 0x0000FFFF)
23 | }
24 |
25 | // Mkdev returns a z/OS device number generated from the given major and minor
26 | // components.
27 | func Mkdev(major, minor uint32) uint64 {
28 | return (uint64(major) << 16) | uint64(minor)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
7 |
8 | package unix
9 |
10 | const isBigEndian = true
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
7 |
8 | package unix
9 |
10 | const isBigEndian = false
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | // Unix environment variables.
9 |
10 | package unix
11 |
12 | import "syscall"
13 |
14 | func Getenv(key string) (value string, found bool) {
15 | return syscall.Getenv(key)
16 | }
17 |
18 | func Setenv(key, value string) error {
19 | return syscall.Setenv(key, value)
20 | }
21 |
22 | func Clearenv() {
23 | syscall.Clearenv()
24 | }
25 |
26 | func Environ() []string {
27 | return syscall.Environ()
28 | }
29 |
30 | func Unsetenv(key string) error {
31 | return syscall.Unsetenv(key)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
23 | return err
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
7 |
8 | package unix
9 |
10 | func init() {
11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
13 | fcntl64Syscall = SYS_FCNTL64
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fdset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package unix
9 |
10 | // Set adds fd to the set fds.
11 | func (fds *FdSet) Set(fd int) {
12 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
13 | }
14 |
15 | // Clear removes fd from the set fds.
16 | func (fds *FdSet) Clear(fd int) {
17 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
18 | }
19 |
20 | // IsSet returns whether fd is in the set fds.
21 | func (fds *FdSet) IsSet(fd int) bool {
22 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
23 | }
24 |
25 | // Zero clears the set fds.
26 | func (fds *FdSet) Zero() {
27 | for i := range fds.Bits {
28 | fds.Bits[i] = 0
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo && linux && amd64
6 | // +build gccgo,linux,amd64
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //extern gettimeofday
13 | func realGettimeofday(*Timeval, *byte) int32
14 |
15 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
16 | r := realGettimeofday(tv, nil)
17 | if r < 0 {
18 | return syscall.GetErrno()
19 | }
20 | return 0
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/mmap_nomremap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
6 | // +build aix darwin dragonfly freebsd openbsd solaris
7 |
8 | package unix
9 |
10 | var mapper = &mmapper{
11 | active: make(map[*byte][]byte),
12 | mmap: mmap,
13 | munmap: munmap,
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
7 |
8 | // For Unix, get the pagesize from the runtime.
9 |
10 | package unix
11 |
12 | import "syscall"
13 |
14 | func Getpagesize() int {
15 | return syscall.Getpagesize()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && !ios
6 | // +build darwin,!ios
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | func ptrace(request int, pid int, addr uintptr, data uintptr) error {
13 | return ptrace1(request, pid, addr, data)
14 | }
15 |
16 | func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
17 | return ptrace1Ptr(request, pid, addr, data)
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_ios.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ios
6 | // +build ios
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
13 | return ENOTSUP
14 | }
15 |
16 | func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
17 | return ENOTSUP
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin && race) || (linux && race) || (freebsd && race)
6 | // +build darwin,race linux,race freebsd,race
7 |
8 | package unix
9 |
10 | import (
11 | "runtime"
12 | "unsafe"
13 | )
14 |
15 | const raceenabled = true
16 |
17 | func raceAcquire(addr unsafe.Pointer) {
18 | runtime.RaceAcquire(addr)
19 | }
20 |
21 | func raceReleaseMerge(addr unsafe.Pointer) {
22 | runtime.RaceReleaseMerge(addr)
23 | }
24 |
25 | func raceReadRange(addr unsafe.Pointer, len int) {
26 | runtime.RaceReadRange(addr, len)
27 | }
28 |
29 | func raceWriteRange(addr unsafe.Pointer, len int) {
30 | runtime.RaceWriteRange(addr, len)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos
7 |
8 | package unix
9 |
10 | import (
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = false
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | }
18 |
19 | func raceReleaseMerge(addr unsafe.Pointer) {
20 | }
21 |
22 | func raceReadRange(addr unsafe.Pointer, len int) {
23 | }
24 |
25 | func raceWriteRange(addr unsafe.Pointer, len int) {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
6 | // +build aix dragonfly freebsd linux netbsd openbsd
7 |
8 | package unix
9 |
10 | // ReadDirent reads directory entries from fd and writes them into buf.
11 | func ReadDirent(fd int, buf []byte) (n int, err error) {
12 | return Getdents(fd, buf)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin
6 | // +build darwin
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | // ReadDirent reads directory entries from fd and writes them into buf.
13 | func ReadDirent(fd int, buf []byte) (n int, err error) {
14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
16 | // actual system call is getdirentries64, 64 is a good guess.
17 | // TODO(rsc): Can we use a single global basep for all calls?
18 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
19 | return Getdirentries(fd, buf, base)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build hurd
6 | // +build hurd
7 |
8 | package unix
9 |
10 | /*
11 | #include
12 | int ioctl(int, unsigned long int, uintptr_t);
13 | */
14 | import "C"
15 |
16 | func ioctl(fd int, req uint, arg uintptr) (err error) {
17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
18 | if r0 == -1 && er != nil {
19 | err = er
20 | }
21 | return
22 | }
23 |
24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
26 | if r0 == -1 && er != nil {
27 | err = er
28 | }
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && hurd
6 | // +build 386,hurd
7 |
8 | package unix
9 |
10 | const (
11 | TIOCGETA = 0x62251713
12 | )
13 |
14 | type Winsize struct {
15 | Row uint16
16 | Col uint16
17 | Xpixel uint16
18 | Ypixel uint16
19 | }
20 |
21 | type Termios struct {
22 | Iflag uint32
23 | Oflag uint32
24 | Cflag uint32
25 | Lflag uint32
26 | Cc [20]uint8
27 | Ispeed int32
28 | Ospeed int32
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
6 | // +build linux
7 | // +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
8 |
9 | package unix
10 |
11 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
12 | // values.
13 |
14 | //sys Alarm(seconds uint) (remaining uint, err error)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && linux && gc
6 | // +build amd64,linux,gc
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc
6 | // +build linux,gc
7 |
8 | package unix
9 |
10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
12 |
13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
14 | // fail.
15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc && 386
6 | // +build linux,gc,386
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | // Underlying system call writes to newoffset via pointer.
13 | // Implemented in assembly to avoid allocation.
14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
15 |
16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && gc && linux
6 | // +build arm,gc,linux
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | // Underlying system call writes to newoffset via pointer.
13 | // Implemented in assembly to avoid allocation.
14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gccgo && arm
6 | // +build linux,gccgo,arm
7 |
8 | package unix
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
16 | var newoffset int64
17 | offsetLow := uint32(offset & 0xffffffff)
18 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
20 | return newoffset, err
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && netbsd
6 | // +build 386,netbsd
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: int32(nsec)}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: int32(usec)}
16 | }
17 |
18 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
19 | k.Ident = uint32(fd)
20 | k.Filter = uint32(mode)
21 | k.Flags = uint32(flags)
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint32(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetIovlen(length int) {
33 | msghdr.Iovlen = int32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && netbsd
6 | // +build amd64,netbsd
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: nsec}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: int32(usec)}
16 | }
17 |
18 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
19 | k.Ident = uint64(fd)
20 | k.Filter = uint32(mode)
21 | k.Flags = uint32(flags)
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetIovlen(length int) {
33 | msghdr.Iovlen = int32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && netbsd
6 | // +build arm,netbsd
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: int32(nsec)}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: int32(usec)}
16 | }
17 |
18 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
19 | k.Ident = uint32(fd)
20 | k.Filter = uint32(mode)
21 | k.Flags = uint32(flags)
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint32(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetIovlen(length int) {
33 | msghdr.Iovlen = int32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm64 && netbsd
6 | // +build arm64,netbsd
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: nsec}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: int32(usec)}
16 | }
17 |
18 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
19 | k.Ident = uint64(fd)
20 | k.Filter = uint32(mode)
21 | k.Flags = uint32(flags)
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetIovlen(length int) {
33 | msghdr.Iovlen = int32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && solaris
6 | // +build amd64,solaris
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: nsec}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: usec}
16 | }
17 |
18 | func (iov *Iovec) SetLen(length int) {
19 | iov.Len = uint64(length)
20 | }
21 |
22 | func (msghdr *Msghdr) SetIovlen(length int) {
23 | msghdr.Iovlen = int32(length)
24 | }
25 |
26 | func (cmsg *Cmsghdr) SetLen(length int) {
27 | cmsg.Len = uint32(length)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
6 | // +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
7 | // +build gc
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64le || ppc64) && gc
6 | // +build linux
7 | // +build ppc64le ppc64
8 | // +build gc
9 |
10 | package unix
11 |
12 | import "syscall"
13 |
14 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
15 | return syscall.Syscall(trap, a1, a2, a3)
16 | }
17 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
18 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
19 | }
20 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
21 | return syscall.RawSyscall(trap, a1, a2, a3)
22 | }
23 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
24 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux
6 | // +build linux
7 |
8 | package unix
9 |
10 | import "runtime"
11 |
12 | // SysvShmCtl performs control operations on the shared memory segment
13 | // specified by id.
14 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
15 | if runtime.GOARCH == "arm" ||
16 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
17 | cmd |= ipc_64
18 | }
19 |
20 | return shmctl(id, cmd, desc)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && !ios
6 | // +build darwin,!ios
7 |
8 | package unix
9 |
10 | // SysvShmCtl performs control operations on the shared memory segment
11 | // specified by id.
12 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
13 | return shmctl(id, cmd, desc)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
2 |
3 | package unix
4 |
5 | import "unsafe"
6 |
7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 | }
12 |
13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && go1.9
6 | // +build windows,go1.9
7 |
8 | package windows
9 |
10 | import "syscall"
11 |
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/empty.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.12
6 | // +build !go1.12
7 |
8 | // This file is here to allow bodyless functions with go:linkname for Go 1.11
9 | // and earlier (see https://golang.org/issue/23311).
10 |
--------------------------------------------------------------------------------
/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 | //go:build windows
6 | // +build windows
7 |
8 | package windows
9 |
10 | const (
11 | EVENTLOG_SUCCESS = 0
12 | EVENTLOG_ERROR_TYPE = 1
13 | EVENTLOG_WARNING_TYPE = 2
14 | EVENTLOG_INFORMATION_TYPE = 4
15 | EVENTLOG_AUDIT_SUCCESS = 8
16 | EVENTLOG_AUDIT_FAILURE = 16
17 | )
18 |
19 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
20 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
21 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
22 |
--------------------------------------------------------------------------------
/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 | //go:build generate
6 | // +build generate
7 |
8 | package windows
9 |
10 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
11 |
--------------------------------------------------------------------------------
/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 | //go:build windows && race
6 | // +build windows,race
7 |
8 | package windows
9 |
10 | import (
11 | "runtime"
12 | "unsafe"
13 | )
14 |
15 | const raceenabled = true
16 |
17 | func raceAcquire(addr unsafe.Pointer) {
18 | runtime.RaceAcquire(addr)
19 | }
20 |
21 | func raceReleaseMerge(addr unsafe.Pointer) {
22 | runtime.RaceReleaseMerge(addr)
23 | }
24 |
25 | func raceReadRange(addr unsafe.Pointer, len int) {
26 | runtime.RaceReadRange(addr, len)
27 | }
28 |
29 | func raceWriteRange(addr unsafe.Pointer, len int) {
30 | runtime.RaceWriteRange(addr, len)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/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 | //go:build windows && !race
6 | // +build windows,!race
7 |
8 | package windows
9 |
10 | import (
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = false
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | }
18 |
19 | func raceReleaseMerge(addr unsafe.Pointer) {
20 | }
21 |
22 | func raceReadRange(addr unsafe.Pointer, len int) {
23 | }
24 |
25 | func raceWriteRange(addr unsafe.Pointer, len int) {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/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 | //go:build windows
6 | // +build windows
7 |
8 | package windows
9 |
10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
11 | if val < 0 {
12 | return "-" + itoa(-val)
13 | }
14 | var buf [32]byte // big enough for int64
15 | i := len(buf) - 1
16 | for val >= 10 {
17 | buf[i] = byte(val%10 + '0')
18 | i--
19 | val /= 10
20 | }
21 | buf[i] = byte(val + '0')
22 | return string(buf[i:])
23 | }
24 |
--------------------------------------------------------------------------------
/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 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/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 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | 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 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm64.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 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/internal/language/common.go:
--------------------------------------------------------------------------------
1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
2 |
3 | package language
4 |
5 | // This file contains code common to the maketables.go and the package code.
6 |
7 | // AliasType is the type of an alias in AliasMap.
8 | type AliasType int8
9 |
10 | const (
11 | Deprecated AliasType = iota
12 | Macro
13 | Legacy
14 |
15 | AliasTypeUnknown AliasType = -1
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/internal/language/compact.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package language
6 |
7 | // CompactCoreInfo is a compact integer with the three core tags encoded.
8 | type CompactCoreInfo uint32
9 |
10 | // GetCompactCore generates a uint32 value that is guaranteed to be unique for
11 | // different language, region, and script values.
12 | func GetCompactCore(t Tag) (cci CompactCoreInfo, ok bool) {
13 | if t.LangID > langNoIndexOffset {
14 | return 0, false
15 | }
16 | cci |= CompactCoreInfo(t.LangID) << (8 + 12)
17 | cci |= CompactCoreInfo(t.ScriptID) << 12
18 | cci |= CompactCoreInfo(t.RegionID)
19 | return cci, true
20 | }
21 |
22 | // Tag generates a tag from c.
23 | func (c CompactCoreInfo) Tag() Tag {
24 | return Tag{
25 | LangID: Language(c >> 20),
26 | RegionID: Region(c & 0x3ff),
27 | ScriptID: Script(c>>12) & 0xff,
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/internal/language/coverage.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 language
6 |
7 | // BaseLanguages returns the list of all supported base languages. It generates
8 | // the list by traversing the internal structures.
9 | func BaseLanguages() []Language {
10 | base := make([]Language, 0, NumLanguages)
11 | for i := 0; i < langNoIndexOffset; i++ {
12 | // We included "und" already for the value 0.
13 | if i != nonCanonicalUnd {
14 | base = append(base, Language(i))
15 | }
16 | }
17 | i := langNoIndexOffset
18 | for _, v := range langNoIndex {
19 | for k := 0; k < 8; k++ {
20 | if v&1 == 1 {
21 | base = append(base, Language(i))
22 | }
23 | v >>= 1
24 | i++
25 | }
26 | }
27 | return base
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/internal/number/roundingmode_string.go:
--------------------------------------------------------------------------------
1 | // Code generated by "stringer -type RoundingMode"; DO NOT EDIT.
2 |
3 | package number
4 |
5 | import "strconv"
6 |
7 | func _() {
8 | // An "invalid array index" compiler error signifies that the constant values have changed.
9 | // Re-run the stringer command to generate them again.
10 | var x [1]struct{}
11 | _ = x[ToNearestEven-0]
12 | _ = x[ToNearestZero-1]
13 | _ = x[ToNearestAway-2]
14 | _ = x[ToPositiveInf-3]
15 | _ = x[ToNegativeInf-4]
16 | _ = x[ToZero-5]
17 | _ = x[AwayFromZero-6]
18 | _ = x[numModes-7]
19 | }
20 |
21 | const _RoundingMode_name = "ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes"
22 |
23 | var _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91}
24 |
25 | func (i RoundingMode) String() string {
26 | if i >= RoundingMode(len(_RoundingMode_index)-1) {
27 | return "RoundingMode(" + strconv.FormatInt(int64(i), 10) + ")"
28 | }
29 | return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/message/catalog/go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.9
6 | // +build go1.9
7 |
8 | package catalog
9 |
10 | import "golang.org/x/text/internal/catmsg"
11 |
12 | // A Message holds a collection of translations for the same phrase that may
13 | // vary based on the values of substitution arguments.
14 | type Message = catmsg.Message
15 |
16 | type firstInSequence = catmsg.FirstOf
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/message/catalog/gopre19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.9
6 | // +build !go1.9
7 |
8 | package catalog
9 |
10 | import "golang.org/x/text/internal/catmsg"
11 |
12 | // A Message holds a collection of translations for the same phrase that may
13 | // vary based on the values of substitution arguments.
14 | type Message interface {
15 | catmsg.Message
16 | }
17 |
18 | func firstInSequence(m []Message) catmsg.Message {
19 | a := []catmsg.Message{}
20 | for _, m := range m {
21 | a = append(a, m)
22 | }
23 | return catmsg.FirstOf(a)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/encoding/prototext/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package prototext marshals and unmarshals protocol buffer messages as the
6 | // textproto format.
7 | package prototext
8 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/errors/is_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.13
6 | // +build !go1.13
7 |
8 | package errors
9 |
10 | import "reflect"
11 |
12 | // Is is a copy of Go 1.13's errors.Is for use with older Go versions.
13 | func Is(err, target error) bool {
14 | if target == nil {
15 | return err == target
16 | }
17 |
18 | isComparable := reflect.TypeOf(target).Comparable()
19 | for {
20 | if isComparable && err == target {
21 | return true
22 | }
23 | if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) {
24 | return true
25 | }
26 | if err = unwrap(err); err == nil {
27 | return false
28 | }
29 | }
30 | }
31 |
32 | func unwrap(err error) error {
33 | u, ok := err.(interface {
34 | Unwrap() error
35 | })
36 | if !ok {
37 | return nil
38 | }
39 | return u.Unwrap()
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/errors/is_go113.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.13
6 | // +build go1.13
7 |
8 | package errors
9 |
10 | import "errors"
11 |
12 | // Is is errors.Is.
13 | func Is(err, target error) bool { return errors.Is(err, target) }
14 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !protolegacy
6 | // +build !protolegacy
7 |
8 | package flags
9 |
10 | const protoLegacy = false
11 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build protolegacy
6 | // +build protolegacy
7 |
8 | package flags
9 |
10 | const protoLegacy = true
11 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package genid contains constants for declarations in descriptor.proto
6 | // and the well-known types.
7 | package genid
8 |
9 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 |
11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf"
12 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto"
14 |
15 | // Names for google.protobuf.Empty.
16 | const (
17 | Empty_message_name protoreflect.Name = "Empty"
18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty"
19 | )
20 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto"
14 |
15 | // Names for google.protobuf.FieldMask.
16 | const (
17 | FieldMask_message_name protoreflect.Name = "FieldMask"
18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask"
19 | )
20 |
21 | // Field names for google.protobuf.FieldMask.
22 | const (
23 | FieldMask_Paths_field_name protoreflect.Name = "paths"
24 |
25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths"
26 | )
27 |
28 | // Field numbers for google.protobuf.FieldMask.
29 | const (
30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1
31 | )
32 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/goname.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | // Go names of implementation-specific struct fields in generated messages.
8 | const (
9 | State_goname = "state"
10 |
11 | SizeCache_goname = "sizeCache"
12 | SizeCacheA_goname = "XXX_sizecache"
13 |
14 | WeakFields_goname = "weakFields"
15 | WeakFieldsA_goname = "XXX_weak"
16 |
17 | UnknownFields_goname = "unknownFields"
18 | UnknownFieldsA_goname = "XXX_unrecognized"
19 |
20 | ExtensionFields_goname = "extensionFields"
21 | ExtensionFieldsA_goname = "XXX_InternalExtensions"
22 | ExtensionFieldsB_goname = "XXX_extensions"
23 |
24 | WeakFieldPrefix_goname = "XXX_weak_"
25 | )
26 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/map_entry.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
8 |
9 | // Generic field names and numbers for synthetic map entry messages.
10 | const (
11 | MapEntry_Key_field_name protoreflect.Name = "key"
12 | MapEntry_Value_field_name protoreflect.Name = "value"
13 |
14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1
15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/genid/wrappers.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
8 |
9 | // Generic field name and number for messages in wrappers.proto.
10 | const (
11 | WrapperValue_Value_field_name protoreflect.Name = "value"
12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.12
6 | // +build !go1.12
7 |
8 | package impl
9 |
10 | import "reflect"
11 |
12 | type mapIter struct {
13 | v reflect.Value
14 | keys []reflect.Value
15 | }
16 |
17 | // mapRange provides a less-efficient equivalent to
18 | // the Go 1.12 reflect.Value.MapRange method.
19 | func mapRange(v reflect.Value) *mapIter {
20 | return &mapIter{v: v}
21 | }
22 |
23 | func (i *mapIter) Next() bool {
24 | if i.keys == nil {
25 | i.keys = i.v.MapKeys()
26 | } else {
27 | i.keys = i.keys[1:]
28 | }
29 | return len(i.keys) > 0
30 | }
31 |
32 | func (i *mapIter) Key() reflect.Value {
33 | return i.keys[0]
34 | }
35 |
36 | func (i *mapIter) Value() reflect.Value {
37 | return i.v.MapIndex(i.keys[0])
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.12
6 | // +build go1.12
7 |
8 | package impl
9 |
10 | import "reflect"
11 |
12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() }
13 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !purego && !appengine
6 | // +build !purego,!appengine
7 |
8 | package impl
9 |
10 | // When using unsafe pointers, we can just treat enum values as int32s.
11 |
12 | var (
13 | coderEnumNoZero = coderInt32NoZero
14 | coderEnum = coderInt32
15 | coderEnumPtr = coderInt32Ptr
16 | coderEnumSlice = coderInt32Slice
17 | coderEnumPackedSlice = coderInt32PackedSlice
18 | )
19 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/impl/enum.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package impl
6 |
7 | import (
8 | "reflect"
9 |
10 | "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | type EnumInfo struct {
14 | GoReflectType reflect.Type // int32 kind
15 | Desc protoreflect.EnumDescriptor
16 | }
17 |
18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum {
19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum)
20 | }
21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc }
22 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build purego || appengine
6 | // +build purego appengine
7 |
8 | package strs
9 |
10 | import pref "google.golang.org/protobuf/reflect/protoreflect"
11 |
12 | func UnsafeString(b []byte) string {
13 | return string(b)
14 | }
15 |
16 | func UnsafeBytes(s string) []byte {
17 | return []byte(s)
18 | }
19 |
20 | type Builder struct{}
21 |
22 | func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName {
23 | return prefix.Append(name)
24 | }
25 |
26 | func (*Builder) MakeString(b []byte) string {
27 | return string(b)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/proto/proto_methods.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The protoreflect build tag disables use of fast-path methods.
6 | //go:build !protoreflect
7 | // +build !protoreflect
8 |
9 | package proto
10 |
11 | import (
12 | "google.golang.org/protobuf/reflect/protoreflect"
13 | "google.golang.org/protobuf/runtime/protoiface"
14 | )
15 |
16 | const hasProtoMethods = true
17 |
18 | func protoMethods(m protoreflect.Message) *protoiface.Methods {
19 | return m.ProtoMethods()
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/proto/proto_reflect.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The protoreflect build tag disables use of fast-path methods.
6 | //go:build protoreflect
7 | // +build protoreflect
8 |
9 | package proto
10 |
11 | import (
12 | "google.golang.org/protobuf/reflect/protoreflect"
13 | "google.golang.org/protobuf/runtime/protoiface"
14 | )
15 |
16 | const hasProtoMethods = false
17 |
18 | func protoMethods(m protoreflect.Message) *protoiface.Methods {
19 | return nil
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package protoiface
6 |
7 | type MessageV1 interface {
8 | Reset()
9 | String() string
10 | ProtoMessage()
11 | }
12 |
13 | type ExtensionRangeV1 struct {
14 | Start, End int32 // both inclusive
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/.gitignore:
--------------------------------------------------------------------------------
1 | *.sw[op]
2 | *.svg
3 | *.xml
4 | *.out
5 | Gopkg.lock
6 | vendor/
7 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 |
6 | ## v0.3.1 — 2022-12-28
7 |
8 | ### Fixed
9 |
10 | - Sometimes the nonce was not set on the SASL state machine, resulting in
11 | authentication failing
12 |
13 |
14 | ## v0.3.0 — 2022-08-15
15 |
16 | ### Added
17 |
18 | - Support for tls-exporter channel binding method as defined in [RFC 9266]
19 | - Support for fast XOR using SIMD/VSX on more architectures
20 |
21 |
22 | ### Fixed
23 |
24 | - Return an error if no tls-unique channel binding (CB) data is present in the
25 | TLS connection state (or no connection state exists) and we use SCRAM with CB
26 |
27 |
28 | [RFC 9266]: https://datatracker.ietf.org/doc/html/rfc9266
29 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/README.md:
--------------------------------------------------------------------------------
1 | # SASL
2 |
3 | [![Issue Tracker][badge]](https://mellium.im/issue)
4 | [](https://pkg.go.dev/mellium.im/sasl)
5 | [](https://mellium.chat)
6 | [](https://opensource.org/licenses/BSD-2-Clause)
7 |
8 |
9 |
10 | A Go library implementing the Simple Authentication and Security Layer (SASL) as
11 | defined by [RFC 4422][rfc4422].
12 |
13 |
14 | ## License
15 |
16 | The package may be used under the terms of the BSD 2-Clause License a copy of
17 | which may be found in the file [LICENSE.md][LICENSE].
18 |
19 | [badge]: https://img.shields.io/badge/style-mellium%2fxmpp-green.svg?longCache=true&style=popout-square&label=issues
20 | [rfc4422]: https://tools.ietf.org/html/rfc4422
21 | [LICENSE]: https://codeberg.org/mellium/xmpp/src/branch/main/LICENSE
22 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Mellium Contributors.
2 | // Use of this source code is governed by the BSD 2-clause
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package sasl implements the Simple Authentication and Security Layer (SASL)
6 | // as defined by RFC 4422.
7 | //
8 | // Most users of this package will only need to create a Negotiator using
9 | // NewClient or NewServer and call its Step method repeatedly.
10 | // Authors implementing SASL mechanisms other than the builtin ones will want to
11 | // create a Mechanism struct which will likely use the other methods on the
12 | // Negotiator.
13 | //
14 | // Be advised: This API is still unstable and is subject to change.
15 | package sasl // import "mellium.im/sasl"
16 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/nonce.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Mellium Contributors.
2 | // Use of this source code is governed by the BSD 2-clause
3 | // license that can be found in the LICENSE file.
4 |
5 | package sasl
6 |
7 | import (
8 | "encoding/base64"
9 | "io"
10 | )
11 |
12 | // Generates a nonce with n random bytes base64 encoded to ensure that it meets
13 | // the criteria for inclusion in a SCRAM message.
14 | func nonce(n int, r io.Reader) []byte {
15 | if n < 1 {
16 | panic("Cannot generate zero or negative length nonce")
17 | }
18 | b := make([]byte, n)
19 | n2, err := r.Read(b)
20 | switch {
21 | case err != nil:
22 | panic(err)
23 | case n2 != n:
24 | panic("Could not read enough randomness to generate nonce")
25 | }
26 | val := make([]byte, base64.RawStdEncoding.EncodedLen(n))
27 | base64.RawStdEncoding.Encode(val, b)
28 |
29 | return val
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/xor.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.20
6 |
7 | package sasl
8 |
9 | // TODO: remove all the specialized XOR code and use "crypto/subtle".XORBytes
10 | // when Go v1.21 comes out. For more information see:
11 | // https://mellium.im/issue/338
12 |
13 | func goXORBytes(dst, x, y []byte) int {
14 | n := len(x)
15 | if len(y) < n {
16 | n = len(y)
17 | }
18 | if n == 0 {
19 | return 0
20 | }
21 | if n > len(dst) {
22 | panic("subtle.XORBytes: dst too short")
23 | }
24 | xorBytes(&dst[0], &x[0], &y[0], n) // arch-specific
25 | return n
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/xor_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !purego
6 |
7 | package sasl
8 |
9 | //go:noescape
10 | func xorBytes(dst, a, b *byte, n int)
11 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/xor_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !purego
6 |
7 | package sasl
8 |
9 | //go:noescape
10 | func xorBytes(dst, a, b *byte, n int)
11 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/xor_go.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Mellium Contributors.
2 | // Use of this source code is governed by the BSD 2-clause
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.20
6 |
7 | package sasl
8 |
9 | import (
10 | "crypto/subtle"
11 | )
12 |
13 | func goXORBytes(dst, x, y []byte) int {
14 | return subtle.XORBytes(dst, x, y)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/mellium.im/sasl/xor_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (ppc64 || ppc64le) && !purego
6 |
7 | package sasl
8 |
9 | //go:noescape
10 | func xorBytes(dst, a, b *byte, n int)
11 |
--------------------------------------------------------------------------------