diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0341a49510d..27eec0609c8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,21 @@ updates: directory: '/' schedule: interval: 'weekly' + open-pull-requests-limit: 10 + groups: + opentelemetry-otel: + patterns: + - go.opentelemetry.io/otel/* + opentelemetry-contrib: + patterns: + - go.opentelemetry.io/contrib/* + - github.com/open-telemetry/opentelemetry-collector-contrib/* + opentelemetry-collector: + patterns: + - go.opentelemetry.io/collector/* + k8s.io: + patterns: + - k8s.io/* - package-ecosystem: 'docker' directory: '/' diff --git a/.github/workflows/milestoned_to_project.yml b/.github/workflows/milestoned_to_project.yml index 34336ca33da..2198b8c24b2 100644 --- a/.github/workflows/milestoned_to_project.yml +++ b/.github/workflows/milestoned_to_project.yml @@ -19,7 +19,7 @@ jobs: app-id: ${{secrets.APP_ID}} private-key: ${{secrets.APP_PRIVATE_KEY}} owner: ${{ github.repository_owner }} - - uses: actions/add-to-project@v1.0.0 + - uses: actions/add-to-project@v1.0.2 with: project-url: https://github.com/orgs/grafana/projects/135 github-token: ${{ steps.get-github-app-token.outputs.token }} diff --git a/.github/workflows/sbom-report.yml b/.github/workflows/sbom-report.yml index 0f64d836f64..7a5638da07f 100644 --- a/.github/workflows/sbom-report.yml +++ b/.github/workflows/sbom-report.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Anchore SBOM Action - uses: anchore/sbom-action@v0.17.4 + uses: anchore/sbom-action@v0.17.5 with: artifact-name: ${{ github.event.repository.name }}-spdx.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d1c662a6c..b0f764f8f69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ ## main / unreleased -* [ENHANCEMENT] The span multiplier now also sources its value from the resource attributes. [#4210](https://github.com/grafana/tempo/pull/4210) -* [FEATURE] Export cost attribution usage metrics from distributor [#4162](https://github.com/grafana/tempo/pull/4162) (@mdisibio) -* [ENHANCEMENT] Changed log level from INFO to DEBUG for the TempoDB Find operation using traceId to reduce excessive/unwanted logs in log search. [#4179](https://github.com/grafana/tempo/pull/4179) (@Aki0x137) -* [ENHANCEMENT] Pushdown collection of results from generators in the querier [#4119](https://github.com/grafana/tempo/pull/4119) (@electron0zero) +* [CHANGE] **BREAKING CHANGE** Change the AWS Lambda serverless build tooling output from "main" to "bootstrap". Refer to https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-from-the-go1-x-runtime-to-the-custom-runtime-on-amazon-linux-2/ for migration steps [#3852](https://github.com/grafana/tempo/pull/3852) (@zatlodan) * [CHANGE] Add throughput and SLO metrics in the tags and tag values endpoints [#4148](https://github.com/grafana/tempo/pull/4148) (@electron0zero) * [CHANGE] tempo-cli: add support for /api/v2/traces endpoint [#4127](https://github.com/grafana/tempo/pull/4127) (@electron0zero) **BREAKING CHANGE** The `tempo-cli` now uses the `/api/v2/traces` endpoint by default, @@ -15,8 +12,15 @@ * [CHANGE] Update Go to 1.23.1 [#4146](https://github.com/grafana/tempo/pull/4146) [#4147](https://github.com/grafana/tempo/pull/4147) (@javiermolinar) * [CHANGE] TraceQL: Add range condition for byte predicates [#4198](https://github.com/grafana/tempo/pull/4198) (@ie-pham) * [CHANGE] Return 422 for TRACE_TOO_LARGE queries [#4160](https://github.com/grafana/tempo/pull/4160) (@zalegrala) +* [CHANGE] Upgrade OTEL sdk to reduce allocs [#4243](https://github.com/grafana/tempo/pull/4243) (@joe-elliott) +* [CHANGE] Tighten file permissions [#4251](https://github.com/grafana/tempo/pull/4251) (@zalegrala) * [FEATURE] Discarded span logging `log_discarded_spans` [#3957](https://github.com/grafana/tempo/issues/3957) (@dastrobu) * [FEATURE] TraceQL support for instrumentation scope [#3967](https://github.com/grafana/tempo/pull/3967) (@ie-pham) +* [FEATURE] Export cost attribution usage metrics from distributor [#4162](https://github.com/grafana/tempo/pull/4162) (@mdisibio) +* [FEATURE] TraceQL metrics: avg_over_time [#4073](https://github.com/grafana/tempo/pull/4073) (@javiermolinar) +* [ENHANCEMENT] Changed log level from INFO to DEBUG for the TempoDB Find operation using traceId to reduce excessive/unwanted logs in log search. [#4179](https://github.com/grafana/tempo/pull/4179) (@Aki0x137) +* [ENHANCEMENT] Pushdown collection of results from generators in the querier [#4119](https://github.com/grafana/tempo/pull/4119) (@electron0zero) +* [ENHANCEMENT] The span multiplier now also sources its value from the resource attributes. [#4210](https://github.com/grafana/tempo/pull/4210) * [ENHANCEMENT] TraceQL: Attribute iterators collect matched array values [#3867](https://github.com/grafana/tempo/pull/3867) (@electron0zero, @stoewer) * [ENHANCEMENT] Allow returning partial traces that exceed the MaxBytes limit for V2 [#3941](https://github.com/grafana/tempo/pull/3941) (@javiermolinar) * [ENHANCEMENT] Added new middleware to validate request query values [#3993](https://github.com/grafana/tempo/pull/3993) (@javiermolinar) @@ -26,6 +30,7 @@ * [ENHANCEMENT] Reduce allocs related to marshalling dedicated columns repeatedly in the query frontend. [#4007](https://github.com/grafana/tempo/pull/4007) (@joe-elliott) * [ENHANCEMENT] Improve performance of TraceQL queries [#4114](https://github.com/grafana/tempo/pull/4114) (@mdisibio) * [ENHANCEMENT] Improve performance of TraceQL queries [#4163](https://github.com/grafana/tempo/pull/4163) (@mdisibio) +* [ENHANCEMENT] Reduce memory usage of classic histograms in the span-metrics and service-graphs processors [#4232](https://github.com/grafana/tempo/pull/4232) (@mdisibio) * [ENHANCEMENT] Implement simple Fetch by key for cache items [#4032](https://github.com/grafana/tempo/pull/4032) (@javiermolinar) * [ENHANCEMENT] Replace Grafana Agent example by Grafana Alloy[#4030](https://github.com/grafana/tempo/pull/4030) (@javiermolinar) * [ENHANCEMENT] Support exporting internal Tempo traces via OTLP exporter when `use_otel_tracer` is enabled. Use the OpenTelemetry SDK environment variables to configure the span exporter. [#4028](https://github.com/grafana/tempo/pull/4028) (@andreasgerstmayr) @@ -42,11 +47,18 @@ * [ENHANCEMENT] Speedup DistinctValue collector and exit early for ingesters [#4104](https://github.com/grafana/tempo/pull/4104) (@electron0zero) * [ENHANCEMENT] Add disk caching in ingester SearchTagValuesV2 for completed blocks [#4069](https://github.com/grafana/tempo/pull/4069) (@electron0zero) * [ENHANCEMENT] Added most_recent=true query hint to TraceQL to return most recent results. [#4238](https://github.com/grafana/tempo/pull/4238) (@joe-elliott) +* [ENHANCEMENT] chore: remove gofakeit dependency [#4274](https://github.com/grafana/tempo/pull/4274) (@javiermolinar) +* [ENHANCEMENT] Add a max flush attempts and metric to the metrics generator [#4254](https://github.com/grafana/tempo/pull/4254) (@joe-elliott) +* [ENHANCEMENT] Collection of query-frontend changes to reduce allocs. [#4242]https://github.com/grafana/tempo/pull/4242 (@joe-elliott) +* [ENHANCEMENT] Added `insecure-skip-verify` option in tempo-cli to skip SSL certificate validation when connecting to the S3 backend. [#44236](https://github.com/grafana/tempo/pull/4259) (@faridtmammadov) * [BUGFIX] Replace hedged requests roundtrips total with a counter. [#4063](https://github.com/grafana/tempo/pull/4063) [#4078](https://github.com/grafana/tempo/pull/4078) (@galalen) * [BUGFIX] Metrics generators: Correctly drop from the ring before stopping ingestion to reduce drops during a rollout. [#4101](https://github.com/grafana/tempo/pull/4101) (@joe-elliott) * [BUGFIX] Correctly handle 400 Bad Request and 404 Not Found in gRPC streaming [#4144](https://github.com/grafana/tempo/pull/4144) (@mapno) * [BUGFIX] Pushes a 0 to classic histogram's counter when the series is new to allow Prometheus to start from a non-null value. [#4140](https://github.com/grafana/tempo/pull/4140) (@mapno) * [BUGFIX] Fix counter samples being downsampled by backdate to the previous minute the initial sample when the series is new [#44236](https://github.com/grafana/tempo/pull/4236) (@javiermolinar) +* [BUGFIX] Skip computing exemplars for instant queries. [#4204](https://github.com/grafana/tempo/pull/4204) (@javiermolinar) +* [BUGFIX] Gave context to orphaned spans related to various maintenance processes. [#4260](https://github.com/grafana/tempo/pull/4260) (@joe-elliott) +* [BUGFIX] Utilize S3Pass and S3User parameters in tempo-cli options, which were previously unused in the code. [#44236](https://github.com/grafana/tempo/pull/4259) (@faridtmammadov) # v2.6.1 diff --git a/CODEOWNERS b/CODEOWNERS index 2ba415d7043..d8d3fb88d65 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,15 +11,15 @@ # In each subsection folders are ordered first by depth, then alphabetically. # This should make it easy to add new rules without breaking existing ones. -* @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer @javiermolinar +* @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer @javiermolinar -/docs/ @knylander-grafana @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/docs/ @knylander-grafana @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/.github/backport.yml @jdbaldry @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/.github/update-make-docs.yml @jdbaldry @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/.github/website-next.yml @jdbaldry @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/.github/website-versioned.yml @jdbaldry @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/docs/docs.mk @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/docs/make-docs @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/docs/Makefile @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer -/docs/variables.mk @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @kvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/.github/backport.yml @jdbaldry @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/.github/update-make-docs.yml @jdbaldry @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/.github/website-next.yml @jdbaldry @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/.github/website-versioned.yml @jdbaldry @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/docs/docs.mk @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/docs/make-docs @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/docs/Makefile @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer +/docs/variables.mk @jdbaldry @knylander-grafana @joe-elliott @mdisibio @mapno @yvrhdn @zalegrala @electron0zero @ie-pham @stoewer diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 29f97278808..d684aca6dac 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -51,7 +51,7 @@ The current team members are: - Javi Molina - [javiermolinar](https://github.com/javiermolinar) ([Grafana Labs](https://grafana.com/)) - Joe Elliott - [joe-elliott](https://github.com/joe-elliott) ([Grafana Labs](https://grafana.com/)) - Kim Nylander - [knylander-grafana](https://github.com/knylander-grafana) ([Grafana Labs](https://grafana.com/)) -- Koenraad Verheyden - [kvrhdn](https://github.com/kvrhdn) ([Grafana Labs](https://grafana.com/)) +- Yuna Verheyden - [yvhrdn](https://github.com/yvhrdn) ([Grafana Labs](https://grafana.com/)) - Mario Rodriguez - [mapno](https://github.com/mapno) ([Grafana Labs](https://grafana.com/)) - Marty Disibio - [mdisibio](https://github.com/mdisibio) ([Grafana Labs](https://grafana.com/)) - Adrian Stoewer - [stoewer](https://github.com/stoewer) ([Grafana Labs](https://grafana.com/)) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 242ca882bcb..0be9e7a34dd 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -3,7 +3,7 @@ * @javiermolinar * @joe-elliott * @knylander-grafana -* @kvrhdn +* @yvrhdn * @mapno * @mdisibio * @stoewer diff --git a/Makefile b/Makefile index 74b5569e959..97de1af6eea 100644 --- a/Makefile +++ b/Makefile @@ -287,11 +287,13 @@ gen-traceql-local: ## Generate traceq local gen-parquet-query: ## Generate Parquet query go run ./pkg/parquetquerygen/predicates.go > ./pkg/parquetquery/predicates.gen.go +##@ Tempo tools ### Check vendored and generated files are up to date .PHONY: vendor-check vendor-check: gen-proto update-mod gen-traceql gen-parquet-query ## Keep up to date vendorized files git diff --exit-code -- **/go.sum **/go.mod vendor/ pkg/tempopb/ pkg/traceql/ + ### Tidy dependencies for tempo and tempo-serverless modules .PHONY: update-mod update-mod: tools-update-mod ## Update module @@ -325,7 +327,7 @@ docs-test: ##@ jsonnet .PHONY: jsonnet jsonnet-check jsonnet-test -jsonnet: tools-image ## Generate jsonnet +jsonnet: tools-image ## Generate jsonnet $(TOOLS_CMD) $(MAKE) -C operations/jsonnet-compiled/util gen jsonnet-check: tools-image ## Check jsonnet diff --git a/cmd/tempo-cli/cmd-gen-bloom.go b/cmd/tempo-cli/cmd-gen-bloom.go index e3ccf553c93..fee0a178c26 100644 --- a/cmd/tempo-cli/cmd-gen-bloom.go +++ b/cmd/tempo-cli/cmd-gen-bloom.go @@ -29,7 +29,7 @@ type forEachRecord func(id common.ID) error func ReplayBlockAndDoForEachRecord(meta *backend.BlockMeta, filepath string, forEach forEachRecord) error { // replay file to extract records - f, err := os.OpenFile(filepath, os.O_RDONLY, 0o644) + f, err := os.OpenFile(filepath, os.O_RDONLY, 0o600) if err != nil { return err } diff --git a/cmd/tempo-cli/cmd-gen-index.go b/cmd/tempo-cli/cmd-gen-index.go index 279937ac7b1..e4ddd928973 100644 --- a/cmd/tempo-cli/cmd-gen-index.go +++ b/cmd/tempo-cli/cmd-gen-index.go @@ -24,7 +24,7 @@ type indexCmd struct { func ReplayBlockAndGetRecords(meta *backend.BlockMeta, filepath string) ([]v2.Record, error, error) { var replayError error // replay file to extract records - f, err := os.OpenFile(filepath, os.O_RDONLY, 0o644) + f, err := os.OpenFile(filepath, os.O_RDONLY, 0o600) if err != nil { return nil, nil, err } @@ -152,7 +152,7 @@ func (cmd *indexCmd) Run(ctx *globalOptions) error { // get index file with records indexFilePath := cmd.backendOptions.Bucket + cmd.TenantID + "/" + cmd.BlockID + "/" + indexFilename - indexFile, err := os.OpenFile(indexFilePath, os.O_RDONLY, 0o644) + indexFile, err := os.OpenFile(indexFilePath, os.O_RDONLY, 0o600) if err != nil { fmt.Println("error opening index file") return err @@ -166,7 +166,7 @@ func (cmd *indexCmd) Run(ctx *globalOptions) error { // data reader dataFilePath := cmd.backendOptions.Bucket + cmd.TenantID + "/" + cmd.BlockID + "/" + dataFilename - dataFile, err := os.OpenFile(dataFilePath, os.O_RDONLY, 0o644) + dataFile, err := os.OpenFile(dataFilePath, os.O_RDONLY, 0o600) if err != nil { fmt.Println("error opening data file") return err diff --git a/cmd/tempo-cli/cmd-migrate-overrides-config.go b/cmd/tempo-cli/cmd-migrate-overrides-config.go index 6042f2b82c7..30eec739fb7 100644 --- a/cmd/tempo-cli/cmd-migrate-overrides-config.go +++ b/cmd/tempo-cli/cmd-migrate-overrides-config.go @@ -68,7 +68,7 @@ func (cmd *migrateOverridesConfigCmd) Run(*globalOptions) error { } if cmd.ConfigDest != "" { - if err := os.WriteFile(cmd.ConfigDest, configBytes, 0o644); err != nil { + if err := os.WriteFile(cmd.ConfigDest, configBytes, 0o600); err != nil { return fmt.Errorf("failed to write config file: %w", err) } } else { @@ -90,7 +90,7 @@ func (cmd *migrateOverridesConfigCmd) Run(*globalOptions) error { } if cmd.OverridesDest != "" { - if err := os.WriteFile(cmd.OverridesDest, overridesBytes, 0o644); err != nil { + if err := os.WriteFile(cmd.OverridesDest, overridesBytes, 0o600); err != nil { return fmt.Errorf("failed to write overrides file: %w", err) } } else { diff --git a/cmd/tempo-cli/main.go b/cmd/tempo-cli/main.go index 3d046e79dd5..0a8e8105096 100644 --- a/cmd/tempo-cli/main.go +++ b/cmd/tempo-cli/main.go @@ -5,6 +5,8 @@ import ( "fmt" "os" + "github.com/grafana/dskit/flagext" + "github.com/alecthomas/kong" "gopkg.in/yaml.v2" @@ -30,9 +32,10 @@ type backendOptions struct { Backend string `help:"backend to connect to (s3/gcs/local/azure), optional, overrides backend in config file" enum:",s3,gcs,local,azure" default:""` Bucket string `help:"bucket (or path on local backend) to scan, optional, overrides bucket in config file"` - S3Endpoint string `name:"s3-endpoint" help:"s3 endpoint (s3.dualstack.us-east-2.amazonaws.com), optional, overrides endpoint in config file"` - S3User string `name:"s3-user" help:"s3 username, optional, overrides username in config file"` - S3Pass string `name:"s3-pass" help:"s3 password, optional, overrides password in config file"` + S3Endpoint string `name:"s3-endpoint" help:"s3 endpoint (s3.dualstack.us-east-2.amazonaws.com), optional, overrides endpoint in config file"` + S3User string `name:"s3-user" help:"s3 username, optional, overrides username in config file"` + S3Pass string `name:"s3-pass" help:"s3 password, optional, overrides password in config file"` + InsecureSkipVerify bool `name:"insecure-skip-verify" help:"skip TLS verification, only applies to S3 and GCS" default:"false"` } var cli struct { @@ -131,6 +134,17 @@ func loadBackend(b *backendOptions, g *globalOptions) (backend.Reader, backend.W cfg.StorageConfig.Trace.Azure.ContainerName = b.Bucket } + cfg.StorageConfig.Trace.S3.InsecureSkipVerify = b.InsecureSkipVerify + cfg.StorageConfig.Trace.GCS.Insecure = b.InsecureSkipVerify + + if b.S3User != "" { + cfg.StorageConfig.Trace.S3.AccessKey = b.S3User + } + + if b.S3Pass != "" { + cfg.StorageConfig.Trace.S3.SecretKey = flagext.SecretWithValue(b.S3Pass) + } + if b.S3Endpoint != "" { cfg.StorageConfig.Trace.S3.Endpoint = b.S3Endpoint } diff --git a/cmd/tempo-serverless/Makefile b/cmd/tempo-serverless/Makefile index 86b419e09c0..78ddcd78c54 100644 --- a/cmd/tempo-serverless/Makefile +++ b/cmd/tempo-serverless/Makefile @@ -33,13 +33,14 @@ build-docker-lambda-test: $(IN_LAMBDA) CGO_ENABLED=0 go build -o ./lambda $(IN_LAMBDA) docker build -f ./Dockerfile -t tempo-serverless-lambda . -# lambda zips expect a compiled executable in root. the filename "main" is important -# as that should the handler config option in aws +# Lambda zips expect a compiled executable in the root. The filename "bootstrap" is important here. +# The new AWS Lambda runtime expects an executable with the name "bootstrap" to be provided, the "handler" configuration is ignored when using the new runtime. +# See https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-from-the-go1-x-runtime-to-the-custom-runtime-on-amazon-linux-2/ for more info. .PHONY: build-lambda-zip build-lambda-zip: - $(IN_LAMBDA) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main - $(IN_LAMBDA) zip tempo-serverless-$(VERSION).zip main - $(IN_LAMBDA) rm main + $(IN_LAMBDA) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bootstrap + $(IN_LAMBDA) zip tempo-serverless-$(VERSION).zip bootstrap + $(IN_LAMBDA) rm bootstrap .PHONY: test test: diff --git a/cmd/tempo-serverless/cloud-run/go.mod b/cmd/tempo-serverless/cloud-run/go.mod index e48440c67d1..d0fed2b6eb2 100644 --- a/cmd/tempo-serverless/cloud-run/go.mod +++ b/cmd/tempo-serverless/cloud-run/go.mod @@ -113,9 +113,9 @@ require ( go.opentelemetry.io/collector/semconv v0.105.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/cmd/tempo-serverless/cloud-run/go.sum b/cmd/tempo-serverless/cloud-run/go.sum index 11625dca355..22c145f16b0 100644 --- a/cmd/tempo-serverless/cloud-run/go.sum +++ b/cmd/tempo-serverless/cloud-run/go.sum @@ -327,14 +327,14 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= diff --git a/cmd/tempo-serverless/lambda/go.mod b/cmd/tempo-serverless/lambda/go.mod index 3eb799d9ff8..d488de58e40 100644 --- a/cmd/tempo-serverless/lambda/go.mod +++ b/cmd/tempo-serverless/lambda/go.mod @@ -117,9 +117,9 @@ require ( go.opentelemetry.io/collector/semconv v0.105.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/cmd/tempo-serverless/lambda/go.sum b/cmd/tempo-serverless/lambda/go.sum index 70937341c86..259a30d11d9 100644 --- a/cmd/tempo-serverless/lambda/go.sum +++ b/cmd/tempo-serverless/lambda/go.sum @@ -335,14 +335,14 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= diff --git a/cmd/tempo/Dockerfile b/cmd/tempo/Dockerfile index b2b412372ab..8e77d926244 100644 --- a/cmd/tempo/Dockerfile +++ b/cmd/tempo/Dockerfile @@ -6,7 +6,7 @@ COPY bin/linux/tempo-${TARGETARCH} /tempo RUN addgroup -g 10001 -S tempo && \ adduser -u 10001 -S tempo -G tempo -RUN mkdir -p /var/tempo && \ +RUN mkdir -p /var/tempo -m 0700 && \ chown -R tempo:tempo /var/tempo USER 10001:10001 diff --git a/docs/sources/tempo/api_docs/_index.md b/docs/sources/tempo/api_docs/_index.md index 4d85b0503ae..346e85cf3d2 100644 --- a/docs/sources/tempo/api_docs/_index.md +++ b/docs/sources/tempo/api_docs/_index.md @@ -31,7 +31,7 @@ For externally supported GRPC API, [see below](#tempo-grpc-api). | [Search tag names V2](#search-tags-v2) | Query-frontend | HTTP | `GET /api/v2/search/tags` | | [Search tag values](#search-tag-values) | Query-frontend | HTTP | `GET /api/search/tag//values` | | [Search tag values V2](#search-tag-values-v2) | Query-frontend | HTTP | `GET /api/v2/search/tag//values` | -| [TraceQL Metrics](#traceql-metrics) | Query-frontend | HTTP | `GET /api/metrics/query_range` | +| [TraceQL Metrics](#traceql-metrics) | Query-frontend | HTTP | `GET /api/metrics/query_range` | | [TraceQL Metrics (instant)](#instant) | Query-frontend | HTTP | `GET /api/metrics/query` | | [Query Echo Endpoint](#query-echo-endpoint) | Query-frontend | HTTP | `GET /api/echo` | | [Overrides API](#overrides-api) | Query-frontend | HTTP | `GET,POST,PATCH,DELETE /api/overrides` | @@ -312,8 +312,9 @@ $ curl -G -s http://localhost:3200/api/search --data-urlencode 'tags=service.nam Ingester configuration `complete_block_timeout` affects how long tags are available for search. -This endpoint retrieves all discovered tag names that can be used in search. The endpoint is available in the query frontend service in -a microservices deployment, or the Tempo endpoint in a monolithic mode deployment. The tags endpoint takes a scope that controls the kinds +This endpoint retrieves all discovered tag names that can be used in search. +The endpoint is available in the query frontend service in a microservices deployment, or the Tempo endpoint in a monolithic mode deployment. +The tags endpoint takes a scope that controls the kinds of tags or attributes returned. If nothing is provided, the endpoint returns all resource and span tags. ``` @@ -584,7 +585,9 @@ If a particular service name (for example, `shopping-cart`) is only present on s ### TraceQL Metrics -The TraceQL Metrics API returns Prometheus-like time-series for a given metrics query. Metrics queries are those using metrics functions like `rate()` and `quantile_over_time()`. See the [documentation]({{< relref "../traceql/metrics-queries" >}}) for the complete list. +The TraceQL Metrics API returns Prometheus-like time-series for a given metrics query. +Metrics queries are those using metrics functions like `rate()` and `quantile_over_time()`. +Refer to the [TraceQL metrics documentation](https://grafana.com/docs/tempo//traceql/metrics-queries/) for more information list. Parameters: @@ -595,21 +598,23 @@ Parameters: - `end = (unix epoch seconds | unix epoch nanoseconds | RFC3339 string)` Optional. Along with `start` define the time range. Providing both `start` and `end` includes blocks for the specified time range only. - `since = (duration string)` - Optional. Can be used instead of `start` and `end` to define the time range in relative values. For example `since=15m` will query the last 15 minutes. Default is last 1 hour. + Optional. Can be used instead of `start` and `end` to define the time range in relative values. For example, `since=15m` queries the last 15 minutes. Default is the last 1 hour. - `step = (duration string)` - Optional. Defines the granularity of the returned time-series. For example `step=15s` will return a data point every 15s within the time range. If not specified then the default behavior will choose a dynamic step based on the time range. + Optional. Defines the granularity of the returned time-series. For example, `step=15s` returns a data point every 15s within the time range. If not specified, then the default behavior chooses a dynamic step based on the time range. +- `exemplars = (integer)` + Optional. Defines the maximun number of exemplars for the query. It will be trimmed to max_exemplars if exceed it. The API is available in the query frontend service in a microservices deployment, or the Tempo endpoint in a monolithic mode deployment. -For example the following request computes the rate of spans received for `myservice` over the last three hours, at 1 minute intervals. +For example, the following request computes the rate of spans received for `myservice` over the last three hours, at 1 minute intervals. {{< admonition type="note" >}} Actual API parameters must be url-encoded. This example is left unencoded for readability. -{{% /admonition %}} +{{< /admonition >}} ``` -GET /api/metrics/query_range?q={resource.service.name="myservice"}|rate()&since=3h&step=1m +GET /api/metrics/query_range?q={resource.service.name="myservice"} | min_over_time() with(exemplars=true) &since=3h&step=1m&exemplars=100 ``` #### Instant @@ -853,6 +858,6 @@ service StreamingQuerier { rpc SearchTagsV2(SearchTagsRequest) returns (stream SearchTagsV2Response) {} rpc SearchTagValues(SearchTagValuesRequest) returns (stream SearchTagValuesResponse) {} rpc SearchTagValuesV2(SearchTagValuesRequest) returns (stream SearchTagValuesV2Response) {} - rpc MetricsQueryRange(QueryRangeRequest) returns (stream QueryRangeResponse) {} + rpc MetricsQueryRange(QueryRangeRequest) returns (stream QueryRangeResponse) {} } ``` diff --git a/docs/sources/tempo/configuration/_index.md b/docs/sources/tempo/configuration/_index.md index e8141fd68d8..3e48575f5e6 100644 --- a/docs/sources/tempo/configuration/_index.md +++ b/docs/sources/tempo/configuration/_index.md @@ -678,6 +678,9 @@ query_frontend: # 0 disables this limit. [max_duration: | default = 3h ] + # Maximun number of exemplars per range query. Limited to 100. + [max_exemplars: | default = 100 ] + # query_backend_after controls where the query-frontend searches for traces. # Time ranges older than query_backend_after will be searched in the backend/object storage only. # Time ranges between query_backend_after and now will be queried from the metrics-generators. @@ -694,6 +697,7 @@ query_frontend: # If set to a non-zero value, it's value will be used to decide if query is within SLO or not. # Query is within SLO if it returned 200 within duration_slo seconds OR processed throughput_slo bytes/s data. [throughput_bytes_slo: | default = 0 ] + ``` ## Querier diff --git a/docs/sources/tempo/metrics-generator/_index.md b/docs/sources/tempo/metrics-generator/_index.md index 919eeab0c99..9c8a7436cc2 100644 --- a/docs/sources/tempo/metrics-generator/_index.md +++ b/docs/sources/tempo/metrics-generator/_index.md @@ -10,7 +10,7 @@ weight: 500 # Metrics-generator Metrics-generator is an optional Tempo component that derives metrics from ingested traces. -If present, the distributors write received spans to both the ingester and the metrics-generator. +If present, the distributor writes received spans to both the ingester and the metrics-generator. The metrics-generator processes spans and writes metrics to a Prometheus data source using the Prometheus remote write protocol. ## Architecture diff --git a/docs/sources/tempo/operations/tempo_cli.md b/docs/sources/tempo/operations/tempo_cli.md index 695583d0715..60d56e6221b 100644 --- a/docs/sources/tempo/operations/tempo_cli.md +++ b/docs/sources/tempo/operations/tempo_cli.md @@ -51,8 +51,9 @@ The backend can be configured in a few ways: * `--backend ` The storage backend type, one of `s3`, `gcs`, `azure`, and `local`. * `--bucket ` The bucket name. The meaning of this value is backend-specific. Refer to [Configuration]({{< relref "../configuration" >}}) documentation for more information. * `--s3-endpoint ` The S3 API endpoint (i.e. s3.dualstack.us-east-2.amazonaws.com). - * `--s3-user `, `--s3-password ` The S3 user name and password (or access key and secret key). + * `--s3-user `, `--s3-pass ` The S3 user name and password (or access key and secret key). Optional, as Tempo CLI supports the same authentication mechanisms as Tempo. See [S3 permissions documentation]({{< relref "../configuration/hosted-storage/s3" >}}) for more information. + * `--insecure-skip-verify` skip TLS verification, only applies to S3 and GCS. Each option applies only to the command in which it is used. For example, `--backend ` does not permanently change where Tempo stores data. It only changes it for command in which you apply the option. diff --git a/docs/sources/tempo/operations/traceql-metrics.md b/docs/sources/tempo/operations/traceql-metrics.md index 50bd2907cdf..93320260806 100644 --- a/docs/sources/tempo/operations/traceql-metrics.md +++ b/docs/sources/tempo/operations/traceql-metrics.md @@ -84,6 +84,46 @@ Setting `flush_to_storage` to `true` ensures that metrics blocks are flushed to For more information about overrides, refer to [Standard overrides](https://grafana.com/docs/tempo//configuration/#standard-overrides). + ```yaml + overrides: + 'tenantID': + metrics_generator_processors: + - local-blocks + ``` + +By default, for all tenants in the main configuration: + + ```yaml + overrides: + defaults: + metrics_generator: + processors: [local-blocks] + ``` + +Add this configuration to run TraceQL metrics queries against all spans (and not just server spans): + +```yaml +metrics_generator: + processor: + local_blocks: + filter_server_spans: false +``` + +If you configured Tempo using the `tempo-distributed` Helm chart, you can also set `traces_storage` using your `values.yaml` file. +Refer to the [Helm chart for an example](https://github.com/grafana/helm-charts/blob/559ecf4a9c9eefac4521454e7a8066778e4eeff7/charts/tempo-distributed/values.yaml#L362). + +```yaml +metrics_generator: + processor: + local_blocks: + flush_to_storage: true +``` + +Setting `flush_to_storage` to `true` ensures that metrics blocks are flushed to storage so TraceQL metrics queries against historical data. + +For more information about overrides, refer to [Standard overrides](https://grafana.com/docs/tempo//configuration/#standard-overrides). + + ## Evaluate query timeouts Because of their expensive nature, these queries can take a long time to run. diff --git a/docs/sources/tempo/traceql/_index.md b/docs/sources/tempo/traceql/_index.md index 1742f259d2d..1f3b51ae0bc 100644 --- a/docs/sources/tempo/traceql/_index.md +++ b/docs/sources/tempo/traceql/_index.md @@ -106,26 +106,26 @@ Attributes example: The following table shows the current available scoped intrinsic fields: -| **Field** | **Type** | **Definition** | **Example** | -| ------------------------ | ----------- | --------------------------------------------------------------- | -------------------------------------- | -| `span:status` | status enum | status: error, ok, or unset | `{ span:status = ok }` | -| `span:statusMessage` | string | optional text accompanying the span status | `{ span:statusMessage = "Forbidden" }` | -| `span:duration` | duration | end - start time of the span | `{ span:duration > 100ms }` | -| `span:name` | string | operation or span name | `{ span:name = "HTTP POST" }` | -| `span:kind` | kind enum | kind: server, client, producer, consumer, internal, unspecified | `{ span:kind = server }` | -| `span:id` | string | span id using hex string | `{ span:id = "0000000000000001" }` | -| `trace:duration` | duration | max(end) - min(start) time of the spans in the trace | `{ trace:duration > 100ms }` | -| `trace:rootName` | string | if it exists the name of the root span in the trace | `{ trace:rootName = "HTTP GET" }` | -| `trace:rootService` | string | if it exists the service name of the root span in the trace | `{ trace:rootServiceName = "gateway" }`| -| `trace:id` | string | trace id using hex string | `{ trace:id = "1234567890abcde" }` | -| `event:name` | string | name of event | `{ event:name = "exception" }` | -| `event:timeSinceStart` | duration | time of event in relation to the span start time | `{ event:timeSinceStart > 2ms}` | -| `link:spanID` | string | link span id using hex string | `{ link:spanID = "0000000000000001" }` | -| `link:traceID` | string | link trace id using hex string | `{ link:traceID = "1234567890abcde" }` | +| **Field** | **Type** | **Definition** | **Example** | +| ------------------------ | ----------- | --------------------------------------------------------------- | --------------------------------------- | +| `span:status` | status enum | status: error, ok, or unset | `{ span:status = ok }` | +| `span:statusMessage` | string | optional text accompanying the span status | `{ span:statusMessage = "Forbidden" }` | +| `span:duration` | duration | end - start time of the span | `{ span:duration > 100ms }` | +| `span:name` | string | operation or span name | `{ span:name = "HTTP POST" }` | +| `span:kind` | kind enum | kind: server, client, producer, consumer, internal, unspecified | `{ span:kind = server }` | +| `span:id` | string | span id using hex string | `{ span:id = "0000000000000001" }` | +| `trace:duration` | duration | max(end) - min(start) time of the spans in the trace | `{ trace:duration > 100ms }` | +| `trace:rootName` | string | if it exists, the name of the root span in the trace | `{ trace:rootName = "HTTP GET" }` | +| `trace:rootService` | string | if it exists, the service name of the root span in the trace | `{ trace:rootService = "gateway" }` | +| `trace:id` | string | trace id using hex string | `{ trace:id = "1234567890abcde" }` | +| `event:name` | string | name of event | `{ event:name = "exception" }` | +| `event:timeSinceStart` | duration | time of event in relation to the span start time | `{ event:timeSinceStart > 2ms}` | +| `link:spanID` | string | link span id using hex string | `{ link:spanID = "0000000000000001" }` | +| `link:traceID` | string | link trace id using hex string | `{ link:traceID = "1234567890abcde" }` | The trace-level intrinsics, `trace:duration`, `trace:rootName`, and `trace:rootService`, are the same for all spans in the same trace. diff --git a/docs/sources/tempo/traceql/metrics-queries.md b/docs/sources/tempo/traceql/metrics-queries.md deleted file mode 100644 index a0ed0bad17e..00000000000 --- a/docs/sources/tempo/traceql/metrics-queries.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: TraceQL metrics queries -menuTitle: TraceQL metrics queries -description: Learn about TraceQL metrics queries -weight: 600 -keywords: - - metrics query - - TraceQL metrics ---- - -# TraceQL metrics queries - -{{< docs/experimental product="TraceQL metrics" >}} - -TraceQL metrics is an experimental feature in Grafana Tempo that creates metrics from traces. - -Metric queries extend trace queries by applying a function to trace query results. -This powerful feature allows for ad hoc aggregation of any existing TraceQL query by any dimension available in your traces, much in the same way that LogQL metric queries create metrics from logs. - -Traces are a unique observability signal that contain causal relationships between the components in your system. -Do you want to know how many database calls across all systems are downstream of your application? -What services beneath a given endpoint are currently failing? -What services beneath an endpoint are currently slow? TraceQL metrics can answer all these questions by parsing your traces in aggregate. - -![Metrics visualization in Grafana](/media/docs/tempo/metrics-explore-sample-2.4.png) - -## Enable and use TraceQL metrics - -You can use the TraceQL metrics in Grafana with any existing or new Tempo data source. -This capability is available in Grafana Cloud and Grafana (10.4 and newer). - -To enable TraceQL metrics, refer to [Configure TraceQL metrics](https://grafana.com/docs/tempo/latest/operations/traceql-metrics/) for more information. - -## Exemplars - -Exemplars are a powerful feature of TraceQL metrics. -They allow you to see an exact trace that contributed to a given metric value. -This is particularly useful when you want to understand why a given metric is high or low. - -Exemplars are available in TraceQL metrics for all functions. -To get exemplars, you need to configure it in the query-frontend with the parameter `query_frontend.metrics.exemplars`, -or pass a query hint in your query. - -``` -{ name = "GET /:endpoint" } | quantile_over_time(duration, .99) by (span.http.target) with (exemplars=true) -``` - -## Functions - -TraceQL supports include `rate`, `count_over_time`, `quantile_over_time`, and `histogram_over_time` functions. -These functions can be added as an operator at the end of any TraceQL query. - -`rate` -: Calculates the number of matching spans per second - -`count_over_time` -: Counts the number of matching spans per time interval (see the `step` API parameter) - -`min_over_time` -: Returns the minimum value of matching spans values per time interval (see the `step` API parameter) - -`max_over_time` -: Returns the maximum value of matching spans values per time interval (see the `step` API parameter) - -`quantile_over_time` -: The quantile of the values in the specified interval - -`histogram_over_time` -: Evaluate frequency distribution over time. Example: `histogram_over_time(duration) by (span.foo)` - -`compare` -: Used to split the stream of spans into two groups: a selection and a baseline. The function returns time-series for all attributes found on the spans to highlight the differences between the two groups. - -### The `rate` function - -The following query shows the rate of errors by service and span name. - -``` -{ status = error } | rate() by (resource.service.name, name) -``` - -This example calculates the rate of the erroring spans coming from the service `foo`. -Rate is a `spans/sec` quantity. - -``` -{ resource.service.name = "foo" && status = error } | rate() -``` - -Combined with the `by()` operator, this can be even more powerful. - -``` -{ resource.service.name = "foo" && status = error } | rate() by (span.http.route) -``` - -This example still rates the erroring spans in the service `foo` but the metrics have been broken -down by HTTP route. -This might let you determine that `/api/sad` had a higher rate of erroring -spans than `/api/happy`, for example. - -### The `count_over_time`, `min_over_time` and `max_over_time` functions - -The `count_over_time()` let you counts the number of matching spans per time interval. - -``` -{ name = "GET /:endpoint" } | count_over_time() by (span.http.status_code) - -``` - -The `min_over_time()` let you aggregate numerical values by computing the minimum value of them, such as the all important span duration. - -``` -{ name = "GET /:endpoint" } | min_over_time(duration) by (span.http.target) -``` - -Any numerical attribute on the span is fair game. - -``` -{ name = "GET /:endpoint" } | min_over_time(span.http.status_code) -``` - -The `max_over_time()` let you aggregate numerical values by computing the maximum value of them, such as the all important span duration. - -``` -{ name = "GET /:endpoint" } | max_over_time(duration) by (span.http.target) -``` - -``` -{ name = "GET /:endpoint" } | max_over_time(span.http.status_code) -``` - -### The `quantile_over_time` and `histogram_over_time` functions - -The `quantile_over_time()` and `histogram_over_time()` functions let you aggregate numerical values, such as the all important span duration. -You can specify multiple quantiles in the same query. - -``` -{ name = "GET /:endpoint" } | quantile_over_time(duration, .99, .9, .5) -``` - -You can group by any span or resource attribute. - -``` -{ name = "GET /:endpoint" } | quantile_over_time(duration, .99) by (span.http.target) -``` - -Quantiles aren't limited to span duration. -Any numerical attribute on the span is fair game. -To demonstrate this flexibility, consider this nonsensical quantile on `span.http.status_code`: - -``` -{ name = "GET /:endpoint" } | quantile_over_time(span.http.status_code, .99, .9, .5) -``` - -### The `compare` function - -This adds a new metrics function `compare` which is used to split the stream of spans into two groups: a selection and a baseline. -It returns time-series for all attributes found on the spans to highlight the differences between the two groups. -This is a powerful function that is best understood by looking at example outputs below: - -The function is used like other metrics functions: when it's placed after any search query, and converts it into a metrics query: -`...any spanset pipeline... | compare({subset filters}, , , )` - -Example: -``` -{ resource.service.name="a" && span.http.path="/myapi" } | compare({status=error}) -``` -This function is generally run as an instant query. It may return may exceed gRPC payloads when run as a query range. -#### Parameters - -The `compare` function has four parameters: - -1. Required. The first parameter is a spanset filter for choosing the subset of spans. This filter is executed against the incoming spans. If it matches, then the span is considered to be part of the selection. Otherwise, it is part of the baseline. Common filters are expected to be things like `{status=error}` (what is different about errors?) or `{duration>1s}` (what is different about slow spans?) - -2. Optional. The second parameter is the top `N` values to return per attribute. If an attribute exceeds this limit in either the selection group or baseline group, then only the top `N` values (based on frequency) are returned, and an error indicator for the attribute is included output (see below). Defaults to `10`. - -3. Optional. Start and End timestamps in Unix nanoseconds, which can be used to constrain the selection window by time, in addition to the filter. For example, the overall query could cover the past hour, and the selection window only a 5 minute time period in which there was an anomaly. These timestamps must both be given, or neither. - -#### Output - -The outputs are flat time-series for each attribute/value found in the spans. - -Each series has a label `__meta_type` which denotes which group it is in, either `selection` or `baseline`. - -Example output series: -``` -{ __meta_type="baseline", resource.cluster="prod" } 123 -{ __meta_type="baseline", resource.cluster="qa" } 124 -{ __meta_type="selection", resource.cluster="prod" } 456 <--- significant difference detected -{ __meta_type="selection", resource.cluster="qa" } 125 -{ __meta_type="selection", resource.cluster="dev"} 126 <--- cluster=dev was found in the highlighted spans but not in the baseline -``` - -When an attribute reaches the topN limit, there will also be present an error indicator. -This example means the attribute `resource.cluster` had too many values. -``` -{ __meta_error="__too_many_values__", resource.cluster= } -``` diff --git a/docs/sources/tempo/traceql/metrics-queries/_index.md b/docs/sources/tempo/traceql/metrics-queries/_index.md new file mode 100644 index 00000000000..817fd5dd005 --- /dev/null +++ b/docs/sources/tempo/traceql/metrics-queries/_index.md @@ -0,0 +1,87 @@ +--- +title: TraceQL metrics queries +menuTitle: TraceQL metrics queries +description: Learn about TraceQL metrics queries +weight: 600 +keywords: + - metrics query + - TraceQL metrics +--- + +# TraceQL metrics queries + +{{< docs/experimental product="TraceQL metrics" >}} + +TraceQL metrics is an experimental feature in Grafana Tempo that creates metrics from traces. + +Metric queries extend trace queries by applying a function to trace query results. +This powerful feature allows for ad hoc aggregation of any existing TraceQL query by any dimension available in your traces, much in the same way that LogQL metric queries create metrics from logs. + +Traces are a unique observability signal that contain causal relationships between the components in your system. + +TraceQL metrics can help answer questions like this: + +* How many database calls across all systems are downstream of your application? +* What services beneath a given endpoint are currently failing? +* What services beneath an endpoint are currently slow? + +TraceQL metrics can help you answer these questions by parsing your traces in aggregate. + +TraceQL metrics are powered by the [TraceQL metrics API](https://grafana.com/docs/tempo//api_docs/#traceql-metrics). + +![Metrics visualization in Grafana](/media/docs/tempo/metrics-explore-sample-2.4.png) + +## RED metrics, TraceQL, and PromQL + +RED is an acronym for three types of metrics: + +- Rate, the number of requests per second +- Errors, the number of those requests that are failing +- Duration, the amount of time those requests take + +For more information about the RED method, refer to [The RED Method: how to instrument your services](/blog/2018/08/02/the-red-method-how-to-instrument-your-services/). + +You can write TraceQL metrics queries to compute rate, errors, and durations over different groups of spans. + +For more information on how to use TraceQL metrics to investigate issues, refer to [Solve problems with metrics queries](./solve-problems-metrics-queries). + +## Enable and use TraceQL metrics + +To use TraceQL metrics, you need to enable them on your Tempo database. +Refer to [Configure TraceQL metrics](https://grafana.com/docs/tempo//operations/traceql-metrics/) for more information. + +From there, you can either query the TraceQL metrics API directly (for example, with `curl`) or using Grafana +(recommended). +To run TraceQL metrics queries in Grafana, you need Grafana Cloud or Grafana 10.4 or later. +No extra configuration is needed. +Use a Tempo data source that points to a Tempo database with TraceQL metrics enabled. + +Refer to [Solve problems using metrics queries](./solve-problems-metrics-queries/) for some real-world examples. + +### Functions + +TraceQL metrics queries currently include the following functions for aggregating over groups of spans: `rate`, `count_over_time`, `max_over_time`, `min_over_time`, `avg_over_time`, `quantile_over_time`, `histogram_over_time`, and `compare`. +These functions can be added as an operator at the end of any TraceQL query. + +For detailed information and example queries for each function, refer to [TraceQL metrics functions](./functions). + +### Exemplars + +Exemplars are a powerful feature of TraceQL metrics. +They allow you to see an exact trace that contributed to a given metric value. +This is particularly useful when you want to understand why a given metric is high or low. + +Exemplars are available in TraceQL metrics for all range queries. +To get exemplars, you need to configure it in the query-frontend with the parameter `query_frontend.metrics.max_exemplars`, +or pass a query hint in your query. + +Example: + +``` +{ span:name = "GET /:endpoint" } | quantile_over_time(duration, .99) by (span.http.target) with (exemplars=true) +``` + +{{< admonition type="note" >}} +TraceQL metric queries with exemplars aren't fully supported in Grafana Explore. +They will be supported in a future Grafana release. +{{< /admonition >}} diff --git a/docs/sources/tempo/traceql/metrics-queries/functions.md b/docs/sources/tempo/traceql/metrics-queries/functions.md new file mode 100644 index 00000000000..3116946b22a --- /dev/null +++ b/docs/sources/tempo/traceql/metrics-queries/functions.md @@ -0,0 +1,235 @@ +--- +title: TraceQL metrics functions +menuTitle: TraceQL metrics functions +description: Learn about functions used in TraceQL metrics queries +weight: 600 +keywords: + - metrics query + - TraceQL metrics +--- + +# TraceQL metrics functions + + + +TraceQL supports `rate`, `count_over_time`, `min_over_time`, `avg_over_time`, `quantile_over_time`, `histogram_over_time`, and `compare` functions. + +## Available functions + +These functions can be added as an operator at the end of any TraceQL query. + +`rate` +: Calculates the number of matching spans per second + +`count_over_time` +: Counts the number of matching spans per time interval (refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics)). + +`min_over_time` +: Returns the minimum value for the specified attribute across all matching spans per time interval (refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics)). + +`max_over_time` +: Returns the maximum value for the specified attribute across all matching spans per time interval (refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics)). + +`avg_over_time` +: Returns the average value for the specified attribute across all matching spans per time interval (refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics)). + +`quantile_over_time` +: The quantile of the values in the specified interval + +`histogram_over_time` +: Evaluate frequency distribution over time. Example: `histogram_over_time(duration) by (span.foo)` + +`compare` +: Used to split the stream of spans into two groups: a selection and a baseline. The function returns time-series for all attributes found on the spans to highlight the differences between the two groups. + +## The `rate` function + +The `rate` function calculates the number of matching spans per second that match the given span selectors. + +### Parameters + +None. + +## Examples + +The following query shows the rate of errors by service and span name. +This is a TraceQL specific way of gathering rate metrics that would otherwise be generated by the span metrics processor. + +For example, this query: + +``` +{ status = error } | rate() by (resource.service.name, name) +``` + +Is an equivalent to using span-generated metrics and running the query. + +This example calculates the rate of the erroring spans coming from the service `foo`. +Rate is a `spans/sec` quantity. + +``` +{ resource.service.name = "foo" && status = error } | rate() +``` + +Combined with the `by()` operator, this can be even more powerful. + +``` +{ resource.service.name = "foo" && status = error } | rate() by (span.http.route) +``` + +This example still rates the erroring spans in the service `foo` but the metrics are broken +down by HTTP route. +This might let you determine that `/api/sad` had a higher rate of erroring +spans than `/api/happy`, for example. + +## The `count_over_time` function + +The `count_over_time()` function counts the number of matching spans per time interval. +The time interval that the count will be computed over is set by the `step` parameter. +For more information, refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics). + + +### Example + +This example counts the number of spans with name `"GET /:endpoint"` broken down by status code. You might see that there are 10 `"GET /:endpoint"` spans with status code 200 and 15 `"GET /:endpoint"` spans with status code 400. + +``` +{ name = "GET /:endpoint" } | count_over_time() by (span.http.status_code) + +``` + +## The `min_over_time`, `max_over_time`, and `avg_over_time` functions + +The `min_over_time()` function lets you aggregate numerical attributes by calculating their minimum value. +For example, you could choose to calculate the minimum duration of a group of spans, or you could choose to calculate the minimum value of a custom attribute you've attached to your spans, like `span.shopping.cart.entries`. +The time interval that the minimum is computed over is set by the `step` parameter. + +The `max_over_time()` let you aggregate numerical values by computing the maximum value of them, such as the all important span duration. +The time interval that the maximum is computed over is set by the `step` parameter. + +The `avg_over_time()` function lets you aggregate numerical values by computing the maximum value of them, such as the all important span duration. +The time interval that the maximum is computer over is set by the `step` parameter. + +For more information, refer to the [`step` API parameter](https://grafana.com/docs/tempo//api_docs/#traceql-metrics). + +### Parameters + +Numerical field that you want to calculate the minimum, maximum, or average of. + +### Examples + +This example computes the minimum duration for each `http.target` of all spans named `"GET /:endpoint"`. +Any numerical attribute on the span is fair game. + +``` +{ name = "GET /:endpoint" } | min_over_time(duration) by (span.http.target) +``` + +This example computes the minimum status code value of all spans named `"GET /:endpoint"`. + +``` +{ name = "GET /:endpoint" } | min_over_time(span.http.status_code) +``` + +This example computes the maximum duration for each `http.target` of all spans named `"GET /:endpoint"`. + +``` +{ name = "GET /:endpoint" } | max_over_time(duration) by (span.http.target) +``` + +``` +{ name = "GET /:endpoint" } | max_over_time(span.http.response.size) +``` + +This example computes the average duration for each `http.status_code` of all spans named `"GET /:endpoint"`. + +``` +{ name = "GET /:endpoint" } | avg_over_time(duration) by (span.http.status_code) +``` + +``` +{ name = "GET /:endpoint" } | avg_over_time(span.http.response.size) +``` + +## The `quantile_over_time` and `histogram_over_time` functions + +The `quantile_over_time()` and `histogram_over_time()` functions let you aggregate numerical values, such as the all important span duration. +You can specify multiple quantiles in the same query. + +The example below computes the 99th, 90th, and 50th percentile of the duration attribute on all spans with name `GET /:endpoint`. + +``` +{ name = "GET /:endpoint" } | quantile_over_time(duration, .99, .9, .5) +``` + +You can group by any span or resource attribute. + +``` +{ name = "GET /:endpoint" } | quantile_over_time(duration, .99) by (span.http.target) +``` + +Quantiles aren't limited to span duration. +Any numerical attribute on the span is fair game. +To demonstrate this flexibility, consider this nonsensical quantile on `span.http.status_code`: + +``` +{ name = "GET /:endpoint" } | quantile_over_time(span.http.status_code, .99, .9, .5) +``` + +This computes the 99th, 90th, and 50th percentile of the values of the `status_code` attribute for all spans named `GET /:endpoint`. +This is unlikely to tell you anything useful (what does a median status code of `347` mean?), but it works. + +As a further example, imagine a custom attribute like `span.temperature`. +You could use a similar query to know what the 50th percentile and 95th percentile temperatures were across all your spans. + +## The `compare` function + +The `compare` function is used to split a set of spans into two groups: a selection and a baseline. +It returns time-series for all attributes found on the spans to highlight the differences between the two groups. + +This is a powerful function that's best understood by using the [**Comparison** tab in Explore Traces](https://grafana.com/docs/grafana//explore/simplified-exploration/traces/investigate/#comparison). +You can also under this function by looking at example outputs below. + +The function is used like other metrics functions: when it's placed after any trace query, it converts the query into a metrics query: +`...any spanset pipeline... | compare({subset filters}, , , )` + +Example: + +``` +{ resource.service.name="a" && span.http.path="/myapi" } | compare({status=error}) +``` + +This function is generally run as an instant query. +An instant query gives a single value at the end of the selected time range. +[Instant queries](https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries) are quicker to execute and it often easier to understand their results +The returns may exceed gRPC payloads when run as a range query. + +### Parameters + +The `compare` function has four parameters: + +1. Required. The first parameter is a spanset filter for choosing the subset of spans. This filter is executed against the incoming spans. If it matches, then the span is considered to be part of the selection. Otherwise, it is part of the baseline. Common filters are expected to be things like `{status=error}` (what is different about errors?) or `{duration>1s}` (what is different about slow spans?) + +2. Optional. The second parameter is the top `N` values to return per attribute. If an attribute exceeds this limit in either the selection group or baseline group, then only the top `N` values (based on frequency) are returned, and an error indicator for the attribute is included output (see below). Defaults to `10`. + +3. Optional. Start and End timestamps in Unix nanoseconds, which can be used to constrain the selection window by time, in addition to the filter. For example, the overall query could cover the past hour, and the selection window only a 5 minute time period in which there was an anomaly. These timestamps must both be given, or neither. + +### Output + +The outputs are flat time-series for each attribute/value found in the spans. + +Each series has a label `__meta_type` which denotes which group it is in, either `selection` or `baseline`. + +Example output series: +``` +{ __meta_type="baseline", resource.cluster="prod" } 123 +{ __meta_type="baseline", resource.cluster="qa" } 124 +{ __meta_type="selection", resource.cluster="prod" } 456 <--- significant difference detected +{ __meta_type="selection", resource.cluster="qa" } 125 +{ __meta_type="selection", resource.cluster="dev"} 126 <--- cluster=dev was found in the highlighted spans but not in the baseline +``` + +When an attribute reaches the topN limit, there will also be present an error indicator. +This example means the attribute `resource.cluster` had too many values. +``` +{ __meta_error="__too_many_values__", resource.cluster= } +``` diff --git a/docs/sources/tempo/traceql/metrics-queries/solve-problems-metrics-queries.md b/docs/sources/tempo/traceql/metrics-queries/solve-problems-metrics-queries.md new file mode 100644 index 00000000000..7f2c65730c8 --- /dev/null +++ b/docs/sources/tempo/traceql/metrics-queries/solve-problems-metrics-queries.md @@ -0,0 +1,67 @@ +--- +title: Solve problems with trace metrics queries +menuTitle: Use cases +description: Solve problems with trace metrics queries +weight: 600 +keywords: + - metrics query + - TraceQL metrics +--- + +# Solve problems with trace metrics queries + +You can query data generated by TraceQL metrics in a similar way that you would query results stored in Prometheus, Grafana Mimir, or other Prometheus-compatible Time-Series-Database (TSDB). +TraceQL metrics queries allows you to calculate metrics on trace span data on-the-fly with Tempo (your tracing database), without requiring a time-series-database like Prometheus. + +This page provides an example of how you can investigate the rate of incoming requests using both PromQL and TraceQL. + +## RED metrics and queries + +The Tempo metrics-generator emits metrics with pre-configured labels for Rate, Error, and Duration (RED) metrics and service graph edges. +Generated metric labels vary, but always include the service name (in service graph metrics, as a client and/or a server type). +For more information, refer to the [metrics-generator documentation](../../metrics-generator/). + +You can use these metrics to get an overview of application performance. +The metrics can be directly correlated to the trace spans that are available for querying. + +TraceQL metrics allow a user to query metrics from traces directly from Tempo instead of requiring the metrics-generator component and an accompanying TSDB. + +{{< admonition type="note" >}} +TraceQL metrics are constrained to a 24-hour range window, and aren't available as a Grafana Managed Alerts source. For any metrics that you want to query over longer time ranges, use for alerting, or retain for more than 30 days, use the metrics-generator to store these metrics in Prometheus, Mimir, or other Prometheus-compatible TSDB and continue to use PromQL for querying. +{{< /admonition >}} + +## Investigate the rate of incoming requests + +Let's say that you want to know how many requests are being serviced both by your application, but also by each service that comprises your application. +This allows you to ensure that your application scales appropriately, can help with capacity planning, and can show you which services may be having problems and are taking up load in fail-over scenarios. +In PromQL, these values are calculated over counters that increase each time a service is called. These metrics provide the Rate (R) in RED. + +If you are familiar with PromQL, then you're used to constructing queries. +You can create an equivalent queries in TraceQL. +Here's the two queries for the different data sources (PromQL for Mimir and TraceQL for Tempo), shown side by side over a 6 hour time-range. + +![Equivalent PromQL and TraceQL queries](/media/docs/tempo/traceql/TraceQL-metrics-query-example-1.png) + +### How the query looks in PromQL + +The Tempo metrics-generator outputs a metric, `traces_spanmetrics_calls_total`, a counter that increases each time a named span in a service is called. +RED data generated by the metrics-generator includes the service name and span kind. +You can use this to only show call counts when a service was called externally by filtering via the `SERVER` span kind, thus showing the total number of times the service has been called. + +You can use the PromQL `rate()` and `sum()` functions to examine the counter and determine the per-second rate of calls occurring, summing them by each service. +In addition to only looking at spans of `kind=server`, you can also focus on spans coming from a particular Kubernetes namespace (`ditl-demo-prod`). + +``` +sum by (service_name)(rate(traces_spanmetrics_calls_total{service_namespace="ditl-demo-prod", span_kind="SPAN_KIND_SERVER"}[2m])) +``` + +### How the query looks in TraceQL + +TraceQL metrics queries let you similarly examine a particular subset of your spans. +As in the example above, you can start by filtering down to spans that occur in a particular Kubernetes namespace (`ditl-demo-prod`), and are of kind `SERVER`. +That resulting set of spans is piped to the TraceQL `rate` function, which then calculates the rate (in spans/sec) at which spans matches your filters are received. +By adding the `by (resource.service.name)` term, the query returns spans per second rates per service, rather than an aggregate across all services. + +``` +{ resource.service.namespace="ditl-demo-prod" && kind=server } | rate() by (resource.service.name) +``` diff --git a/go.mod b/go.mod index 3d8fadad039..d51195234f4 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/go-kit/log v0.2.1 github.com/go-logfmt/logfmt v0.6.0 github.com/go-redis/redis/v8 v8.11.5 - github.com/go-test/deep v1.0.8 + github.com/go-test/deep v1.1.1 github.com/gogo/protobuf v1.3.2 github.com/gogo/status v1.1.1 github.com/golang/protobuf v1.5.4 @@ -47,7 +47,7 @@ require ( github.com/prometheus/common v0.55.0 github.com/prometheus/prometheus v0.54.0 github.com/prometheus/statsd_exporter v0.26.0 - github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e + github.com/segmentio/fasthash v1.0.3 github.com/sony/gobreaker v0.4.1 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 @@ -61,13 +61,13 @@ require ( go.opentelemetry.io/collector/consumer v0.102.1 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/semconv v0.105.0 // indirect - go.opentelemetry.io/otel v1.30.0 + go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/bridge/opencensus v1.27.0 go.opentelemetry.io/otel/bridge/opentracing v1.26.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 - go.opentelemetry.io/otel/metric v1.30.0 - go.opentelemetry.io/otel/sdk v1.28.0 - go.opentelemetry.io/otel/trace v1.30.0 + go.opentelemetry.io/otel/metric v1.31.0 + go.opentelemetry.io/otel/sdk v1.31.0 + go.opentelemetry.io/otel/trace v1.31.0 go.uber.org/atomic v1.11.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 @@ -85,10 +85,9 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 - github.com/brianvoe/gofakeit/v6 v6.25.0 - github.com/evanphx/json-patch v5.6.0+incompatible + github.com/evanphx/json-patch v5.9.0+incompatible github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da - github.com/googleapis/gax-go/v2 v2.12.5 + github.com/googleapis/gax-go/v2 v2.13.0 github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.102.0 @@ -99,10 +98,10 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.102.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.102.0 github.com/parquet-go/parquet-go v0.23.1-0.20241011155651-6446d1d0d2fe - github.com/stoewer/parquet-cli v0.0.7 + github.com/stoewer/parquet-cli v0.0.9 go.opentelemetry.io/collector/config/configgrpc v0.102.1 go.opentelemetry.io/collector/config/confighttp v0.102.1 - go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/config/configtls v1.18.0 go.opentelemetry.io/collector/exporter v0.102.1 go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 go.opentelemetry.io/collector/extension v0.102.1 @@ -117,7 +116,7 @@ require ( go.opentelemetry.io/proto/otlp v1.3.1 golang.org/x/net v0.27.0 golang.org/x/oauth2 v0.21.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b + google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d ) require ( @@ -288,7 +287,7 @@ require ( go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect go.opentelemetry.io/collector/config/confignet v0.102.1 // indirect - go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.18.0 // indirect go.opentelemetry.io/collector/config/configretry v0.102.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect go.opentelemetry.io/collector/config/internal v0.102.1 // indirect diff --git a/go.sum b/go.sum index 0bed50c515b..ac6867461ad 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/brianvoe/gofakeit/v6 v6.25.0 h1:ZpFjktOpLZUeF8q223o0rUuXtA+m5qW5srjvVi+JkXk= -github.com/brianvoe/gofakeit/v6 v6.25.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= @@ -227,8 +225,8 @@ github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/Ir github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/expr-lang/expr v1.16.2 h1:JvMnzUs3LeVHBvGFcXYmXo+Q6DPDmzrlcSBO6Wy3w4s= github.com/expr-lang/expr v1.16.2/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= @@ -298,8 +296,8 @@ github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= +github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= @@ -403,8 +401,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/gophercloud/gophercloud v1.13.0 h1:8iY9d1DAbzMW6Vok1AxbbK5ZaUjzMp0tdyt4fX9IeJ0= github.com/gophercloud/gophercloud v1.13.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -825,8 +823,8 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 h1:BkTk4gynLjguayxrYxZoMZjBnA github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e h1:uO75wNGioszjmIzcY/tvdDYKRLVvzggtAmmJkn9j4GQ= -github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M= +github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= +github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= @@ -857,8 +855,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= -github.com/stoewer/parquet-cli v0.0.7 h1:rhdZODIbyMS3twr4OM3am8BPPT5pbfMcHLH93whDM5o= -github.com/stoewer/parquet-cli v0.0.7/go.mod h1:bskxHdj8q3H1EmfuCqjViFoeO3NEvs5lzZAQvI8Nfjk= +github.com/stoewer/parquet-cli v0.0.9 h1:qFjncPnEnzwPJxnADcwvdiUzWwMch7PRWloaBNeBDE0= +github.com/stoewer/parquet-cli v0.0.9/go.mod h1:bskxHdj8q3H1EmfuCqjViFoeO3NEvs5lzZAQvI8Nfjk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -949,14 +947,14 @@ go.opentelemetry.io/collector/config/confighttp v0.102.1 h1:tPw1Xf2PfDdrXoBKLY5S go.opentelemetry.io/collector/config/confighttp v0.102.1/go.mod h1:k4qscfjxuaDQmcAzioxmPujui9VSgW6oal3WLxp9CzI= go.opentelemetry.io/collector/config/confignet v0.102.1 h1:nSiAFQMzNCO4sDBztUxY73qFw4Vh0hVePq8+3wXUHtU= go.opentelemetry.io/collector/config/confignet v0.102.1/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= -go.opentelemetry.io/collector/config/configopaque v1.9.0 h1:jocenLdK/rVG9UoGlnpiBxXLXgH5NhIXCrVSTyKVYuA= -go.opentelemetry.io/collector/config/configopaque v1.9.0/go.mod h1:8v1yaH4iYjcigbbyEaP/tzVXeFm4AaAsKBF9SBeqaG4= +go.opentelemetry.io/collector/config/configopaque v1.18.0 h1:aoEecgd5m8iZCX+S+iH6SK/lG6ULqCqtrtz7PeHw7vE= +go.opentelemetry.io/collector/config/configopaque v1.18.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= go.opentelemetry.io/collector/config/configretry v0.102.1 h1:J5/tXBL8P7d7HT5dxsp2H+//SkwDXR66Z9UTgRgtAzk= go.opentelemetry.io/collector/config/configretry v0.102.1/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= go.opentelemetry.io/collector/config/configtelemetry v0.102.1 h1:f/CYcrOkaHd+COIJ2lWnEgBCHfhEycpbow4ZhrGwAlA= go.opentelemetry.io/collector/config/configtelemetry v0.102.1/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/config/configtls v0.102.1 h1:7fr+PU9BRg0HRc1Pn3WmDW/4WBHRjuo7o1CdG2vQKoA= -go.opentelemetry.io/collector/config/configtls v0.102.1/go.mod h1:KHdrvo3cwosgDxclyiLWmtbovIwqvaIGeTXr3p5721A= +go.opentelemetry.io/collector/config/configtls v1.18.0 h1:IQemIIuryeHgrpBJMbLl+LgTxvFBbv7Hhi+0WwlxpCU= +go.opentelemetry.io/collector/config/configtls v1.18.0/go.mod h1:lD2dlDqeTKq7OecFwIZMufDaa8erSlEoHMJrFPHrZNw= go.opentelemetry.io/collector/config/internal v0.102.1 h1:HFsFD3xpHUuNHb8/UTz5crJw1cMHzsJQf/86sgD44hw= go.opentelemetry.io/collector/config/internal v0.102.1/go.mod h1:Vig3dfeJJnuRe1kBNpszBzPoj5eYnR51wXbeq36Zfpg= go.opentelemetry.io/collector/confmap v0.102.1 h1:wZuH+d/P11Suz8wbp+xQCJ0BPE9m5pybtUe74c+rU7E= @@ -1019,8 +1017,8 @@ go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= go.opentelemetry.io/otel/bridge/opentracing v1.26.0 h1:Q/dHj0DOhfLMAs5u5ucAbC7gy66x9xxsZRLpHCJ4XhI= @@ -1049,16 +1047,16 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bE go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= go.opentelemetry.io/otel/log v0.4.0 h1:/vZ+3Utqh18e8TPjuc3ecg284078KWrR8BRz+PQAj3o= go.opentelemetry.io/otel/log v0.4.0/go.mod h1:DhGnQvky7pHy82MIRV43iXh3FlKN8UUKftn0KbLOq6I= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= go.opentelemetry.io/otel/sdk/log v0.4.0 h1:1mMI22L82zLqf6KtkjrRy5BbagOTWdJsqMY/HSqILAA= go.opentelemetry.io/otel/sdk/log v0.4.0/go.mod h1:AYJ9FVF0hNOgAVzUG/ybg/QttnXhUePWAupmCqtdESo= go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1401,8 +1399,8 @@ google.golang.org/genproto v0.0.0-20240708141625-4ad9e859172b h1:dSTjko30weBaMj3 google.golang.org/genproto v0.0.0-20240708141625-4ad9e859172b/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY= google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY= google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b h1:04+jVzTs2XBnOZcPsLnmrTGqltqJbZQ1Ey26hjYdQQ0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/integration/e2e/api_test.go b/integration/e2e/api_test.go index 7633f0e74bd..aa8497491a8 100644 --- a/integration/e2e/api_test.go +++ b/integration/e2e/api_test.go @@ -627,7 +627,7 @@ func callSearchTagValuesV2AndAssert(t *testing.T, svc *e2e.HTTPService, tagName, require.Equal(t, expected.TagValues, actualGrpcResp.TagValues) // assert metrics, and make sure it's non-zero when response is non-empty if len(grpcResp.TagValues) > 0 { - require.Greater(t, grpcResp.Metrics.InspectedBytes, uint64(100)) + require.Greater(t, grpcResp.Metrics.InspectedBytes, uint64(0)) } } diff --git a/integration/e2e/ca/ca.go b/integration/e2e/ca/ca.go index 81f1bd8a8ec..9f752c93208 100644 --- a/integration/e2e/ca/ca.go +++ b/integration/e2e/ca/ca.go @@ -178,7 +178,7 @@ func (ca *ca) writeCACertificate(path string) error { return err } - return writeExclusivePEMFile(path, "CERTIFICATE", 0o644, derBytes) + return writeExclusivePEMFile(path, "CERTIFICATE", 0o600, derBytes) } func (ca *ca) writeCertificate(template *x509.Certificate, certPath string, keyPath string) error { @@ -208,5 +208,5 @@ func (ca *ca) writeCertificate(template *x509.Certificate, certPath string, keyP return err } - return writeExclusivePEMFile(certPath, "CERTIFICATE", 0o644, derBytes) + return writeExclusivePEMFile(certPath, "CERTIFICATE", 0o600, derBytes) } diff --git a/integration/e2e/config-query-range.yaml b/integration/e2e/config-query-range.yaml index d17f80a77cf..faa5e5be6e0 100644 --- a/integration/e2e/config-query-range.yaml +++ b/integration/e2e/config-query-range.yaml @@ -9,8 +9,6 @@ query_frontend: search: query_backend_after: 0 # setting these both to 0 will force all range searches to hit the backend query_ingesters_until: 0 - metrics: - exemplars: true distributor: receivers: diff --git a/integration/util/util.go b/integration/util/util.go index 6ddd7dc14ab..cd3248b21ec 100644 --- a/integration/util/util.go +++ b/integration/util/util.go @@ -311,6 +311,10 @@ func CopyTemplateToSharedDir(s *e2e.Scenario, src, dst string, data any) (string func writeFileToSharedDir(s *e2e.Scenario, dst string, content []byte) (string, error) { dst = filepath.Join(s.SharedDir(), dst) + // NOTE: since the integration tests are setup outside of the container + // before container execution, the permissions within the container must be + // able to read the configuration. + // Ensure the entire path of directories exists err := os.MkdirAll(filepath.Dir(dst), os.ModePerm) if err != nil { diff --git a/modules/frontend/combiner/common.go b/modules/frontend/combiner/common.go index 339379cd91f..cd2e9adbb81 100644 --- a/modules/frontend/combiner/common.go +++ b/modules/frontend/combiner/common.go @@ -7,6 +7,8 @@ import ( "strings" "sync" + tempo_io "github.com/grafana/tempo/pkg/io" + "github.com/gogo/protobuf/jsonpb" "github.com/gogo/protobuf/proto" "github.com/gogo/status" @@ -103,7 +105,7 @@ func (c *genericCombiner[T]) AddResponse(r PipelineResponse) error { switch res.Header.Get(api.HeaderContentType) { case api.HeaderAcceptProtobuf: - b, err := io.ReadAll(res.Body) + b, err := tempo_io.ReadAllWithEstimate(res.Body, res.ContentLength) if err != nil { return fmt.Errorf("error reading response body") } diff --git a/modules/frontend/combiner/trace_by_id.go b/modules/frontend/combiner/trace_by_id.go index dfdd886f431..27ba0948c38 100644 --- a/modules/frontend/combiner/trace_by_id.go +++ b/modules/frontend/combiner/trace_by_id.go @@ -11,6 +11,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/grafana/tempo/pkg/api" + tempo_io "github.com/grafana/tempo/pkg/io" "github.com/grafana/tempo/pkg/model/trace" "github.com/grafana/tempo/pkg/tempopb" ) @@ -67,7 +68,7 @@ func (c *traceByIDCombiner) AddResponse(r PipelineResponse) error { } // Read the body - buff, err := io.ReadAll(res.Body) + buff, err := tempo_io.ReadAllWithEstimate(res.Body, res.ContentLength) if err != nil { c.statusMessage = internalErrorMsg return fmt.Errorf("error reading response body: %w", err) diff --git a/modules/frontend/config.go b/modules/frontend/config.go index 655d876e856..0ba194df4b2 100644 --- a/modules/frontend/config.go +++ b/modules/frontend/config.go @@ -93,7 +93,6 @@ func (cfg *Config) RegisterFlagsAndApplyDefaults(string, *flag.FlagSet) { ConcurrentRequests: defaultConcurrentRequests, TargetBytesPerRequest: defaultTargetBytesPerRequest, Interval: 5 * time.Minute, - Exemplars: false, // TODO: Remove? MaxExemplars: 100, }, SLO: slo, diff --git a/modules/frontend/frontend.go b/modules/frontend/frontend.go index e4459edbdaf..9b6a472f6b7 100644 --- a/modules/frontend/frontend.go +++ b/modules/frontend/frontend.go @@ -156,7 +156,18 @@ func New(cfg Config, next pipeline.RoundTripper, o overrides.Interface, reader t queryValidatorWare, pipeline.NewWeightRequestWare(pipeline.TraceQLMetrics, cfg.Weights), multiTenantMiddleware(cfg, logger), - newAsyncQueryRangeSharder(reader, o, cfg.Metrics.Sharder, logger), + newAsyncQueryRangeSharder(reader, o, cfg.Metrics.Sharder, false, logger), + }, + []pipeline.Middleware{cacheWare, statusCodeWare, retryWare}, + next) + + queryInstantPipeline := pipeline.Build( + []pipeline.AsyncMiddleware[combiner.PipelineResponse]{ + urlDenyListWare, + queryValidatorWare, + pipeline.NewWeightRequestWare(pipeline.TraceQLMetrics, cfg.Weights), + multiTenantMiddleware(cfg, logger), + newAsyncQueryRangeSharder(reader, o, cfg.Metrics.Sharder, true, logger), }, []pipeline.Middleware{cacheWare, statusCodeWare, retryWare}, next) @@ -169,7 +180,7 @@ func New(cfg Config, next pipeline.RoundTripper, o overrides.Interface, reader t searchTagValues := newTagValuesHTTPHandler(cfg, searchTagValuesPipeline, o, logger) searchTagValuesV2 := newTagValuesV2HTTPHandler(cfg, searchTagValuesPipeline, o, logger) metrics := newMetricsSummaryHandler(metricsPipeline, logger) - queryInstant := newMetricsQueryInstantHTTPHandler(cfg, queryRangePipeline, logger) // Reuses the same pipeline + queryInstant := newMetricsQueryInstantHTTPHandler(cfg, queryInstantPipeline, logger) // Reuses the same pipeline queryRange := newMetricsQueryRangeHTTPHandler(cfg, queryRangePipeline, logger) return &QueryFrontend{ @@ -258,7 +269,7 @@ func newMetricsSummaryHandler(next pipeline.AsyncRoundTripper[combiner.PipelineR resp, _, err := resps.Next(req.Context()) // metrics path will only ever have one response level.Info(logger).Log( - "msg", "search tag response", + "msg", "metrics summary response", "tenant", tenant, "path", req.URL.Path, "err", err) @@ -267,6 +278,26 @@ func newMetricsSummaryHandler(next pipeline.AsyncRoundTripper[combiner.PipelineR }) } +// cloneRequestforQueriers returns a cloned pipeline.Request from the passed pipeline.Request ready for queriers. The caller is given an opportunity +// to modify the internal http.Request before it is returned using the modHTTP param. If modHTTP is nil, the internal http.Request is returned. +func cloneRequestforQueriers(parent pipeline.Request, tenant string, modHTTP func(*http.Request) (*http.Request, error)) (pipeline.Request, error) { + req := parent.HTTPRequest() + clonedHTTPReq := req.Clone(req.Context()) + + // give the caller a chance to modify the internal http request + if modHTTP != nil { + var err error + clonedHTTPReq, err = modHTTP(clonedHTTPReq) + if err != nil { + return nil, err + } + } + + prepareRequestForQueriers(clonedHTTPReq, tenant) + + return parent.CloneFromHTTPRequest(clonedHTTPReq), nil +} + // prepareRequestForQueriers modifies the request so they will be farmed correctly to the queriers // - adds the tenant header // - sets the requesturi (see below for details) diff --git a/modules/frontend/metrics_query_range_handler.go b/modules/frontend/metrics_query_range_handler.go index 4c0ed89afe1..54ffc29ff67 100644 --- a/modules/frontend/metrics_query_range_handler.go +++ b/modules/frontend/metrics_query_range_handler.go @@ -113,7 +113,7 @@ func newMetricsQueryRangeHTTPHandler(cfg Config, next pipeline.AsyncRoundTripper func logQueryRangeResult(logger log.Logger, tenantID string, durationSeconds float64, req *tempopb.QueryRangeRequest, resp *tempopb.QueryRangeResponse, err error) { if resp == nil { level.Info(logger).Log( - "msg", "query range results - no resp", + "msg", "query range response - no resp", "tenant", tenantID, "duration_seconds", durationSeconds, "error", err) @@ -123,7 +123,7 @@ func logQueryRangeResult(logger log.Logger, tenantID string, durationSeconds flo if resp.Metrics == nil { level.Info(logger).Log( - "msg", "query range results - no metrics", + "msg", "query range response - no metrics", "tenant", tenantID, "query", req.Query, "range_nanos", req.End-req.Start, @@ -133,7 +133,7 @@ func logQueryRangeResult(logger log.Logger, tenantID string, durationSeconds flo } level.Info(logger).Log( - "msg", "query range results", + "msg", "query range response", "tenant", tenantID, "query", req.Query, "range_nanos", req.End-req.Start, diff --git a/modules/frontend/metrics_query_range_sharder.go b/modules/frontend/metrics_query_range_sharder.go index eb157c5356f..bfffbf21bf7 100644 --- a/modules/frontend/metrics_query_range_sharder.go +++ b/modules/frontend/metrics_query_range_sharder.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "math" + "net/http" "time" "github.com/go-kit/log" //nolint:all deprecated @@ -26,11 +27,12 @@ import ( ) type queryRangeSharder struct { - next pipeline.AsyncRoundTripper[combiner.PipelineResponse] - reader tempodb.Reader - overrides overrides.Interface - cfg QueryRangeSharderConfig - logger log.Logger + next pipeline.AsyncRoundTripper[combiner.PipelineResponse] + reader tempodb.Reader + overrides overrides.Interface + cfg QueryRangeSharderConfig + logger log.Logger + instantMode bool } type QueryRangeSharderConfig struct { @@ -39,28 +41,32 @@ type QueryRangeSharderConfig struct { MaxDuration time.Duration `yaml:"max_duration"` QueryBackendAfter time.Duration `yaml:"query_backend_after,omitempty"` Interval time.Duration `yaml:"interval,omitempty"` - Exemplars bool `yaml:"exemplars,omitempty"` MaxExemplars int `yaml:"max_exemplars,omitempty"` } // newAsyncQueryRangeSharder creates a sharding middleware for search -func newAsyncQueryRangeSharder(reader tempodb.Reader, o overrides.Interface, cfg QueryRangeSharderConfig, logger log.Logger) pipeline.AsyncMiddleware[combiner.PipelineResponse] { +func newAsyncQueryRangeSharder(reader tempodb.Reader, o overrides.Interface, cfg QueryRangeSharderConfig, instantMode bool, logger log.Logger) pipeline.AsyncMiddleware[combiner.PipelineResponse] { return pipeline.AsyncMiddlewareFunc[combiner.PipelineResponse](func(next pipeline.AsyncRoundTripper[combiner.PipelineResponse]) pipeline.AsyncRoundTripper[combiner.PipelineResponse] { return queryRangeSharder{ - next: next, - reader: reader, - overrides: o, - - cfg: cfg, - logger: logger, + next: next, + reader: reader, + overrides: o, + instantMode: instantMode, + cfg: cfg, + logger: logger, } }) } func (s queryRangeSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline.Responses[combiner.PipelineResponse], error) { r := pipelineRequest.HTTPRequest() + spanName := "frontend.QueryRangeSharder.range" + + if s.instantMode { + spanName = "frontend.QueryRangeSharder.instant" + } - ctx, span := tracer.Start(r.Context(), "frontend.QueryRangeSharder") + ctx, span := tracer.Start(r.Context(), spanName) defer span.End() req, err := api.ParseQueryRangeRequest(r) @@ -92,13 +98,23 @@ func (s queryRangeSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline return pipeline.NewBadRequest(err), nil } + var maxExemplars uint32 + // Instant queries must not compute exemplars + if !s.instantMode && s.cfg.MaxExemplars > 0 { + maxExemplars = req.Exemplars + if maxExemplars == 0 || maxExemplars > uint32(s.cfg.MaxExemplars) { + maxExemplars = uint32(s.cfg.MaxExemplars) // Enforce configuration + } + } + req.Exemplars = maxExemplars + var ( allowUnsafe = s.overrides.UnsafeQueryHints(tenantID) targetBytesPerRequest = s.jobSize(expr, allowUnsafe) cutoff = time.Now().Add(-s.cfg.QueryBackendAfter) ) - generatorReq := s.generatorRequest(ctx, tenantID, pipelineRequest, *req, cutoff) + generatorReq := s.generatorRequest(tenantID, pipelineRequest, *req, cutoff) reqCh := make(chan pipeline.Request, 2) // buffer of 2 allows us to insert generatorReq and metrics if generatorReq != nil { @@ -150,11 +166,11 @@ func (s *queryRangeSharder) blockMetas(start, end int64, tenantID string) []*bac return metas } -func (s *queryRangeSharder) exemplarsPerShard(total uint32) uint32 { - if !s.cfg.Exemplars { +func (s *queryRangeSharder) exemplarsPerShard(total uint32, exemplars uint32) uint32 { + if exemplars == 0 { return 0 } - return uint32(math.Ceil(float64(s.cfg.MaxExemplars)*1.2)) / total + return uint32(math.Ceil(float64(exemplars)*1.2)) / total } func (s *queryRangeSharder) backendRequests(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tempopb.QueryRangeRequest, cutoff time.Time, targetBytesPerRequest int, reqCh chan pipeline.Request) (totalJobs, totalBlocks uint32, totalBlockBytes uint64) { @@ -209,7 +225,7 @@ func (s *queryRangeSharder) buildBackendRequests(ctx context.Context, tenantID s queryHash := hashForQueryRangeRequest(&searchReq) colsToJSON := api.NewDedicatedColumnsToJSON() - exemplarsPerBlock := s.exemplarsPerShard(uint32(len(metas))) + exemplarsPerBlock := s.exemplarsPerShard(uint32(len(metas)), searchReq.Exemplars) for _, m := range metas { if m.EndTime.Before(m.StartTime) { // Ignore blocks with bad timings from debugging @@ -228,15 +244,13 @@ func (s *queryRangeSharder) buildBackendRequests(ctx context.Context, tenantID s exemplars = max(uint32(float64(exemplars)*float64(m.TotalRecords)/float64(pages)), 1) } - for startPage := 0; startPage < int(m.TotalRecords); startPage += pages { - subR := parent.HTTPRequest().Clone(ctx) - - dedColsJSON, err := colsToJSON.JSONForDedicatedColumns(m.DedicatedColumns) - if err != nil { - // errFn(fmt.Errorf("failed to convert dedicated columns. block: %s tempopb: %w", blockID, err)) - continue - } + dedColsJSON, err := colsToJSON.JSONForDedicatedColumns(m.DedicatedColumns) + if err != nil { + _ = level.Error(s.logger).Log("msg", "failed to convert dedicated columns in query range sharder. skipping", "block", m.BlockID, "err", err) + continue + } + for startPage := 0; startPage < int(m.TotalRecords); startPage += pages { // Trim and align the request for this block. I.e. if the request is "Last Hour" we don't want to // cache the response for that, we want only the few minutes time range for this block. This has // size savings but the main thing is that the response is reuseable for any overlapping query. @@ -246,31 +260,34 @@ func (s *queryRangeSharder) buildBackendRequests(ctx context.Context, tenantID s continue } - queryRangeReq := &tempopb.QueryRangeRequest{ - Query: searchReq.Query, - Start: start, - End: end, - Step: step, - QueryMode: searchReq.QueryMode, - // New RF1 fields - BlockID: m.BlockID.String(), - StartPage: uint32(startPage), - PagesToSearch: uint32(pages), - Version: m.Version, - Encoding: m.Encoding.String(), - Size_: m.Size_, - FooterSize: m.FooterSize, - // DedicatedColumns: dc, for perf reason we pass dedicated columns json in directly to not have to realloc object -> proto -> json - Exemplars: exemplars, + pipelineR, err := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + queryRangeReq := &tempopb.QueryRangeRequest{ + Query: searchReq.Query, + Start: start, + End: end, + Step: step, + QueryMode: searchReq.QueryMode, + // New RF1 fields + BlockID: m.BlockID.String(), + StartPage: uint32(startPage), + PagesToSearch: uint32(pages), + Version: m.Version, + Encoding: m.Encoding.String(), + Size_: m.Size_, + FooterSize: m.FooterSize, + // DedicatedColumns: dc, for perf reason we pass dedicated columns json in directly to not have to realloc object -> proto -> json + Exemplars: exemplars, + } + + return api.BuildQueryRangeRequest(r, queryRangeReq, dedColsJSON), nil + }) + if err != nil { + _ = level.Error(s.logger).Log("msg", "failed to cloneRequestForQuerirs in the query range sharder. skipping", "block", m.BlockID, "err", err) + continue } - subR = api.BuildQueryRangeRequest(subR, queryRangeReq, dedColsJSON) - - prepareRequestForQueriers(subR, tenantID) - pipelineR := parent.CloneFromHTTPRequest(subR) - // TODO: Handle sampling rate - key := queryRangeCacheKey(tenantID, queryHash, int64(queryRangeReq.Start), int64(queryRangeReq.End), m, int(queryRangeReq.StartPage), int(queryRangeReq.PagesToSearch)) + key := queryRangeCacheKey(tenantID, queryHash, int64(start), int64(end), m, int(step), pages) if len(key) > 0 { pipelineR.SetCacheKey(key) } @@ -291,7 +308,7 @@ func max(a, b uint32) uint32 { return b } -func (s *queryRangeSharder) generatorRequest(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tempopb.QueryRangeRequest, cutoff time.Time) *pipeline.HTTPRequest { +func (s *queryRangeSharder) generatorRequest(tenantID string, parent pipeline.Request, searchReq tempopb.QueryRangeRequest, cutoff time.Time) pipeline.Request { traceql.TrimToAfter(&searchReq, cutoff) // if start == end then we don't need to query it if searchReq.Start == searchReq.End { @@ -299,14 +316,12 @@ func (s *queryRangeSharder) generatorRequest(ctx context.Context, tenantID strin } searchReq.QueryMode = querier.QueryModeRecent - searchReq.Exemplars = uint32(s.cfg.MaxExemplars) // TODO: Review this - subR := parent.HTTPRequest().Clone(ctx) - subR = api.BuildQueryRangeRequest(subR, &searchReq, "") // dedicated cols are never passed to the generators - - prepareRequestForQueriers(subR, tenantID) + subR, _ := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + return api.BuildQueryRangeRequest(r, &searchReq, ""), nil + }) - return parent.CloneFromHTTPRequest(subR) + return subR } // maxDuration returns the max search duration allowed for this tenant. diff --git a/modules/frontend/pipeline/pipeline.go b/modules/frontend/pipeline/pipeline.go index 920cd4eb203..0dc9bae839e 100644 --- a/modules/frontend/pipeline/pipeline.go +++ b/modules/frontend/pipeline/pipeline.go @@ -13,7 +13,9 @@ var tracer = otel.Tracer("modules/frontend/pipeline") type Request interface { HTTPRequest() *http.Request Context() context.Context + WithContext(context.Context) + CloneFromHTTPRequest(request *http.Request) Request Weight() int SetWeight(int) @@ -23,7 +25,6 @@ type Request interface { SetResponseData(any) // add data that will be sent back with this requests response ResponseData() any - CloneFromHTTPRequest(request *http.Request) *HTTPRequest } type HTTPRequest struct { @@ -78,8 +79,13 @@ func (r *HTTPRequest) SetWeight(w int) { r.weight = w } -func (r *HTTPRequest) CloneFromHTTPRequest(request *http.Request) *HTTPRequest { - return &HTTPRequest{req: request, weight: r.weight} +func (r *HTTPRequest) CloneFromHTTPRequest(request *http.Request) Request { + return &HTTPRequest{ + req: request, + weight: r.weight, + cacheKey: r.cacheKey, + responseData: r.responseData, + } } // diff --git a/modules/frontend/search_handlers.go b/modules/frontend/search_handlers.go index 190b47762b8..a2e2af843e1 100644 --- a/modules/frontend/search_handlers.go +++ b/modules/frontend/search_handlers.go @@ -166,7 +166,7 @@ func logResult(logger log.Logger, tenantID string, durationSeconds float64, req if resp == nil { level.Info(logger).Log( - "msg", "search results - no resp", + "msg", "search response - no resp", "tenant", tenantID, "duration_seconds", durationSeconds, "status_code", statusCode, @@ -177,7 +177,7 @@ func logResult(logger log.Logger, tenantID string, durationSeconds float64, req if resp.Metrics == nil { level.Info(logger).Log( - "msg", "search results - no metrics", + "msg", "search response - no metrics", "tenant", tenantID, "query", req.Query, "range_seconds", req.End-req.Start, @@ -188,7 +188,7 @@ func logResult(logger log.Logger, tenantID string, durationSeconds float64, req } level.Info(logger).Log( - "msg", "search results", + "msg", "search response", "tenant", tenantID, "query", req.Query, "range_seconds", req.End-req.Start, diff --git a/modules/frontend/search_sharder.go b/modules/frontend/search_sharder.go index 6fe03ad11e1..d7b39e5d25f 100644 --- a/modules/frontend/search_sharder.go +++ b/modules/frontend/search_sharder.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "math" + "net/http" "sort" "time" @@ -98,7 +99,7 @@ func (s asyncSearchSharder) RoundTrip(pipelineRequest pipeline.Request) (pipelin // build request to search ingesters based on query_ingesters_until config and time range // pass subCtx in requests so we can cancel and exit early - jobMetrics, err := s.ingesterRequests(ctx, tenantID, pipelineRequest, *searchReq, reqCh) + jobMetrics, err := s.ingesterRequests(tenantID, pipelineRequest, *searchReq, reqCh) if err != nil { return nil, err } @@ -178,7 +179,7 @@ func (s *asyncSearchSharder) backendRequests(ctx context.Context, tenantID strin // that covers the ingesters. If nil is returned for the http.Request then there is no ingesters query. // since this function modifies searchReq.Start and End we are taking a value instead of a pointer to prevent it from // unexpectedly changing the passed searchReq. -func (s *asyncSearchSharder) ingesterRequests(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tempopb.SearchRequest, reqCh chan pipeline.Request) (*combiner.SearchJobResponse, error) { +func (s *asyncSearchSharder) ingesterRequests(tenantID string, parent pipeline.Request, searchReq tempopb.SearchRequest, reqCh chan pipeline.Request) (*combiner.SearchJobResponse, error) { resp := &combiner.SearchJobResponse{ Shards: make([]combiner.SearchShards, 0, maxSearchShards+1), // +1 for the ingester shard } @@ -192,7 +193,7 @@ func (s *asyncSearchSharder) ingesterRequests(ctx context.Context, tenantID stri CompletedThroughSeconds: 1, }) - return resp, buildIngesterRequestChan(ctx, tenantID, parent, &searchReq, reqCh) + return resp, buildIngesterRequest(tenantID, parent, &searchReq, reqCh) } ingesterUntil := uint32(time.Now().Add(-s.cfg.QueryIngestersUntil).Unix()) @@ -247,7 +248,7 @@ func (s *asyncSearchSharder) ingesterRequests(ctx context.Context, tenantID stri subReq.Start = shardStart subReq.End = shardEnd - err := buildIngesterRequestChan(ctx, tenantID, parent, &subReq, reqCh) + err := buildIngesterRequest(tenantID, parent, &subReq, reqCh) if err != nil { return nil, err } @@ -304,7 +305,6 @@ func buildBackendRequests(ctx context.Context, tenantID string, parent pipeline. blockIter(nil, func(m *backend.BlockMeta, shard, startPage, pages int) { blockID := m.BlockID.String() - subR := parent.HTTPRequest().Clone(ctx) dedColsJSON, err := colsToJSON.JSONForDedicatedColumns(m.DedicatedColumns) if err != nil { @@ -312,27 +312,29 @@ func buildBackendRequests(ctx context.Context, tenantID string, parent pipeline. return } - subR, err = api.BuildSearchBlockRequest(subR, &tempopb.SearchBlockRequest{ - BlockID: blockID, - StartPage: uint32(startPage), - PagesToSearch: uint32(pages), - Encoding: m.Encoding.String(), - IndexPageSize: m.IndexPageSize, - TotalRecords: m.TotalRecords, - DataEncoding: m.DataEncoding, - Version: m.Version, - Size_: m.Size_, - FooterSize: m.FooterSize, - // DedicatedColumns: dc, for perf reason we pass dedicated columns json in directly to not have to realloc object -> proto -> json - }, dedColsJSON) + pipelineR, err := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + r, err = api.BuildSearchBlockRequest(r, &tempopb.SearchBlockRequest{ + BlockID: blockID, + StartPage: uint32(startPage), + PagesToSearch: uint32(pages), + Encoding: m.Encoding.String(), + IndexPageSize: m.IndexPageSize, + TotalRecords: m.TotalRecords, + DataEncoding: m.DataEncoding, + Version: m.Version, + Size_: m.Size_, + FooterSize: m.FooterSize, + // DedicatedColumns: dc, for perf reason we pass dedicated columns json in directly to not have to realloc object -> proto -> json + }, dedColsJSON) + + return r, err + }) if err != nil { errFn(fmt.Errorf("failed to build search block request. block: %s tempopb: %w", blockID, err)) return } - prepareRequestForQueriers(subR, tenantID) key := searchJobCacheKey(tenantID, queryHash, int64(searchReq.Start), int64(searchReq.End), m, startPage, pages) - pipelineR := parent.CloneFromHTTPRequest(subR) pipelineR.SetCacheKey(key) pipelineR.SetResponseData(shard) @@ -389,19 +391,17 @@ func pagesPerRequest(m *backend.BlockMeta, bytesPerRequest int) int { return pagesPerQuery } -func buildIngesterRequestChan(ctx context.Context, tenantID string, parent pipeline.Request, searchReq *tempopb.SearchRequest, reqCh chan pipeline.Request) error { - subR := parent.HTTPRequest().Clone(ctx) - subR, err := api.BuildSearchRequest(subR, searchReq) +func buildIngesterRequest(tenantID string, parent pipeline.Request, searchReq *tempopb.SearchRequest, reqCh chan pipeline.Request) error { + subR, err := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + return api.BuildSearchRequest(r, searchReq) + }) if err != nil { return err } - prepareRequestForQueriers(subR, tenantID) - - pipelineR := parent.CloneFromHTTPRequest(subR) - pipelineR.SetResponseData(0) // ingester requests are always shard 0 + subR.SetResponseData(0) // ingester requests are always shard 0 + reqCh <- subR - reqCh <- pipelineR return nil } diff --git a/modules/frontend/search_sharder_test.go b/modules/frontend/search_sharder_test.go index 509ce8a432b..b6b9f27943f 100644 --- a/modules/frontend/search_sharder_test.go +++ b/modules/frontend/search_sharder_test.go @@ -496,7 +496,7 @@ func TestIngesterRequests(t *testing.T) { pr := pipeline.NewHTTPRequest(req) pr.SetWeight(2) - actualSearchResponse, err := s.ingesterRequests(context.Background(), "test", pr, *searchReq, reqChan) + actualSearchResponse, err := s.ingesterRequests("test", pr, *searchReq, reqChan) if tc.expectedError != nil { require.Equal(t, tc.expectedError, err) continue diff --git a/modules/frontend/tag_handlers.go b/modules/frontend/tag_handlers.go index b61bc4beb8f..404009a48ca 100644 --- a/modules/frontend/tag_handlers.go +++ b/modules/frontend/tag_handlers.go @@ -45,7 +45,6 @@ func newTagsStreamingGRPCHandler(cfg Config, next pipeline.AsyncRoundTripper[com if err != nil { return err } - prepareRequestForQueriers(httpReq, tenant) var finalResponse *tempopb.SearchTagsResponse comb := combiner.NewTypedSearchTags(o.MaxBytesPerTagValuesQuery(tenant)) @@ -79,7 +78,6 @@ func newTagsV2StreamingGRPCHandler(cfg Config, next pipeline.AsyncRoundTripper[c if err != nil { return err } - prepareRequestForQueriers(httpReq, tenant) var finalResponse *tempopb.SearchTagsV2Response comb := combiner.NewTypedSearchTagsV2(o.MaxBytesPerTagValuesQuery(tenant)) @@ -117,7 +115,6 @@ func newTagValuesStreamingGRPCHandler(cfg Config, next pipeline.AsyncRoundTrippe if err != nil { return err } - prepareRequestForQueriers(httpReq, tenant) var finalResponse *tempopb.SearchTagValuesResponse comb := combiner.NewTypedSearchTagValues(o.MaxBytesPerTagValuesQuery(tenant)) @@ -155,7 +152,6 @@ func newTagValuesV2StreamingGRPCHandler(cfg Config, next pipeline.AsyncRoundTrip if err != nil { return err } - prepareRequestForQueriers(httpReq, tenant) var finalResponse *tempopb.SearchTagValuesV2Response comb := combiner.NewTypedSearchTagValuesV2(o.MaxBytesPerTagValuesQuery(tenant)) @@ -394,7 +390,7 @@ func logTagsRequest(logger log.Logger, tenantID, handler, scope string, rangeSec func logTagsResult(logger log.Logger, tenantID, handler, scope string, rangeSeconds uint32, durationSeconds float64, inspectedBytes uint64, err error) { level.Info(logger).Log( - "msg", "search tag results", + "msg", "search tag response", "tenant", tenantID, "handler", handler, "scope", scope, @@ -417,7 +413,7 @@ func logTagValuesRequest(logger log.Logger, tenantID, handler, tagName, query st func logTagValuesResult(logger log.Logger, tenantID, handler, tagName, query string, rangeSeconds uint32, durationSeconds float64, inspectedBytes uint64, err error) { level.Info(logger).Log( - "msg", "search tag values results", + "msg", "search tag values response", "tenant", tenantID, "handler", handler, "tag", tagName, diff --git a/modules/frontend/tag_sharder.go b/modules/frontend/tag_sharder.go index b3862ba889d..55f1f1e7942 100644 --- a/modules/frontend/tag_sharder.go +++ b/modules/frontend/tag_sharder.go @@ -190,9 +190,9 @@ func newAsyncTagSharder(reader tempodb.Reader, o overrides.Interface, cfg Search // until limit results are found func (s searchTagSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline.Responses[combiner.PipelineResponse], error) { r := pipelineRequest.HTTPRequest() - requestCtx := r.Context() + ctx := pipelineRequest.Context() - tenantID, err := user.ExtractOrgID(requestCtx) + tenantID, err := user.ExtractOrgID(ctx) if err != nil { return pipeline.NewBadRequest(err), nil } @@ -201,8 +201,9 @@ func (s searchTagSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline. if err != nil { return pipeline.NewBadRequest(err), nil } - ctx, span := tracer.Start(requestCtx, "frontend.ShardSearchTags") + ctx, span := tracer.Start(ctx, "frontend.ShardSearchTags") defer span.End() + pipelineRequest.WithContext(ctx) // calculate and enforce max search duration maxDuration := s.maxDuration(tenantID) @@ -213,7 +214,7 @@ func (s searchTagSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline. // build request to search ingester based on query_ingesters_until config and time range // pass subCtx in requests, so we can cancel and exit early - ingesterReq, err := s.ingesterRequest(ctx, tenantID, pipelineRequest, searchReq) + ingesterReq, err := s.ingesterRequest(tenantID, pipelineRequest, searchReq) if err != nil { return nil, err } @@ -223,7 +224,7 @@ func (s searchTagSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline. reqCh <- ingesterReq } - s.backendRequests(ctx, tenantID, r, searchReq, reqCh, func(err error) { + s.backendRequests(ctx, tenantID, pipelineRequest, searchReq, reqCh, func(err error) { // todo: actually find a way to return this error to the user s.logger.Log("msg", "failed to build backend requests", "err", err) }) @@ -252,7 +253,7 @@ func (s searchTagSharder) blockMetas(start, end int64, tenantID string) []*backe // backendRequest builds backend requests to search backend blocks. backendRequest takes ownership of reqCh and closes it. // it returns 3 int values: totalBlocks, totalBlockBytes, and estimated jobs -func (s searchTagSharder) backendRequests(ctx context.Context, tenantID string, parent *http.Request, searchReq tagSearchReq, reqCh chan<- pipeline.Request, errFn func(error)) { +func (s searchTagSharder) backendRequests(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tagSearchReq, reqCh chan<- pipeline.Request, errFn func(error)) { var blocks []*backend.BlockMeta // request without start or end, search only in ingester @@ -282,7 +283,7 @@ func (s searchTagSharder) backendRequests(ctx context.Context, tenantID string, // buildBackendRequests returns a slice of requests that cover all blocks in the store // that are covered by start/end. -func (s searchTagSharder) buildBackendRequests(ctx context.Context, tenantID string, parent *http.Request, metas []*backend.BlockMeta, bytesPerRequest int, reqCh chan<- pipeline.Request, errFn func(error), searchReq tagSearchReq) { +func (s searchTagSharder) buildBackendRequests(ctx context.Context, tenantID string, parent pipeline.Request, metas []*backend.BlockMeta, bytesPerRequest int, reqCh chan<- pipeline.Request, errFn func(error), searchReq tagSearchReq) { defer close(reqCh) hash := searchReq.hash() @@ -296,14 +297,13 @@ func (s searchTagSharder) buildBackendRequests(ctx context.Context, tenantID str blockID := m.BlockID.String() for startPage := 0; startPage < int(m.TotalRecords); startPage += pages { - subR := parent.Clone(ctx) - subR, err := searchReq.buildTagSearchBlockRequest(subR, blockID, startPage, pages, m) + pipelineR, err := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + return searchReq.buildTagSearchBlockRequest(r, blockID, startPage, pages, m) + }) if err != nil { errFn(err) - return + continue } - prepareRequestForQueriers(subR, tenantID) - pipelineR := pipeline.NewHTTPRequest(subR) key := cacheKey(keyPrefix, tenantID, hash, int64(searchReq.start()), int64(searchReq.end()), m, startPage, pages) pipelineR.SetCacheKey(key) @@ -321,10 +321,10 @@ func (s searchTagSharder) buildBackendRequests(ctx context.Context, tenantID str // that covers the ingesters. If nil is returned for the http.Request then there is no ingesters query. // we should do a copy of the searchReq before use this function, as it is an interface, we cannot guaranteed be passed // by value. -func (s searchTagSharder) ingesterRequest(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tagSearchReq) (*pipeline.HTTPRequest, error) { +func (s searchTagSharder) ingesterRequest(tenantID string, parent pipeline.Request, searchReq tagSearchReq) (pipeline.Request, error) { // request without start or end, search only in ingester if searchReq.start() == 0 || searchReq.end() == 0 { - return s.buildIngesterRequest(ctx, tenantID, parent, searchReq) + return s.buildIngesterRequest(tenantID, parent, searchReq) } now := time.Now() @@ -349,17 +349,17 @@ func (s searchTagSharder) ingesterRequest(ctx context.Context, tenantID string, } newSearchReq := searchReq.newWithRange(ingesterStart, ingesterEnd) - return s.buildIngesterRequest(ctx, tenantID, parent, newSearchReq) + return s.buildIngesterRequest(tenantID, parent, newSearchReq) } -func (s searchTagSharder) buildIngesterRequest(ctx context.Context, tenantID string, parent pipeline.Request, searchReq tagSearchReq) (*pipeline.HTTPRequest, error) { - subR := parent.HTTPRequest().Clone(ctx) - subR, err := searchReq.buildSearchTagRequest(subR) +func (s searchTagSharder) buildIngesterRequest(tenantID string, parent pipeline.Request, searchReq tagSearchReq) (pipeline.Request, error) { + subR, err := cloneRequestforQueriers(parent, tenantID, func(r *http.Request) (*http.Request, error) { + return searchReq.buildSearchTagRequest(r) + }) if err != nil { return nil, err } - prepareRequestForQueriers(subR, tenantID) - return parent.CloneFromHTTPRequest(subR), nil + return subR, nil } // maxDuration returns the max search duration allowed for this tenant. diff --git a/modules/frontend/tag_sharder_test.go b/modules/frontend/tag_sharder_test.go index 150cd5e0dc2..e47fa87f35c 100644 --- a/modules/frontend/tag_sharder_test.go +++ b/modules/frontend/tag_sharder_test.go @@ -161,7 +161,7 @@ func TestTagsBackendRequests(t *testing.T) { req.endValue = uint32(tc.params.end) } - s.backendRequests(context.TODO(), "test", r, &req, reqCh, func(err error) { + s.backendRequests(context.TODO(), "test", pipeline.NewHTTPRequest(r), &req, reqCh, func(err error) { require.Equal(t, tc.expectedError, err) }) @@ -265,7 +265,7 @@ func TestTagsIngesterRequest(t *testing.T) { } copyReq := searchReq - actualReq, err := s.ingesterRequest(context.Background(), "test", pipelineReq, &searchReq) + actualReq, err := s.ingesterRequest("test", pipelineReq, &searchReq) if tc.expectedError != nil { assert.Equal(t, tc.expectedError, err) continue diff --git a/modules/frontend/traceid_sharder.go b/modules/frontend/traceid_sharder.go index 21bdfa47d24..cb17c09c12a 100644 --- a/modules/frontend/traceid_sharder.go +++ b/modules/frontend/traceid_sharder.go @@ -1,13 +1,12 @@ package frontend import ( - "context" "encoding/hex" "net/http" "github.com/go-kit/log" //nolint:all //deprecated - "github.com/grafana/dskit/user" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/modules/frontend/combiner" "github.com/grafana/tempo/modules/frontend/pipeline" "github.com/grafana/tempo/modules/querier" @@ -40,13 +39,11 @@ func newAsyncTraceIDSharder(cfg *TraceByIDConfig, logger log.Logger) pipeline.As // RoundTrip implements http.RoundTripper func (s asyncTraceSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline.Responses[combiner.PipelineResponse], error) { - r := pipelineRequest.HTTPRequest() - - ctx, span := tracer.Start(r.Context(), "frontend.ShardQuery") + ctx, span := tracer.Start(pipelineRequest.Context(), "frontend.ShardQuery") defer span.End() - r = r.WithContext(ctx) + pipelineRequest.WithContext(ctx) - reqs, err := s.buildShardedRequests(ctx, r) + reqs, err := s.buildShardedRequests(pipelineRequest) if err != nil { return nil, err } @@ -66,35 +63,43 @@ func (s asyncTraceSharder) RoundTrip(pipelineRequest pipeline.Request) (pipeline } return pipeline.NewAsyncSharderFunc(ctx, int(concurrentShards), len(reqs), func(i int) pipeline.Request { - pipelineReq := pipelineRequest.CloneFromHTTPRequest(reqs[i]) + pipelineReq := reqs[i] return pipelineReq }, s.next), nil } // buildShardedRequests returns a slice of requests sharded on the precalculated // block boundaries -func (s *asyncTraceSharder) buildShardedRequests(ctx context.Context, parent *http.Request) ([]*http.Request, error) { +func (s *asyncTraceSharder) buildShardedRequests(parent pipeline.Request) ([]pipeline.Request, error) { userID, err := user.ExtractOrgID(parent.Context()) if err != nil { return nil, err } - reqs := make([]*http.Request, s.cfg.QueryShards) + reqs := make([]pipeline.Request, s.cfg.QueryShards) params := map[string]string{} + + reqs[0], err = cloneRequestforQueriers(parent, userID, func(r *http.Request) (*http.Request, error) { + params[querier.QueryModeKey] = querier.QueryModeIngesters + return api.BuildQueryRequest(r, params), nil + }) + if err != nil { + return nil, err + } + // build sharded block queries - for i := 0; i < len(s.blockBoundaries); i++ { - reqs[i] = parent.Clone(ctx) - if i == 0 { - // ingester query - params[querier.QueryModeKey] = querier.QueryModeIngesters - } else { + for i := 1; i < len(s.blockBoundaries); i++ { + i := i // save the loop variable locally to make sure the closure grabs the correct var. + pipelineR, _ := cloneRequestforQueriers(parent, userID, func(r *http.Request) (*http.Request, error) { // block queries params[querier.BlockStartKey] = hex.EncodeToString(s.blockBoundaries[i-1]) params[querier.BlockEndKey] = hex.EncodeToString(s.blockBoundaries[i]) params[querier.QueryModeKey] = querier.QueryModeBlocks - } - reqs[i] = api.BuildQueryRequest(reqs[i], params) - prepareRequestForQueriers(reqs[i], userID) + + return api.BuildQueryRequest(r, params), nil + }) + + reqs[i] = pipelineR } return reqs, nil diff --git a/modules/frontend/traceid_sharder_test.go b/modules/frontend/traceid_sharder_test.go index 74e3339c6c2..4bc9dbca631 100644 --- a/modules/frontend/traceid_sharder_test.go +++ b/modules/frontend/traceid_sharder_test.go @@ -8,6 +8,7 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" + "github.com/grafana/tempo/modules/frontend/pipeline" "github.com/grafana/tempo/pkg/blockboundary" ) @@ -24,10 +25,10 @@ func TestBuildShardedRequests(t *testing.T) { ctx := user.InjectOrgID(context.Background(), "blerg") req := httptest.NewRequest("GET", "/", nil).WithContext(ctx) - shardedReqs, err := sharder.buildShardedRequests(ctx, req) + shardedReqs, err := sharder.buildShardedRequests(pipeline.NewHTTPRequest(req)) require.NoError(t, err) require.Len(t, shardedReqs, queryShards) - require.Equal(t, "/querier?mode=ingesters", shardedReqs[0].RequestURI) - urisEqual(t, []string{"/querier?blockEnd=ffffffffffffffffffffffffffffffff&blockStart=00000000000000000000000000000000&mode=blocks"}, []string{shardedReqs[1].RequestURI}) + require.Equal(t, "/querier?mode=ingesters", shardedReqs[0].HTTPRequest().RequestURI) + urisEqual(t, []string{"/querier?blockEnd=ffffffffffffffffffffffffffffffff&blockStart=00000000000000000000000000000000&mode=blocks"}, []string{shardedReqs[1].HTTPRequest().RequestURI}) } diff --git a/modules/generator/generator.go b/modules/generator/generator.go index 1b76317aacc..2b0078c03f8 100644 --- a/modules/generator/generator.go +++ b/modules/generator/generator.go @@ -73,7 +73,7 @@ func New(cfg *Config, overrides metricsGeneratorOverrides, reg prometheus.Regist return nil, ErrUnconfigured } - err := os.MkdirAll(cfg.Storage.Path, os.ModePerm) + err := os.MkdirAll(cfg.Storage.Path, 0o700) if err != nil { return nil, fmt.Errorf("failed to mkdir on %s: %w", cfg.Storage.Path, err) } diff --git a/modules/generator/generator_test.go b/modules/generator/generator_test.go index 3600d1c817b..a3ad47c1b6c 100644 --- a/modules/generator/generator_test.go +++ b/modules/generator/generator_test.go @@ -2,16 +2,24 @@ package generator import ( "context" + "flag" "fmt" "os" "path/filepath" + "runtime" + "strconv" "testing" "time" "github.com/go-kit/log" "github.com/grafana/dskit/services" "github.com/grafana/tempo/modules/generator/processor/spanmetrics" + "github.com/grafana/tempo/modules/generator/storage" "github.com/grafana/tempo/modules/overrides" + "github.com/grafana/tempo/pkg/tempopb" + common_v1 "github.com/grafana/tempo/pkg/tempopb/common/v1" + trace_v1 "github.com/grafana/tempo/pkg/tempopb/trace/v1" + "github.com/grafana/tempo/pkg/util/test" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" @@ -45,7 +53,7 @@ overrides: collection_interval: 1s processors: - %s -`, user1, spanmetrics.Name)), os.ModePerm)) +`, user1, spanmetrics.Name)), 0o700)) o, err := overrides.NewOverrides(overridesConfig, nil, prometheus.NewRegistry()) require.NoError(t, err) @@ -84,7 +92,7 @@ overrides: collection_interval: 1s processors: - %s -`, user1, spanmetrics.Count.String())), os.ModePerm)) +`, user1, spanmetrics.Count.String())), 0o700)) time.Sleep(15 * time.Second) // Wait for overrides to be applied. Reload is hardcoded to 10s :( // Only Count should be enabled for user1 @@ -129,3 +137,140 @@ func (l testLogger) Log(keyvals ...interface{}) error { l.t.Log(keyvals...) return nil } + +func BenchmarkPushSpans(b *testing.B) { + var ( + tenant = "test-tenant" + reg = prometheus.NewRegistry() + ctx = context.Background() + log = log.NewNopLogger() + cfg = &Config{} + + walcfg = &storage.Config{ + Path: b.TempDir(), + } + + o = &mockOverrides{ + processors: map[string]struct{}{ + "span-metrics": {}, + "service-graphs": {}, + }, + spanMetricsEnableTargetInfo: true, + spanMetricsTargetInfoExcludedDimensions: []string{"excluded}"}, + } + ) + + cfg.RegisterFlagsAndApplyDefaults("", &flag.FlagSet{}) + + wal, err := storage.New(walcfg, o, tenant, reg, log) + require.NoError(b, err) + + inst, err := newInstance(cfg, tenant, o, wal, reg, log, nil, nil) + require.NoError(b, err) + defer inst.shutdown() + + req := &tempopb.PushSpansRequest{ + Batches: []*trace_v1.ResourceSpans{ + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + }, + } + + // Add more resource attributes to get closer to real data + // Add integer to increase cardinality. + // Currently this is about 80 active series + // TODO - Get more series + for i, b := range req.Batches { + b.Resource.Attributes = append(b.Resource.Attributes, []*common_v1.KeyValue{ + {Key: "k8s.cluster.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.namespace.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.node.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.pod.ip", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.pod.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "excluded", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + }...) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + inst.pushSpans(ctx, req) + } + + b.StopTimer() + runtime.GC() + mem := runtime.MemStats{} + runtime.ReadMemStats(&mem) + b.ReportMetric(float64(mem.HeapInuse), "heap_in_use") +} + +func BenchmarkCollect(b *testing.B) { + var ( + tenant = "test-tenant" + reg = prometheus.NewRegistry() + ctx = context.Background() + log = log.NewNopLogger() + cfg = &Config{} + + walcfg = &storage.Config{ + Path: b.TempDir(), + } + + o = &mockOverrides{ + processors: map[string]struct{}{ + "span-metrics": {}, + "service-graphs": {}, + }, + spanMetricsDimensions: []string{"k8s.cluster.name", "k8s.namespace.name"}, + spanMetricsEnableTargetInfo: true, + spanMetricsTargetInfoExcludedDimensions: []string{"excluded}"}, + nativeHistograms: overrides.HistogramMethodBoth, + } + ) + + cfg.RegisterFlagsAndApplyDefaults("", &flag.FlagSet{}) + + wal, err := storage.New(walcfg, o, tenant, reg, log) + require.NoError(b, err) + + inst, err := newInstance(cfg, tenant, o, wal, reg, log, nil, nil) + require.NoError(b, err) + defer inst.shutdown() + + req := &tempopb.PushSpansRequest{ + Batches: []*trace_v1.ResourceSpans{ + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + test.MakeBatch(100, nil), + }, + } + + // Add more resource attributes to get closer to real data + // Add integer to increase cardinality. + // Currently this is about 80 active series + // TODO - Get more series + for i, b := range req.Batches { + b.Resource.Attributes = append(b.Resource.Attributes, []*common_v1.KeyValue{ + {Key: "k8s.cluster.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.namespace.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.node.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.pod.ip", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "k8s.pod.name", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + {Key: "excluded", Value: &common_v1.AnyValue{Value: &common_v1.AnyValue_StringValue{StringValue: "test" + strconv.Itoa(i)}}}, + }...) + } + inst.pushSpans(ctx, req) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + inst.registry.CollectMetrics(ctx) + } + + b.StopTimer() + runtime.GC() + mem := runtime.MemStats{} + runtime.ReadMemStats(&mem) + b.ReportMetric(float64(mem.HeapInuse), "heap_in_use") +} diff --git a/modules/generator/instance.go b/modules/generator/instance.go index fec65a4e945..3056a63bf65 100644 --- a/modules/generator/instance.go +++ b/modules/generator/instance.go @@ -357,6 +357,8 @@ func (i *instance) pushSpans(ctx context.Context, req *tempopb.PushSpansRequest) } func (i *instance) preprocessSpans(req *tempopb.PushSpansRequest) { + // TODO - uniqify all strings? + // Doesn't help allocs, but should greatly reduce inuse space size := 0 spanCount := 0 expiredSpanCount := 0 diff --git a/modules/generator/processor/localblocks/metrics.go b/modules/generator/processor/localblocks/metrics.go index 3573f9982ba..aaa8bbe41f9 100644 --- a/modules/generator/processor/localblocks/metrics.go +++ b/modules/generator/processor/localblocks/metrics.go @@ -74,4 +74,10 @@ var ( Name: "flush_queue_size", Help: "Size of the flush queue", }, []string{"tenant"}) + metricFailedFlushes = promauto.NewCounter(prometheus.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "failed_flushes_total", + Help: "The total number of failed flushes", + }) ) diff --git a/modules/generator/processor/localblocks/processor.go b/modules/generator/processor/localblocks/processor.go index d2ad9bd7e44..ec3458eda43 100644 --- a/modules/generator/processor/localblocks/processor.go +++ b/modules/generator/processor/localblocks/processor.go @@ -34,7 +34,10 @@ import ( var tracer = otel.Tracer("modules/generator/processor/localblocks") -const timeBuffer = 5 * time.Minute +const ( + timeBuffer = 5 * time.Minute + maxFlushAttempts = 100 +) // ProcessorOverrides is just the set of overrides needed here. type ProcessorOverrides interface { @@ -276,16 +279,36 @@ func (p *Processor) flushLoop() { op := o.(*flushOp) op.attempts++ + + if op.attempts > maxFlushAttempts { + _ = level.Error(p.logger).Log("msg", "failed to flush block after max attempts", "tenant", p.tenant, "block", op.blockID, "attempts", op.attempts) + + // attempt to delete the block + p.blocksMtx.Lock() + err := p.wal.LocalBackend().ClearBlock(op.blockID, p.tenant) + if err != nil { + _ = level.Error(p.logger).Log("msg", "failed to clear corrupt block", "tenant", p.tenant, "block", op.blockID, "err", err) + } + delete(p.completeBlocks, op.blockID) + p.blocksMtx.Unlock() + + continue + } + err := p.flushBlock(op.blockID) if err != nil { - _ = level.Error(p.logger).Log("msg", "failed to flush a block", "err", err) + _ = level.Info(p.logger).Log("msg", "re-queueing block for flushing", "block", op.blockID, "attempts", op.attempts, "err", err) + metricFailedFlushes.Inc() - _ = level.Info(p.logger).Log("msg", "re-queueing block for flushing", "block", op.blockID, "attempts", op.attempts) - op.at = time.Now().Add(op.backoff()) + delay := op.backoff() + op.at = time.Now().Add(delay) - if _, err := p.flushqueue.Enqueue(op); err != nil { - _ = level.Error(p.logger).Log("msg", "failed to requeue block for flushing", "err", err) - } + go func() { + time.Sleep(delay) + if _, err := p.flushqueue.Enqueue(op); err != nil { + _ = level.Error(p.logger).Log("msg", "failed to requeue block for flushing", "err", err) + } + }() } } } @@ -331,6 +354,9 @@ func (p *Processor) completeBlock() error { b = firstWalBlock ) + ctx, span := tracer.Start(ctx, "Processor.CompleteBlock") + defer span.End() + iter, err := b.Iterator() if err != nil { return err diff --git a/modules/generator/processor/spanmetrics/spanmetrics.go b/modules/generator/processor/spanmetrics/spanmetrics.go index 44a6da4d7dc..492edabd7c5 100644 --- a/modules/generator/processor/spanmetrics/spanmetrics.go +++ b/modules/generator/processor/spanmetrics/spanmetrics.go @@ -121,8 +121,8 @@ func (p *Processor) aggregateMetrics(resourceSpans []*v1_trace.ResourceSpans) { svcName, _ := processor_util.FindServiceName(rs.Resource.Attributes) jobName := processor_util.GetJobValue(rs.Resource.Attributes) instanceID, _ := processor_util.FindInstanceID(rs.Resource.Attributes) - resourceLabels := make([]string, 0) - resourceValues := make([]string, 0) + resourceLabels := make([]string, 0) // TODO move outside the loop and reuse? + resourceValues := make([]string, 0) // TODO don't allocate unless needed? if p.Cfg.EnableTargetInfo { resourceLabels, resourceValues = processor_util.GetTargetInfoAttributesValues(rs.Resource.Attributes, p.Cfg.TargetInfoExcludedDimensions) @@ -219,6 +219,9 @@ func (p *Processor) aggregateMetricsForSpan(svcName string, jobName string, inst // update target_info label values if p.Cfg.EnableTargetInfo { + // TODO - The resource labels only need to be sanitized once + // TODO - attribute names are stable across applications + // so let's cache the result of previous sanitizations resourceAttributesCount := len(targetInfoLabels) for index, label := range targetInfoLabels { // sanitize label name @@ -239,6 +242,7 @@ func (p *Processor) aggregateMetricsForSpan(svcName string, jobName string, inst targetInfoRegistryLabelValues := p.registry.NewLabelValueCombo(targetInfoLabels, targetInfoLabelValues) // only register target info if at least (job or instance) AND one other attribute are present + // TODO - We can move this check to the top if resourceAttributesCount > 0 && len(targetInfoLabels) > resourceAttributesCount { p.spanMetricsTargetInfo.SetForTargetInfo(targetInfoRegistryLabelValues, 1) } diff --git a/modules/generator/processor/util/util.go b/modules/generator/processor/util/util.go index 51a2617c1ae..796872b526a 100644 --- a/modules/generator/processor/util/util.go +++ b/modules/generator/processor/util/util.go @@ -69,6 +69,7 @@ func GetJobValue(attributes []*v1_common.KeyValue) string { } func GetTargetInfoAttributesValues(attributes []*v1_common.KeyValue, exclude []string) ([]string, []string) { + // TODO allocate with known length, or take new params for existing buffers keys := make([]string, 0) values := make([]string, 0) for _, attrs := range attributes { diff --git a/modules/generator/registry/counter.go b/modules/generator/registry/counter.go index 8f7f5af1a09..ff85891f01b 100644 --- a/modules/generator/registry/counter.go +++ b/modules/generator/registry/counter.go @@ -20,10 +20,12 @@ type counter struct { onAddSeries func(count uint32) bool onRemoveSeries func(count uint32) + + externalLabels map[string]string } type counterSeries struct { - labels LabelPair + labels labels.Labels value *atomic.Float64 lastUpdated *atomic.Int64 // firstSeries is used to track if this series is new to the counter. This @@ -46,7 +48,7 @@ func (co *counterSeries) registerSeenSeries() { co.firstSeries.Store(false) } -func newCounter(name string, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32)) *counter { +func newCounter(name string, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), externalLabels map[string]string) *counter { if onAddSeries == nil { onAddSeries = func(uint32) bool { return true @@ -61,6 +63,7 @@ func newCounter(name string, onAddSeries func(uint32) bool, onRemoveSeries func( series: make(map[uint64]*counterSeries), onAddSeries: onAddSeries, onRemoveSeries: onRemoveSeries, + externalLabels: externalLabels, } } @@ -98,8 +101,21 @@ func (c *counter) Inc(labelValueCombo *LabelValueCombo, value float64) { } func (c *counter) newSeries(labelValueCombo *LabelValueCombo, value float64) *counterSeries { + lbls := labelValueCombo.getLabelPair() + lb := labels.NewBuilder(make(labels.Labels, 1+len(lbls.names)+len(c.externalLabels))) + + for i, name := range lbls.names { + lb.Set(name, lbls.values[i]) + } + + for name, value := range c.externalLabels { + lb.Set(name, value) + } + + lb.Set(labels.MetricName, c.metricName) + return &counterSeries{ - labels: labelValueCombo.getLabelPair(), + labels: lb.Labels(), value: atomic.NewFloat64(value), lastUpdated: atomic.NewInt64(time.Now().UnixMilli()), firstSeries: atomic.NewBool(true), @@ -115,38 +131,13 @@ func (c *counter) name() string { return c.metricName } -func (c *counter) collectMetrics(appender storage.Appender, timeMs int64, externalLabels map[string]string) (activeSeries int, err error) { +func (c *counter) collectMetrics(appender storage.Appender, timeMs int64) (activeSeries int, err error) { c.seriesMtx.RLock() defer c.seriesMtx.RUnlock() activeSeries = len(c.series) - labelsCount := 0 - if activeSeries > 0 && c.series[0] != nil { - labelsCount = len(c.series[0].labels.names) - } - - // base labels - baseLabels := make(labels.Labels, 0, 1+len(externalLabels)+labelsCount) - - // add external labels - for name, value := range externalLabels { - baseLabels = append(baseLabels, labels.Label{Name: name, Value: value}) - } - - // add metric name - baseLabels = append(baseLabels, labels.Label{Name: labels.MetricName, Value: c.metricName}) - - lb := labels.NewBuilder(baseLabels) - for _, s := range c.series { - lb.Reset(baseLabels) - - // set series-specific labels - for i, name := range s.labels.names { - lb.Set(name, s.labels.values[i]) - } - // If we are about to call Append for the first time on a series, we need // to first insert a 0 value to allow Prometheus to start from a non-null // value. @@ -154,19 +145,19 @@ func (c *counter) collectMetrics(appender storage.Appender, timeMs int64, extern // We set the timestamp of the init serie at the end of the previous minute, that way we ensure it ends in a // different aggregation interval to avoid be downsampled. endOfLastMinuteMs := getEndOfLastMinuteMs(timeMs) - _, err = appender.Append(0, lb.Labels(), endOfLastMinuteMs, 0) + _, err = appender.Append(0, s.labels, endOfLastMinuteMs, 0) if err != nil { return } s.registerSeenSeries() } - _, err = appender.Append(0, lb.Labels(), timeMs, s.value.Load()) + _, err = appender.Append(0, s.labels, timeMs, s.value.Load()) if err != nil { return } - // TODO support exemplars + // TODO: support exemplars } return diff --git a/modules/generator/registry/counter_test.go b/modules/generator/registry/counter_test.go index a9d6b2f6bc0..042fa8c544a 100644 --- a/modules/generator/registry/counter_test.go +++ b/modules/generator/registry/counter_test.go @@ -18,7 +18,7 @@ func Test_counter(t *testing.T) { return true } - c := newCounter("my_counter", onAdd, nil) + c := newCounter("my_counter", onAdd, nil, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) @@ -33,7 +33,7 @@ func Test_counter(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-3"}), 3.0) @@ -49,7 +49,7 @@ func Test_counter(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-3"}, collectionTimeMs, 3), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 3, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 3, expectedSamples, nil) } func TestCounterDifferentLabels(t *testing.T) { @@ -59,7 +59,7 @@ func TestCounterDifferentLabels(t *testing.T) { return true } - c := newCounter("my_counter", onAdd, nil) + c := newCounter("my_counter", onAdd, nil, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"another_label"}, []string{"another_value"}), 2.0) @@ -74,7 +74,7 @@ func TestCounterDifferentLabels(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "another_label": "another_value"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "another_label": "another_value"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_counter_cantAdd(t *testing.T) { @@ -84,7 +84,7 @@ func Test_counter_cantAdd(t *testing.T) { return canAdd } - c := newCounter("my_counter", onAdd, nil) + c := newCounter("my_counter", onAdd, nil, nil) // allow adding new series canAdd = true @@ -100,7 +100,7 @@ func Test_counter_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) // block new series - existing series can still be updated canAdd = false @@ -113,7 +113,7 @@ func Test_counter_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, collectionTimeMs, 4), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_counter_removeStaleSeries(t *testing.T) { @@ -123,7 +123,7 @@ func Test_counter_removeStaleSeries(t *testing.T) { removedSeries++ } - c := newCounter("my_counter", nil, onRemove) + c := newCounter("my_counter", nil, onRemove, nil) timeMs := time.Now().UnixMilli() c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) @@ -141,7 +141,7 @@ func Test_counter_removeStaleSeries(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) time.Sleep(10 * time.Millisecond) timeMs = time.Now().UnixMilli() @@ -157,11 +157,11 @@ func Test_counter_removeStaleSeries(t *testing.T) { expectedSamples = []sample{ newSample(map[string]string{"__name__": "my_counter", "label": "value-2"}, collectionTimeMs, 4), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 1, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 1, expectedSamples, nil) } func Test_counter_externalLabels(t *testing.T) { - c := newCounter("my_counter", nil, nil) + c := newCounter("my_counter", nil, nil, map[string]string{"external_label": "external_value"}) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) @@ -174,11 +174,11 @@ func Test_counter_externalLabels(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-2", "external_label": "external_value"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "label": "value-2", "external_label": "external_value"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, map[string]string{"external_label": "external_value"}, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_counter_concurrencyDataRace(t *testing.T) { - c := newCounter("my_counter", nil, nil) + c := newCounter("my_counter", nil, nil, nil) end := make(chan struct{}) @@ -211,7 +211,7 @@ func Test_counter_concurrencyDataRace(t *testing.T) { }) go accessor(func() { - _, err := c.collectMetrics(&noopAppender{}, 0, nil) + _, err := c.collectMetrics(&noopAppender{}, 0) assert.NoError(t, err) }) @@ -224,7 +224,7 @@ func Test_counter_concurrencyDataRace(t *testing.T) { } func Test_counter_concurrencyCorrectness(t *testing.T) { - c := newCounter("my_counter", nil, nil) + c := newCounter("my_counter", nil, nil, nil) var wg sync.WaitGroup end := make(chan struct{}) @@ -258,13 +258,13 @@ func Test_counter_concurrencyCorrectness(t *testing.T) { newSample(map[string]string{"__name__": "my_counter", "label": "value-1"}, endOfLastMinuteMs, 0), newSample(map[string]string{"__name__": "my_counter", "label": "value-1"}, collectionTimeMs, totalCount.Load()), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 1, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 1, expectedSamples, nil) } -func collectMetricAndAssert(t *testing.T, m metric, collectionTimeMs int64, externalLabels map[string]string, expectedActiveSeries int, expectedSamples []sample, expectedExemplars []exemplarSample) { +func collectMetricAndAssert(t *testing.T, m metric, collectionTimeMs int64, expectedActiveSeries int, expectedSamples []sample, expectedExemplars []exemplarSample) { appender := &capturingAppender{} - activeSeries, err := m.collectMetrics(appender, collectionTimeMs, externalLabels) + activeSeries, err := m.collectMetrics(appender, collectionTimeMs) assert.NoError(t, err) assert.Equal(t, expectedActiveSeries, activeSeries) diff --git a/modules/generator/registry/gauge.go b/modules/generator/registry/gauge.go index 3a8ec22d86b..a3a3b25e70c 100644 --- a/modules/generator/registry/gauge.go +++ b/modules/generator/registry/gauge.go @@ -24,11 +24,12 @@ type gauge struct { onAddSeries func(count uint32) bool onRemoveSeries func(count uint32) + + externalLabels map[string]string } type gaugeSeries struct { - // labelValueCombo should not be modified after creation - labels LabelPair + labels labels.Labels value *atomic.Float64 lastUpdated *atomic.Int64 } @@ -43,7 +44,7 @@ const ( set = "set" ) -func newGauge(name string, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32)) *gauge { +func newGauge(name string, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), externalLabels map[string]string) *gauge { if onAddSeries == nil { onAddSeries = func(uint32) bool { return true @@ -58,6 +59,7 @@ func newGauge(name string, onAddSeries func(uint32) bool, onRemoveSeries func(co series: make(map[uint64]*gaugeSeries), onAddSeries: onAddSeries, onRemoveSeries: onRemoveSeries, + externalLabels: externalLabels, } } @@ -107,8 +109,21 @@ func (g *gauge) updateSeries(labelValueCombo *LabelValueCombo, value float64, op } func (g *gauge) newSeries(labelValueCombo *LabelValueCombo, value float64) *gaugeSeries { + lbls := labelValueCombo.getLabelPair() + lb := labels.NewBuilder(make(labels.Labels, 1+len(lbls.names)+len(g.externalLabels))) + + for i, name := range lbls.names { + lb.Set(name, lbls.values[i]) + } + + for name, value := range g.externalLabels { + lb.Set(name, value) + } + + lb.Set(labels.MetricName, g.metricName) + return &gaugeSeries{ - labels: labelValueCombo.getLabelPair(), + labels: lb.Labels(), value: atomic.NewFloat64(value), lastUpdated: atomic.NewInt64(time.Now().UnixMilli()), } @@ -127,46 +142,19 @@ func (g *gauge) name() string { return g.metricName } -func (g *gauge) collectMetrics(appender storage.Appender, timeMs int64, externalLabels map[string]string) (activeSeries int, err error) { +func (g *gauge) collectMetrics(appender storage.Appender, timeMs int64) (activeSeries int, err error) { g.seriesMtx.RLock() defer g.seriesMtx.RUnlock() activeSeries = len(g.series) - labelsCount := 0 - if activeSeries > 0 && g.series[0] != nil { - labelsCount = len(g.series[0].labels.names) - } - - // base labels - baseLabels := make(labels.Labels, 1+len(externalLabels)+labelsCount) - - // add metric name - baseLabels = append(baseLabels, labels.Label{Name: labels.MetricName, Value: g.metricName}) - - // add external labels - for name, value := range externalLabels { - baseLabels = append(baseLabels, labels.Label{Name: name, Value: value}) - } - - lb := labels.NewBuilder(baseLabels) - for _, s := range g.series { t := time.UnixMilli(timeMs) - - // reset labels for every series - lb.Reset(baseLabels) - - // set series-specific labels - for i, name := range s.labels.names { - lb.Set(name, s.labels.values[i]) - } - - _, err = appender.Append(0, lb.Labels(), t.UnixMilli(), s.value.Load()) + _, err = appender.Append(0, s.labels, t.UnixMilli(), s.value.Load()) if err != nil { return } - // TODO support exemplars + // TODO: support exemplars } return diff --git a/modules/generator/registry/gauge_test.go b/modules/generator/registry/gauge_test.go index f5124f91564..69d43fead43 100644 --- a/modules/generator/registry/gauge_test.go +++ b/modules/generator/registry/gauge_test.go @@ -17,7 +17,7 @@ func Test_gaugeInc(t *testing.T) { return true } - c := newGauge("my_gauge", onAdd, nil) + c := newGauge("my_gauge", onAdd, nil, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) @@ -29,7 +29,7 @@ func Test_gaugeInc(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-3"}), 3.0) @@ -42,7 +42,7 @@ func Test_gaugeInc(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 4), newSample(map[string]string{"__name__": "my_gauge", "label": "value-3"}, collectionTimeMs, 3), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 3, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 3, expectedSamples, nil) } func TestGaugeDifferentLabels(t *testing.T) { @@ -52,7 +52,7 @@ func TestGaugeDifferentLabels(t *testing.T) { return true } - c := newGauge("my_gauge", onAdd, nil) + c := newGauge("my_gauge", onAdd, nil, nil) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"another_label"}, []string{"another_value"}), 2.0) @@ -64,7 +64,7 @@ func TestGaugeDifferentLabels(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "another_label": "another_value"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_gaugeSet(t *testing.T) { @@ -74,7 +74,7 @@ func Test_gaugeSet(t *testing.T) { return true } - c := newGauge("my_gauge", onAdd, nil) + c := newGauge("my_gauge", onAdd, nil, nil) c.Set(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Set(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) @@ -86,7 +86,7 @@ func Test_gaugeSet(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) c.Set(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) c.Set(newLabelValueCombo([]string{"label"}, []string{"value-3"}), 3.0) @@ -99,7 +99,7 @@ func Test_gaugeSet(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 2), newSample(map[string]string{"__name__": "my_gauge", "label": "value-3"}, collectionTimeMs, 3), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 3, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 3, expectedSamples, nil) } func Test_gauge_cantAdd(t *testing.T) { @@ -109,7 +109,7 @@ func Test_gauge_cantAdd(t *testing.T) { return canAdd } - c := newGauge("my_gauge", onAdd, nil) + c := newGauge("my_gauge", onAdd, nil, nil) // allow adding new series canAdd = true @@ -122,7 +122,7 @@ func Test_gauge_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) // block new series - existing series can still be updated canAdd = false @@ -135,7 +135,7 @@ func Test_gauge_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 4), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_gauge_removeStaleSeries(t *testing.T) { @@ -145,7 +145,7 @@ func Test_gauge_removeStaleSeries(t *testing.T) { removedSeries++ } - c := newGauge("my_gauge", nil, onRemove) + c := newGauge("my_gauge", nil, onRemove, nil) timeMs := time.Now().UnixMilli() c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) @@ -160,7 +160,7 @@ func Test_gauge_removeStaleSeries(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) time.Sleep(10 * time.Millisecond) timeMs = time.Now().UnixMilli() @@ -176,11 +176,11 @@ func Test_gauge_removeStaleSeries(t *testing.T) { expectedSamples = []sample{ newSample(map[string]string{"__name__": "my_gauge", "label": "value-2"}, collectionTimeMs, 4), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 1, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 1, expectedSamples, nil) } func Test_gauge_externalLabels(t *testing.T) { - c := newGauge("my_gauge", nil, nil) + c := newGauge("my_gauge", nil, nil, map[string]string{"external_label": "external_value"}) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0) c.Inc(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.0) @@ -190,11 +190,11 @@ func Test_gauge_externalLabels(t *testing.T) { newSample(map[string]string{"__name__": "my_gauge", "label": "value-1", "external_label": "external_value"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_gauge", "label": "value-2", "external_label": "external_value"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, c, collectionTimeMs, map[string]string{"external_label": "external_value"}, 2, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 2, expectedSamples, nil) } func Test_gauge_concurrencyDataRace(t *testing.T) { - c := newGauge("my_gauge", nil, nil) + c := newGauge("my_gauge", nil, nil, nil) end := make(chan struct{}) @@ -227,7 +227,7 @@ func Test_gauge_concurrencyDataRace(t *testing.T) { }) go accessor(func() { - _, err := c.collectMetrics(&noopAppender{}, 0, nil) + _, err := c.collectMetrics(&noopAppender{}, 0) assert.NoError(t, err) }) @@ -240,7 +240,7 @@ func Test_gauge_concurrencyDataRace(t *testing.T) { } func Test_gauge_concurrencyCorrectness(t *testing.T) { - c := newGauge("my_gauge", nil, nil) + c := newGauge("my_gauge", nil, nil, nil) var wg sync.WaitGroup end := make(chan struct{}) @@ -272,5 +272,5 @@ func Test_gauge_concurrencyCorrectness(t *testing.T) { expectedSamples := []sample{ newSample(map[string]string{"__name__": "my_gauge", "label": "value-1"}, collectionTimeMs, float64(totalCount.Load())), } - collectMetricAndAssert(t, c, collectionTimeMs, nil, 1, expectedSamples, nil) + collectMetricAndAssert(t, c, collectionTimeMs, 1, expectedSamples, nil) } diff --git a/modules/generator/registry/histogram.go b/modules/generator/registry/histogram.go index 94a1844d8e5..3b028e329e5 100644 --- a/modules/generator/registry/histogram.go +++ b/modules/generator/registry/histogram.go @@ -17,12 +17,13 @@ import ( var _ metric = (*histogram)(nil) type histogram struct { - metricName string - nameCount string - nameSum string - nameBucket string - buckets []float64 - bucketLabels []string + metricName string + nameCount string + nameSum string + nameBucket string + buckets []float64 + bucketLabels []string + externalLabels map[string]string seriesMtx sync.Mutex series map[uint64]*histogramSeries @@ -34,10 +35,12 @@ type histogram struct { } type histogramSeries struct { - // labelValueCombo should not be modified after creation - labels LabelPair - count *atomic.Float64 - sum *atomic.Float64 + countLabels labels.Labels + sumLabels labels.Labels + bucketLabels []labels.Labels + + count *atomic.Float64 + sum *atomic.Float64 // buckets includes the +Inf bucket buckets []*atomic.Float64 // exemplar is stored as a single traceID @@ -64,7 +67,7 @@ var ( _ metric = (*histogram)(nil) ) -func newHistogram(name string, buckets []float64, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), traceIDLabelName string) *histogram { +func newHistogram(name string, buckets []float64, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), traceIDLabelName string, externalLabels map[string]string) *histogram { if onAddSeries == nil { onAddSeries = func(uint32) bool { return true @@ -97,6 +100,7 @@ func newHistogram(name string, buckets []float64, onAddSeries func(uint32) bool, onAddSerie: onAddSeries, onRemoveSerie: onRemoveSeries, traceIDLabelName: traceIDLabelName, + externalLabels: externalLabels, } } @@ -121,13 +125,13 @@ func (h *histogram) ObserveWithExemplar(labelValueCombo *LabelValueCombo, value func (h *histogram) newSeries(labelValueCombo *LabelValueCombo, value float64, traceID string, multiplier float64) *histogramSeries { newSeries := &histogramSeries{ - labels: labelValueCombo.getLabelPair(), - count: atomic.NewFloat64(0), - sum: atomic.NewFloat64(0), - buckets: nil, - exemplars: nil, - lastUpdated: atomic.NewInt64(0), - firstSeries: atomic.NewBool(true), + count: atomic.NewFloat64(0), + sum: atomic.NewFloat64(0), + buckets: make([]*atomic.Float64, 0, len(h.buckets)), + exemplars: make([]*atomic.String, 0, len(h.buckets)), + exemplarValues: make([]*atomic.Float64, 0, len(h.buckets)), + lastUpdated: atomic.NewInt64(0), + firstSeries: atomic.NewBool(true), } for i := 0; i < len(h.buckets); i++ { newSeries.buckets = append(newSeries.buckets, atomic.NewFloat64(0)) @@ -135,6 +139,33 @@ func (h *histogram) newSeries(labelValueCombo *LabelValueCombo, value float64, t newSeries.exemplarValues = append(newSeries.exemplarValues, atomic.NewFloat64(0)) } + // Precompute all labels for all sub-metrics upfront + + // Create and populate label builder + lbls := labelValueCombo.getLabelPair() + lb := labels.NewBuilder(make(labels.Labels, 1+len(lbls.names))) + for i, name := range lbls.names { + lb.Set(name, lbls.values[i]) + } + for name, value := range h.externalLabels { + lb.Set(name, value) + } + + // _count + lb.Set(labels.MetricName, h.nameCount) + newSeries.countLabels = lb.Labels() + + // _sum + lb.Set(labels.MetricName, h.nameSum) + newSeries.sumLabels = lb.Labels() + + // _bucket + lb.Set(labels.MetricName, h.nameBucket) + for _, b := range h.bucketLabels { + lb.Set(labels.BucketLabel, b) + newSeries.bucketLabels = append(newSeries.bucketLabels, lb.Labels()) + } + h.updateSeries(newSeries, value, traceID, multiplier) return newSeries @@ -161,38 +192,20 @@ func (h *histogram) name() string { return h.metricName } -func (h *histogram) collectMetrics(appender storage.Appender, timeMs int64, externalLabels map[string]string) (activeSeries int, err error) { +func (h *histogram) collectMetrics(appender storage.Appender, timeMs int64) (activeSeries int, err error) { h.seriesMtx.Lock() defer h.seriesMtx.Unlock() activeSeries = len(h.series) * int(h.activeSeriesPerHistogramSerie()) - labelsCount := 0 - if activeSeries > 0 && h.series[0] != nil { - labelsCount = len(h.series[0].labels.names) - } - lbls := make(labels.Labels, 1+len(externalLabels)+labelsCount) - lb := labels.NewBuilder(lbls) - - // set external labels - for name, value := range externalLabels { - lb.Set(name, value) - } - for _, s := range h.series { - // set series-specific labels - for i, name := range s.labels.names { - lb.Set(name, s.labels.values[i]) - } - // If we are about to call Append for the first time on a series, // we need to first insert a 0 value to allow Prometheus to start from a non-null value. if s.isNew() { - lb.Set(labels.MetricName, h.nameCount) // We set the timestamp of the init serie at the end of the previous minute, that way we ensure it ends in a // different aggregation interval to avoid be downsampled. endOfLastMinuteMs := getEndOfLastMinuteMs(timeMs) - _, err = appender.Append(0, lb.Labels(), endOfLastMinuteMs, 0) + _, err = appender.Append(0, s.countLabels, endOfLastMinuteMs, 0) if err != nil { return } @@ -200,32 +213,27 @@ func (h *histogram) collectMetrics(appender storage.Appender, timeMs int64, exte } // sum - lb.Set(labels.MetricName, h.nameSum) - _, err = appender.Append(0, lb.Labels(), timeMs, s.sum.Load()) + _, err = appender.Append(0, s.sumLabels, timeMs, s.sum.Load()) if err != nil { return } // count - lb.Set(labels.MetricName, h.nameCount) - _, err = appender.Append(0, lb.Labels(), timeMs, s.count.Load()) + _, err = appender.Append(0, s.countLabels, timeMs, s.count.Load()) if err != nil { return } // bucket - lb.Set(labels.MetricName, h.nameBucket) - - for i, bucketLabel := range h.bucketLabels { - lb.Set(labels.BucketLabel, bucketLabel) - ref, err := appender.Append(0, lb.Labels(), timeMs, s.buckets[i].Load()) + for i := range h.bucketLabels { + ref, err := appender.Append(0, s.bucketLabels[i], timeMs, s.buckets[i].Load()) if err != nil { return activeSeries, err } ex := s.exemplars[i].Load() if ex != "" { - _, err = appender.AppendExemplar(ref, lb.Labels(), exemplar.Exemplar{ + _, err = appender.AppendExemplar(ref, s.bucketLabels[i], exemplar.Exemplar{ Labels: []labels.Label{{ Name: h.traceIDLabelName, Value: ex, @@ -240,8 +248,6 @@ func (h *histogram) collectMetrics(appender storage.Appender, timeMs int64, exte // clear the exemplar so we don't emit it again s.exemplars[i].Store("") } - - lb.Del(labels.BucketLabel) } return diff --git a/modules/generator/registry/histogram_test.go b/modules/generator/registry/histogram_test.go index efbff0a266b..641b7bc647a 100644 --- a/modules/generator/registry/histogram_test.go +++ b/modules/generator/registry/histogram_test.go @@ -19,7 +19,7 @@ func Test_histogram(t *testing.T) { return true } - h := newHistogram("my_histogram", []float64{1.0, 2.0}, onAdd, nil, "trace_id") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, onAdd, nil, "trace_id", nil) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0, "trace-1", 1.0) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 1.5, "trace-2", 1.0) @@ -55,7 +55,7 @@ func Test_histogram(t *testing.T) { Ts: collectionTimeMs, }), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 10, expectedSamples, expectedExemplars) + collectMetricAndAssert(t, h, collectionTimeMs, 10, expectedSamples, expectedExemplars) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.5, "trace-2.2", 1.0) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-3"}), 3.0, "trace-3", 1.0) @@ -94,7 +94,7 @@ func Test_histogram(t *testing.T) { Ts: collectionTimeMs, }), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 15, expectedSamples, expectedExemplars) + collectMetricAndAssert(t, h, collectionTimeMs, 15, expectedSamples, expectedExemplars) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 2.5, "trace-2.2", 20.0) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-3"}), 3.0, "trace-3", 13.5) @@ -137,7 +137,7 @@ func Test_histogram(t *testing.T) { Ts: collectionTimeMs, }), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 15, expectedSamples, expectedExemplars) + collectMetricAndAssert(t, h, collectionTimeMs, 15, expectedSamples, expectedExemplars) } func Test_histogram_cantAdd(t *testing.T) { @@ -147,7 +147,7 @@ func Test_histogram_cantAdd(t *testing.T) { return canAdd } - h := newHistogram("my_histogram", []float64{1.0, 2.0}, onAdd, nil, "") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, onAdd, nil, "", nil) // allow adding new series canAdd = true @@ -171,7 +171,7 @@ func Test_histogram_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "2"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "+Inf"}, collectionTimeMs, 1), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 10, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 10, expectedSamples, nil) // block new series - existing series can still be updated canAdd = false @@ -192,7 +192,7 @@ func Test_histogram_cantAdd(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "2"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "+Inf"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 10, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 10, expectedSamples, nil) } func Test_histogram_removeStaleSeries(t *testing.T) { @@ -202,7 +202,7 @@ func Test_histogram_removeStaleSeries(t *testing.T) { removedSeries++ } - h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, onRemove, "") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, onRemove, "", nil) timeMs := time.Now().UnixMilli() h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0, "", 1.0) @@ -228,7 +228,7 @@ func Test_histogram_removeStaleSeries(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "2"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "+Inf"}, collectionTimeMs, 1), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 10, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 10, expectedSamples, nil) time.Sleep(10 * time.Millisecond) timeMs = time.Now().UnixMilli() @@ -248,11 +248,13 @@ func Test_histogram_removeStaleSeries(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "2"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "+Inf"}, collectionTimeMs, 2), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 5, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 5, expectedSamples, nil) } func Test_histogram_externalLabels(t *testing.T) { - h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "") + extLabels := map[string]string{"external_label": "external_value"} + + h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "", extLabels) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0, "", 1.0) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-2"}), 1.5, "", 1.0) @@ -273,11 +275,11 @@ func Test_histogram_externalLabels(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "2", "external_label": "external_value"}, collectionTimeMs, 1), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-2", "le": "+Inf", "external_label": "external_value"}, collectionTimeMs, 1), } - collectMetricAndAssert(t, h, collectionTimeMs, map[string]string{"external_label": "external_value"}, 10, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 10, expectedSamples, nil) } func Test_histogram_concurrencyDataRace(t *testing.T) { - h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "", nil) end := make(chan struct{}) @@ -310,7 +312,7 @@ func Test_histogram_concurrencyDataRace(t *testing.T) { }) go accessor(func() { - _, err := h.collectMetrics(&noopAppender{}, 0, nil) + _, err := h.collectMetrics(&noopAppender{}, 0) assert.NoError(t, err) }) @@ -323,7 +325,7 @@ func Test_histogram_concurrencyDataRace(t *testing.T) { } func Test_histogram_concurrencyCorrectness(t *testing.T) { - h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "", nil) var wg sync.WaitGroup end := make(chan struct{}) @@ -361,11 +363,11 @@ func Test_histogram_concurrencyCorrectness(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-1", "le": "2"}, collectionTimeMs, float64(totalCount.Load())), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-1", "le": "+Inf"}, collectionTimeMs, float64(totalCount.Load())), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 5, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 5, expectedSamples, nil) } func Test_histogram_span_multiplier(t *testing.T) { - h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "") + h := newHistogram("my_histogram", []float64{1.0, 2.0}, nil, nil, "", nil) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 1.0, "", 1.5) h.ObserveWithExemplar(newLabelValueCombo([]string{"label"}, []string{"value-1"}), 2.0, "", 5) @@ -379,5 +381,5 @@ func Test_histogram_span_multiplier(t *testing.T) { newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-1", "le": "2"}, collectionTimeMs, 6.5), newSample(map[string]string{"__name__": "my_histogram_bucket", "label": "value-1", "le": "+Inf"}, collectionTimeMs, 6.5), } - collectMetricAndAssert(t, h, collectionTimeMs, nil, 5, expectedSamples, nil) + collectMetricAndAssert(t, h, collectionTimeMs, 5, expectedSamples, nil) } diff --git a/modules/generator/registry/native_histogram.go b/modules/generator/registry/native_histogram.go index 95596f6f315..2846115d245 100644 --- a/modules/generator/registry/native_histogram.go +++ b/modules/generator/registry/native_histogram.go @@ -1,6 +1,7 @@ package registry import ( + "fmt" "math" "sync" "time" @@ -39,11 +40,19 @@ type nativeHistogram struct { // generate. A diff in the configured value on the processors will cause a // reload of the process, and a new instance of the histogram to be created. histogramOverride HistogramMode + + externalLabels map[string]string + + // classic + nameCount string + nameSum string + nameBucket string } type nativeHistogramSeries struct { // labels should not be modified after creation - labels LabelPair + lb *labels.Builder + labels labels.Labels promHistogram prometheus.Histogram lastUpdated int64 histogram *dto.Histogram @@ -53,6 +62,11 @@ type nativeHistogramSeries struct { // This avoids Prometheus throwing away the first value in the series, // due to the transition from null -> x. firstSeries *atomic.Bool + + // classic + countLabels labels.Labels + sumLabels labels.Labels + // bucketLabels []labels.Labels } func (hs *nativeHistogramSeries) isNew() bool { @@ -68,7 +82,7 @@ var ( _ metric = (*nativeHistogram)(nil) ) -func newNativeHistogram(name string, buckets []float64, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), traceIDLabelName string, histogramOverride HistogramMode) *nativeHistogram { +func newNativeHistogram(name string, buckets []float64, onAddSeries func(uint32) bool, onRemoveSeries func(count uint32), traceIDLabelName string, histogramOverride HistogramMode, externalLabels map[string]string) *nativeHistogram { if onAddSeries == nil { onAddSeries = func(uint32) bool { return true @@ -90,6 +104,12 @@ func newNativeHistogram(name string, buckets []float64, onAddSeries func(uint32) traceIDLabelName: traceIDLabelName, buckets: buckets, histogramOverride: histogramOverride, + externalLabels: externalLabels, + + // classic + nameCount: fmt.Sprintf("%s_count", name), + nameSum: fmt.Sprintf("%s_sum", name), + nameBucket: fmt.Sprintf("%s_bucket", name), } } @@ -109,19 +129,15 @@ func (h *nativeHistogram) ObserveWithExemplar(labelValueCombo *LabelValueCombo, return } - newSeries := h.newSeries(labelValueCombo, value, traceID, multiplier) - h.series[hash] = newSeries + h.series[hash] = h.newSeries(labelValueCombo, value, traceID, multiplier) } func (h *nativeHistogram) newSeries(labelValueCombo *LabelValueCombo, value float64, traceID string, multiplier float64) *nativeHistogramSeries { newSeries := &nativeHistogramSeries{ - // TODO move these labels in HistogramOpts.ConstLabels? - labels: labelValueCombo.getLabelPair(), promHistogram: prometheus.NewHistogram(prometheus.HistogramOpts{ - Name: h.name(), - Help: "Native histogram for metric " + h.name(), - Buckets: h.buckets, - // TODO check if these values are sensible and break them out + Name: h.name(), + Help: "Native histogram for metric " + h.name(), + Buckets: h.buckets, NativeHistogramBucketFactor: 1.1, NativeHistogramMaxBucketNumber: 100, NativeHistogramMinResetDuration: 15 * time.Minute, @@ -132,6 +148,31 @@ func (h *nativeHistogram) newSeries(labelValueCombo *LabelValueCombo, value floa h.updateSeries(newSeries, value, traceID, multiplier) + lbls := labelValueCombo.getLabelPair() + lb := labels.NewBuilder(make(labels.Labels, 1+len(lbls.names))) + + // set series labels + for i, name := range lbls.names { + lb.Set(name, lbls.values[i]) + } + // set external labels + for name, value := range h.externalLabels { + lb.Set(name, value) + } + + lb.Set(labels.MetricName, h.metricName) + + newSeries.labels = lb.Labels() + newSeries.lb = lb + + // _count + lb.Set(labels.MetricName, h.nameCount) + newSeries.countLabels = lb.Labels() + + // _sum + lb.Set(labels.MetricName, h.nameSum) + newSeries.sumLabels = lb.Labels() + return newSeries } @@ -149,28 +190,13 @@ func (h *nativeHistogram) name() string { return h.metricName } -func (h *nativeHistogram) collectMetrics(appender storage.Appender, timeMs int64, externalLabels map[string]string) (activeSeries int, err error) { +func (h *nativeHistogram) collectMetrics(appender storage.Appender, timeMs int64) (activeSeries int, err error) { h.seriesMtx.Lock() defer h.seriesMtx.Unlock() - lbls := make(labels.Labels, 1+len(externalLabels)) - lb := labels.NewBuilder(lbls) activeSeries = 0 - lb.Set(labels.MetricName, h.metricName) - - // set external labels - for name, value := range externalLabels { - lb.Set(name, value) - } - for _, s := range h.series { - - // Set series-specific labels - for i, name := range s.labels.names { - lb.Set(name, s.labels.values[i]) - } - // Extract histogram encodedMetric := &dto.Metric{} @@ -180,14 +206,15 @@ func (h *nativeHistogram) collectMetrics(appender storage.Appender, timeMs int64 return activeSeries, err } - // NOTE: Store the encoded histogram here so we can keep track of the exemplars - // that have been sent. The value is updated here, but the pointers remain - // the same, and so Reset() call below can be used to clear the exemplars. + // NOTE: Store the encoded histogram here so we can keep track of the + // exemplars that have been sent. The value is updated here, but the + // pointers remain the same, and so Reset() call below can be used to clear + // the exemplars. s.histogram = encodedMetric.GetHistogram() // If we are in "both" or "classic" mode, also emit classic histograms. if hasClassicHistograms(h.histogramOverride) { - classicSeries, classicErr := h.classicHistograms(appender, lb, timeMs, s) + classicSeries, classicErr := h.classicHistograms(appender, timeMs, s) if classicErr != nil { return activeSeries, classicErr } @@ -196,7 +223,7 @@ func (h *nativeHistogram) collectMetrics(appender storage.Appender, timeMs int64 // If we are in "both" or "native" mode, also emit native histograms. if hasNativeHistograms(h.histogramOverride) { - nativeErr := h.nativeHistograms(appender, lb, timeMs, s) + nativeErr := h.nativeHistograms(appender, s.labels, timeMs, s) if nativeErr != nil { return activeSeries, nativeErr } @@ -215,7 +242,7 @@ func (h *nativeHistogram) collectMetrics(appender storage.Appender, timeMs int64 Ts: convertTimestampToMs(encodedExemplar.GetTimestamp()), HasTs: true, } - _, err = appender.AppendExemplar(0, lb.Labels(), e) + _, err = appender.AppendExemplar(0, s.labels, e) if err != nil { return activeSeries, err } @@ -243,7 +270,7 @@ func (h *nativeHistogram) activeSeriesPerHistogramSerie() uint32 { return 1 } -func (h *nativeHistogram) nativeHistograms(appender storage.Appender, lb *labels.Builder, timeMs int64, s *nativeHistogramSeries) (err error) { +func (h *nativeHistogram) nativeHistograms(appender storage.Appender, lbls labels.Labels, timeMs int64, s *nativeHistogramSeries) (err error) { // Decode to Prometheus representation hist := promhistogram.Histogram{ Schema: s.histogram.GetSchema(), @@ -273,8 +300,7 @@ func (h *nativeHistogram) nativeHistograms(appender storage.Appender, lb *labels } hist.NegativeBuckets = s.histogram.NegativeDelta - lb.Set(labels.MetricName, h.metricName) - _, err = appender.AppendHistogram(0, lb.Labels(), timeMs, &hist, nil) + _, err = appender.AppendHistogram(0, lbls, timeMs, &hist, nil) if err != nil { return err } @@ -282,11 +308,10 @@ func (h *nativeHistogram) nativeHistograms(appender storage.Appender, lb *labels return } -func (h *nativeHistogram) classicHistograms(appender storage.Appender, lb *labels.Builder, timeMs int64, s *nativeHistogramSeries) (activeSeries int, err error) { +func (h *nativeHistogram) classicHistograms(appender storage.Appender, timeMs int64, s *nativeHistogramSeries) (activeSeries int, err error) { if s.isNew() { - lb.Set(labels.MetricName, h.metricName+"_count") endOfLastMinuteMs := getEndOfLastMinuteMs(timeMs) - _, err = appender.Append(0, lb.Labels(), endOfLastMinuteMs, 0) + _, err = appender.Append(0, s.countLabels, endOfLastMinuteMs, 0) if err != nil { return activeSeries, err } @@ -294,23 +319,21 @@ func (h *nativeHistogram) classicHistograms(appender storage.Appender, lb *label } // sum - lb.Set(labels.MetricName, h.metricName+"_sum") - _, err = appender.Append(0, lb.Labels(), timeMs, s.histogram.GetSampleSum()) + _, err = appender.Append(0, s.sumLabels, timeMs, s.histogram.GetSampleSum()) if err != nil { return activeSeries, err } activeSeries++ // count - lb.Set(labels.MetricName, h.metricName+"_count") - _, err = appender.Append(0, lb.Labels(), timeMs, getIfGreaterThenZeroOr(s.histogram.GetSampleCountFloat(), s.histogram.GetSampleCount())) + _, err = appender.Append(0, s.countLabels, timeMs, getIfGreaterThenZeroOr(s.histogram.GetSampleCountFloat(), s.histogram.GetSampleCount())) if err != nil { return activeSeries, err } activeSeries++ // bucket - lb.Set(labels.MetricName, h.metricName+"_bucket") + s.lb.Set(labels.MetricName, h.metricName+"_bucket") // the Prometheus histogram will sometimes add the +Inf bucket, it depends on whether there is an exemplar // for that bucket or not. To avoid adding it twice, keep track of it with this boolean. @@ -318,21 +341,20 @@ func (h *nativeHistogram) classicHistograms(appender storage.Appender, lb *label for _, bucket := range s.histogram.Bucket { // add "le" label - lb.Set(labels.BucketLabel, formatFloat(bucket.GetUpperBound())) + s.lb.Set(labels.BucketLabel, formatFloat(bucket.GetUpperBound())) if bucket.GetUpperBound() == math.Inf(1) { infBucketWasAdded = true } - ref, appendErr := appender.Append(0, lb.Labels(), timeMs, getIfGreaterThenZeroOr(bucket.GetCumulativeCountFloat(), bucket.GetCumulativeCount())) + ref, appendErr := appender.Append(0, s.lb.Labels(), timeMs, getIfGreaterThenZeroOr(bucket.GetCumulativeCountFloat(), bucket.GetCumulativeCount())) if appendErr != nil { return activeSeries, appendErr } activeSeries++ if bucket.Exemplar != nil && len(bucket.Exemplar.Label) > 0 { - // TODO are we appending the same exemplar twice? - _, err = appender.AppendExemplar(ref, lb.Labels(), exemplar.Exemplar{ + _, err = appender.AppendExemplar(ref, s.lb.Labels(), exemplar.Exemplar{ Labels: convertLabelPairToLabels(bucket.Exemplar.GetLabel()), Value: bucket.Exemplar.GetValue(), Ts: timeMs, @@ -346,9 +368,9 @@ func (h *nativeHistogram) classicHistograms(appender storage.Appender, lb *label if !infBucketWasAdded { // Add +Inf bucket - lb.Set(labels.BucketLabel, "+Inf") + s.lb.Set(labels.BucketLabel, "+Inf") - _, err = appender.Append(0, lb.Labels(), timeMs, getIfGreaterThenZeroOr(s.histogram.GetSampleCountFloat(), s.histogram.GetSampleCount())) + _, err = appender.Append(0, s.lb.Labels(), timeMs, getIfGreaterThenZeroOr(s.histogram.GetSampleCountFloat(), s.histogram.GetSampleCount())) if err != nil { return activeSeries, err } @@ -356,7 +378,7 @@ func (h *nativeHistogram) classicHistograms(appender storage.Appender, lb *label } // drop "le" label again - lb.Del(labels.BucketLabel) + s.lb.Del(labels.BucketLabel) return } diff --git a/modules/generator/registry/native_histogram_test.go b/modules/generator/registry/native_histogram_test.go index 11e2c493184..2f84158ca6f 100644 --- a/modules/generator/registry/native_histogram_test.go +++ b/modules/generator/registry/native_histogram_test.go @@ -20,7 +20,7 @@ func Test_ObserveWithExemplar_duplicate(t *testing.T) { return true } - h := newNativeHistogram("my_histogram", []float64{0.1, 0.2}, onAdd, nil, "trace_id", HistogramModeBoth) + h := newNativeHistogram("my_histogram", []float64{0.1, 0.2}, onAdd, nil, "trace_id", HistogramModeBoth, nil) lv := newLabelValueCombo([]string{"label"}, []string{"value-1"}) @@ -454,7 +454,7 @@ func Test_Histograms(t *testing.T) { t.Run(tc.name, func(t *testing.T) { t.Run("classic", func(t *testing.T) { onAdd := func(uint32) bool { return true } - h := newHistogram("test_histogram", tc.buckets, onAdd, nil, "trace_id") + h := newHistogram("test_histogram", tc.buckets, onAdd, nil, "trace_id", nil) testHistogram(t, h, tc.collections) }) t.Run("native", func(t *testing.T) { @@ -463,7 +463,7 @@ func Test_Histograms(t *testing.T) { } onAdd := func(uint32) bool { return true } - h := newNativeHistogram("test_histogram", tc.buckets, onAdd, nil, "trace_id", HistogramModeBoth) + h := newNativeHistogram("test_histogram", tc.buckets, onAdd, nil, "trace_id", HistogramModeBoth, nil) testHistogram(t, h, tc.collections) }) }) @@ -471,7 +471,7 @@ func Test_Histograms(t *testing.T) { } func collectMetricsAndAssertSeries(t *testing.T, m metric, collectionTimeMs int64, expectedSeries int, appender storage.Appender) { - activeSeries, err := m.collectMetrics(appender, collectionTimeMs, nil) + activeSeries, err := m.collectMetrics(appender, collectionTimeMs) require.NoError(t, err) require.Equal(t, expectedSeries, activeSeries) } diff --git a/modules/generator/registry/registry.go b/modules/generator/registry/registry.go index cb33d6a0d6c..2910fcf9f24 100644 --- a/modules/generator/registry/registry.go +++ b/modules/generator/registry/registry.go @@ -83,7 +83,7 @@ type ManagedRegistry struct { // metric is the interface for a metric that is managed by ManagedRegistry. type metric interface { name() string - collectMetrics(appender storage.Appender, timeMs int64, externalLabels map[string]string) (activeSeries int, err error) + collectMetrics(appender storage.Appender, timeMs int64) (activeSeries int, err error) removeStaleSeries(staleTimeMs int64) } @@ -130,7 +130,7 @@ func New(cfg *Config, overrides Overrides, tenant string, appendable storage.App metricFailedCollections: metricFailedCollections.WithLabelValues(tenant), } - go job(instanceCtx, r.collectMetrics, r.collectionInterval) + go job(instanceCtx, r.CollectMetrics, r.collectionInterval) go job(instanceCtx, r.removeStaleSeries, constantInterval(5*time.Minute)) return r @@ -144,7 +144,7 @@ func (r *ManagedRegistry) NewLabelValueCombo(labels []string, values []string) * } func (r *ManagedRegistry) NewCounter(name string) Counter { - c := newCounter(name, r.onAddMetricSeries, r.onRemoveMetricSeries) + c := newCounter(name, r.onAddMetricSeries, r.onRemoveMetricSeries, r.externalLabels) r.registerMetric(c) return c } @@ -156,9 +156,9 @@ func (r *ManagedRegistry) NewHistogram(name string, buckets []float64, histogram // are disabled, eventually the new implementation can handle all cases if hasNativeHistograms(histogramOverride) { - h = newNativeHistogram(name, buckets, r.onAddMetricSeries, r.onRemoveMetricSeries, traceIDLabelName, histogramOverride) + h = newNativeHistogram(name, buckets, r.onAddMetricSeries, r.onRemoveMetricSeries, traceIDLabelName, histogramOverride, r.externalLabels) } else { - h = newHistogram(name, buckets, r.onAddMetricSeries, r.onRemoveMetricSeries, traceIDLabelName) + h = newHistogram(name, buckets, r.onAddMetricSeries, r.onRemoveMetricSeries, traceIDLabelName, r.externalLabels) } r.registerMetric(h) @@ -166,7 +166,7 @@ func (r *ManagedRegistry) NewHistogram(name string, buckets []float64, histogram } func (r *ManagedRegistry) NewGauge(name string) Gauge { - g := newGauge(name, r.onAddMetricSeries, r.onRemoveMetricSeries) + g := newGauge(name, r.onAddMetricSeries, r.onRemoveMetricSeries, r.externalLabels) r.registerMetric(g) return g } @@ -203,7 +203,7 @@ func (r *ManagedRegistry) onRemoveMetricSeries(count uint32) { r.metricActiveSeries.Sub(float64(count)) } -func (r *ManagedRegistry) collectMetrics(ctx context.Context) { +func (r *ManagedRegistry) CollectMetrics(ctx context.Context) { if r.overrides.MetricsGeneratorDisableCollection(r.tenant) { return } @@ -226,7 +226,7 @@ func (r *ManagedRegistry) collectMetrics(ctx context.Context) { collectionTimeMs := time.Now().UnixMilli() for _, m := range r.metrics { - active, err := m.collectMetrics(appender, collectionTimeMs, r.externalLabels) + active, err := m.collectMetrics(appender, collectionTimeMs) if err != nil { return } diff --git a/modules/generator/registry/registry_test.go b/modules/generator/registry/registry_test.go index f97f9ff3aa1..984323847a7 100644 --- a/modules/generator/registry/registry_test.go +++ b/modules/generator/registry/registry_test.go @@ -46,7 +46,7 @@ func TestManagedRegistry_concurrency(*testing.T) { }) go accessor(func() { - registry.collectMetrics(context.Background()) + registry.CollectMetrics(context.Background()) }) go accessor(func() { @@ -214,7 +214,7 @@ func TestManagedRegistry_disableCollection(t *testing.T) { // active series are still tracked assert.Equal(t, uint32(1), registry.activeSeries.Load()) // but no samples are collected and sent out - registry.collectMetrics(context.Background()) + registry.CollectMetrics(context.Background()) assert.Empty(t, appender.samples) assert.Empty(t, appender.exemplars) } @@ -296,7 +296,7 @@ func TestHistogramOverridesConfig(t *testing.T) { func collectRegistryMetricsAndAssert(t *testing.T, r *ManagedRegistry, appender *capturingAppender, expectedSamples []sample) { collectionTimeMs := time.Now().UnixMilli() - r.collectMetrics(context.Background()) + r.CollectMetrics(context.Background()) // Ignore the collection time on expected samples, since we won't know when the collection will actually take place. for i := range expectedSamples { diff --git a/modules/generator/registry/test.go b/modules/generator/registry/test.go index 1178894921b..1fa56140806 100644 --- a/modules/generator/registry/test.go +++ b/modules/generator/registry/test.go @@ -109,7 +109,7 @@ func (t *testCounter) name() string { return t.n } -func (t *testCounter) collectMetrics(_ storage.Appender, _ int64, _ map[string]string) (activeSeries int, err error) { +func (t *testCounter) collectMetrics(_ storage.Appender, _ int64) (activeSeries int, err error) { return } @@ -156,7 +156,7 @@ func (t *testGauge) name() string { return t.n } -func (t *testGauge) collectMetrics(_ storage.Appender, _ int64, _ map[string]string) (activeSeries int, err error) { +func (t *testGauge) collectMetrics(_ storage.Appender, _ int64) (activeSeries int, err error) { return 0, nil } @@ -206,7 +206,7 @@ func withLe(lbls labels.Labels, le float64) labels.Labels { return lb.Labels() } -func (t *testHistogram) collectMetrics(_ storage.Appender, _ int64, _ map[string]string) (activeSeries int, err error) { +func (t *testHistogram) collectMetrics(_ storage.Appender, _ int64) (activeSeries int, err error) { panic("implement me") } diff --git a/modules/generator/storage/instance.go b/modules/generator/storage/instance.go index d07e7d418ff..f05a4d4dc2e 100644 --- a/modules/generator/storage/instance.go +++ b/modules/generator/storage/instance.go @@ -74,7 +74,7 @@ func New(cfg *Config, o Overrides, tenant string, reg prometheus.Registerer, log // Create WAL directory with necessary permissions // This creates both // and //wal/. If we don't create the wal // subdirectory remote storage logs a scary error. - err = os.MkdirAll(filepath.Join(walDir, "wal"), 0o755) + err = os.MkdirAll(filepath.Join(walDir, "wal"), 0o700) if err != nil { return nil, fmt.Errorf("could not create directory for metrics WAL: %w", err) } diff --git a/modules/ingester/flush.go b/modules/ingester/flush.go index ebb39ec00cc..9bb3afd2291 100644 --- a/modules/ingester/flush.go +++ b/modules/ingester/flush.go @@ -176,7 +176,7 @@ func (i *Ingester) sweepInstance(instance *instance, immediate bool) { } if blockID != uuid.Nil { - level.Info(log.Logger).Log("msg", "head block cut. enqueueing flush op", "userid", instance.instanceID, "block", blockID) + level.Info(log.Logger).Log("msg", "head block cut. enqueueing flush op", "tenant", instance.instanceID, "block", blockID) // jitter to help when flushing many instances at the same time // no jitter if immediate (initiated via /flush handler for example) i.enqueue(&flushOp{ @@ -211,7 +211,7 @@ func (i *Ingester) flushLoop(j int) { var err error if op.kind == opKindComplete { - retry, err = i.handleComplete(op) + retry, err = i.handleComplete(context.Background(), op) } else { retry, err = i.handleFlush(context.Background(), op.userID, op.blockID) } @@ -243,7 +243,11 @@ func handleAbandonedOp(op *flushOp) { "op", op.kind, "block", op.blockID.String(), "attempts", op.attempts) } -func (i *Ingester) handleComplete(op *flushOp) (retry bool, err error) { +func (i *Ingester) handleComplete(ctx context.Context, op *flushOp) (retry bool, err error) { + ctx, sp := tracer.Start(ctx, "ingester.Complete", trace.WithAttributes(attribute.String("tenant", op.userID), attribute.String("blockID", op.blockID.String()))) + defer sp.End() + withSpan(level.Info(log.Logger), sp).Log("msg", "flushing block", "tenant", op.userID, "block", op.blockID.String()) + // No point in proceeding if shutdown has been initiated since // we won't be able to queue up the next flush op if i.flushQueues.IsStopped() { @@ -252,20 +256,20 @@ func (i *Ingester) handleComplete(op *flushOp) (retry bool, err error) { } start := time.Now() - level.Info(log.Logger).Log("msg", "completing block", "userid", op.userID, "blockID", op.blockID) + level.Info(log.Logger).Log("msg", "completing block", "tenant", op.userID, "blockID", op.blockID) instance, err := i.getOrCreateInstance(op.userID) if err != nil { return false, err } - err = instance.CompleteBlock(op.blockID) - level.Info(log.Logger).Log("msg", "block completed", "userid", op.userID, "blockID", op.blockID, "duration", time.Since(start)) + err = instance.CompleteBlock(ctx, op.blockID) + level.Info(log.Logger).Log("msg", "block completed", "tenant", op.userID, "blockID", op.blockID, "duration", time.Since(start)) if err != nil { handleFailedOp(op, err) if op.attempts >= maxCompleteAttempts { level.Error(log.WithUserID(op.userID, log.Logger)).Log("msg", "Block exceeded max completion errors. Deleting. POSSIBLE DATA LOSS", - "userID", op.userID, "attempts", op.attempts, "block", op.blockID.String()) + "tenant", op.userID, "attempts", op.attempts, "block", op.blockID.String()) // Delete WAL and move on err = instance.ClearCompletingBlock(op.blockID) @@ -306,9 +310,9 @@ func withSpan(logger gklog.Logger, sp trace.Span) gklog.Logger { } func (i *Ingester) handleFlush(ctx context.Context, userID string, blockID uuid.UUID) (retry bool, err error) { - ctx, sp := tracer.Start(ctx, "flush", trace.WithAttributes(attribute.String("organization", userID), attribute.String("blockID", blockID.String()))) + ctx, sp := tracer.Start(ctx, "ingester.Flush", trace.WithAttributes(attribute.String("tenant", userID), attribute.String("blockID", blockID.String()))) defer sp.End() - withSpan(level.Info(log.Logger), sp).Log("msg", "flushing block", "userid", userID, "block", blockID.String()) + withSpan(level.Info(log.Logger), sp).Log("msg", "flushing block", "tenant", userID, "block", blockID.String()) instance, err := i.getOrCreateInstance(userID) if err != nil { diff --git a/modules/ingester/ingester_test.go b/modules/ingester/ingester_test.go index 5ab3418a50e..ff986f55499 100644 --- a/modules/ingester/ingester_test.go +++ b/modules/ingester/ingester_test.go @@ -193,7 +193,7 @@ func TestWalDropsZeroLength(t *testing.T) { blockID, err := instance.CutBlockIfReady(0, 0, true) require.NoError(t, err) - err = instance.CompleteBlock(blockID) + err = instance.CompleteBlock(context.Background(), blockID) require.NoError(t, err) err = instance.ClearCompletingBlock(blockID) @@ -406,7 +406,7 @@ func TestDedicatedColumns(t *testing.T) { inst.blocksMtx.RUnlock() // Complete block - err = inst.CompleteBlock(blockID) + err = inst.CompleteBlock(context.Background(), blockID) require.NoError(t, err) // TODO: This check should be included as part of the read path diff --git a/modules/ingester/instance.go b/modules/ingester/instance.go index 0614a58d3cf..5d467e1e3fa 100644 --- a/modules/ingester/instance.go +++ b/modules/ingester/instance.go @@ -313,7 +313,7 @@ func (i *instance) CutBlockIfReady(maxBlockLifetime time.Duration, maxBlockBytes } // CompleteBlock moves a completingBlock to a completeBlock. The new completeBlock has the same ID. -func (i *instance) CompleteBlock(blockID uuid.UUID) error { +func (i *instance) CompleteBlock(ctx context.Context, blockID uuid.UUID) error { i.blocksMtx.Lock() var completingBlock common.WALBlock for _, iterBlock := range i.completingBlocks { @@ -328,8 +328,6 @@ func (i *instance) CompleteBlock(blockID uuid.UUID) error { return fmt.Errorf("error finding completingBlock") } - ctx := context.Background() - backendBlock, err := i.writer.CompleteBlockWithBackend(ctx, completingBlock, i.localReader, i.localWriter) if err != nil { return fmt.Errorf("error completing wal block with local backend: %w", err) diff --git a/modules/ingester/instance_search.go b/modules/ingester/instance_search.go index 2e7dfc1c488..a870ead5a30 100644 --- a/modules/ingester/instance_search.go +++ b/modules/ingester/instance_search.go @@ -302,7 +302,7 @@ func (i *instance) SearchTagsV2(ctx context.Context, req *tempopb.SearchTagsRequ } if distinctValues.Exceeded() { - level.Warn(log.Logger).Log("msg", "size of tags in instance exceeded limit, reduce cardinality or size of tags", "userID", userID, "limit", limit) + level.Warn(log.Logger).Log("msg", "size of tags in instance exceeded limit, reduce cardinality or size of tags", "tenant", userID, "limit", limit) } collected := distinctValues.Strings() @@ -388,7 +388,7 @@ func (i *instance) SearchTagValues(ctx context.Context, tagName string) (*tempop } if distinctValues.Exceeded() { - level.Warn(log.Logger).Log("msg", "size of tag values in instance exceeded limit, reduce cardinality or size of tags", "tag", tagName, "userID", userID, "limit", limit, "size", distinctValues.Size()) + level.Warn(log.Logger).Log("msg", "size of tag values in instance exceeded limit, reduce cardinality or size of tags", "tag", tagName, "tenant", userID, "limit", limit, "size", distinctValues.Size()) } return &tempopb.SearchTagValuesResponse{ @@ -595,7 +595,7 @@ func (i *instance) SearchTagValuesV2(ctx context.Context, req *tempopb.SearchTag } if valueCollector.Exceeded() { - _ = level.Warn(log.Logger).Log("msg", "size of tag values exceeded limit, reduce cardinality or size of tags", "tag", req.TagName, "userID", userID, "limit", limit, "size", valueCollector.Size()) + _ = level.Warn(log.Logger).Log("msg", "size of tag values exceeded limit, reduce cardinality or size of tags", "tag", req.TagName, "tenant", userID, "limit", limit, "size", valueCollector.Size()) } resp := &tempopb.SearchTagValuesV2Response{ diff --git a/modules/ingester/instance_search_test.go b/modules/ingester/instance_search_test.go index 74d17e236e1..7d5dfe18578 100644 --- a/modules/ingester/instance_search_test.go +++ b/modules/ingester/instance_search_test.go @@ -64,7 +64,7 @@ func TestInstanceSearch(t *testing.T) { checkEqual(t, ids, sr) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) sr, err = i.Search(context.Background(), req) @@ -132,7 +132,7 @@ func TestInstanceSearchTraceQL(t *testing.T) { checkEqual(t, ids, sr) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) sr, err = i.Search(context.Background(), req) @@ -217,7 +217,7 @@ func TestInstanceSearchWithStartAndEnd(t *testing.T) { searchAndAssert(req, uint32(100)) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) searchAndAssert(req, uint32(200)) @@ -262,7 +262,7 @@ func TestInstanceSearchTags(t *testing.T) { testSearchTagsAndValues(t, userCtx, i, tagKey, expectedTagValues) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) testSearchTagsAndValues(t, userCtx, i, tagKey, expectedTagValues) @@ -327,7 +327,7 @@ func TestInstanceSearchTagAndValuesV2(t *testing.T) { testSearchTagsAndValuesV2(t, userCtx, i, tagKey, queryThatMatches, expectedTagValues, expectedEventTagValues, expectedLinkTagValues) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) require.NoError(t, i.ClearCompletingBlock(blockID)) // Clear the completing block @@ -676,7 +676,7 @@ func TestInstanceSearchDoesNotRace(t *testing.T) { // Cut wal, complete, delete wal, then flush blockID, _ := i.CutBlockIfReady(0, 0, true) if blockID != uuid.Nil { - err := i.CompleteBlock(blockID) + err := i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) err = i.ClearCompletingBlock(blockID) require.NoError(t, err) @@ -826,7 +826,7 @@ func TestInstanceSearchMetrics(t *testing.T) { require.Less(t, numBytes, m.InspectedBytes) // Test after completing a block - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) err = i.ClearCompletingBlock(blockID) require.NoError(t, err) diff --git a/modules/ingester/instance_test.go b/modules/ingester/instance_test.go index 414d6fdba74..8ffed343daa 100644 --- a/modules/ingester/instance_test.go +++ b/modules/ingester/instance_test.go @@ -50,7 +50,7 @@ func TestInstance(t *testing.T) { require.NoError(t, err, "unexpected error cutting block") require.NotEqual(t, blockID, uuid.Nil) - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err, "unexpected error completing block") block := i.GetBlockToBeFlushed(blockID) @@ -103,7 +103,7 @@ func TestInstanceFind(t *testing.T) { queryAll(t, i, ids, traces) - err = i.CompleteBlock(blockID) + err = i.CompleteBlock(context.Background(), blockID) require.NoError(t, err) queryAll(t, i, ids, traces) @@ -185,7 +185,7 @@ func TestInstanceDoesNotRace(t *testing.T) { go concurrent(func() { blockID, _ := i.CutBlockIfReady(0, 0, false) if blockID != uuid.Nil { - err := i.CompleteBlock(blockID) + err := i.CompleteBlock(context.Background(), blockID) require.NoError(t, err, "unexpected error completing block") block := i.GetBlockToBeFlushed(blockID) require.NotNil(t, block) @@ -487,7 +487,7 @@ func TestInstanceCutBlockIfReady(t *testing.T) { blockID, err := instance.CutBlockIfReady(tc.maxBlockLifetime, tc.maxBlockBytes, tc.immediate) require.NoError(t, err) - err = instance.CompleteBlock(blockID) + err = instance.CompleteBlock(context.Background(), blockID) if tc.expectedToCutBlock { require.NoError(t, err, "unexpected error completing block") } @@ -738,7 +738,7 @@ func BenchmarkInstanceFindTraceByIDFromCompleteBlock(b *testing.B) { require.NoError(b, err) id, err := instance.CutBlockIfReady(0, 0, true) require.NoError(b, err) - err = instance.CompleteBlock(id) + err = instance.CompleteBlock(context.Background(), id) require.NoError(b, err) require.Equal(b, 1, len(instance.completeBlocks)) @@ -776,7 +776,7 @@ func benchmarkInstanceSearch(b testing.TB) { // force the traces to be in a complete block id, err := instance.CutBlockIfReady(0, 0, true) require.NoError(b, err) - err = instance.CompleteBlock(id) + err = instance.CompleteBlock(context.Background(), id) require.NoError(b, err) require.Equal(b, 1, len(instance.completeBlocks)) @@ -880,7 +880,7 @@ func BenchmarkInstanceContention(t *testing.B) { go concurrent(func() { blockID, _ := i.CutBlockIfReady(0, 0, false) if blockID != uuid.Nil { - err := i.CompleteBlock(blockID) + err := i.CompleteBlock(context.Background(), blockID) require.NoError(t, err, "unexpected error completing block") err = i.ClearCompletingBlock(blockID) require.NoError(t, err, "unexpected error clearing wal block") diff --git a/modules/overrides/config_test.go b/modules/overrides/config_test.go index 71cad3c1f0c..5aef3950206 100644 --- a/modules/overrides/config_test.go +++ b/modules/overrides/config_test.go @@ -6,8 +6,8 @@ import ( "flag" "reflect" "testing" + "time" - "github.com/brianvoe/gofakeit/v6" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" @@ -268,10 +268,16 @@ func rvCountFields(rv reflect.Value) int { } func TestOverrides_AssertUserConfigurableOverridesAreASubsetOfRuntimeOverrides(t *testing.T) { - userConfigurableOverrides := client.Limits{} - - err := gofakeit.Struct(&userConfigurableOverrides) - assert.NoError(t, err) + userConfigurableOverrides := client.Limits{ + Forwarders: &[]string{"test"}, + CostAttribution: client.CostAttribution{ + Dimensions: &map[string]string{"server": "192.168.1.1"}, + }, + MetricsGenerator: client.LimitsMetricsGenerator{ + CollectionInterval: &client.Duration{Duration: 5 * time.Minute}, + Processors: map[string]struct{}{"service-graphs": {}}, + }, + } // TODO clear out collection_interval because unmarshalling a time.Duration into overrides.Overrides // fails. The JSON decoder is not able to parse creations correctly, so e.g. a string like "30s" is @@ -283,7 +289,7 @@ func TestOverrides_AssertUserConfigurableOverridesAreASubsetOfRuntimeOverrides(t // encode to json var buf bytes.Buffer encoder := json.NewEncoder(&buf) - err = encoder.Encode(&userConfigurableOverrides) + err := encoder.Encode(&userConfigurableOverrides) assert.NoError(t, err) // and decode back to overrides.Overrides diff --git a/modules/overrides/runtime_config_overrides_test.go b/modules/overrides/runtime_config_overrides_test.go index 72ef2d52d16..18e2a62b731 100644 --- a/modules/overrides/runtime_config_overrides_test.go +++ b/modules/overrides/runtime_config_overrides_test.go @@ -219,7 +219,7 @@ func TestRuntimeConfigOverrides(t *testing.T) { buff, err := yaml.Marshal(legacyOverrides) require.NoError(t, err) - err = os.WriteFile(overridesFile, buff, os.ModePerm) + err = os.WriteFile(overridesFile, buff, 0o700) require.NoError(t, err) cfg.PerTenantOverrideConfig = overridesFile @@ -578,7 +578,7 @@ overrides: overridesFile := filepath.Join(t.TempDir(), "Overrides.yaml") - require.NoError(t, os.WriteFile(overridesFile, []byte(perTenantOverrides), os.ModePerm)) + require.NoError(t, os.WriteFile(overridesFile, []byte(perTenantOverrides), 0o700)) cfg.PerTenantOverrideConfig = overridesFile cfg.PerTenantOverridePeriod = model.Duration(time.Hour) @@ -606,7 +606,7 @@ func createAndInitializeRuntimeOverridesManager(t *testing.T, defaultLimits Over if perTenantOverrides != nil { overridesFile := filepath.Join(t.TempDir(), "Overrides.yaml") - err := os.WriteFile(overridesFile, perTenantOverrides, os.ModePerm) + err := os.WriteFile(overridesFile, perTenantOverrides, 0o700) require.NoError(t, err) cfg.PerTenantOverrideConfig = overridesFile diff --git a/modules/overrides/user_configurable_overrides_test.go b/modules/overrides/user_configurable_overrides_test.go index 48db5aaa292..b583f105b5d 100644 --- a/modules/overrides/user_configurable_overrides_test.go +++ b/modules/overrides/user_configurable_overrides_test.go @@ -296,7 +296,7 @@ func localUserConfigOverrides(t *testing.T, baseLimits Overrides, perTenantOverr if perTenantOverrides != nil { overridesFile := filepath.Join(t.TempDir(), "Overrides.yaml") - err := os.WriteFile(overridesFile, perTenantOverrides, os.ModePerm) + err := os.WriteFile(overridesFile, perTenantOverrides, 0o700) require.NoError(t, err) baseCfg.PerTenantOverrideConfig = overridesFile diff --git a/modules/overrides/userconfigurable/client/client.go b/modules/overrides/userconfigurable/client/client.go index c39b766b7f3..b0d302ec082 100644 --- a/modules/overrides/userconfigurable/client/client.go +++ b/modules/overrides/userconfigurable/client/client.go @@ -120,7 +120,7 @@ func initBackend(cfg *Config) (rw backend.VersionedReaderWriter, err error) { return nil, err } // Create overrides directory with necessary permissions - err = os.MkdirAll(path.Join(cfg.Local.Path, OverridesKeyPath), os.ModePerm) + err = os.MkdirAll(path.Join(cfg.Local.Path, OverridesKeyPath), 0o700) if err != nil { return nil, err } diff --git a/pkg/api/query_builder.go b/pkg/api/query_builder.go index 7a43191ffec..fdabf1ceb06 100644 --- a/pkg/api/query_builder.go +++ b/pkg/api/query_builder.go @@ -15,6 +15,7 @@ func newQueryBuilder(init string) *queryBuilder { builder: strings.Builder{}, } + qb.builder.Grow(100) // pre-allocate some space. ideally the caller could indicate roughly the expected size, but starting with 100 bytes significantly outperforms 0 qb.builder.WriteString(init) return qb } diff --git a/pkg/cache/redis_client.go b/pkg/cache/redis_client.go index 6a6b5dc1eca..65f9f9a98f8 100644 --- a/pkg/cache/redis_client.go +++ b/pkg/cache/redis_client.go @@ -178,12 +178,7 @@ func (c *RedisClient) Close() error { return c.rdb.Close() } -// StringToBytes converts string to byte slice. (copied from vendor/github.com/go-redis/redis/v8/internal/util/unsafe.go) +// StringToBytes reads the string header and returns a byte slice without copying. func StringToBytes(s string) []byte { - return *(*[]byte)(unsafe.Pointer( - &struct { - string - Cap int - }{s, len(s)}, - )) + return unsafe.Slice(unsafe.StringData(s), len(s)) } diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go index b94eeabc455..3aba0a74f6c 100644 --- a/pkg/traceql/engine_metrics.go +++ b/pkg/traceql/engine_metrics.go @@ -17,6 +17,8 @@ import ( ) const ( + internalLabelMetaType = "__meta_type" + internalMetaTypeCount = "__count" internalLabelBucket = "__bucket" maxExemplars = 100 maxExemplarsPerBucket = 2 @@ -176,10 +178,12 @@ func (ls Labels) String() string { promValue = "" case l.Value.Type == TypeString: s := l.Value.EncodeToString(false) - if s != "" { - promValue = s - } else { + if s == "nil" { + promValue = "" + } else if s == "" { promValue = "" + } else { + promValue = s } default: promValue = l.Value.EncodeToString(false) diff --git a/pkg/traceql/engine_metrics_average.go b/pkg/traceql/engine_metrics_average.go new file mode 100644 index 00000000000..0b6d934a7cd --- /dev/null +++ b/pkg/traceql/engine_metrics_average.go @@ -0,0 +1,554 @@ +package traceql + +import ( + "fmt" + "math" + "strings" + "time" + + "github.com/grafana/tempo/pkg/tempopb" + v1 "github.com/grafana/tempo/pkg/tempopb/common/v1" + "github.com/prometheus/prometheus/model/labels" +) + +// Average over time aggregator +type averageOverTimeAggregator struct { + by []Attribute + attr Attribute + // Average over time span aggregator + agg SpanAggregator + // Average over time series aggregator + seriesAgg SeriesAggregator + exemplarFn getExemplar + mode AggregateMode +} + +var _ metricsFirstStageElement = (*averageOverTimeAggregator)(nil) + +func newAverageOverTimeMetricsAggregator(attr Attribute, by []Attribute) *averageOverTimeAggregator { + return &averageOverTimeAggregator{ + attr: attr, + by: by, + } +} + +func (a *averageOverTimeAggregator) init(q *tempopb.QueryRangeRequest, mode AggregateMode) { + exemplarFn := func(s Span) (float64, uint64) { + return math.NaN(), a.spanStartTimeMs(s) + } + + a.seriesAgg = &averageOverTimeSeriesAggregator{ + weightedAverageSeries: make(map[string]averageSeries), + len: IntervalCount(q.Start, q.End, q.Step), + start: q.Start, + end: q.End, + step: q.Step, + exemplarBuckets: newBucketSet(IntervalCount(q.Start, q.End, q.Step)), + } + + if mode == AggregateModeRaw { + a.agg = newAvgOverTimeSpanAggregator(a.attr, a.by, q.Start, q.End, q.Step) + } + + a.exemplarFn = exemplarFn + a.mode = mode +} + +func (a *averageOverTimeAggregator) observe(span Span) { + a.agg.Observe(span) +} + +func (a *averageOverTimeAggregator) observeExemplar(span Span) { + v, ts := a.exemplarFn(span) + a.agg.ObserveExemplar(span, v, ts) +} + +func (a *averageOverTimeAggregator) observeSeries(ss []*tempopb.TimeSeries) { + a.seriesAgg.Combine(ss) +} + +func (a *averageOverTimeAggregator) result() SeriesSet { + if a.agg != nil { + return a.agg.Series() + } + + // In the frontend-version the results come from + // the job-level aggregator + ss := a.seriesAgg.Results() + if a.mode == AggregateModeFinal { + for i := range ss { + if strings.Contains(i, internalLabelMetaType) { + delete(ss, i) + } + } + } + return ss +} + +func (a *averageOverTimeAggregator) extractConditions(request *FetchSpansRequest) { + // For metrics aggregators based on a span attribute we have to include it + includeAttribute := a.attr != (Attribute{}) && !request.HasAttribute(a.attr) + if includeAttribute { + request.SecondPassConditions = append(request.SecondPassConditions, Condition{ + Attribute: a.attr, + }) + } + + for _, b := range a.by { + if !request.HasAttribute(b) { + request.SecondPassConditions = append(request.SecondPassConditions, Condition{ + Attribute: b, + }) + } + } +} + +func (a *averageOverTimeAggregator) validate() error { + if len(a.by) >= maxGroupBys { + return newUnsupportedError(fmt.Sprintf("metrics group by %v values", len(a.by))) + } + return nil +} + +func (a *averageOverTimeAggregator) spanStartTimeMs(s Span) uint64 { + return s.StartTimeUnixNanos() / uint64(time.Millisecond) +} + +func (a *averageOverTimeAggregator) String() string { + s := strings.Builder{} + + s.WriteString(metricsAggregateAvgOverTime.String()) + s.WriteString("(") + if a.attr != (Attribute{}) { + s.WriteString(a.attr.String()) + } + s.WriteString(")") + + if len(a.by) > 0 { + s.WriteString("by(") + for i, b := range a.by { + s.WriteString(b.String()) + if i < len(a.by)-1 { + s.WriteString(",") + } + } + s.WriteString(")") + } + return s.String() +} + +type averageOverTimeSeriesAggregator struct { + weightedAverageSeries map[string]averageSeries + len int + start, end, step uint64 + exemplarBuckets *bucketSet +} + +type averageValue struct { + mean float64 + compensation float64 + weight float64 +} + +// Adds an increment to the existing mean using Kahan sumnmation algorithm. +// The compensation is accumulated and not applied to reduce the error +func (a *averageValue) add(inc float64) { + if math.IsInf(a.mean, 0) { + if math.IsInf(inc, 0) && (a.mean > 0) == (inc > 0) { + // The `mean` and `ic` values are `Inf` of the same sign. They + // can't be subtracted, but the value of `mean` is correct + // already. + return + } + if !math.IsInf(inc, 0) && !math.IsNaN(inc) { + // At this stage, the mean is an infinite. If the added + // value is neither an Inf or a Nan, we can keep that mean + // value. + return + } + } + val, c := kahanSumInc(inc, a.mean, a.compensation) + a.mean = val + a.compensation = c +} + +func kahanSumInc(inc, sum, c float64) (newSum, newC float64) { + t := sum + inc + switch { + case math.IsInf(t, 0): + c = 0 + + // Using Neumaier improvement, swap if next term larger than sum. + case math.Abs(sum) >= math.Abs(inc): + c += (sum - t) + inc + default: + c += (inc - t) + sum + } + return t, c +} + +type averageSeries struct { + values []averageValue + labels Labels + Exemplars []Exemplar +} + +func newAverageSeries(len int, lenExemplars int, labels Labels) averageSeries { + s := averageSeries{ + values: make([]averageValue, len), + labels: labels, + Exemplars: make([]Exemplar, 0, lenExemplars), + } + // Init to nan to discriminate uninitialized values from 0 + for i := range s.values { + s.values[i].mean = nan + s.values[i].weight = nan + } + return s +} + +// it adds the compensation to the final value to retain precission +func (k *averageSeries) getAvgSeries() TimeSeries { + ts := TimeSeries{ + Labels: k.labels, + Values: make([]float64, len(k.values)), + Exemplars: k.Exemplars, + } + + for i, v := range k.values { + ts.Values[i] = v.mean + v.compensation + } + return ts +} + +func (k *averageSeries) getCountSeries() TimeSeries { + countLabels := append(k.labels, Label{internalLabelMetaType, NewStaticString(internalMetaTypeCount)}) + ts := TimeSeries{ + Labels: countLabels, + Values: make([]float64, len(k.values)), + } + for i, v := range k.values { + ts.Values[i] = v.weight + } + return ts +} + +// It increments the mean based on a new value +func (k *averageSeries) addIncrementMean(interval int, inc float64) { + currentMean := k.values[interval] + if math.IsNaN(currentMean.mean) && !math.IsNaN(inc) { + k.values[interval] = averageValue{mean: inc, weight: 1} + return + } + currentMean.weight++ + currentMean.add(inc/currentMean.weight - currentMean.mean/currentMean.weight) + k.values[interval] = currentMean +} + +// It calculates the incremental weighted mean using kahan-neumaier summation and a delta approach. +// By adding incremental values we prevent overflow +func (k *averageSeries) addWeigthedMean(interval int, mean float64, weight float64) { + currentMean := k.values[interval] + if math.IsNaN(currentMean.mean) && !math.IsNaN(mean) { + k.values[interval] = averageValue{mean: mean, weight: weight} + return + } + + sumWeights := currentMean.weight + weight + meanDelta := ((mean - currentMean.mean) * weight) / sumWeights + meanDelta -= currentMean.compensation + + currentMean.add(meanDelta) + k.values[interval] = currentMean +} + +var ( + _ SeriesAggregator = (*averageOverTimeSeriesAggregator)(nil) + nan = math.Float64frombits(normalNaN) +) + +func (b *averageOverTimeSeriesAggregator) Combine(in []*tempopb.TimeSeries) { + // We traverse the TimeSeries to initialize new TimeSeries and map the counter series with the position in the `in` array + countPosMapper := make(map[string]int, len(in)/2) + for i, ts := range in { + _, ok := b.weightedAverageSeries[ts.PromLabels] + if strings.Contains(ts.PromLabels, internalLabelMetaType) { + // Label series without the count metatype, this will match with its average series + avgSeriesPromLabel := getLabels(ts.Labels, internalLabelMetaType).String() + // mapping of the position of the count series in the time series array + countPosMapper[avgSeriesPromLabel] = i + } else if !ok { + promLabels := getLabels(ts.Labels, "") + b.weightedAverageSeries[ts.PromLabels] = newAverageSeries(b.len, len(ts.Exemplars), promLabels) + } + } + for _, ts := range in { + existing, ok := b.weightedAverageSeries[ts.PromLabels] + if !ok { + // This is a counter series, we can skip it + continue + } + for i, sample := range ts.Samples { + pos := IntervalOfMs(sample.TimestampMs, b.start, b.end, b.step) + if pos < 0 || pos >= len(b.weightedAverageSeries[ts.PromLabels].values) { + continue + } + + incomingMean := sample.Value + incomingWeight := in[countPosMapper[ts.PromLabels]].Samples[i].Value + existing.addWeigthedMean(pos, incomingMean, incomingWeight) + b.aggregateExemplars(ts, b.weightedAverageSeries[ts.PromLabels]) + } + } +} + +func (b *averageOverTimeSeriesAggregator) aggregateExemplars(ts *tempopb.TimeSeries, existing averageSeries) { + for _, exemplar := range ts.Exemplars { + if b.exemplarBuckets.testTotal() { + break + } + interval := IntervalOfMs(exemplar.TimestampMs, b.start, b.end, b.step) + if b.exemplarBuckets.addAndTest(interval) { + continue // Skip this exemplar and continue, next exemplar might fit in a different bucket } + } + labels := make(Labels, 0, len(exemplar.Labels)) + for _, l := range exemplar.Labels { + labels = append(labels, Label{ + Name: l.Key, + Value: StaticFromAnyValue(l.Value), + }) + } + value := exemplar.Value + if math.IsNaN(value) { + value = 0 // TODO: Use the value of the series at the same timestamp + } + existing.Exemplars = append(existing.Exemplars, Exemplar{ + Labels: labels, + Value: value, + TimestampMs: uint64(exemplar.TimestampMs), + }) + } +} + +func getLabels(vals []v1.KeyValue, skipKey string) Labels { + labels := make(Labels, 0, len(vals)) + for _, l := range vals { + if skipKey != "" && l.Key == skipKey { + continue + } + labels = append(labels, Label{ + Name: l.Key, + Value: StaticFromAnyValue(l.Value), + }) + } + return labels +} + +func (b *averageOverTimeSeriesAggregator) Results() SeriesSet { + ss := SeriesSet{} + for k, v := range b.weightedAverageSeries { + ss[k] = v.getAvgSeries() + countSeries := v.getCountSeries() + ss[countSeries.Labels.String()] = countSeries + } + return ss +} + +// Accumulated results of average over time +type avgOverTimeSeries[S StaticVals] struct { + average averageSeries + exemplarBuckets *bucketSet + vals S + initialized bool +} + +// In charge of calculating the average over time for a set of spans +// First aggregation layer +type avgOverTimeSpanAggregator[F FastStatic, S StaticVals] struct { + // Config + by []Attribute // Original attributes: .foo + byLookups [][]Attribute // Lookups: span.foo resource.foo + getSpanAttValue func(s Span) float64 + start uint64 + end uint64 + step uint64 + + // Data + series map[F]avgOverTimeSeries[S] + lastSeries avgOverTimeSeries[S] + buf fastStaticWithValues[F, S] + lastBuf fastStaticWithValues[F, S] +} + +var _ SpanAggregator = (*avgOverTimeSpanAggregator[FastStatic1, StaticVals1])(nil) + +func newAvgOverTimeSpanAggregator(attr Attribute, by []Attribute, start, end, step uint64) SpanAggregator { + lookups := make([][]Attribute, len(by)) + for i, attr := range by { + if attr.Intrinsic == IntrinsicNone && attr.Scope == AttributeScopeNone { + // Unscoped attribute. Check span-level, then resource-level. + // TODO - Is this taken care of by span.AttributeFor now? + lookups[i] = []Attribute{ + NewScopedAttribute(AttributeScopeSpan, false, attr.Name), + NewScopedAttribute(AttributeScopeResource, false, attr.Name), + } + } else { + lookups[i] = []Attribute{attr} + } + } + + aggNum := len(lookups) + + switch aggNum { + case 2: + return newAvgAggregator[FastStatic2, StaticVals2](attr, by, lookups, start, end, step) + case 3: + return newAvgAggregator[FastStatic3, StaticVals3](attr, by, lookups, start, end, step) + case 4: + return newAvgAggregator[FastStatic4, StaticVals4](attr, by, lookups, start, end, step) + case 5: + return newAvgAggregator[FastStatic5, StaticVals5](attr, by, lookups, start, end, step) + default: + return newAvgAggregator[FastStatic1, StaticVals1](attr, by, lookups, start, end, step) + } +} + +func newAvgAggregator[F FastStatic, S StaticVals](attr Attribute, by []Attribute, lookups [][]Attribute, start, end, step uint64) SpanAggregator { + var fn func(s Span) float64 + + switch attr { + case IntrinsicDurationAttribute: + fn = func(s Span) float64 { + return float64(s.DurationNanos()) / float64(time.Second) + } + default: + fn = func(s Span) float64 { + f, a := FloatizeAttribute(s, attr) + if a == TypeNil { + return math.Float64frombits(normalNaN) + } + return f + } + } + + return &avgOverTimeSpanAggregator[F, S]{ + series: map[F]avgOverTimeSeries[S]{}, + getSpanAttValue: fn, + by: by, + byLookups: lookups, + start: start, + end: end, + step: step, + } +} + +func (g *avgOverTimeSpanAggregator[F, S]) Observe(span Span) { + interval := IntervalOf(span.StartTimeUnixNanos(), g.start, g.end, g.step) + if interval == -1 { + return + } + + inc := g.getSpanAttValue(span) + if math.IsNaN(inc) { + return + } + + s := g.getSeries(span) + s.average.addIncrementMean(interval, inc) +} + +func (g *avgOverTimeSpanAggregator[F, S]) ObserveExemplar(span Span, value float64, ts uint64) { + s := g.getSeries(span) + if s.exemplarBuckets.testTotal() { + return + } + interval := IntervalOfMs(int64(ts), g.start, g.end, g.step) + if s.exemplarBuckets.addAndTest(interval) { + return + } + + all := span.AllAttributes() + lbls := make(Labels, 0, len(all)) + for k, v := range span.AllAttributes() { + lbls = append(lbls, Label{k.String(), v}) + } + + s.average.Exemplars = append(s.average.Exemplars, Exemplar{ + Labels: lbls, + Value: value, + TimestampMs: ts, + }) + g.series[g.buf.fast] = s +} + +func (g *avgOverTimeSpanAggregator[F, S]) labelsFor(vals S) (Labels, string) { + if g.by == nil { + serieLabel := make(Labels, 1, 2) + serieLabel[0] = Label{labels.MetricName, NewStaticString(metricsAggregateAvgOverTime.String())} + return serieLabel, serieLabel.String() + } + labels := make(Labels, 0, len(g.by)+1) + for i := range g.by { + if vals[i].Type == TypeNil { + continue + } + labels = append(labels, Label{g.by[i].String(), vals[i]}) + } + + if len(labels) == 0 { + // When all nil then force one + labels = append(labels, Label{g.by[0].String(), NewStaticNil()}) + } + + return labels, labels.String() +} + +func (g *avgOverTimeSpanAggregator[F, S]) Series() SeriesSet { + ss := SeriesSet{} + + for _, s := range g.series { + labels, promLabelsAvg := g.labelsFor(s.vals) + s.average.labels = labels + // Average series + averageSeries := s.average.getAvgSeries() + // Count series + countSeries := s.average.getCountSeries() + + ss[promLabelsAvg] = averageSeries + ss[countSeries.Labels.String()] = countSeries + } + + return ss +} + +// getSeries gets the series for the current span. +// It will reuse the last series if possible. +func (g *avgOverTimeSpanAggregator[F, S]) getSeries(span Span) avgOverTimeSeries[S] { + // Get Grouping values + for i, lookups := range g.byLookups { + val := lookup(lookups, span) + g.buf.vals[i] = val + g.buf.fast[i] = val.MapKey() + } + + // Fast path + if g.lastBuf.fast == g.buf.fast && g.lastSeries.initialized { + return g.lastSeries + } + + s, ok := g.series[g.buf.fast] + if !ok { + intervals := IntervalCount(g.start, g.end, g.step) + s = avgOverTimeSeries[S]{ + vals: g.buf.vals, + average: newAverageSeries(intervals, maxExemplars, nil), + exemplarBuckets: newBucketSet(intervals), + initialized: true, + } + g.series[g.buf.fast] = s + } + + g.lastBuf = g.buf + g.lastSeries = s + return s +} diff --git a/pkg/traceql/engine_metrics_compare.go b/pkg/traceql/engine_metrics_compare.go index 292b3e13785..37ab60de569 100644 --- a/pkg/traceql/engine_metrics_compare.go +++ b/pkg/traceql/engine_metrics_compare.go @@ -10,7 +10,6 @@ import ( ) const ( - internalLabelMetaType = "__meta_type" internalMetaTypeBaseline = "baseline" internalMetaTypeSelection = "selection" internalMetaTypeBaselineTotal = "baseline_total" diff --git a/pkg/traceql/engine_metrics_test.go b/pkg/traceql/engine_metrics_test.go index 0656de28a9e..2fc0e356896 100644 --- a/pkg/traceql/engine_metrics_test.go +++ b/pkg/traceql/engine_metrics_test.go @@ -617,6 +617,253 @@ func TestMinOverTimeForSpanAttribute(t *testing.T) { } } +func TestAvgOverTimeForDuration(t *testing.T) { + req := &tempopb.QueryRangeRequest{ + Start: uint64(1 * time.Second), + End: uint64(3 * time.Second), + Step: uint64(1 * time.Second), + Query: "{ } | avg_over_time(duration) by (span.foo)", + } + + // A variety of spans across times, durations, and series. All durations are powers of 2 for simplicity + in := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(500), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithDuration(200), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithDuration(300), + } + + result := runTraceQLMetric(t, req, in) + + fooBaz := result[`{span.foo="baz"}`] + fooBar := result[`{span.foo="bar"}`] + + // We cannot compare with require.Equal because NaN != NaN + assert.True(t, math.IsNaN(fooBaz.Values[0])) + assert.True(t, math.IsNaN(fooBaz.Values[1])) + assert.Equal(t, 200., fooBaz.Values[2]*float64(time.Second)) + + assert.Equal(t, 100., fooBar.Values[0]*float64(time.Second)) + assert.Equal(t, 200., fooBar.Values[1]*float64(time.Second)) + assert.True(t, math.IsNaN(fooBar.Values[2])) +} + +func TestAvgOverTimeForDurationWithoutAggregation(t *testing.T) { + req := &tempopb.QueryRangeRequest{ + Start: uint64(1 * time.Second), + End: uint64(3 * time.Second), + Step: uint64(1 * time.Second), + Query: "{ } | avg_over_time(duration)", + } + + // A variety of spans across times, durations, and series. All durations are powers of 2 for simplicity + in := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithDuration(500), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithDuration(100), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithDuration(200), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "bar").WithDuration(300), + } + + result := runTraceQLMetric(t, req, in) + avg := result[`{__name__="avg_over_time"}`] + + assert.Equal(t, 100., avg.Values[0]*float64(time.Second)) + assert.Equal(t, 200., avg.Values[1]*float64(time.Second)) + assert.Equal(t, 200., avg.Values[2]*float64(time.Second)) +} + +func TestAvgOverTimeForSpanAttribute(t *testing.T) { + req := &tempopb.QueryRangeRequest{ + Start: uint64(1 * time.Second), + End: uint64(3 * time.Second), + Step: uint64(1 * time.Second), + Query: "{ } | avg_over_time(span.http.status_code) by (span.foo)", + } + + // A variety of spans across times, durations, and series. All durations are powers of 2 for simplicity + in := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(128), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 404).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(512), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(64), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(8), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 200).WithDuration(512), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 400).WithDuration(1024), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 300).WithDuration(512), + } + + in2 := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(128), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(512), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(64), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(8), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 200).WithDuration(512), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 200).WithDuration(1024), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 200).WithDuration(512), + } + + result := runTraceQLMetric(t, req, in, in2) + + fooBaz := result[`{span.foo="baz"}`] + fooBar := result[`{span.foo="bar"}`] + + // Alas,we cannot compare with require.Equal because NaN != NaN + // foo.baz = (NaN, NaN, 250) + assert.True(t, math.IsNaN(fooBaz.Values[0])) + assert.True(t, math.IsNaN(fooBaz.Values[1])) + assert.Equal(t, 250.0, fooBaz.Values[2]) + + // foo.bar = (234,200, NaN) + assert.Equal(t, 234.0, fooBar.Values[0]) + assert.Equal(t, 200.0, fooBar.Values[1]) + assert.True(t, math.IsNaN(fooBar.Values[2])) + + // Test that NaN values are not included in the samples after casting to proto + ts := result.ToProto(req) + fooBarSamples := []tempopb.Sample{{TimestampMs: 1000, Value: 234}, {TimestampMs: 2000, Value: 200}} + fooBazSamples := []tempopb.Sample{{TimestampMs: 3000, Value: 250}} + + for _, s := range ts { + if s.PromLabels == "{span.foo=\"bar\"}" { + assert.Equal(t, fooBarSamples, s.Samples) + } else { + assert.Equal(t, fooBazSamples, s.Samples) + } + } +} + +func TestAvgOverTimeWithNoMatch(t *testing.T) { + req := &tempopb.QueryRangeRequest{ + Start: uint64(1 * time.Second), + End: uint64(3 * time.Second), + Step: uint64(1 * time.Second), + Query: "{ } | avg_over_time(span.buu)", + } + + // A variety of spans across times, durations, and series. All durations are powers of 2 for simplicity + in := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(128), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 404).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(512), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(64), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(256), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200).WithDuration(8), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 201).WithDuration(512), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 401).WithDuration(1024), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 500).WithDuration(512), + } + + result := runTraceQLMetric(t, req, in) + + // Test that empty timeseries are not included + ts := result.ToProto(req) + + assert.True(t, len(ts) == 0) +} + +func TestObserveSeriesAverageOverTimeForSpanAttribute(t *testing.T) { + req := &tempopb.QueryRangeRequest{ + Start: uint64(1 * time.Second), + End: uint64(3 * time.Second), + Step: uint64(1 * time.Second), + Query: "{ } | avg_over_time(span.http.status_code) by (span.foo)", + } + + // A variety of spans across times, durations, and series. All durations are powers of 2 for simplicity + in := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 300), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 400), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 100), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 100), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 200), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 400), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 500), + } + + in2 := []Span{ + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 100), + newMockSpan(nil).WithStartTime(uint64(1*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 300), + + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 400), + newMockSpan(nil).WithStartTime(uint64(2*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 200), + + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "baz").WithSpanInt("http.status_code", 100), + newMockSpan(nil).WithStartTime(uint64(3*time.Second)).WithSpanString("foo", "bar").WithSpanInt("http.status_code", 100), + } + + e := NewEngine() + layer1A, _ := e.CompileMetricsQueryRange(req, 0, 0, false) + layer1B, _ := e.CompileMetricsQueryRange(req, 0, 0, false) + layer2A, _ := e.CompileMetricsQueryRangeNonRaw(req, AggregateModeSum) + layer2B, _ := e.CompileMetricsQueryRangeNonRaw(req, AggregateModeSum) + layer3, _ := e.CompileMetricsQueryRangeNonRaw(req, AggregateModeFinal) + + for _, s := range in { + layer1A.metricsPipeline.observe(s) + } + + layer2A.ObserveSeries(layer1A.Results().ToProto(req)) + + for _, s := range in2 { + layer1B.metricsPipeline.observe(s) + } + + layer2B.ObserveSeries(layer1B.Results().ToProto(req)) + + layer3.ObserveSeries(layer2A.Results().ToProto(req)) + layer3.ObserveSeries(layer2B.Results().ToProto(req)) + + result := layer3.Results() + + fooBaz := result[`{span.foo="baz"}`] + fooBar := result[`{span.foo="bar"}`] + + // Alas,we cannot compare with require.Equal because NaN != NaN + // foo.baz = (NaN, NaN, 300) + assert.True(t, math.IsNaN(fooBaz.Values[0])) + assert.True(t, math.IsNaN(fooBaz.Values[1])) + // 300 = (200 + 400 + 500 + 100) / 4 + assert.Equal(t, 300.0, fooBaz.Values[2]) + + // foo.bar = (260,200, 100) + assert.Equal(t, 260.0, fooBar.Values[0]) + assert.Equal(t, 200.0, fooBar.Values[1]) + assert.Equal(t, 100.0, fooBar.Values[2]) +} + func TestMaxOverTimeForDuration(t *testing.T) { req := &tempopb.QueryRangeRequest{ Start: uint64(1 * time.Second), @@ -856,7 +1103,6 @@ func runTraceQLMetric(t *testing.T, req *tempopb.QueryRangeRequest, inSpans ...[ // These are summed counts over time by bucket res := layer2.Results() layer3.ObserveSeries(res.ToProto(req)) - // Layer 3 final results return layer3.Results() diff --git a/pkg/traceql/enum_aggregates.go b/pkg/traceql/enum_aggregates.go index b5169bf486d..89afe173e8a 100644 --- a/pkg/traceql/enum_aggregates.go +++ b/pkg/traceql/enum_aggregates.go @@ -56,6 +56,7 @@ const ( metricsAggregateCountOverTime metricsAggregateMinOverTime metricsAggregateMaxOverTime + metricsAggregateAvgOverTime metricsAggregateQuantileOverTime metricsAggregateHistogramOverTime ) @@ -70,6 +71,8 @@ func (a MetricsAggregateOp) String() string { return "min_over_time" case metricsAggregateMaxOverTime: return "max_over_time" + case metricsAggregateAvgOverTime: + return "avg_over_time" case metricsAggregateQuantileOverTime: return "quantile_over_time" case metricsAggregateHistogramOverTime: diff --git a/pkg/traceql/expr.y b/pkg/traceql/expr.y index b0c1e6a35a6..538c6e1209a 100644 --- a/pkg/traceql/expr.y +++ b/pkg/traceql/expr.y @@ -100,7 +100,7 @@ import ( COUNT AVG MAX MIN SUM BY COALESCE SELECT END_ATTRIBUTE - RATE COUNT_OVER_TIME MIN_OVER_TIME MAX_OVER_TIME QUANTILE_OVER_TIME HISTOGRAM_OVER_TIME COMPARE + RATE COUNT_OVER_TIME MIN_OVER_TIME MAX_OVER_TIME AVG_OVER_TIME QUANTILE_OVER_TIME HISTOGRAM_OVER_TIME COMPARE WITH // Operators are listed with increasing precedence. @@ -302,6 +302,8 @@ metricsAggregation: | MIN_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregateWithAttr(metricsAggregateMinOverTime, $3, $7) } | MAX_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS { $$ = newMetricsAggregateWithAttr(metricsAggregateMaxOverTime, $3, nil) } | MAX_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregateWithAttr(metricsAggregateMaxOverTime, $3, $7) } + | AVG_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS { $$ = newAverageOverTimeMetricsAggregator($3, nil) } + | AVG_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newAverageOverTimeMetricsAggregator($3, $7) } | QUANTILE_OVER_TIME OPEN_PARENS attribute COMMA numericList CLOSE_PARENS { $$ = newMetricsAggregateQuantileOverTime($3, $5, nil) } | QUANTILE_OVER_TIME OPEN_PARENS attribute COMMA numericList CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregateQuantileOverTime($3, $5, $9) } | HISTOGRAM_OVER_TIME OPEN_PARENS attribute CLOSE_PARENS { $$ = newMetricsAggregateWithAttr(metricsAggregateHistogramOverTime, $3, nil) } diff --git a/pkg/traceql/expr.y.go b/pkg/traceql/expr.y.go index 645193e7538..f8855be5682 100644 --- a/pkg/traceql/expr.y.go +++ b/pkg/traceql/expr.y.go @@ -121,40 +121,41 @@ const RATE = 57408 const COUNT_OVER_TIME = 57409 const MIN_OVER_TIME = 57410 const MAX_OVER_TIME = 57411 -const QUANTILE_OVER_TIME = 57412 -const HISTOGRAM_OVER_TIME = 57413 -const COMPARE = 57414 -const WITH = 57415 -const PIPE = 57416 -const AND = 57417 -const OR = 57418 -const EQ = 57419 -const NEQ = 57420 -const LT = 57421 -const LTE = 57422 -const GT = 57423 -const GTE = 57424 -const NRE = 57425 -const RE = 57426 -const DESC = 57427 -const ANCE = 57428 -const SIBL = 57429 -const NOT_CHILD = 57430 -const NOT_PARENT = 57431 -const NOT_DESC = 57432 -const NOT_ANCE = 57433 -const UNION_CHILD = 57434 -const UNION_PARENT = 57435 -const UNION_DESC = 57436 -const UNION_ANCE = 57437 -const UNION_SIBL = 57438 -const ADD = 57439 -const SUB = 57440 -const NOT = 57441 -const MUL = 57442 -const DIV = 57443 -const MOD = 57444 -const POW = 57445 +const AVG_OVER_TIME = 57412 +const QUANTILE_OVER_TIME = 57413 +const HISTOGRAM_OVER_TIME = 57414 +const COMPARE = 57415 +const WITH = 57416 +const PIPE = 57417 +const AND = 57418 +const OR = 57419 +const EQ = 57420 +const NEQ = 57421 +const LT = 57422 +const LTE = 57423 +const GT = 57424 +const GTE = 57425 +const NRE = 57426 +const RE = 57427 +const DESC = 57428 +const ANCE = 57429 +const SIBL = 57430 +const NOT_CHILD = 57431 +const NOT_PARENT = 57432 +const NOT_DESC = 57433 +const NOT_ANCE = 57434 +const UNION_CHILD = 57435 +const UNION_PARENT = 57436 +const UNION_DESC = 57437 +const UNION_ANCE = 57438 +const UNION_SIBL = 57439 +const ADD = 57440 +const SUB = 57441 +const NOT = 57442 +const MUL = 57443 +const DIV = 57444 +const MOD = 57445 +const POW = 57446 var yyToknames = [...]string{ "$end", @@ -226,6 +227,7 @@ var yyToknames = [...]string{ "COUNT_OVER_TIME", "MIN_OVER_TIME", "MAX_OVER_TIME", + "AVG_OVER_TIME", "QUANTILE_OVER_TIME", "HISTOGRAM_OVER_TIME", "COMPARE", @@ -272,166 +274,167 @@ var yyExca = [...]int{ -1, 1, 1, -1, -2, 0, - -1, 298, + -1, 300, 13, 86, -2, 94, } const yyPrivate = 57344 -const yyLast = 993 +const yyLast = 994 var yyAct = [...]int{ - 101, 5, 6, 8, 7, 100, 98, 12, 284, 18, - 247, 67, 90, 228, 77, 336, 13, 205, 348, 30, - 94, 99, 236, 237, 238, 247, 70, 29, 229, 296, - 2, 347, 153, 154, 157, 155, 329, 234, 235, 66, - 236, 237, 238, 247, 87, 88, 89, 90, 204, 328, - 185, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 333, 327, 324, - 323, 78, 79, 80, 81, 82, 83, 322, 211, 85, - 86, 321, 87, 88, 89, 90, 74, 75, 76, 77, - 383, 85, 86, 232, 87, 88, 89, 90, 231, 366, - 362, 219, 221, 222, 223, 224, 225, 226, 361, 345, - 332, 352, 227, 351, 230, 390, 250, 251, 252, 239, - 240, 241, 242, 243, 244, 246, 245, 355, 204, 248, - 249, 239, 240, 241, 242, 243, 244, 246, 245, 234, - 235, 256, 236, 237, 238, 247, 276, 274, 275, 393, - 303, 234, 235, 394, 236, 237, 238, 247, 356, 331, - 72, 73, 277, 74, 75, 76, 77, 293, 279, 280, - 281, 282, 248, 249, 239, 240, 241, 242, 243, 244, - 246, 245, 294, 354, 257, 258, 272, 209, 293, 205, - 389, 303, 387, 303, 234, 235, 353, 236, 237, 238, - 247, 273, 386, 303, 344, 262, 338, 153, 154, 157, - 155, 337, 263, 278, 264, 298, 378, 303, 209, 265, - 208, 248, 249, 239, 240, 241, 242, 243, 244, 246, - 245, 377, 303, 375, 376, 373, 372, 294, 357, 358, - 334, 335, 300, 234, 235, 388, 236, 237, 238, 247, - 302, 303, 17, 374, 186, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 85, 86, 371, 87, 88, 89, 90, 370, 360, - 359, 295, 78, 79, 80, 81, 82, 83, 292, 232, - 232, 232, 232, 291, 231, 231, 231, 231, 290, 67, - 343, 67, 85, 86, 232, 87, 88, 89, 90, 231, - 230, 230, 230, 230, 70, 289, 70, 339, 340, 341, - 342, 288, 287, 286, 212, 230, 168, 151, 150, 300, - 149, 148, 346, 78, 79, 80, 81, 82, 83, 147, - 146, 92, 91, 350, 349, 17, 392, 153, 154, 157, - 155, 84, 385, 72, 73, 367, 74, 75, 76, 77, - 232, 232, 285, 71, 326, 231, 231, 143, 144, 145, - 325, 232, 232, 368, 369, 232, 231, 231, 382, 381, - 231, 230, 230, 261, 379, 380, 365, 364, 384, 232, - 260, 259, 230, 230, 231, 255, 230, 254, 253, 28, - 283, 363, 391, 69, 16, 102, 103, 104, 108, 131, - 230, 93, 95, 4, 152, 107, 105, 106, 110, 109, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 124, 123, 125, 126, 10, 127, 128, 129, - 130, 156, 1, 0, 0, 0, 134, 132, 133, 138, - 139, 140, 135, 141, 136, 142, 137, 330, 0, 102, - 103, 104, 108, 131, 0, 0, 95, 0, 0, 107, - 105, 106, 110, 109, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 124, 123, 125, 126, - 0, 127, 128, 129, 130, 320, 68, 11, 96, 97, - 134, 132, 133, 138, 139, 140, 135, 141, 136, 142, - 137, 0, 0, 0, 0, 0, 0, 0, 0, 248, - 249, 239, 240, 241, 242, 243, 244, 246, 245, 301, - 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, - 0, 234, 235, 0, 236, 237, 238, 247, 0, 0, - 0, 0, 96, 97, 0, 0, 0, 248, 249, 239, - 240, 241, 242, 243, 244, 246, 245, 0, 210, 213, - 214, 215, 216, 217, 218, 206, 0, 0, 0, 234, - 235, 0, 236, 237, 238, 247, 0, 0, 0, 0, - 0, 248, 249, 239, 240, 241, 242, 243, 244, 246, - 245, 248, 249, 239, 240, 241, 242, 243, 244, 246, - 245, 0, 0, 234, 235, 0, 236, 237, 238, 247, - 0, 0, 0, 234, 235, 0, 236, 237, 238, 247, - 19, 20, 21, 0, 17, 203, 165, 48, 53, 0, + 101, 5, 6, 8, 7, 98, 100, 285, 18, 12, + 248, 67, 90, 77, 338, 229, 206, 230, 205, 13, + 298, 2, 94, 30, 99, 237, 238, 239, 248, 70, + 66, 29, 153, 154, 157, 155, 235, 236, 205, 237, + 238, 239, 248, 85, 86, 390, 87, 88, 89, 90, + 186, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 335, 351, 350, + 371, 78, 79, 80, 81, 82, 83, 212, 72, 73, + 348, 74, 75, 76, 77, 87, 88, 89, 90, 331, + 367, 85, 86, 233, 87, 88, 89, 90, 330, 232, + 206, 329, 210, 326, 220, 222, 223, 224, 225, 226, + 227, 334, 402, 325, 228, 324, 323, 231, 251, 252, + 253, 240, 241, 242, 243, 244, 245, 247, 246, 366, + 249, 250, 240, 241, 242, 243, 244, 245, 247, 246, + 365, 235, 236, 355, 237, 238, 239, 248, 74, 75, + 76, 77, 235, 236, 333, 237, 238, 239, 248, 354, + 257, 398, 210, 275, 276, 401, 305, 359, 295, 277, + 280, 281, 282, 283, 249, 250, 240, 241, 242, 243, + 244, 245, 247, 246, 360, 278, 296, 85, 86, 295, + 87, 88, 89, 90, 208, 358, 235, 236, 273, 237, + 238, 239, 248, 258, 259, 397, 305, 357, 153, 154, + 157, 155, 356, 274, 347, 300, 340, 249, 250, 240, + 241, 242, 243, 244, 245, 247, 246, 78, 79, 80, + 81, 82, 83, 339, 302, 395, 305, 394, 305, 235, + 236, 296, 237, 238, 239, 248, 279, 85, 86, 209, + 87, 88, 89, 90, 393, 305, 384, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 383, 305, 381, 382, 396, 72, + 73, 380, 74, 75, 76, 77, 379, 378, 361, 362, + 233, 233, 233, 233, 233, 377, 232, 232, 232, 232, + 232, 67, 376, 67, 346, 375, 233, 341, 342, 343, + 344, 345, 232, 364, 231, 231, 231, 231, 231, 70, + 363, 70, 302, 349, 336, 337, 304, 305, 297, 17, + 231, 187, 294, 263, 78, 79, 80, 81, 82, 83, + 264, 293, 265, 292, 353, 352, 291, 266, 290, 289, + 153, 154, 157, 155, 72, 73, 288, 74, 75, 76, + 77, 287, 213, 169, 233, 233, 151, 150, 149, 148, + 232, 232, 147, 146, 92, 91, 233, 233, 233, 373, + 374, 233, 232, 232, 232, 17, 84, 232, 231, 231, + 400, 385, 386, 387, 389, 388, 391, 233, 71, 392, + 231, 231, 231, 232, 267, 231, 268, 270, 271, 372, + 269, 286, 399, 102, 103, 104, 108, 131, 272, 93, + 95, 231, 328, 107, 105, 106, 110, 109, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 124, 123, 125, 126, 327, 127, 128, 129, 130, 68, + 11, 143, 144, 145, 134, 132, 133, 138, 139, 140, + 135, 141, 136, 142, 137, 332, 370, 369, 102, 103, + 104, 108, 131, 262, 261, 95, 260, 256, 107, 105, + 106, 110, 109, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 124, 123, 125, 126, 255, + 127, 128, 129, 130, 322, 254, 28, 96, 97, 134, + 132, 133, 138, 139, 140, 135, 141, 136, 142, 137, + 284, 211, 214, 215, 216, 217, 218, 219, 249, 250, + 240, 241, 242, 243, 244, 245, 247, 246, 303, 368, + 69, 16, 4, 152, 10, 156, 234, 1, 0, 0, + 235, 236, 0, 237, 238, 239, 248, 0, 0, 0, + 0, 0, 96, 97, 0, 0, 0, 249, 250, 240, + 241, 242, 243, 244, 245, 247, 246, 0, 0, 0, + 0, 0, 0, 0, 207, 0, 0, 0, 0, 235, + 236, 0, 237, 238, 239, 248, 0, 0, 0, 0, + 0, 249, 250, 240, 241, 242, 243, 244, 245, 247, + 246, 249, 250, 240, 241, 242, 243, 244, 245, 247, + 246, 0, 0, 235, 236, 0, 237, 238, 239, 248, + 0, 0, 0, 235, 236, 0, 237, 238, 239, 248, + 19, 20, 21, 0, 17, 204, 166, 48, 53, 0, 0, 50, 0, 49, 0, 57, 0, 51, 52, 54, 55, 56, 59, 58, 60, 61, 64, 63, 62, 48, 53, 0, 0, 50, 0, 49, 0, 57, 0, 51, 52, 54, 55, 56, 59, 58, 60, 61, 64, 63, - 62, 23, 26, 24, 25, 27, 14, 166, 15, 0, - 158, 159, 160, 161, 162, 163, 164, 31, 36, 0, - 0, 33, 0, 32, 0, 42, 0, 34, 35, 37, - 38, 39, 40, 41, 43, 44, 45, 46, 47, 31, - 36, 0, 22, 33, 0, 32, 0, 42, 0, 34, - 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, - 47, 19, 20, 21, 0, 17, 0, 165, 0, 19, - 20, 21, 0, 17, 0, 299, 0, 19, 20, 21, - 50, 17, 49, 297, 57, 0, 51, 52, 54, 55, - 56, 59, 58, 60, 61, 64, 63, 62, 0, 207, - 0, 0, 0, 0, 19, 20, 21, 0, 17, 0, - 9, 0, 23, 26, 24, 25, 27, 14, 166, 15, - 23, 26, 24, 25, 27, 14, 0, 15, 23, 26, - 24, 25, 27, 14, 0, 15, 0, 0, 0, 19, - 20, 21, 0, 17, 0, 165, 19, 20, 21, 0, - 0, 0, 220, 22, 0, 23, 26, 24, 25, 27, - 14, 22, 15, 0, 33, 0, 32, 0, 42, 22, + 62, 23, 26, 24, 25, 27, 14, 167, 15, 0, + 158, 159, 160, 161, 162, 163, 164, 165, 31, 36, + 0, 0, 33, 0, 32, 0, 42, 0, 34, 35, + 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, + 31, 36, 0, 22, 33, 0, 32, 0, 42, 0, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, - 46, 47, 0, 72, 73, 0, 74, 75, 76, 77, - 23, 26, 24, 25, 27, 0, 22, 23, 26, 24, - 25, 27, 0, 266, 131, 267, 269, 270, 0, 268, - 0, 0, 0, 0, 0, 0, 0, 271, 0, 0, - 65, 3, 118, 119, 120, 121, 122, 124, 123, 125, - 126, 22, 127, 128, 129, 130, 0, 0, 22, 0, - 0, 134, 132, 133, 138, 139, 140, 135, 141, 136, - 142, 137, 167, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 102, - 103, 104, 108, 0, 0, 0, 212, 0, 0, 107, - 105, 106, 110, 109, 111, 112, 113, 114, 115, 116, - 117, 102, 103, 104, 108, 0, 0, 0, 0, 0, - 0, 107, 105, 106, 110, 109, 111, 112, 113, 114, - 115, 116, 117, + 46, 47, 19, 20, 21, 0, 17, 0, 166, 0, + 19, 20, 21, 0, 17, 0, 301, 0, 19, 20, + 21, 50, 17, 49, 299, 57, 0, 51, 52, 54, + 55, 56, 59, 58, 60, 61, 64, 63, 62, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, + 17, 0, 9, 23, 26, 24, 25, 27, 14, 167, + 15, 23, 26, 24, 25, 27, 14, 0, 15, 23, + 26, 24, 25, 27, 14, 33, 15, 32, 0, 42, + 0, 34, 35, 37, 38, 39, 40, 41, 43, 44, + 45, 46, 47, 0, 0, 22, 0, 23, 26, 24, + 25, 27, 14, 22, 15, 131, 19, 20, 21, 0, + 17, 22, 166, 19, 20, 21, 0, 0, 0, 221, + 0, 0, 0, 118, 119, 120, 121, 122, 124, 123, + 125, 126, 0, 127, 128, 129, 130, 65, 3, 22, + 0, 0, 134, 132, 133, 138, 139, 140, 135, 141, + 136, 142, 137, 0, 0, 0, 0, 23, 26, 24, + 25, 27, 0, 0, 23, 26, 24, 25, 27, 168, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, + 102, 103, 104, 108, 0, 0, 22, 213, 0, 0, + 107, 105, 106, 110, 109, 111, 112, 113, 114, 115, + 116, 117, 102, 103, 104, 108, 0, 0, 0, 0, + 0, 0, 107, 105, 106, 110, 109, 111, 112, 113, + 114, 115, 116, 117, } var yyPact = [...]int{ - 778, -46, -55, 644, -1000, 584, -1000, -1000, -1000, 778, - -1000, 256, -1000, -6, 330, 329, -1000, 400, -1000, -1000, - -1000, -1000, 361, 328, 327, 319, 318, 316, -1000, 315, - 624, 314, 314, 314, 314, 314, 314, 314, 314, 314, - 314, 314, 314, 314, 314, 314, 314, 314, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 622, 115, 562, 766, 207, - 205, 944, 312, 312, 312, 312, 312, 312, -1000, -1000, - -1000, -1000, -1000, -1000, 820, 820, 820, 820, 820, 820, - 820, 454, 875, -1000, 526, 454, 454, 454, -1000, -1000, + 790, -43, -52, 654, -1000, 593, -1000, -1000, -1000, 790, + -1000, 256, -1000, -7, 363, 362, -1000, 408, -1000, -1000, + -1000, -1000, 445, 361, 360, 357, 356, 355, -1000, 354, + 634, 351, 351, 351, 351, 351, 351, 351, 351, 351, + 351, 351, 351, 351, 351, 351, 351, 351, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 632, 25, 571, 181, 236, + 149, 945, 350, 350, 350, 350, 350, 350, -1000, -1000, + -1000, -1000, -1000, -1000, 857, 857, 857, 857, 857, 857, + 857, 463, 846, -1000, 535, 463, 463, 463, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, 394, 393, 391, 137, 387, 386, 379, 178, 856, - 157, 105, 117, -1000, -1000, -1000, 200, 454, 454, 454, - 454, 358, -1000, 584, -1000, -1000, -1000, -1000, 311, 310, - 309, 303, 286, 281, 276, 813, 269, 765, 751, -1000, - -1000, -1000, -1000, 765, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 681, 242, -1000, -1000, -1000, - -1000, 681, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 735, -1000, -1000, -1000, -1000, - 63, -1000, 743, -14, -14, -89, -89, -89, -89, -18, - 820, -56, -56, -91, -91, -91, -91, 516, 237, -1000, - -1000, -1000, -1000, -1000, 454, 454, 454, 454, 454, 454, - 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, - 482, -78, -78, 16, 12, 5, 4, 366, 360, 3, - -16, -29, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 444, - 146, 97, 54, 227, -1000, -62, 198, 193, 875, 875, - 875, 875, 335, 562, 174, 191, 35, 751, -1000, 743, - -57, -1000, -1000, 875, -78, -78, -93, -93, -93, -60, - -60, -60, -60, -60, -60, -60, -60, -93, 42, 42, - -1000, -1000, -1000, -1000, -1000, -34, -47, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 358, 966, 51, 49, 183, - 170, 113, 145, 225, -1000, 735, -1000, -1000, -1000, -1000, - -1000, 268, 267, 46, 38, 380, 37, -1000, 349, 875, - 875, 266, 261, 222, -1000, -1000, 241, 220, 218, 203, - 875, 875, 372, 28, 875, -1000, 346, -1000, -1000, 189, - 179, -1000, -1000, 233, 177, 101, -1000, -1000, 875, -1000, - 340, 136, 140, -1000, -1000, + -1000, 501, 495, 473, 156, 472, 470, 469, 306, 377, + 169, 121, 140, -1000, -1000, -1000, 233, 463, 463, 463, + 463, 407, -1000, 593, -1000, -1000, -1000, -1000, 349, 344, + 337, 336, 334, 331, 329, 320, 850, 316, 745, 762, + -1000, -1000, -1000, -1000, 745, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, 691, 319, -1000, -1000, + -1000, -1000, 691, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, 746, -1000, -1000, -1000, + -1000, -20, -1000, 754, 47, 47, -91, -91, -91, -91, + -55, 857, -16, -16, -92, -92, -92, -92, 525, 313, + -1000, -1000, -1000, -1000, -1000, 463, 463, 463, 463, 463, + 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, + 463, 491, -76, -76, 51, 50, 48, 38, 440, 418, + 36, 33, 24, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + 452, 141, 98, 54, 311, -1000, -64, 220, 203, 846, + 846, 846, 846, 846, 375, 571, 89, 201, 5, 762, + -1000, 754, -59, -1000, -1000, 846, -76, -76, -94, -94, + -94, -62, -62, -62, -62, -62, -62, -62, -62, -94, + 43, 43, -1000, -1000, -1000, -1000, -1000, 4, 3, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 407, 967, 97, + 81, 199, 194, 182, 153, 171, 275, -1000, 746, -1000, + -1000, -1000, -1000, -1000, 308, 301, 78, 67, 28, 460, + 8, -1000, 403, 846, 846, 293, 290, 283, 273, -1000, + -1000, 269, 263, 261, 243, 846, 846, 846, 388, -17, + 846, -1000, 393, -1000, -1000, 241, 224, 222, -1000, -1000, + 266, 192, 147, -1000, -1000, -1000, 846, -1000, 384, 152, + 99, -1000, -1000, } var yyPgo = [...]int{ - 0, 442, 4, 441, 3, 13, 1, 900, 436, 29, - 7, 2, 351, 414, 413, 496, 16, 404, 403, 9, - 20, 6, 21, 5, 0, 28, 401, 8, 400, 399, + 0, 547, 4, 545, 3, 15, 1, 887, 544, 20, + 9, 2, 386, 543, 542, 449, 19, 541, 540, 8, + 22, 5, 24, 6, 0, 17, 539, 7, 520, 506, } var yyR1 = [...]int{ @@ -447,15 +450,15 @@ var yyR1 = [...]int{ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 27, 29, 28, 28, 20, 20, 20, 20, 20, + 13, 13, 13, 27, 29, 28, 28, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, + 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 23, 23, 23, 23, 23, 23, 23, - 23, 23, + 24, 24, 24, 24, 24, 23, 23, 23, 23, 23, + 23, 23, 23, 23, } var yyR2 = [...]int{ @@ -470,59 +473,60 @@ var yyR2 = [...]int{ 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 3, 7, 3, 7, - 4, 8, 4, 8, 6, 10, 4, 8, 4, 6, - 10, 3, 4, 1, 3, 3, 3, 3, 3, 3, + 4, 8, 4, 8, 4, 8, 6, 10, 4, 8, + 4, 6, 10, 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 3, 3, 3, 4, 4, 3, - 3, 3, + 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, + 4, 3, 3, 3, } var yyChk = [...]int{ -1000, -1, -9, -7, -14, -6, -11, -2, -4, 12, -8, -15, -10, -16, 62, 64, -17, 10, -19, 6, - 7, 8, 98, 57, 59, 60, 58, 61, -29, 73, - 74, 75, 81, 79, 85, 86, 76, 87, 88, 89, - 90, 91, 83, 92, 93, 94, 95, 96, 75, 81, - 79, 85, 86, 76, 87, 88, 89, 83, 91, 90, - 92, 93, 96, 95, 94, -7, -9, -6, -15, -18, - -16, -12, 97, 98, 100, 101, 102, 103, 77, 78, - 79, 80, 81, 82, -12, 97, 98, 100, 101, 102, - 103, 12, 12, 11, -20, 12, 98, 99, -21, -22, + 7, 8, 99, 57, 59, 60, 58, 61, -29, 74, + 75, 76, 82, 80, 86, 87, 77, 88, 89, 90, + 91, 92, 84, 93, 94, 95, 96, 97, 76, 82, + 80, 86, 87, 77, 88, 89, 90, 84, 92, 91, + 93, 94, 97, 96, 95, -7, -9, -6, -15, -18, + -16, -12, 98, 99, 101, 102, 103, 104, 78, 79, + 80, 81, 82, 83, -12, 98, 99, 101, 102, 103, + 104, 12, 12, 11, -20, 12, 99, 100, -21, -22, -23, -24, 5, 6, 7, 16, 17, 15, 8, 19, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 32, 34, 35, 37, 38, 39, 40, 9, 47, 48, 46, 52, 54, 56, 49, 50, 51, 53, 55, 6, 7, 8, 12, 12, 12, 12, 12, 12, -13, -6, -11, -2, -3, -4, 66, 67, - 68, 69, 70, 71, 72, 12, 63, -7, 12, -7, + 68, 69, 70, 71, 72, 73, 12, 63, -7, 12, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -6, 12, -6, -6, -6, + -7, -7, -7, -7, -7, -7, -6, 12, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, 13, 13, 74, 13, 13, 13, 13, - -15, -21, 12, -15, -15, -15, -15, -15, -15, -16, - 12, -16, -16, -16, -16, -16, -16, -20, -5, -25, - -22, -23, -24, 11, 97, 98, 100, 101, 102, 77, - 78, 79, 80, 81, 82, 84, 83, 103, 75, 76, - -20, -20, -20, 4, 4, 4, 4, 47, 48, 4, - 4, 4, 27, 34, 36, 41, 27, 29, 33, 30, - 31, 41, 29, 44, 42, 43, 29, 45, 13, -20, - -20, -20, -20, -28, -27, 4, 12, 12, 12, 12, - 12, 12, 12, -6, -16, 12, -9, 12, -19, 12, - -9, 13, 13, 14, -20, -20, -20, -20, -20, -20, + -6, -6, -6, -6, 13, 13, 75, 13, 13, 13, + 13, -15, -21, 12, -15, -15, -15, -15, -15, -15, + -16, 12, -16, -16, -16, -16, -16, -16, -20, -5, + -25, -22, -23, -24, 11, 98, 99, 101, 102, 103, + 78, 79, 80, 81, 82, 83, 85, 84, 104, 76, + 77, -20, -20, -20, 4, 4, 4, 4, 47, 48, + 4, 4, 4, 27, 34, 36, 41, 27, 29, 33, + 30, 31, 41, 29, 44, 42, 43, 29, 45, 13, + -20, -20, -20, -20, -28, -27, 4, 12, 12, 12, + 12, 12, 12, 12, 12, -6, -16, 12, -9, 12, + -19, 12, -9, 13, 13, 14, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - 13, 65, 65, 65, 65, 4, 4, 65, 65, 65, - 13, 13, 13, 13, 13, 14, 77, 13, 13, -25, - -25, -25, -25, -10, 13, 74, -25, 65, 65, -27, - -21, 62, 62, 13, 13, 14, 13, 13, 14, 12, - 12, 62, 62, -26, 7, 6, 62, 6, -5, -5, - 12, 12, 14, 13, 12, 13, 14, 13, 13, -5, - -5, 7, 6, 62, -5, 6, 13, 13, 12, 13, - 14, -5, 6, 13, 13, + -20, -20, 13, 65, 65, 65, 65, 4, 4, 65, + 65, 65, 13, 13, 13, 13, 13, 14, 78, 13, + 13, -25, -25, -25, -25, -25, -10, 13, 75, -25, + 65, 65, -27, -21, 62, 62, 13, 13, 13, 14, + 13, 13, 14, 12, 12, 62, 62, 62, -26, 7, + 6, 62, 6, -5, -5, 12, 12, 12, 14, 13, + 12, 13, 14, 13, 13, -5, -5, -5, 7, 6, + 62, -5, 6, 13, 13, 13, 12, 13, 14, -5, + 6, 13, 13, } var yyDef = [...]int{ @@ -535,37 +539,38 @@ var yyDef = [...]int{ 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 71, 72, 73, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66, 0, 0, 0, 0, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66, 0, 0, 0, 0, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 99, 100, 0, 0, 0, 0, 0, 0, 4, 30, 31, 32, 33, 34, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, 0, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 48, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 6, 25, 0, 47, 77, 85, 87, - 75, 76, 0, 78, 79, 80, 81, 82, 83, 68, - 0, 88, 89, 90, 91, 92, 93, 0, 0, 41, - 38, 39, 40, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 48, 0, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 6, 25, 0, 47, 77, 85, + 87, 75, 76, 0, 78, 79, 80, 81, 82, 83, + 68, 0, 88, 89, 90, 91, 92, 93, 0, 0, + 41, 38, 39, 40, 67, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 144, 145, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 101, + 0, 0, 0, 0, 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 142, 143, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 101, 0, - 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, - 0, 35, 37, 0, 126, 127, 128, 129, 130, 131, + -2, 0, 0, 35, 37, 0, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 125, 193, 194, 195, 196, 0, 0, 199, 200, 201, - 102, 103, 104, 105, 122, 0, 0, 106, 108, 0, - 0, 0, 0, 0, 36, 0, 42, 197, 198, 124, - 121, 0, 0, 110, 112, 0, 116, 118, 0, 0, - 0, 0, 0, 0, 43, 44, 0, 0, 0, 0, - 0, 0, 0, 114, 0, 119, 0, 107, 109, 0, - 0, 45, 46, 0, 0, 0, 111, 113, 0, 117, - 0, 0, 0, 115, 120, + 142, 143, 127, 195, 196, 197, 198, 0, 0, 201, + 202, 203, 102, 103, 104, 105, 124, 0, 0, 106, + 108, 0, 0, 0, 0, 0, 0, 36, 0, 42, + 199, 200, 126, 123, 0, 0, 110, 112, 114, 0, + 118, 120, 0, 0, 0, 0, 0, 0, 0, 43, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 116, + 0, 121, 0, 107, 109, 0, 0, 0, 45, 46, + 0, 0, 0, 111, 113, 115, 0, 119, 0, 0, + 0, 117, 122, } var yyTok1 = [...]int{ @@ -583,7 +588,7 @@ var yyTok2 = [...]int{ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, + 102, 103, 104, } var yyTok3 = [...]int{ 0, @@ -1605,530 +1610,542 @@ yydefault: yyVAL.metricsAggregation = newMetricsAggregateWithAttr(metricsAggregateMaxOverTime, yyDollar[3].attribute, yyDollar[7].attributeList) } case 114: - yyDollar = yyS[yypt-6 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:305 { - yyVAL.metricsAggregation = newMetricsAggregateQuantileOverTime(yyDollar[3].attribute, yyDollar[5].numericList, nil) + yyVAL.metricsAggregation = newAverageOverTimeMetricsAggregator(yyDollar[3].attribute, nil) } case 115: - yyDollar = yyS[yypt-10 : yypt+1] + yyDollar = yyS[yypt-8 : yypt+1] //line pkg/traceql/expr.y:306 { - yyVAL.metricsAggregation = newMetricsAggregateQuantileOverTime(yyDollar[3].attribute, yyDollar[5].numericList, yyDollar[9].attributeList) + yyVAL.metricsAggregation = newAverageOverTimeMetricsAggregator(yyDollar[3].attribute, yyDollar[7].attributeList) } case 116: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-6 : yypt+1] //line pkg/traceql/expr.y:307 { - yyVAL.metricsAggregation = newMetricsAggregateWithAttr(metricsAggregateHistogramOverTime, yyDollar[3].attribute, nil) + yyVAL.metricsAggregation = newMetricsAggregateQuantileOverTime(yyDollar[3].attribute, yyDollar[5].numericList, nil) } case 117: - yyDollar = yyS[yypt-8 : yypt+1] + yyDollar = yyS[yypt-10 : yypt+1] //line pkg/traceql/expr.y:308 { - yyVAL.metricsAggregation = newMetricsAggregateWithAttr(metricsAggregateHistogramOverTime, yyDollar[3].attribute, yyDollar[7].attributeList) + yyVAL.metricsAggregation = newMetricsAggregateQuantileOverTime(yyDollar[3].attribute, yyDollar[5].numericList, yyDollar[9].attributeList) } case 118: yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:309 { - yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, 10, 0, 0) + yyVAL.metricsAggregation = newMetricsAggregateWithAttr(metricsAggregateHistogramOverTime, yyDollar[3].attribute, nil) } case 119: - yyDollar = yyS[yypt-6 : yypt+1] + yyDollar = yyS[yypt-8 : yypt+1] //line pkg/traceql/expr.y:310 { - yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, yyDollar[5].staticInt, 0, 0) + yyVAL.metricsAggregation = newMetricsAggregateWithAttr(metricsAggregateHistogramOverTime, yyDollar[3].attribute, yyDollar[7].attributeList) } case 120: - yyDollar = yyS[yypt-10 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:311 { - yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, yyDollar[5].staticInt, yyDollar[7].staticInt, yyDollar[9].staticInt) + yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, 10, 0, 0) } case 121: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:318 + yyDollar = yyS[yypt-6 : yypt+1] +//line pkg/traceql/expr.y:312 { - yyVAL.hint = newHint(yyDollar[1].staticStr, yyDollar[3].static) + yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, yyDollar[5].staticInt, 0, 0) } case 122: - yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:322 + yyDollar = yyS[yypt-10 : yypt+1] +//line pkg/traceql/expr.y:313 { - yyVAL.hints = newHints(yyDollar[3].hintList) + yyVAL.metricsAggregation = newMetricsCompare(yyDollar[3].spansetFilter, yyDollar[5].staticInt, yyDollar[7].staticInt, yyDollar[9].staticInt) } case 123: - yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:326 + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:320 { - yyVAL.hintList = []*Hint{yyDollar[1].hint} + yyVAL.hint = newHint(yyDollar[1].staticStr, yyDollar[3].static) } case 124: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:327 + yyDollar = yyS[yypt-4 : yypt+1] +//line pkg/traceql/expr.y:324 { - yyVAL.hintList = append(yyDollar[1].hintList, yyDollar[3].hint) + yyVAL.hints = newHints(yyDollar[3].hintList) } case 125: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:335 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:328 { - yyVAL.fieldExpression = yyDollar[2].fieldExpression + yyVAL.hintList = []*Hint{yyDollar[1].hint} } case 126: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:336 +//line pkg/traceql/expr.y:329 { - yyVAL.fieldExpression = newBinaryOperation(OpAdd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.hintList = append(yyDollar[1].hintList, yyDollar[3].hint) } case 127: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:337 { - yyVAL.fieldExpression = newBinaryOperation(OpSub, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = yyDollar[2].fieldExpression } case 128: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:338 { - yyVAL.fieldExpression = newBinaryOperation(OpMult, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpAdd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 129: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:339 { - yyVAL.fieldExpression = newBinaryOperation(OpDiv, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpSub, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 130: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:340 { - yyVAL.fieldExpression = newBinaryOperation(OpMod, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpMult, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 131: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:341 { - yyVAL.fieldExpression = newBinaryOperation(OpEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpDiv, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 132: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:342 { - yyVAL.fieldExpression = newBinaryOperation(OpNotEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpMod, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 133: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:343 { - yyVAL.fieldExpression = newBinaryOperation(OpLess, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 134: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:344 { - yyVAL.fieldExpression = newBinaryOperation(OpLessEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpNotEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 135: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:345 { - yyVAL.fieldExpression = newBinaryOperation(OpGreater, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpLess, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 136: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:346 { - yyVAL.fieldExpression = newBinaryOperation(OpGreaterEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpLessEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 137: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:347 { - yyVAL.fieldExpression = newBinaryOperation(OpRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpGreater, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 138: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:348 { - yyVAL.fieldExpression = newBinaryOperation(OpNotRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpGreaterEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 139: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:349 { - yyVAL.fieldExpression = newBinaryOperation(OpPower, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 140: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:350 { - yyVAL.fieldExpression = newBinaryOperation(OpAnd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpNotRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 141: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:351 { - yyVAL.fieldExpression = newBinaryOperation(OpOr, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpPower, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 142: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:352 { - yyVAL.fieldExpression = newUnaryOperation(OpSub, yyDollar[2].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpAnd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 143: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:353 { - yyVAL.fieldExpression = newUnaryOperation(OpNot, yyDollar[2].fieldExpression) + yyVAL.fieldExpression = newBinaryOperation(OpOr, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } case 144: - yyDollar = yyS[yypt-1 : yypt+1] + yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:354 { - yyVAL.fieldExpression = yyDollar[1].static + yyVAL.fieldExpression = newUnaryOperation(OpSub, yyDollar[2].fieldExpression) } case 145: - yyDollar = yyS[yypt-1 : yypt+1] + yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:355 { - yyVAL.fieldExpression = yyDollar[1].intrinsicField + yyVAL.fieldExpression = newUnaryOperation(OpNot, yyDollar[2].fieldExpression) } case 146: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:356 { - yyVAL.fieldExpression = yyDollar[1].attributeField + yyVAL.fieldExpression = yyDollar[1].static } case 147: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:357 { - yyVAL.fieldExpression = yyDollar[1].scopedIntrinsicField + yyVAL.fieldExpression = yyDollar[1].intrinsicField } case 148: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:364 +//line pkg/traceql/expr.y:358 { - yyVAL.static = NewStaticString(yyDollar[1].staticStr) + yyVAL.fieldExpression = yyDollar[1].attributeField } case 149: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:365 +//line pkg/traceql/expr.y:359 { - yyVAL.static = NewStaticInt(yyDollar[1].staticInt) + yyVAL.fieldExpression = yyDollar[1].scopedIntrinsicField } case 150: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:366 { - yyVAL.static = NewStaticFloat(yyDollar[1].staticFloat) + yyVAL.static = NewStaticString(yyDollar[1].staticStr) } case 151: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:367 { - yyVAL.static = NewStaticBool(true) + yyVAL.static = NewStaticInt(yyDollar[1].staticInt) } case 152: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:368 { - yyVAL.static = NewStaticBool(false) + yyVAL.static = NewStaticFloat(yyDollar[1].staticFloat) } case 153: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:369 { - yyVAL.static = NewStaticNil() + yyVAL.static = NewStaticBool(true) } case 154: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:370 { - yyVAL.static = NewStaticDuration(yyDollar[1].staticDuration) + yyVAL.static = NewStaticBool(false) } case 155: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:371 { - yyVAL.static = NewStaticStatus(StatusOk) + yyVAL.static = NewStaticNil() } case 156: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:372 { - yyVAL.static = NewStaticStatus(StatusError) + yyVAL.static = NewStaticDuration(yyDollar[1].staticDuration) } case 157: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:373 { - yyVAL.static = NewStaticStatus(StatusUnset) + yyVAL.static = NewStaticStatus(StatusOk) } case 158: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:374 { - yyVAL.static = NewStaticKind(KindUnspecified) + yyVAL.static = NewStaticStatus(StatusError) } case 159: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:375 { - yyVAL.static = NewStaticKind(KindInternal) + yyVAL.static = NewStaticStatus(StatusUnset) } case 160: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:376 { - yyVAL.static = NewStaticKind(KindServer) + yyVAL.static = NewStaticKind(KindUnspecified) } case 161: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:377 { - yyVAL.static = NewStaticKind(KindClient) + yyVAL.static = NewStaticKind(KindInternal) } case 162: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:378 { - yyVAL.static = NewStaticKind(KindProducer) + yyVAL.static = NewStaticKind(KindServer) } case 163: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:379 { - yyVAL.static = NewStaticKind(KindConsumer) + yyVAL.static = NewStaticKind(KindClient) } case 164: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:385 +//line pkg/traceql/expr.y:380 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicDuration) + yyVAL.static = NewStaticKind(KindProducer) } case 165: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:386 +//line pkg/traceql/expr.y:381 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicChildCount) + yyVAL.static = NewStaticKind(KindConsumer) } case 166: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:387 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicName) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicDuration) } case 167: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:388 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatus) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicChildCount) } case 168: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:389 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatusMessage) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicName) } case 169: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:390 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicKind) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatus) } case 170: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:391 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicParent) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatusMessage) } case 171: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:392 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicKind) } case 172: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:393 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootService) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicParent) } case 173: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:394 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceDuration) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) } case 174: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:395 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetLeft) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootService) } case 175: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:396 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetRight) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceDuration) } case 176: yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:397 { - yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetParent) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetLeft) } case 177: - yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:402 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:398 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceDuration) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetRight) } case 178: - yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:403 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:399 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) + yyVAL.intrinsicField = NewIntrinsic(IntrinsicNestedSetParent) } case 179: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:404 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceRootService) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceDuration) } case 180: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:405 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceID) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) } case 181: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:407 +//line pkg/traceql/expr.y:406 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicDuration) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceRootService) } case 182: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:408 +//line pkg/traceql/expr.y:407 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicName) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicTraceID) } case 183: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:409 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicKind) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicDuration) } case 184: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:410 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicStatus) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicName) } case 185: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:411 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicStatusMessage) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicKind) } case 186: yyDollar = yyS[yypt-2 : yypt+1] //line pkg/traceql/expr.y:412 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicSpanID) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicStatus) } case 187: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:414 +//line pkg/traceql/expr.y:413 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicEventName) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicStatusMessage) } case 188: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:415 +//line pkg/traceql/expr.y:414 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicEventTimeSinceStart) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicSpanID) } case 189: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:417 +//line pkg/traceql/expr.y:416 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicLinkTraceID) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicEventName) } case 190: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:418 +//line pkg/traceql/expr.y:417 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicLinkSpanID) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicEventTimeSinceStart) } case 191: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:420 +//line pkg/traceql/expr.y:419 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicInstrumentationName) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicLinkTraceID) } case 192: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:421 +//line pkg/traceql/expr.y:420 { - yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicInstrumentationVersion) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicLinkSpanID) } case 193: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:425 + yyDollar = yyS[yypt-2 : yypt+1] +//line pkg/traceql/expr.y:422 { - yyVAL.attributeField = NewAttribute(yyDollar[2].staticStr) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicInstrumentationName) } case 194: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:426 + yyDollar = yyS[yypt-2 : yypt+1] +//line pkg/traceql/expr.y:423 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, false, yyDollar[2].staticStr) + yyVAL.scopedIntrinsicField = NewIntrinsic(IntrinsicInstrumentationVersion) } case 195: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:427 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, false, yyDollar[2].staticStr) + yyVAL.attributeField = NewAttribute(yyDollar[2].staticStr) } case 196: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:428 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeNone, true, yyDollar[2].staticStr) + yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, false, yyDollar[2].staticStr) } case 197: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:429 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, true, yyDollar[3].staticStr) + yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, false, yyDollar[2].staticStr) } case 198: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:430 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, true, yyDollar[3].staticStr) + yyVAL.attributeField = NewScopedAttribute(AttributeScopeNone, true, yyDollar[2].staticStr) } case 199: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:431 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeEvent, false, yyDollar[2].staticStr) + yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, true, yyDollar[3].staticStr) } case 200: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:432 { - yyVAL.attributeField = NewScopedAttribute(AttributeScopeLink, false, yyDollar[2].staticStr) + yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, true, yyDollar[3].staticStr) } case 201: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:433 + { + yyVAL.attributeField = NewScopedAttribute(AttributeScopeEvent, false, yyDollar[2].staticStr) + } + case 202: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:434 + { + yyVAL.attributeField = NewScopedAttribute(AttributeScopeLink, false, yyDollar[2].staticStr) + } + case 203: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:435 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeInstrumentation, false, yyDollar[2].staticStr) } diff --git a/pkg/traceql/lexer.go b/pkg/traceql/lexer.go index 1960c9c9551..2306b34ca71 100644 --- a/pkg/traceql/lexer.go +++ b/pkg/traceql/lexer.go @@ -104,6 +104,7 @@ var tokens = map[string]int{ "count_over_time": COUNT_OVER_TIME, "min_over_time": MIN_OVER_TIME, "max_over_time": MAX_OVER_TIME, + "avg_over_time": AVG_OVER_TIME, "quantile_over_time": QUANTILE_OVER_TIME, "histogram_over_time": HISTOGRAM_OVER_TIME, "compare": COMPARE, diff --git a/pkg/traceql/parse_test.go b/pkg/traceql/parse_test.go index c23101858a0..fe24606e00a 100644 --- a/pkg/traceql/parse_test.go +++ b/pkg/traceql/parse_test.go @@ -1393,6 +1393,18 @@ func TestMetrics(t *testing.T) { }), ), }, + { + in: `{ } | avg_over_time(duration) by(name, span.http.status_code)`, + expected: newRootExprWithMetrics( + newPipeline(newSpansetFilter(NewStaticBool(true))), + newAverageOverTimeMetricsAggregator( + NewIntrinsic(IntrinsicDuration), + []Attribute{ + NewIntrinsic(IntrinsicName), + NewScopedAttribute(AttributeScopeSpan, false, "http.status_code"), + }), + ), + }, { in: `{ } | quantile_over_time(duration, 0, 0.90, 0.95, 1) by(name, span.http.status_code)`, expected: newRootExprWithMetrics( diff --git a/pkg/traceql/test_examples.yaml b/pkg/traceql/test_examples.yaml index 69c7da8dcf0..836fbaa3dbe 100644 --- a/pkg/traceql/test_examples.yaml +++ b/pkg/traceql/test_examples.yaml @@ -145,6 +145,8 @@ valid: - '{} | rate()' - '{} | count_over_time() by (name) with(sample=0.1)' - '{} | min_over_time(duration) by (span.http.path)' + - '{} | max_over_time(duration) by (span.http.path)' + - '{} | avg_over_time(duration) by (span.http.path)' - '{} | quantile_over_time(duration, 0, 0.9, 1) by (span.http.path)' # undocumented - nested set - '{ nestedSetLeft > 3 }' diff --git a/pkg/usagestats/reporter.go b/pkg/usagestats/reporter.go index 843b079b96d..ef026c45701 100644 --- a/pkg/usagestats/reporter.go +++ b/pkg/usagestats/reporter.go @@ -18,6 +18,7 @@ import ( "github.com/grafana/dskit/multierror" "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" + "go.opentelemetry.io/otel" "github.com/grafana/tempo/cmd/tempo/build" "github.com/grafana/tempo/tempodb/backend" @@ -36,6 +37,8 @@ var ( stabilityCheckInterval = 5 * time.Second stabilityMinimumRequired = 6 + + tracer = otel.Tracer("usagestats/Reporter") ) type Reporter struct { @@ -158,6 +161,9 @@ func ensureStableKey(ctx context.Context, kvClient kv.Client, logger log.Logger) } func (rep *Reporter) init(ctx context.Context) { + ctx, span := tracer.Start(ctx, "UsageReporter.init") + defer span.End() + if rep.conf.Leader { rep.cluster = rep.initLeader(ctx) return diff --git a/tempodb/backend/local/local.go b/tempodb/backend/local/local.go index b75edd585f1..3c738ff8cfc 100644 --- a/tempodb/backend/local/local.go +++ b/tempodb/backend/local/local.go @@ -30,7 +30,7 @@ var ( ) func NewBackend(cfg *Config) (*Backend, error) { - err := os.MkdirAll(cfg.Path, os.ModePerm) + err := os.MkdirAll(cfg.Path, 0o700) if err != nil { return nil, err } @@ -54,7 +54,7 @@ func (rw *Backend) Write(ctx context.Context, name string, keypath backend.KeyPa } blockFolder := rw.rootPath(keypath) - err := os.MkdirAll(blockFolder, os.ModePerm) + err := os.MkdirAll(blockFolder, 0o700) if err != nil { return err } @@ -87,7 +87,7 @@ func (rw *Backend) Append(ctx context.Context, name string, keypath backend.KeyP var dst *os.File if tracker == nil { blockFolder := rw.rootPath(keypath) - err := os.MkdirAll(blockFolder, os.ModePerm) + err := os.MkdirAll(blockFolder, 0o700) if err != nil { return nil, err } @@ -234,7 +234,7 @@ func (rw *Backend) Read(ctx context.Context, name string, keypath backend.KeyPat filename := rw.objectFileName(keypath, name) - f, err := os.OpenFile(filename, os.O_RDONLY, 0o644) + f, err := os.OpenFile(filename, os.O_RDONLY, 0o600) if err != nil { return nil, -1, readError(err) } @@ -262,7 +262,7 @@ func (rw *Backend) ReadRange(ctx context.Context, name string, keypath backend.K filename := rw.objectFileName(keypath, name) - f, err := os.OpenFile(filename, os.O_RDONLY, 0o644) + f, err := os.OpenFile(filename, os.O_RDONLY, 0o600) if err != nil { return readError(err) } diff --git a/tempodb/blocklist/poller.go b/tempodb/blocklist/poller.go index 8e611af869e..03b62e28a45 100644 --- a/tempodb/blocklist/poller.go +++ b/tempodb/blocklist/poller.go @@ -148,7 +148,7 @@ func (p *Poller) Do(previous *List) (PerTenant, PerTenantCompacted, error) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - _, span := tracer.Start(ctx, "Poller.Do") + ctx, span := tracer.Start(ctx, "Poller.Do") defer span.End() tenants, err := p.reader.Tenants(ctx) diff --git a/tempodb/encoding/v2/wal_block.go b/tempodb/encoding/v2/wal_block.go index e128883be79..7f4f8aca7b3 100644 --- a/tempodb/encoding/v2/wal_block.go +++ b/tempodb/encoding/v2/wal_block.go @@ -62,7 +62,7 @@ func createWALBlock(meta *backend.BlockMeta, filepath, dataEncoding string, inge name := h.fullFilename() - f, err := os.OpenFile(name, os.O_APPEND|os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644) + f, err := os.OpenFile(name, os.O_APPEND|os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o600) if err != nil { return nil, err } @@ -350,7 +350,7 @@ func (a *walBlock) file() (*os.File, error) { if a.readFile == nil { name := a.fullFilename() - a.readFile, err = os.OpenFile(name, os.O_RDONLY, 0o644) + a.readFile, err = os.OpenFile(name, os.O_RDONLY, 0o600) } }) diff --git a/tempodb/encoding/vparquet2/schema_test.go b/tempodb/encoding/vparquet2/schema_test.go index 9ddb4925f3d..0ceb2cf3141 100644 --- a/tempodb/encoding/vparquet2/schema_test.go +++ b/tempodb/encoding/vparquet2/schema_test.go @@ -394,7 +394,7 @@ func TestParquetRowSizeEstimate(t *testing.T) { } func estimateRowSize(t *testing.T, name string) { - f, err := os.OpenFile(name, os.O_RDONLY, 0o644) + f, err := os.OpenFile(name, os.O_RDONLY, 0o600) require.NoError(t, err) fi, err := f.Stat() diff --git a/tempodb/encoding/vparquet2/wal_block.go b/tempodb/encoding/vparquet2/wal_block.go index 583e312f13b..6b7f451b638 100644 --- a/tempodb/encoding/vparquet2/wal_block.go +++ b/tempodb/encoding/vparquet2/wal_block.go @@ -166,7 +166,7 @@ func createWALBlock(meta *backend.BlockMeta, filepath, dataEncoding string, inge } // build folder - err := os.MkdirAll(b.walPath(), os.ModePerm) + err := os.MkdirAll(b.walPath(), 0o700) if err != nil { return nil, err } @@ -216,7 +216,7 @@ func (w *walBlockFlush) file(ctx context.Context) (*pageFile, error) { return nil, err } - file, err := os.OpenFile(w.path, os.O_RDONLY, 0o644) + file, err := os.OpenFile(w.path, os.O_RDONLY, 0o600) if err != nil { return nil, fmt.Errorf("error opening file: %w", err) } @@ -376,7 +376,7 @@ func (b *walBlock) openWriter() (err error) { nextFile := len(b.flushed) + 1 filename := b.filepathOf(nextFile) - b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o644) + b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o600) if err != nil { return fmt.Errorf("error opening file: %w", err) } diff --git a/tempodb/encoding/vparquet3/schema_test.go b/tempodb/encoding/vparquet3/schema_test.go index 18aa8d4dcf0..768366e6bee 100644 --- a/tempodb/encoding/vparquet3/schema_test.go +++ b/tempodb/encoding/vparquet3/schema_test.go @@ -441,7 +441,7 @@ func TestParquetRowSizeEstimate(t *testing.T) { } func estimateRowSize(t *testing.T, name string) { - f, err := os.OpenFile(name, os.O_RDONLY, 0o644) + f, err := os.OpenFile(name, os.O_RDONLY, 0o600) require.NoError(t, err) fi, err := f.Stat() diff --git a/tempodb/encoding/vparquet3/wal_block.go b/tempodb/encoding/vparquet3/wal_block.go index d58d1ff6c52..7d9e639e6e3 100644 --- a/tempodb/encoding/vparquet3/wal_block.go +++ b/tempodb/encoding/vparquet3/wal_block.go @@ -164,7 +164,7 @@ func createWALBlock(meta *backend.BlockMeta, filepath, dataEncoding string, inge } // build folder - err := os.MkdirAll(b.walPath(), os.ModePerm) + err := os.MkdirAll(b.walPath(), 0o700) if err != nil { return nil, err } @@ -214,7 +214,7 @@ func (w *walBlockFlush) file(ctx context.Context) (*pageFile, error) { return nil, err } - file, err := os.OpenFile(w.path, os.O_RDONLY, 0o644) + file, err := os.OpenFile(w.path, os.O_RDONLY, 0o600) if err != nil { return nil, fmt.Errorf("error opening file: %w", err) } @@ -387,7 +387,7 @@ func (b *walBlock) openWriter() (err error) { nextFile := len(b.flushed) + 1 filename := b.filepathOf(nextFile) - b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o644) + b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o600) if err != nil { return fmt.Errorf("error opening file: %w", err) } diff --git a/tempodb/encoding/vparquet4/schema_test.go b/tempodb/encoding/vparquet4/schema_test.go index 81233d929dd..9681a569232 100644 --- a/tempodb/encoding/vparquet4/schema_test.go +++ b/tempodb/encoding/vparquet4/schema_test.go @@ -847,7 +847,7 @@ func TestParquetRowSizeEstimate(t *testing.T) { } func estimateRowSize(t *testing.T, name string) { - f, err := os.OpenFile(name, os.O_RDONLY, 0o644) + f, err := os.OpenFile(name, os.O_RDONLY, 0o600) require.NoError(t, err) fi, err := f.Stat() diff --git a/tempodb/encoding/vparquet4/wal_block.go b/tempodb/encoding/vparquet4/wal_block.go index dcb476bd856..2fc8fcb2934 100644 --- a/tempodb/encoding/vparquet4/wal_block.go +++ b/tempodb/encoding/vparquet4/wal_block.go @@ -164,7 +164,7 @@ func createWALBlock(meta *backend.BlockMeta, filepath, dataEncoding string, inge } // build folder - err := os.MkdirAll(b.walPath(), os.ModePerm) + err := os.MkdirAll(b.walPath(), 0o700) if err != nil { return nil, err } @@ -214,7 +214,7 @@ func (w *walBlockFlush) file(ctx context.Context) (*pageFile, error) { return nil, err } - file, err := os.OpenFile(w.path, os.O_RDONLY, 0o644) + file, err := os.OpenFile(w.path, os.O_RDONLY, 0o600) if err != nil { return nil, fmt.Errorf("error opening file: %w", err) } @@ -388,7 +388,7 @@ func (b *walBlock) openWriter() (err error) { nextFile := len(b.flushed) + 1 filename := b.filepathOf(nextFile) - b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o644) + b.file, err = os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0o600) if err != nil { return fmt.Errorf("error opening file: %w", err) } diff --git a/tempodb/wal/wal.go b/tempodb/wal/wal.go index d18a535a2d3..055bbb61f5d 100644 --- a/tempodb/wal/wal.go +++ b/tempodb/wal/wal.go @@ -46,14 +46,14 @@ func New(c *Config) (*WAL, error) { } // make folder - err := os.MkdirAll(c.Filepath, os.ModePerm) + err := os.MkdirAll(c.Filepath, 0o700) if err != nil { return nil, err } // Setup local backend in /blocks/ blocksFolderPath := filepath.Join(c.Filepath, blocksDir) - err = os.MkdirAll(blocksFolderPath, os.ModePerm) + err = os.MkdirAll(blocksFolderPath, 0o700) if err != nil { return nil, err } diff --git a/tempodb/wal/wal_test.go b/tempodb/wal/wal_test.go index 705c96d7e81..51d1b45f341 100644 --- a/tempodb/wal/wal_test.go +++ b/tempodb/wal/wal_test.go @@ -336,15 +336,15 @@ func TestInvalidFilesAndFoldersAreHandled(t *testing.T) { } // create unparseable filename - err = os.WriteFile(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e:tenant:v2:notanencoding"), []byte{}, 0o644) + err = os.WriteFile(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e:tenant:v2:notanencoding"), []byte{}, 0o600) require.NoError(t, err) // create empty block - err = os.WriteFile(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e:blerg:v2:gzip"), []byte{}, 0o644) + err = os.WriteFile(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e:blerg:v2:gzip"), []byte{}, 0o600) require.NoError(t, err) // create unparseable block - require.NoError(t, os.MkdirAll(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e+tenant+vOther"), os.ModePerm)) + require.NoError(t, os.MkdirAll(filepath.Join(tempDir, "fe0b83eb-a86b-4b6c-9a74-dc272cd5700e+tenant+vOther"), 0o700)) blocks, err := wal.RescanBlocks(0, log.NewNopLogger()) require.NoError(t, err, "unexpected error getting blocks") diff --git a/vendor/github.com/brianvoe/gofakeit/v6/.gitignore b/vendor/github.com/brianvoe/gofakeit/v6/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/vendor/github.com/brianvoe/gofakeit/v6/BENCHMARKS.md b/vendor/github.com/brianvoe/gofakeit/v6/BENCHMARKS.md deleted file mode 100644 index 2568ecf0bf6..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/BENCHMARKS.md +++ /dev/null @@ -1,458 +0,0 @@ -go test -bench=. -benchmem -goos: linux -goarch: amd64 -pkg: github.com/brianvoe/gofakeit/v6 -cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz -Table generated with tablesgenerator.com/markdown_tables - -| Benchmark | Ops | CPU | MEM | MEM alloc | -|--------------------------------------------------|------------|------------------|----------------|-------------------| -| BenchmarkAddress/package-8 | 1270872 | 940.1 ns/op | 197 B/op | 5 allocs/op | -| BenchmarkAddress/Faker_math-8 | 1238563 | 1042 ns/op | 197 B/op | 5 allocs/op | -| BenchmarkAddress/Faker_crypto-8 | 139857 | 7862 ns/op | 197 B/op | 5 allocs/op | -| BenchmarkStreet/package-8 | 2955518 | 422.6 ns/op | 26 B/op | 2 allocs/op | -| BenchmarkStreet/Faker_math-8 | 3027224 | 427.3 ns/op | 26 B/op | 2 allocs/op | -| BenchmarkStreet/Faker_crypto-8 | 352165 | 3559 ns/op | 26 B/op | 2 allocs/op | -| BenchmarkStreetNumber/package-8 | 6842211 | 149.2 ns/op | 4 B/op | 1 allocs/op | -| BenchmarkStreetNumber/Faker_math-8 | 6924288 | 158.8 ns/op | 4 B/op | 1 allocs/op | -| BenchmarkStreetNumber/Faker_crypto-8 | 549988 | 1900 ns/op | 4 B/op | 1 allocs/op | -| BenchmarkStreetPrefix/package-8 | 18441643 | 74.12 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetPrefix/Faker_math-8 | 17888110 | 67.51 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetPrefix/Faker_crypto-8 | 2650390 | 458.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetName/package-8 | 18799832 | 62.90 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetName/Faker_math-8 | 16124620 | 63.57 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetName/Faker_crypto-8 | 2873138 | 428.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetSuffix/package-8 | 17192164 | 72.19 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetSuffix/Faker_math-8 | 16545355 | 65.44 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStreetSuffix/Faker_crypto-8 | 2986934 | 450.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCity/package-8 | 18553683 | 64.93 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCity/Faker_math-8 | 17648109 | 63.77 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCity/Faker_crypto-8 | 2567427 | 470.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkState/package-8 | 18262387 | 66.25 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkState/Faker_math-8 | 16690209 | 73.21 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkState/Faker_crypto-8 | 2599795 | 401.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStateAbr/package-8 | 17492332 | 63.87 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStateAbr/Faker_math-8 | 18612169 | 64.82 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkStateAbr/Faker_crypto-8 | 2821579 | 460.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkZip/package-8 | 7573238 | 157.1 ns/op | 5 B/op | 1 allocs/op | -| BenchmarkZip/Faker_math-8 | 6644562 | 163.4 ns/op | 5 B/op | 1 allocs/op | -| BenchmarkZip/Faker_crypto-8 | 484525 | 2470 ns/op | 5 B/op | 1 allocs/op | -| BenchmarkCountry/package-8 | 15623450 | 65.65 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCountry/Faker_math-8 | 17786485 | 76.22 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCountry/Faker_crypto-8 | 3002818 | 400.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCountryAbr/package-8 | 17296935 | 66.75 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCountryAbr/Faker_math-8 | 17862819 | 67.41 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCountryAbr/Faker_crypto-8 | 2931120 | 426.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitude/package-8 | 46248466 | 26.11 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitude/Faker_math-8 | 46120956 | 26.00 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitude/Faker_crypto-8 | 3512108 | 366.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitude/package-8 | 47443129 | 24.03 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitude/Faker_math-8 | 46691144 | 24.64 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitude/Faker_crypto-8 | 3501789 | 365.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitudeInRange/package-8 | 44125588 | 26.96 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitudeInRange/Faker_math-8 | 40113348 | 27.36 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLatitudeInRange/Faker_crypto-8 | 3227358 | 378.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitudeInRange/package-8 | 38948743 | 32.36 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitudeInRange/Faker_math-8 | 36491187 | 27.86 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLongitudeInRange/Faker_crypto-8 | 3004773 | 350.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkPetName/package-8 | 23445927 | 60.81 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkPetName/Faker_math-8 | 23982228 | 53.68 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkPetName/Faker_crypto-8 | 2681886 | 458.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimal/package-8 | 23230071 | 55.13 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimal/Faker_math-8 | 21923606 | 53.10 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimal/Faker_crypto-8 | 2680177 | 411.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimalType/package-8 | 18826995 | 53.45 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimalType/Faker_math-8 | 22170756 | 63.39 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAnimalType/Faker_crypto-8 | 2780270 | 399.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFarmAnimal/package-8 | 18548028 | 64.87 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFarmAnimal/Faker_math-8 | 17291526 | 62.47 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFarmAnimal/Faker_crypto-8 | 2543520 | 409.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCat/package-8 | 21213028 | 68.91 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCat/Faker_math-8 | 19973062 | 58.74 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCat/Faker_crypto-8 | 2985601 | 405.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkDog/package-8 | 16995627 | 68.15 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkDog/Faker_math-8 | 17296502 | 81.35 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkDog/Faker_crypto-8 | 2530860 | 433.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBird/package-8 | 14445968 | 81.31 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBird/Faker_math-8 | 14545851 | 82.69 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBird/Faker_crypto-8 | 2892721 | 420.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkAppName/package-8 | 2799828 | 438.6 ns/op | 25 B/op | 1 allocs/op | -| BenchmarkAppName/Faker_math-8 | 2784135 | 431.1 ns/op | 25 B/op | 1 allocs/op | -| BenchmarkAppName/Faker_crypto-8 | 611072 | 1923 ns/op | 25 B/op | 1 allocs/op | -| BenchmarkAppVersion/package-8 | 7552165 | 154.1 ns/op | 7 B/op | 1 allocs/op | -| BenchmarkAppVersion/Faker_math-8 | 8020767 | 156.6 ns/op | 7 B/op | 1 allocs/op | -| BenchmarkAppVersion/Faker_crypto-8 | 875899 | 1209 ns/op | 7 B/op | 1 allocs/op | -| BenchmarkAppAuthor/package-8 | 9596493 | 119.7 ns/op | 8 B/op | 0 allocs/op | -| BenchmarkAppAuthor/Faker_math-8 | 10068729 | 121.0 ns/op | 8 B/op | 0 allocs/op | -| BenchmarkAppAuthor/Faker_crypto-8 | 1212542 | 983.7 ns/op | 8 B/op | 0 allocs/op | -| BenchmarkUsername/package-8 | 6687600 | 174.6 ns/op | 16 B/op | 2 allocs/op | -| BenchmarkUsername/Faker_math-8 | 7233685 | 173.3 ns/op | 16 B/op | 2 allocs/op | -| BenchmarkUsername/Faker_crypto-8 | 616884 | 2166 ns/op | 16 B/op | 2 allocs/op | -| BenchmarkPassword/package-8 | 2966407 | 401.0 ns/op | 336 B/op | 6 allocs/op | -| BenchmarkPassword/Faker_math-8 | 3080845 | 399.8 ns/op | 336 B/op | 6 allocs/op | -| BenchmarkPassword/Faker_crypto-8 | 182074 | 5963 ns/op | 336 B/op | 6 allocs/op | -| BenchmarkBeerName/package-8 | 23768442 | 53.26 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerName/Faker_math-8 | 22010898 | 63.87 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerName/Faker_crypto-8 | 2569424 | 392.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerStyle/package-8 | 17567354 | 69.64 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerStyle/Faker_math-8 | 16695721 | 80.73 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerStyle/Faker_crypto-8 | 2710214 | 407.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerHop/package-8 | 20877854 | 56.43 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerHop/Faker_math-8 | 22603234 | 65.04 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerHop/Faker_crypto-8 | 2618493 | 419.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerYeast/package-8 | 20738073 | 67.89 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerYeast/Faker_math-8 | 21325231 | 67.34 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerYeast/Faker_crypto-8 | 3042529 | 399.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerMalt/package-8 | 15756969 | 65.67 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerMalt/Faker_math-8 | 18026910 | 71.42 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerMalt/Faker_crypto-8 | 2949741 | 429.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBeerIbu/package-8 | 32683443 | 35.57 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkBeerIbu/Faker_math-8 | 29983339 | 36.03 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkBeerIbu/Faker_crypto-8 | 3094896 | 386.6 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkBeerAlcohol/package-8 | 4744302 | 243.6 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkBeerAlcohol/Faker_math-8 | 4718923 | 252.0 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkBeerAlcohol/Faker_crypto-8 | 1952740 | 656.0 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkBeerBlg/package-8 | 4086861 | 270.6 ns/op | 40 B/op | 3 allocs/op | -| BenchmarkBeerBlg/Faker_math-8 | 4488897 | 259.5 ns/op | 40 B/op | 3 allocs/op | -| BenchmarkBeerBlg/Faker_crypto-8 | 1865367 | 646.7 ns/op | 40 B/op | 3 allocs/op | -| BenchmarkCar/package-8 | 2800782 | 400.5 ns/op | 96 B/op | 1 allocs/op | -| BenchmarkCar/Faker_math-8 | 2938509 | 396.5 ns/op | 96 B/op | 1 allocs/op | -| BenchmarkCar/Faker_crypto-8 | 461906 | 2590 ns/op | 96 B/op | 1 allocs/op | -| BenchmarkCarType/package-8 | 23655384 | 51.72 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarType/Faker_math-8 | 25902462 | 50.55 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarType/Faker_crypto-8 | 3035287 | 455.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarFuelType/package-8 | 18750069 | 63.80 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarFuelType/Faker_math-8 | 18858705 | 63.15 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarFuelType/Faker_crypto-8 | 3028026 | 387.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarTransmissionType/package-8 | 22570701 | 54.01 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarTransmissionType/Faker_math-8 | 21484246 | 64.27 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarTransmissionType/Faker_crypto-8 | 3061364 | 387.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarMaker/package-8 | 17628445 | 68.23 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarMaker/Faker_math-8 | 21573310 | 64.19 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarMaker/Faker_crypto-8 | 2688284 | 475.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarModel/package-8 | 18500498 | 73.43 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarModel/Faker_math-8 | 16116993 | 66.91 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCarModel/Faker_crypto-8 | 2487638 | 440.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityActor/package-8 | 18712833 | 74.12 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityActor/Faker_math-8 | 18564168 | 68.96 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityActor/Faker_crypto-8 | 2593150 | 415.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityBusiness/package-8 | 18721152 | 68.98 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityBusiness/Faker_math-8 | 16916186 | 70.66 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebrityBusiness/Faker_crypto-8 | 2578786 | 407.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebritySport/package-8 | 16716724 | 87.51 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebritySport/Faker_math-8 | 16602294 | 86.41 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCelebritySport/Faker_crypto-8 | 2919696 | 419.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkColor/package-8 | 17871778 | 62.28 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkColor/Faker_math-8 | 21601353 | 62.63 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkColor/Faker_crypto-8 | 3040459 | 463.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkNiceColors/package-8 | 81438092 | 14.86 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkNiceColors/Faker_math-8 | 75775309 | 18.52 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkNiceColors/Faker_crypto-8 | 3450939 | 353.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkSafeColor/package-8 | 22775230 | 53.52 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkSafeColor/Faker_math-8 | 24526308 | 59.40 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkSafeColor/Faker_crypto-8 | 3103851 | 413.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHexColor/package-8 | 4640522 | 255.2 ns/op | 24 B/op | 3 allocs/op | -| BenchmarkHexColor/Faker_math-8 | 4723542 | 257.2 ns/op | 24 B/op | 3 allocs/op | -| BenchmarkHexColor/Faker_crypto-8 | 283828 | 4447 ns/op | 24 B/op | 3 allocs/op | -| BenchmarkRGBColor/package-8 | 19721971 | 59.64 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkRGBColor/Faker_math-8 | 18808492 | 67.35 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkRGBColor/Faker_crypto-8 | 1000000 | 1066 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkCompany/package-8 | 22072651 | 48.06 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCompany/Faker_math-8 | 22528284 | 53.94 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCompany/Faker_crypto-8 | 2690668 | 402.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCompanySuffix/package-8 | 28169413 | 48.00 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCompanySuffix/Faker_math-8 | 20685153 | 52.20 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCompanySuffix/Faker_crypto-8 | 3018765 | 418.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBuzzWord/package-8 | 24238677 | 54.55 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBuzzWord/Faker_math-8 | 22195419 | 52.30 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBuzzWord/Faker_crypto-8 | 2840428 | 392.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBS/package-8 | 23481436 | 56.33 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBS/Faker_math-8 | 23195737 | 65.66 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBS/Faker_crypto-8 | 3027972 | 419.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJob/package-8 | 4432520 | 253.5 ns/op | 64 B/op | 1 allocs/op | -| BenchmarkJob/Faker_math-8 | 4513154 | 253.7 ns/op | 64 B/op | 1 allocs/op | -| BenchmarkJob/Faker_crypto-8 | 686028 | 1716 ns/op | 64 B/op | 1 allocs/op | -| BenchmarkJobTitle/package-8 | 20079558 | 54.21 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobTitle/Faker_math-8 | 21871627 | 54.86 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobTitle/Faker_crypto-8 | 3017896 | 413.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobDescriptor/package-8 | 21579855 | 53.36 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobDescriptor/Faker_math-8 | 24638751 | 55.91 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobDescriptor/Faker_crypto-8 | 2984810 | 415.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobLevel/package-8 | 18311070 | 59.35 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobLevel/Faker_math-8 | 17051210 | 59.53 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkJobLevel/Faker_crypto-8 | 2991106 | 426.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCSVLookup100-8 | 1468 | 780852 ns/op | 437416 B/op | 5933 allocs/op | -| BenchmarkCSVLookup1000-8 | 151 | 7853471 ns/op | 4224820 B/op | 59612 allocs/op | -| BenchmarkCSVLookup10000-8 | 14 | 78165009 ns/op | 41208010 B/op | 597842 allocs/op | -| BenchmarkCSVLookup100000-8 | 2 | 768800840 ns/op | 437275164 B/op | 5980461 allocs/op | -| BenchmarkEmoji/package-8 | 22212386 | 54.40 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmoji/Faker_math-8 | 21471013 | 51.55 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmoji/Faker_crypto-8 | 3036081 | 458.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiDescription/package-8 | 18250413 | 57.08 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiDescription/Faker_math-8 | 21924381 | 57.58 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiDescription/Faker_crypto-8 | 2837050 | 387.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiCategory/package-8 | 21270252 | 55.87 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiCategory/Faker_math-8 | 21421813 | 59.59 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiCategory/Faker_crypto-8 | 2635878 | 491.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiAlias/package-8 | 18760875 | 68.20 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiAlias/Faker_math-8 | 16918242 | 67.60 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiAlias/Faker_crypto-8 | 2854717 | 488.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiTag/package-8 | 19953885 | 65.43 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiTag/Faker_math-8 | 18220396 | 72.91 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkEmojiTag/Faker_crypto-8 | 2802847 | 426.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkError/package-8 | 1547610 | 786.6 ns/op | 279 B/op | 8 allocs/op | -| BenchmarkError/Faker_math-8 | 1504578 | 794.1 ns/op | 279 B/op | 8 allocs/op | -| BenchmarkError/Faker_crypto-8 | 800712 | 1476 ns/op | 279 B/op | 8 allocs/op | -| BenchmarkErrorObject/package-8 | 6054552 | 190.3 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkErrorObject/Faker_math-8 | 5968180 | 190.3 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkErrorObject/Faker_crypto-8 | 2088008 | 618.0 ns/op | 32 B/op | 3 allocs/op | -| BenchmarkErrorDatabase/package-8 | 5275713 | 212.8 ns/op | 64 B/op | 3 allocs/op | -| BenchmarkErrorDatabase/Faker_math-8 | 5407803 | 217.3 ns/op | 64 B/op | 3 allocs/op | -| BenchmarkErrorDatabase/Faker_crypto-8 | 2005333 | 628.7 ns/op | 63 B/op | 3 allocs/op | -| BenchmarkErrorGRPC/package-8 | 5700810 | 202.9 ns/op | 64 B/op | 3 allocs/op | -| BenchmarkErrorGRPC/Faker_math-8 | 5907589 | 202.5 ns/op | 64 B/op | 3 allocs/op | -| BenchmarkErrorGRPC/Faker_crypto-8 | 2027650 | 643.3 ns/op | 64 B/op | 3 allocs/op | -| BenchmarkErrorHTTP/package-8 | 3182026 | 321.6 ns/op | 157 B/op | 4 allocs/op | -| BenchmarkErrorHTTP/Faker_math-8 | 3667356 | 314.9 ns/op | 157 B/op | 4 allocs/op | -| BenchmarkErrorHTTP/Faker_crypto-8 | 1590696 | 720.2 ns/op | 157 B/op | 4 allocs/op | -| BenchmarkErrorHTTPClient/package-8 | 5745494 | 204.0 ns/op | 52 B/op | 3 allocs/op | -| BenchmarkErrorHTTPClient/Faker_math-8 | 5549187 | 212.8 ns/op | 52 B/op | 3 allocs/op | -| BenchmarkErrorHTTPClient/Faker_crypto-8 | 2011905 | 596.7 ns/op | 52 B/op | 3 allocs/op | -| BenchmarkErrorHTTPServer/package-8 | 5466012 | 214.7 ns/op | 59 B/op | 3 allocs/op | -| BenchmarkErrorHTTPServer/Faker_math-8 | 5542838 | 207.3 ns/op | 59 B/op | 3 allocs/op | -| BenchmarkErrorHTTPServer/Faker_crypto-8 | 1939080 | 633.9 ns/op | 59 B/op | 3 allocs/op | -| BenchmarkErrorRuntime/package-8 | 4245986 | 263.4 ns/op | 150 B/op | 3 allocs/op | -| BenchmarkErrorRuntime/Faker_math-8 | 4355534 | 263.1 ns/op | 150 B/op | 3 allocs/op | -| BenchmarkErrorRuntime/Faker_crypto-8 | 1782044 | 651.4 ns/op | 150 B/op | 3 allocs/op | -| BenchmarkErrorValidation/package-8 | 1659858 | 715.7 ns/op | 268 B/op | 7 allocs/op | -| BenchmarkErrorValidation/Faker_math-8 | 1690849 | 716.4 ns/op | 268 B/op | 7 allocs/op | -| BenchmarkErrorValidation/Faker_crypto-8 | 883600 | 1348 ns/op | 268 B/op | 7 allocs/op | -| BenchmarkFileMimeType/package-8 | 18005230 | 56.88 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFileMimeType/Faker_math-8 | 21229381 | 54.62 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFileMimeType/Faker_crypto-8 | 2605701 | 462.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFileExtension/package-8 | 19272264 | 73.07 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFileExtension/Faker_math-8 | 20149288 | 60.79 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFileExtension/Faker_crypto-8 | 2627210 | 423.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkCusip/package-8 | 5402995 | 224.9 ns/op | 24 B/op | 2 allocs/op | -| BenchmarkCusip/Faker_math-8 | 5367218 | 221.1 ns/op | 24 B/op | 2 allocs/op | -| BenchmarkCusip/Faker_crypto-8 | 363460 | 2967 ns/op | 24 B/op | 2 allocs/op | -| BenchmarkIsin/package-8 | 1742368 | 701.4 ns/op | 533 B/op | 8 allocs/op | -| BenchmarkIsin/Faker_math-8 | 1653408 | 715.5 ns/op | 533 B/op | 8 allocs/op | -| BenchmarkIsin/Faker_crypto-8 | 330396 | 3583 ns/op | 533 B/op | 8 allocs/op | -| BenchmarkFruit/package-8 | 21421066 | 55.23 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFruit/Faker_math-8 | 22680361 | 55.68 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkFruit/Faker_crypto-8 | 2914611 | 486.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkVegetable/package-8 | 21113413 | 56.44 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkVegetable/Faker_math-8 | 21101716 | 60.98 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkVegetable/Faker_crypto-8 | 2811384 | 467.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBreakfast/package-8 | 8954784 | 127.7 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkBreakfast/Faker_math-8 | 9430814 | 128.8 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkBreakfast/Faker_crypto-8 | 2132481 | 496.5 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkLunch/package-8 | 8934501 | 125.9 ns/op | 34 B/op | 1 allocs/op | -| BenchmarkLunch/Faker_math-8 | 8668546 | 128.9 ns/op | 34 B/op | 1 allocs/op | -| BenchmarkLunch/Faker_crypto-8 | 2216348 | 518.3 ns/op | 34 B/op | 1 allocs/op | -| BenchmarkDinner/package-8 | 9317936 | 125.2 ns/op | 36 B/op | 1 allocs/op | -| BenchmarkDinner/Faker_math-8 | 9023473 | 126.3 ns/op | 36 B/op | 1 allocs/op | -| BenchmarkDinner/Faker_crypto-8 | 2435984 | 518.9 ns/op | 36 B/op | 1 allocs/op | -| BenchmarkDrink/package-8 | 7698025 | 143.4 ns/op | 7 B/op | 2 allocs/op | -| BenchmarkDrink/Faker_math-8 | 8096294 | 139.8 ns/op | 7 B/op | 2 allocs/op | -| BenchmarkDrink/Faker_crypto-8 | 2247427 | 536.2 ns/op | 7 B/op | 2 allocs/op | -| BenchmarkSnack/package-8 | 8109601 | 149.2 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkSnack/Faker_math-8 | 7993006 | 150.5 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkSnack/Faker_crypto-8 | 2214736 | 535.7 ns/op | 32 B/op | 1 allocs/op | -| BenchmarkDessert/package-8 | 8295364 | 133.9 ns/op | 31 B/op | 2 allocs/op | -| BenchmarkDessert/Faker_math-8 | 8610325 | 134.1 ns/op | 31 B/op | 2 allocs/op | -| BenchmarkDessert/Faker_crypto-8 | 2205777 | 507.4 ns/op | 31 B/op | 2 allocs/op | -| BenchmarkGamertag/package-8 | 2111506 | 544.8 ns/op | 83 B/op | 5 allocs/op | -| BenchmarkGamertag/Faker_math-8 | 2203573 | 551.4 ns/op | 83 B/op | 5 allocs/op | -| BenchmarkGamertag/Faker_crypto-8 | 487366 | 2428 ns/op | 83 B/op | 5 allocs/op | -| BenchmarkDice/package-8 | 43259642 | 26.58 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkDice/Faker_math-8 | 42908084 | 26.84 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkDice/Faker_crypto-8 | 2953483 | 395.5 ns/op | 8 B/op | 1 allocs/op | -| BenchmarkGenerate/package-8 | 383122 | 2767 ns/op | 1139 B/op | 29 allocs/op | -| BenchmarkGenerate/Complex-8 | 135508 | 8555 ns/op | 4440 B/op | 80 allocs/op | -| BenchmarkGenerate/Faker_math-8 | 377151 | 2817 ns/op | 1139 B/op | 29 allocs/op | -| BenchmarkGenerate/Faker_crypto-8 | 152226 | 7234 ns/op | 1139 B/op | 29 allocs/op | -| BenchmarkRegex/package-8 | 628683 | 1922 ns/op | 1632 B/op | 27 allocs/op | -| BenchmarkRegex/Faker_math-8 | 591548 | 1940 ns/op | 1632 B/op | 27 allocs/op | -| BenchmarkRegex/Faker_crypto-8 | 616701 | 1934 ns/op | 1632 B/op | 27 allocs/op | -| BenchmarkRegexEmail/package-8 | 174812 | 6607 ns/op | 4084 B/op | 90 allocs/op | -| BenchmarkRegexEmail/Faker_math-8 | 174512 | 6619 ns/op | 4084 B/op | 90 allocs/op | -| BenchmarkRegexEmail/Faker_crypto-8 | 62312 | 18793 ns/op | 4083 B/op | 90 allocs/op | -| BenchmarkMap/package-8 | 318559 | 3275 ns/op | 1113 B/op | 16 allocs/op | -| BenchmarkMap/Faker_math-8 | 315990 | 3319 ns/op | 1113 B/op | 16 allocs/op | -| BenchmarkMap/Faker_crypto-8 | 46202 | 23997 ns/op | 1115 B/op | 16 allocs/op | -| BenchmarkHackerPhrase/package-8 | 155998 | 7191 ns/op | 3004 B/op | 50 allocs/op | -| BenchmarkHackerPhrase/Faker_math-8 | 154675 | 7305 ns/op | 3008 B/op | 50 allocs/op | -| BenchmarkHackerPhrase/Faker_crypto-8 | 109282 | 10268 ns/op | 3007 B/op | 50 allocs/op | -| BenchmarkHackerAbbreviation/package-8 | 21881574 | 57.57 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerAbbreviation/Faker_math-8 | 18534495 | 59.55 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerAbbreviation/Faker_crypto-8 | 2607735 | 401.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerAdjective/package-8 | 24286845 | 55.74 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerAdjective/Faker_math-8 | 22684101 | 55.22 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerAdjective/Faker_crypto-8 | 2953530 | 490.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerNoun/package-8 | 22554241 | 55.35 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerNoun/Faker_math-8 | 18360708 | 56.78 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerNoun/Faker_crypto-8 | 2823256 | 464.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerVerb/package-8 | 19236123 | 65.49 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerVerb/Faker_math-8 | 18090754 | 68.18 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackerVerb/Faker_crypto-8 | 2880181 | 439.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackeringVerb/package-8 | 19090326 | 71.74 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackeringVerb/Faker_math-8 | 19048659 | 63.31 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHackeringVerb/Faker_crypto-8 | 3020748 | 404.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkReplaceWithNumbers-8 | 162931 | 7098 ns/op | 32 B/op | 2 allocs/op | -| BenchmarkHipsterWord/package-8 | 24059244 | 54.69 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHipsterWord/Faker_math-8 | 21708511 | 52.98 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHipsterWord/Faker_crypto-8 | 2870858 | 396.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHipsterSentence/package-8 | 1278764 | 927.7 ns/op | 288 B/op | 3 allocs/op | -| BenchmarkHipsterSentence/Faker_math-8 | 1287939 | 955.0 ns/op | 288 B/op | 3 allocs/op | -| BenchmarkHipsterSentence/Faker_crypto-8 | 237703 | 4595 ns/op | 288 B/op | 3 allocs/op | -| BenchmarkHipsterParagraph/package-8 | 57895 | 18466 ns/op | 10521 B/op | 48 allocs/op | -| BenchmarkHipsterParagraph/Faker_math-8 | 61772 | 19188 ns/op | 10520 B/op | 48 allocs/op | -| BenchmarkHipsterParagraph/Faker_crypto-8 | 12978 | 91733 ns/op | 10522 B/op | 48 allocs/op | -| BenchmarkInputName/package-8 | 15728428 | 74.49 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkInputName/Faker_math-8 | 13243030 | 89.75 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkInputName/Faker_crypto-8 | 2736225 | 478.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkSvg/package-8 | 172828 | 7906 ns/op | 8871 B/op | 52 allocs/op | -| BenchmarkSvg/Faker_math-8 | 161821 | 6754 ns/op | 8875 B/op | 52 allocs/op | -| BenchmarkSvg/Faker_crypto-8 | 29023 | 40910 ns/op | 8862 B/op | 52 allocs/op | -| BenchmarkImageURL/package-8 | 11692422 | 94.34 ns/op | 38 B/op | 3 allocs/op | -| BenchmarkImageURL/Faker_math-8 | 11451087 | 91.39 ns/op | 38 B/op | 3 allocs/op | -| BenchmarkImageURL/Faker_crypto-8 | 12107578 | 92.30 ns/op | 38 B/op | 3 allocs/op | -| BenchmarkImage/package-8 | 50 | 20495942 ns/op | 2457673 B/op | 307202 allocs/op | -| BenchmarkImage/Faker_math-8 | 51 | 20349126 ns/op | 2457780 B/op | 307202 allocs/op | -| BenchmarkImage/Faker_crypto-8 | 3 | 393591549 ns/op | 2457685 B/op | 307202 allocs/op | -| BenchmarkImageJpeg/package-8 | 31 | 32857846 ns/op | 2982318 B/op | 307214 allocs/op | -| BenchmarkImageJpeg/Faker_math-8 | 34 | 31873165 ns/op | 2982479 B/op | 307214 allocs/op | -| BenchmarkImageJpeg/Faker_crypto-8 | 3 | 387670345 ns/op | 2982357 B/op | 307215 allocs/op | -| BenchmarkImagePng/package-8 | 16 | 65425256 ns/op | 5899024 B/op | 307270 allocs/op | -| BenchmarkImagePng/Faker_math-8 | 18 | 67804235 ns/op | 5899314 B/op | 307270 allocs/op | -| BenchmarkImagePng/Faker_crypto-8 | 3 | 396378778 ns/op | 5899005 B/op | 307270 allocs/op | -| BenchmarkDomainName/package-8 | 2344912 | 505.6 ns/op | 95 B/op | 5 allocs/op | -| BenchmarkDomainName/Faker_math-8 | 2265744 | 512.5 ns/op | 95 B/op | 5 allocs/op | -| BenchmarkDomainName/Faker_crypto-8 | 639775 | 1788 ns/op | 95 B/op | 5 allocs/op | -| BenchmarkDomainSuffix/package-8 | 19431498 | 59.95 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkDomainSuffix/Faker_math-8 | 20097267 | 59.04 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkDomainSuffix/Faker_crypto-8 | 2498906 | 437.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkURL/package-8 | 1000000 | 1155 ns/op | 277 B/op | 10 allocs/op | -| BenchmarkURL/Faker_math-8 | 1000000 | 1165 ns/op | 277 B/op | 10 allocs/op | -| BenchmarkURL/Faker_crypto-8 | 275793 | 4371 ns/op | 276 B/op | 10 allocs/op | -| BenchmarkHTTPMethod/package-8 | 17651594 | 59.20 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPMethod/Faker_math-8 | 20081227 | 61.28 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPMethod/Faker_crypto-8 | 2844322 | 460.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkIPv4Address/package-8 | 5215255 | 229.2 ns/op | 16 B/op | 1 allocs/op | -| BenchmarkIPv4Address/Faker_math-8 | 4852905 | 224.9 ns/op | 16 B/op | 1 allocs/op | -| BenchmarkIPv4Address/Faker_crypto-8 | 670951 | 1827 ns/op | 16 B/op | 1 allocs/op | -| BenchmarkIPv6Address/package-8 | 2312482 | 510.0 ns/op | 111 B/op | 8 allocs/op | -| BenchmarkIPv6Address/Faker_math-8 | 2261472 | 521.2 ns/op | 111 B/op | 8 allocs/op | -| BenchmarkIPv6Address/Faker_crypto-8 | 338601 | 3623 ns/op | 111 B/op | 8 allocs/op | -| BenchmarkMacAddress/package-8 | 2809762 | 426.2 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkMacAddress/Faker_math-8 | 2863842 | 425.5 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkMacAddress/Faker_crypto-8 | 376604 | 2688 ns/op | 24 B/op | 1 allocs/op | -| BenchmarkHTTPStatusCode/package-8 | 13488582 | 88.27 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPStatusCode/Faker_math-8 | 14188726 | 73.23 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPStatusCode/Faker_crypto-8 | 2497014 | 463.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPStatusCodeSimple/package-8 | 17822486 | 81.54 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPStatusCodeSimple/Faker_math-8 | 16282341 | 70.72 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkHTTPStatusCodeSimple/Faker_crypto-8 | 2360576 | 451.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLogLevel/package-8 | 19343472 | 67.40 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLogLevel/Faker_math-8 | 19445798 | 61.84 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLogLevel/Faker_crypto-8 | 2296162 | 468.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkUserAgent/package-8 | 1503814 | 813.9 ns/op | 297 B/op | 5 allocs/op | -| BenchmarkUserAgent/Faker_math-8 | 1462177 | 803.6 ns/op | 298 B/op | 5 allocs/op | -| BenchmarkUserAgent/Faker_crypto-8 | 181178 | 6157 ns/op | 298 B/op | 5 allocs/op | -| BenchmarkChromeUserAgent/package-8 | 1911201 | 596.8 ns/op | 184 B/op | 5 allocs/op | -| BenchmarkChromeUserAgent/Faker_math-8 | 1969712 | 598.1 ns/op | 184 B/op | 5 allocs/op | -| BenchmarkChromeUserAgent/Faker_crypto-8 | 264816 | 4433 ns/op | 184 B/op | 5 allocs/op | -| BenchmarkFirefoxUserAgent/package-8 | 1000000 | 1043 ns/op | 362 B/op | 6 allocs/op | -| BenchmarkFirefoxUserAgent/Faker_math-8 | 1000000 | 1054 ns/op | 362 B/op | 6 allocs/op | -| BenchmarkFirefoxUserAgent/Faker_crypto-8 | 166128 | 7646 ns/op | 362 B/op | 6 allocs/op | -| BenchmarkSafariUserAgent/package-8 | 1000000 | 1022 ns/op | 551 B/op | 7 allocs/op | -| BenchmarkSafariUserAgent/Faker_math-8 | 1000000 | 1017 ns/op | 551 B/op | 7 allocs/op | -| BenchmarkSafariUserAgent/Faker_crypto-8 | 146463 | 7525 ns/op | 551 B/op | 7 allocs/op | -| BenchmarkOperaUserAgent/package-8 | 1844185 | 643.8 ns/op | 212 B/op | 5 allocs/op | -| BenchmarkOperaUserAgent/Faker_math-8 | 1805168 | 654.3 ns/op | 212 B/op | 5 allocs/op | -| BenchmarkOperaUserAgent/Faker_crypto-8 | 219927 | 5257 ns/op | 212 B/op | 5 allocs/op | -| BenchmarkJSONLookup100-8 | 894 | 1194698 ns/op | 537673 B/op | 8141 allocs/op | -| BenchmarkJSONLookup1000-8 | 91 | 12099728 ns/op | 5616708 B/op | 81606 allocs/op | -| BenchmarkJSONLookup10000-8 | 8 | 128144166 ns/op | 62638763 B/op | 817708 allocs/op | -| BenchmarkJSONLookup100000-8 | 1 | 1324756016 ns/op | 616116744 B/op | 8179136 allocs/op | -| BenchmarkLanguage/package-8 | 20946056 | 68.53 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguage/Faker_math-8 | 16884613 | 61.06 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguage/Faker_crypto-8 | 2889944 | 442.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageAbbreviation/package-8 | 20782443 | 53.79 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageAbbreviation/Faker_math-8 | 17936367 | 56.26 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageAbbreviation/Faker_crypto-8 | 2630406 | 423.8 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageBCP/package-8 | 19858063 | 59.00 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageBCP/Faker_math-8 | 20712447 | 60.02 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLanguageBCP/Faker_crypto-8 | 2654044 | 469.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguage/package-8 | 17849598 | 58.34 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguage/Faker_math-8 | 20090289 | 70.59 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguage/Faker_crypto-8 | 2628798 | 424.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguageBest/package-8 | 1000000000 | 0.4044 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguageBest/Faker_math-8 | 1000000000 | 0.2975 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkProgrammingLanguageBest/Faker_crypto-8 | 1000000000 | 0.2543 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLoremIpsumWord-8 | 22434632 | 54.96 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkLoremIpsumSentence-8 | 1000000 | 1038 ns/op | 219 B/op | 2 allocs/op | -| BenchmarkLoremIpsumParagraph-8 | 59320 | 19442 ns/op | 8479 B/op | 40 allocs/op | -| BenchmarkMinecraftOre/package-8 | 14624242 | 90.01 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftOre/Faker_math-8 | 16379578 | 86.91 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftOre/Faker_crypto-8 | 2757652 | 477.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWood/package-8 | 15815132 | 83.23 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWood/Faker_math-8 | 14872902 | 75.36 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWood/Faker_crypto-8 | 2524514 | 514.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorTier/package-8 | 15296107 | 78.58 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorTier/Faker_math-8 | 14341870 | 86.33 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorTier/Faker_crypto-8 | 2344278 | 473.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorPart/package-8 | 16863422 | 82.04 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorPart/Faker_math-8 | 14052031 | 76.92 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftArmorPart/Faker_crypto-8 | 2770314 | 474.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeapon/package-8 | 15759004 | 77.42 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeapon/Faker_math-8 | 15945940 | 81.48 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeapon/Faker_crypto-8 | 2254436 | 464.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftTool/package-8 | 15887787 | 76.39 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftTool/Faker_math-8 | 14269508 | 91.01 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftTool/Faker_crypto-8 | 2718507 | 525.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftDye/package-8 | 16131942 | 71.06 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftDye/Faker_math-8 | 16802478 | 73.40 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftDye/Faker_crypto-8 | 2584966 | 476.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftFood/package-8 | 14680048 | 87.15 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftFood/Faker_math-8 | 13558227 | 86.71 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftFood/Faker_crypto-8 | 2329946 | 435.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftAnimal/package-8 | 15871832 | 85.92 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftAnimal/Faker_math-8 | 12411510 | 83.88 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftAnimal/Faker_crypto-8 | 2528960 | 441.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerJob/package-8 | 13549438 | 80.41 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerJob/Faker_math-8 | 13769702 | 104.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerJob/Faker_crypto-8 | 2397300 | 452.2 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerStation/package-8 | 15069139 | 93.65 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerStation/Faker_math-8 | 15468883 | 82.27 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerStation/Faker_crypto-8 | 2469778 | 453.9 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerLevel/package-8 | 13468396 | 102.1 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerLevel/Faker_math-8 | 14354506 | 92.55 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftVillagerLevel/Faker_crypto-8 | 2416441 | 544.5 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobPassive/package-8 | 13299806 | 84.84 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobPassive/Faker_math-8 | 14181126 | 87.18 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobPassive/Faker_crypto-8 | 2539264 | 510.0 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobNeutral/package-8 | 11043175 | 110.7 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobNeutral/Faker_math-8 | 13059249 | 99.36 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobNeutral/Faker_crypto-8 | 2394342 | 544.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobHostile/package-8 | 13963809 | 95.66 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobHostile/Faker_math-8 | 15182318 | 96.90 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobHostile/Faker_crypto-8 | 2204600 | 538.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobBoss/package-8 | 12737437 | 89.68 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobBoss/Faker_math-8 | 13494093 | 90.65 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftMobBoss/Faker_crypto-8 | 2671172 | 461.3 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftBiome/package-8 | 13233918 | 81.47 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftBiome/Faker_math-8 | 16109408 | 85.68 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftBiome/Faker_crypto-8 | 2205704 | 499.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeather/package-8 | 13371518 | 79.93 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeather/Faker_math-8 | 14987182 | 80.69 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkMinecraftWeather/Faker_crypto-8 | 2373735 | 473.6 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBool/package-8 | 75772935 | 15.03 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBool/Faker_math-8 | 76893664 | 19.04 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkBool/Faker_crypto-8 | 3141634 | 376.4 ns/op | 0 B/op | 0 allocs/op | -| BenchmarkUUID/package-8 | 9382911 | 115.3 ns/op | 64 B/op | 2 allocs/op | -| BenchmarkUUID/Faker_math-8 | 9492183 | 114.1 ns/op | 64 B/op | 2 allocs/op | -| BenchmarkUUID/Faker_crypto-8 | 1000000 | 1039 ns/op | 64 B/op | 2 allocs/op | -| BenchmarkShuffleAnySlice/package-8 | 2234314 | 511.5 ns/op | 24 B/op | 1 allocs/op | \ No newline at end of file diff --git a/vendor/github.com/brianvoe/gofakeit/v6/CODE_OF_CONDUCT.md b/vendor/github.com/brianvoe/gofakeit/v6/CODE_OF_CONDUCT.md deleted file mode 100644 index 99d12c90fec..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at brian@webiswhatido.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/CONTRIBUTING.md b/vendor/github.com/brianvoe/gofakeit/v6/CONTRIBUTING.md deleted file mode 100644 index 5a4812c28ee..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -# Make a pull request and submit it and ill take a look at it. Thanks! diff --git a/vendor/github.com/brianvoe/gofakeit/v6/LICENSE.txt b/vendor/github.com/brianvoe/gofakeit/v6/LICENSE.txt deleted file mode 100644 index 21984c9d5ea..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) [year] [fullname] - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. \ No newline at end of file diff --git a/vendor/github.com/brianvoe/gofakeit/v6/README.md b/vendor/github.com/brianvoe/gofakeit/v6/README.md deleted file mode 100644 index 2520a8a47af..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/README.md +++ /dev/null @@ -1,865 +0,0 @@ -![alt text](https://raw.githubusercontent.com/brianvoe/gofakeit/master/logo.png) - -# Gofakeit [![Go Report Card](https://goreportcard.com/badge/github.com/brianvoe/gofakeit)](https://goreportcard.com/report/github.com/brianvoe/gofakeit) ![Test](https://github.com/brianvoe/gofakeit/workflows/Test/badge.svg?branch=master) [![codecov.io](https://codecov.io/github/brianvoe/gofakeit/branch/master/graph/badge.svg)](https://codecov.io/github/brianvoe/gofakeit) [![GoDoc](https://godoc.org/github.com/brianvoe/gofakeit/v6?status.svg)](https://godoc.org/github.com/brianvoe/gofakeit/v6) [![license](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/brianvoe/gofakeit/master/LICENSE.txt) - -Random data generator written in go - -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G0R5EJT) - -Buy Me A Coffee - -## Features - -- [260+ Functions!!!](#functions) -- [Random Sources](#random-sources) -- [Global Rand](#global-rand-set) -- [Struct Generator](#struct) -- [Custom Functions](#custom-functions) -- [Templates](#templates) -- [Http Server](https://github.com/brianvoe/gofakeit/tree/master/cmd/gofakeitserver) -- [Command Line Tool](https://github.com/brianvoe/gofakeit/tree/master/cmd/gofakeit) -- Zero dependencies -- [Benchmarks](https://github.com/brianvoe/gofakeit/blob/master/BENCHMARKS.md) -- [Issue](https://github.com/brianvoe/gofakeit/issues) - -## Contributors - -Thanks to everyone who has contributed to Gofakeit! - - - - - -## Installation - -```go -go get github.com/brianvoe/gofakeit/v6 -``` - -## Simple Usage - -```go -import "github.com/brianvoe/gofakeit/v6" - -gofakeit.Name() // Markus Moen -gofakeit.Email() // alaynawuckert@kozey.biz -gofakeit.Phone() // (570)245-7485 -gofakeit.BS() // front-end -gofakeit.BeerName() // Duvel -gofakeit.Color() // MediumOrchid -gofakeit.Company() // Moen, Pagac and Wuckert -gofakeit.CreditCardNumber() // 4287271570245748 -gofakeit.HackerPhrase() // Connecting the array won't do anything, we need to generate the haptic COM driver! -gofakeit.JobTitle() // Director -gofakeit.CurrencyShort() // USD -``` - -[See full list of functions](#functions) - -## Seed - -If you are using the default global usage and dont care about seeding no need to set anything. -Gofakeit will seed it with a cryptographically secure number. - -If you need a reproducible outcome you can set it via the Seed function call. Every example in -this repo sets it for testing purposes. - -```go -import "github.com/brianvoe/gofakeit/v6" - -gofakeit.Seed(0) // If 0 will use crypto/rand to generate a number - -// or - -gofakeit.Seed(8675309) // Set it to whatever number you want -``` - -## Random Sources - -Gofakeit has a few rand sources, by default it uses math.Rand and uses mutex locking to allow for safe goroutines. - -If you want to use a more performant source please use NewUnlocked. Be aware that it is not goroutine safe. - -```go -import "github.com/brianvoe/gofakeit/v6" - -// Uses math/rand(Pseudo) with mutex locking -faker := gofakeit.New(0) - -// Uses math/rand(Pseudo) with NO mutext locking -// More performant but not goroutine safe. -faker := gofakeit.NewUnlocked(0) - -// Uses crypto/rand(cryptographically secure) with mutext locking -faker := gofakeit.NewCrypto() - -// Pass in your own random source -faker := gofakeit.NewCustom() -``` - -## Global Rand Set - -If you would like to use the simple function calls but need to use something like -crypto/rand you can override the default global with the random source that you want. - -```go -import "github.com/brianvoe/gofakeit/v6" - -faker := gofakeit.NewCrypto() -gofakeit.SetGlobalFaker(faker) -``` - -## Struct - -Gofakeit can generate random data for struct fields. For the most part it covers all the basic type -as well as some non-basic like time.Time. - -Struct fields can also use tags to more specifically generate data for that field type. - -```go -import "github.com/brianvoe/gofakeit/v6" - -// Create structs with random injected data -type Foo struct { - Str string - Int int - Pointer *int - Name string `fake:"{firstname}"` // Any available function all lowercase - Sentence string `fake:"{sentence:3}"` // Can call with parameters - RandStr string `fake:"{randomstring:[hello,world]}"` - Number string `fake:"{number:1,10}"` // Comma separated for multiple values - Regex string `fake:"{regex:[abcdef]{5}}"` // Generate string from regex - Map map[string]int `fakesize:"2"` - Array []string `fakesize:"2"` - ArrayRange []string `fakesize:"2,6"` - Bar Bar - Skip *string `fake:"skip"` // Set to "skip" to not generate data for - SkipAlt *string `fake:"-"` // Set to "-" to not generate data for - Created time.Time // Can take in a fake tag as well as a format tag - CreatedFormat time.Time `fake:"{year}-{month}-{day}" format:"2006-01-02"` -} - -type Bar struct { - Name string - Number int - Float float32 -} - -// Pass your struct as a pointer -var f Foo -gofakeit.Struct(&f) - -fmt.Println(f.Str) // hrukpttuezptneuvunh -fmt.Println(f.Int) // -7825289004089916589 -fmt.Println(*f.Pointer) // -343806609094473732 -fmt.Println(f.Name) // fred -fmt.Println(f.Sentence) // Record river mind. -fmt.Println(f.RandStr) // world -fmt.Println(f.Number) // 4 -fmt.Println(f.Regex) // cbdfc -fmt.Println(f.Map) // map[PxLIo:52 lxwnqhqc:846] -fmt.Println(f.Array) // cbdfc -fmt.Printf("%+v", f.Bar) // {Name:QFpZ Number:-2882647639396178786 Float:1.7636692e+37} -fmt.Println(f.Skip) // -fmt.Println(f.Created.String()) // 1908-12-07 04:14:25.685339029 +0000 UTC - -// Supported formats -// int, int8, int16, int32, int64, -// uint, uint8, uint16, uint32, uint64, -// float32, float64, -// bool, string, -// array, pointers, map -// time.Time // If setting time you can also set a format tag -// Nested Struct Fields and Embedded Fields -``` - -## Fakeable types - -It is possible to extend a struct by implementing the `Fakeable` interface -in order to control the generation. - -For example, this is useful when it is not possible to modify the struct that you want to fake by adding struct tags to a field but you still need to be able to control the generation process. - -```go -// Custom string that you want to generate your own data for -// or just return a static value -type CustomString string - -func (c *CustomString) Fake(faker *gofakeit.Faker) any { - return CustomString("my custom string") -} - -// Imagine a CustomTime type that is needed to support a custom JSON Marshaler -type CustomTime time.Time - -func (c *CustomTime) Fake(faker *gofakeit.Faker) any { - return CustomTime(time.Now()) -} - -func (c *CustomTime) MarshalJSON() ([]byte, error) { - //... -} - -// This is the struct that we cannot modify to add struct tags -type NotModifiable struct { - Token string - Value CustomString - Creation *CustomTime -} - -var f NotModifiable -gofakeit.Struct(&f) -fmt.Printf("%s", f.Token) // yvqqdH -fmt.Printf("%s", f.Value) // my custom string -fmt.Printf("%s", f.Creation) // 2023-04-02 23:00:00 +0000 UTC m=+0.000000001 -``` - -## Custom Functions - -In a lot of situations you may need to use your own random function usage for your specific needs. - -If you would like to extend the usage of struct tags, generate function, available usages in the gofakeit server -or gofakeit command sub packages. You can do so via the AddFuncLookup. Each function has their own lookup, if -you need more reference examples you can look at each files lookups. - -```go -// Simple -gofakeit.AddFuncLookup("friendname", gofakeit.Info{ - Category: "custom", - Description: "Random friend name", - Example: "bill", - Output: "string", - Generate: func(r *rand.Rand, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) { - return gofakeit.RandomString([]string{"bill", "bob", "sally"}), nil - }, -}) - -// With Params -gofakeit.AddFuncLookup("jumbleword", gofakeit.Info{ - Category: "jumbleword", - Description: "Take a word and jumble it up", - Example: "loredlowlh", - Output: "string", - Params: []gofakeit.Param{ - {Field: "word", Type: "string", Description: "Word you want to jumble"}, - }, - Generate: func(r *rand.Rand, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) { - word, err := info.GetString(m, "word") - if err != nil { - return nil, err - } - - split := strings.Split(word, "") - gofakeit.ShuffleStrings(split) - return strings.Join(split, ""), nil - }, -}) - -type Foo struct { - FriendName string `fake:"{friendname}"` - JumbleWord string `fake:"{jumbleword:helloworld}"` -} - -var f Foo -gofakeit.Struct(&f) -fmt.Printf("%s", f.FriendName) // bill -fmt.Printf("%s", f.JumbleWord) // loredlowlh -``` - - - -## Templates - -Generate custom outputs using golang's template engine [https://pkg.go.dev/text/template](https://pkg.go.dev/text/template). - -We have added all the available functions to the template engine as well as some additional ones that are useful for template building. - -Additional Available Functions -```go -- ToUpper(s string) string // Make string upper case -- ToLower(s string) string // Make string lower case -- ToString(s any) // Convert to string -- ToDate(s string) time.Time // Convert string to date -- SpliceAny(args ...any) []any // Build a slice of interfaces, used with Weighted -- SpliceString(args ...string) []string // Build a slice of strings, used with Teams and RandomString -- SpliceUInt(args ...uint) []uint // Build a slice of uint, used with Dice and RandomUint -- SpliceInt(args ...int) []int // Build a slice of int, used with RandomInt -``` - -
- Unavailable Gofakeit functions - -```go -// Any functions that dont have a return value -- AnythingThatReturnsVoid(): void - -// Not available to use in templates -- Template(co *TemplateOptions) ([]byte, error) -- RandomMapKey(mapI any) any -``` -
- - -### Example Usages - -```go -import "github.com/brianvoe/gofakeit/v6" - -func main() { - // Accessing the Lines variable from within the template. - template := ` - Subject: {{RandomString (SliceString "Greetings" "Hello" "Hi")}} - - Dear {{LastName}}, - - {{RandomString (SliceString "Greetings!" "Hello there!" "Hi, how are you?")}} - - {{Paragraph 1 5 10 "\n\n"}} - - {{RandomString (SliceString "Warm regards" "Best wishes" "Sincerely")}} - {{$person:=Person}} - {{$person.FirstName}} {{$person.LastName}} - {{$person.Email}} - {{$person.Phone}} - ` - - value, err := gofakeit.Template(template, &TemplateOptions{Data: 5}) - - if err != nil { - fmt.Println(err) - } - - fmt.Println(string(value)) -} -``` - -Output: -```text -Subject: Hello - -Dear Krajcik, - -Greetings! - -Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. - -Warm regards -Kaitlyn Krajcik -kaitlynkrajcik@krajcik -570-245-7485 -``` - -## Functions - -All functions also exist as methods on the Faker struct - -### File - -Passing `nil` to `CSV`, `JSON` or `XML` will auto generate data using a random set of generators. - -```go -CSV(co *CSVOptions) ([]byte, error) -JSON(jo *JSONOptions) ([]byte, error) -XML(xo *XMLOptions) ([]byte, error) -FileExtension() string -FileMimeType() string -``` - - -### Person - -```go -Person() *PersonInfo -Name() string -NamePrefix() string -NameSuffix() string -FirstName() string -MiddleName() string -LastName() string -Gender() string -SSN() string -Hobby() string -Contact() *ContactInfo -Email() string -Phone() string -PhoneFormatted() string -Teams(peopleArray []string, teamsArray []string) map[string][]string -``` - -### Generate - -```go -Struct(v any) -Slice(v any) -Map() map[string]any -Generate(value string) string -Regex(value string) string -``` - -### Auth - -```go -Username() string -Password(lower bool, upper bool, numeric bool, special bool, space bool, num int) string -``` - -### Address - -```go -Address() *AddressInfo -City() string -Country() string -CountryAbr() string -State() string -StateAbr() string -Street() string -StreetName() string -StreetNumber() string -StreetPrefix() string -StreetSuffix() string -Zip() string -Latitude() float64 -LatitudeInRange(min, max float64) (float64, error) -Longitude() float64 -LongitudeInRange(min, max float64) (float64, error) -``` - -### Game - -```go -Gamertag() string -Dice(numDice uint, sides []uint) []uint -``` - -### Beer - -```go -BeerAlcohol() string -BeerBlg() string -BeerHop() string -BeerIbu() string -BeerMalt() string -BeerName() string -BeerStyle() string -BeerYeast() string -``` - -### Car - -```go -Car() *CarInfo -CarMaker() string -CarModel() string -CarType() string -CarFuelType() string -CarTransmissionType() string -``` - -### Words - -#### Noun - -```go -Noun() string -NounCommon() string -NounConcrete() string -NounAbstract() string -NounCollectivePeople() string -NounCollectiveAnimal() string -NounCollectiveThing() string -NounCountable() string -NounUncountable() string -``` - -#### Verb - -```go -Verb() string -VerbAction() string -VerbLinking() string -VerbHelping() string -``` - -#### Adverb - -```go -Adverb() string -AdverbManner() string -AdverbDegree() string -AdverbPlace() string -AdverbTimeDefinite() string -AdverbTimeIndefinite() string -AdverbFrequencyDefinite() string -AdverbFrequencyIndefinite() string -``` - -#### Proposition - -```go -Preposition() string -PrepositionSimple() string -PrepositionDouble() string -PrepositionCompound() string -``` - -#### Adjective - -```go -Adjective() string -AdjectiveDescriptive() string -AdjectiveQuantitative() string -AdjectiveProper() string -AdjectiveDemonstrative() string -AdjectivePossessive() string -AdjectiveInterrogative() string -AdjectiveIndefinite() string -``` - -#### Pronoun - -```go -Pronoun() string -PronounPersonal() string -PronounObject() string -PronounPossessive() string -PronounReflective() string -PronounDemonstrative() string -PronounInterrogative() string -PronounRelative() string -``` - -#### Connective - -```go -Connective() string -ConnectiveTime() string -ConnectiveComparative() string -ConnectiveComplaint() string -ConnectiveListing() string -ConnectiveCasual() string -ConnectiveExamplify() string -``` - -#### Word - -```go -Word() string -``` - -#### Sentences - -```go -Sentence(wordCount int) string -Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string -LoremIpsumWord() string -LoremIpsumSentence(wordCount int) string -LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string -Question() string -Quote() string -Phrase() string -``` - -### Foods - -```go -Fruit() string -Vegetable() string -Breakfast() string -Lunch() string -Dinner() string -Snack() string -Dessert() string -``` - -### Misc - -```go -Bool() bool -UUID() string -Weighted(options []any, weights []float32) -FlipACoin() string -RandomMapKey(mapI any) any -ShuffleAnySlice(v any) -``` - -### Colors - -```go -Color() string -HexColor() string -RGBColor() []int -SafeColor() string -NiceColors() string -``` - -### Images - -```go -ImageURL(width int, height int) string -Image(width int, height int) *img.RGBA -ImageJpeg(width int, height int) []byte -ImagePng(width int, height int) []byte -``` - -### Internet - -```go -URL() string -DomainName() string -DomainSuffix() string -IPv4Address() string -IPv6Address() string -MacAddress() string -HTTPStatusCode() string -HTTPStatusCodeSimple() int -LogLevel(logType string) string -HTTPMethod() string -HTTPVersion() string -UserAgent() string -ChromeUserAgent() string -FirefoxUserAgent() string -OperaUserAgent() string -SafariUserAgent() string -``` - -### HTML - -```go -InputName() string -Svg(options *SVGOptions) string -``` - -### Date/Time - -```go -Date() time.Time -FutureDate() time.Time -DateRange(start, end time.Time) time.Time -NanoSecond() int -Second() int -Minute() int -Hour() int -Month() int -MonthString() string -Day() int -WeekDay() string -Year() int -TimeZone() string -TimeZoneAbv() string -TimeZoneFull() string -TimeZoneOffset() float32 -TimeZoneRegion() string -``` - -### Payment - -```go -Price(min, max float64) float64 -CreditCard() *CreditCardInfo -CreditCardCvv() string -CreditCardExp() string -CreditCardNumber(*CreditCardOptions) string -CreditCardType() string -Currency() *CurrencyInfo -CurrencyLong() string -CurrencyShort() string -AchRouting() string -AchAccount() string -BitcoinAddress() string -BitcoinPrivateKey() string -``` - -### Finance - -```go -Cusip() string -Isin() string -``` - -### Company - -```go -BS() string -Blurb() string -BuzzWord() string -Company() string -CompanySuffix() string -Job() *JobInfo -JobDescriptor() string -JobLevel() string -JobTitle() string -Slogan() string -``` - -### Hacker - -```go -HackerAbbreviation() string -HackerAdjective() string -Hackeringverb() string -HackerNoun() string -HackerPhrase() string -HackerVerb() string -``` - -### Hipster - -```go -HipsterWord() string -HipsterSentence(wordCount int) string -HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string -``` - -### App - -```go -AppName() string -AppVersion() string -AppAuthor() string -``` - -### Animal - -```go -PetName() string -Animal() string -AnimalType() string -FarmAnimal() string -Cat() string -Dog() string -Bird() string -``` - -### Emoji - -```go -Emoji() string -EmojiDescription() string -EmojiCategory() string -EmojiAlias() string -EmojiTag() string -``` - -### Language - -```go -Language() string -LanguageAbbreviation() string -ProgrammingLanguage() string -ProgrammingLanguageBest() string -``` - -### Number - -```go -Number(min int, max int) int -Int8() int8 -Int16() int16 -Int32() int32 -Int64() int64 -Uint8() uint8 -Uint16() uint16 -Uint32() uint32 -Uint64() uint64 -Float32() float32 -Float32Range(min, max float32) float32 -Float64() float64 -Float64Range(min, max float64) float64 -ShuffleInts(a []int) -RandomInt(i []int) int -HexUint8() string -HexUint16() string -HexUint32() string -HexUint64() string -HexUint128() string -HexUint256() string -``` - -### String - -```go -Digit() string -DigitN(n uint) string -Letter() string -LetterN(n uint) string -Lexify(str string) string -Numerify(str string) string -ShuffleStrings(a []string) -RandomString(a []string) string -``` - -### Celebrity - -```go -CelebrityActor() string -CelebrityBusiness() string -CelebritySport() string -``` - -### Minecraft - -```go -MinecraftOre() string -MinecraftWood() string -MinecraftArmorTier() string -MinecraftArmorPart() string -MinecraftWeapon() string -MinecraftTool() string -MinecraftDye() string -MinecraftFood() string -MinecraftAnimal() string -MinecraftVillagerJob() string -MinecraftVillagerStation() string -MinecraftVillagerLevel() string -MinecraftMobPassive() string -MinecraftMobNeutral() string -MinecraftMobHostile() string -MinecraftMobBoss() string -MinecraftBiome() string -MinecraftWeather() string -``` - -### Book - -```go -Book() *BookInfo -BookTitle() string -BookAuthor() string -BookGenre() string -``` - -### Movie - -```go -Movie() *MovieInfo -MovieName() string -MovieGenre() string -``` - -### Error - -```go -Error() error -ErrorDatabase() error -ErrorGRPC() error -ErrorHTTP() error -ErrorHTTPClient() error -ErrorHTTPServer() error -ErrorInput() error -ErrorRuntime() error -``` - -### School - -```go -school() string -``` - -## Template - -```go -Template(co *TemplateOptions) (string, error) // Generates custom documents -Markdown(co *MarkdownOptions) (string, error) // Generates markdown documents -EmailText(co *EmailOptions) (string, error) // Generates email documents -FixedWidth(co *FixedWidthOptions) (string, error) // Generates fixed width documents -``` \ No newline at end of file diff --git a/vendor/github.com/brianvoe/gofakeit/v6/address.go b/vendor/github.com/brianvoe/gofakeit/v6/address.go deleted file mode 100644 index 2923b17baad..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/address.go +++ /dev/null @@ -1,421 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" - "strings" -) - -// AddressInfo is a struct full of address information -type AddressInfo struct { - Address string `json:"address" xml:"address"` - Street string `json:"street" xml:"street"` - City string `json:"city" xml:"city"` - State string `json:"state" xml:"state"` - Zip string `json:"zip" xml:"zip"` - Country string `json:"country" xml:"country"` - Latitude float64 `json:"latitude" xml:"latitude"` - Longitude float64 `json:"longitude" xml:"longitude"` -} - -// Address will generate a struct of address information -func Address() *AddressInfo { return address(globalFaker.Rand) } - -// Address will generate a struct of address information -func (f *Faker) Address() *AddressInfo { return address(f.Rand) } - -func address(r *rand.Rand) *AddressInfo { - street := street(r) - city := city(r) - state := state(r) - zip := zip(r) - - return &AddressInfo{ - Address: street + ", " + city + ", " + state + " " + zip, - Street: street, - City: city, - State: state, - Zip: zip, - Country: country(r), - Latitude: latitude(r), - Longitude: longitude(r), - } -} - -// Street will generate a random address street string -func Street() string { return street(globalFaker.Rand) } - -// Street will generate a random address street string -func (f *Faker) Street() string { return street(f.Rand) } - -func street(r *rand.Rand) string { - var street = "" - switch randInt := randIntRange(r, 1, 2); randInt { - case 1: - street = streetNumber(r) + " " + streetPrefix(r) + " " + streetName(r) + streetSuffix(r) - case 2: - street = streetNumber(r) + " " + streetName(r) + streetSuffix(r) - } - - return street -} - -// StreetNumber will generate a random address street number string -func StreetNumber() string { return streetNumber(globalFaker.Rand) } - -// StreetNumber will generate a random address street number string -func (f *Faker) StreetNumber() string { return streetNumber(f.Rand) } - -func streetNumber(r *rand.Rand) string { - return strings.TrimLeft(replaceWithNumbers(r, getRandValue(r, []string{"address", "number"})), "0") -} - -// StreetPrefix will generate a random address street prefix string -func StreetPrefix() string { return streetPrefix(globalFaker.Rand) } - -// StreetPrefix will generate a random address street prefix string -func (f *Faker) StreetPrefix() string { return streetPrefix(f.Rand) } - -func streetPrefix(r *rand.Rand) string { return getRandValue(r, []string{"address", "street_prefix"}) } - -// StreetName will generate a random address street name string -func StreetName() string { return streetName(globalFaker.Rand) } - -// StreetName will generate a random address street name string -func (f *Faker) StreetName() string { return streetName(f.Rand) } - -func streetName(r *rand.Rand) string { return getRandValue(r, []string{"address", "street_name"}) } - -// StreetSuffix will generate a random address street suffix string -func StreetSuffix() string { return streetSuffix(globalFaker.Rand) } - -// StreetSuffix will generate a random address street suffix string -func (f *Faker) StreetSuffix() string { return streetSuffix(f.Rand) } - -func streetSuffix(r *rand.Rand) string { return getRandValue(r, []string{"address", "street_suffix"}) } - -// City will generate a random city string -func City() string { return city(globalFaker.Rand) } - -// City will generate a random city string -func (f *Faker) City() string { return city(f.Rand) } - -func city(r *rand.Rand) string { return getRandValue(r, []string{"address", "city"}) } - -// State will generate a random state string -func State() string { return state(globalFaker.Rand) } - -// State will generate a random state string -func (f *Faker) State() string { return state(f.Rand) } - -func state(r *rand.Rand) string { return getRandValue(r, []string{"address", "state"}) } - -// StateAbr will generate a random abbreviated state string -func StateAbr() string { return stateAbr(globalFaker.Rand) } - -// StateAbr will generate a random abbreviated state string -func (f *Faker) StateAbr() string { return stateAbr(f.Rand) } - -func stateAbr(r *rand.Rand) string { return getRandValue(r, []string{"address", "state_abr"}) } - -// Zip will generate a random Zip code string -func Zip() string { return zip(globalFaker.Rand) } - -// Zip will generate a random Zip code string -func (f *Faker) Zip() string { return zip(f.Rand) } - -func zip(r *rand.Rand) string { - return replaceWithNumbers(r, getRandValue(r, []string{"address", "zip"})) -} - -// Country will generate a random country string -func Country() string { return country(globalFaker.Rand) } - -// Country will generate a random country string -func (f *Faker) Country() string { return country(f.Rand) } - -func country(r *rand.Rand) string { return getRandValue(r, []string{"address", "country"}) } - -// CountryAbr will generate a random abbreviated country string -func CountryAbr() string { return countryAbr(globalFaker.Rand) } - -// CountryAbr will generate a random abbreviated country string -func (f *Faker) CountryAbr() string { return countryAbr(f.Rand) } - -func countryAbr(r *rand.Rand) string { return getRandValue(r, []string{"address", "country_abr"}) } - -// Latitude will generate a random latitude float64 -func Latitude() float64 { return latitude(globalFaker.Rand) } - -// Latitude will generate a random latitude float64 -func (f *Faker) Latitude() float64 { return latitude(f.Rand) } - -func latitude(r *rand.Rand) float64 { return toFixed((r.Float64()*180)-90, 6) } - -// LatitudeInRange will generate a random latitude within the input range -func LatitudeInRange(min, max float64) (float64, error) { - return latitudeInRange(globalFaker.Rand, min, max) -} - -// LatitudeInRange will generate a random latitude within the input range -func (f *Faker) LatitudeInRange(min, max float64) (float64, error) { - return latitudeInRange(f.Rand, min, max) -} - -func latitudeInRange(r *rand.Rand, min, max float64) (float64, error) { - if min > max || min < -90 || min > 90 || max < -90 || max > 90 { - return 0, errors.New("invalid min or max range, must be valid floats and between -90 and 90") - } - return toFixed(float64Range(r, min, max), 6), nil -} - -// Longitude will generate a random longitude float64 -func Longitude() float64 { return longitude(globalFaker.Rand) } - -// Longitude will generate a random longitude float64 -func (f *Faker) Longitude() float64 { return longitude(f.Rand) } - -func longitude(r *rand.Rand) float64 { return toFixed((r.Float64()*360)-180, 6) } - -// LongitudeInRange will generate a random longitude within the input range -func LongitudeInRange(min, max float64) (float64, error) { - return longitudeInRange(globalFaker.Rand, min, max) -} - -// LongitudeInRange will generate a random longitude within the input range -func (f *Faker) LongitudeInRange(min, max float64) (float64, error) { - return longitudeInRange(f.Rand, min, max) -} - -func longitudeInRange(r *rand.Rand, min, max float64) (float64, error) { - if min > max || min < -180 || min > 180 || max < -180 || max > 180 { - return 0, errors.New("invalid min or max range, must be valid floats and between -180 and 180") - } - return toFixed(float64Range(r, min, max), 6), nil -} - -func addAddressLookup() { - AddFuncLookup("address", Info{ - Display: "Address", - Category: "address", - Description: "Random set of address info", - Example: `{ - address: "364 East Rapidsborough, Rutherfordstad, New Jersey 36906", - street: "364 East Rapidsborough", - city: "Rutherfordstad", - state: "New Jersey", - zip: "36906", - country: "South Africa", - latitude: "23.058758", - longitude: "89.022594" - }`, - Output: "map[string]interface", - ContentType: "application/json", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return address(r), nil - }, - }) - - AddFuncLookup("city", Info{ - Display: "City", - Category: "address", - Description: "Random city", - Example: "Marcelside", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return city(r), nil - }, - }) - - AddFuncLookup("country", Info{ - Display: "Country", - Category: "address", - Description: "Random country", - Example: "United States of America", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return country(r), nil - }, - }) - - AddFuncLookup("countryabr", Info{ - Display: "Country Abbreviation", - Category: "address", - Description: "Random 2 digit country abbreviation", - Example: "US", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return countryAbr(r), nil - }, - }) - - AddFuncLookup("state", Info{ - Display: "State", - Category: "address", - Description: "Random state", - Example: "Illinois", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return state(r), nil - }, - }) - - AddFuncLookup("stateabr", Info{ - Display: "State Abbreviation", - Category: "address", - Description: "Random 2 digit state abbreviation", - Example: "IL", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return stateAbr(r), nil - }, - }) - - AddFuncLookup("street", Info{ - Display: "Street", - Category: "address", - Description: "Random full street", - Example: "364 East Rapidsborough", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return street(r), nil - }, - }) - - AddFuncLookup("streetname", Info{ - Display: "Street Name", - Category: "address", - Description: "Random street name", - Example: "View", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return streetName(r), nil - }, - }) - - AddFuncLookup("streetnumber", Info{ - Display: "Street Number", - Category: "address", - Description: "Random street number", - Example: "13645", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return streetNumber(r), nil - }, - }) - - AddFuncLookup("streetprefix", Info{ - Display: "Street Prefix", - Category: "address", - Description: "Random street prefix", - Example: "Lake", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return streetPrefix(r), nil - }, - }) - - AddFuncLookup("streetsuffix", Info{ - Display: "Street Suffix", - Category: "address", - Description: "Random street suffix", - Example: "land", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return streetSuffix(r), nil - }, - }) - - AddFuncLookup("zip", Info{ - Display: "Zip", - Category: "address", - Description: "Random street zip", - Example: "13645", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return zip(r), nil - }, - }) - - AddFuncLookup("latitude", Info{ - Display: "Latitude", - Category: "address", - Description: "Random latitude", - Example: "-73.534056", - Output: "float", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return latitude(r), nil - }, - }) - - AddFuncLookup("latituderange", Info{ - Display: "Latitude Range", - Category: "address", - Description: "Random latitude between given range", - Example: "22.921026", - Output: "float", - Params: []Param{ - {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"}, - {Field: "max", Display: "Max", Type: "float", Default: "90", Description: "Maximum range"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetFloat64(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetFloat64(m, "max") - if err != nil { - return nil, err - } - - rangeOut, err := latitudeInRange(r, min, max) - if err != nil { - return nil, err - } - - return rangeOut, nil - }, - }) - - AddFuncLookup("longitude", Info{ - Display: "Longitude", - Category: "address", - Description: "Random longitude", - Example: "-147.068112", - Output: "float", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return longitude(r), nil - }, - }) - - AddFuncLookup("longituderange", Info{ - Display: "Longitude Range", - Category: "address", - Description: "Random longitude between given range", - Example: "-8.170450", - Output: "float", - Params: []Param{ - {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"}, - {Field: "max", Display: "Max", Type: "float", Default: "180", Description: "Maximum range"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetFloat64(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetFloat64(m, "max") - if err != nil { - return nil, err - } - - rangeOut, err := longitudeInRange(r, min, max) - if err != nil { - return nil, err - } - - return rangeOut, nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/animal.go b/vendor/github.com/brianvoe/gofakeit/v6/animal.go deleted file mode 100644 index 2330fdc35fd..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/animal.go +++ /dev/null @@ -1,180 +0,0 @@ -package gofakeit - -import "math/rand" - -// PetName will return a random fun pet name -func PetName() string { - return petName(globalFaker.Rand) -} - -// PetName will return a random fun pet name -func (f *Faker) PetName() string { - return petName(f.Rand) -} - -func petName(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "petname"}) -} - -// Animal will return a random animal -func Animal() string { - return animal(globalFaker.Rand) -} - -// Animal will return a random animal -func (f *Faker) Animal() string { - return animal(f.Rand) -} - -func animal(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "animal"}) -} - -// AnimalType will return a random animal type -func AnimalType() string { - return animalType(globalFaker.Rand) -} - -// AnimalType will return a random animal type -func (f *Faker) AnimalType() string { - return animalType(f.Rand) -} - -func animalType(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "type"}) -} - -// FarmAnimal will return a random animal that usually lives on a farm -func FarmAnimal() string { - return farmAnimal(globalFaker.Rand) -} - -// FarmAnimal will return a random animal that usually lives on a farm -func (f *Faker) FarmAnimal() string { - return farmAnimal(f.Rand) -} - -func farmAnimal(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "farm"}) -} - -// Cat will return a random cat breed -func Cat() string { - return cat(globalFaker.Rand) -} - -// Cat will return a random cat breed -func (f *Faker) Cat() string { - return cat(f.Rand) -} - -func cat(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "cat"}) -} - -// Dog will return a random dog breed -func Dog() string { - return dog(globalFaker.Rand) -} - -// Dog will return a random dog breed -func (f *Faker) Dog() string { - return dog(f.Rand) -} - -func dog(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "dog"}) -} - -// Bird will return a random bird species -func Bird() string { - return bird(globalFaker.Rand) -} - -// Bird will return a random bird species -func (f *Faker) Bird() string { - return bird(f.Rand) -} - -func bird(r *rand.Rand) string { - return getRandValue(r, []string{"animal", "bird"}) -} - -func addAnimalLookup() { - AddFuncLookup("petname", Info{ - Display: "Pet Name", - Category: "animal", - Description: "Random pet name", - Example: "Ozzy Pawsborne", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return petName(r), nil - }, - }) - - AddFuncLookup("animal", Info{ - Display: "Animal", - Category: "animal", - Description: "Random animal", - Example: "elk", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return animal(r), nil - }, - }) - - AddFuncLookup("animaltype", Info{ - Display: "Animal Type", - Category: "animal", - Description: "Random animal type", - Example: "amphibians", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return animalType(r), nil - }, - }) - - AddFuncLookup("farmanimal", Info{ - Display: "Farm Animal", - Category: "animal", - Description: "Random farm animal", - Example: "Chicken", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return farmAnimal(r), nil - }, - }) - - AddFuncLookup("cat", Info{ - Display: "Cat", - Category: "animal", - Description: "Random cat type", - Example: "Chausie", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return cat(r), nil - }, - }) - - AddFuncLookup("dog", Info{ - Display: "Dog", - Category: "animal", - Description: "Random dog type", - Example: "Norwich Terrier", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return dog(r), nil - }, - }) - - AddFuncLookup("bird", Info{ - Display: "Bird", - Category: "animal", - Description: "Random bird type", - Example: "goose", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bird(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/app.go b/vendor/github.com/brianvoe/gofakeit/v6/app.go deleted file mode 100644 index 3052383dd7b..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/app.go +++ /dev/null @@ -1,97 +0,0 @@ -package gofakeit - -import ( - "fmt" - "math/rand" -) - -// AppName will generate a random app name -func AppName() string { - return appName(globalFaker.Rand) -} - -// AppName will generate a random app name -func (f *Faker) AppName() string { - return appName(f.Rand) -} - -func appName(r *rand.Rand) string { - name := "" - switch number(r, 1, 3) { - case 1: - name = noun(r) + verb(r) - case 2: - name = color(r) + noun(r) - case 3: - name = animal(r) + verb(r) - } - - return title(name) -} - -// AppVersion will generate a random app version -func AppVersion() string { - return appVersion(globalFaker.Rand) -} - -// AppVersion will generate a random app version -func (f *Faker) AppVersion() string { - return appVersion(f.Rand) -} - -func appVersion(r *rand.Rand) string { - return fmt.Sprintf("%d.%d.%d", number(r, 1, 5), number(r, 1, 20), number(r, 1, 20)) -} - -// AppAuthor will generate a random company or person name -func AppAuthor() string { - return appAuthor(globalFaker.Rand) -} - -// AppAuthor will generate a random company or person name -func (f *Faker) AppAuthor() string { - return appAuthor(f.Rand) -} - -func appAuthor(r *rand.Rand) string { - if boolFunc(r) { - return name(r) - } - - return company(r) -} - -func addAppLookup() { - AddFuncLookup("appname", Info{ - Display: "App Name", - Category: "app", - Description: "Random app name", - Example: "Parkrespond", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return appName(r), nil - }, - }) - - AddFuncLookup("appversion", Info{ - Display: "App Version", - Category: "app", - Description: "Random app version", - Example: "1.12.14", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return appVersion(r), nil - }, - }) - - AddFuncLookup("appauthor", Info{ - Display: "App Author", - Category: "app", - Description: "Random app author", - Example: "Qado Energy, Inc.", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return appAuthor(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/auth.go b/vendor/github.com/brianvoe/gofakeit/v6/auth.go deleted file mode 100644 index 30995897680..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/auth.go +++ /dev/null @@ -1,146 +0,0 @@ -package gofakeit - -import "math/rand" - -// Username will generate a random username based upon picking a random lastname and random numbers at the end -func Username() string { - return username(globalFaker.Rand) -} - -// Username will generate a random username based upon picking a random lastname and random numbers at the end -func (f *Faker) Username() string { - return username(f.Rand) -} - -func username(r *rand.Rand) string { - return getRandValue(r, []string{"person", "last"}) + replaceWithNumbers(r, "####") -} - -// Password will generate a random password. -// Minimum number length of 5 if less than. -func Password(lower bool, upper bool, numeric bool, special bool, space bool, num int) string { - return password(globalFaker.Rand, lower, upper, numeric, special, space, num) -} - -// Password will generate a random password. -// Minimum number length of 5 if less than. -func (f *Faker) Password(lower bool, upper bool, numeric bool, special bool, space bool, num int) string { - return password(f.Rand, lower, upper, numeric, special, space, num) -} - -func password(r *rand.Rand, lower bool, upper bool, numeric bool, special bool, space bool, num int) string { - // Make sure the num minimum is at least 5 - if num < 5 { - num = 5 - } - i := 0 - b := make([]byte, num) - var passString string - - if lower { - passString += lowerStr - b[i] = lowerStr[r.Int63()%int64(len(lowerStr))] - i++ - } - if upper { - passString += upperStr - b[i] = upperStr[r.Int63()%int64(len(upperStr))] - i++ - } - if numeric { - passString += numericStr - b[i] = numericStr[r.Int63()%int64(len(numericStr))] - i++ - } - if special { - passString += specialStr - b[i] = specialStr[r.Int63()%int64(len(specialStr))] - i++ - } - if space { - passString += spaceStr - b[i] = spaceStr[r.Int63()%int64(len(spaceStr))] - i++ - } - - // Set default if empty - if passString == "" { - passString = lowerStr + numericStr - } - - // Loop through and add it up - for i <= num-1 { - b[i] = passString[r.Int63()%int64(len(passString))] - i++ - } - - // Shuffle bytes - for i := range b { - j := r.Intn(i + 1) - b[i], b[j] = b[j], b[i] - } - - return string(b) -} - -func addAuthLookup() { - AddFuncLookup("username", Info{ - Display: "Username", - Category: "auth", - Description: "Generates a random username", - Example: "Daniel1364", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return username(r), nil - }, - }) - - AddFuncLookup("password", Info{ - Display: "Password", - Category: "auth", - Description: "Generates a random password", - Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e", - Output: "string", - Params: []Param{ - {Field: "lower", Display: "Lower", Type: "bool", Default: "true", Description: "Whether or not to add lower case characters"}, - {Field: "upper", Display: "Upper", Type: "bool", Default: "true", Description: "Whether or not to add upper case characters"}, - {Field: "numeric", Display: "Numeric", Type: "bool", Default: "true", Description: "Whether or not to add numeric characters"}, - {Field: "special", Display: "Special", Type: "bool", Default: "true", Description: "Whether or not to add special characters"}, - {Field: "space", Display: "Space", Type: "bool", Default: "false", Description: "Whether or not to add spaces"}, - {Field: "length", Display: "Length", Type: "int", Default: "12", Description: "Number of characters in password"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - lower, err := info.GetBool(m, "lower") - if err != nil { - return nil, err - } - - upper, err := info.GetBool(m, "upper") - if err != nil { - return nil, err - } - - numeric, err := info.GetBool(m, "numeric") - if err != nil { - return nil, err - } - - special, err := info.GetBool(m, "special") - if err != nil { - return nil, err - } - - space, err := info.GetBool(m, "space") - if err != nil { - return nil, err - } - - length, err := info.GetInt(m, "length") - if err != nil { - return nil, err - } - - return password(r, lower, upper, numeric, special, space, length), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/beer.go b/vendor/github.com/brianvoe/gofakeit/v6/beer.go deleted file mode 100644 index 44a92026bae..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/beer.go +++ /dev/null @@ -1,208 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strconv" -) - -// BeerName will return a random beer name -func BeerName() string { - return beerName(globalFaker.Rand) -} - -// BeerName will return a random beer name -func (f *Faker) BeerName() string { - return beerName(f.Rand) -} - -func beerName(r *rand.Rand) string { - return getRandValue(r, []string{"beer", "name"}) -} - -// BeerStyle will return a random beer style -func BeerStyle() string { - return beerStyle(globalFaker.Rand) -} - -// BeerStyle will return a random beer style -func (f *Faker) BeerStyle() string { - return beerStyle(f.Rand) -} - -func beerStyle(r *rand.Rand) string { - return getRandValue(r, []string{"beer", "style"}) -} - -// BeerHop will return a random beer hop -func BeerHop() string { - return beerHop(globalFaker.Rand) -} - -// BeerHop will return a random beer hop -func (f *Faker) BeerHop() string { - return beerHop(f.Rand) -} - -func beerHop(r *rand.Rand) string { - return getRandValue(r, []string{"beer", "hop"}) -} - -// BeerYeast will return a random beer yeast -func BeerYeast() string { - return beerYeast(globalFaker.Rand) -} - -// BeerYeast will return a random beer yeast -func (f *Faker) BeerYeast() string { - return beerYeast(f.Rand) -} - -func beerYeast(r *rand.Rand) string { - return getRandValue(r, []string{"beer", "yeast"}) -} - -// BeerMalt will return a random beer malt -func BeerMalt() string { - return beerMalt(globalFaker.Rand) -} - -// BeerMalt will return a random beer malt -func (f *Faker) BeerMalt() string { - return beerMalt(f.Rand) -} - -func beerMalt(r *rand.Rand) string { - return getRandValue(r, []string{"beer", "malt"}) -} - -// BeerAlcohol will return a random beer alcohol level between 2.0 and 10.0 -func BeerAlcohol() string { - return beerAlcohol(globalFaker.Rand) -} - -// BeerAlcohol will return a random beer alcohol level between 2.0 and 10.0 -func (f *Faker) BeerAlcohol() string { - return beerAlcohol(f.Rand) -} - -func beerAlcohol(r *rand.Rand) string { - return strconv.FormatFloat(float64Range(r, 2.0, 10.0), 'f', 1, 64) + "%" -} - -// BeerIbu will return a random beer ibu value between 10 and 100 -func BeerIbu() string { - return beerIbu(globalFaker.Rand) -} - -// BeerIbu will return a random beer ibu value between 10 and 100 -func (f *Faker) BeerIbu() string { - return beerIbu(f.Rand) -} - -func beerIbu(r *rand.Rand) string { - return strconv.Itoa(randIntRange(r, 10, 100)) + " IBU" -} - -// BeerBlg will return a random beer blg between 5.0 and 20.0 -func BeerBlg() string { - return beerBlg(globalFaker.Rand) -} - -// BeerBlg will return a random beer blg between 5.0 and 20.0 -func (f *Faker) BeerBlg() string { - return beerBlg(f.Rand) -} - -func beerBlg(r *rand.Rand) string { - return strconv.FormatFloat(float64Range(r, 5.0, 20.0), 'f', 1, 64) + "°Blg" -} - -func addBeerLookup() { - AddFuncLookup("beername", Info{ - Display: "Beer Name", - Category: "beer", - Description: "Random beer name", - Example: "Duvel", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerName(r), nil - }, - }) - - AddFuncLookup("beerstyle", Info{ - Display: "Beer Style", - Category: "beer", - Description: "Random beer style", - Example: "European Amber Lager", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerStyle(r), nil - }, - }) - - AddFuncLookup("beerhop", Info{ - Display: "Beer Hop", - Category: "beer", - Description: "Random beer hop type", - Example: "Glacier", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerHop(r), nil - }, - }) - - AddFuncLookup("beeryeast", Info{ - Display: "Beer Yeast", - Category: "beer", - Description: "Random beer yeast value", - Example: "1388 - Belgian Strong Ale", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerYeast(r), nil - }, - }) - - AddFuncLookup("beermalt", Info{ - Display: "Beer Malt", - Category: "beer", - Description: "Random beer malt", - Example: "Munich", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerMalt(r), nil - }, - }) - - AddFuncLookup("beeralcohol", Info{ - Display: "Beer Alcohol", - Category: "beer", - Description: "Random alcohol percentage", - Example: "2.7%", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerAlcohol(r), nil - }, - }) - - AddFuncLookup("beeribu", Info{ - Display: "Beer IBU", - Category: "beer", - Description: "Random beer ibu", - Example: "29 IBU", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerIbu(r), nil - }, - }) - - AddFuncLookup("beerblg", Info{ - Display: "Beer BLG", - Category: "beer", - Description: "Random beer blg", - Example: "6.4°Blg", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return beerBlg(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/book.go b/vendor/github.com/brianvoe/gofakeit/v6/book.go deleted file mode 100644 index bf08886a097..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/book.go +++ /dev/null @@ -1,85 +0,0 @@ -package gofakeit - -import "math/rand" - -func BookTitle() string { return bookTitle(globalFaker.Rand) } - -func (f *Faker) BookTitle() string { return bookTitle(f.Rand) } - -func bookTitle(r *rand.Rand) string { return getRandValue(r, []string{"book", "title"}) } - -func BookAuthor() string { return bookAuthor(globalFaker.Rand) } - -func (f *Faker) BookAuthor() string { return bookAuthor(f.Rand) } - -func bookAuthor(r *rand.Rand) string { return getRandValue(r, []string{"book", "author"}) } - -func BookGenre() string { return bookGenre(globalFaker.Rand) } - -func (f *Faker) BookGenre() string { return bookGenre(f.Rand) } - -func bookGenre(r *rand.Rand) string { return getRandValue(r, []string{"book", "genre"}) } - -type BookInfo struct { - Title string `json:"title" xml:"name"` - Author string `json:"author" xml:"author"` - Genre string `json:"genre" xml:"genre"` -} - -func Book() *BookInfo { return book(globalFaker.Rand) } - -func (f *Faker) Book() *BookInfo { return book(f.Rand) } - -func book(r *rand.Rand) *BookInfo { - return &BookInfo{ - Title: bookTitle(r), - Author: bookAuthor(r), - Genre: bookGenre(r), - } -} - -func addBookLookup() { - AddFuncLookup("book", Info{ - Display: "Book", - Category: "book", - Description: "Random Book data set", - Example: `{title: "Hamlet", author: "Mark Twain", genre: "Adventure"}`, - Output: "map[string]string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return book(r), nil - }, - }) - - AddFuncLookup("booktitle", Info{ - Display: "Title", - Category: "book", - Description: "Random Book title", - Example: "Hamlet", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bookTitle(r), nil - }, - }) - - AddFuncLookup("bookauthor", Info{ - Display: "Author", - Category: "book", - Description: "Random Book author", - Example: "Mark Twain", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bookAuthor(r), nil - }, - }) - - AddFuncLookup("bookgenre", Info{ - Display: "Genre", - Category: "book", - Description: "Random Book genre", - Example: "Adventure", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bookGenre(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/car.go b/vendor/github.com/brianvoe/gofakeit/v6/car.go deleted file mode 100644 index 90685bdaaa4..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/car.go +++ /dev/null @@ -1,141 +0,0 @@ -package gofakeit - -import "math/rand" - -// CarInfo is a struct dataset of all car information -type CarInfo struct { - Type string `json:"type" xml:"type"` - Fuel string `json:"fuel" xml:"fuel"` - Transmission string `json:"transmission" xml:"transmission"` - Brand string `json:"brand" xml:"brand"` - Model string `json:"model" xml:"model"` - Year int `json:"year" xml:"year"` -} - -// Car will generate a struct with car information -func Car() *CarInfo { return car(globalFaker.Rand) } - -// Car will generate a struct with car information -func (f *Faker) Car() *CarInfo { return car(f.Rand) } - -func car(r *rand.Rand) *CarInfo { - return &CarInfo{ - Type: carType(r), - Fuel: carFuelType(r), - Transmission: carTransmissionType(r), - Brand: carMaker(r), - Model: carModel(r), - Year: year(r), - } -} - -// CarType will generate a random car type string -func CarType() string { return carType(globalFaker.Rand) } - -// CarType will generate a random car type string -func (f *Faker) CarType() string { return carType(f.Rand) } - -func carType(r *rand.Rand) string { return getRandValue(r, []string{"car", "type"}) } - -// CarFuelType will return a random fuel type -func CarFuelType() string { return carFuelType(globalFaker.Rand) } - -// CarFuelType will return a random fuel type -func (f *Faker) CarFuelType() string { return carFuelType(f.Rand) } - -func carFuelType(r *rand.Rand) string { return getRandValue(r, []string{"car", "fuel_type"}) } - -// CarTransmissionType will return a random transmission type -func CarTransmissionType() string { return carTransmissionType(globalFaker.Rand) } - -// CarTransmissionType will return a random transmission type -func (f *Faker) CarTransmissionType() string { return carTransmissionType(f.Rand) } - -func carTransmissionType(r *rand.Rand) string { - return getRandValue(r, []string{"car", "transmission_type"}) -} - -// CarMaker will return a random car maker -func CarMaker() string { return carMaker(globalFaker.Rand) } - -// CarMaker will return a random car maker -func (f *Faker) CarMaker() string { return carMaker(f.Rand) } - -func carMaker(r *rand.Rand) string { return getRandValue(r, []string{"car", "maker"}) } - -// CarModel will return a random car model -func CarModel() string { return carModel(globalFaker.Rand) } - -// CarModel will return a random car model -func (f *Faker) CarModel() string { return carModel(f.Rand) } - -func carModel(r *rand.Rand) string { return getRandValue(r, []string{"car", "model"}) } - -func addCarLookup() { - AddFuncLookup("car", Info{ - Display: "Car", - Category: "car", - Description: "Random car set of data", - Output: "map[string]interface", - ContentType: "application/json", - Example: `{type: "Passenger car mini", fuel: "Gasoline", transmission: "Automatic", brand: "Fiat", model: "Freestyle Fwd", year: "1972"}`, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return car(r), nil - }, - }) - - AddFuncLookup("cartype", Info{ - Display: "Car Type", - Category: "car", - Description: "Random car type", - Example: "Passenger car mini", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return carType(r), nil - }, - }) - - AddFuncLookup("carfueltype", Info{ - Display: "Car Fuel Type", - Category: "car", - Description: "Random car fuel type", - Example: "CNG", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return carFuelType(r), nil - }, - }) - - AddFuncLookup("cartransmissiontype", Info{ - Display: "Car Transmission Type", - Category: "car", - Description: "Random car transmission type", - Example: "Manual", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return carTransmissionType(r), nil - }, - }) - - AddFuncLookup("carmaker", Info{ - Display: "Car Maker", - Category: "car", - Description: "Random car maker", - Example: "Nissan", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return carMaker(r), nil - }, - }) - - AddFuncLookup("carmodel", Info{ - Display: "Car Model", - Category: "car", - Description: "Random car model", - Example: "Aveo", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return carModel(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go b/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go deleted file mode 100644 index 11c026fd4f3..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go +++ /dev/null @@ -1,64 +0,0 @@ -package gofakeit - -import "math/rand" - -// CelebrityActor will generate a random celebrity actor -func CelebrityActor() string { return celebrityActor(globalFaker.Rand) } - -// CelebrityActor will generate a random celebrity actor -func (f *Faker) CelebrityActor() string { return celebrityActor(f.Rand) } - -func celebrityActor(r *rand.Rand) string { return getRandValue(r, []string{"celebrity", "actor"}) } - -// CelebrityBusiness will generate a random celebrity business person -func CelebrityBusiness() string { return celebrityBusiness(globalFaker.Rand) } - -// CelebrityBusiness will generate a random celebrity business person -func (f *Faker) CelebrityBusiness() string { return celebrityBusiness(f.Rand) } - -func celebrityBusiness(r *rand.Rand) string { - return getRandValue(r, []string{"celebrity", "business"}) -} - -// CelebritySport will generate a random celebrity sport person -func CelebritySport() string { return celebritySport(globalFaker.Rand) } - -// CelebritySport will generate a random celebrity sport person -func (f *Faker) CelebritySport() string { return celebritySport(f.Rand) } - -func celebritySport(r *rand.Rand) string { return getRandValue(r, []string{"celebrity", "sport"}) } - -func addCelebrityLookup() { - AddFuncLookup("celebrityactor", Info{ - Display: "Celebrity Actor", - Category: "celebrity", - Description: "Random celebrity actor", - Example: "Brad Pitt", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return celebrityActor(r), nil - }, - }) - - AddFuncLookup("celebritybusiness", Info{ - Display: "Celebrity Business", - Category: "celebrity", - Description: "Random celebrity business person", - Example: "Elon Musk", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return celebrityBusiness(r), nil - }, - }) - - AddFuncLookup("celebritysport", Info{ - Display: "Celebrity Sport", - Category: "celebrity", - Description: "Random celebrity sport person", - Example: "Michael Phelps", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return celebritySport(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/color.go b/vendor/github.com/brianvoe/gofakeit/v6/color.go deleted file mode 100644 index fbd5905c4bb..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/color.go +++ /dev/null @@ -1,116 +0,0 @@ -package gofakeit - -import ( - "math/rand" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// Color will generate a random color string -func Color() string { return color(globalFaker.Rand) } - -// Color will generate a random color string -func (f *Faker) Color() string { return color(f.Rand) } - -func color(r *rand.Rand) string { return getRandValue(r, []string{"color", "full"}) } - -// NiceColor will generate a random safe color string -func NiceColors() []string { return niceColors(globalFaker.Rand) } - -// NiceColor will generate a random safe color string -func (f *Faker) NiceColors() []string { return niceColors(f.Rand) } - -func niceColors(r *rand.Rand) []string { - return data.ColorsNice[randIntRange(r, 0, len(data.ColorsNice)-1)] -} - -// SafeColor will generate a random safe color string -func SafeColor() string { return safeColor(globalFaker.Rand) } - -// SafeColor will generate a random safe color string -func (f *Faker) SafeColor() string { return safeColor(f.Rand) } - -func safeColor(r *rand.Rand) string { return getRandValue(r, []string{"color", "safe"}) } - -// HexColor will generate a random hexadecimal color string -func HexColor() string { return hexColor(globalFaker.Rand) } - -// HexColor will generate a random hexadecimal color string -func (f *Faker) HexColor() string { return hexColor(f.Rand) } - -func hexColor(r *rand.Rand) string { - color := make([]byte, 6) - hashQuestion := []byte("?#") - for i := 0; i < 6; i++ { - color[i] = hashQuestion[r.Intn(2)] - } - - return "#" + replaceWithHexLetters(r, replaceWithNumbers(r, string(color))) -} - -// RGBColor will generate a random int slice color -func RGBColor() []int { return rgbColor(globalFaker.Rand) } - -// RGBColor will generate a random int slice color -func (f *Faker) RGBColor() []int { return rgbColor(f.Rand) } - -func rgbColor(r *rand.Rand) []int { - return []int{randIntRange(r, 0, 255), randIntRange(r, 0, 255), randIntRange(r, 0, 255)} -} - -func addColorLookup() { - AddFuncLookup("color", Info{ - Display: "Color", - Category: "color", - Description: "Random color", - Example: "MediumOrchid", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return color(r), nil - }, - }) - - AddFuncLookup("nicecolors", Info{ - Display: "Nice Colors", - Category: "color", - Description: "Random set of nice colors", - Example: "[#5c323e #a82743 #e15e32 #c0d23e #e5f04c]", - Output: "[]string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return color(r), nil - }, - }) - - AddFuncLookup("safecolor", Info{ - Display: "Safe Color", - Category: "color", - Description: "Random safe color", - Example: "black", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return safeColor(r), nil - }, - }) - - AddFuncLookup("hexcolor", Info{ - Display: "Hex Color", - Category: "color", - Description: "Random hex color", - Example: "#a99fb4", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexColor(r), nil - }, - }) - - AddFuncLookup("rgbcolor", Info{ - Display: "RGB Color", - Category: "color", - Description: "Random rgb color", - Example: "[152 23 53]", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return rgbColor(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/company.go b/vendor/github.com/brianvoe/gofakeit/v6/company.go deleted file mode 100644 index fb0cdfa4d18..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/company.go +++ /dev/null @@ -1,225 +0,0 @@ -package gofakeit - -import "math/rand" - -// Company will generate a random company name string -func Company() string { return company(globalFaker.Rand) } - -// Company will generate a random company name string -func (f *Faker) Company() string { return company(f.Rand) } - -func company(r *rand.Rand) string { return getRandValue(r, []string{"company", "name"}) } - -// CompanySuffix will generate a random company suffix string -func CompanySuffix() string { return companySuffix(globalFaker.Rand) } - -// CompanySuffix will generate a random company suffix string -func (f *Faker) CompanySuffix() string { return companySuffix(f.Rand) } - -func companySuffix(r *rand.Rand) string { return getRandValue(r, []string{"company", "suffix"}) } - -// Blurb will generate a random company blurb string -func Blurb() string { return blurb(globalFaker.Rand) } - -func (f *Faker) Blurb() string { return blurb(f.Rand) } - -func blurb(r *rand.Rand) string { return getRandValue(r, []string{"company", "blurb"}) } - -// BuzzWord will generate a random company buzz word string -func BuzzWord() string { return buzzWord(globalFaker.Rand) } - -// BuzzWord will generate a random company buzz word string -func (f *Faker) BuzzWord() string { return buzzWord(f.Rand) } - -func buzzWord(r *rand.Rand) string { return getRandValue(r, []string{"company", "buzzwords"}) } - -// BS will generate a random company bs string -func BS() string { return bs(globalFaker.Rand) } - -// BS will generate a random company bs string -func (f *Faker) BS() string { return bs(f.Rand) } - -func bs(r *rand.Rand) string { return getRandValue(r, []string{"company", "bs"}) } - -// JobInfo is a struct of job information -type JobInfo struct { - Company string `json:"company" xml:"company"` - Title string `json:"title" xml:"title"` - Descriptor string `json:"descriptor" xml:"descriptor"` - Level string `json:"level" xml:"level"` -} - -// Job will generate a struct with random job information -func Job() *JobInfo { return job(globalFaker.Rand) } - -// Job will generate a struct with random job information -func (f *Faker) Job() *JobInfo { return job(f.Rand) } - -func job(r *rand.Rand) *JobInfo { - return &JobInfo{ - Company: company(r), - Title: jobTitle(r), - Descriptor: jobDescriptor(r), - Level: jobLevel(r), - } -} - -// JobTitle will generate a random job title string -func JobTitle() string { return jobTitle(globalFaker.Rand) } - -// JobTitle will generate a random job title string -func (f *Faker) JobTitle() string { return jobTitle(f.Rand) } - -func jobTitle(r *rand.Rand) string { return getRandValue(r, []string{"job", "title"}) } - -// JobDescriptor will generate a random job descriptor string -func JobDescriptor() string { return jobDescriptor(globalFaker.Rand) } - -// JobDescriptor will generate a random job descriptor string -func (f *Faker) JobDescriptor() string { return jobDescriptor(f.Rand) } - -func jobDescriptor(r *rand.Rand) string { return getRandValue(r, []string{"job", "descriptor"}) } - -// JobLevel will generate a random job level string -func JobLevel() string { return jobLevel(globalFaker.Rand) } - -// JobLevel will generate a random job level string -func (f *Faker) JobLevel() string { return jobLevel(f.Rand) } - -func jobLevel(r *rand.Rand) string { return getRandValue(r, []string{"job", "level"}) } - -// Slogan will generate a random company slogan -func Slogan() string { return slogan(globalFaker.Rand) } - -// Slogan will generate a random company slogan -func (f *Faker) Slogan() string { return slogan(f.Rand) } - -// Slogan will generate a random company slogan -func slogan(r *rand.Rand) string { - slogan := "" - var sloganStyle = number(r, 0, 2) - switch sloganStyle { - // Noun. Buzzword! - case 0: - slogan = getRandValue(r, []string{"company", "blurb"}) + ". " + getRandValue(r, []string{"company", "buzzwords"}) + "!" - // Buzzword Noun, Buzzword Noun. - case 1: - slogan = getRandValue(r, []string{"company", "buzzwords"}) + " " + getRandValue(r, []string{"company", "blurb"}) + ", " + getRandValue(r, []string{"company", "buzzwords"}) + " " + getRandValue(r, []string{"company", "blurb"}) + "." - // Buzzword bs Noun, Buzzword. - case 2: - slogan = getRandValue(r, []string{"company", "buzzwords"}) + " " + getRandValue(r, []string{"company", "bs"}) + " " + getRandValue(r, []string{"company", "blurb"}) + ", " + getRandValue(r, []string{"company", "buzzwords"}) + "." - } - return slogan -} - -func addCompanyLookup() { - AddFuncLookup("company", Info{ - Display: "Company", - Category: "company", - Description: "Random company name", - Example: "Moen, Pagac and Wuckert", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return company(r), nil - }, - }) - - AddFuncLookup("companysuffix", Info{ - Display: "Company Suffix", - Category: "company", - Description: "Random company name suffix", - Example: "Inc", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return companySuffix(r), nil - }, - }) - - AddFuncLookup("bs", Info{ - Display: "BS", - Category: "company", - Description: "Random bs company word", - Example: "front-end", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bs(r), nil - }, - }) - - AddFuncLookup("blurb", Info{ - Display: "Blurb", - Category: "company", - Description: "Random company blurb", - Example: "word", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return blurb(r), nil - }, - }) - - AddFuncLookup("buzzword", Info{ - Display: "Buzzword", - Category: "company", - Description: "Random company buzzwords", - Example: "disintermediate", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return buzzWord(r), nil - }, - }) - - AddFuncLookup("job", Info{ - Display: "Job", - Category: "company", - Description: "Random job data set", - Example: `{company: "Moen, Pagac and Wuckert", title: "Director", descriptor: "Central", level: "Assurance"}`, - Output: "map[string]string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return job(r), nil - }, - }) - - AddFuncLookup("jobtitle", Info{ - Display: "Job Title", - Category: "company", - Description: "Random job title", - Example: "Director", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return jobTitle(r), nil - }, - }) - - AddFuncLookup("jobdescriptor", Info{ - Display: "Job Descriptor", - Category: "company", - Description: "Random job descriptor", - Example: "Central", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return jobDescriptor(r), nil - }, - }) - - AddFuncLookup("joblevel", Info{ - Display: "Job Level", - Category: "company", - Description: "Random job level", - Example: "Assurance", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return jobLevel(r), nil - }, - }) - - AddFuncLookup("slogan", Info{ - Display: "Slogan", - Category: "comapny", - Description: "Random company slogan", - Example: "Universal seamless Focus, interactive.", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return slogan(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/csv.go b/vendor/github.com/brianvoe/gofakeit/v6/csv.go deleted file mode 100644 index b050e453455..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/csv.go +++ /dev/null @@ -1,187 +0,0 @@ -package gofakeit - -import ( - "bytes" - "encoding/csv" - "encoding/json" - "errors" - "fmt" - "math/rand" - "reflect" - "strings" -) - -// CSVOptions defines values needed for csv generation -type CSVOptions struct { - Delimiter string `json:"delimiter" xml:"delimiter" fake:"{randomstring:[,,tab]}"` - RowCount int `json:"row_count" xml:"row_count" fake:"{number:1,10}"` - Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` -} - -// CSV generates an object or an array of objects in json format -// A nil CSVOptions returns a randomly structured CSV. -func CSV(co *CSVOptions) ([]byte, error) { return csvFunc(globalFaker, co) } - -// CSV generates an object or an array of objects in json format -// A nil CSVOptions returns a randomly structured CSV. -func (f *Faker) CSV(co *CSVOptions) ([]byte, error) { return csvFunc(f, co) } - -func csvFunc(f *Faker, co *CSVOptions) ([]byte, error) { - if co == nil { - // We didn't get a CSVOptions, so create a new random one - err := f.Struct(&co) - if err != nil { - return nil, err - } - } - - // Check delimiter - if co.Delimiter == "" { - co.Delimiter = "," - } - if strings.ToLower(co.Delimiter) == "tab" { - co.Delimiter = "\t" - } - if co.Delimiter != "," && co.Delimiter != "\t" && co.Delimiter != ";" { - return nil, errors.New("invalid delimiter type") - } - - // Check fields - if co.Fields == nil || len(co.Fields) <= 0 { - return nil, errors.New("must pass fields in order to build json object(s)") - } - - // Make sure you set a row count - if co.RowCount <= 0 { - return nil, errors.New("must have row count") - } - - b := &bytes.Buffer{} - w := csv.NewWriter(b) - w.Comma = []rune(co.Delimiter)[0] - - // Add header row - header := make([]string, len(co.Fields)) - for i, field := range co.Fields { - header[i] = field.Name - } - w.Write(header) - - // Loop through row count +1(for header) and add fields - for i := 1; i < co.RowCount+1; i++ { - vr := make([]string, len(co.Fields)) - - // Loop through fields and add to them to map[string]any - for ii, field := range co.Fields { - if field.Function == "autoincrement" { - vr[ii] = fmt.Sprintf("%d", i) - continue - } - - // Get function info - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return nil, errors.New("invalid function, " + field.Function + " does not exist") - } - - value, err := funcInfo.Generate(f.Rand, &field.Params, funcInfo) - if err != nil { - return nil, err - } - - if _, ok := value.([]byte); ok { - // If it's a slice of bytes or struct, unmarshal it into an interface - var v any - if err := json.Unmarshal(value.([]byte), &v); err != nil { - return nil, err - } - value = v - } - - // If the value is a list of possible values, marsha it into a string - if reflect.TypeOf(value).Kind() == reflect.Struct || - reflect.TypeOf(value).Kind() == reflect.Ptr || - reflect.TypeOf(value).Kind() == reflect.Map || - reflect.TypeOf(value).Kind() == reflect.Slice { - b, err := json.Marshal(value) - if err != nil { - return nil, err - } - value = string(b) - } - - vr[ii] = fmt.Sprintf("%v", value) - } - - w.Write(vr) - } - - w.Flush() - - if err := w.Error(); err != nil { - return nil, err - } - - return b.Bytes(), nil -} - -func addFileCSVLookup() { - AddFuncLookup("csv", Info{ - Display: "CSV", - Category: "file", - Description: "Generates array of rows in csv format", - Example: ` - id,first_name,last_name,password - 1,Markus,Moen,Dc0VYXjkWABx - 2,Osborne,Hilll,XPJ9OVNbs5lm - `, - Output: "[]byte", - ContentType: "text/csv", - Params: []Param{ - {Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows"}, - {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields containing key name and function"}, - {Field: "delimiter", Display: "Delimiter", Type: "string", Default: ",", Description: "Separator in between row values"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - co := CSVOptions{} - - rowcount, err := info.GetInt(m, "rowcount") - if err != nil { - return nil, err - } - co.RowCount = rowcount - - fieldsStr, err := info.GetStringArray(m, "fields") - if err != nil { - return nil, err - } - - // Check to make sure fields has length - if len(fieldsStr) > 0 { - co.Fields = make([]Field, len(fieldsStr)) - - for i, f := range fieldsStr { - // Unmarshal fields string into fields array - err = json.Unmarshal([]byte(f), &co.Fields[i]) - if err != nil { - return nil, err - } - } - } - - delimiter, err := info.GetString(m, "delimiter") - if err != nil { - return nil, err - } - co.Delimiter = delimiter - - f := &Faker{Rand: r} - csvOut, err := csvFunc(f, &co) - if err != nil { - return nil, err - } - - return csvOut, nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/README.md b/vendor/github.com/brianvoe/gofakeit/v6/data/README.md deleted file mode 100644 index 64441741c24..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Gofakeit Data - -Gofakeit data set - -## List - -```go -List() -``` - -## Get/Set/Remove Data - -```go -data.Get("desserts") - -data.Set("desserts", map[string][]string{ - "cake": {"chocolate", "vanilla"}, - "pie": {"apple", "pecan"}, - "ice cream": {"strawberry", "vanilla"}, -}) - -data.Remove("desserts") -``` - -## Get/Set/Remove Sub Data - -```go -data.GetSubData("desserts", "cake") - -data.SetSub("desserts", "cake", []string{"chocolate", "vanilla"}) - -data.RemoveSub("desserts", "cake") -``` diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/address.go b/vendor/github.com/brianvoe/gofakeit/v6/data/address.go deleted file mode 100644 index 98d88e82191..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/address.go +++ /dev/null @@ -1,15 +0,0 @@ -package data - -// Address consists of address information -var Address = map[string][]string{ - "number": {"#####", "####", "###"}, - "street_prefix": {"North", "East", "West", "South", "New", "Lake", "Port"}, - "street_name": {"Alley", "Avenue", "Branch", "Bridge", "Brook", "Brooks", "Burg", "Burgs", "Bypass", "Camp", "Canyon", "Cape", "Causeway", "Center", "Centers", "Circle", "Circles", "Cliff", "Cliffs", "Club", "Common", "Corner", "Corners", "Course", "Court", "Courts", "Cove", "Coves", "Creek", "Crescent", "Crest", "Crossing", "Crossroad", "Curve", "Dale", "Dam", "Divide", "Drive", "Drive", "Drives", "Estate", "Estates", "Expressway", "Extension", "Extensions", "Fall", "Falls", "Ferry", "Field", "Fields", "Flat", "Flats", "Ford", "Fords", "Forest", "Forge", "Forges", "Fork", "Forks", "Fort", "Freeway", "Garden", "Gardens", "Gateway", "Glen", "Glens", "Green", "Greens", "Grove", "Groves", "Harbor", "Harbors", "Haven", "Heights", "Highway", "Hill", "Hills", "Hollow", "Inlet", "Inlet", "Island", "Island", "Islands", "Islands", "Isle", "Isle", "Junction", "Junctions", "Key", "Keys", "Knoll", "Knolls", "Lake", "Lakes", "Land", "Landing", "Lane", "Light", "Lights", "Loaf", "Lock", "Locks", "Locks", "Lodge", "Lodge", "Loop", "Mall", "Manor", "Manors", "Meadow", "Meadows", "Mews", "Mill", "Mills", "Mission", "Mission", "Motorway", "Mount", "Mountain", "Mountain", "Mountains", "Mountains", "Neck", "Orchard", "Oval", "Overpass", "Park", "Parks", "Parkway", "Parkways", "Pass", "Passage", "Path", "Pike", "Pine", "Pines", "Place", "Plain", "Plains", "Plains", "Plaza", "Plaza", "Point", "Points", "Port", "Port", "Ports", "Ports", "Prairie", "Prairie", "Radial", "Ramp", "Ranch", "Rapid", "Rapids", "Rest", "Ridge", "Ridges", "River", "Road", "Road", "Roads", "Roads", "Route", "Row", "Rue", "Run", "Shoal", "Shoals", "Shore", "Shores", "Skyway", "Spring", "Springs", "Springs", "Spur", "Spurs", "Square", "Square", "Squares", "Squares", "Station", "Station", "Stravenue", "Stravenue", "Stream", "Stream", "Street", "Street", "Streets", "Summit", "Summit", "Terrace", "Throughway", "Trace", "Track", "Trafficway", "Trail", "Trail", "Tunnel", "Tunnel", "Turnpike", "Turnpike", "Underpass", "Union", "Unions", "Valley", "Valleys", "Via", "Viaduct", "View", "Views", "Village", "Village", "Villages", "Ville", "Vista", "Vista", "Walk", "Walks", "Wall", "Way", "Ways", "Well", "Wells"}, - "street_suffix": {"town", "ton", "land", "ville", "berg", "burgh", "borough", "bury", "view", "port", "mouth", "stad", "furt", "chester", "mouth", "fort", "haven", "side", "shire"}, - "city": {"New York City", "Los Angeles", "Chicago", "Houston", "Philadelphia", "Phoenix", "San Antonio", "San Diego", "Dallas", "San Jose", "Austin", "Jacksonville", "Indianapolis", "San Francisco", "Columbus", "Fort Worth", "Charlotte", "Detroit", "El Paso", "Memphis", "Boston", "Seattle", "Denver", "Washington", "Nashville-Davidson", "Baltimore", "Louisville/Jefferson", "Portland", "Oklahoma", "Milwaukee", "Las Vegas", "Albuquerque", "Tucson", "Fresno", "Sacramento", "Long Beach", "Kansas", "Mesa", "Virginia Beach", "Atlanta", "Colorado Springs", "Raleigh", "Omaha", "Miami", "Oakland", "Tulsa", "Minneapolis", "Cleveland", "Wichita", "Arlington", "New Orleans", "Bakersfield", "Tampa", "Honolulu", "Anaheim", "Aurora", "Santa Ana", "St. Louis", "Riverside", "Corpus Christi", "Pittsburgh", "Lexington-Fayette", "Stockton", "Cincinnati", "St. Paul", "Toledo", "Newark", "Greensboro", "Plano", "Henderson", "Lincoln", "Buffalo", "Fort Wayne", "Jersey", "Chula Vista", "Orlando", "St. Petersburg", "Norfolk", "Chandler", "Laredo", "Madison", "Durham", "Lubbock", "Winston-Salem", "Garland", "Glendale", "Hialeah", "Reno", "Baton Rouge", "Irvine", "Chesapeake", "Irving", "Scottsdale", "North Las Vegas", "Fremont", "San Bernardino", "Boise", "Birmingham"}, - "state": {"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"}, - "state_abr": {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AE", "AA", "AP"}, - "zip": {"#####"}, - "country": {"Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Åland Islands", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Saint Barthélemy", "Bermuda", "Brunei Darussalam", "Bolivia (Plurinational State of)", "Bonaire, Sint Eustatius and Saba", "Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos (Keeling) Islands", "Congo, Democratic Republic of the", "Central African Republic", "Congo", "Switzerland", "Côte d'Ivoire", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cabo Verde", "Curaçao", "Christmas Island", "Cyprus", "Czechia", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic", "Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji", "Falkland Islands (Malvinas)", "Micronesia (Federated States of)", "Faroe Islands", "France", "Gabon", "United Kingdom of Great Britain and Northern Ireland", "Grenada", "Georgia", "French Guiana", "Guernsey", "Ghana", "Gibraltar", "Greenland", "Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala", "Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "Isle of Man", "India", "British Indian Ocean Territory", "Iraq", "Iran (Islamic Republic of)", "Iceland", "Italy", "Jersey", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "Korea (Democratic People's Republic of)", "Korea, Republic of", "Kuwait", "Cayman Islands", "Kazakhstan", "Lao People's Democratic Republic", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg", "Latvia", "Libya", "Morocco", "Monaco", "Moldova, Republic of", "Montenegro", "Saint Martin (French part)", "Madagascar", "Marshall Islands", "North Macedonia", "Mali", "Myanmar", "Mongolia", "Macao", "Northern Mariana Islands", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives", "Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia", "Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn", "Puerto Rico", "Palestine, State of", "Portugal", "Palau", "Paraguay", "Qatar", "Réunion", "Romania", "Serbia", "Russian Federation", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan", "Sweden", "Singapore", "Saint Helena, Ascension and Tristan da Cunha", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname", "South Sudan", "Sao Tome and Principe", "El Salvador", "Sint Maarten (Dutch part)", "Syrian Arab Republic", "Eswatini", "Turks and Caicos Islands", "Chad", "French Southern Territories", "Togo", "Thailand", "Tajikistan", "Tokelau", "Timor-Leste", "Turkmenistan", "Tunisia", "Tonga", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan, Province of China", "Tanzania, United Republic of", "Ukraine", "Uganda", "United States Minor Outlying Islands", "United States of America", "Uruguay", "Uzbekistan", "Holy See", "Saint Vincent and the Grenadines", "Venezuela (Bolivarian Republic of)", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Viet Nam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte", "South Africa", "Zambia", "Zimbabwe"}, - "country_abr": {"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/animals.go b/vendor/github.com/brianvoe/gofakeit/v6/data/animals.go deleted file mode 100644 index 2e379374403..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/animals.go +++ /dev/null @@ -1,12 +0,0 @@ -package data - -// Animal consists of animal information -var Animal = map[string][]string{ - "petname": {"Alfalfa", "Archie", "Attila", "Baloo", "Bark Twain", "Barney", "Beans", "Bernadette", "Betty", "Binx", "Biscuit", "Bitsy", "Bob", "Bruiser", "Butterball", "Butters", "Chalupa", "Cheeseburger", "Chewbarka", "Chompers", "Cujo", "Demi", "Dobby", "Doc McDoggins", "Droolius Caesar", "Elmo", "Fergus", "Fluffernutter", "Franz Fur-dinand", "Frodo", "Fyodor Dogstoevsky", "Gary", "Gollum", "Hairy Paw-ter", "Hercules", "Hobbit", "Jabba", "Jellybean", "Jimmy Chew", "Kareem Abdul Ja-Bark", "Kevin", "Khaleesi", "Larry", "Lloyd", "Mary Puppins", "Matilda", "Meatball", "Mister Miyagi", "Moose", "Munchkin", "Nacho", "Noodles", "Nugget", "Olga", "Orville Redenbarker", "Ozzy Pawsborne", "Pam", "Peanut", "Pee Wee", "Pikachu", "Prince of Barkness", "Pumba", "Rambo", "Rex", "Rocky", "Rufus", "Salsa", "Salvador Dogi", "Santa Paws", "Sarah Jessica Barker", "Scrappy", "Sherlock Bones", "Squeakers", "Squirt", "Tank", "Tater", "The Notorious D.O.G.", "Toto", "Twinkie", "Waffles", "Waldo", "Winnie the Poodle", "Woofgang Puck", "Yoda", "Zeus"}, - "animal": {"alligator", "alpaca", "ant", "antelope", "ape", "armadillo", "baboon", "badger", "bat", "bear", "beaver", "bee", "beetle", "buffalo", "butterfly", "camel", "caribou", "cat", "cattle", "cheetah", "chimpanzee", "chinchilla", "cicada", "clam", "cockroach", "cod", "coyote", "crab", "cricket", "crocodile", "crow", "deer", "dinosaur", "dog", "dolphin", "donkey", "duck", "eagle", "eel", "elephant", "elk", "ferret", "fish", "fly", "fox", "frog", "gerbil", "giraffe", "gnat", "gnu", "goat", "goldfish", "goose", "gorilla", "grasshopper", "guinea pig", "hamster", "hare", "hedgehog", "herring", "hippopotamus", "hornet", "horse", "hound", "hyena", "impala", "jackal", "jellyfish", "kangaroo", "koala", "leopard", "lion", "lizard", "llama", "locust", "louse", "macaw", "mallard", "mammoth", "manatee", "marten", "mink", "minnow", "mole", "monkey", "moose", "mosquito", "mouse", "mule", "muskrat", "otter", "ox", "oyster", "panda", "pig", "platypus", "porcupine", "porpoise", "prairie dog", "pug", "rabbit", "raccoon", "rat", "raven", "reindeer", "rhinoceros", "salmon", "sardine", "scorpion", "sea lion", "seal", "serval", "shark", "sheep", "skunk", "snail", "snake", "spider", "squirrel", "swan", "termite", "tiger", "toad", "tortoise", "trout", "turtle", "wallaby", "walrus", "wasp", "water buffalo", "weasel", "whale", "wildebeest", "wolf", "wombat", "woodchuck", "worm", "yak", "yellowjacket", "zebra"}, - "type": {"amphibians", "birds", "fish", "invertebrates", "mammals", "reptiles"}, - "farm": {"Chicken", "Cow", "Donkey", "Duck", "Goat", "Goose", "Horse", "Llama", "Pig", "Sheep", "Turkey"}, - "cat": {"Abyssinian", "Aegean", "American Bobtail", "American Curl", "American Shorthair", "American Wirehair", "Arabian Mau", "Asian", "Asian Semi-longhair", "Australian Mist", "Balinese", "Bambino", "Bengal", "Birman", "Bombay", "Brazilian Shorthair", "British Longhair", "British Semipi-longhair", "British Shorthair", "Burmese", "Burmilla", "California Spangled", "Chantilly-Tiffany", "Chartreux", "Chausie", "Cheetoh", "Colorpoint Shorthair", "Cornish Rex", "Cymric, or Manx Longhair", "Cyprus", "Devon Rex", "Donskoy, or Don Sphynx", "Dragon Li", "Dwarf cat, or Dwelf", "Egyptian Mau", "European Shorthair", "Exotic Shorthair", "Foldex Cat", "German Rex", "Havana Brown", "Highlander", "Himalayan, or Colorpoint Persian", "Japanese Bobtail", "Javanese", "Khao Manee", "Korat", "Korean Bobtail", "Korn Ja", "Kurilian Bobtail", "Kurilian Bobtail, or Kuril Islands Bobtail", "LaPerm", "Lykoi", "Maine Coon", "Manx", "Mekong Bobtail", "Minskin", "Munchkin", "Napoleon", "Nebelung", "Norwegian Forest Cat", "Ocicat", "Ojos Azules", "Oregon Rex", "Oriental Bicolor", "Oriental Longhair", "Oriental Shorthair", "Persian", "Peterbald", "Pixie-bob", "Raas", "Ragamuffin", "Ragdoll", "Russian Blue", "Russian White, Black and Tabby", "Sam Sawet", "Savannah", "Scottish Fold", "Selkirk Rex", "Serengeti", "Serrade petit", "Siamese", "Siberian", "Singapura", "Snowshoe", "Sokoke", "Somali", "Sphynx", "Suphalak", "Thai", "Tonkinese", "Toyger", "Turkish Angora", "Turkish Van", "Ukrainian Levkoy"}, - "dog": {"Affenpinscher", "African", "Airedale", "Akita", "Appenzeller", "Basenji", "Beagle", "Bluetick", "Borzoi", "Bouvier", "Boxer", "Brabancon", "Briard", "Boston Bulldog", "French Bulldog", "Staffordshire Bullterrier", "Cairn", "Chihuahua", "Chow", "Clumber", "Border Collie", "Coonhound", "Cardigan Corgi", "Dachshund", "Great Dane", "Scottish Deerhound", "Dhole", "Dingo", "Doberman", "Norwegian Elkhound", "Entlebucher", "Eskimo", "Germanshepherd", "Italian Greyhound", "Groenendael", "Ibizan Hound", "Afghan Hound", "Basset Hound", "Blood Hound", "English Hound", "Walker Hound", "Husky", "Keeshond", "Kelpie", "Komondor", "Kuvasz", "Labrador", "Leonberg", "Lhasa", "Malamute", "Malinois", "Maltese", "Bull Mastiff", "Tibetan Mastiff", "Mexicanhairless", "Bernese Mountain", "Swiss Mountain", "Newfoundland", "Otterhound", "Papillon", "Pekinese", "Pembroke", "Miniature Pinscher", "German Pointer", "Pomeranian", "Miniature Poodle", "Standard Poodle", "Toy Poodle", "Pug", "Pyrenees", "Redbone", "Chesapeake Retriever", "Curly Retriever", "Flatcoated Retriever", "Golden Retriever", "Rhodesian Ridgeback", "Rottweiler", "Saluki", "Samoyed", "Schipperke", "Giant Schnauzer", "Miniature Schnauzer", "English Setter", "Gordon Setter", "Irish Setter", "English Sheepdog", "Shetland Sheepdog", "Shiba", "Shihtzu", "Blenheim Spaniel", "Brittany Spaniel", "Cocker Spaniel", "Irish Spaniel", "Japanese Spaniel", "Sussex Spaniel", "Welsh Spaniel", "English Springer", "Stbernard", "American Terrier", "Australian Terrier", "Bedlington Terrier", "Border Terrier", "Dandie Terrier", "Fox Terrier", "Irish Terrier", "Kerryblue Terrier", "Lakeland Terrier", "Norfolk Terrier", "Norwich Terrier", "Patterdale Terrier", "Rat Terrier", "Scottish Terrier", "Sealyham Terrier", "Silky Terrier", "Tibetan Terrier", "Toy Terrier", "Westhighland Terrier", "Wheaten Terrier", "Yorkshire Terrier", "Vizsla", "Weimaraner", "Whippet", "Irish Wolfhound"}, - "bird": {"albatross", "bluejay", "canary", "cardinal", "chicken", "crow", "dove", "duck", "eagle", "emu", "falcon", "flamingo", "goose", "hornbill", "hummingbird", "ibis", "jay", "kingfisher", "lovebird", "mynah", "nightingale", "oriole", "ostrich", "owl", "parrot", "peacock", "penguin", "quail", "rooster", "sparrow", "swan", "thrush", "toucan", "vulture", "woodpecker", "yellow warbler"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/beer.go b/vendor/github.com/brianvoe/gofakeit/v6/data/beer.go deleted file mode 100644 index 1192907d5f2..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/beer.go +++ /dev/null @@ -1,10 +0,0 @@ -package data - -// Beer consists of various beer information -var Beer = map[string][]string{ - "name": {"Pliny The Elder", "Founders Kentucky Breakfast", "Trappistes Rochefort 10", "HopSlam Ale", "Stone Imperial Russian Stout", "St. Bernardus Abt 12", "Founders Breakfast Stout", "Weihenstephaner Hefeweissbier", "Péché Mortel", "Celebrator Doppelbock", "Duvel", "Dreadnaught IPA", "Nugget Nectar", "La Fin Du Monde", "Bourbon County Stout", "Old Rasputin Russian Imperial Stout", "Two Hearted Ale", "Ruination IPA", "Schneider Aventinus", "Double Bastard Ale", "90 Minute IPA", "Hop Rod Rye", "Trappistes Rochefort 8", "Chimay Grande Réserve", "Stone IPA", "Arrogant Bastard Ale", "Edmund Fitzgerald Porter", "Chocolate St", "Oak Aged Yeti Imperial Stout", "Ten FIDY", "Storm King Stout", "Shakespeare Oatmeal", "Alpha King Pale Ale", "Westmalle Trappist Tripel", "Samuel Smith’s Imperial IPA", "Yeti Imperial Stout", "Hennepin", "Samuel Smith’s Oatmeal Stout", "Brooklyn Black", "Oaked Arrogant Bastard Ale", "Sublimely Self-Righteous Ale", "Trois Pistoles", "Bell’s Expedition", "Sierra Nevada Celebration Ale", "Sierra Nevada Bigfoot Barleywine Style Ale", "Racer 5 India Pale Ale, Bear Republic Bre", "Orval Trappist Ale", "Hercules Double IPA", "Maharaj", "Maudite"}, - "hop": {"Ahtanum", "Amarillo", "Bitter Gold", "Bravo", "Brewer’s Gold", "Bullion", "Cascade", "Cashmere", "Centennial", "Chelan", "Chinook", "Citra", "Cluster", "Columbia", "Columbus", "Comet", "Crystal", "Equinox", "Eroica", "Fuggle", "Galena", "Glacier", "Golding", "Hallertau", "Horizon", "Liberty", "Magnum", "Millennium", "Mosaic", "Mt. Hood", "Mt. Rainier", "Newport", "Northern Brewer", "Nugget", "Olympic", "Palisade", "Perle", "Saaz", "Santiam", "Simcoe", "Sorachi Ace", "Sterling", "Summit", "Tahoma", "Tettnang", "TriplePearl", "Ultra", "Vanguard", "Warrior", "Willamette", "Yakima Gol"}, - "yeast": {"1007 - German Ale", "1010 - American Wheat", "1028 - London Ale", "1056 - American Ale", "1084 - Irish Ale", "1098 - British Ale", "1099 - Whitbread Ale", "1187 - Ringwood Ale", "1272 - American Ale II", "1275 - Thames Valley Ale", "1318 - London Ale III", "1332 - Northwest Ale", "1335 - British Ale II", "1450 - Dennys Favorite 50", "1469 - West Yorkshire Ale", "1728 - Scottish Ale", "1968 - London ESB Ale", "2565 - Kölsch", "1214 - Belgian Abbey", "1388 - Belgian Strong Ale", "1762 - Belgian Abbey II", "3056 - Bavarian Wheat Blend", "3068 - Weihenstephan Weizen", "3278 - Belgian Lambic Blend", "3333 - German Wheat", "3463 - Forbidden Fruit", "3522 - Belgian Ardennes", "3638 - Bavarian Wheat", "3711 - French Saison", "3724 - Belgian Saison", "3763 - Roeselare Ale Blend", "3787 - Trappist High Gravity", "3942 - Belgian Wheat", "3944 - Belgian Witbier", "2000 - Budvar Lager", "2001 - Urquell Lager", "2007 - Pilsen Lager", "2035 - American Lager", "2042 - Danish Lager", "2112 - California Lager", "2124 - Bohemian Lager", "2206 - Bavarian Lager", "2278 - Czech Pils", "2308 - Munich Lager", "2633 - Octoberfest Lager Blend", "5112 - Brettanomyces bruxellensis", "5335 - Lactobacillus", "5526 - Brettanomyces lambicus", "5733 - Pediococcus"}, - "malt": {"Black malt", "Caramel", "Carapils", "Chocolate", "Munich", "Caramel", "Carapils", "Chocolate malt", "Munich", "Pale", "Roasted barley", "Rye malt", "Special roast", "Victory", "Vienna", "Wheat mal"}, - "style": {"Light Lager", "Pilsner", "European Amber Lager", "Dark Lager", "Bock", "Light Hybrid Beer", "Amber Hybrid Beer", "English Pale Ale", "Scottish And Irish Ale", "Merican Ale", "English Brown Ale", "Porter", "Stout", "India Pale Ale", "German Wheat And Rye Beer", "Belgian And French Ale", "Sour Ale", "Belgian Strong Ale", "Strong Ale", "Fruit Beer", "Vegetable Beer", "Smoke-flavored", "Wood-aged Beer"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/book.go b/vendor/github.com/brianvoe/gofakeit/v6/data/book.go deleted file mode 100644 index ec3e5d849be..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/book.go +++ /dev/null @@ -1,101 +0,0 @@ -package data - -var Books = map[string][]string{ - "title": { - "Anna Karenina", - "Beloved", - "Blindness", - "Bostan", - "Buddenbrooks", - "Crime and Punishment", - "Don Quijote De La Mancha", - "Fairy tales", - "Faust", - "Gulliver's Travels", - "Gypsy Ballads", - "Hamlet", - "Harry potter and the sorcerer's stone", - "King Lear", - "Leaves of Grass", - "Lolita", - "Madame Bovary", - "Memoirs of Hadrian", - "Metamorphoses", - "Moby Dick", - "Nineteen Eighty-Four", - "Odyssey", - "Oedipus the King", - "One Hundred Years of Solitude", - "One Thousand and One Nights", - "Othello", - "Pippi Longstocking", - "Pride and Prejudice", - "Romeo & Juliet", - "Sherlock Holmes", - "Sons and Lovers", - "The Adventures of Huckleberry Finn", - "The Book Of Job", - "The Brothers Karamazov", - "The Golden Notebook", - "The Idiot", - "The Old Man and the Sea", - "The Stranger", - "Things Fall Apart", - "Ulysses", - "War and Peace", - "Wuthering Heights", - "Zorba the Greek", - }, - "author": { - "Albert Camus", - "Astrid Lindgren", - "Charles Dickens", - "D. H. Lawrence", - "Edgar Allan Poe", - "Emily Brontë", - "Ernest Hemingway", - "Franz Kafka", - "Fyodor Dostoevsky", - "George Orwell", - "Hans Christian Andersen", - "Homer", - "James Joyce", - "Jane Austen", - "Johann Wolfgang von Goethe", - "Jorge Luis Borges", - "Joanne K. Rowling", - "Leo Tolstoy", - "Marcel Proust", - "Mark Twain", - "Paul Celan", - "Salman Rushdie", - "Sophocles", - "Thomas Mann", - "Toni Morrison", - "Vladimir Nabokov", - "William Faulkner", - "William Shakespeare", - "Yasunari Kawabata", - }, - "genre": { - "Adventure", - "Comic", - "Crime", - "Erotic", - "Fiction", - "Fantasy", - "Historical", - "Horror", - "Magic", - "Mystery", - "Philosophical", - "Political", - "Romance", - "Saga", - "Satire", - "Science", - "Speculative", - "Thriller", - "Urban", - }, -} \ No newline at end of file diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/car.go b/vendor/github.com/brianvoe/gofakeit/v6/data/car.go deleted file mode 100644 index 8754b1220ec..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/car.go +++ /dev/null @@ -1,10 +0,0 @@ -package data - -// Car Beer consists of various beer information -var Car = map[string][]string{ - "type": {"Passenger car mini", "Passenger car light", "Passenger car compact", "Passenger car medium", "Passenger car heavy", "Sport utility vehicle", "Pickup truck", "Van"}, - "fuel_type": {"Gasoline", "Methanol", "Ethanol", "Diesel", "LPG", "CNG", "Electric"}, - "transmission_type": {"Manual", "Automatic"}, - "maker": {"Alfa Romeo", "Aston Martin", "Audi", "Bentley", "Benz", "BMW", "Bugatti", "Cadillac", "Chevrolet", "Chrysler", "Citroen", "Corvette", "DAF", "Dacia", "Daewoo", "Daihatsu", "Datsun", "De Lorean", "Dino", "Dodge", "Farboud", "Ferrari", "Fiat", "Ford", "Honda", "Hummer", "Hyundai", "Jaguar", "Jeep", "KIA", "Koenigsegg", "Lada", "Lamborghini", "Lancia", "Land Rover", "Lexus", "Ligier", "Lincoln", "Lotus", "Martini", "Maserati", "Maybach", "Mazda", "McLaren", "Mercedes", "Mercedes-Benz", "Mini", "Mitsubishi", "Nissan", "Noble", "Opel", "Peugeot", "Pontiac", "Porsche", "Renault", "Rolls-Royce", "Rover", "Saab", "Seat", "Skoda", "Smart", "Spyker", "Subaru", "Suzuki", "Toyota", "Tesla", "Vauxhall", "Volkswagen", "Volvo"}, - "model": {"Db9 Coupe", "Db9 Coupe Manual", "Db9 Volante", "V12 Vanquish S", "V8 Vantage", "A3", "A4", "A4 Avant Quattro", "A4 Cabriolet", "A4 Cabriolet Quattro", "A4 Quattro", "A6", "A6 Avant Quattro", "A6 Quattro", "A8 L", "Gti", "Passat", "S4", "S4 Avant", "S4 Cabriolet", "Tt Coupe", "Tt Roadster", "Bentley Arnage", "Continental Flying Spur", "Continental Gt", "325ci Convertible", "325i", "325xi", "325xi Sport Wagon", "330ci Convertible", "330i", "330xi", "525i", "525xi", "530i", "530xi", "530xi Sport Wagon", "550i", "650ci", "650ci Convertible", "750li", "760li", "M3", "M3 Convertible", "M5", "M6", "Mini Cooper", "Mini Cooper Convertible", "Mini Cooper S", "Mini Cooper S Convertible", "X3", "X5", "X5 4.8is", "Z4 3.0 Si Coupe", "Z4 3.0i", "Z4 3.0si", "Z4 M Roadster", "Veyron", "300c/srt-8", "Caravan 2wd", "Charger", "Commander 4wd", "Crossfire Roadster", "Dakota Pickup 2wd", "Dakota Pickup 4wd", "Durango 2wd", "Durango 4wd", "Grand Cherokee 2wd", "Grand Cherokee 4wd", "Liberty/cherokee 2wd", "Liberty/cherokee 4wd", "Pacifica 2wd", "Pacifica Awd", "Pt Cruiser", "Ram 1500 Pickup 2wd", "Ram 1500 Pickup 4wd", "Sebring 4-dr", "Stratus 4-dr", "Town & Country 2wd", "Viper Convertible", "Wrangler/tj 4wd", "F430", "Ferrari 612 Scaglietti", "Ferrari F141", "B4000 4wd", "Crown Victoria Police", "E150 Club Wagon", "E150 Econoline 2wd", "Escape 4wd", "Escape Fwd", "Escape Hybrid 4wd", "Escape Hybrid Fwd", "Expedition 2wd", "Explorer 2wd", "Explorer 4wd", "F150 Ffv 2wd", "F150 Ffv 4wd", "F150 Pickup 2wd", "F150 Pickup 4wd", "Five Hundred Awd", "Focus Fwd", "Focus Station Wag", "Freestar Wagon Fwd", "Freestyle Awd", "Freestyle Fwd", "Grand Marquis", "Gt 2wd", "Ls", "Mark Lt", "Milan", "Monterey Wagon Fwd", "Mountaineer 4wd", "Mustang", "Navigator 2wd", "Ranger Pickup 2wd", "Ranger Pickup 4wd", "Taurus", "Taurus Ethanol Ffv", "Thunderbird", "Town Car", "Zephyr", "B9 Tribeca Awd", "Baja Awd", "Forester Awd", "Impreza Awd", "Impreza Wgn/outback Spt Awd", "Legacy Awd", "Legacy Wagon Awd", "Outback Awd", "Outback Wagon Awd", "9-3 Convertible", "9-3 Sport Sedan", "9-5 Sedan", "C15 Silverado Hybrid 2wd", "C1500 Silverado 2wd", "C1500 Suburban 2wd", "C1500 Tahoe 2wd", "C1500 Yukon 2wd", "Cobalt", "Colorado 2wd", "Colorado 4wd", "Colorado Cab Chassis Inc 2wd", "Colorado Crew Cab 2wd", "Colorado Crew Cab 4wd", "Corvette", "Cts", "Dts", "Envoy 2wd", "Envoy Xl 4wd", "Equinox Awd", "Equinox Fwd", "Escalade 2wd", "Escalade Esv Awd", "G15/25chev Van 2wd Conv", "G1500/2500 Chevy Express 2wd", "G1500/2500 Chevy Van 2wd", "G6", "G6 Gt/gtp Convertible", "Grand Prix", "Gto", "H3 4wd", "Hhr Fwd", "I-280 2wd Ext Cab", "Impala", "K15 Silverado Hybrid 4wd", "K1500 Avalanche 4wd", "K1500 Silverado 4wd", "K1500 Tahoe 4wd", "Lacrosse/allure", "Limousine", "Malibu", "Montana Sv6 Awd", "Monte Carlo", "Rendezvous Awd", "Rendezvous Fwd", "Solstice", "Srx 2wd", "Srx Awd", "Ssr Pickup 2wd", "Sts", "Sts Awd", "Terraza Fwd", "Trailblazer 2wd", "Trailblazer 4wd", "Trailblazer Awd", "Trailblazer Ext 4wd", "Uplander Fwd", "Vue Awd", "Vue Fwd", "Xlr", "Aveo", "Forenza", "Forenza Wagon", "Verona", "Accord", "Accord Hybrid", "Civic", "Civic Hybrid", "Cr-v 4wd", "Element 2wd", "Element 4wd", "Insight", "Mdx 4wd", "Odyssey 2wd", "Pilot 2wd", "Pilot 4wd", "Ridgeline 4wd", "Rl", "Rsx", "S2000", "Tl", "Tsx", "Accent", "Azera", "Elantra", "Santafe 2wd", "Santafe 4wd", "Sonata", "Tiburon", "Tucson 2wd", "Tucson 4wd", "S-type 3.0 Litre", "S-type 4.2 Litre", "S-type R", "Vdp Lwb", "Xj8", "Xk8 Convertible", "Xkr Convertible", "X-type", "X-type Sport Brake", "Amanti", "Optima", "Optima(ms)", "Rio", "Sedona", "Sorento 2wd", "Sorento 4wd", "Spectra(ld)", "Sportage 2wd", "Sportage 4wd", "L-140/715 Gallardo", "L-147/148 Murcielago", "Lr3", "Range Rover", "Range Rover Sport", "Elise/exige", "Coupe Cambiocorsa/gt/g-sport", "Quattroporte", "Mazda 3", "Mazda 5", "Mazda 6", "Mazda 6 Sport Wagon", "Mazda Rx-8", "Mpv", "Mx-5", "C230", "C280", "C280 4matic", "C350", "C350 4matic", "C55 Amg", "Cl65 Amg", "Clk350", "Clk350 (cabriolet)", "Clk55 Amg (cabriolet)", "Cls500", "Cls55 Amg", "E320 Cdi", "E350", "E350 (wagon)", "E350 4matic", "E350 4matic (wagon)", "E500", "E55 Amg", "E55 Amg (wagon)", "Maybach 57s", "Maybach 62", "Ml350", "Ml500", "R350", "R500", "S350", "S430", "Sl500", "Sl600", "Sl65 Amg", "Slk280", "Slk350", "Slr", "Eclipse", "Endeavor 2wd", "Endeavor 4wd", "Galant", "Lancer", "Lancer Evolution", "Lancer Sportback", "Montero", "Outlander 2wd", "Outlander 4wd", "Vibe", "350z", "350z Roadster", "Altima", "Armada 2wd", "Armada 4wd", "Frontier 2wd", "Frontier V6-2wd", "Frontier V6-4wd", "Fx35 Awd", "Fx35 Rwd", "Fx45 Awd", "G35", "M35", "M35x", "M45", "Maxima", "Murano Awd", "Murano Fwd", "Pathfinder 2wd", "Pathfinder 4wd", "Q45", "Q45 Sport", "Quest", "Qx56 4wd", "Sentra", "Titan 2wd", "Titan 4wd", "Xterra 2wd", "Xterra 4wd", "Boxster", "Boxster S", "Carrera 2 Coupe", "Cayenne", "Cayenne S", "Cayenne Turbo", "Cayman S", "Phantom", "F150 Supercrew 4wd", "C8 Spyder", "Aerio", "Aerio Sx", "Aerio Sx Awd", "Grand Vitara Xl-7", "Grand Vitara Xl-7 4wd", "Grand Vitara Xv6", "Grand Vitara Xv6 Awd", "4runner 2wd", "4runner 4wd", "Avalon", "Camry", "Camry Solara", "Camry Solara Convertible", "Corolla", "Corolla Matrix", "Es 330", "Gs 300 4wd", "Gs 300/gs 430", "Gx 470", "Highlander 2wd", "Highlander 4wd", "Highlander Hybrid 2wd", "Highlander Hybrid 4wd", "Is 250", "Is 250 Awd", "Is 350", "Ls 430", "Lx 470", "Prius", "Rav4 2wd", "Rav4 4wd", "Rx 330 2wd", "Rx 330 4wd", "Rx 400h 4wd", "Sc 430", "Scion Tc", "Scion Xa", "Scion Xb", "Sequoia 2wd", "Sequoia 4wd", "Sienna 2wd", "Sienna 4wd", "Toyota Tacoma 2wd", "Toyota Tacoma 4wd", "Toyota Tundra 2wd", "Toyota Tundra 4wd", "Yaris", "A3 Quattro", "Golf", "Jetta", "New Beetle", "New Beetle Convertible", "Passat Wagon 4motion", "Phaeton", "Rabbit", "Touareg", "Tt Coupe Quattro", "Tt Roadster Quattro", "C70 Convertible", "S40 Awd", "S40 Fwd", "S60 Awd", "S60 Fwd", "S60 R Awd", "S80 Fwd", "V50 Awd", "V70 Fwd", "V70 R Awd", "Xc 70 Awd", "Xc 90 Awd", "Xc 90 Fwd"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/celebrity.go b/vendor/github.com/brianvoe/gofakeit/v6/data/celebrity.go deleted file mode 100644 index ae4fcffd8df..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/celebrity.go +++ /dev/null @@ -1,7 +0,0 @@ -package data - -var Celebrity = map[string][]string{ - "actor": {"Arnold Schwarzenegger", "Jim Carrey", "Emma Watson", "Robert Downey Jr.", "Daniel Radcliffe", "Chris Evans", "Leonardo DiCaprio", "Tom Cruise", "Brad Pitt", "Charles Chaplin", "Morgan Freeman", "Tom Hanks", "Hugh Jackman", "Matt Damon", "Sylvester Stallone", "Will Smith", "Clint Eastwood", "Cameron Diaz", "George Clooney", "Steven Spielberg", "Harrison Ford", "Robert De Niro", "Al Pacino", "Robert Downey Jr.", "Russell Crowe", "Liam Neeson", "Kate Winslet", "Mark Wahlberg", "Natalie Portman", "Pierce Brosnan", "Sean Connery", "Orlando Bloom", "Dwayne Johnson", "Jackie Chan", "Angelina Jolie", "Adam Sandler", "Scarlett Johansson", "Heath Ledger", "Anne Hathaway", "Jessica Alba", "Edward Norton", "Keira Knightley", "Bradley Cooper", "Will Ferrell", "Julia Roberts", "Nicolas Cage", "Daniel Craig", "Keanu Reeves", "Ian McKellen", "Halle Berry", "Bruce Willis", "Ben Stiller", "Tommy Lee Jones", "Antonio Banderas", "Denzel Washington", "Steve Carell", "Shia LaBeouf", "Megan Fox", "James Franco", "Mel Gibson", "Vin Diesel", "Tim Allen", "Robin Williams", "Kevin Spacey", "Jason Biggs", "Seann William Scott", "Jean-Claude Van Damme", "Zach Galifianakis", "Owen Wilson", "Christian Bale", "Peter Jackson", "Sandra Bullock", "Bruce Lee", "Drew Barrymore", "Macaulay Culkin", "Jack Nicholson", "Bill Murray", "Sigourney Weaver", "Jake Gyllenhaal", "Jason Statham", "Jet Li", "Kate Beckinsale", "Rowan Atkinson", "Marlon Brando", "John Travolta", "Channing Tatum", "Ben Affleck", "Shah Rukh Khan", "Jennifer Aniston", "Emma Stone", "Chris Hemsworth", "James McAvoy", "James Cameron", "Amitabh Bachchan", "Brendan Fraser", "Rachel McAdams", "Tom Hiddleston", "Aamir Khan"}, - "business": {"Elon Musk", "Steve Jobs", "Jeff Bezos", "Bill Gates", "Mark Zuckerberg", "Sundar Pichai", "Walt Disney", "Warren Buffett", "Mukesh Ambani", "P. T. Barnum", "Colonel Sanders", "Ray Kroc", "Richard Branson", "Henry Ford", "Larry Page", "Steve Wozniak", "Ratan Tata", "John D. Rockefeller", "Madam C. J. Walker", "Tim Cook", "Andrew Carnegie", "Paul Allen", "Bobby Flay", "J. P. Morgan", "Satya Nadella", "Dhirubhai Ambani", "Carlos Slim", "Ross Perot", "Jamie Oliver", "Jack Ma", "Larry Ellison", "Sam Walton", "Sheryl Sandberg", "Marco Pierre White", "Indra Nooyi", "David Rockefeller", "Steve Ballmer", "Beyonce Knowles", "N. R. Narayana Murthy", "Mark Wahlberg", "Cameron Diaz", "Sergey Brin", "Howard Hughes", "Jessica Alba", "Dustin Moskovitz", "Eva Mendes", "Amancio Ortega Gaona", "Fred Trump", "Jamsetji Tata", "Kate Hudson", "Martha Stewart", "Peter Jones", "Marco Polo", "Susan Wojcicki", "Oskar Schindler", "Elizabeth Hurley", "Sean Combs", "Kate Spade", "Vincent McMahon", "David Chang", "Coco Chanel", "Vera Wang", "Arianna Huffington", "John McAfee", "Dany Garcia", "Richard Attenborough", "Donatella Versace", "Chris Hughes", "Alexis Ohanian", "J. Paul Getty", "Sharon Osbourne", "Bob Iger", "Kate Walsh", "Chris Gardner", "Jessica Simpson", "Guy Fieri", "Joy Mangano", "Wolfgang Puck", "Christie Brinkley", "Tom Steyer", "Evan Spiegel", "Hugh Hefner", "Preity Zinta", "Shane McMahon", "Salt Bae", "Mario Batali", "Bernard Arnault", "Michael Bloomberg", "Portia de Rossi", "Kevin O'Leary", "Roman Abramovich", "Jamie Dimon", "Rob Dyrdek", "Emeril Lagasse", "Kat Von D", "Karlie Kloss", "Antoni Porowski", "Edmond James de Rothschild", "Mitt Romney", "Aristotle Onassis", "Richard Benjamin Harrison", "Ben Bernanke", "Mark Cuban", "William Randolph Hearst", "Nate Robinson", "Alan Shepard", "Christina Anstead", "Laurene Powell Jobs", "Adam Weitsman", "Gladys Knight", "Gary Vaynerchuk", "Robert Kraft", "John Paul DeJoria", "Lori Greiner", "Carly Fiorina", "Lakshmi Mittal", "Jerry Jones", "Meg Whitman", "Azim Premji", "Lisa Vanderpump", "Dana White", "Russell Simmons", "Jennifer Flavin", "Harry Hamlin", "Conrad Hilton", "Prescott Bush", "Alvaro Morte", "Shigeru Miyamoto", "Phil Knight", "Jack Dorsey", "Barbara Bush", "Lee Iacocca", "Ma Huateng", "Rick Harrison", "Drew Scott", "Jawed Karim", "Daymond John", "Jaclyn Smith", "Maryse Ouellet", "Allegra Versace"}, - "sport": {"Pele", "Usain Bolt", "Muhammad Ali", "Carl Lewis", "Jesse Owens", "Sir Donald Bradman", "Billie Jean King", "Eddy Merckx", "Jackie Joyner-Kersee", "Lionel Messi", "Babe Didrikson Zaharias", "Michael Jordan", "Larisa Latynina", "Diego Maradona", "Serena Williams", "Babe Ruth", "Roger Federer", "Martina Navratilova", "Michael Phelps", "Lottie Dod", "Sachin Tendulkar", "Johan Cruyff", "Tiger Woods", "Sonja Henie", "Aryton Senna", "Nadia Comaneci", "Sergei Bubka", "Emil Zatopek", "Manny Pacquiao", "Imran Khan", "Jackie Robinson", "Shane Warne", "Dhyan Chand", "Fred Perry", "Lin Dan", "Abebe Bikila", "Clara Hughes", "Jan-Ove Waldner", "Bobby Moore", "Bjorn Borg", "Karch Kiraly", "Bradley Wiggins", "Seve Ballesteros", "David Beckham", "Michael Schumacher", "Greg Lemond", "Mia Hamm", "Jacques Anquetil", "Jack Nicklaus", "Steve Davis", "John McEnroe", "Monica Seles", "Magic Johnson", "Joe DiMaggio", "Roger Bannister", "Mo Farah", "Mark Spitz", "Chris Evert", "Al Oerter", "Jimmy Connors", "Michael Johnson", "Ian Botham", "Jim Thorpe", "Sir Steve Redgrave", "Steffi Graf", "Sebastian Coe", "Hicham El Guerrouj", "Eric Liddell", "W.G Grace", "Kenenisa Bekele", "Bernard Hinault", "Bob Beamon", "Paavo Nurmi", "David Campese", "Kelly Slater", "Haile Gebreselassie", "Rafael Nadal", "Brian Lara", "Chris Hoy", "Serge Blanco", "Cristiano Ronaldo", "Sir Gary Sobers", "Andy Murray", "George Best", "Sir Viv Richards", "Fausto Coppi", "Eusebio", "Rod Laver", "Grete Waitz", "Margaret Smith Court", "Tegla Laroupe", "Fanny Blankers-Koen", "Asbel Kiprop", "Lewis Hamilton", "C.B.Fry", "Annika Sörenstam", "Wilma Rudolph", "Alberta Tomba", "Bo Jackson"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/colors.go b/vendor/github.com/brianvoe/gofakeit/v6/data/colors.go deleted file mode 100644 index 96761aad298..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/colors.go +++ /dev/null @@ -1,110 +0,0 @@ -package data - -// Colors consists of color information -var Colors = map[string][]string{ - "safe": {"black", "maroon", "green", "navy", "olive", "purple", "teal", "lime", "blue", "silver", "gray", "yellow", "fuchsia", "aqua", "white"}, - "full": {"AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond", "Blue", "BlueViolet", "Brown", "BurlyWood", "CadetBlue", "Chartreuse", "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson", "Cyan", "DarkBlue", "DarkCyan", "DarkGoldenRod", "DarkGray", "DarkGreen", "DarkKhaki", "DarkMagenta", "DarkOliveGreen", "Darkorange", "DarkOrchid", "DarkRed", "DarkSalmon", "DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkTurquoise", "DarkViolet", "DeepPink", "DeepSkyBlue", "DimGray", "DimGrey", "DodgerBlue", "FireBrick", "FloralWhite", "ForestGreen", "Fuchsia", "Gainsboro", "GhostWhite", "Gold", "GoldenRod", "Gray", "Green", "GreenYellow", "HoneyDew", "HotPink", "IndianRed", "Indigo", "Ivory", "Khaki", "Lavender", "LavenderBlush", "LawnGreen", "LemonChiffon", "LightBlue", "LightCoral", "LightCyan", "LightGoldenRodYellow", "LightGray", "LightGreen", "LightPink", "LightSalmon", "LightSeaGreen", "LightSkyBlue", "LightSlateGray", "LightSteelBlue", "LightYellow", "Lime", "LimeGreen", "Linen", "Magenta", "Maroon", "MediumAquaMarine", "MediumBlue", "MediumOrchid", "MediumPurple", "MediumSeaGreen", "MediumSlateBlue", "MediumSpringGreen", "MediumTurquoise", "MediumVioletRed", "MidnightBlue", "MintCream", "MistyRose", "Moccasin", "NavajoWhite", "Navy", "OldLace", "Olive", "OliveDrab", "Orange", "OrangeRed", "Orchid", "PaleGoldenRod", "PaleGreen", "PaleTurquoise", "PaleVioletRed", "PapayaWhip", "PeachPuff", "Peru", "Pink", "Plum", "PowderBlue", "Purple", "Red", "RosyBrown", "RoyalBlue", "SaddleBrown", "Salmon", "SandyBrown", "SeaGreen", "SeaShell", "Sienna", "Silver", "SkyBlue", "SlateBlue", "SlateGray", "Snow", "SpringGreen", "SteelBlue", "Tan", "Teal", "Thistle", "Tomato", "Turquoise", "Violet", "Wheat", "White", "WhiteSmoke", "Yellow", "YellowGreen"}, -} - -var ColorsNice = [][]string{ - {"#69d2e7", "#a7dbd8", "#e0e4cc", "#f38630", "#fa6900"}, - {"#fe4365", "#fc9d9a", "#f9cdad", "#c8c8a9", "#83af9b"}, - {"#ecd078", "#d95b43", "#c02942", "#542437", "#53777a"}, - {"#556270", "#4ecdc4", "#c7f464", "#ff6b6b", "#c44d58"}, - {"#774f38", "#e08e79", "#f1d4af", "#ece5ce", "#c5e0dc"}, - {"#e8ddcb", "#cdb380", "#036564", "#033649", "#031634"}, - {"#490a3d", "#bd1550", "#e97f02", "#f8ca00", "#8a9b0f"}, - {"#594f4f", "#547980", "#45ada8", "#9de0ad", "#e5fcc2"}, - {"#00a0b0", "#6a4a3c", "#cc333f", "#eb6841", "#edc951"}, - {"#e94e77", "#d68189", "#c6a49a", "#c6e5d9", "#f4ead5"}, - {"#3fb8af", "#7fc7af", "#dad8a7", "#ff9e9d", "#ff3d7f"}, - {"#d9ceb2", "#948c75", "#d5ded9", "#7a6a53", "#99b2b7"}, - {"#ffffff", "#cbe86b", "#f2e9e1", "#1c140d", "#cbe86b"}, - {"#efffcd", "#dce9be", "#555152", "#2e2633", "#99173c"}, - {"#343838", "#005f6b", "#008c9e", "#00b4cc", "#00dffc"}, - {"#413e4a", "#73626e", "#b38184", "#f0b49e", "#f7e4be"}, - {"#ff4e50", "#fc913a", "#f9d423", "#ede574", "#e1f5c4"}, - {"#99b898", "#fecea8", "#ff847c", "#e84a5f", "#2a363b"}, - {"#655643", "#80bca3", "#f6f7bd", "#e6ac27", "#bf4d28"}, - {"#00a8c6", "#40c0cb", "#f9f2e7", "#aee239", "#8fbe00"}, - {"#351330", "#424254", "#64908a", "#e8caa4", "#cc2a41"}, - {"#554236", "#f77825", "#d3ce3d", "#f1efa5", "#60b99a"}, - {"#5d4157", "#838689", "#a8caba", "#cad7b2", "#ebe3aa"}, - {"#8c2318", "#5e8c6a", "#88a65e", "#bfb35a", "#f2c45a"}, - {"#fad089", "#ff9c5b", "#f5634a", "#ed303c", "#3b8183"}, - {"#ff4242", "#f4fad2", "#d4ee5e", "#e1edb9", "#f0f2eb"}, - {"#f8b195", "#f67280", "#c06c84", "#6c5b7b", "#355c7d"}, - {"#d1e751", "#ffffff", "#000000", "#4dbce9", "#26ade4"}, - {"#1b676b", "#519548", "#88c425", "#bef202", "#eafde6"}, - {"#5e412f", "#fcebb6", "#78c0a8", "#f07818", "#f0a830"}, - {"#bcbdac", "#cfbe27", "#f27435", "#f02475", "#3b2d38"}, - {"#452632", "#91204d", "#e4844a", "#e8bf56", "#e2f7ce"}, - {"#eee6ab", "#c5bc8e", "#696758", "#45484b", "#36393b"}, - {"#f0d8a8", "#3d1c00", "#86b8b1", "#f2d694", "#fa2a00"}, - {"#2a044a", "#0b2e59", "#0d6759", "#7ab317", "#a0c55f"}, - {"#f04155", "#ff823a", "#f2f26f", "#fff7bd", "#95cfb7"}, - {"#b9d7d9", "#668284", "#2a2829", "#493736", "#7b3b3b"}, - {"#bbbb88", "#ccc68d", "#eedd99", "#eec290", "#eeaa88"}, - {"#b3cc57", "#ecf081", "#ffbe40", "#ef746f", "#ab3e5b"}, - {"#a3a948", "#edb92e", "#f85931", "#ce1836", "#009989"}, - {"#300030", "#480048", "#601848", "#c04848", "#f07241"}, - {"#67917a", "#170409", "#b8af03", "#ccbf82", "#e33258"}, - {"#aab3ab", "#c4cbb7", "#ebefc9", "#eee0b7", "#e8caaf"}, - {"#e8d5b7", "#0e2430", "#fc3a51", "#f5b349", "#e8d5b9"}, - {"#ab526b", "#bca297", "#c5ceae", "#f0e2a4", "#f4ebc3"}, - {"#607848", "#789048", "#c0d860", "#f0f0d8", "#604848"}, - {"#b6d8c0", "#c8d9bf", "#dadabd", "#ecdbbc", "#fedcba"}, - {"#a8e6ce", "#dcedc2", "#ffd3b5", "#ffaaa6", "#ff8c94"}, - {"#3e4147", "#fffedf", "#dfba69", "#5a2e2e", "#2a2c31"}, - {"#fc354c", "#29221f", "#13747d", "#0abfbc", "#fcf7c5"}, - {"#cc0c39", "#e6781e", "#c8cf02", "#f8fcc1", "#1693a7"}, - {"#1c2130", "#028f76", "#b3e099", "#ffeaad", "#d14334"}, - {"#a7c5bd", "#e5ddcb", "#eb7b59", "#cf4647", "#524656"}, - {"#dad6ca", "#1bb0ce", "#4f8699", "#6a5e72", "#563444"}, - {"#5c323e", "#a82743", "#e15e32", "#c0d23e", "#e5f04c"}, - {"#edebe6", "#d6e1c7", "#94c7b6", "#403b33", "#d3643b"}, - {"#fdf1cc", "#c6d6b8", "#987f69", "#e3ad40", "#fcd036"}, - {"#230f2b", "#f21d41", "#ebebbc", "#bce3c5", "#82b3ae"}, - {"#b9d3b0", "#81bda4", "#b28774", "#f88f79", "#f6aa93"}, - {"#3a111c", "#574951", "#83988e", "#bcdea5", "#e6f9bc"}, - {"#5e3929", "#cd8c52", "#b7d1a3", "#dee8be", "#fcf7d3"}, - {"#1c0113", "#6b0103", "#a30006", "#c21a01", "#f03c02"}, - {"#000000", "#9f111b", "#b11623", "#292c37", "#cccccc"}, - {"#382f32", "#ffeaf2", "#fcd9e5", "#fbc5d8", "#f1396d"}, - {"#e3dfba", "#c8d6bf", "#93ccc6", "#6cbdb5", "#1a1f1e"}, - {"#f6f6f6", "#e8e8e8", "#333333", "#990100", "#b90504"}, - {"#1b325f", "#9cc4e4", "#e9f2f9", "#3a89c9", "#f26c4f"}, - {"#a1dbb2", "#fee5ad", "#faca66", "#f7a541", "#f45d4c"}, - {"#c1b398", "#605951", "#fbeec2", "#61a6ab", "#accec0"}, - {"#5e9fa3", "#dcd1b4", "#fab87f", "#f87e7b", "#b05574"}, - {"#951f2b", "#f5f4d7", "#e0dfb1", "#a5a36c", "#535233"}, - {"#8dccad", "#988864", "#fea6a2", "#f9d6ac", "#ffe9af"}, - {"#2d2d29", "#215a6d", "#3ca2a2", "#92c7a3", "#dfece6"}, - {"#413d3d", "#040004", "#c8ff00", "#fa023c", "#4b000f"}, - {"#eff3cd", "#b2d5ba", "#61ada0", "#248f8d", "#605063"}, - {"#ffefd3", "#fffee4", "#d0ecea", "#9fd6d2", "#8b7a5e"}, - {"#cfffdd", "#b4dec1", "#5c5863", "#a85163", "#ff1f4c"}, - {"#9dc9ac", "#fffec7", "#f56218", "#ff9d2e", "#919167"}, - {"#4e395d", "#827085", "#8ebe94", "#ccfc8e", "#dc5b3e"}, - {"#a8a7a7", "#cc527a", "#e8175d", "#474747", "#363636"}, - {"#f8edd1", "#d88a8a", "#474843", "#9d9d93", "#c5cfc6"}, - {"#046d8b", "#309292", "#2fb8ac", "#93a42a", "#ecbe13"}, - {"#f38a8a", "#55443d", "#a0cab5", "#cde9ca", "#f1edd0"}, - {"#a70267", "#f10c49", "#fb6b41", "#f6d86b", "#339194"}, - {"#ff003c", "#ff8a00", "#fabe28", "#88c100", "#00c176"}, - {"#ffedbf", "#f7803c", "#f54828", "#2e0d23", "#f8e4c1"}, - {"#4e4d4a", "#353432", "#94ba65", "#2790b0", "#2b4e72"}, - {"#0ca5b0", "#4e3f30", "#fefeeb", "#f8f4e4", "#a5b3aa"}, - {"#4d3b3b", "#de6262", "#ffb88c", "#ffd0b3", "#f5e0d3"}, - {"#fffbb7", "#a6f6af", "#66b6ab", "#5b7c8d", "#4f2958"}, - {"#edf6ee", "#d1c089", "#b3204d", "#412e28", "#151101"}, - {"#9d7e79", "#ccac95", "#9a947c", "#748b83", "#5b756c"}, - {"#fcfef5", "#e9ffe1", "#cdcfb7", "#d6e6c3", "#fafbe3"}, - {"#9cddc8", "#bfd8ad", "#ddd9ab", "#f7af63", "#633d2e"}, - {"#30261c", "#403831", "#36544f", "#1f5f61", "#0b8185"}, - {"#aaff00", "#ffaa00", "#ff00aa", "#aa00ff", "#00aaff"}, - {"#d1313d", "#e5625c", "#f9bf76", "#8eb2c5", "#615375"}, - {"#ffe181", "#eee9e5", "#fad3b2", "#ffba7f", "#ff9c97"}, - {"#73c8a9", "#dee1b6", "#e1b866", "#bd5532", "#373b44"}, - {"#805841", "#dcf7f3", "#fffcdd", "#ffd8d8", "#f5a2a2"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/company.go b/vendor/github.com/brianvoe/gofakeit/v6/data/company.go deleted file mode 100644 index 43b6a2dc937..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/company.go +++ /dev/null @@ -1,10 +0,0 @@ -package data - -// Company consists of company information -var Company = map[string][]string{ - "name": {"3 Round Stones, Inc.", "48 Factoring Inc.", "5PSolutions", "Abt Associates", "Accela", "Accenture", "AccuWeather", "Acxiom", "Adaptive", "Adobe Digital Government", "Aidin", "Alarm.com", "Allianz", "Allied Van Lines", "AllState Insurance Group", "Alltuition", "Altova", "Amazon Web Services", "American Red Ball Movers", "Amida Technology Solutions", "Analytica", "Apextech LLC", "Appallicious", "Aquicore", "Archimedes Inc.", "AreaVibes Inc.", "Arpin Van Lines", "Arrive Labs", "ASC Partners", "Asset4", "Atlas Van Lines", "AtSite", "Aunt Bertha, Inc.", "Aureus Sciences (*Now part of Elsevier)", "AutoGrid Systems", "Avalara", "Avvo", "Ayasdi", "Azavea", "BaleFire Global", "Barchart", "Be Informed", "Bekins", "Berkery Noyes MandASoft", "Berkshire Hathaway", "BetterLesson", "BillGuard", "Bing", "Biovia", "BizVizz", "BlackRock", "Bloomberg", "Booz Allen Hamilton", "Boston Consulting Group", "Boundless", "Bridgewater", "Brightscope", "BuildFax", "Buildingeye", "BuildZoom", "Business and Legal Resources", "Business Monitor International", "Calcbench, Inc.", "Cambridge Information Group", "Cambridge Semantics", "CAN Capital", "Canon", "Capital Cube", "Cappex", "Captricity", "CareSet Systems", "Careset.com", "CARFAX", "Caspio", "Castle Biosciences", "CB Insights", "Ceiba Solutions", "Center for Responsive Politics", "Cerner", "Certara", "CGI", "Charles River Associates", "Charles Schwab Corp.", "Chemical Abstracts Service", "Child Care Desk", "Chubb", "Citigroup", "CityScan", "CitySourced", "Civic Impulse LLC", "Civic Insight", "Civinomics", "Civis Analytics", "Clean Power Finance", "ClearHealthCosts", "ClearStory Data", "Climate Corporation", "CliniCast", "Cloudmade", "Cloudspyre", "Code for America", "Code-N", "Collective IP", "College Abacus, an ECMC initiative", "College Board", "Compared Care", "Compendia Bioscience Life Technologies", "Compliance and Risks", "Computer Packages Inc", "CONNECT-DOT LLC.", "ConnectEDU", "Connotate", "Construction Monitor LLC", "Consumer Reports", "CoolClimate", "Copyright Clearance Center", "CoreLogic", "CostQuest", "Credit Karma", "Credit Sesame", "CrowdANALYTIX", "Dabo Health", "DataLogix", "DataMade", "DataMarket", "Datamyne", "DataWeave", "Deloitte", "DemystData", "Department of Better Technology", "Development Seed", "Docket Alarm, Inc.", "Dow Jones & Co.", "Dun & Bradstreet", "Earth Networks", "EarthObserver App", "Earthquake Alert!", "Eat Shop Sleep", "Ecodesk", "eInstitutional", "Embark", "EMC", "Energy Points, Inc.", "Energy Solutions Forum", "Enervee Corporation", "Enigma.io", "Ensco", "Environmental Data Resources", "Epsilon", "Equal Pay for Women", "Equifax", "Equilar", "Ernst & Young LLP", "eScholar LLC.", "Esri", "Estately", "Everyday Health", "Evidera", "Experian", "Expert Health Data Programming, Inc.", "Exversion", "Ez-XBRL", "Factset", "Factual", "Farmers", "FarmLogs", "Fastcase", "Fidelity Investments", "FindTheBest.com", "First Fuel Software", "FirstPoint, Inc.", "Fitch", "FlightAware", "FlightStats", "FlightView", "Food+Tech Connect", "Forrester Research", "Foursquare", "Fujitsu", "Funding Circle", "FutureAdvisor", "Fuzion Apps, Inc.", "Gallup", "Galorath Incorporated", "Garmin", "Genability", "GenoSpace", "Geofeedia", "Geolytics", "Geoscape", "GetRaised", "GitHub", "Glassy Media", "Golden Helix", "GoodGuide", "Google Maps", "Google Public Data Explorer", "Government Transaction Services", "Govini", "GovTribe", "Govzilla, Inc.", "gRadiant Research LLC", "Graebel Van Lines", "Graematter, Inc.", "Granicus", "GreatSchools", "GuideStar", "H3 Biomedicine", "Harris Corporation", "HDScores, Inc", "Headlight", "Healthgrades", "Healthline", "HealthMap", "HealthPocket, Inc.", "HelloWallet", "HERE", "Honest Buildings", "HopStop", "Housefax", "How's My Offer?", "IBM", "ideas42", "iFactor Consulting", "IFI CLAIMS Patent Services", "iMedicare", "Impact Forecasting (Aon)", "Impaq International", "Import.io", "IMS Health", "InCadence", "indoo.rs", "InfoCommerce Group", "Informatica", "InnoCentive", "Innography", "Innovest Systems", "Inovalon", "Inrix Traffic", "Intelius", "Intermap Technologies", "Investormill", "Iodine", "IPHIX", "iRecycle", "iTriage", "IVES Group Inc", "IW Financial", "JJ Keller", "J.P. Morgan Chase", "Junar, Inc.", "Junyo", "Jurispect", "Kaiser Permanante", "karmadata", "Keychain Logistics Corp.", "KidAdmit, Inc.", "Kimono Labs", "KLD Research", "Knoema", "Knowledge Agency", "KPMG", "Kroll Bond Ratings Agency", "Kyruus", "Lawdragon", "Legal Science Partners", "(Leg)Cyte", "LegiNation, Inc.", "LegiStorm", "Lenddo", "Lending Club", "Level One Technologies", "LexisNexis", "Liberty Mutual Insurance Cos.", "Lilly Open Innovation Drug Discovery", "Liquid Robotics", "Locavore", "LOGIXDATA, LLC", "LoopNet", "Loqate, Inc.", "LoseIt.com", "LOVELAND Technologies", "Lucid", "Lumesis, Inc.", "Mango Transit", "Mapbox", "Maponics", "MapQuest", "Marinexplore, Inc.", "MarketSense", "Marlin & Associates", "Marlin Alter and Associates", "McGraw Hill Financial", "McKinsey", "MedWatcher", "Mercaris", "Merrill Corp.", "Merrill Lynch", "MetLife", "mHealthCoach", "MicroBilt Corporation", "Microsoft Windows Azure Marketplace", "Mint", "Moody's", "Morgan Stanley", "Morningstar, Inc.", "Mozio", "MuckRock.com", "Munetrix", "Municode", "National Van Lines", "Nationwide Mutual Insurance Company", "Nautilytics", "Navico", "NERA Economic Consulting", "NerdWallet", "New Media Parents", "Next Step Living", "NextBus", "nGAP Incorporated", "Nielsen", "Noesis", "NonprofitMetrics", "North American Van Lines", "Noveda Technologies", "NuCivic", "Numedii", "Oliver Wyman", "OnDeck", "OnStar", "Ontodia, Inc", "Onvia", "Open Data Nation", "OpenCounter", "OpenGov", "OpenPlans", "OpportunitySpace, Inc.", "Optensity", "optiGov", "OptumInsight", "Orlin Research", "OSIsoft", "OTC Markets", "Outline", "Oversight Systems", "Overture Technologies", "Owler", "Palantir Technologies", "Panjiva", "Parsons Brinckerhoff", "Patently-O", "PatientsLikeMe", "Pave", "Paxata", "PayScale, Inc.", "PeerJ", "People Power", "Persint", "Personal Democracy Media", "Personal, Inc.", "Personalis", "Peterson's", "PEV4me.com", "PIXIA Corp", "PlaceILive.com", "PlanetEcosystems", "PlotWatt", "Plus-U", "PolicyMap", "Politify", "Poncho App", "POPVOX", "Porch", "PossibilityU", "PowerAdvocate", "Practice Fusion", "Predilytics", "PricewaterhouseCoopers (PWC)", "ProgrammableWeb", "Progressive Insurance Group", "Propeller Health", "ProPublica", "PublicEngines", "PYA Analytics", "Qado Energy, Inc.", "Quandl", "Quertle", "Quid", "R R Donnelley", "RAND Corporation", "Rand McNally", "Rank and Filed", "Ranku", "Rapid Cycle Solutions", "realtor.com", "Recargo", "ReciPal", "Redfin", "RedLaser", "Reed Elsevier", "REI Systems", "Relationship Science", "Remi", "Retroficiency", "Revaluate", "Revelstone", "Rezolve Group", "Rivet Software", "Roadify Transit", "Robinson + Yu", "Russell Investments", "Sage Bionetworks", "SAP", "SAS", "Scale Unlimited", "Science Exchange", "Seabourne", "SeeClickFix", "SigFig", "Simple Energy", "SimpleTuition", "SlashDB", "Smart Utility Systems", "SmartAsset", "SmartProcure", "Smartronix", "SnapSense", "Social Explorer", "Social Health Insights", "SocialEffort Inc", "Socrata", "Solar Census", "SolarList", "Sophic Systems Alliance", "S&P Capital IQ", "SpaceCurve", "SpeSo Health", "Spikes Cavell Analytic Inc", "Splunk", "Spokeo", "SpotCrime", "SpotHero.com", "Stamen Design", "Standard and Poor's", "State Farm Insurance", "Sterling Infosystems", "Stevens Worldwide Van Lines", "STILLWATER SUPERCOMPUTING INC", "StockSmart", "Stormpulse", "StreamLink Software", "StreetCred Software, Inc", "StreetEasy", "Suddath", "Symcat", "Synthicity", "T. Rowe Price", "Tableau Software", "TagniFi", "Telenav", "Tendril", "Teradata", "The Advisory Board Company", "The Bridgespan Group", "The DocGraph Journal", "The Govtech Fund", "The Schork Report", "The Vanguard Group", "Think Computer Corporation", "Thinknum", "Thomson Reuters", "TopCoder", "TowerData", "TransparaGov", "TransUnion", "TrialTrove", "TrialX", "Trintech", "TrueCar", "Trulia", "TrustedID", "TuvaLabs", "Uber", "Unigo LLC", "United Mayflower", "Urban Airship", "Urban Mapping, Inc", "US Green Data", "U.S. News Schools", "USAA Group", "USSearch", "Verdafero", "Vimo", "VisualDoD, LLC", "Vital Axiom | Niinja", "VitalChek", "Vitals", "Vizzuality", "Votizen", "Walk Score", "WaterSmart Software", "WattzOn", "Way Better Patents", "Weather Channel", "Weather Decision Technologies", "Weather Underground", "WebFilings", "Webitects", "WebMD", "Weight Watchers", "WeMakeItSafer", "Wheaton World Wide Moving", "Whitby Group", "Wolfram Research", "Wolters Kluwer", "Workhands", "Xatori", "Xcential", "xDayta", "Xignite", "Yahoo", "Zebu Compliance Solutions", "Yelp", "YourMapper", "Zillow", "ZocDoc", "Zonability", "Zoner", "Zurich Insurance (Risk Room)"}, - "suffix": {"Inc", "and Sons", "LLC", "Group"}, - "buzzwords": {"Adaptive", "Advanced", "Ameliorated", "Assimilated", "Automated", "Balanced", "Business-focused", "Centralized", "Cloned", "Compatible", "Configurable", "Cross-group", "Cross-platform", "Customer-focused", "Customizable", "De-engineered", "Decentralized", "Devolved", "Digitized", "Distributed", "Diverse", "Down-sized", "Enhanced", "Enterprise-wide", "Ergonomic", "Exclusive", "Expanded", "Extended", "Face to face", "Focused", "Front-line", "Fully-configurable", "Function-based", "Fundamental", "Future-proofed", "Grass-roots", "Horizontal", "Implemented", "Innovative", "Integrated", "Intuitive", "Inverse", "Managed", "Mandatory", "Monitored", "Multi-channelled", "Multi-lateral", "Multi-layered", "Multi-tiered", "Networked", "Object-based", "Open-architected", "Open-source", "Operative", "Optimized", "Optional", "Organic", "Organized", "Persevering", "Persistent", "Phased", "Polarised", "Pre-emptive", "Proactive", "Profit-focused", "Profound", "Programmable", "Progressive", "Public-key", "Quality-focused", "Re-contextualized", "Re-engineered", "Reactive", "Realigned", "Reduced", "Reverse-engineered", "Right-sized", "Robust", "Seamless", "Secured", "Self-enabling", "Sharable", "Stand-alone", "Streamlined", "Switchable", "Synchronised", "Synergistic", "Synergized", "Team-oriented", "Total", "Triple-buffered", "Universal", "Up-sized", "Upgradable", "User-centric", "User-friendly", "Versatile", "Virtual", "Vision-oriented", "Visionary", "24 hour", "24/7", "3rd generation", "4th generation", "5th generation", "6th generation", "actuating", "analyzing", "asymmetric", "asynchronous", "attitude-oriented", "background", "bandwidth-monitored", "bi-directional", "bifurcated", "bottom-line", "clear-thinking", "client-driven", "client-server", "coherent", "cohesive", "composite", "content-based", "context-sensitive", "contextually-based", "dedicated", "demand-driven", "didactic", "directional", "discrete", "disintermediate", "dynamic", "eco-centric", "empowering", "encompassing", "even-keeled", "executive", "explicit", "exuding", "fault-tolerant", "foreground", "fresh-thinking", "full-range", "global", "grid-enabled", "heuristic", "high-level", "holistic", "homogeneous", "human-resource", "hybrid", "impactful", "incremental", "intangible", "interactive", "intermediate", "leading edge", "local", "logistical", "maximized", "methodical", "mission-critical", "mobile", "modular", "motivating", "multi-state", "multi-tasking", "multimedia", "national", "needs-based", "neutral", "next generation", "non-volatile", "object-oriented", "optimal", "optimizing", "radical", "real-time", "reciprocal", "regional", "responsive", "scalable", "secondary", "solution-oriented", "stable", "static", "system-worthy", "systematic", "systemic", "tangible", "tertiary", "transitional", "uniform", "upward-trending", "user-facing", "value-added", "web-enabled", "well-modulated", "zero administration", "zero defect", "zero tolerance", "Graphic Interface", "Graphical User Interface", "ability", "access", "adapter", "algorithm", "alliance", "analyzer", "application", "approach", "architecture", "archive", "array", "artificial intelligence", "attitude", "benchmark", "budgetary management", "capability", "capacity", "challenge", "circuit", "collaboration", "complexity", "concept", "conglomeration", "contingency", "core", "customer loyalty", "data-warehouse", "database", "definition", "emulation", "encoding", "encryption", "extranet", "firmware", "flexibility", "focus group", "forecast", "frame", "framework", "function", "functionalities", "groupware", "hardware", "help-desk", "hierarchy", "hub", "implementation", "info-mediaries", "infrastructure", "initiative", "installation", "instruction set", "interface", "internet solution", "intranet", "knowledge base", "knowledge user", "leverage", "local area network", "matrices", "matrix", "methodology", "middleware", "migration", "model", "moderator", "monitoring", "moratorium", "neural-net", "open architecture", "open system", "orchestration", "paradigm", "parallelism", "policy", "portal", "pricing structure", "process improvement", "product", "productivity", "project", "projection", "protocol", "secured line", "service-desk", "software", "solution", "standardization", "strategy", "structure", "success", "superstructure", "support", "synergy", "system engine", "task-force", "throughput", "time-frame", "toolset", "utilisation", "website", "workforce"}, - "bs": {"aggregate", "architect", "benchmark", "brand", "cultivate", "deliver", "deploy", "disintermediate", "drive", "e-enable", "embrace", "empower", "enable", "engage", "engineer", "enhance", "envisioneer", "evolve", "expedite", "exploit", "extend", "facilitate", "generate", "grow", "harness", "implement", "incentivize", "incubate", "innovate", "integrate", "iterate", "leverage", "matrix", "maximize", "mesh", "monetize", "morph", "optimize", "orchestrate", "productize", "recontextualize", "redefine", "reintermediate", "reinvent", "repurpose", "revolutionize", "scale", "seize", "strategize", "streamline", "syndicate", "synergize", "synthesize", "target", "transform", "transition", "unleash", "utilize", "visualize", "whiteboard", "24-365", "24-7", "B2B", "B2C", "back-end", "best-of-breed", "bleeding-edge", "bricks-and-clicks", "clicks-and-mortar", "collaborative", "compelling", "cross-media", "cross-platform", "customized", "cutting-edge", "distributed", "dot-com", "dynamic", "e-business", "efficient", "end-to-end", "enterprise", "extensible", "frictionless", "front-end", "global", "granular", "holistic", "impactful", "innovative", "integrated", "interactive", "intuitive", "killer", "leading-edge", "magnetic", "mission-critical", "next-generation", "one-to-one", "open-source", "out-of-the-box", "plug-and-play", "proactive", "real-time", "revolutionary", "rich", "robust", "scalable", "seamless", "sexy", "sticky", "strategic", "synergistic", "transparent", "turn-key", "ubiquitous", "user-centric", "value-added", "vertical", "viral", "virtual", "visionary", "web-enabled", "wireless", "world-class", "ROI", "action-items", "applications", "architectures", "bandwidth", "channels", "communities", "content", "convergence", "deliverables", "e-business", "e-commerce", "e-markets", "e-services", "e-tailers", "experiences", "eyeballs", "functionalities", "infomediaries", "infrastructures", "initiatives", "interfaces", "markets", "methodologies", "metrics", "mindshare", "models", "networks", "niches", "paradigms", "partnerships", "platforms", "portals", "relationships", "schemas", "solutions", "supply-chains", "synergies", "systems", "technologies", "users", "vortals", "web services", "web-readiness"}, - "blurb": {"Advancement", "Advantage", "Ambition", "Balance", "Belief", "Benefits", "Care", "Challenge", "Change", "Choice", "Commitment", "Comfort", "Connection", "Consistency", "Creativity", "Dedication", "Discovery", "Diversity", "Dream", "Dreams", "Drive", "Ease", "Efficiency", "Empowerment", "Endurance", "Energy", "Engagement", "Environment", "Enterprise", "Excellence", "Exclusivity", "Experience", "Exploration", "Expression", "Family", "Flexibility", "Focus", "Freedom", "Future", "Future", "Growth", "Harmony", "Health", "Heart", "History", "Home", "Honesty", "Hope", "Impact", "Innovation", "Inspiration", "Integrity", "Joy", "Journey", "Knowledge", "Leadership", "Legacy", "Life", "Luxury", "Money", "Motivation", "Optimism", "Partnership", "Passion", "Peace", "People", "Performance", "Perseverance", "Pleasure", "Power", "Pride", "Progress", "Promise", "Quality", "Quality", "Reliability", "Resilience", "Respect", "Revolution", "Safety", "Service", "Simplicity", "Solutions", "Solidarity", "Strength", "Style", "Success", "Sustainability", "Taste", "Teamwork", "Technology", "Time", "Transformation", "Trust", "Unity", "Value", "Versatility", "Vision", "Wellness", "World"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/computer.go b/vendor/github.com/brianvoe/gofakeit/v6/data/computer.go deleted file mode 100644 index b682c6f820c..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/computer.go +++ /dev/null @@ -1,8 +0,0 @@ -package data - -// Computer consists of computer information -var Computer = map[string][]string{ - "linux_processor": {"i686", "x86_64"}, - "mac_processor": {"Intel", "PPC", "U; Intel", "U; PPC"}, - "windows_platform": {"Windows NT 6.2", "Windows NT 6.1", "Windows NT 6.0", "Windows NT 5.2", "Windows NT 5.1", "Windows NT 5.01", "Windows NT 5.0", "Windows NT 4.0", "Windows 98; Win 9x 4.90", "Windows 98", "Windows 95", "Windows CE"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/currency.go b/vendor/github.com/brianvoe/gofakeit/v6/data/currency.go deleted file mode 100644 index 13b8019973c..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/currency.go +++ /dev/null @@ -1,7 +0,0 @@ -package data - -// Currency consists of currency information -var Currency = map[string][]string{ - "short": {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWD"}, - "long": {"United Arab Emirates Dirham", "Afghanistan Afghani", "Albania Lek", "Armenia Dram", "Netherlands Antilles Guilder", "Angola Kwanza", "Argentina Peso", "Australia Dollar", "Aruba Guilder", "Azerbaijan New Manat", "Bosnia and Herzegovina Convertible Marka", "Barbados Dollar", "Bangladesh Taka", "Bulgaria Lev", "Bahrain Dinar", "Burundi Franc", "Bermuda Dollar", "Brunei Darussalam Dollar", "Bolivia Boliviano", "Brazil Real", "Bahamas Dollar", "Bhutan Ngultrum", "Botswana Pula", "Belarus Ruble", "Belize Dollar", "Canada Dollar", "Congo/Kinshasa Franc", "Switzerland Franc", "Chile Peso", "China Yuan Renminbi", "Colombia Peso", "Costa Rica Colon", "Cuba Convertible Peso", "Cuba Peso", "Cape Verde Escudo", "Czech Republic Koruna", "Djibouti Franc", "Denmark Krone", "Dominican Republic Peso", "Algeria Dinar", "Egypt Pound", "Eritrea Nakfa", "Ethiopia Birr", "Euro Member Countries", "Fiji Dollar", "Falkland Islands (Malvinas) Pound", "United Kingdom Pound", "Georgia Lari", "Guernsey Pound", "Ghana Cedi", "Gibraltar Pound", "Gambia Dalasi", "Guinea Franc", "Guatemala Quetzal", "Guyana Dollar", "Hong Kong Dollar", "Honduras Lempira", "Croatia Kuna", "Haiti Gourde", "Hungary Forint", "Indonesia Rupiah", "Israel Shekel", "Isle of Man Pound", "India Rupee", "Iraq Dinar", "Iran Rial", "Iceland Krona", "Jersey Pound", "Jamaica Dollar", "Jordan Dinar", "Japan Yen", "Kenya Shilling", "Kyrgyzstan Som", "Cambodia Riel", "Comoros Franc", "Korea (North) Won", "Korea (South) Won", "Kuwait Dinar", "Cayman Islands Dollar", "Kazakhstan Tenge", "Laos Kip", "Lebanon Pound", "Sri Lanka Rupee", "Liberia Dollar", "Lesotho Loti", "Lithuania Litas", "Libya Dinar", "Morocco Dirham", "Moldova Leu", "Madagascar Ariary", "Macedonia Denar", "Myanmar (Burma) Kyat", "Mongolia Tughrik", "Macau Pataca", "Mauritania Ouguiya", "Mauritius Rupee", "Maldives (Maldive Islands) Rufiyaa", "Malawi Kwacha", "Mexico Peso", "Malaysia Ringgit", "Mozambique Metical", "Namibia Dollar", "Nigeria Naira", "Nicaragua Cordoba", "Norway Krone", "Nepal Rupee", "New Zealand Dollar", "Oman Rial", "Panama Balboa", "Peru Nuevo Sol", "Papua New Guinea Kina", "Philippines Peso", "Pakistan Rupee", "Poland Zloty", "Paraguay Guarani", "Qatar Riyal", "Romania New Leu", "Serbia Dinar", "Russia Ruble", "Rwanda Franc", "Saudi Arabia Riyal", "Solomon Islands Dollar", "Seychelles Rupee", "Sudan Pound", "Sweden Krona", "Singapore Dollar", "Saint Helena Pound", "Sierra Leone Leone", "Somalia Shilling", "Seborga Luigino", "Suriname Dollar", "São Tomé and Príncipe Dobra", "El Salvador Colon", "Syria Pound", "Swaziland Lilangeni", "Thailand Baht", "Tajikistan Somoni", "Turkmenistan Manat", "Tunisia Dinar", "Tonga Pa'anga", "Turkey Lira", "Trinidad and Tobago Dollar", "Tuvalu Dollar", "Taiwan New Dollar", "Tanzania Shilling", "Ukraine Hryvnia", "Uganda Shilling", "United States Dollar", "Uruguay Peso", "Uzbekistan Som", "Venezuela Bolivar", "Viet Nam Dong", "Vanuatu Vatu", "Samoa Tala", "Communauté Financière Africaine (BEAC) CFA Franc BEAC", "East Caribbean Dollar", "International Monetary Fund (IMF) Special Drawing Rights", "Communauté Financière Africaine (BCEAO) Franc", "Comptoirs Français du Pacifique (CFP) Franc", "Yemen Rial", "South Africa Rand", "Zambia Kwacha", "Zimbabwe Dollar"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/data.go b/vendor/github.com/brianvoe/gofakeit/v6/data/data.go deleted file mode 100644 index b293b5ad19b..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/data.go +++ /dev/null @@ -1,89 +0,0 @@ -package data - -// Data consists of the main set of fake information -var Data = map[string]map[string][]string{ - "person": Person, - "address": Address, - "company": Company, - "job": Job, - "lorem": Lorem, - "language": Languages, - "internet": Internet, - "file": Files, - "color": Colors, - "computer": Computer, - "hipster": Hipster, - "beer": Beer, - "hacker": Hacker, - "animal": Animal, - "currency": Currency, - "log_level": LogLevels, - "timezone": TimeZone, - "car": Car, - "emoji": Emoji, - "word": Word, - "sentence": Sentence, - "food": Food, - "minecraft": Minecraft, - "celebrity": Celebrity, - "error": Error, - "html": Html, - "book": Books, - "movie": Movies, - "school": School, -} - -func List() map[string][]string { - var list = make(map[string][]string) - - // Loop through the data and add the keys to the list - for key := range Data { - list[key] = []string{} - - // Loop through the sub data and add the keys to the list - for subkey := range Data[key] { - list[key] = append(list[key], subkey) - } - } - - return list -} - -func Get(key string) map[string][]string { - // Make sure the key exists, if not return an empty map - if _, ok := Data[key]; !ok { - return make(map[string][]string) - } - - return Data[key] -} - -func Set(key string, data map[string][]string) { - Data[key] = data -} - -func Remove(key string) { - delete(Data, key) -} - -func GetSubData(key, subkey string) []string { - // Make sure the key exists, if not return an empty map - if _, ok := Data[key]; !ok { - return []string{} - } - - return Data[key][subkey] -} - -func SetSub(key, subkey string, data []string) { - // Make sure the key exists, if not add it - if _, ok := Data[key]; !ok { - Data[key] = make(map[string][]string) - } - - Data[key][subkey] = data -} - -func RemoveSub(key, subkey string) { - delete(Data[key], subkey) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/datetime.go b/vendor/github.com/brianvoe/gofakeit/v6/data/datetime.go deleted file mode 100644 index 1007b769918..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/datetime.go +++ /dev/null @@ -1,10 +0,0 @@ -package data - -// TimeZone is an array of short and long timezones -var TimeZone = map[string][]string{ - "offset": {"-12", "-11", "-10", "-8", "-7", "-7", "-8", "-7", "-6", "-6", "-6", "-5", "-5", "-6", "-5", "-4", "-4", "-4.5", "-4", "-3", "-4", "-4", "-4", "-2.5", "-3", "-3", "-3", "-3", "-3", "-3", "-2", "-1", "0", "-1", "1", "0", "0", "1", "1", "0", "2", "2", "2", "2", "1", "1", "3", "3", "2", "3", "3", "2", "3", "3", "3", "2", "3", "3", "3", "3", "3", "3", "4", "4.5", "4", "5", "4", "4", "4", "4.5", "5", "5", "5", "5.5", "5.5", "5.75", "6", "6", "6.5", "7", "7", "8", "8", "8", "8", "8", "8", "9", "9", "9", "9.5", "9.5", "10", "10", "10", "10", "10", "11", "11", "12", "12", "12", "12", "13", "13", "13"}, - "abr": {"DST", "U", "HST", "AKDT", "PDT", "PDT", "PST", "UMST", "MDT", "MDT", "CAST", "CDT", "CDT", "CCST", "SPST", "EDT", "UEDT", "VST", "PYT", "ADT", "CBST", "SWST", "PSST", "NDT", "ESAST", "AST", "SEST", "GDT", "MST", "BST", "U", "MDT", "ADT", "CVST", "MDT", "UTC", "GMT", "BST", "GDT", "GST", "WEDT", "CEDT", "RDT", "CEDT", "WCAST", "NST", "GDT", "MEDT", "EST", "SDT", "EEDT", "SAST", "FDT", "TDT", "JDT", "LST", "JST", "AST", "KST", "AST", "EAST", "MSK", "SAMT", "IDT", "AST", "ADT", "MST", "GST", "CST", "AST", "WAST", "YEKT", "PKT", "IST", "SLST", "NST", "CAST", "BST", "MST", "SAST", "NCAST", "CST", "NAST", "MPST", "WAST", "TST", "UST", "NAEST", "JST", "KST", "CAST", "ACST", "EAST", "AEST", "WPST", "TST", "YST", "CPST", "VST", "NZST", "U", "FST", "MST", "KDT", "TST", "SST"}, - "text": {"Dateline Standard Time", "UTC-11", "Hawaiian Standard Time", "Alaskan Standard Time", "Pacific Standard Time (Mexico)", "Pacific Daylight Time", "Pacific Standard Time", "US Mountain Standard Time", "Mountain Standard Time (Mexico)", "Mountain Standard Time", "Central America Standard Time", "Central Standard Time", "Central Standard Time (Mexico)", "Canada Central Standard Time", "SA Pacific Standard Time", "Eastern Standard Time", "US Eastern Standard Time", "Venezuela Standard Time", "Paraguay Standard Time", "Atlantic Standard Time", "Central Brazilian Standard Time", "SA Western Standard Time", "Pacific SA Standard Time", "Newfoundland Standard Time", "E. South America Standard Time", "Argentina Standard Time", "SA Eastern Standard Time", "Greenland Standard Time", "Montevideo Standard Time", "Bahia Standard Time", "UTC-02", "Mid-Atlantic Standard Time", "Azores Standard Time", "Cape Verde Standard Time", "Morocco Standard Time", "UTC", "Greenwich Mean Time", "British Summer Time", "GMT Standard Time", "Greenwich Standard Time", "W. Europe Standard Time", "Central Europe Standard Time", "Romance Standard Time", "Central European Standard Time", "W. Central Africa Standard Time", "Namibia Standard Time", "GTB Standard Time", "Middle East Standard Time", "Egypt Standard Time", "Syria Standard Time", "E. Europe Standard Time", "South Africa Standard Time", "FLE Standard Time", "Turkey Standard Time", "Israel Standard Time", "Libya Standard Time", "Jordan Standard Time", "Arabic Standard Time", "Kaliningrad Standard Time", "Arab Standard Time", "E. Africa Standard Time", "Moscow Standard Time", "Samara Time", "Iran Standard Time", "Arabian Standard Time", "Azerbaijan Standard Time", "Mauritius Standard Time", "Georgian Standard Time", "Caucasus Standard Time", "Afghanistan Standard Time", "West Asia Standard Time", "Yekaterinburg Time", "Pakistan Standard Time", "India Standard Time", "Sri Lanka Standard Time", "Nepal Standard Time", "Central Asia Standard Time", "Bangladesh Standard Time", "Myanmar Standard Time", "SE Asia Standard Time", "N. Central Asia Standard Time", "China Standard Time", "North Asia Standard Time", "Singapore Standard Time", "W. Australia Standard Time", "Taipei Standard Time", "Ulaanbaatar Standard Time", "North Asia East Standard Time", "Japan Standard Time", "Korea Standard Time", "Cen. Australia Standard Time", "AUS Central Standard Time", "E. Australia Standard Time", "AUS Eastern Standard Time", "West Pacific Standard Time", "Tasmania Standard Time", "Yakutsk Standard Time", "Central Pacific Standard Time", "Vladivostok Standard Time", "New Zealand Standard Time", "UTC+12", "Fiji Standard Time", "Magadan Standard Time", "Kamchatka Standard Time", "Tonga Standard Time", "Samoa Standard Time"}, - "full": {"(UTC-12:00) International Date Line West", "(UTC-11:00) Coordinated Universal Time-11", "(UTC-10:00) Hawaii", "(UTC-09:00) Alaska", "(UTC-08:00) Baja California", "(UTC-07:00) Pacific Time (US & Canada)", "(UTC-08:00) Pacific Time (US & Canada)", "(UTC-07:00) Arizona", "(UTC-07:00) Chihuahua, La Paz, Mazatlan", "(UTC-07:00) Mountain Time (US & Canada)", "(UTC-06:00) Central America", "(UTC-06:00) Central Time (US & Canada)", "(UTC-06:00) Guadalajara, Mexico City, Monterrey", "(UTC-06:00) Saskatchewan", "(UTC-05:00) Bogota, Lima, Quito", "(UTC-05:00) Eastern Time (US & Canada)", "(UTC-05:00) Indiana (East)", "(UTC-04:30) Caracas", "(UTC-04:00) Asuncion", "(UTC-04:00) Atlantic Time (Canada)", "(UTC-04:00) Cuiaba", "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", "(UTC-04:00) Santiago", "(UTC-03:30) Newfoundland", "(UTC-03:00) Brasilia", "(UTC-03:00) Buenos Aires", "(UTC-03:00) Cayenne, Fortaleza", "(UTC-03:00) Greenland", "(UTC-03:00) Montevideo", "(UTC-03:00) Salvador", "(UTC-02:00) Coordinated Universal Time-02", "(UTC-02:00) Mid-Atlantic - Old", "(UTC-01:00) Azores", "(UTC-01:00) Cape Verde Is.", "(UTC) Casablanca", "(UTC) Coordinated Universal Time", "(UTC) Edinburgh, London", "(UTC+01:00) Edinburgh, London", "(UTC) Dublin, Lisbon", "(UTC) Monrovia, Reykjavik", "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", "(UTC+01:00) West Central Africa", "(UTC+01:00) Windhoek", "(UTC+02:00) Athens, Bucharest", "(UTC+02:00) Beirut", "(UTC+02:00) Cairo", "(UTC+02:00) Damascus", "(UTC+02:00) E. Europe", "(UTC+02:00) Harare, Pretoria", "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", "(UTC+03:00) Istanbul", "(UTC+02:00) Jerusalem", "(UTC+02:00) Tripoli", "(UTC+03:00) Amman", "(UTC+03:00) Baghdad", "(UTC+03:00) Kaliningrad, Minsk", "(UTC+03:00) Kuwait, Riyadh", "(UTC+03:00) Nairobi", "(UTC+03:00) Moscow, St. Petersburg, Volgograd", "(UTC+04:00) Samara, Ulyanovsk, Saratov", "(UTC+03:30) Tehran", "(UTC+04:00) Abu Dhabi, Muscat", "(UTC+04:00) Baku", "(UTC+04:00) Port Louis", "(UTC+04:00) Tbilisi", "(UTC+04:00) Yerevan", "(UTC+04:30) Kabul", "(UTC+05:00) Ashgabat, Tashkent", "(UTC+05:00) Yekaterinburg", "(UTC+05:00) Islamabad, Karachi", "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", "(UTC+05:30) Sri Jayawardenepura", "(UTC+05:45) Kathmandu", "(UTC+06:00) Astana", "(UTC+06:00) Dhaka", "(UTC+06:30) Yangon (Rangoon)", "(UTC+07:00) Bangkok, Hanoi, Jakarta", "(UTC+07:00) Novosibirsk", "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", "(UTC+08:00) Krasnoyarsk", "(UTC+08:00) Kuala Lumpur, Singapore", "(UTC+08:00) Perth", "(UTC+08:00) Taipei", "(UTC+08:00) Ulaanbaatar", "(UTC+09:00) Irkutsk", "(UTC+09:00) Osaka, Sapporo, Tokyo", "(UTC+09:00) Seoul", "(UTC+09:30) Adelaide", "(UTC+09:30) Darwin", "(UTC+10:00) Brisbane", "(UTC+10:00) Canberra, Melbourne, Sydney", "(UTC+10:00) Guam, Port Moresby", "(UTC+10:00) Hobart", "(UTC+10:00) Yakutsk", "(UTC+11:00) Solomon Is., New Caledonia", "(UTC+11:00) Vladivostok", "(UTC+12:00) Auckland, Wellington", "(UTC+12:00) Coordinated Universal Time+12", "(UTC+12:00) Fiji", "(UTC+12:00) Magadan", "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", "(UTC+13:00) Nuku'alofa", "(UTC+13:00) Samoa"}, - "region": {"Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port_of_Spain", "America/Port-au-Prince", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Australia/Yancowinna", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT0", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/UTC", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Asia/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/emoji.go b/vendor/github.com/brianvoe/gofakeit/v6/data/emoji.go deleted file mode 100644 index b48605ea89a..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/emoji.go +++ /dev/null @@ -1,5863 +0,0 @@ -package data - -// Data is pull from https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json - -// Emoji consists of emoji information -var Emoji = map[string][]string{ - "emoji": { - "😀", - "😃", - "😄", - "😁", - "😆", - "😅", - "🤣", - "😂", - "🙂", - "🙃", - "😉", - "😊", - "😇", - "🥰", - "😍", - "🤩", - "😘", - "😗", - "☺️", - "😚", - "😙", - "😋", - "😛", - "😜", - "🤪", - "😝", - "🤑", - "🤗", - "🤭", - "🤫", - "🤔", - "🤐", - "🤨", - "😐", - "😑", - "😶", - "😏", - "😒", - "🙄", - "😬", - "🤥", - "😌", - "😔", - "😪", - "🤤", - "😴", - "😷", - "🤒", - "🤕", - "🤢", - "🤮", - "🤧", - "🥵", - "🥶", - "🥴", - "😵", - "🤯", - "🤠", - "🥳", - "😎", - "🤓", - "🧐", - "😕", - "😟", - "🙁", - "☹️", - "😮", - "😯", - "😲", - "😳", - "🥺", - "😦", - "😧", - "😨", - "😰", - "😥", - "😢", - "😭", - "😱", - "😖", - "😣", - "😞", - "😓", - "😩", - "😫", - "🥱", - "😤", - "😡", - "😠", - "🤬", - "😈", - "👿", - "💀", - "☠️", - "💩", - "🤡", - "👹", - "👺", - "👻", - "👽", - "👾", - "🤖", - "😺", - "😸", - "😹", - "😻", - "😼", - "😽", - "🙀", - "😿", - "😾", - "🙈", - "🙉", - "🙊", - "💋", - "💌", - "💘", - "💝", - "💖", - "💗", - "💓", - "💞", - "💕", - "💟", - "❣️", - "💔", - "❤️", - "🧡", - "💛", - "💚", - "💙", - "💜", - "🤎", - "🖤", - "🤍", - "💯", - "💢", - "💥", - "💫", - "💦", - "💨", - "🕳️", - "💣", - "💬", - "👁️‍🗨️", - "🗨️", - "🗯️", - "💭", - "💤", - "👋", - "🤚", - "🖐️", - "✋", - "🖖", - "👌", - "🤏", - "✌️", - "🤞", - "🤟", - "🤘", - "🤙", - "👈", - "👉", - "👆", - "🖕", - "👇", - "☝️", - "👍", - "👎", - "✊", - "👊", - "🤛", - "🤜", - "👏", - "🙌", - "👐", - "🤲", - "🤝", - "🙏", - "✍️", - "💅", - "🤳", - "💪", - "🦾", - "🦿", - "🦵", - "🦶", - "👂", - "🦻", - "👃", - "🧠", - "🦷", - "🦴", - "👀", - "👁️", - "👅", - "👄", - "👶", - "🧒", - "👦", - "👧", - "🧑", - "👱", - "👨", - "🧔", - "👨‍🦰", - "👨‍🦱", - "👨‍🦳", - "👨‍🦲", - "👩", - "👩‍🦰", - "🧑‍🦰", - "👩‍🦱", - "🧑‍🦱", - "👩‍🦳", - "🧑‍🦳", - "👩‍🦲", - "🧑‍🦲", - "👱‍♀️", - "👱‍♂️", - "🧓", - "👴", - "👵", - "🙍", - "🙍‍♂️", - "🙍‍♀️", - "🙎", - "🙎‍♂️", - "🙎‍♀️", - "🙅", - "🙅‍♂️", - "🙅‍♀️", - "🙆", - "🙆‍♂️", - "🙆‍♀️", - "💁", - "💁‍♂️", - "💁‍♀️", - "🙋", - "🙋‍♂️", - "🙋‍♀️", - "🧏", - "🧏‍♂️", - "🧏‍♀️", - "🙇", - "🙇‍♂️", - "🙇‍♀️", - "🤦", - "🤦‍♂️", - "🤦‍♀️", - "🤷", - "🤷‍♂️", - "🤷‍♀️", - "🧑‍⚕️", - "👨‍⚕️", - "👩‍⚕️", - "🧑‍🎓", - "👨‍🎓", - "👩‍🎓", - "🧑‍🏫", - "👨‍🏫", - "👩‍🏫", - "🧑‍⚖️", - "👨‍⚖️", - "👩‍⚖️", - "🧑‍🌾", - "👨‍🌾", - "👩‍🌾", - "🧑‍🍳", - "👨‍🍳", - "👩‍🍳", - "🧑‍🔧", - "👨‍🔧", - "👩‍🔧", - "🧑‍🏭", - "👨‍🏭", - "👩‍🏭", - "🧑‍💼", - "👨‍💼", - "👩‍💼", - "🧑‍🔬", - "👨‍🔬", - "👩‍🔬", - "🧑‍💻", - "👨‍💻", - "👩‍💻", - "🧑‍🎤", - "👨‍🎤", - "👩‍🎤", - "🧑‍🎨", - "👨‍🎨", - "👩‍🎨", - "🧑‍✈️", - "👨‍✈️", - "👩‍✈️", - "🧑‍🚀", - "👨‍🚀", - "👩‍🚀", - "🧑‍🚒", - "👨‍🚒", - "👩‍🚒", - "👮", - "👮‍♂️", - "👮‍♀️", - "🕵️", - "💂", - "💂‍♂️", - "💂‍♀️", - "👷", - "👷‍♂️", - "👷‍♀️", - "🤴", - "👸", - "👳", - "👳‍♂️", - "👳‍♀️", - "👲", - "🧕", - "🤵", - "🤵‍♂️", - "🤵‍♀️", - "👰", - "👰‍♂️", - "👰‍♀️", - "🤰", - "🤱", - "👩‍🍼", - "👨‍🍼", - "🧑‍🍼", - "👼", - "🎅", - "🤶", - "🧑‍🎄", - "🦸", - "🦸‍♂️", - "🦸‍♀️", - "🦹", - "🦹‍♂️", - "🦹‍♀️", - "🧙", - "🧙‍♂️", - "🧙‍♀️", - "🧚", - "🧚‍♂️", - "🧚‍♀️", - "🧛", - "🧛‍♂️", - "🧛‍♀️", - "🧜", - "🧜‍♂️", - "🧜‍♀️", - "🧝", - "🧝‍♂️", - "🧝‍♀️", - "🧞", - "🧞‍♂️", - "🧞‍♀️", - "🧟", - "🧟‍♂️", - "🧟‍♀️", - "💆", - "💆‍♂️", - "💆‍♀️", - "💇", - "💇‍♂️", - "💇‍♀️", - "🚶", - "🚶‍♂️", - "🚶‍♀️", - "🧍", - "🧍‍♂️", - "🧍‍♀️", - "🧎", - "🧎‍♂️", - "🧎‍♀️", - "🧑‍🦯", - "👨‍🦯", - "👩‍🦯", - "🧑‍🦼", - "👨‍🦼", - "👩‍🦼", - "🧑‍🦽", - "👨‍🦽", - "👩‍🦽", - "🏃", - "🏃‍♂️", - "🏃‍♀️", - "💃", - "🕺", - "🕴️", - "👯", - "👯‍♂️", - "👯‍♀️", - "🧖", - "🧖‍♂️", - "🧖‍♀️", - "🧗", - "🧗‍♂️", - "🧗‍♀️", - "🤺", - "🏇", - "⛷️", - "🏂", - "🏌️", - "🏄", - "🚣", - "🚣‍♂️", - "🚣‍♀️", - "🏊", - "⛹️", - "⛹️‍♂️", - "⛹️‍♀️", - "🏋️", - "🚴", - "🚴‍♂️", - "🚴‍♀️", - "🚵", - "🚵‍♂️", - "🚵‍♀️", - "🤸", - "🤸‍♂️", - "🤸‍♀️", - "🤼", - "🤼‍♂️", - "🤼‍♀️", - "🤽", - "🤽‍♂️", - "🤽‍♀️", - "🤾", - "🤾‍♂️", - "🤾‍♀️", - "🤹", - "🤹‍♂️", - "🤹‍♀️", - "🧘", - "🧘‍♂️", - "🧘‍♀️", - "🛀", - "🛌", - "🧑‍🤝‍🧑", - "👭", - "👫", - "👬", - "💏", - "👩‍❤️‍💋‍👨", - "👨‍❤️‍💋‍👨", - "👩‍❤️‍💋‍👩", - "💑", - "👩‍❤️‍👨", - "👨‍❤️‍👨", - "👩‍❤️‍👩", - "👪", - "👨‍👩‍👦", - "👨‍👩‍👧", - "👨‍👩‍👧‍👦", - "👨‍👩‍👦‍👦", - "👨‍👩‍👧‍👧", - "👨‍👨‍👦", - "👨‍👨‍👧", - "👨‍👨‍👧‍👦", - "👨‍👨‍👦‍👦", - "👨‍👨‍👧‍👧", - "👩‍👩‍👦", - "👩‍👩‍👧", - "👩‍👩‍👧‍👦", - "👩‍👩‍👦‍👦", - "👩‍👩‍👧‍👧", - "👨‍👦", - "👨‍👦‍👦", - "👨‍👧", - "👨‍👧‍👦", - "👨‍👧‍👧", - "👩‍👦", - "👩‍👦‍👦", - "👩‍👧", - "👩‍👧‍👦", - "👩‍👧‍👧", - "🗣️", - "👤", - "👥", - "👣", - "🐵", - "🐒", - "🦍", - "🦧", - "🐶", - "🐕", - "🦮", - "🐩", - "🐺", - "🦊", - "🦝", - "🐱", - "🐈", - "🐈‍⬛", - "🦁", - "🐯", - "🐅", - "🐆", - "🐴", - "🐎", - "🦄", - "🦓", - "🦌", - "🐮", - "🐂", - "🐃", - "🐄", - "🐷", - "🐖", - "🐗", - "🐽", - "🐏", - "🐑", - "🐐", - "🐪", - "🐫", - "🦙", - "🦒", - "🐘", - "🦏", - "🦛", - "🐭", - "🐁", - "🐀", - "🐹", - "🐰", - "🐇", - "🐿️", - "🦔", - "🦇", - "🐻", - "🐻‍❄️", - "🐨", - "🐼", - "🦥", - "🦦", - "🦨", - "🦘", - "🦡", - "🐾", - "🦃", - "🐔", - "🐓", - "🐣", - "🐤", - "🐥", - "🐦", - "🐧", - "🕊️", - "🦅", - "🦆", - "🦢", - "🦉", - "🦩", - "🦚", - "🦜", - "🐸", - "🐊", - "🐢", - "🦎", - "🐍", - "🐲", - "🐉", - "🦕", - "🦖", - "🐳", - "🐋", - "🐬", - "🐟", - "🐠", - "🐡", - "🦈", - "🐙", - "🐚", - "🐌", - "🦋", - "🐛", - "🐜", - "🐝", - "🐞", - "🦗", - "🕷️", - "🕸️", - "🦂", - "🦟", - "🦠", - "💐", - "🌸", - "💮", - "🏵️", - "🌹", - "🥀", - "🌺", - "🌻", - "🌼", - "🌷", - "🌱", - "🌲", - "🌳", - "🌴", - "🌵", - "🌾", - "🌿", - "☘️", - "🍀", - "🍁", - "🍂", - "🍃", - "🍇", - "🍈", - "🍉", - "🍊", - "🍋", - "🍌", - "🍍", - "🥭", - "🍎", - "🍏", - "🍐", - "🍑", - "🍒", - "🍓", - "🥝", - "🍅", - "🥥", - "🥑", - "🍆", - "🥔", - "🥕", - "🌽", - "🌶️", - "🥒", - "🥬", - "🥦", - "🧄", - "🧅", - "🍄", - "🥜", - "🌰", - "🍞", - "🥐", - "🥖", - "🥨", - "🥯", - "🥞", - "🧇", - "🧀", - "🍖", - "🍗", - "🥩", - "🥓", - "🍔", - "🍟", - "🍕", - "🌭", - "🥪", - "🌮", - "🌯", - "🥙", - "🧆", - "🥚", - "🍳", - "🥘", - "🍲", - "🥣", - "🥗", - "🍿", - "🧈", - "🧂", - "🥫", - "🍱", - "🍘", - "🍙", - "🍚", - "🍛", - "🍜", - "🍝", - "🍠", - "🍢", - "🍣", - "🍤", - "🍥", - "🥮", - "🍡", - "🥟", - "🥠", - "🥡", - "🦀", - "🦞", - "🦐", - "🦑", - "🦪", - "🍦", - "🍧", - "🍨", - "🍩", - "🍪", - "🎂", - "🍰", - "🧁", - "🥧", - "🍫", - "🍬", - "🍭", - "🍮", - "🍯", - "🍼", - "🥛", - "🍵", - "🍶", - "🍾", - "🍷", - "🍸", - "🍹", - "🍺", - "🍻", - "🥂", - "🥃", - "🥤", - "🧃", - "🧉", - "🧊", - "🥢", - "🍽️", - "🍴", - "🥄", - "🔪", - "🏺", - "🌍", - "🌎", - "🌏", - "🌐", - "🗺️", - "🗾", - "🧭", - "🏔️", - "⛰️", - "🌋", - "🗻", - "🏕️", - "🏖️", - "🏜️", - "🏝️", - "🏞️", - "🏟️", - "🏛️", - "🏗️", - "🧱", - "🏘️", - "🏚️", - "🏠", - "🏡", - "🏢", - "🏣", - "🏤", - "🏥", - "🏦", - "🏨", - "🏩", - "🏪", - "🏫", - "🏬", - "🏭", - "🏯", - "🏰", - "💒", - "🗼", - "🗽", - "⛪", - "🕌", - "🛕", - "🕍", - "⛩️", - "🕋", - "⛲", - "⛺", - "🌁", - "🌃", - "🏙️", - "🌄", - "🌅", - "🌆", - "🌇", - "🌉", - "♨️", - "🎠", - "🎡", - "🎢", - "💈", - "🎪", - "🚂", - "🚃", - "🚄", - "🚅", - "🚆", - "🚇", - "🚈", - "🚉", - "🚊", - "🚝", - "🚞", - "🚋", - "🚌", - "🚍", - "🚎", - "🚐", - "🚑", - "🚒", - "🚓", - "🚔", - "🚕", - "🚖", - "🚗", - "🚘", - "🚙", - "🚚", - "🚛", - "🚜", - "🏎️", - "🏍️", - "🛵", - "🦽", - "🦼", - "🛺", - "🚲", - "🛴", - "🛹", - "🚏", - "🛣️", - "🛤️", - "🛢️", - "⛽", - "🚨", - "🚥", - "🚦", - "🛑", - "🚧", - "⚓", - "⛵", - "🛶", - "🚤", - "🛳️", - "⛴️", - "🛥️", - "🚢", - "✈️", - "🛩️", - "🛫", - "🛬", - "🪂", - "💺", - "🚁", - "🚟", - "🚠", - "🚡", - "🛰️", - "🚀", - "🛸", - "🛎️", - "🧳", - "⌛", - "⏳", - "⌚", - "⏰", - "⏱️", - "⏲️", - "🕰️", - "🕛", - "🕧", - "🕐", - "🕜", - "🕑", - "🕝", - "🕒", - "🕞", - "🕓", - "🕟", - "🕔", - "🕠", - "🕕", - "🕡", - "🕖", - "🕢", - "🕗", - "🕣", - "🕘", - "🕤", - "🕙", - "🕥", - "🕚", - "🕦", - "🌑", - "🌒", - "🌓", - "🌔", - "🌕", - "🌖", - "🌗", - "🌘", - "🌙", - "🌚", - "🌛", - "🌜", - "🌡️", - "☀️", - "🌝", - "🌞", - "🪐", - "⭐", - "🌟", - "🌠", - "🌌", - "☁️", - "⛅", - "⛈️", - "🌤️", - "🌥️", - "🌦️", - "🌧️", - "🌨️", - "🌩️", - "🌪️", - "🌫️", - "🌬️", - "🌀", - "🌈", - "🌂", - "☂️", - "☔", - "⛱️", - "⚡", - "❄️", - "☃️", - "⛄", - "☄️", - "🔥", - "💧", - "🌊", - "🎃", - "🎄", - "🎆", - "🎇", - "🧨", - "✨", - "🎈", - "🎉", - "🎊", - "🎋", - "🎍", - "🎎", - "🎏", - "🎐", - "🎑", - "🧧", - "🎀", - "🎁", - "🎗️", - "🎟️", - "🎫", - "🎖️", - "🏆", - "🏅", - "🥇", - "🥈", - "🥉", - "⚽", - "⚾", - "🥎", - "🏀", - "🏐", - "🏈", - "🏉", - "🎾", - "🥏", - "🎳", - "🏏", - "🏑", - "🏒", - "🥍", - "🏓", - "🏸", - "🥊", - "🥋", - "🥅", - "⛳", - "⛸️", - "🎣", - "🤿", - "🎽", - "🎿", - "🛷", - "🥌", - "🎯", - "🪀", - "🪁", - "🎱", - "🔮", - "🧿", - "🎮", - "🕹️", - "🎰", - "🎲", - "🧩", - "🧸", - "♠️", - "♥️", - "♦️", - "♣️", - "♟️", - "🃏", - "🀄", - "🎴", - "🎭", - "🖼️", - "🎨", - "🧵", - "🧶", - "👓", - "🕶️", - "🥽", - "🥼", - "🦺", - "👔", - "👕", - "👖", - "🧣", - "🧤", - "🧥", - "🧦", - "👗", - "👘", - "🥻", - "🩱", - "🩲", - "🩳", - "👙", - "👚", - "👛", - "👜", - "👝", - "🛍️", - "🎒", - "👞", - "👟", - "🥾", - "🥿", - "👠", - "👡", - "🩰", - "👢", - "👑", - "👒", - "🎩", - "🎓", - "🧢", - "⛑️", - "📿", - "💄", - "💍", - "💎", - "🔇", - "🔈", - "🔉", - "🔊", - "📢", - "📣", - "📯", - "🔔", - "🔕", - "🎼", - "🎵", - "🎶", - "🎙️", - "🎚️", - "🎛️", - "🎤", - "🎧", - "📻", - "🎷", - "🎸", - "🎹", - "🎺", - "🎻", - "🪕", - "🥁", - "📱", - "📲", - "☎️", - "📞", - "📟", - "📠", - "🔋", - "🔌", - "💻", - "🖥️", - "🖨️", - "⌨️", - "🖱️", - "🖲️", - "💽", - "💾", - "💿", - "📀", - "🧮", - "🎥", - "🎞️", - "📽️", - "🎬", - "📺", - "📷", - "📸", - "📹", - "📼", - "🔍", - "🔎", - "🕯️", - "💡", - "🔦", - "🏮", - "🪔", - "📔", - "📕", - "📖", - "📗", - "📘", - "📙", - "📚", - "📓", - "📒", - "📃", - "📜", - "📄", - "📰", - "🗞️", - "📑", - "🔖", - "🏷️", - "💰", - "💴", - "💵", - "💶", - "💷", - "💸", - "💳", - "🧾", - "💹", - "✉️", - "📧", - "📨", - "📩", - "📤", - "📥", - "📦", - "📫", - "📪", - "📬", - "📭", - "📮", - "🗳️", - "✏️", - "✒️", - "🖋️", - "🖊️", - "🖌️", - "🖍️", - "📝", - "💼", - "📁", - "📂", - "🗂️", - "📅", - "📆", - "🗒️", - "🗓️", - "📇", - "📈", - "📉", - "📊", - "📋", - "📌", - "📍", - "📎", - "🖇️", - "📏", - "📐", - "✂️", - "🗃️", - "🗄️", - "🗑️", - "🔒", - "🔓", - "🔏", - "🔐", - "🔑", - "🗝️", - "🔨", - "🪓", - "⛏️", - "⚒️", - "🛠️", - "🗡️", - "⚔️", - "🔫", - "🏹", - "🛡️", - "🔧", - "🔩", - "⚙️", - "🗜️", - "⚖️", - "🦯", - "🔗", - "⛓️", - "🧰", - "🧲", - "⚗️", - "🧪", - "🧫", - "🧬", - "🔬", - "🔭", - "📡", - "💉", - "🩸", - "💊", - "🩹", - "🩺", - "🚪", - "🛏️", - "🛋️", - "🪑", - "🚽", - "🚿", - "🛁", - "🪒", - "🧴", - "🧷", - "🧹", - "🧺", - "🧻", - "🧼", - "🧽", - "🧯", - "🛒", - "🚬", - "⚰️", - "⚱️", - "🗿", - "🏧", - "🚮", - "🚰", - "♿", - "🚹", - "🚺", - "🚻", - "🚼", - "🚾", - "🛂", - "🛃", - "🛄", - "🛅", - "⚠️", - "🚸", - "⛔", - "🚫", - "🚳", - "🚭", - "🚯", - "🚱", - "🚷", - "📵", - "🔞", - "☢️", - "☣️", - "⬆️", - "↗️", - "➡️", - "↘️", - "⬇️", - "↙️", - "⬅️", - "↖️", - "↕️", - "↔️", - "↩️", - "↪️", - "⤴️", - "⤵️", - "🔃", - "🔄", - "🔙", - "🔚", - "🔛", - "🔜", - "🔝", - "🛐", - "⚛️", - "🕉️", - "✡️", - "☸️", - "☯️", - "✝️", - "☦️", - "☪️", - "☮️", - "🕎", - "🔯", - "♈", - "♉", - "♊", - "♋", - "♌", - "♍", - "♎", - "♏", - "♐", - "♑", - "♒", - "♓", - "⛎", - "🔀", - "🔁", - "🔂", - "▶️", - "⏩", - "⏭️", - "⏯️", - "◀️", - "⏪", - "⏮️", - "🔼", - "⏫", - "🔽", - "⏬", - "⏸️", - "⏹️", - "⏺️", - "⏏️", - "🎦", - "🔅", - "🔆", - "📶", - "📳", - "📴", - "♀️", - "♂️", - "⚧️", - "✖️", - "➕", - "➖", - "➗", - "♾️", - "‼️", - "⁉️", - "❓", - "❔", - "❕", - "❗", - "〰️", - "💱", - "💲", - "⚕️", - "♻️", - "⚜️", - "🔱", - "📛", - "🔰", - "⭕", - "✅", - "☑️", - "✔️", - "❌", - "❎", - "➰", - "➿", - "〽️", - "✳️", - "✴️", - "❇️", - "©️", - "®️", - "™️", - "#️⃣", - "*️⃣", - "0️⃣", - "1️⃣", - "2️⃣", - "3️⃣", - "4️⃣", - "5️⃣", - "6️⃣", - "7️⃣", - "8️⃣", - "9️⃣", - "🔟", - "🔠", - "🔡", - "🔢", - "🔣", - "🔤", - "🅰️", - "🆎", - "🅱️", - "🆑", - "🆒", - "🆓", - "ℹ️", - "🆔", - "Ⓜ️", - "🆕", - "🆖", - "🅾️", - "🆗", - "🅿️", - "🆘", - "🆙", - "🆚", - "🈁", - "🈂️", - "🈷️", - "🈶", - "🈯", - "🉐", - "🈹", - "🈚", - "🈲", - "🉑", - "🈸", - "🈴", - "🈳", - "㊗️", - "㊙️", - "🈺", - "🈵", - "🔴", - "🟠", - "🟡", - "🟢", - "🔵", - "🟣", - "🟤", - "⚫", - "⚪", - "🟥", - "🟧", - "🟨", - "🟩", - "🟦", - "🟪", - "🟫", - "⬛", - "⬜", - "◼️", - "◻️", - "◾", - "◽", - "▪️", - "▫️", - "🔶", - "🔷", - "🔸", - "🔹", - "🔺", - "🔻", - "💠", - "🔘", - "🔳", - "🔲", - "🏁", - "🚩", - "🎌", - "🏴", - "🏳️", - "🏳️‍⚧️", - "🏴‍☠️", - "🇦🇨", - "🇦🇩", - "🇦🇪", - "🇦🇫", - "🇦🇬", - "🇦🇮", - "🇦🇱", - "🇦🇲", - "🇦🇴", - "🇦🇶", - "🇦🇷", - "🇦🇸", - "🇦🇹", - "🇦🇺", - "🇦🇼", - "🇦🇽", - "🇦🇿", - "🇧🇦", - "🇧🇧", - "🇧🇩", - "🇧🇪", - "🇧🇫", - "🇧🇬", - "🇧🇭", - "🇧🇮", - "🇧🇯", - "🇧🇱", - "🇧🇲", - "🇧🇳", - "🇧🇴", - "🇧🇶", - "🇧🇷", - "🇧🇸", - "🇧🇹", - "🇧🇻", - "🇧🇼", - "🇧🇾", - "🇧🇿", - "🇨🇦", - "🇨🇨", - "🇨🇩", - "🇨🇫", - "🇨🇬", - "🇨🇭", - "🇨🇮", - "🇨🇰", - "🇨🇱", - "🇨🇲", - "🇨🇳", - "🇨🇴", - "🇨🇵", - "🇨🇷", - "🇨🇺", - "🇨🇻", - "🇨🇼", - "🇨🇽", - "🇨🇾", - "🇨🇿", - "🇩🇪", - "🇩🇬", - "🇩🇯", - "🇩🇰", - "🇩🇲", - "🇩🇴", - "🇩🇿", - "🇪🇦", - "🇪🇨", - "🇪🇪", - "🇪🇬", - "🇪🇭", - "🇪🇷", - "🇪🇸", - "🇪🇹", - "🇪🇺", - "🇫🇮", - "🇫🇯", - "🇫🇰", - "🇫🇲", - "🇫🇴", - "🇫🇷", - "🇬🇦", - "🇬🇧", - "🇬🇩", - "🇬🇪", - "🇬🇫", - "🇬🇬", - "🇬🇭", - "🇬🇮", - "🇬🇱", - "🇬🇲", - "🇬🇳", - "🇬🇵", - "🇬🇶", - "🇬🇷", - "🇬🇸", - "🇬🇹", - "🇬🇺", - "🇬🇼", - "🇬🇾", - "🇭🇰", - "🇭🇲", - "🇭🇳", - "🇭🇷", - "🇭🇹", - "🇭🇺", - "🇮🇨", - "🇮🇩", - "🇮🇪", - "🇮🇱", - "🇮🇲", - "🇮🇳", - "🇮🇴", - "🇮🇶", - "🇮🇷", - "🇮🇸", - "🇮🇹", - "🇯🇪", - "🇯🇲", - "🇯🇴", - "🇯🇵", - "🇰🇪", - "🇰🇬", - "🇰🇭", - "🇰🇮", - "🇰🇲", - "🇰🇳", - "🇰🇵", - "🇰🇷", - "🇰🇼", - "🇰🇾", - "🇰🇿", - "🇱🇦", - "🇱🇧", - "🇱🇨", - "🇱🇮", - "🇱🇰", - "🇱🇷", - "🇱🇸", - "🇱🇹", - "🇱🇺", - "🇱🇻", - "🇱🇾", - "🇲🇦", - "🇲🇨", - "🇲🇩", - "🇲🇪", - "🇲🇫", - "🇲🇬", - "🇲🇭", - "🇲🇰", - "🇲🇱", - "🇲🇲", - "🇲🇳", - "🇲🇴", - "🇲🇵", - "🇲🇶", - "🇲🇷", - "🇲🇸", - "🇲🇹", - "🇲🇺", - "🇲🇻", - "🇲🇼", - "🇲🇽", - "🇲🇾", - "🇲🇿", - "🇳🇦", - "🇳🇨", - "🇳🇪", - "🇳🇫", - "🇳🇬", - "🇳🇮", - "🇳🇱", - "🇳🇴", - "🇳🇵", - "🇳🇷", - "🇳🇺", - "🇳🇿", - "🇴🇲", - "🇵🇦", - "🇵🇪", - "🇵🇫", - "🇵🇬", - "🇵🇭", - "🇵🇰", - "🇵🇱", - "🇵🇲", - "🇵🇳", - "🇵🇷", - "🇵🇸", - "🇵🇹", - "🇵🇼", - "🇵🇾", - "🇶🇦", - "🇷🇪", - "🇷🇴", - "🇷🇸", - "🇷🇺", - "🇷🇼", - "🇸🇦", - "🇸🇧", - "🇸🇨", - "🇸🇩", - "🇸🇪", - "🇸🇬", - "🇸🇭", - "🇸🇮", - "🇸🇯", - "🇸🇰", - "🇸🇱", - "🇸🇲", - "🇸🇳", - "🇸🇴", - "🇸🇷", - "🇸🇸", - "🇸🇹", - "🇸🇻", - "🇸🇽", - "🇸🇾", - "🇸🇿", - "🇹🇦", - "🇹🇨", - "🇹🇩", - "🇹🇫", - "🇹🇬", - "🇹🇭", - "🇹🇯", - "🇹🇰", - "🇹🇱", - "🇹🇲", - "🇹🇳", - "🇹🇴", - "🇹🇷", - "🇹🇹", - "🇹🇻", - "🇹🇼", - "🇹🇿", - "🇺🇦", - "🇺🇬", - "🇺🇲", - "🇺🇳", - "🇺🇸", - "🇺🇾", - "🇺🇿", - "🇻🇦", - "🇻🇨", - "🇻🇪", - "🇻🇬", - "🇻🇮", - "🇻🇳", - "🇻🇺", - "🇼🇫", - "🇼🇸", - "🇽🇰", - "🇾🇪", - "🇾🇹", - "🇿🇦", - "🇿🇲", - "🇿🇼", - "🏴󠁧󠁢󠁥󠁮󠁧󠁿", - "🏴󠁧󠁢󠁳󠁣󠁴󠁿", - "🏴󠁧󠁢󠁷󠁬󠁳󠁿", - }, - "description": { - "grinning face", - "grinning face with big eyes", - "grinning face with smiling eyes", - "beaming face with smiling eyes", - "grinning squinting face", - "grinning face with sweat", - "rolling on the floor laughing", - "face with tears of joy", - "slightly smiling face", - "upside-down face", - "winking face", - "smiling face with smiling eyes", - "smiling face with halo", - "smiling face with hearts", - "smiling face with heart-eyes", - "star-struck", - "face blowing a kiss", - "kissing face", - "smiling face", - "kissing face with closed eyes", - "kissing face with smiling eyes", - "smiling face with tear", - "face savoring food", - "face with tongue", - "winking face with tongue", - "zany face", - "squinting face with tongue", - "money-mouth face", - "hugging face", - "face with hand over mouth", - "shushing face", - "thinking face", - "zipper-mouth face", - "face with raised eyebrow", - "neutral face", - "expressionless face", - "face without mouth", - "smirking face", - "unamused face", - "face with rolling eyes", - "grimacing face", - "lying face", - "relieved face", - "pensive face", - "sleepy face", - "drooling face", - "sleeping face", - "face with medical mask", - "face with thermometer", - "face with head-bandage", - "nauseated face", - "face vomiting", - "sneezing face", - "hot face", - "cold face", - "woozy face", - "dizzy face", - "exploding head", - "cowboy hat face", - "partying face", - "disguised face", - "smiling face with sunglasses", - "nerd face", - "face with monocle", - "confused face", - "worried face", - "slightly frowning face", - "frowning face", - "face with open mouth", - "hushed face", - "astonished face", - "flushed face", - "pleading face", - "frowning face with open mouth", - "anguished face", - "fearful face", - "anxious face with sweat", - "sad but relieved face", - "crying face", - "loudly crying face", - "face screaming in fear", - "confounded face", - "persevering face", - "disappointed face", - "downcast face with sweat", - "weary face", - "tired face", - "yawning face", - "face with steam from nose", - "pouting face", - "angry face", - "face with symbols on mouth", - "smiling face with horns", - "angry face with horns", - "skull", - "skull and crossbones", - "pile of poo", - "clown face", - "ogre", - "goblin", - "ghost", - "alien", - "alien monster", - "robot", - "grinning cat", - "grinning cat with smiling eyes", - "cat with tears of joy", - "smiling cat with heart-eyes", - "cat with wry smile", - "kissing cat", - "weary cat", - "crying cat", - "pouting cat", - "see-no-evil monkey", - "hear-no-evil monkey", - "speak-no-evil monkey", - "kiss mark", - "love letter", - "heart with arrow", - "heart with ribbon", - "sparkling heart", - "growing heart", - "beating heart", - "revolving hearts", - "two hearts", - "heart decoration", - "heart exclamation", - "broken heart", - "red heart", - "orange heart", - "yellow heart", - "green heart", - "blue heart", - "purple heart", - "brown heart", - "black heart", - "white heart", - "hundred points", - "anger symbol", - "collision", - "dizzy", - "sweat droplets", - "dashing away", - "hole", - "bomb", - "speech balloon", - "eye in speech bubble", - "left speech bubble", - "right anger bubble", - "thought balloon", - "zzz", - "waving hand", - "raised back of hand", - "hand with fingers splayed", - "raised hand", - "vulcan salute", - "OK hand", - "pinched fingers", - "pinching hand", - "victory hand", - "crossed fingers", - "love-you gesture", - "sign of the horns", - "call me hand", - "backhand index pointing left", - "backhand index pointing right", - "backhand index pointing up", - "middle finger", - "backhand index pointing down", - "index pointing up", - "thumbs up", - "thumbs down", - "raised fist", - "oncoming fist", - "left-facing fist", - "right-facing fist", - "clapping hands", - "raising hands", - "open hands", - "palms up together", - "handshake", - "folded hands", - "writing hand", - "nail polish", - "selfie", - "flexed biceps", - "mechanical arm", - "mechanical leg", - "leg", - "foot", - "ear", - "ear with hearing aid", - "nose", - "brain", - "anatomical heart", - "lungs", - "tooth", - "bone", - "eyes", - "eye", - "tongue", - "mouth", - "baby", - "child", - "boy", - "girl", - "person", - "person: blond hair", - "man", - "man: beard", - "man: red hair", - "man: curly hair", - "man: white hair", - "man: bald", - "woman", - "woman: red hair", - "person: red hair", - "woman: curly hair", - "person: curly hair", - "woman: white hair", - "person: white hair", - "woman: bald", - "person: bald", - "woman: blond hair", - "man: blond hair", - "older person", - "old man", - "old woman", - "person frowning", - "man frowning", - "woman frowning", - "person pouting", - "man pouting", - "woman pouting", - "person gesturing NO", - "man gesturing NO", - "woman gesturing NO", - "person gesturing OK", - "man gesturing OK", - "woman gesturing OK", - "person tipping hand", - "man tipping hand", - "woman tipping hand", - "person raising hand", - "man raising hand", - "woman raising hand", - "deaf person", - "deaf man", - "deaf woman", - "person bowing", - "man bowing", - "woman bowing", - "person facepalming", - "man facepalming", - "woman facepalming", - "person shrugging", - "man shrugging", - "woman shrugging", - "health worker", - "man health worker", - "woman health worker", - "student", - "man student", - "woman student", - "teacher", - "man teacher", - "woman teacher", - "judge", - "man judge", - "woman judge", - "farmer", - "man farmer", - "woman farmer", - "cook", - "man cook", - "woman cook", - "mechanic", - "man mechanic", - "woman mechanic", - "factory worker", - "man factory worker", - "woman factory worker", - "office worker", - "man office worker", - "woman office worker", - "scientist", - "man scientist", - "woman scientist", - "technologist", - "man technologist", - "woman technologist", - "singer", - "man singer", - "woman singer", - "artist", - "man artist", - "woman artist", - "pilot", - "man pilot", - "woman pilot", - "astronaut", - "man astronaut", - "woman astronaut", - "firefighter", - "man firefighter", - "woman firefighter", - "police officer", - "man police officer", - "woman police officer", - "detective", - "man detective", - "woman detective", - "guard", - "man guard", - "woman guard", - "ninja", - "construction worker", - "man construction worker", - "woman construction worker", - "prince", - "princess", - "person wearing turban", - "man wearing turban", - "woman wearing turban", - "person with skullcap", - "woman with headscarf", - "person in tuxedo", - "man in tuxedo", - "woman in tuxedo", - "person with veil", - "man with veil", - "woman with veil", - "pregnant woman", - "breast-feeding", - "woman feeding baby", - "man feeding baby", - "person feeding baby", - "baby angel", - "Santa Claus", - "Mrs. Claus", - "mx claus", - "superhero", - "man superhero", - "woman superhero", - "supervillain", - "man supervillain", - "woman supervillain", - "mage", - "man mage", - "woman mage", - "fairy", - "man fairy", - "woman fairy", - "vampire", - "man vampire", - "woman vampire", - "merperson", - "merman", - "mermaid", - "elf", - "man elf", - "woman elf", - "genie", - "man genie", - "woman genie", - "zombie", - "man zombie", - "woman zombie", - "person getting massage", - "man getting massage", - "woman getting massage", - "person getting haircut", - "man getting haircut", - "woman getting haircut", - "person walking", - "man walking", - "woman walking", - "person standing", - "man standing", - "woman standing", - "person kneeling", - "man kneeling", - "woman kneeling", - "person with white cane", - "man with white cane", - "woman with white cane", - "person in motorized wheelchair", - "man in motorized wheelchair", - "woman in motorized wheelchair", - "person in manual wheelchair", - "man in manual wheelchair", - "woman in manual wheelchair", - "person running", - "man running", - "woman running", - "woman dancing", - "man dancing", - "person in suit levitating", - "people with bunny ears", - "men with bunny ears", - "women with bunny ears", - "person in steamy room", - "man in steamy room", - "woman in steamy room", - "person climbing", - "man climbing", - "woman climbing", - "person fencing", - "horse racing", - "skier", - "snowboarder", - "person golfing", - "man golfing", - "woman golfing", - "person surfing", - "man surfing", - "woman surfing", - "person rowing boat", - "man rowing boat", - "woman rowing boat", - "person swimming", - "man swimming", - "woman swimming", - "person bouncing ball", - "man bouncing ball", - "woman bouncing ball", - "person lifting weights", - "man lifting weights", - "woman lifting weights", - "person biking", - "man biking", - "woman biking", - "person mountain biking", - "man mountain biking", - "woman mountain biking", - "person cartwheeling", - "man cartwheeling", - "woman cartwheeling", - "people wrestling", - "men wrestling", - "women wrestling", - "person playing water polo", - "man playing water polo", - "woman playing water polo", - "person playing handball", - "man playing handball", - "woman playing handball", - "person juggling", - "man juggling", - "woman juggling", - "person in lotus position", - "man in lotus position", - "woman in lotus position", - "person taking bath", - "person in bed", - "people holding hands", - "women holding hands", - "woman and man holding hands", - "men holding hands", - "kiss", - "kiss: woman, man", - "kiss: man, man", - "kiss: woman, woman", - "couple with heart", - "couple with heart: woman, man", - "couple with heart: man, man", - "couple with heart: woman, woman", - "family", - "family: man, woman, boy", - "family: man, woman, girl", - "family: man, woman, girl, boy", - "family: man, woman, boy, boy", - "family: man, woman, girl, girl", - "family: man, man, boy", - "family: man, man, girl", - "family: man, man, girl, boy", - "family: man, man, boy, boy", - "family: man, man, girl, girl", - "family: woman, woman, boy", - "family: woman, woman, girl", - "family: woman, woman, girl, boy", - "family: woman, woman, boy, boy", - "family: woman, woman, girl, girl", - "family: man, boy", - "family: man, boy, boy", - "family: man, girl", - "family: man, girl, boy", - "family: man, girl, girl", - "family: woman, boy", - "family: woman, boy, boy", - "family: woman, girl", - "family: woman, girl, boy", - "family: woman, girl, girl", - "speaking head", - "bust in silhouette", - "busts in silhouette", - "people hugging", - "footprints", - "monkey face", - "monkey", - "gorilla", - "orangutan", - "dog face", - "dog", - "guide dog", - "service dog", - "poodle", - "wolf", - "fox", - "raccoon", - "cat face", - "cat", - "black cat", - "lion", - "tiger face", - "tiger", - "leopard", - "horse face", - "horse", - "unicorn", - "zebra", - "deer", - "bison", - "cow face", - "ox", - "water buffalo", - "cow", - "pig face", - "pig", - "boar", - "pig nose", - "ram", - "ewe", - "goat", - "camel", - "two-hump camel", - "llama", - "giraffe", - "elephant", - "mammoth", - "rhinoceros", - "hippopotamus", - "mouse face", - "mouse", - "rat", - "hamster", - "rabbit face", - "rabbit", - "chipmunk", - "beaver", - "hedgehog", - "bat", - "bear", - "polar bear", - "koala", - "panda", - "sloth", - "otter", - "skunk", - "kangaroo", - "badger", - "paw prints", - "turkey", - "chicken", - "rooster", - "hatching chick", - "baby chick", - "front-facing baby chick", - "bird", - "penguin", - "dove", - "eagle", - "duck", - "swan", - "owl", - "dodo", - "feather", - "flamingo", - "peacock", - "parrot", - "frog", - "crocodile", - "turtle", - "lizard", - "snake", - "dragon face", - "dragon", - "sauropod", - "T-Rex", - "spouting whale", - "whale", - "dolphin", - "seal", - "fish", - "tropical fish", - "blowfish", - "shark", - "octopus", - "spiral shell", - "snail", - "butterfly", - "bug", - "ant", - "honeybee", - "beetle", - "lady beetle", - "cricket", - "cockroach", - "spider", - "spider web", - "scorpion", - "mosquito", - "fly", - "worm", - "microbe", - "bouquet", - "cherry blossom", - "white flower", - "rosette", - "rose", - "wilted flower", - "hibiscus", - "sunflower", - "blossom", - "tulip", - "seedling", - "potted plant", - "evergreen tree", - "deciduous tree", - "palm tree", - "cactus", - "sheaf of rice", - "herb", - "shamrock", - "four leaf clover", - "maple leaf", - "fallen leaf", - "leaf fluttering in wind", - "grapes", - "melon", - "watermelon", - "tangerine", - "lemon", - "banana", - "pineapple", - "mango", - "red apple", - "green apple", - "pear", - "peach", - "cherries", - "strawberry", - "blueberries", - "kiwi fruit", - "tomato", - "olive", - "coconut", - "avocado", - "eggplant", - "potato", - "carrot", - "ear of corn", - "hot pepper", - "bell pepper", - "cucumber", - "leafy green", - "broccoli", - "garlic", - "onion", - "mushroom", - "peanuts", - "chestnut", - "bread", - "croissant", - "baguette bread", - "flatbread", - "pretzel", - "bagel", - "pancakes", - "waffle", - "cheese wedge", - "meat on bone", - "poultry leg", - "cut of meat", - "bacon", - "hamburger", - "french fries", - "pizza", - "hot dog", - "sandwich", - "taco", - "burrito", - "tamale", - "stuffed flatbread", - "falafel", - "egg", - "cooking", - "shallow pan of food", - "pot of food", - "fondue", - "bowl with spoon", - "green salad", - "popcorn", - "butter", - "salt", - "canned food", - "bento box", - "rice cracker", - "rice ball", - "cooked rice", - "curry rice", - "steaming bowl", - "spaghetti", - "roasted sweet potato", - "oden", - "sushi", - "fried shrimp", - "fish cake with swirl", - "moon cake", - "dango", - "dumpling", - "fortune cookie", - "takeout box", - "crab", - "lobster", - "shrimp", - "squid", - "oyster", - "soft ice cream", - "shaved ice", - "ice cream", - "doughnut", - "cookie", - "birthday cake", - "shortcake", - "cupcake", - "pie", - "chocolate bar", - "candy", - "lollipop", - "custard", - "honey pot", - "baby bottle", - "glass of milk", - "hot beverage", - "teapot", - "teacup without handle", - "sake", - "bottle with popping cork", - "wine glass", - "cocktail glass", - "tropical drink", - "beer mug", - "clinking beer mugs", - "clinking glasses", - "tumbler glass", - "cup with straw", - "bubble tea", - "beverage box", - "mate", - "ice", - "chopsticks", - "fork and knife with plate", - "fork and knife", - "spoon", - "kitchen knife", - "amphora", - "globe showing Europe-Africa", - "globe showing Americas", - "globe showing Asia-Australia", - "globe with meridians", - "world map", - "map of Japan", - "compass", - "snow-capped mountain", - "mountain", - "volcano", - "mount fuji", - "camping", - "beach with umbrella", - "desert", - "desert island", - "national park", - "stadium", - "classical building", - "building construction", - "brick", - "rock", - "wood", - "hut", - "houses", - "derelict house", - "house", - "house with garden", - "office building", - "Japanese post office", - "post office", - "hospital", - "bank", - "hotel", - "love hotel", - "convenience store", - "school", - "department store", - "factory", - "Japanese castle", - "castle", - "wedding", - "Tokyo tower", - "Statue of Liberty", - "church", - "mosque", - "hindu temple", - "synagogue", - "shinto shrine", - "kaaba", - "fountain", - "tent", - "foggy", - "night with stars", - "cityscape", - "sunrise over mountains", - "sunrise", - "cityscape at dusk", - "sunset", - "bridge at night", - "hot springs", - "carousel horse", - "ferris wheel", - "roller coaster", - "barber pole", - "circus tent", - "locomotive", - "railway car", - "high-speed train", - "bullet train", - "train", - "metro", - "light rail", - "station", - "tram", - "monorail", - "mountain railway", - "tram car", - "bus", - "oncoming bus", - "trolleybus", - "minibus", - "ambulance", - "fire engine", - "police car", - "oncoming police car", - "taxi", - "oncoming taxi", - "automobile", - "oncoming automobile", - "sport utility vehicle", - "pickup truck", - "delivery truck", - "articulated lorry", - "tractor", - "racing car", - "motorcycle", - "motor scooter", - "manual wheelchair", - "motorized wheelchair", - "auto rickshaw", - "bicycle", - "kick scooter", - "skateboard", - "roller skate", - "bus stop", - "motorway", - "railway track", - "oil drum", - "fuel pump", - "police car light", - "horizontal traffic light", - "vertical traffic light", - "stop sign", - "construction", - "anchor", - "sailboat", - "canoe", - "speedboat", - "passenger ship", - "ferry", - "motor boat", - "ship", - "airplane", - "small airplane", - "airplane departure", - "airplane arrival", - "parachute", - "seat", - "helicopter", - "suspension railway", - "mountain cableway", - "aerial tramway", - "satellite", - "rocket", - "flying saucer", - "bellhop bell", - "luggage", - "hourglass done", - "hourglass not done", - "watch", - "alarm clock", - "stopwatch", - "timer clock", - "mantelpiece clock", - "twelve o’clock", - "twelve-thirty", - "one o’clock", - "one-thirty", - "two o’clock", - "two-thirty", - "three o’clock", - "three-thirty", - "four o’clock", - "four-thirty", - "five o’clock", - "five-thirty", - "six o’clock", - "six-thirty", - "seven o’clock", - "seven-thirty", - "eight o’clock", - "eight-thirty", - "nine o’clock", - "nine-thirty", - "ten o’clock", - "ten-thirty", - "eleven o’clock", - "eleven-thirty", - "new moon", - "waxing crescent moon", - "first quarter moon", - "waxing gibbous moon", - "full moon", - "waning gibbous moon", - "last quarter moon", - "waning crescent moon", - "crescent moon", - "new moon face", - "first quarter moon face", - "last quarter moon face", - "thermometer", - "sun", - "full moon face", - "sun with face", - "ringed planet", - "star", - "glowing star", - "shooting star", - "milky way", - "cloud", - "sun behind cloud", - "cloud with lightning and rain", - "sun behind small cloud", - "sun behind large cloud", - "sun behind rain cloud", - "cloud with rain", - "cloud with snow", - "cloud with lightning", - "tornado", - "fog", - "wind face", - "cyclone", - "rainbow", - "closed umbrella", - "umbrella", - "umbrella with rain drops", - "umbrella on ground", - "high voltage", - "snowflake", - "snowman", - "snowman without snow", - "comet", - "fire", - "droplet", - "water wave", - "jack-o-lantern", - "Christmas tree", - "fireworks", - "sparkler", - "firecracker", - "sparkles", - "balloon", - "party popper", - "confetti ball", - "tanabata tree", - "pine decoration", - "Japanese dolls", - "carp streamer", - "wind chime", - "moon viewing ceremony", - "red envelope", - "ribbon", - "wrapped gift", - "reminder ribbon", - "admission tickets", - "ticket", - "military medal", - "trophy", - "sports medal", - "1st place medal", - "2nd place medal", - "3rd place medal", - "soccer ball", - "baseball", - "softball", - "basketball", - "volleyball", - "american football", - "rugby football", - "tennis", - "flying disc", - "bowling", - "cricket game", - "field hockey", - "ice hockey", - "lacrosse", - "ping pong", - "badminton", - "boxing glove", - "martial arts uniform", - "goal net", - "flag in hole", - "ice skate", - "fishing pole", - "diving mask", - "running shirt", - "skis", - "sled", - "curling stone", - "direct hit", - "yo-yo", - "kite", - "pool 8 ball", - "crystal ball", - "magic wand", - "nazar amulet", - "video game", - "joystick", - "slot machine", - "game die", - "puzzle piece", - "teddy bear", - "piñata", - "nesting dolls", - "spade suit", - "heart suit", - "diamond suit", - "club suit", - "chess pawn", - "joker", - "mahjong red dragon", - "flower playing cards", - "performing arts", - "framed picture", - "artist palette", - "thread", - "sewing needle", - "yarn", - "knot", - "glasses", - "sunglasses", - "goggles", - "lab coat", - "safety vest", - "necktie", - "t-shirt", - "jeans", - "scarf", - "gloves", - "coat", - "socks", - "dress", - "kimono", - "sari", - "one-piece swimsuit", - "briefs", - "shorts", - "bikini", - "woman’s clothes", - "purse", - "handbag", - "clutch bag", - "shopping bags", - "backpack", - "thong sandal", - "man’s shoe", - "running shoe", - "hiking boot", - "flat shoe", - "high-heeled shoe", - "woman’s sandal", - "ballet shoes", - "woman’s boot", - "crown", - "woman’s hat", - "top hat", - "graduation cap", - "billed cap", - "military helmet", - "rescue worker’s helmet", - "prayer beads", - "lipstick", - "ring", - "gem stone", - "muted speaker", - "speaker low volume", - "speaker medium volume", - "speaker high volume", - "loudspeaker", - "megaphone", - "postal horn", - "bell", - "bell with slash", - "musical score", - "musical note", - "musical notes", - "studio microphone", - "level slider", - "control knobs", - "microphone", - "headphone", - "radio", - "saxophone", - "accordion", - "guitar", - "musical keyboard", - "trumpet", - "violin", - "banjo", - "drum", - "long drum", - "mobile phone", - "mobile phone with arrow", - "telephone", - "telephone receiver", - "pager", - "fax machine", - "battery", - "electric plug", - "laptop", - "desktop computer", - "printer", - "keyboard", - "computer mouse", - "trackball", - "computer disk", - "floppy disk", - "optical disk", - "dvd", - "abacus", - "movie camera", - "film frames", - "film projector", - "clapper board", - "television", - "camera", - "camera with flash", - "video camera", - "videocassette", - "magnifying glass tilted left", - "magnifying glass tilted right", - "candle", - "light bulb", - "flashlight", - "red paper lantern", - "diya lamp", - "notebook with decorative cover", - "closed book", - "open book", - "green book", - "blue book", - "orange book", - "books", - "notebook", - "ledger", - "page with curl", - "scroll", - "page facing up", - "newspaper", - "rolled-up newspaper", - "bookmark tabs", - "bookmark", - "label", - "money bag", - "coin", - "yen banknote", - "dollar banknote", - "euro banknote", - "pound banknote", - "money with wings", - "credit card", - "receipt", - "chart increasing with yen", - "envelope", - "e-mail", - "incoming envelope", - "envelope with arrow", - "outbox tray", - "inbox tray", - "package", - "closed mailbox with raised flag", - "closed mailbox with lowered flag", - "open mailbox with raised flag", - "open mailbox with lowered flag", - "postbox", - "ballot box with ballot", - "pencil", - "black nib", - "fountain pen", - "pen", - "paintbrush", - "crayon", - "memo", - "briefcase", - "file folder", - "open file folder", - "card index dividers", - "calendar", - "tear-off calendar", - "spiral notepad", - "spiral calendar", - "card index", - "chart increasing", - "chart decreasing", - "bar chart", - "clipboard", - "pushpin", - "round pushpin", - "paperclip", - "linked paperclips", - "straight ruler", - "triangular ruler", - "scissors", - "card file box", - "file cabinet", - "wastebasket", - "locked", - "unlocked", - "locked with pen", - "locked with key", - "key", - "old key", - "hammer", - "axe", - "pick", - "hammer and pick", - "hammer and wrench", - "dagger", - "crossed swords", - "pistol", - "boomerang", - "bow and arrow", - "shield", - "carpentry saw", - "wrench", - "screwdriver", - "nut and bolt", - "gear", - "clamp", - "balance scale", - "white cane", - "link", - "chains", - "hook", - "toolbox", - "magnet", - "ladder", - "alembic", - "test tube", - "petri dish", - "dna", - "microscope", - "telescope", - "satellite antenna", - "syringe", - "drop of blood", - "pill", - "adhesive bandage", - "stethoscope", - "door", - "elevator", - "mirror", - "window", - "bed", - "couch and lamp", - "chair", - "toilet", - "plunger", - "shower", - "bathtub", - "mouse trap", - "razor", - "lotion bottle", - "safety pin", - "broom", - "basket", - "roll of paper", - "bucket", - "soap", - "toothbrush", - "sponge", - "fire extinguisher", - "shopping cart", - "cigarette", - "coffin", - "headstone", - "funeral urn", - "moai", - "placard", - "ATM sign", - "litter in bin sign", - "potable water", - "wheelchair symbol", - "men’s room", - "women’s room", - "restroom", - "baby symbol", - "water closet", - "passport control", - "customs", - "baggage claim", - "left luggage", - "warning", - "children crossing", - "no entry", - "prohibited", - "no bicycles", - "no smoking", - "no littering", - "non-potable water", - "no pedestrians", - "no mobile phones", - "no one under eighteen", - "radioactive", - "biohazard", - "up arrow", - "up-right arrow", - "right arrow", - "down-right arrow", - "down arrow", - "down-left arrow", - "left arrow", - "up-left arrow", - "up-down arrow", - "left-right arrow", - "right arrow curving left", - "left arrow curving right", - "right arrow curving up", - "right arrow curving down", - "clockwise vertical arrows", - "counterclockwise arrows button", - "BACK arrow", - "END arrow", - "ON! arrow", - "SOON arrow", - "TOP arrow", - "place of worship", - "atom symbol", - "om", - "star of David", - "wheel of dharma", - "yin yang", - "latin cross", - "orthodox cross", - "star and crescent", - "peace symbol", - "menorah", - "dotted six-pointed star", - "Aries", - "Taurus", - "Gemini", - "Cancer", - "Leo", - "Virgo", - "Libra", - "Scorpio", - "Sagittarius", - "Capricorn", - "Aquarius", - "Pisces", - "Ophiuchus", - "shuffle tracks button", - "repeat button", - "repeat single button", - "play button", - "fast-forward button", - "next track button", - "play or pause button", - "reverse button", - "fast reverse button", - "last track button", - "upwards button", - "fast up button", - "downwards button", - "fast down button", - "pause button", - "stop button", - "record button", - "eject button", - "cinema", - "dim button", - "bright button", - "antenna bars", - "vibration mode", - "mobile phone off", - "female sign", - "male sign", - "transgender symbol", - "multiply", - "plus", - "minus", - "divide", - "infinity", - "double exclamation mark", - "exclamation question mark", - "question mark", - "white question mark", - "white exclamation mark", - "exclamation mark", - "wavy dash", - "currency exchange", - "heavy dollar sign", - "medical symbol", - "recycling symbol", - "fleur-de-lis", - "trident emblem", - "name badge", - "Japanese symbol for beginner", - "hollow red circle", - "check mark button", - "check box with check", - "check mark", - "cross mark", - "cross mark button", - "curly loop", - "double curly loop", - "part alternation mark", - "eight-spoked asterisk", - "eight-pointed star", - "sparkle", - "copyright", - "registered", - "trade mark", - "keycap: #", - "keycap: *", - "keycap: 0", - "keycap: 1", - "keycap: 2", - "keycap: 3", - "keycap: 4", - "keycap: 5", - "keycap: 6", - "keycap: 7", - "keycap: 8", - "keycap: 9", - "keycap: 10", - "input latin uppercase", - "input latin lowercase", - "input numbers", - "input symbols", - "input latin letters", - "A button (blood type)", - "AB button (blood type)", - "B button (blood type)", - "CL button", - "COOL button", - "FREE button", - "information", - "ID button", - "circled M", - "NEW button", - "NG button", - "O button (blood type)", - "OK button", - "P button", - "SOS button", - "UP! button", - "VS button", - "Japanese “here” button", - "Japanese “service charge” button", - "Japanese “monthly amount” button", - "Japanese “not free of charge” button", - "Japanese “reserved” button", - "Japanese “bargain” button", - "Japanese “discount” button", - "Japanese “free of charge” button", - "Japanese “prohibited” button", - "Japanese “acceptable” button", - "Japanese “application” button", - "Japanese “passing grade” button", - "Japanese “vacancy” button", - "Japanese “congratulations” button", - "Japanese “secret” button", - "Japanese “open for business” button", - "Japanese “no vacancy” button", - "red circle", - "orange circle", - "yellow circle", - "green circle", - "blue circle", - "purple circle", - "brown circle", - "black circle", - "white circle", - "red square", - "orange square", - "yellow square", - "green square", - "blue square", - "purple square", - "brown square", - "black large square", - "white large square", - "black medium square", - "white medium square", - "black medium-small square", - "white medium-small square", - "black small square", - "white small square", - "large orange diamond", - "large blue diamond", - "small orange diamond", - "small blue diamond", - "red triangle pointed up", - "red triangle pointed down", - "diamond with a dot", - "radio button", - "white square button", - "black square button", - "chequered flag", - "triangular flag", - "crossed flags", - "black flag", - "white flag", - "rainbow flag", - "transgender flag", - "pirate flag", - "flag: Ascension Island", - "flag: Andorra", - "flag: United Arab Emirates", - "flag: Afghanistan", - "flag: Antigua & Barbuda", - "flag: Anguilla", - "flag: Albania", - "flag: Armenia", - "flag: Angola", - "flag: Antarctica", - "flag: Argentina", - "flag: American Samoa", - "flag: Austria", - "flag: Australia", - "flag: Aruba", - "flag: Åland Islands", - "flag: Azerbaijan", - "flag: Bosnia & Herzegovina", - "flag: Barbados", - "flag: Bangladesh", - "flag: Belgium", - "flag: Burkina Faso", - "flag: Bulgaria", - "flag: Bahrain", - "flag: Burundi", - "flag: Benin", - "flag: St. Barthélemy", - "flag: Bermuda", - "flag: Brunei", - "flag: Bolivia", - "flag: Caribbean Netherlands", - "flag: Brazil", - "flag: Bahamas", - "flag: Bhutan", - "flag: Bouvet Island", - "flag: Botswana", - "flag: Belarus", - "flag: Belize", - "flag: Canada", - "flag: Cocos (Keeling) Islands", - "flag: Congo - Kinshasa", - "flag: Central African Republic", - "flag: Congo - Brazzaville", - "flag: Switzerland", - "flag: Côte d’Ivoire", - "flag: Cook Islands", - "flag: Chile", - "flag: Cameroon", - "flag: China", - "flag: Colombia", - "flag: Clipperton Island", - "flag: Costa Rica", - "flag: Cuba", - "flag: Cape Verde", - "flag: Curaçao", - "flag: Christmas Island", - "flag: Cyprus", - "flag: Czechia", - "flag: Germany", - "flag: Diego Garcia", - "flag: Djibouti", - "flag: Denmark", - "flag: Dominica", - "flag: Dominican Republic", - "flag: Algeria", - "flag: Ceuta & Melilla", - "flag: Ecuador", - "flag: Estonia", - "flag: Egypt", - "flag: Western Sahara", - "flag: Eritrea", - "flag: Spain", - "flag: Ethiopia", - "flag: European Union", - "flag: Finland", - "flag: Fiji", - "flag: Falkland Islands", - "flag: Micronesia", - "flag: Faroe Islands", - "flag: France", - "flag: Gabon", - "flag: United Kingdom", - "flag: Grenada", - "flag: Georgia", - "flag: French Guiana", - "flag: Guernsey", - "flag: Ghana", - "flag: Gibraltar", - "flag: Greenland", - "flag: Gambia", - "flag: Guinea", - "flag: Guadeloupe", - "flag: Equatorial Guinea", - "flag: Greece", - "flag: South Georgia & South Sandwich Islands", - "flag: Guatemala", - "flag: Guam", - "flag: Guinea-Bissau", - "flag: Guyana", - "flag: Hong Kong SAR China", - "flag: Heard & McDonald Islands", - "flag: Honduras", - "flag: Croatia", - "flag: Haiti", - "flag: Hungary", - "flag: Canary Islands", - "flag: Indonesia", - "flag: Ireland", - "flag: Israel", - "flag: Isle of Man", - "flag: India", - "flag: British Indian Ocean Territory", - "flag: Iraq", - "flag: Iran", - "flag: Iceland", - "flag: Italy", - "flag: Jersey", - "flag: Jamaica", - "flag: Jordan", - "flag: Japan", - "flag: Kenya", - "flag: Kyrgyzstan", - "flag: Cambodia", - "flag: Kiribati", - "flag: Comoros", - "flag: St. Kitts & Nevis", - "flag: North Korea", - "flag: South Korea", - "flag: Kuwait", - "flag: Cayman Islands", - "flag: Kazakhstan", - "flag: Laos", - "flag: Lebanon", - "flag: St. Lucia", - "flag: Liechtenstein", - "flag: Sri Lanka", - "flag: Liberia", - "flag: Lesotho", - "flag: Lithuania", - "flag: Luxembourg", - "flag: Latvia", - "flag: Libya", - "flag: Morocco", - "flag: Monaco", - "flag: Moldova", - "flag: Montenegro", - "flag: St. Martin", - "flag: Madagascar", - "flag: Marshall Islands", - "flag: North Macedonia", - "flag: Mali", - "flag: Myanmar (Burma)", - "flag: Mongolia", - "flag: Macao SAR China", - "flag: Northern Mariana Islands", - "flag: Martinique", - "flag: Mauritania", - "flag: Montserrat", - "flag: Malta", - "flag: Mauritius", - "flag: Maldives", - "flag: Malawi", - "flag: Mexico", - "flag: Malaysia", - "flag: Mozambique", - "flag: Namibia", - "flag: New Caledonia", - "flag: Niger", - "flag: Norfolk Island", - "flag: Nigeria", - "flag: Nicaragua", - "flag: Netherlands", - "flag: Norway", - "flag: Nepal", - "flag: Nauru", - "flag: Niue", - "flag: New Zealand", - "flag: Oman", - "flag: Panama", - "flag: Peru", - "flag: French Polynesia", - "flag: Papua New Guinea", - "flag: Philippines", - "flag: Pakistan", - "flag: Poland", - "flag: St. Pierre & Miquelon", - "flag: Pitcairn Islands", - "flag: Puerto Rico", - "flag: Palestinian Territories", - "flag: Portugal", - "flag: Palau", - "flag: Paraguay", - "flag: Qatar", - "flag: Réunion", - "flag: Romania", - "flag: Serbia", - "flag: Russia", - "flag: Rwanda", - "flag: Saudi Arabia", - "flag: Solomon Islands", - "flag: Seychelles", - "flag: Sudan", - "flag: Sweden", - "flag: Singapore", - "flag: St. Helena", - "flag: Slovenia", - "flag: Svalbard & Jan Mayen", - "flag: Slovakia", - "flag: Sierra Leone", - "flag: San Marino", - "flag: Senegal", - "flag: Somalia", - "flag: Suriname", - "flag: South Sudan", - "flag: São Tomé & Príncipe", - "flag: El Salvador", - "flag: Sint Maarten", - "flag: Syria", - "flag: Eswatini", - "flag: Tristan da Cunha", - "flag: Turks & Caicos Islands", - "flag: Chad", - "flag: French Southern Territories", - "flag: Togo", - "flag: Thailand", - "flag: Tajikistan", - "flag: Tokelau", - "flag: Timor-Leste", - "flag: Turkmenistan", - "flag: Tunisia", - "flag: Tonga", - "flag: Turkey", - "flag: Trinidad & Tobago", - "flag: Tuvalu", - "flag: Taiwan", - "flag: Tanzania", - "flag: Ukraine", - "flag: Uganda", - "flag: U.S. Outlying Islands", - "flag: United Nations", - "flag: United States", - "flag: Uruguay", - "flag: Uzbekistan", - "flag: Vatican City", - "flag: St. Vincent & Grenadines", - "flag: Venezuela", - "flag: British Virgin Islands", - "flag: U.S. Virgin Islands", - "flag: Vietnam", - "flag: Vanuatu", - "flag: Wallis & Futuna", - "flag: Samoa", - "flag: Kosovo", - "flag: Yemen", - "flag: Mayotte", - "flag: South Africa", - "flag: Zambia", - "flag: Zimbabwe", - "flag: England", - "flag: Scotland", - "flag: Wales", - }, - "category": { - "Smileys & Emotion", - "People & Body", - "Animals & Nature", - "Food & Drink", - "Travel & Places", - "Activities", - "Objects", - "Symbols", - "Flags", - }, - "alias": { - "grinning", - "smiley", - "smile", - "grin", - "laughing", - "satisfied", - "sweat_smile", - "rofl", - "joy", - "slightly_smiling_face", - "upside_down_face", - "wink", - "blush", - "innocent", - "smiling_face_with_three_hearts", - "heart_eyes", - "star_struck", - "kissing_heart", - "kissing", - "relaxed", - "kissing_closed_eyes", - "kissing_smiling_eyes", - "smiling_face_with_tear", - "yum", - "stuck_out_tongue", - "stuck_out_tongue_winking_eye", - "zany_face", - "stuck_out_tongue_closed_eyes", - "money_mouth_face", - "hugs", - "hand_over_mouth", - "shushing_face", - "thinking", - "zipper_mouth_face", - "raised_eyebrow", - "neutral_face", - "expressionless", - "no_mouth", - "smirk", - "unamused", - "roll_eyes", - "grimacing", - "lying_face", - "relieved", - "pensive", - "sleepy", - "drooling_face", - "sleeping", - "mask", - "face_with_thermometer", - "face_with_head_bandage", - "nauseated_face", - "vomiting_face", - "sneezing_face", - "hot_face", - "cold_face", - "woozy_face", - "dizzy_face", - "exploding_head", - "cowboy_hat_face", - "partying_face", - "disguised_face", - "sunglasses", - "nerd_face", - "monocle_face", - "confused", - "worried", - "slightly_frowning_face", - "frowning_face", - "open_mouth", - "hushed", - "astonished", - "flushed", - "pleading_face", - "frowning", - "anguished", - "fearful", - "cold_sweat", - "disappointed_relieved", - "cry", - "sob", - "scream", - "confounded", - "persevere", - "disappointed", - "sweat", - "weary", - "tired_face", - "yawning_face", - "triumph", - "rage", - "pout", - "angry", - "cursing_face", - "smiling_imp", - "imp", - "skull", - "skull_and_crossbones", - "hankey", - "poop", - "shit", - "clown_face", - "japanese_ogre", - "japanese_goblin", - "ghost", - "alien", - "space_invader", - "robot", - "smiley_cat", - "smile_cat", - "joy_cat", - "heart_eyes_cat", - "smirk_cat", - "kissing_cat", - "scream_cat", - "crying_cat_face", - "pouting_cat", - "see_no_evil", - "hear_no_evil", - "speak_no_evil", - "kiss", - "love_letter", - "cupid", - "gift_heart", - "sparkling_heart", - "heartpulse", - "heartbeat", - "revolving_hearts", - "two_hearts", - "heart_decoration", - "heavy_heart_exclamation", - "broken_heart", - "heart", - "orange_heart", - "yellow_heart", - "green_heart", - "blue_heart", - "purple_heart", - "brown_heart", - "black_heart", - "white_heart", - "100", - "anger", - "boom", - "collision", - "dizzy", - "sweat_drops", - "dash", - "hole", - "bomb", - "speech_balloon", - "eye_speech_bubble", - "left_speech_bubble", - "right_anger_bubble", - "thought_balloon", - "zzz", - "wave", - "raised_back_of_hand", - "raised_hand_with_fingers_splayed", - "hand", - "raised_hand", - "vulcan_salute", - "ok_hand", - "pinched_fingers", - "pinching_hand", - "v", - "crossed_fingers", - "love_you_gesture", - "metal", - "call_me_hand", - "point_left", - "point_right", - "point_up_2", - "middle_finger", - "fu", - "point_down", - "point_up", - "+1", - "thumbsup", - "-1", - "thumbsdown", - "fist_raised", - "fist", - "fist_oncoming", - "facepunch", - "punch", - "fist_left", - "fist_right", - "clap", - "raised_hands", - "open_hands", - "palms_up_together", - "handshake", - "pray", - "writing_hand", - "nail_care", - "selfie", - "muscle", - "mechanical_arm", - "mechanical_leg", - "leg", - "foot", - "ear", - "ear_with_hearing_aid", - "nose", - "brain", - "anatomical_heart", - "lungs", - "tooth", - "bone", - "eyes", - "eye", - "tongue", - "lips", - "baby", - "child", - "boy", - "girl", - "adult", - "blond_haired_person", - "man", - "bearded_person", - "red_haired_man", - "curly_haired_man", - "white_haired_man", - "bald_man", - "woman", - "red_haired_woman", - "person_red_hair", - "curly_haired_woman", - "person_curly_hair", - "white_haired_woman", - "person_white_hair", - "bald_woman", - "person_bald", - "blond_haired_woman", - "blonde_woman", - "blond_haired_man", - "older_adult", - "older_man", - "older_woman", - "frowning_person", - "frowning_man", - "frowning_woman", - "pouting_face", - "pouting_man", - "pouting_woman", - "no_good", - "no_good_man", - "ng_man", - "no_good_woman", - "ng_woman", - "ok_person", - "ok_man", - "ok_woman", - "tipping_hand_person", - "information_desk_person", - "tipping_hand_man", - "sassy_man", - "tipping_hand_woman", - "sassy_woman", - "raising_hand", - "raising_hand_man", - "raising_hand_woman", - "deaf_person", - "deaf_man", - "deaf_woman", - "bow", - "bowing_man", - "bowing_woman", - "facepalm", - "man_facepalming", - "woman_facepalming", - "shrug", - "man_shrugging", - "woman_shrugging", - "health_worker", - "man_health_worker", - "woman_health_worker", - "student", - "man_student", - "woman_student", - "teacher", - "man_teacher", - "woman_teacher", - "judge", - "man_judge", - "woman_judge", - "farmer", - "man_farmer", - "woman_farmer", - "cook", - "man_cook", - "woman_cook", - "mechanic", - "man_mechanic", - "woman_mechanic", - "factory_worker", - "man_factory_worker", - "woman_factory_worker", - "office_worker", - "man_office_worker", - "woman_office_worker", - "scientist", - "man_scientist", - "woman_scientist", - "technologist", - "man_technologist", - "woman_technologist", - "singer", - "man_singer", - "woman_singer", - "artist", - "man_artist", - "woman_artist", - "pilot", - "man_pilot", - "woman_pilot", - "astronaut", - "man_astronaut", - "woman_astronaut", - "firefighter", - "man_firefighter", - "woman_firefighter", - "police_officer", - "cop", - "policeman", - "policewoman", - "detective", - "male_detective", - "female_detective", - "guard", - "guardsman", - "guardswoman", - "ninja", - "construction_worker", - "construction_worker_man", - "construction_worker_woman", - "prince", - "princess", - "person_with_turban", - "man_with_turban", - "woman_with_turban", - "man_with_gua_pi_mao", - "woman_with_headscarf", - "person_in_tuxedo", - "man_in_tuxedo", - "woman_in_tuxedo", - "person_with_veil", - "man_with_veil", - "woman_with_veil", - "bride_with_veil", - "pregnant_woman", - "breast_feeding", - "woman_feeding_baby", - "man_feeding_baby", - "person_feeding_baby", - "angel", - "santa", - "mrs_claus", - "mx_claus", - "superhero", - "superhero_man", - "superhero_woman", - "supervillain", - "supervillain_man", - "supervillain_woman", - "mage", - "mage_man", - "mage_woman", - "fairy", - "fairy_man", - "fairy_woman", - "vampire", - "vampire_man", - "vampire_woman", - "merperson", - "merman", - "mermaid", - "elf", - "elf_man", - "elf_woman", - "genie", - "genie_man", - "genie_woman", - "zombie", - "zombie_man", - "zombie_woman", - "massage", - "massage_man", - "massage_woman", - "haircut", - "haircut_man", - "haircut_woman", - "walking", - "walking_man", - "walking_woman", - "standing_person", - "standing_man", - "standing_woman", - "kneeling_person", - "kneeling_man", - "kneeling_woman", - "person_with_probing_cane", - "man_with_probing_cane", - "woman_with_probing_cane", - "person_in_motorized_wheelchair", - "man_in_motorized_wheelchair", - "woman_in_motorized_wheelchair", - "person_in_manual_wheelchair", - "man_in_manual_wheelchair", - "woman_in_manual_wheelchair", - "runner", - "running", - "running_man", - "running_woman", - "woman_dancing", - "dancer", - "man_dancing", - "business_suit_levitating", - "dancers", - "dancing_men", - "dancing_women", - "sauna_person", - "sauna_man", - "sauna_woman", - "climbing", - "climbing_man", - "climbing_woman", - "person_fencing", - "horse_racing", - "skier", - "snowboarder", - "golfing", - "golfing_man", - "golfing_woman", - "surfer", - "surfing_man", - "surfing_woman", - "rowboat", - "rowing_man", - "rowing_woman", - "swimmer", - "swimming_man", - "swimming_woman", - "bouncing_ball_person", - "bouncing_ball_man", - "basketball_man", - "bouncing_ball_woman", - "basketball_woman", - "weight_lifting", - "weight_lifting_man", - "weight_lifting_woman", - "bicyclist", - "biking_man", - "biking_woman", - "mountain_bicyclist", - "mountain_biking_man", - "mountain_biking_woman", - "cartwheeling", - "man_cartwheeling", - "woman_cartwheeling", - "wrestling", - "men_wrestling", - "women_wrestling", - "water_polo", - "man_playing_water_polo", - "woman_playing_water_polo", - "handball_person", - "man_playing_handball", - "woman_playing_handball", - "juggling_person", - "man_juggling", - "woman_juggling", - "lotus_position", - "lotus_position_man", - "lotus_position_woman", - "bath", - "sleeping_bed", - "people_holding_hands", - "two_women_holding_hands", - "couple", - "two_men_holding_hands", - "couplekiss", - "couplekiss_man_woman", - "couplekiss_man_man", - "couplekiss_woman_woman", - "couple_with_heart", - "couple_with_heart_woman_man", - "couple_with_heart_man_man", - "couple_with_heart_woman_woman", - "family", - "family_man_woman_boy", - "family_man_woman_girl", - "family_man_woman_girl_boy", - "family_man_woman_boy_boy", - "family_man_woman_girl_girl", - "family_man_man_boy", - "family_man_man_girl", - "family_man_man_girl_boy", - "family_man_man_boy_boy", - "family_man_man_girl_girl", - "family_woman_woman_boy", - "family_woman_woman_girl", - "family_woman_woman_girl_boy", - "family_woman_woman_boy_boy", - "family_woman_woman_girl_girl", - "family_man_boy", - "family_man_boy_boy", - "family_man_girl", - "family_man_girl_boy", - "family_man_girl_girl", - "family_woman_boy", - "family_woman_boy_boy", - "family_woman_girl", - "family_woman_girl_boy", - "family_woman_girl_girl", - "speaking_head", - "bust_in_silhouette", - "busts_in_silhouette", - "people_hugging", - "footprints", - "monkey_face", - "monkey", - "gorilla", - "orangutan", - "dog", - "dog2", - "guide_dog", - "service_dog", - "poodle", - "wolf", - "fox_face", - "raccoon", - "cat", - "cat2", - "black_cat", - "lion", - "tiger", - "tiger2", - "leopard", - "horse", - "racehorse", - "unicorn", - "zebra", - "deer", - "bison", - "cow", - "ox", - "water_buffalo", - "cow2", - "pig", - "pig2", - "boar", - "pig_nose", - "ram", - "sheep", - "goat", - "dromedary_camel", - "camel", - "llama", - "giraffe", - "elephant", - "mammoth", - "rhinoceros", - "hippopotamus", - "mouse", - "mouse2", - "rat", - "hamster", - "rabbit", - "rabbit2", - "chipmunk", - "beaver", - "hedgehog", - "bat", - "bear", - "polar_bear", - "koala", - "panda_face", - "sloth", - "otter", - "skunk", - "kangaroo", - "badger", - "feet", - "paw_prints", - "turkey", - "chicken", - "rooster", - "hatching_chick", - "baby_chick", - "hatched_chick", - "bird", - "penguin", - "dove", - "eagle", - "duck", - "swan", - "owl", - "dodo", - "feather", - "flamingo", - "peacock", - "parrot", - "frog", - "crocodile", - "turtle", - "lizard", - "snake", - "dragon_face", - "dragon", - "sauropod", - "t-rex", - "whale", - "whale2", - "dolphin", - "flipper", - "seal", - "fish", - "tropical_fish", - "blowfish", - "shark", - "octopus", - "shell", - "snail", - "butterfly", - "bug", - "ant", - "bee", - "honeybee", - "beetle", - "lady_beetle", - "cricket", - "cockroach", - "spider", - "spider_web", - "scorpion", - "mosquito", - "fly", - "worm", - "microbe", - "bouquet", - "cherry_blossom", - "white_flower", - "rosette", - "rose", - "wilted_flower", - "hibiscus", - "sunflower", - "blossom", - "tulip", - "seedling", - "potted_plant", - "evergreen_tree", - "deciduous_tree", - "palm_tree", - "cactus", - "ear_of_rice", - "herb", - "shamrock", - "four_leaf_clover", - "maple_leaf", - "fallen_leaf", - "leaves", - "grapes", - "melon", - "watermelon", - "tangerine", - "orange", - "mandarin", - "lemon", - "banana", - "pineapple", - "mango", - "apple", - "green_apple", - "pear", - "peach", - "cherries", - "strawberry", - "blueberries", - "kiwi_fruit", - "tomato", - "olive", - "coconut", - "avocado", - "eggplant", - "potato", - "carrot", - "corn", - "hot_pepper", - "bell_pepper", - "cucumber", - "leafy_green", - "broccoli", - "garlic", - "onion", - "mushroom", - "peanuts", - "chestnut", - "bread", - "croissant", - "baguette_bread", - "flatbread", - "pretzel", - "bagel", - "pancakes", - "waffle", - "cheese", - "meat_on_bone", - "poultry_leg", - "cut_of_meat", - "bacon", - "hamburger", - "fries", - "pizza", - "hotdog", - "sandwich", - "taco", - "burrito", - "tamale", - "stuffed_flatbread", - "falafel", - "egg", - "fried_egg", - "shallow_pan_of_food", - "stew", - "fondue", - "bowl_with_spoon", - "green_salad", - "popcorn", - "butter", - "salt", - "canned_food", - "bento", - "rice_cracker", - "rice_ball", - "rice", - "curry", - "ramen", - "spaghetti", - "sweet_potato", - "oden", - "sushi", - "fried_shrimp", - "fish_cake", - "moon_cake", - "dango", - "dumpling", - "fortune_cookie", - "takeout_box", - "crab", - "lobster", - "shrimp", - "squid", - "oyster", - "icecream", - "shaved_ice", - "ice_cream", - "doughnut", - "cookie", - "birthday", - "cake", - "cupcake", - "pie", - "chocolate_bar", - "candy", - "lollipop", - "custard", - "honey_pot", - "baby_bottle", - "milk_glass", - "coffee", - "teapot", - "tea", - "sake", - "champagne", - "wine_glass", - "cocktail", - "tropical_drink", - "beer", - "beers", - "clinking_glasses", - "tumbler_glass", - "cup_with_straw", - "bubble_tea", - "beverage_box", - "mate", - "ice_cube", - "chopsticks", - "plate_with_cutlery", - "fork_and_knife", - "spoon", - "hocho", - "knife", - "amphora", - "earth_africa", - "earth_americas", - "earth_asia", - "globe_with_meridians", - "world_map", - "japan", - "compass", - "mountain_snow", - "mountain", - "volcano", - "mount_fuji", - "camping", - "beach_umbrella", - "desert", - "desert_island", - "national_park", - "stadium", - "classical_building", - "building_construction", - "bricks", - "rock", - "wood", - "hut", - "houses", - "derelict_house", - "house", - "house_with_garden", - "office", - "post_office", - "european_post_office", - "hospital", - "bank", - "hotel", - "love_hotel", - "convenience_store", - "school", - "department_store", - "factory", - "japanese_castle", - "european_castle", - "wedding", - "tokyo_tower", - "statue_of_liberty", - "church", - "mosque", - "hindu_temple", - "synagogue", - "shinto_shrine", - "kaaba", - "fountain", - "tent", - "foggy", - "night_with_stars", - "cityscape", - "sunrise_over_mountains", - "sunrise", - "city_sunset", - "city_sunrise", - "bridge_at_night", - "hotsprings", - "carousel_horse", - "ferris_wheel", - "roller_coaster", - "barber", - "circus_tent", - "steam_locomotive", - "railway_car", - "bullettrain_side", - "bullettrain_front", - "train2", - "metro", - "light_rail", - "station", - "tram", - "monorail", - "mountain_railway", - "train", - "bus", - "oncoming_bus", - "trolleybus", - "minibus", - "ambulance", - "fire_engine", - "police_car", - "oncoming_police_car", - "taxi", - "oncoming_taxi", - "car", - "red_car", - "oncoming_automobile", - "blue_car", - "pickup_truck", - "truck", - "articulated_lorry", - "tractor", - "racing_car", - "motorcycle", - "motor_scooter", - "manual_wheelchair", - "motorized_wheelchair", - "auto_rickshaw", - "bike", - "kick_scooter", - "skateboard", - "roller_skate", - "busstop", - "motorway", - "railway_track", - "oil_drum", - "fuelpump", - "rotating_light", - "traffic_light", - "vertical_traffic_light", - "stop_sign", - "construction", - "anchor", - "boat", - "sailboat", - "canoe", - "speedboat", - "passenger_ship", - "ferry", - "motor_boat", - "ship", - "airplane", - "small_airplane", - "flight_departure", - "flight_arrival", - "parachute", - "seat", - "helicopter", - "suspension_railway", - "mountain_cableway", - "aerial_tramway", - "artificial_satellite", - "rocket", - "flying_saucer", - "bellhop_bell", - "luggage", - "hourglass", - "hourglass_flowing_sand", - "watch", - "alarm_clock", - "stopwatch", - "timer_clock", - "mantelpiece_clock", - "clock12", - "clock1230", - "clock1", - "clock130", - "clock2", - "clock230", - "clock3", - "clock330", - "clock4", - "clock430", - "clock5", - "clock530", - "clock6", - "clock630", - "clock7", - "clock730", - "clock8", - "clock830", - "clock9", - "clock930", - "clock10", - "clock1030", - "clock11", - "clock1130", - "new_moon", - "waxing_crescent_moon", - "first_quarter_moon", - "moon", - "waxing_gibbous_moon", - "full_moon", - "waning_gibbous_moon", - "last_quarter_moon", - "waning_crescent_moon", - "crescent_moon", - "new_moon_with_face", - "first_quarter_moon_with_face", - "last_quarter_moon_with_face", - "thermometer", - "sunny", - "full_moon_with_face", - "sun_with_face", - "ringed_planet", - "star", - "star2", - "stars", - "milky_way", - "cloud", - "partly_sunny", - "cloud_with_lightning_and_rain", - "sun_behind_small_cloud", - "sun_behind_large_cloud", - "sun_behind_rain_cloud", - "cloud_with_rain", - "cloud_with_snow", - "cloud_with_lightning", - "tornado", - "fog", - "wind_face", - "cyclone", - "rainbow", - "closed_umbrella", - "open_umbrella", - "umbrella", - "parasol_on_ground", - "zap", - "snowflake", - "snowman_with_snow", - "snowman", - "comet", - "fire", - "droplet", - "ocean", - "jack_o_lantern", - "christmas_tree", - "fireworks", - "sparkler", - "firecracker", - "sparkles", - "balloon", - "tada", - "confetti_ball", - "tanabata_tree", - "bamboo", - "dolls", - "flags", - "wind_chime", - "rice_scene", - "red_envelope", - "ribbon", - "gift", - "reminder_ribbon", - "tickets", - "ticket", - "medal_military", - "trophy", - "medal_sports", - "1st_place_medal", - "2nd_place_medal", - "3rd_place_medal", - "soccer", - "baseball", - "softball", - "basketball", - "volleyball", - "football", - "rugby_football", - "tennis", - "flying_disc", - "bowling", - "cricket_game", - "field_hockey", - "ice_hockey", - "lacrosse", - "ping_pong", - "badminton", - "boxing_glove", - "martial_arts_uniform", - "goal_net", - "golf", - "ice_skate", - "fishing_pole_and_fish", - "diving_mask", - "running_shirt_with_sash", - "ski", - "sled", - "curling_stone", - "dart", - "yo_yo", - "kite", - "8ball", - "crystal_ball", - "magic_wand", - "nazar_amulet", - "video_game", - "joystick", - "slot_machine", - "game_die", - "jigsaw", - "teddy_bear", - "pi_ata", - "nesting_dolls", - "spades", - "hearts", - "diamonds", - "clubs", - "chess_pawn", - "black_joker", - "mahjong", - "flower_playing_cards", - "performing_arts", - "framed_picture", - "art", - "thread", - "sewing_needle", - "yarn", - "knot", - "eyeglasses", - "dark_sunglasses", - "goggles", - "lab_coat", - "safety_vest", - "necktie", - "shirt", - "tshirt", - "jeans", - "scarf", - "gloves", - "coat", - "socks", - "dress", - "kimono", - "sari", - "one_piece_swimsuit", - "swim_brief", - "shorts", - "bikini", - "womans_clothes", - "purse", - "handbag", - "pouch", - "shopping", - "school_satchel", - "thong_sandal", - "mans_shoe", - "shoe", - "athletic_shoe", - "hiking_boot", - "flat_shoe", - "high_heel", - "sandal", - "ballet_shoes", - "boot", - "crown", - "womans_hat", - "tophat", - "mortar_board", - "billed_cap", - "military_helmet", - "rescue_worker_helmet", - "prayer_beads", - "lipstick", - "ring", - "gem", - "mute", - "speaker", - "sound", - "loud_sound", - "loudspeaker", - "mega", - "postal_horn", - "bell", - "no_bell", - "musical_score", - "musical_note", - "notes", - "studio_microphone", - "level_slider", - "control_knobs", - "microphone", - "headphones", - "radio", - "saxophone", - "accordion", - "guitar", - "musical_keyboard", - "trumpet", - "violin", - "banjo", - "drum", - "long_drum", - "iphone", - "calling", - "phone", - "telephone", - "telephone_receiver", - "pager", - "fax", - "battery", - "electric_plug", - "computer", - "desktop_computer", - "printer", - "keyboard", - "computer_mouse", - "trackball", - "minidisc", - "floppy_disk", - "cd", - "dvd", - "abacus", - "movie_camera", - "film_strip", - "film_projector", - "clapper", - "tv", - "camera", - "camera_flash", - "video_camera", - "vhs", - "mag", - "mag_right", - "candle", - "bulb", - "flashlight", - "izakaya_lantern", - "lantern", - "diya_lamp", - "notebook_with_decorative_cover", - "closed_book", - "book", - "open_book", - "green_book", - "blue_book", - "orange_book", - "books", - "notebook", - "ledger", - "page_with_curl", - "scroll", - "page_facing_up", - "newspaper", - "newspaper_roll", - "bookmark_tabs", - "bookmark", - "label", - "moneybag", - "coin", - "yen", - "dollar", - "euro", - "pound", - "money_with_wings", - "credit_card", - "receipt", - "chart", - "email", - "envelope", - "e-mail", - "incoming_envelope", - "envelope_with_arrow", - "outbox_tray", - "inbox_tray", - "package", - "mailbox", - "mailbox_closed", - "mailbox_with_mail", - "mailbox_with_no_mail", - "postbox", - "ballot_box", - "pencil2", - "black_nib", - "fountain_pen", - "pen", - "paintbrush", - "crayon", - "memo", - "pencil", - "briefcase", - "file_folder", - "open_file_folder", - "card_index_dividers", - "date", - "calendar", - "spiral_notepad", - "spiral_calendar", - "card_index", - "chart_with_upwards_trend", - "chart_with_downwards_trend", - "bar_chart", - "clipboard", - "pushpin", - "round_pushpin", - "paperclip", - "paperclips", - "straight_ruler", - "triangular_ruler", - "scissors", - "card_file_box", - "file_cabinet", - "wastebasket", - "lock", - "unlock", - "lock_with_ink_pen", - "closed_lock_with_key", - "key", - "old_key", - "hammer", - "axe", - "pick", - "hammer_and_pick", - "hammer_and_wrench", - "dagger", - "crossed_swords", - "gun", - "boomerang", - "bow_and_arrow", - "shield", - "carpentry_saw", - "wrench", - "screwdriver", - "nut_and_bolt", - "gear", - "clamp", - "balance_scale", - "probing_cane", - "link", - "chains", - "hook", - "toolbox", - "magnet", - "ladder", - "alembic", - "test_tube", - "petri_dish", - "dna", - "microscope", - "telescope", - "satellite", - "syringe", - "drop_of_blood", - "pill", - "adhesive_bandage", - "stethoscope", - "door", - "elevator", - "mirror", - "window", - "bed", - "couch_and_lamp", - "chair", - "toilet", - "plunger", - "shower", - "bathtub", - "mouse_trap", - "razor", - "lotion_bottle", - "safety_pin", - "broom", - "basket", - "roll_of_paper", - "bucket", - "soap", - "toothbrush", - "sponge", - "fire_extinguisher", - "shopping_cart", - "smoking", - "coffin", - "headstone", - "funeral_urn", - "moyai", - "placard", - "atm", - "put_litter_in_its_place", - "potable_water", - "wheelchair", - "mens", - "womens", - "restroom", - "baby_symbol", - "wc", - "passport_control", - "customs", - "baggage_claim", - "left_luggage", - "warning", - "children_crossing", - "no_entry", - "no_entry_sign", - "no_bicycles", - "no_smoking", - "do_not_litter", - "non-potable_water", - "no_pedestrians", - "no_mobile_phones", - "underage", - "radioactive", - "biohazard", - "arrow_up", - "arrow_upper_right", - "arrow_right", - "arrow_lower_right", - "arrow_down", - "arrow_lower_left", - "arrow_left", - "arrow_upper_left", - "arrow_up_down", - "left_right_arrow", - "leftwards_arrow_with_hook", - "arrow_right_hook", - "arrow_heading_up", - "arrow_heading_down", - "arrows_clockwise", - "arrows_counterclockwise", - "back", - "end", - "on", - "soon", - "top", - "place_of_worship", - "atom_symbol", - "om", - "star_of_david", - "wheel_of_dharma", - "yin_yang", - "latin_cross", - "orthodox_cross", - "star_and_crescent", - "peace_symbol", - "menorah", - "six_pointed_star", - "aries", - "taurus", - "gemini", - "cancer", - "leo", - "virgo", - "libra", - "scorpius", - "sagittarius", - "capricorn", - "aquarius", - "pisces", - "ophiuchus", - "twisted_rightwards_arrows", - "repeat", - "repeat_one", - "arrow_forward", - "fast_forward", - "next_track_button", - "play_or_pause_button", - "arrow_backward", - "rewind", - "previous_track_button", - "arrow_up_small", - "arrow_double_up", - "arrow_down_small", - "arrow_double_down", - "pause_button", - "stop_button", - "record_button", - "eject_button", - "cinema", - "low_brightness", - "high_brightness", - "signal_strength", - "vibration_mode", - "mobile_phone_off", - "female_sign", - "male_sign", - "transgender_symbol", - "heavy_multiplication_x", - "heavy_plus_sign", - "heavy_minus_sign", - "heavy_division_sign", - "infinity", - "bangbang", - "interrobang", - "question", - "grey_question", - "grey_exclamation", - "exclamation", - "heavy_exclamation_mark", - "wavy_dash", - "currency_exchange", - "heavy_dollar_sign", - "medical_symbol", - "recycle", - "fleur_de_lis", - "trident", - "name_badge", - "beginner", - "o", - "white_check_mark", - "ballot_box_with_check", - "heavy_check_mark", - "x", - "negative_squared_cross_mark", - "curly_loop", - "loop", - "part_alternation_mark", - "eight_spoked_asterisk", - "eight_pointed_black_star", - "sparkle", - "copyright", - "registered", - "tm", - "hash", - "asterisk", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "keycap_ten", - "capital_abcd", - "abcd", - "1234", - "symbols", - "abc", - "a", - "ab", - "b", - "cl", - "cool", - "free", - "information_source", - "id", - "m", - "new", - "ng", - "o2", - "ok", - "parking", - "sos", - "up", - "vs", - "koko", - "sa", - "u6708", - "u6709", - "u6307", - "ideograph_advantage", - "u5272", - "u7121", - "u7981", - "accept", - "u7533", - "u5408", - "u7a7a", - "congratulations", - "secret", - "u55b6", - "u6e80", - "red_circle", - "orange_circle", - "yellow_circle", - "green_circle", - "large_blue_circle", - "purple_circle", - "brown_circle", - "black_circle", - "white_circle", - "red_square", - "orange_square", - "yellow_square", - "green_square", - "blue_square", - "purple_square", - "brown_square", - "black_large_square", - "white_large_square", - "black_medium_square", - "white_medium_square", - "black_medium_small_square", - "white_medium_small_square", - "black_small_square", - "white_small_square", - "large_orange_diamond", - "large_blue_diamond", - "small_orange_diamond", - "small_blue_diamond", - "small_red_triangle", - "small_red_triangle_down", - "diamond_shape_with_a_dot_inside", - "radio_button", - "white_square_button", - "black_square_button", - "checkered_flag", - "triangular_flag_on_post", - "crossed_flags", - "black_flag", - "white_flag", - "rainbow_flag", - "transgender_flag", - "pirate_flag", - "ascension_island", - "andorra", - "united_arab_emirates", - "afghanistan", - "antigua_barbuda", - "anguilla", - "albania", - "armenia", - "angola", - "antarctica", - "argentina", - "american_samoa", - "austria", - "australia", - "aruba", - "aland_islands", - "azerbaijan", - "bosnia_herzegovina", - "barbados", - "bangladesh", - "belgium", - "burkina_faso", - "bulgaria", - "bahrain", - "burundi", - "benin", - "st_barthelemy", - "bermuda", - "brunei", - "bolivia", - "caribbean_netherlands", - "brazil", - "bahamas", - "bhutan", - "bouvet_island", - "botswana", - "belarus", - "belize", - "canada", - "cocos_islands", - "congo_kinshasa", - "central_african_republic", - "congo_brazzaville", - "switzerland", - "cote_divoire", - "cook_islands", - "chile", - "cameroon", - "cn", - "colombia", - "clipperton_island", - "costa_rica", - "cuba", - "cape_verde", - "curacao", - "christmas_island", - "cyprus", - "czech_republic", - "de", - "diego_garcia", - "djibouti", - "denmark", - "dominica", - "dominican_republic", - "algeria", - "ceuta_melilla", - "ecuador", - "estonia", - "egypt", - "western_sahara", - "eritrea", - "es", - "ethiopia", - "eu", - "european_union", - "finland", - "fiji", - "falkland_islands", - "micronesia", - "faroe_islands", - "fr", - "gabon", - "gb", - "uk", - "grenada", - "georgia", - "french_guiana", - "guernsey", - "ghana", - "gibraltar", - "greenland", - "gambia", - "guinea", - "guadeloupe", - "equatorial_guinea", - "greece", - "south_georgia_south_sandwich_islands", - "guatemala", - "guam", - "guinea_bissau", - "guyana", - "hong_kong", - "heard_mcdonald_islands", - "honduras", - "croatia", - "haiti", - "hungary", - "canary_islands", - "indonesia", - "ireland", - "israel", - "isle_of_man", - "india", - "british_indian_ocean_territory", - "iraq", - "iran", - "iceland", - "it", - "jersey", - "jamaica", - "jordan", - "jp", - "kenya", - "kyrgyzstan", - "cambodia", - "kiribati", - "comoros", - "st_kitts_nevis", - "north_korea", - "kr", - "kuwait", - "cayman_islands", - "kazakhstan", - "laos", - "lebanon", - "st_lucia", - "liechtenstein", - "sri_lanka", - "liberia", - "lesotho", - "lithuania", - "luxembourg", - "latvia", - "libya", - "morocco", - "monaco", - "moldova", - "montenegro", - "st_martin", - "madagascar", - "marshall_islands", - "macedonia", - "mali", - "myanmar", - "mongolia", - "macau", - "northern_mariana_islands", - "martinique", - "mauritania", - "montserrat", - "malta", - "mauritius", - "maldives", - "malawi", - "mexico", - "malaysia", - "mozambique", - "namibia", - "new_caledonia", - "niger", - "norfolk_island", - "nigeria", - "nicaragua", - "netherlands", - "norway", - "nepal", - "nauru", - "niue", - "new_zealand", - "oman", - "panama", - "peru", - "french_polynesia", - "papua_new_guinea", - "philippines", - "pakistan", - "poland", - "st_pierre_miquelon", - "pitcairn_islands", - "puerto_rico", - "palestinian_territories", - "portugal", - "palau", - "paraguay", - "qatar", - "reunion", - "romania", - "serbia", - "ru", - "rwanda", - "saudi_arabia", - "solomon_islands", - "seychelles", - "sudan", - "sweden", - "singapore", - "st_helena", - "slovenia", - "svalbard_jan_mayen", - "slovakia", - "sierra_leone", - "san_marino", - "senegal", - "somalia", - "suriname", - "south_sudan", - "sao_tome_principe", - "el_salvador", - "sint_maarten", - "syria", - "swaziland", - "tristan_da_cunha", - "turks_caicos_islands", - "chad", - "french_southern_territories", - "togo", - "thailand", - "tajikistan", - "tokelau", - "timor_leste", - "turkmenistan", - "tunisia", - "tonga", - "tr", - "trinidad_tobago", - "tuvalu", - "taiwan", - "tanzania", - "ukraine", - "uganda", - "us_outlying_islands", - "united_nations", - "us", - "uruguay", - "uzbekistan", - "vatican_city", - "st_vincent_grenadines", - "venezuela", - "british_virgin_islands", - "us_virgin_islands", - "vietnam", - "vanuatu", - "wallis_futuna", - "samoa", - "kosovo", - "yemen", - "mayotte", - "south_africa", - "zambia", - "zimbabwe", - "england", - "scotland", - "wales", - }, - "tag": { - "smile", - "happy", - "joy", - "haha", - "laugh", - "pleased", - "hot", - "lol", - "laughing", - "tears", - "flirt", - "proud", - "angel", - "love", - "crush", - "eyes", - "blush", - "tongue", - "lick", - "prank", - "silly", - "goofy", - "wacky", - "rich", - "quiet", - "whoops", - "silence", - "hush", - "suspicious", - "meh", - "mute", - "smug", - "liar", - "whew", - "tired", - "zzz", - "sick", - "ill", - "hurt", - "barf", - "disgusted", - "achoo", - "heat", - "sweating", - "freezing", - "ice", - "groggy", - "mind", - "blown", - "celebration", - "birthday", - "cool", - "geek", - "glasses", - "nervous", - "surprise", - "impressed", - "wow", - "speechless", - "amazed", - "gasp", - "puppy", - "stunned", - "scared", - "shocked", - "oops", - "phew", - "sweat", - "sad", - "tear", - "cry", - "bawling", - "horror", - "struggling", - "upset", - "whine", - "angry", - "mad", - "annoyed", - "foul", - "devil", - "evil", - "horns", - "dead", - "danger", - "poison", - "pirate", - "crap", - "monster", - "halloween", - "ufo", - "game", - "retro", - "monkey", - "blind", - "ignore", - "deaf", - "lipstick", - "email", - "envelope", - "heart", - "chocolates", - "score", - "perfect", - "explode", - "star", - "water", - "workout", - "wind", - "blow", - "fast", - "boom", - "comment", - "thinking", - "sleeping", - "goodbye", - "highfive", - "stop", - "prosper", - "spock", - "victory", - "peace", - "luck", - "hopeful", - "approve", - "ok", - "disapprove", - "bury", - "power", - "attack", - "praise", - "applause", - "hooray", - "deal", - "please", - "hope", - "wish", - "beauty", - "manicure", - "flex", - "bicep", - "strong", - "hear", - "sound", - "listen", - "smell", - "look", - "see", - "watch", - "taste", - "kiss", - "child", - "newborn", - "mustache", - "father", - "dad", - "girls", - "halt", - "denied", - "information", - "respect", - "thanks", - "doctor", - "nurse", - "graduation", - "school", - "professor", - "justice", - "chef", - "business", - "research", - "coder", - "rockstar", - "painter", - "space", - "law", - "cop", - "sleuth", - "helmet", - "crown", - "royal", - "hijab", - "groom", - "marriage", - "wedding", - "nursing", - "christmas", - "santa", - "wizard", - "spa", - "exercise", - "marathon", - "dress", - "dancer", - "bunny", - "steamy", - "bouldering", - "basketball", - "gym", - "meditation", - "shower", - "couple", - "date", - "home", - "parents", - "user", - "users", - "group", - "team", - "feet", - "tracks", - "pet", - "dog", - "speed", - "desert", - "thanksgiving", - "slow", - "dinosaur", - "sea", - "beach", - "bug", - "germ", - "flowers", - "flower", - "spring", - "plant", - "wood", - "canada", - "autumn", - "leaf", - "fruit", - "aubergine", - "spicy", - "toast", - "meat", - "chicken", - "burger", - "breakfast", - "paella", - "curry", - "noodle", - "pasta", - "tempura", - "party", - "dessert", - "sweet", - "milk", - "cafe", - "espresso", - "green", - "bottle", - "bubbly", - "drink", - "summer", - "vacation", - "drinks", - "cheers", - "whisky", - "dining", - "dinner", - "cutlery", - "cut", - "chop", - "globe", - "world", - "international", - "global", - "travel", - "camping", - "karl", - "skyline", - "train", - "bicycle", - "911", - "emergency", - "semaphore", - "wip", - "ship", - "cruise", - "flight", - "orbit", - "launch", - "time", - "morning", - "night", - "weather", - "cloud", - "swirl", - "rain", - "beach_umbrella", - "lightning", - "thunder", - "winter", - "cold", - "burn", - "festival", - "shiny", - "present", - "award", - "contest", - "winner", - "gold", - "silver", - "bronze", - "sports", - "skating", - "target", - "pool", - "billiards", - "fortune", - "play", - "controller", - "console", - "dice", - "gambling", - "theater", - "drama", - "design", - "paint", - "shirt", - "formal", - "pants", - "bag", - "bags", - "sneaker", - "sport", - "running", - "shoe", - "king", - "queen", - "hat", - "classy", - "education", - "college", - "university", - "makeup", - "engaged", - "diamond", - "volume", - "announcement", - "notification", - "off", - "music", - "podcast", - "sing", - "earphones", - "rock", - "piano", - "smartphone", - "mobile", - "call", - "incoming", - "phone", - "desktop", - "screen", - "save", - "film", - "video", - "photo", - "search", - "zoom", - "idea", - "light", - "library", - "document", - "press", - "tag", - "dollar", - "cream", - "money", - "subscription", - "letter", - "shipping", - "note", - "directory", - "calendar", - "schedule", - "graph", - "metrics", - "stats", - "location", - "trash", - "security", - "private", - "lock", - "password", - "tool", - "shoot", - "weapon", - "archery", - "science", - "laboratory", - "investigate", - "signal", - "health", - "hospital", - "needle", - "medicine", - "wc", - "bath", - "toilet", - "cigarette", - "funeral", - "stone", - "accessibility", - "restroom", - "airport", - "limit", - "block", - "forbidden", - "return", - "sync", - "shuffle", - "loop", - "movie", - "wifi", - "confused", - "bang", - "environment", - "trademark", - "number", - "letters", - "numbers", - "alphabet", - "fresh", - "yes", - "help", - "milestone", - "finish", - "pride", - "keeling", - "ivory", - "china", - "flag", - "germany", - "spain", - "france", - "french", - "british", - "italy", - "japan", - "korea", - "burma", - "russia", - "turkey", - "united", - "america", - }, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/errors.go b/vendor/github.com/brianvoe/gofakeit/v6/data/errors.go deleted file mode 100644 index 75647cf81c9..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/errors.go +++ /dev/null @@ -1,122 +0,0 @@ -package data - -var Error = map[string][]string{ - "object": { - "argument", - "buffer", - "connection", - "database", - "header", - "hostname", - "method", - "object", - "parameter", - "pointer", - "port", - "protocol", - "request", - "response", - "server", - "service", - "signature", - "tag", - "undefined", - "url", - "uri", - "variable", - }, - "generic": { - "error", - "syntax error", - "requested {errorobject} is unavailable", - "failed to {hackerverb} {errorobject}", - "expected {errorobject} is undefined", - "[object Object]", - "no such variable", - "{errorobject} not initialized", - "variable assigned before declaration", - }, - "database": { - "sql error", - "database connection error", - "table does not exist", - "unique key constraint", - "table migration failed", - "bad connection", - "destination pointer is nil", - }, - "grpc": { - "connection refused", - "connection closed", - "connection is shut down", - "client protocol error", - }, - "http": { - "cross-origin-resource-policy error", - "feature not supported", - "trailer header without chunked transfer encoding", - "no multipart boundary param in Content-Type", - "request Content-Type isn't multipart/form-data", - "header too long", - "entity body too short", - "missing ContentLength in HEAD response", - "named cookie not present", - "invalid method", - "connection has been hijacked", - "request method or response status code does not allow body", - "wrote more than the declared Content-Length", - "{httpmethod} not allowed", - }, - "http_client": { // 400s - "bad request", // 400 - "unauthorized", // 401 - "payment required", // 402 - "forbidden", // 403 - "not found", // 404 - "method not allowed", // 405 - "not acceptable", // 406 - "proxy authentication required", // 407 - "request timeout", // 408 - "conflict", // 409 - "gone", // 410 - "length required", // 411 - "precondition failed", // 412 - "payload too large", // 413 - "URI too long", // 414 - "unsupported media type", // 415 - "range not satisfiable", // 416 - "expectation failed", // 417 - "im a teapot", // 418 - }, - "http_server": { // 500s - "internal server error", // 500 - "not implemented", // 501 - "bad gateway", // 502 - "service unavailable", // 503 - "gateway timeout", // 504 - "http version not supported", // 505 - "variant also negotiates", // 506 - "insufficient storage", // 507 - "loop detected", // 508 - "not extended", // 510 - "network authentication required", // 511 - }, - "runtime": { - "panic: runtime error: invalid memory address or nil pointer dereference", - "address out of bounds", - "undefined has no such property 'length'", - "not enough arguments", - "expected 2 arguments, got 3", - }, - "validation": { - "invalid format", - "missing required field", - "{inputname} is required", - "{inputname} max length exceeded", - "{inputname} must be at exactly 16 characters", - "{inputname} must be at exactly 32 bytes", - "failed to parse {inputname}", - "date is in the past", - "payment details cannot be verified", - }, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/files.go b/vendor/github.com/brianvoe/gofakeit/v6/data/files.go deleted file mode 100644 index 363b840017f..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/files.go +++ /dev/null @@ -1,7 +0,0 @@ -package data - -// Files consists of file information -var Files = map[string][]string{ - "mime_type": {"x-world/x-3dmf", "application/octet-stream", "application/x-authorware-bin", "application/x-authorware-map", "application/x-authorware-seg", "text/vnd.abc", "text/html", "video/animaflex", "application/postscript", "audio/aiff", "audio/x-aiff", "audio/aiff", "audio/x-aiff", "audio/aiff", "audio/x-aiff", "application/x-aim", "text/x-audiosoft-intra", "application/x-navi-animation", "application/x-nokia-9000-communicator-add-on-software", "application/mime", "application/octet-stream", "application/arj", "application/octet-stream", "image/x-jg", "video/x-ms-asf", "text/x-asm", "text/asp", "application/x-mplayer2", "video/x-ms-asf", "video/x-ms-asf-plugin", "audio/basic", "audio/x-au", "application/x-troff-msvideo", "video/avi", "video/msvideo", "video/x-msvideo", "video/avs-video", "application/x-bcpio", "application/mac-binary", "application/macbinary", "application/octet-stream", "application/x-binary", "application/x-macbinary", "image/bmp", "image/bmp", "image/x-windows-bmp", "application/book", "application/book", "application/x-bzip2", "application/x-bsh", "application/x-bzip", "application/x-bzip2", "text/plain", "text/x-c", "text/plain", "application/vnd.ms-pki.seccat", "text/plain", "text/x-c", "application/clariscad", "application/x-cocoa", "application/cdf", "application/x-cdf", "application/x-netcdf", "application/pkix-cert", "application/x-x509-ca-cert", "application/x-chat", "application/x-chat", "application/java", "application/java-byte-code", "application/x-java-class", "application/octet-stream", "text/plain", "text/plain", "application/x-cpio", "text/x-c", "application/mac-compactpro", "application/x-compactpro", "application/x-cpt", "application/pkcs-crl", "application/pkix-crl", "application/pkix-cert", "application/x-x509-ca-cert", "application/x-x509-user-cert", "application/x-csh", "text/x-script.csh", "application/x-pointplus", "text/css", "text/plain", "application/x-director", "application/x-deepv", "text/plain", "application/x-x509-ca-cert", "video/x-dv", "application/x-director", "video/dl", "video/x-dl", "application/msword", "application/msword", "application/commonground", "application/drafting", "application/octet-stream", "video/x-dv", "application/x-dvi", "drawing/x-dwf (old)", "model/vnd.dwf", "application/acad", "image/vnd.dwg", "image/x-dwg", "application/dxf", "image/vnd.dwg", "image/x-dwg", "application/x-director", "text/x-script.elisp", "application/x-bytecode.elisp (compiled elisp)", "application/x-elc", "application/x-envoy", "application/postscript", "application/x-esrehber", "text/x-setext", "application/envoy", "application/x-envoy", "application/octet-stream", "text/plain", "text/x-fortran", "text/x-fortran", "text/plain", "text/x-fortran", "application/vnd.fdf", "application/fractals", "image/fif", "video/fli", "video/x-fli", "image/florian", "text/vnd.fmi.flexstor", "video/x-atomic3d-feature", "text/plain", "text/x-fortran", "image/vnd.fpx", "image/vnd.net-fpx", "application/freeloader", "audio/make", "text/plain", "image/g3fax", "image/gif", "video/gl", "video/x-gl", "audio/x-gsm", "audio/x-gsm", "application/x-gsp", "application/x-gss", "application/x-gtar", "application/x-compressed", "application/x-gzip", "application/x-gzip", "multipart/x-gzip", "text/plain", "text/x-h", "application/x-hdf", "application/x-helpfile", "application/vnd.hp-hpgl", "text/plain", "text/x-h", "text/x-script", "application/hlp", "application/x-helpfile", "application/x-winhelp", "application/vnd.hp-hpgl", "application/vnd.hp-hpgl", "application/binhex", "application/binhex4", "application/mac-binhex", "application/mac-binhex40", "application/x-binhex40", "application/x-mac-binhex40", "application/hta", "text/x-component", "text/html", "text/html", "text/html", "text/webviewhtml", "text/html", "x-conference/x-cooltalk", "image/x-icon", "text/plain", "image/ief", "image/ief", "application/iges", "model/iges", "application/iges", "model/iges", "application/x-ima", "application/x-httpd-imap", "application/inf", "application/x-internett-signup", "application/x-ip2", "video/x-isvideo", "audio/it", "application/x-inventor", "i-world/i-vrml", "application/x-livescreen", "audio/x-jam", "text/plain", "text/x-java-source", "text/plain", "text/x-java-source", "application/x-java-commerce", "image/jpeg", "image/pjpeg", "image/jpeg", "image/jpeg", "image/pjpeg", "image/jpeg", "image/pjpeg", "image/jpeg", "image/pjpeg", "image/x-jps", "application/x-javascript", "image/jutvision", "audio/midi", "music/x-karaoke", "application/x-ksh", "text/x-script.ksh", "audio/nspaudio", "audio/x-nspaudio", "audio/x-liveaudio", "application/x-latex", "application/lha", "application/octet-stream", "application/x-lha", "application/octet-stream", "text/plain", "audio/nspaudio", "audio/x-nspaudio", "text/plain", "application/x-lisp", "text/x-script.lisp", "text/plain", "text/x-la-asf", "application/x-latex", "application/octet-stream", "application/x-lzh", "application/lzx", "application/octet-stream", "application/x-lzx", "text/plain", "text/x-m", "video/mpeg", "audio/mpeg", "video/mpeg", "audio/x-mpequrl", "application/x-troff-man", "application/x-navimap", "text/plain", "application/mbedlet", "application/mcad", "application/x-mathcad", "image/vasa", "text/mcf", "application/netmc", "application/x-troff-me", "message/rfc822", "message/rfc822", "application/x-midi", "audio/midi", "audio/x-mid", "audio/x-midi", "music/crescendo", "x-music/x-midi", "application/x-midi", "audio/midi", "audio/x-mid", "audio/x-midi", "music/crescendo", "x-music/x-midi", "application/x-frame", "application/x-mif", "message/rfc822", "www/mime", "video/x-motion-jpeg", "application/base64", "application/x-meme", "application/base64", "audio/mod", "audio/x-mod", "video/quicktime", "video/quicktime", "video/x-sgi-movie", "audio/mpeg", "audio/x-mpeg", "video/mpeg", "video/x-mpeg", "video/x-mpeq2a", "audio/mpeg3", "audio/x-mpeg-3", "video/mpeg", "video/x-mpeg", "audio/mpeg", "video/mpeg", "application/x-project", "video/mpeg", "video/mpeg", "audio/mpeg", "video/mpeg", "audio/mpeg", "application/vnd.ms-project", "application/x-project", "application/x-project", "application/x-project", "application/marc", "application/x-troff-ms", "video/x-sgi-movie", "audio/make", "application/x-vnd.audioexplosion.mzz", "image/naplps", "image/naplps", "application/x-netcdf", "application/vnd.nokia.configuration-message", "image/x-niff", "image/x-niff", "application/x-mix-transfer", "application/x-conference", "application/x-navidoc", "application/octet-stream", "application/oda", "application/x-omc", "application/x-omcdatamaker", "application/x-omcregerator", "text/x-pascal", "application/pkcs10", "application/x-pkcs10", "application/pkcs-12", "application/x-pkcs12", "application/x-pkcs7-signature", "application/pkcs7-mime", "application/x-pkcs7-mime", "application/pkcs7-mime", "application/x-pkcs7-mime", "application/x-pkcs7-certreqresp", "application/pkcs7-signature", "application/pro_eng", "text/pascal", "image/x-portable-bitmap", "application/vnd.hp-pcl", "application/x-pcl", "image/x-pict", "image/x-pcx", "chemical/x-pdb", "application/pdf", "audio/make", "audio/make.my.funk", "image/x-portable-graymap", "image/x-portable-greymap", "image/pict", "image/pict", "application/x-newton-compatible-pkg", "application/vnd.ms-pki.pko", "text/plain", "text/x-script.perl", "application/x-pixclscript", "image/x-xpixmap", "text/x-script.perl-module", "application/x-pagemaker", "application/x-pagemaker", "image/png", "application/x-portable-anymap", "image/x-portable-anymap", "application/mspowerpoint", "application/vnd.ms-powerpoint", "model/x-pov", "application/vnd.ms-powerpoint", "image/x-portable-pixmap", "application/mspowerpoint", "application/vnd.ms-powerpoint", "application/mspowerpoint", "application/powerpoint", "application/vnd.ms-powerpoint", "application/x-mspowerpoint", "application/mspowerpoint", "application/x-freelance", "application/pro_eng", "application/postscript", "application/octet-stream", "paleovu/x-pv", "application/vnd.ms-powerpoint", "text/x-script.phyton", "application/x-bytecode.python", "audio/vnd.qcelp", "x-world/x-3dmf", "x-world/x-3dmf", "image/x-quicktime", "video/quicktime", "video/x-qtc", "image/x-quicktime", "image/x-quicktime", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin", "audio/x-realaudio", "audio/x-pn-realaudio", "application/x-cmu-raster", "image/cmu-raster", "image/x-cmu-raster", "image/cmu-raster", "text/x-script.rexx", "image/vnd.rn-realflash", "image/x-rgb", "application/vnd.rn-realmedia", "audio/x-pn-realaudio", "audio/mid", "audio/x-pn-realaudio", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin", "application/ringing-tones", "application/vnd.nokia.ringing-tone", "application/vnd.rn-realplayer", "application/x-troff", "image/vnd.rn-realpix", "audio/x-pn-realaudio-plugin", "text/richtext", "text/vnd.rn-realtext", "application/rtf", "application/x-rtf", "text/richtext", "application/rtf", "text/richtext", "video/vnd.rn-realvideo", "text/x-asm", "audio/s3m", "application/octet-stream", "application/x-tbook", "application/x-lotusscreencam", "text/x-script.guile", "text/x-script.scheme", "video/x-scm", "text/plain", "application/sdp", "application/x-sdp", "application/sounder", "application/sea", "application/x-sea", "application/set", "text/sgml", "text/x-sgml", "text/sgml", "text/x-sgml", "application/x-bsh", "application/x-sh", "application/x-shar", "text/x-script.sh", "application/x-bsh", "application/x-shar", "text/html", "text/x-server-parsed-html", "audio/x-psid", "application/x-sit", "application/x-stuffit", "application/x-koan", "application/x-koan", "application/x-koan", "application/x-koan", "application/x-seelogo", "application/smil", "application/smil", "audio/basic", "audio/x-adpcm", "application/solids", "application/x-pkcs7-certificates", "text/x-speech", "application/futuresplash", "application/x-sprite", "application/x-sprite", "application/x-wais-source", "text/x-server-parsed-html", "application/streamingmedia", "application/vnd.ms-pki.certstore", "application/step", "application/sla", "application/vnd.ms-pki.stl", "application/x-navistyle", "application/step", "application/x-sv4cpio", "application/x-sv4crc", "image/vnd.dwg", "image/x-dwg", "application/x-world", "x-world/x-svr", "application/x-shockwave-flash", "application/x-troff", "text/x-speech", "application/x-tar", "application/toolbook", "application/x-tbook", "application/x-tcl", "text/x-script.tcl", "text/x-script.tcsh", "application/x-tex", "application/x-texinfo", "application/x-texinfo", "application/plain", "text/plain", "application/gnutar", "application/x-compressed", "image/tiff", "image/x-tiff", "image/tiff", "image/x-tiff", "application/x-troff", "audio/tsp-audio", "application/dsptype", "audio/tsplayer", "text/tab-separated-values", "image/florian", "text/plain", "text/x-uil", "text/uri-list", "text/uri-list", "application/i-deas", "text/uri-list", "text/uri-list", "application/x-ustar", "multipart/x-ustar", "application/octet-stream", "text/x-uuencode", "text/x-uuencode", "application/x-cdlink", "text/x-vcalendar", "application/vda", "video/vdo", "application/groupwise", "video/vivo", "video/vnd.vivo", "video/vivo", "video/vnd.vivo", "application/vocaltec-media-desc", "application/vocaltec-media-file", "audio/voc", "audio/x-voc", "video/vosaic", "audio/voxware", "audio/x-twinvq-plugin", "audio/x-twinvq", "audio/x-twinvq-plugin", "application/x-vrml", "model/vrml", "x-world/x-vrml", "x-world/x-vrt", "application/x-visio", "application/x-visio", "application/x-visio", "application/wordperfect6.0", "application/wordperfect6.1", "application/msword", "audio/wav", "audio/x-wav", "application/x-qpro", "image/vnd.wap.wbmp", "application/vnd.xara", "application/msword", "application/x-123", "windows/metafile", "text/vnd.wap.wml", "application/vnd.wap.wmlc", "text/vnd.wap.wmlscript", "application/vnd.wap.wmlscriptc", "application/msword", "application/wordperfect", "application/wordperfect", "application/wordperfect6.0", "application/wordperfect", "application/wordperfect", "application/x-wpwin", "application/x-lotus", "application/mswrite", "application/x-wri", "application/x-world", "model/vrml", "x-world/x-vrml", "model/vrml", "x-world/x-vrml", "text/scriplet", "application/x-wais-source", "application/x-wintalk", "image/x-xbitmap", "image/x-xbm", "image/xbm", "video/x-amt-demorun", "xgl/drawing", "image/vnd.xiff", "application/excel", "application/excel", "application/x-excel", "application/x-msexcel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/excel", "application/x-excel", "application/excel", "application/x-excel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/x-msexcel", "application/excel", "application/x-excel", "application/excel", "application/x-excel", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/x-msexcel", "audio/xm", "application/xml", "text/xml", "xgl/movie", "application/x-vnd.ls-xpix", "image/x-xpixmap", "image/xpm", "image/png", "video/x-amt-showrun", "image/x-xwd", "image/x-xwindowdump", "chemical/x-pdb", "application/x-compress", "application/x-compressed", "application/x-compressed", "application/x-zip-compressed", "application/zip", "multipart/x-zip", "application/octet-stream", "text/x-script.zsh"}, - "extension": {"doc", "docx", "log", "msg", "odt", "pages", "rtf", "tex", "txt", "wpd", "wps", "csv", "dat", "gbr", "ged", "key", "keychain", "pps", "ppt", "pptx", "sdf", "tar", "vcf", "xml", "aif", "iff", "mid", "mpa", "ra", "wav", "wma", "asf", "asx", "avi", "flv", "mov", "mpg", "rm", "srt", "swf", "vob", "wmv", "max", "obj", "bmp", "dds", "gif", "jpg", "png", "psd", "pspimage", "tga", "thm", "tif", "tiff", "yuv", "ai", "eps", "ps", "svg", "indd", "pct", "pdf", "xlr", "xls", "xlsx", "accdb", "db", "dbf", "mdb", "pdb", "sql", "apk", "app", "bat", "cgi", "com", "exe", "gadget", "jar", "pif", "vb", "wsf", "dem", "gam", "nes", "rom", "sav", "dwg", "dxf", "gpx", "kml", "kmz", "asp", "aspx", "cer", "cfm", "csr", "css", "htm", "html", "js", "jsp", "php", "rss", "xhtml", "crx", "plugin", "fnt", "fon", "otf", "ttf", "cab", "cpl", "cur", "deskthemepack", "dll", "dmp", "drv", "icns", "ico", "lnk", "sys", "cfg", "ini", "prf", "hqx", "mim", "uue", "cbr", "deb", "gz", "pkg", "rar", "rpm", "sitx", "gz", "zip", "zipx", "bin", "cue", "dmg", "iso", "mdf", "toast", "vcd", "class", "cpp", "cs", "dtd", "fla", "java", "lua", "pl", "py", "sh", "sln", "swift", "vcxproj", "xcodeproj", "bak", "tmp", "crdownload", "ics", "msi", "part", "torrent"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/food.go b/vendor/github.com/brianvoe/gofakeit/v6/data/food.go deleted file mode 100644 index 0726c17e9b0..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/food.go +++ /dev/null @@ -1,13 +0,0 @@ -package data - -// Food consists of food information -var Food = map[string][]string{ - "fruit": {"Apple", "Apricot", "Avocado", "Banana", "Bilberry", "Blackberry", "Blackcurrant", "Blueberry", "Currant", "Cherry", "Cherimoya", "Clementine", "Date", "Damson", "Durian", "Eggplant", "Elderberry", "Feijoa", "Gooseberry", "Grape", "Grapefruit", "Guava", "Huckleberry", "Jackfruit", "Jambul", "Kiwi", "Kumquat", "Legume", "Lemon", "Lime", "Lychee", "Mango", "Mangostine", "Melon", "Cantaloupe", "Honeydew", "Watermelon", "Rock melon", "Nectarine", "Orange", "Peach", "Pear", "Pitaya", "Physalis", "Plum", "Pineapple", "Pomegranate", "Raisin", "Raspberry", "Rambutan", "Redcurrant", "Satsuma", "Strawberry", "Tangerine", "Tomato", "Watermelon"}, - "vegetable": {"Amaranth Leaves", "Arrowroot", "Artichoke", "Arugula", "Asparagus", "Bamboo Shoots", "Beans, Green", "Beets", "Belgian Endive", "Bitter Melon*", "Bok Choy", "Broadbeans", "Broccoli", "Broccoli Rabe", "Brussel Sprouts", "Cabbage", "Carrot", "Cassava", "Cauliflower", "Celeriac", "Celery", "Chicory", "Collards", "Corn", "Crookneck", "Cucumber", "Daikon", "Dandelion Greens", "Eggplant", "Fennel", "Fiddleheads", "Ginger Root", "Horseradish", "Jicama", "Kale", "Kohlrabi", "Leeks", "Lettuce", "Mushrooms", "Mustard Greens", "Okra", "Onion", "Parsnip", "Peas", "Pepper", "Potato", "Pumpkin", "Radicchio", "Radishes", "Rutabaga", "Salsify", "Shallots", "Snow Peas", "Sorrel", "Soybeans", "Spaghetti Squash", "Spinach", "Squash", "Sugar Snap Peas", "Sweet Potato", "Swiss Chard", "Tomato", "Turnip", "Watercress", "Yam Root", "Zucchini"}, - "breakfast": {"berry cream cheese coffee cake", "broiled cinnamon toast", "breakfast casserole seasoned with country gravy", "mamas fruit cobbler", "shirleys plain or blueberry muffins", "toasted sunny side up egg and cheese sandwiches", "3 meat breakfast pizza", "moms cheat doughnuts", "old fashioned banana muffins", "blackberry breakfast bars", "pikelets australian pancakes", "pumpkin ginger scones with cinnamon chips", "tomato and mushroom omelette", "asparagus omelette wraps", "poached eggs technique", "scrambled egg sandwiches with onions and red peppers", "cheesecake kugel", "chicken and egg on rice oyako donburi", "bacon egg casserole", "ginger lemon muffins", "lizs morning glory muffins", "scrambled eggs oeufs brouills", "nats cucumber cream cheese bagel", "easy breakfast casserole", "6 week bran muffins auntie annes muffins", "awesome orange chocolate muffins", "baked swiss cheese omelet", "melt in your mouth blueberry muffins", "baked pears", "flaeskeaeggekage danish bacon egg pancake omelet", "sleepy twisted sisters g n g breakfast ramekin", "lemon buttercream pancakes with blueberries", "chef flowers simple sunday brunch omelette", "blueberry bakery muffins", "cardamom sour cream waffles", "sausage gravy for biscuits and gravy", "creamy scrambled eggs in the microwave", "english muffins with bacon butter", "original praline bacon recipe", "christmas caramel rolls easy", "blueberry banana happy face pancakes", "whole grain pancake mix", "fresh mango bread", "canadian bacon cheese omelet", "pumpkin french toast with toasted walnuts", "green mountain granola", "italian eggs with bacon", "a faster egg muffin", "country scrambled eggs", "everyday french breakfast baguette and jam with chocolate milk", "mexi eggs in a hole", "fruited irish oatmeal", "ham omelet deluxe", "danish bubble", "best buttermilk pancakes", "egg flowers", "vanilla fruit dip", "eggs in a basket", "grandmas swedish thin pancakes", "cinnamon maple granola", "wake up stuffed french breakfast panini", "quinoa muffins", "grilled cheese on raisin bread", "castillian hot chocolate", "banana blueberry oatmeal bread", "caramel pull aparts", "purple cow", "chili jack oven omelet", "cheery cherry muffins", "israeli breakfast salad", "muffin toppings", "migas lite for 2", "easy danish kringle", "oatmeal cookie granola"}, - "lunch": {"no bake hersheys bar pie", "worm sandwiches", "quesadillas for one or two", "pearls sesame noodles", "patty melt", "fresh tomato sandwiches saturday lunch on longmeadow farm", "onion burgers by john t edge the longmeadow farm", "fresh tomato and cucumber salad", "hoisin marinated wing pieces", "feta marinated", "spicy roasted butternut seeds pumpkin seeds", "honey chipotle pecans", "baked ham glazed with pineapple and chipotle peppers", "reuben sandwich our way", "toasted sunny side up egg and cheese sandwiches", "mrs allens date loaf", "3 meat breakfast pizza", "body and soul health muffins", "grilled blue cheese burgers", "kittencals beef burritos", "spinach and mandarin orange salad", "coconut pound cake", "scallop saute", "open faced crab sandwiches", "the traditional cyprus sandwich with halloumi onions and tomato", "toasted ham and cheese supreme", "scrambled egg sandwiches with onions and red peppers", "cucumber open faced sandwiches", "chicken and egg on rice oyako donburi", "blt sandwich", "grilled chicken pesto panini", "mushroom and chicken grilled quesadillas", "delicious cheesy bacon and green onion potato skins", "grilled chili lime chicken", "fried almonds", "the greatful bread sandwich", "egg salad club sandwiches or shrimp salad club", "nifs peanut butter banana muffins", "parmesan fish in the oven", "caramelized onion focaccia bread machine", "nats cucumber cream cheese bagel", "chicken with cashews", "lemon parsley popcorn", "not your ordinary chocolate chip cookies liqueur laced", "katos tasty salmon cream cheese surprise", "greek inspired salad", "tomato basil american cheese sandwich", "club sandwich", "bacon and egg salad sandwiches", "apple cheese bites", "two cheese panini with tomato olive pesto", "delicious and simple fruit dip", "tex mex 7 layer salad", "grilled peanut butter and jelly sandwich", "simply simple cucumber slices in vinegar dressing longmeadow", "ww greek inspired scrambled egg wraps", "baby greens with mustard vinaigrette", "patty melts", "ribs", "chocolate angel food cake", "spinach with lemon garlic", "green goddess dressing", "leftover rice muffins", "cajun garlic fingers", "fresh mango bread", "california crab salad", "hot salty nuts", "beef for tacos", "hidden valley wraps", "omas boterkoek dutch buttercake", "apple butterflies", "don t burn your fingers garlic bread", "beer wisconsin bratwurst", "salmon with bourbon and brown sugar glaze", "lemon coconut muffins", "the godfather of grilled cheese sandwiches", "green mountain granola", "tuna red onion and parsley salad", "tortellini skewers", "italian meatball hoagies", "crispy fried chicken spring rolls", "rotisserie style chicken in the crock pot", "creamed peas on toast", "bergy dim sum 5 steamed shrimp dumplings", "chocolate almond roca bar", "number 400 seafood casserole", "chocolate rainbow krispies treats", "spinach salad with blue cheese", "hash", "fake crab salad sandwiches", "guacamole stuffed deviled eggs", "weight watchers veggie barley soup 1 pt for 1 cup", "hummus with a twist", "bellissimo panini", "carls jr western bacon cheeseburger copycat by todd wilbur", "salami havarti and cole slaw sandwiches", "garlic herbed roasted red skin potatoes", "grilled cheese on raisin bread", "hearty grilled cheese", "italian deli wraps", "strammer max german warm sandwich", "quick elephant ears", "salata marouli romaine lettuce salad", "goat cheese black olive mashed potatoes", "tomato cucumber avocado sandwich", "purple cow", "chocolate coconut dream bars", "homemade popsicles", "ginger soy salmon", "sweet and sour pork balls", "spicy chicken soup with hints of lemongrass and coconut milk", "another buffalo wings recipe", "famous white wings", "amazing sweet italian sausage pasta soup", "sausage sandwich italian style", "copycat taco bell chicken enchilada bowl", "simple pan fried chicken breasts", "1 2 3 black bean salsa dip", "quick chile relleno casserole", "bacon spaghetti squash", "fantastic banana bran muffins", "garbanzo vegetarian burgers", "mediterranean tuna stuffed tomato", "sugared cinnamon almonds", "queen margherita pizza", "insanely easy chickpea salad", "habit forming shrimp dip", "turkey swiss panini", "pumpkin chocolate chip muffins", "grilled havarti and avocado sandwiches", "english muffin pizzas", "oatmeal cookie granola"}, - "dinner": {"kittencals caesar tortellini salad", "no bake hersheys bar pie", "lindas special potato salad", "kittencals parmesan orzo", "pearls sesame noodles", "roasted potatoes and green beans", "kittencals really great old fashioned lemonade", "lindas chunky garlic mashed potatoes", "kittencals pan fried asparagus", "cafe mocha latte", "fresh tomato and cucumber salad", "peanut butter gooey cake", "foolproof standing prime rib roast paula deen", "mamas fruit cobbler", "hoisin marinated wing pieces", "feta marinated", "the realtors cream cheese corn", "savory pita chips", "jalapeno pepper jelly chicken", "kashmir lamb with spinach", "oven fried zucchini sticks", "best ever bruschetta", "maple cinnamon coffee", "kick a fried onion rings", "guava mojito", "confit d oignon french onion marmalade", "flounder stuffed with shrimp and crabmeat", "mrs allens date loaf", "swedish cucumber salad pressgurka", "authentic pork lo mein chinese", "golden five spice sticky chicken", "basil tomato salad", "white chocolate cheesecake", "celery and blue cheese salad", "kittencals crock pot french dip roast", "lindas asian salmon", "spinach and mandarin orange salad", "coconut pound cake", "scallop saute", "spicy catfish tenders with cajun tartar sauce", "just like deweys candied walnut and grape salad", "strawberry pavlova", "grilled pork chops with lime cilantro garlic", "smoky barbecue beef brisket crock pot", "quick and easy chicken in cream sauce", "fried chorizo with garlic", "cucumber open faced sandwiches", "rachael rays mimosa", "tortellini bow tie pasta salad", "tonkatsu japanese pork cutlet", "mushroom and chicken grilled quesadillas", "delicious cheesy bacon and green onion potato skins", "roasted beet salad with horseradish cream dressing", "islands bananas foster", "apricot glazed roasted asparagus low fat", "frozen kahlua creme", "fried almonds", "just peachy grillin ribs rsc", "death by chocolate cake", "parmesan fish in the oven", "calico peas", "creamy cucumber dill dip", "emerils stewed black eyed peas", "german style eiskaffee iced coffee drink", "strawberry angel trifle", "spinach salad with feta cheese", "french napoleons", "ultimate crab and spinach manicotti with parmesan cheese sauce", "sweet and sour stir fry shrimp with broccoli and red bell pepper", "crispy noodle salad with sweet and sour dressing", "crunchy rosemary potatoes", "roasted cherry or grape tomatoes", "blackened skillet shrimp", "parslied new potatoes", "tropical baked chicken", "sweet and sour kielbasa kabobs", "fantastic mushrooms with garlic butter and parmesan", "asparagus with lemon butter crumbs", "creamy garlic prawns", "kittencals banana almond muffins with almond streusel", "ww shrimp scampi", "kittencals tender microwave corn with husks on", "nude beach", "kittencals greek garden salad with greek style dressing", "roasted broccoli with cherry tomatoes", "kittencals chicken cacciatore", "buttermilk mashed potatoes with country mustard", "tilapia in thai sauce", "cream cheese potato soup", "brown sugar roasted salmon with maple mustard dill sauce", "baby greens with mustard vinaigrette", "ribs", "new england roasted cornish game hens", "chocolate angel food cake", "creamy strawberries", "spinach with lemon garlic", "green goddess dressing", "jamaican pork tenderloin", "awesome twice baked potatoes", "sausage mushroom appetizers", "roasted garlic soup with parmesan", "crushed red potatoes with garlic", "15 minute no fry chicken enchiladas honest", "uncle bills caesar canadian style", "raspberry cranberry salad with sour cream cream cheese topping", "hot salty nuts", "acorn squash for 2", "pumpkin knot yeast rolls", "caramelized onion dip spread", "roasted asparagus with sage and lemon butter", "spanish garlic shrimp taverna", "baby greens with pears gorgonzola and pecans", "grilled or baked salmon with lavender", "ruth walls german apple cake", "healthy italian breadsticks or pizza crust", "strawberry and cream cheese parfait", "marinated grilled tuna steak", "kittencals extra crispy fried chicken breast", "de constructed chicken cordon bleu", "moroccan cinnamon coffee with orange flower water", "lemon and parsley potatoes", "bergy dim sum 5 steamed shrimp dumplings", "chocolate almond roca bar", "garlic mashed potatoes and cashew gravy", "number 400 seafood casserole", "sherry buttered shrimp", "spinach salad with blue cheese", "cookie monster fruit salad", "asian broccoli salad", "pink poodle", "butterflied leg of lamb with lots of garlic and rosemary", "gorgonzola and toasted walnut salad", "maple coffee", "chocolate chip bundt cake with chocolate glaze", "crock pot caramelized onion pot roast", "mashed potatoes with bacon and cheddar", "provencal olives", "creole potato salad", "wild addicting dip", "baby shower pink cloud punch", "i did it my way tossed salad", "lubys cafeteria butternut brownie pie", "spiced poached pears", "lemon cajun stir fry", "iced banana cream", "potato ham onion chipotle soup", "chicken and penne casserole", "kahlua hot chocolate", "chicken and yoghurt curry", "oriental asparagus and mushrooms", "guacamole stuffed deviled eggs", "orzo with tomatoes feta and green onions", "kathy dessert baked bananas zwt ii asia", "hummus with pine nuts turkish style", "caramel delight", "whipped cream cream cheese frosting", "broccoli and cranberry salad", "raspberry lemonade", "pan broiled steak with whiskey sauce", "t g i fridays mudslide", "herb crusted fish fillets", "agua de valencia knock your socks off spanish cava punch", "orange brownie", "jiffy punch", "steak balmoral and whisky sauce from the witchery by the castle", "julies alabama white sauce", "ww potato gratin 5 points", "bo kaap cape malay curry powder south african spice mixture", "garlic herbed roasted red skin potatoes", "tasty broccoli salad", "risotto with pesto and mascarpone", "red potato and green bean saute", "caribbean sunset", "sriracha honey roasted broccoli", "salata marouli romaine lettuce salad", "goat cheese black olive mashed potatoes", "swirled cranberry cheesecake", "curried pea soup", "long island iced tea applebees tgi fridays style", "chocolate coconut dream bars", "bbq salmon filet", "blue margaritas", "sweet and sour pork balls", "spanish shrimp", "orange glazed pork chops", "heavenly lemon bread pudding", "spicy chicken soup with hints of lemongrass and coconut milk", "sweet onion and mashed potato bake", "smoky clam chowder", "cornish game hens with peach glaze", "garlic prime rib", "german apple cake with cream cheese frosting", "amazing sweet italian sausage pasta soup", "fresh orange slices with honey and cinnamon", "blackened tuna bites with cajun mustard", "tuna cobb salad", "greek shrimp with rigatoni", "creamy beet salad", "caponata eggplant and lots of good things", "lemon and oregano lamb loin chops", "pork chops with apples stuffing", "bacon spaghetti squash", "layered bean taco dip", "creamy lemon tarts", "strawberry and baileys fool", "italian style roast", "sourdough rosemary potato bread", "cracker barrel baby carrots", "portuguese tomato rice", "chocolate covered dipped strawberries", "caf a la russe chocolate coffee", "herbed potato with cottage cheese", "your basic tossed salad", "panzanella salad with bacon tomato and basil"}, - "drink": {"water", "tea", "milk", "juice", "coffee", "soda", "smoothie", "beer", "wine"}, - "snack": {"hoisin marinated wing pieces", "feta marinated", "spicy roasted butternut seeds pumpkin seeds", "honey chipotle pecans", "best ever bruschetta", "body and soul health muffins", "kittencals beef burritos", "the traditional cyprus sandwich with halloumi onions and tomato", "delicious cheesy bacon and green onion potato skins", "fried almonds", "nifs peanut butter banana muffins", "lemon parsley popcorn", "not your ordinary chocolate chip cookies liqueur laced", "delicious and simple fruit dip", "fresh mango bread", "hot salty nuts", "omas boterkoek dutch buttercake", "apple butterflies", "lemon coconut muffins", "green mountain granola", "crispy fried chicken spring rolls", "guacamole stuffed deviled eggs", "hummus with a twist", "quick elephant ears", "homemade popsicles", "1 2 3 black bean salsa dip", "fantastic banana bran muffins", "sugared cinnamon almonds", "pumpkin chocolate chip muffins", "oatmeal cookie granola"}, - "dessert": {"no bake hersheys bar pie", "big ol cowboy cookies", "crackle top molasses cookies", "old fashion oatmeal pie", "cranberry nut swirls", "butter balls", "peanut butter gooey cake", "mamas fruit cobbler", "pink stuff cherry pie filling pineapple dessert", "chocolate star cookies", "midsummer swedish strawberry compote jordgubbskrm", "foolproof one bowl banana cake", "creamy apple dessert", "walnut chews", "yummy bread pudding", "white chocolate cheesecake", "hersheys kiss peanut butter cookies", "coconut pound cake", "frosted rhubarb cookies", "strawberry pavlova", "cookies n cream ice cream", "perfect pumpkin pie", "gluten free dutch sugar cookies", "raw apple crumble no bake", "cheesecake kugel", "moo less chocolate pie", "chocolate macadamia nut brownies", "disneyland snickerdoodles", "islands bananas foster", "frozen kahlua creme", "nifs peanut butter banana muffins", "peach cobbler with oatmeal cookie topping", "christmas cardamom butter cookies", "death by chocolate cake", "moms southern pecan pie", "the best brownies ever", "jerrys chocolate ice cream", "strawberry angel trifle", "zucchini mock apple pie", "low fat chocolate peanut butter dessert", "creamy raspberry mallow pie", "french napoleons", "pie crust cinnamon rolls", "not your ordinary chocolate chip cookies liqueur laced", "foolproof dark chocolate fudge", "whole wheat sugar cookies", "awesome kahlua cake", "up those antioxidants with blueberry sauce", "grammie millers swedish apple pie", "glendas flourless peanut butter cookies", "my best banana pudding dessert", "viskos praline sauce", "perfect purple punch", "reindeer bark", "lindas bloodshot eyeballs", "moroccan fruit salad", "apple dumpling bake", "simons pumpkin bread pudding", "baileys flourless peanut butter cookies", "a 1 cherry cobbler tart a1", "monkey balls", "chocolate angel food cake", "creamy strawberries", "harvest cake", "deep dark chocolate moist cake", "spooktacular halloween graveyard cake", "cream cheese walnut drop cookies", "omas boterkoek dutch buttercake", "kates basic crepes", "banana spice bars", "ruth walls german apple cake", "low fat low cholesterol chocolate cake cupcakes", "lower fat peanut butter rice krispies bars", "nutella rolls", "fruit salad pudding", "strawberry and cream cheese parfait", "apple dessert quick", "betty crocker chocolate chip cookies 1971 mens favorites 22", "so there reeses peanut butter bars", "moms buttery apple cake", "chocolate almond roca bar", "turtles", "sesame toffee", "chocolate rainbow krispies treats", "dirt cups for kids", "ultimate seven layer bars", "raisin oat cookies", "snickers bar cookies", "french pie pastry", "sour cream pumpkin bundt cake", "microwave nut brittle", "cinnamon rolls buns", "nutella mousse", "blueberry sour cream cake", "angelic strawberry frozen yogurt", "chocolate chip bundt cake with chocolate glaze", "creole cake", "apricot banana squares", "banana snack cake with delicious cream cheese frosting", "pineapple coconut empanadas", "awesome chocolate butterscotch chip cookies", "easy homemade almond roca", "sonic strawberry cheesecake shake", "lubys cafeteria butternut brownie pie", "spiced poached pears", "chocolate mocha pudding low carb", "iced banana cream", "kathy dessert baked bananas zwt ii asia", "whipped cream cream cheese frosting", "italian biscotti al la syd", "died and went to heaven chocolate cake diabetic version", "coffee and chocolate pudding", "mimis maine blueberry cobbler", "cherry cola float", "linzer bars", "confectioners sugar cookies", "double chocolate mint chip cookies", "quick elephant ears", "swirled cranberry cheesecake", "mexican rice pudding", "eclair torte", "spiced pumpkin pie", "caramel breakfast cake", "lime granita", "chocolate coconut dream bars", "blueberry banana pie", "grannys gingersnaps", "homemade popsicles", "heavenly lemon bread pudding", "pizzelles", "mckinley tea cakes", "lazy day cobbler", "old school deja vu chocolate peanut butter squares", "cheesecake pie", "aunt zanas amish sugar cookies eggless", "amish cream pie", "chocolate chip cookie dough ice cream", "snickerdoodles dream", "chocolate cheese fudge", "german apple cake with cream cheese frosting", "fresh orange slices with honey and cinnamon", "frozen oreo cookie dessert", "blueberry crunch", "amaretto bon bon balls", "red cherry pie", "creamy lemon tarts", "brownie truffles", "strawberry and baileys fool", "easy danish kringle", "chocolate covered dipped strawberries", "caf a la russe chocolate coffee"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/hacker.go b/vendor/github.com/brianvoe/gofakeit/v6/data/hacker.go deleted file mode 100644 index 08a5f86ad52..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/hacker.go +++ /dev/null @@ -1,20 +0,0 @@ -package data - -// Hacker consists of random hacker phrases -var Hacker = map[string][]string{ - "abbreviation": {"TCP", "HTTP", "SDD", "RAM", "GB", "CSS", "SSL", "AGP", "SQL", "FTP", "PCI", "AI", "ADP", "RSS", "XML", "EXE", "COM", "HDD", "THX", "SMTP", "SMS", "USB", "PNG", "SAS", "IB", "SCSI", "JSON", "XSS", "JBOD"}, - "adjective": {"auxiliary", "primary", "back-end", "digital", "open-source", "virtual", "cross-platform", "redundant", "online", "haptic", "multi-byte", "bluetooth", "wireless", "1080p", "neural", "optical", "solid state", "mobile"}, - "noun": {"driver", "protocol", "bandwidth", "panel", "microchip", "program", "port", "card", "array", "interface", "system", "sensor", "firewall", "hard drive", "pixel", "alarm", "feed", "monitor", "application", "transmitter", "bus", "circuit", "capacitor", "matrix"}, - "verb": {"back up", "bypass", "hack", "override", "compress", "copy", "navigate", "index", "connect", "generate", "quantify", "calculate", "synthesize", "input", "transmit", "program", "reboot", "parse", "read", "write", "load", "render", "validate", "verify", "sign", "decrypt", "encrypt", "construct", "deconstruct", "compile", "transpile", "bundle", "lock", "unlock", "buffer", "format"}, - "ingverb": {"backing up", "bypassing", "hacking", "overriding", "compressing", "copying", "navigating", "indexing", "connecting", "generating", "quantifying", "calculating", "synthesizing", "transmitting", "programming", "parsing"}, - "phrase": { - "If we {hackerverb} the {hackernoun}, we can get to the {hackerabbreviation} {hackernoun} through the {hackeradjective} {hackerabbreviation} {hackernoun}!", - "We need to {hackerverb} the {hackeradjective} {hackerabbreviation} {hackernoun}!", - "Try to {hackerverb} the {hackerabbreviation} {hackernoun}, maybe it will {hackerverb} the {hackeradjective} {hackernoun}!", - "You can't {hackerverb} the {hackernoun} without {hackeringverb} the {hackeradjective} {hackerabbreviation} {hackernoun}!", - "Use the {hackeradjective} {hackerabbreviation} {hackernoun}, then you can {hackerverb} the {hackeradjective} {hackernoun}!", - "The {hackerabbreviation} {hackernoun} is down, {hackerverb} the {hackeradjective} {hackernoun} so we can {hackerverb} the {hackerabbreviation} {hackernoun}!", - "{hackeringverb} the {hackernoun} won't do anything, we need to {hackerverb} the {hackeradjective} {hackerabbreviation} {hackernoun}!", - "I'll {hackerverb} the {hackeradjective} {hackerabbreviation} {hackernoun}, that should {hackerverb} the {hackerabbreviation} {hackernoun}!", - }, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/hipster.go b/vendor/github.com/brianvoe/gofakeit/v6/data/hipster.go deleted file mode 100644 index f036f4639bc..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/hipster.go +++ /dev/null @@ -1,6 +0,0 @@ -package data - -// Hipster consists of random hipster words -var Hipster = map[string][]string{ - "word": {"Wes Anderson", "chicharrones", "narwhal", "food truck", "marfa", "aesthetic", "keytar", "art party", "sustainable", "forage", "mlkshk", "gentrify", "locavore", "swag", "hoodie", "microdosing", "VHS", "before they sold out", "pabst", "plaid", "Thundercats", "freegan", "scenester", "hella", "occupy", "truffaut", "raw denim", "beard", "post-ironic", "photo booth", "twee", "90's", "pitchfork", "cray", "cornhole", "kale chips", "pour-over", "yr", "five dollar toast", "kombucha", "you probably haven't heard of them", "mustache", "fixie", "try-hard", "franzen", "kitsch", "austin", "stumptown", "keffiyeh", "whatever", "tumblr", "DIY", "shoreditch", "biodiesel", "vegan", "pop-up", "banjo", "kogi", "cold-pressed", "letterpress", "chambray", "butcher", "synth", "trust fund", "hammock", "farm-to-table", "intelligentsia", "loko", "ugh", "offal", "poutine", "gastropub", "Godard", "jean shorts", "sriracha", "dreamcatcher", "leggings", "fashion axe", "church-key", "meggings", "tote bag", "disrupt", "readymade", "helvetica", "flannel", "meh", "roof", "hashtag", "knausgaard", "cronut", "schlitz", "green juice", "waistcoat", "normcore", "viral", "ethical", "actually", "fingerstache", "humblebrag", "deep v", "wayfarers", "tacos", "taxidermy", "selvage", "put a bird on it", "ramps", "portland", "retro", "kickstarter", "bushwick", "brunch", "distillery", "migas", "flexitarian", "XOXO", "small batch", "messenger bag", "heirloom", "tofu", "bicycle rights", "bespoke", "salvia", "wolf", "selfies", "echo", "park", "listicle", "craft beer", "chartreuse", "sartorial", "pinterest", "mumblecore", "kinfolk", "vinyl", "etsy", "umami", "8-bit", "polaroid", "banh mi", "crucifix", "bitters", "brooklyn", "PBR&B", "drinking", "vinegar", "squid", "tattooed", "skateboard", "vice", "authentic", "literally", "lomo", "celiac", "health", "goth", "artisan", "chillwave", "blue bottle", "pickled", "next level", "neutra", "organic", "Yuccie", "paleo", "blog", "single-origin coffee", "seitan", "street", "gluten-free", "mixtape", "venmo", "irony", "everyday", "carry", "slow-carb", "3 wolf moon", "direct trade", "lo-fi", "tousled", "tilde", "semiotics", "cred", "chia", "master", "cleanse", "ennui", "quinoa", "pug", "iPhone", "fanny pack", "cliche", "cardigan", "asymmetrical", "meditation", "YOLO", "typewriter", "pork belly", "shabby chic", "+1", "lumbersexual", "williamsburg"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/html.go b/vendor/github.com/brianvoe/gofakeit/v6/data/html.go deleted file mode 100644 index 5787edd8ae3..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/html.go +++ /dev/null @@ -1,7 +0,0 @@ -package data - -// Html consists of various html information -var Html = map[string][]string{ - "svg": {"rect", "circle", "ellipse", "line", "polyline", "polygon"}, - "input_name": {"title", "first_name", "last_name", "suffix", "address", "postal_code", "city", "state", "country", "date_of_birth", "card_number", "description", "message", "status"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/internet.go b/vendor/github.com/brianvoe/gofakeit/v6/data/internet.go deleted file mode 100644 index ae7561af91f..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/internet.go +++ /dev/null @@ -1,11 +0,0 @@ -package data - -// Internet consists of various internet information -var Internet = map[string][]string{ - "browser": {"firefox", "chrome", "internetExplorer", "opera", "safari"}, - "domain_suffix": {"com", "biz", "info", "name", "net", "org", "io"}, - "http_method": {"HEAD", "GET", "POST", "PUT", "PATCH", "DELETE"}, - "http_version": {"HTTP/1.0", "HTTP/1.1", "HTTP/2.0"}, - "http_status_simple": {"200", "301", "302", "400", "404", "500"}, - "http_status_general": {"100", "200", "201", "203", "204", "205", "301", "302", "304", "400", "401", "403", "404", "405", "406", "416", "500", "501", "502", "503", "504"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/job.go b/vendor/github.com/brianvoe/gofakeit/v6/data/job.go deleted file mode 100644 index 905dd74ee02..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/job.go +++ /dev/null @@ -1,8 +0,0 @@ -package data - -// Job consists of job data -var Job = map[string][]string{ - "title": {"Administrator", "Agent", "Analyst", "Architect", "Assistant", "Associate", "Consultant", "Coordinator", "Designer", "Developer", "Director", "Engineer", "Executive", "Facilitator", "Liaison", "Manager", "Officer", "Orchestrator", "Planner", "Producer", "Representative", "Specialist", "Strategist", "Supervisor", "Technician"}, - "descriptor": {"Central", "Chief", "Corporate", "Customer", "Direct", "District", "Dynamic", "Dynamic", "Forward", "Future", "Global", "Human", "Internal", "International", "Investor", "Lead", "Legacy", "National", "Principal", "Product", "Regional", "Senior"}, - "level": {"Accountability", "Accounts", "Applications", "Assurance", "Brand", "Branding", "Communications", "Configuration", "Creative", "Data", "Directives", "Division", "Factors", "Functionality", "Group", "Identity", "Implementation", "Infrastructure", "Integration", "Interactions", "Intranet", "Marketing", "Markets", "Metrics", "Mobility", "Operations", "Optimization", "Paradigm", "Program", "Quality", "Research", "Response", "Security", "Solutions", "Tactics", "Usability", "Web"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/languages.go b/vendor/github.com/brianvoe/gofakeit/v6/data/languages.go deleted file mode 100644 index 5fdfc9e6fe6..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/languages.go +++ /dev/null @@ -1,9 +0,0 @@ -package data - -// Languages consists of address information -var Languages = map[string][]string{ - "short": {"aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cv", "cy", "da", "de", "dv", "dz", "ee", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "ne", "ng", "nl", "no", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"}, - "long": {"Afar", "Abkhazian", "Avestan", "Afrikaans", "Akan", "Amharic", "Aragonese", "Arabic", "Assamese", "Avaric", "Aymara", "Azerbaijani", "Bashkir", "Belarusian", "Bulgarian", "Bihari", "Bislama", "Bambara", "Bengali", "Tibetan", "Breton", "Bosnian", "Catalan", "Chechen", "Chamorro", "Corsican", "Cree", "Czech", "Chuvash", "Welsh", "Danish", "German", "Divehi", "Dzongkha", "Ewe", "English", "Esperanto", "Spanish", "Estonian", "Basque", "Persian", "Fulah", "Finnish", "Fijian", "Faroese", "French", "Western Frisian", "Irish", "Gaelic", "Galician", "Guarani", "Gujarati", "Manx", "Hausa", "Hebrew", "Hindi", "Hiri Motu", "Croatian", "Haitian", "Hungarian", "Armenian", "Herero", "Interlingua", "Indonesian", "Interlingue", "Igbo", "Sichuan Yi", "Inupiaq", "Ido", "Icelandic", "Italian", "Inuktitut", "Japanese", "Javanese", "Georgian", "Kongo", "Kikuyu", "Kuanyama", "Kazakh", "Kalaallisut", "Central Khmer", "Kannada", "Korean", "Kanuri", "Kashmiri", "Kurdish", "Komi", "Cornish", "Kirghiz", "Latin", "Luxembourgish", "Ganda", "Limburgan", "Lingala", "Lao", "Lithuanian", "Luba-Katanga", "Latvian", "Malagasy", "Marshallese", "Maori", "Macedonian", "Malayalam", "Mongolian", "Marathi", "Malay", "Maltese", "Burmese", "Nauru", "Nepali", "Ndonga", "Dutch", "Norwegian", "Navajo", "Chichewa", "Occitan", "Ojibwa", "Oromo", "Oriya", "Ossetian", "Panjabi", "Pali", "Polish", "Pushto", "Portuguese", "Quechua", "Romansh", "Rundi", "Romanian", "Russian", "Kinyarwanda", "Sanskrit", "Sardinian", "Sindhi", "Northern Sami", "Sango", "Sinhala", "Slovak", "Slovenian", "Samoan", "Shona", "Somali", "Albanian", "Serbian", "Swati", "Sotho", "Sundanese", "Swedish", "Swahili", "Tamil", "Telugu", "Tajik", "Thai", "Tigrinya", "Turkmen", "Tagalog", "Tswana", "Tonga", "Turkish", "Tsonga", "Tatar", "Twi", "Tahitian", "Uighur", "Ukrainian", "Urdu", "Uzbek", "Venda", "Vietnamese", "Walloon", "Wolof", "Xhosa", "Yiddish", "Yoruba", "Zhuang", "Chinese", "Zulu"}, - "bcp": {"ar-SA", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-AU", "en-GB", "en-IE", "en-US", "en-ZA", "es-ES", "es-MX", "fi-FI", "fr-CA", "fr-FR", "he-IL", "hi-IN", "hu-HU", "id-ID", "it-IT", "ja-JP", "ko-KR", "nl-BE", "nl-NL", "no-NO", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sv-SE", "th-TH", "tr-TR", "zh-CN", "zh-HK", "zh-TW"}, - "programming": {"A# .NET", "A# (Axiom)", "A-0 System", "A+", "A++", "ABAP", "ABC", "ABC ALGOL", "ABLE", "ABSET", "ABSYS", "ACC", "Accent", "Ace DASL", "ACL2", "ACT-III", "Action!", "ActionScript", "Ada", "Adenine", "Agda", "Agilent VEE", "Agora", "AIMMS", "Alef", "ALF", "ALGOL 58", "ALGOL 60", "ALGOL 68", "ALGOL W", "Alice", "Alma-0", "AmbientTalk", "Amiga E", "AMOS", "AMPL", "APL", "App Inventor for Android's visual block language", "AppleScript", "Arc", "ARexx", "Argus", "AspectJ", "Assembly language", "ATS", "Ateji PX", "AutoHotkey", "Autocoder", "AutoIt", "AutoLISP / Visual LISP", "Averest", "AWK", "Axum", "B", "Babbage", "Bash", "BASIC", "bc", "BCPL", "BeanShell", "Batch (Windows/Dos)", "Bertrand", "BETA", "Bigwig", "Bistro", "BitC", "BLISS", "Blue", "Bon", "Boo", "Boomerang", "Bourne shell", "bash", "ksh", "BREW", "BPEL", "C", "C--", "C++", "C#", "C/AL", "Caché ObjectScript", "C Shell", "Caml", "Candle", "Cayenne", "CDuce", "Cecil", "Cel", "Cesil", "Ceylon", "CFEngine", "CFML", "Cg", "Ch", "Chapel", "CHAIN", "Charity", "Charm", "Chef", "CHILL", "CHIP-8", "chomski", "ChucK", "CICS", "Cilk", "CL", "Claire", "Clarion", "Clean", "Clipper", "CLIST", "Clojure", "CLU", "CMS-2", "COBOL", "Cobra", "CODE", "CoffeeScript", "Cola", "ColdC", "ColdFusion", "COMAL", "Combined Programming Language", "COMIT", "Common Intermediate Language", "Common Lisp", "COMPASS", "Component Pascal", "Constraint Handling Rules", "Converge", "Cool", "Coq", "Coral 66", "Corn", "CorVision", "COWSEL", "CPL", "csh", "CSP", "Csound", "CUDA", "Curl", "Curry", "Cyclone", "Cython", "D", "DASL", "DASL", "Dart", "DataFlex", "Datalog", "DATATRIEVE", "dBase", "dc", "DCL", "Deesel", "Delphi", "DCL", "DinkC", "DIBOL", "Dog", "Draco", "DRAKON", "Dylan", "DYNAMO", "E", "E#", "Ease", "Easy PL/I", "Easy Programming Language", "EASYTRIEVE PLUS", "ECMAScript", "Edinburgh IMP", "EGL", "Eiffel", "ELAN", "Elixir", "Elm", "Emacs Lisp", "Emerald", "Epigram", "EPL", "Erlang", "es", "Escapade", "Escher", "ESPOL", "Esterel", "Etoys", "Euclid", "Euler", "Euphoria", "EusLisp Robot Programming Language", "CMS EXEC", "EXEC 2", "Executable UML", "F", "F#", "Factor", "Falcon", "Fancy", "Fantom", "FAUST", "Felix", "Ferite", "FFP", "Fjölnir", "FL", "Flavors", "Flex", "FLOW-MATIC", "FOCAL", "FOCUS", "FOIL", "FORMAC", "@Formula", "Forth", "Fortran", "Fortress", "FoxBase", "FoxPro", "FP", "FPr", "Franz Lisp", "F-Script", "FSProg", "G", "Google Apps Script", "Game Maker Language", "GameMonkey Script", "GAMS", "GAP", "G-code", "Genie", "GDL", "Gibiane", "GJ", "GEORGE", "GLSL", "GNU E", "GM", "Go", "Go!", "GOAL", "Gödel", "Godiva", "GOM (Good Old Mad)", "Goo", "Gosu", "GOTRAN", "GPSS", "GraphTalk", "GRASS", "Groovy", "Hack (programming language)", "HAL/S", "Hamilton C shell", "Harbour", "Hartmann pipelines", "Haskell", "Haxe", "High Level Assembly", "HLSL", "Hop", "Hope", "Hugo", "Hume", "HyperTalk", "IBM Basic assembly language", "IBM HAScript", "IBM Informix-4GL", "IBM RPG", "ICI", "Icon", "Id", "IDL", "Idris", "IMP", "Inform", "Io", "Ioke", "IPL", "IPTSCRAE", "ISLISP", "ISPF", "ISWIM", "J", "J#", "J++", "JADE", "Jako", "JAL", "Janus", "JASS", "Java", "JavaScript", "JCL", "JEAN", "Join Java", "JOSS", "Joule", "JOVIAL", "Joy", "JScript", "JScript .NET", "JavaFX Script", "Julia", "Jython", "K", "Kaleidoscope", "Karel", "Karel++", "KEE", "Kixtart", "KIF", "Kojo", "Kotlin", "KRC", "KRL", "KUKA", "KRYPTON", "ksh", "L", "L# .NET", "LabVIEW", "Ladder", "Lagoona", "LANSA", "Lasso", "LaTeX", "Lava", "LC-3", "Leda", "Legoscript", "LIL", "LilyPond", "Limbo", "Limnor", "LINC", "Lingo", "Linoleum", "LIS", "LISA", "Lisaac", "Lisp", "Lite-C", "Lithe", "Little b", "Logo", "Logtalk", "LPC", "LSE", "LSL", "LiveCode", "LiveScript", "Lua", "Lucid", "Lustre", "LYaPAS", "Lynx", "M2001", "M4", "Machine code", "MAD", "MAD/I", "Magik", "Magma", "make", "Maple", "MAPPER", "MARK-IV", "Mary", "MASM Microsoft Assembly x86", "Mathematica", "MATLAB", "Maxima", "Macsyma", "Max", "MaxScript", "Maya (MEL)", "MDL", "Mercury", "Mesa", "Metacard", "Metafont", "MetaL", "Microcode", "MicroScript", "MIIS", "MillScript", "MIMIC", "Mirah", "Miranda", "MIVA Script", "ML", "Moby", "Model 204", "Modelica", "Modula", "Modula-2", "Modula-3", "Mohol", "MOO", "Mortran", "Mouse", "MPD", "CIL", "MSL", "MUMPS", "NASM", "NATURAL", "Napier88", "Neko", "Nemerle", "nesC", "NESL", "Net.Data", "NetLogo", "NetRexx", "NewLISP", "NEWP", "Newspeak", "NewtonScript", "NGL", "Nial", "Nice", "Nickle", "NPL", "Not eXactly C", "Not Quite C", "NSIS", "Nu", "NWScript", "NXT-G", "o:XML", "Oak", "Oberon", "Obix", "OBJ2", "Object Lisp", "ObjectLOGO", "Object REXX", "Object Pascal", "Objective-C", "Objective-J", "Obliq", "Obol", "OCaml", "occam", "occam-π", "Octave", "OmniMark", "Onyx", "Opa", "Opal", "OpenCL", "OpenEdge ABL", "OPL", "OPS5", "OptimJ", "Orc", "ORCA/Modula-2", "Oriel", "Orwell", "Oxygene", "Oz", "P#", "ParaSail (programming language)", "PARI/GP", "Pascal", "Pawn", "PCASTL", "PCF", "PEARL", "PeopleCode", "Perl", "PDL", "PHP", "Phrogram", "Pico", "Picolisp", "Pict", "Pike", "PIKT", "PILOT", "Pipelines", "Pizza", "PL-11", "PL/0", "PL/B", "PL/C", "PL/I", "PL/M", "PL/P", "PL/SQL", "PL360", "PLANC", "Plankalkül", "Planner", "PLEX", "PLEXIL", "Plus", "POP-11", "PostScript", "PortablE", "Powerhouse", "PowerBuilder", "PowerShell", "PPL", "Processing", "Processing.js", "Prograph", "PROIV", "Prolog", "PROMAL", "Promela", "PROSE modeling language", "PROTEL", "ProvideX", "Pro*C", "Pure", "Python", "Q (equational programming language)", "Q (programming language from Kx Systems)", "Qalb", "Qi", "QtScript", "QuakeC", "QPL", "R", "R++", "Racket", "RAPID", "Rapira", "Ratfiv", "Ratfor", "rc", "REBOL", "Red", "Redcode", "REFAL", "Reia", "Revolution", "rex", "REXX", "Rlab", "RobotC", "ROOP", "RPG", "RPL", "RSL", "RTL/2", "Ruby", "RuneScript", "Rust", "S", "S2", "S3", "S-Lang", "S-PLUS", "SA-C", "SabreTalk", "SAIL", "SALSA", "SAM76", "SAS", "SASL", "Sather", "Sawzall", "SBL", "Scala", "Scheme", "Scilab", "Scratch", "Script.NET", "Sed", "Seed7", "Self", "SenseTalk", "SequenceL", "SETL", "Shift Script", "SIMPOL", "Shakespeare", "SIGNAL", "SiMPLE", "SIMSCRIPT", "Simula", "Simulink", "SISAL", "SLIP", "SMALL", "Smalltalk", "Small Basic", "SML", "Snap!", "SNOBOL", "SPITBOL", "Snowball", "SOL", "Span", "SPARK", "SPIN", "SP/k", "SPS", "Squeak", "Squirrel", "SR", "S/SL", "Stackless Python", "Starlogo", "Strand", "Stata", "Stateflow", "Subtext", "SuperCollider", "SuperTalk", "Swift (Apple programming language)", "Swift (parallel scripting language)", "SYMPL", "SyncCharts", "SystemVerilog", "T", "TACL", "TACPOL", "TADS", "TAL", "Tcl", "Tea", "TECO", "TELCOMP", "TeX", "TEX", "TIE", "Timber", "TMG", "Tom", "TOM", "Topspeed", "TPU", "Trac", "TTM", "T-SQL", "TTCN", "Turing", "TUTOR", "TXL", "TypeScript", "Turbo C++", "Ubercode", "UCSD Pascal", "Umple", "Unicon", "Uniface", "UNITY", "Unix shell", "UnrealScript", "Vala", "VBA", "VBScript", "Verilog", "VHDL", "Visual Basic", "Visual Basic .NET", "Visual DataFlex", "Visual DialogScript", "Visual Fortran", "Visual FoxPro", "Visual J++", "Visual J#", "Visual Objects", "Visual Prolog", "VSXu", "Vvvv", "WATFIV, WATFOR", "WebDNA", "WebQL", "Windows PowerShell", "Winbatch", "Wolfram", "Wyvern", "X++", "X#", "X10", "XBL", "XC", "XMOS architecture", "xHarbour", "XL", "Xojo", "XOTcl", "XPL", "XPL0", "XQuery", "XSB", "XSLT", "XPath", "Xtend", "Yorick", "YQL", "Z notation", "Zeno", "ZOPL", "ZPL"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/log_level.go b/vendor/github.com/brianvoe/gofakeit/v6/data/log_level.go deleted file mode 100644 index 01d98b63c6b..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/log_level.go +++ /dev/null @@ -1,8 +0,0 @@ -package data - -// LogLevels consists of log levels for several types -var LogLevels = map[string][]string{ - "general": {"error", "warning", "info", "fatal", "trace", "debug"}, - "syslog": {"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"}, - "apache": {"emerg", "alert", "crit", "error", "warn", "notice", "info", "debug", "trace1-8"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/lorem.go b/vendor/github.com/brianvoe/gofakeit/v6/data/lorem.go deleted file mode 100644 index b0a8f8a1378..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/lorem.go +++ /dev/null @@ -1,6 +0,0 @@ -package data - -// Lorem consists of lorem ipsum information -var Lorem = map[string][]string{ - "word": {"alias", "consequatur", "aut", "perferendis", "sit", "voluptatem", "accusantium", "doloremque", "aperiam", "eaque", "ipsa", "quae", "ab", "illo", "inventore", "veritatis", "et", "quasi", "architecto", "beatae", "vitae", "dicta", "sunt", "explicabo", "aspernatur", "aut", "odit", "aut", "fugit", "sed", "quia", "consequuntur", "magni", "dolores", "eos", "qui", "ratione", "voluptatem", "sequi", "nesciunt", "neque", "dolorem", "ipsum", "quia", "dolor", "sit", "amet", "consectetur", "adipisci", "velit", "sed", "quia", "non", "numquam", "eius", "modi", "tempora", "incidunt", "ut", "labore", "et", "dolore", "magnam", "aliquam", "quaerat", "voluptatem", "ut", "enim", "ad", "minima", "veniam", "quis", "nostrum", "exercitationem", "ullam", "corporis", "nemo", "enim", "ipsam", "voluptatem", "quia", "voluptas", "sit", "suscipit", "laboriosam", "nisi", "ut", "aliquid", "ex", "ea", "commodi", "consequatur", "quis", "autem", "vel", "eum", "iure", "reprehenderit", "qui", "in", "ea", "voluptate", "velit", "esse", "quam", "nihil", "molestiae", "et", "iusto", "odio", "dignissimos", "ducimus", "qui", "blanditiis", "praesentium", "laudantium", "totam", "rem", "voluptatum", "deleniti", "atque", "corrupti", "quos", "dolores", "et", "quas", "molestias", "excepturi", "sint", "occaecati", "cupiditate", "non", "provident", "sed", "ut", "perspiciatis", "unde", "omnis", "iste", "natus", "error", "similique", "sunt", "in", "culpa", "qui", "officia", "deserunt", "mollitia", "animi", "id", "est", "laborum", "et", "dolorum", "fuga", "et", "harum", "quidem", "rerum", "facilis", "est", "et", "expedita", "distinctio", "nam", "libero", "tempore", "cum", "soluta", "nobis", "est", "eligendi", "optio", "cumque", "nihil", "impedit", "quo", "porro", "quisquam", "est", "qui", "minus", "id", "quod", "maxime", "placeat", "facere", "possimus", "omnis", "voluptas", "assumenda", "est", "omnis", "dolor", "repellendus", "temporibus", "autem", "quibusdam", "et", "aut", "consequatur", "vel", "illum", "qui", "dolorem", "eum", "fugiat", "quo", "voluptas", "nulla", "pariatur", "at", "vero", "eos", "et", "accusamus", "officiis", "debitis", "aut", "rerum", "necessitatibus", "saepe", "eveniet", "ut", "et", "voluptates", "repudiandae", "sint", "et", "molestiae", "non", "recusandae", "itaque", "earum", "rerum", "hic", "tenetur", "a", "sapiente", "delectus", "ut", "aut", "reiciendis", "voluptatibus", "maiores", "doloribus", "asperiores", "repellat"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/minecraft.go b/vendor/github.com/brianvoe/gofakeit/v6/data/minecraft.go deleted file mode 100644 index 015de8af485..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/minecraft.go +++ /dev/null @@ -1,23 +0,0 @@ -package data - -// Minecraft consists of various minecraft items -var Minecraft = map[string][]string{ - "ore": {"coal", "copper", "iron", "gold", "redstone", "lapis", "diamond", "emerald"}, - "wood": {"oak", "spruce", "birch", "jungle", "acacia", "dark oak"}, - "armortier": {"leather", "chainmail", "iron", "gold", "diamond", "netherite"}, - "armorpart": {"helmet", "chestplate", "leggings", "boots"}, - "weapon": {"sword", "bow", "arrow", "trident", "shield"}, - "tool": {"pickaxe", "axe", "shovel", "hoe", "fishing rod"}, - "dye": {"white", "orange", "magenta", "light blue", "yellow", "lime", "pink", "gray", "light gray", "cyan", "purple", "blue", "brown", "green", "red", "black"}, - "food": {"apple", "baked potato", "beetroot", "beetroot soup", "bread", "cake", "carrot", "chorus fruit", "cooked chicken", "cooked cod", "cooked mutton", "cooked salmon", "cookie", "enchanted golden apple", "golden apple", "glow berry", "golden carrot", "honey bottle", "melon slice", "mushroom stew", "poisonous potato", "potato", "pufferfish", "pumpkin pie", "rabbit stew", "raw beef", "raw chicken", "raw cod", "raw mutton", "raw porkchop", "raw rabbit", "raw salmon", "rotten flesh", "spider eye", "steak", "suspicous stew", "sweet berry", "tropical fish"}, - "animal": {"chicken", "cow", "pig", "rabbit", "sheep", "wolf"}, - "villagerjob": {"armourer", "butcher", "carpenter", "cleric", "farmer", "fisherman", "fletcher", "leatherworker", "librarian", "mason", "nitwit", "shepherd", "toolsmith", "weaponsmith"}, - "villagerstation": {"composter", "smoker", "barrel", "loom", "blast furnace", "brewing stand", "cauldron", "fletching table", "cartography table", "lectern", "smithing table", "stonecutter", "grindstone"}, - "villagerlevel": {"novice", "apprentice", "journeyman", "expert", "master"}, - "mobpassive": {"axolotl", "bat", "cat", "chicken", "cod", "cow", "donkey", "fox", "glow squid", "horse", "mooshroom", "mule", "ocelot", "parrot", "pig", "pufferfish", "rabbit", "salmon", "sheep", "skeleton horse", "snow golem", "squid", "strider", "tropical fish", "turtle", "villager", "wandering trader"}, - "mobneutral": {"bee", "cave spider", "dolphin", "enderman", "goat", "iron golem", "llama", "panda", "piglin", "polar bear", "spider", "trader llama", "wolf", "zombified piglin"}, - "mobhostile": {"blaze", "chicken jockey", "creeper", "drowned", "elder guardian", "endermite", "evoker", "ghast", "guardian", "hoglin phantom", "husk", "magma cube", "phantom", "piglin brute", "pillager", "ravager", "shulker", "silverfish", "skeleton", "skeleton horseman", "slime", "spider jockey", "stray", "vex", "vindicator", "witch", "wither skeleton", "zoglin", "zombie", "zombie villager"}, - "mobboss": {"ender dragon", "wither"}, - "biome": {"plain", "forest", "jungle", "mountain", "desert", "taiga", "snowy tundra", "ice spike", "swamp", "savannah", "badlands", "beach", "stone shore", "river", "ocean", "mushroom island", "the nether", "the end"}, - "weather": {"clear", "rain", "thunder"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/movie.go b/vendor/github.com/brianvoe/gofakeit/v6/data/movie.go deleted file mode 100644 index 9a381ac1177..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/movie.go +++ /dev/null @@ -1,130 +0,0 @@ -package data - -// From IMDB - Top 250 Movies subset to 100 -var Movies = map[string][]string{ - "name": { - "12 Years a Slave", - "1917", - "2001: A Space Odyssey", - "3 Idiots", - "A Beautiful Mind", - "A Clockwork Orange", - "Alien", - "American Beauty", - "American History X", - "Apocalypse Now", - "Avengers: Infinity War", - "Back to the Future", - "Batman Begins", - "Ben-Hur", - "Blade Runner", - "Casablanca", - "Casino", - "Catch Me If You Can", - "Das Leben der Anderen", - "Dead Poets Society", - "Die Hard", - "Django Unchained", - "Fight Club", - "Finding Nemo", - "Forrest Gump", - "Full Metal Jacket", - "Gandhi", - "Gladiator", - "Gone with the Wind", - "Good Will Hunting", - "Goodfellas", - "Green Book", - "Groundhog Day", - "Harry Potter and the Deathly Hallows - Part 2", - "Heat", - "Inception", - "Indiana Jones and the Last Crusade", - "Inglourious Basterds", - "Interstellar", - "Into the Wild", - "Intouchables", - "Joker", - "Judgment at Nuremberg", - "Jurassic Park", - "Kill Bill: Vol. 1", - "L.A. Confidential", - "La vita è bella", - "Lock, Stock and Two Smoking Barrels", - "Léon", - "Mad Max: Fury Road", - "Memento", - "Million Dollar Baby", - "Monsters, Inc.", - "Monty Python and the Holy Grail", - "No Country for Old Men", - "Once Upon a Time in America", - "One Flew Over the Cuckoo's Nest", - "Pirates of the Caribbean: The Curse of the Black Pearl", - "Platoon", - "Prisoners", - "Psycho", - "Pulp Fiction", - "Raiders of the Lost Ark", - "Ratatouille", - "Reservoir Dogs", - "Rocky", - "Saving Private Ryan", - "Scarface", - "Schindler's List", - "Se7en", - "Sherlock Jr.", - "Shutter Island", - "Snatch", - "Spider-Man: No Way Home", - "Star Wars: Episode VI - Return of the Jedi", - "Taxi Driver", - "Terminator 2: Judgment Day", - "The Big Lebowski", - "The Dark Knight", - "The Departed", - "The Empire Strikes Back", - "The Godfather", - "The Green Mile", - "The Lion King", - "The Lord of the Rings: The Fellowship of the Ring", - "The Matrix", - "The Pianist", - "The Prestige", - "The Shawshank Redemption", - "The Terminator", - "The Usual Suspects", - "The Wolf of Wall Street", - "Top Gun: Maverick", - "Toy Story", - "Unforgiven", - "Up", - "V for Vendetta", - "WALL·E", - "Warrior", - "Whiplash", - }, - "genre": { - "Action", - "Adventure", - "Animation", - "Biography", - "Comedy", - "Crime", - "Drama", - "Family", - "Fantasy", - "Film-Noir", - "History", - "Horror", - "Music", - "Musical", - "Mystery", - "Romance", - "Sci-Fi", - "Sport", - "Thriller", - "War", - "Western", - }, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/payment.go b/vendor/github.com/brianvoe/gofakeit/v6/data/payment.go deleted file mode 100644 index 77147cd87cb..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/payment.go +++ /dev/null @@ -1,211 +0,0 @@ -package data - -// CreditCardInfo contains credit card info -type CreditCardInfo struct { - Display string - Patterns []uint - Gaps []uint - Lengths []uint - Code CreditCardCode -} - -// CreditCardCode contains code type and size -type CreditCardCode struct { - Name string - Size uint -} - -// CreditCardTypes is an array of credit card types -var CreditCardTypes = []string{"visa", "mastercard", "american-express", "diners-club", "discover", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard"} - -// CreditCards contains payment information -var CreditCards = map[string]CreditCardInfo{ - "visa": { - Display: "Visa", - Patterns: []uint{4}, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16}, - Code: CreditCardCode{ - Name: "CVV", - Size: 3, - }, - }, - "mastercard": { - Display: "Mastercard", - Patterns: []uint{ - 51, 55, - 2221, 2229, - 223, 229, - 23, 26, - 270, 271, - 2720, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16}, - Code: CreditCardCode{ - Name: "CVC", - Size: 3, - }, - }, - "american-express": { - Display: "American Express", - Patterns: []uint{34, 37}, - Gaps: []uint{4, 10}, - Lengths: []uint{15}, - Code: CreditCardCode{ - Name: "CID", - Size: 4, - }, - }, - "diners-club": { - Display: "Diners Club", - Patterns: []uint{ - 300, 305, - 36, 38, 39, - }, - Gaps: []uint{4, 10}, - Lengths: []uint{14, 16, 19}, - Code: CreditCardCode{ - Name: "CVV", - Size: 3, - }, - }, - "discover": { - Display: "Discover", - Patterns: []uint{ - 6011, 644, 649, 65, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16, 19}, - Code: CreditCardCode{ - Name: "CID", - Size: 3, - }, - }, - "jcb": { - Display: "JCB", - Patterns: []uint{ - 2131, 1800, 3528, 3589, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16, 17, 18, 19}, - Code: CreditCardCode{ - Name: "CVV", - Size: 3, - }, - }, - "unionpay": { - Display: "UnionPay", - Patterns: []uint{ - 620, 624, 626, - 62100, 62182, - 62184, 62187, - 62185, 62197, - 62200, 62205, - 622010, 622999, - 622018, - 622019, 622999, - 62207, 62209, - 622126, 622925, - 623, 626, - 6270, 6272, 6276, - 627700, 627779, - 627781, 627799, - 6282, 6289, - 6291, 6292, - 810, - 8110, 8131, - 8132, 8151, - 8152, 8163, - 8164, 817, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{14, 15, 16, 17, 18, 19}, - Code: CreditCardCode{ - Name: "CVN", - Size: 3, - }, - }, - "maestro": { - Display: "Maestro", - Patterns: []uint{ - 493698, - 500000, 506698, - 506779, 508999, - 56, 59, - 6, 63, 67, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{12, 13, 14, 15, 16, 17, 18, 19}, - Code: CreditCardCode{ - Name: "CVC", - Size: 3, - }, - }, - "elo": { - Display: "Elo", - Patterns: []uint{ - 401178, 401179, - 438935, 457631, - 457632, 431274, - 451416, 457393, - 504175, 506699, - 506778, 509000, - 509999, 627780, - 636297, 636368, - 650031, 650033, - 650035, 650051, - 650405, 650439, - 650485, 650538, - 650541, 650598, - 650700, 650718, - 650720, 650727, - 650901, 650978, - 651652, 651679, - 655000, 655019, - 655021, 65505, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16}, - Code: CreditCardCode{ - Name: "CVE", - Size: 3, - }, - }, - "mir": { - Display: "Mir", - Patterns: []uint{2200, 2204}, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16, 17, 18, 19}, - Code: CreditCardCode{ - Name: "CVP2", - Size: 3, - }, - }, - "hiper": { - Display: "Hiper", - Patterns: []uint{ - 637095, - 637568, - 637599, - 637609, - 637612, - }, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16}, - Code: CreditCardCode{ - Name: "CVC", - Size: 3, - }, - }, - "hipercard": { - Display: "Hipercard", - Patterns: []uint{606282}, - Gaps: []uint{4, 8, 12}, - Lengths: []uint{16}, - Code: CreditCardCode{ - Name: "CVC", - Size: 3, - }, - }, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/person.go b/vendor/github.com/brianvoe/gofakeit/v6/data/person.go deleted file mode 100644 index 8f65a16bf17..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/person.go +++ /dev/null @@ -1,12 +0,0 @@ -package data - -// Person consists of a slice of people information -var Person = map[string][]string{ - "prefix": {"Mr.", "Mrs.", "Ms.", "Miss", "Dr."}, - "suffix": {"Jr.", "Sr.", "I", "II", "III", "IV", "V", "MD", "DDS", "PhD", "DVM"}, - "first": {"Aaliyah", "Aaron", "Abagail", "Abbey", "Abbie", "Abbigail", "Abby", "Abdiel", "Abdul", "Abdullah", "Abe", "Abel", "Abelardo", "Abigail", "Abigale", "Abigayle", "Abner", "Abraham", "Ada", "Adah", "Adalberto", "Adaline", "Adam", "Adan", "Addie", "Addison", "Adela", "Adelbert", "Adele", "Adelia", "Adeline", "Adell", "Adella", "Adelle", "Aditya", "Adolf", "Adolfo", "Adolph", "Adolphus", "Adonis", "Adrain", "Adrian", "Adriana", "Adrianna", "Adriel", "Adrien", "Adrienne", "Afton", "Aglae", "Agnes", "Agustin", "Agustina", "Ahmad", "Ahmed", "Aida", "Aidan", "Aiden", "Aileen", "Aimee", "Aisha", "Aiyana", "Akeem", "Al", "Alaina", "Alan", "Alana", "Alanis", "Alanna", "Alayna", "Alba", "Albert", "Alberta", "Albertha", "Alberto", "Albin", "Albina", "Alda", "Alden", "Alec", "Aleen", "Alejandra", "Alejandrin", "Alek", "Alena", "Alene", "Alessandra", "Alessandro", "Alessia", "Aletha", "Alex", "Alexa", "Alexander", "Alexandra", "Alexandre", "Alexandrea", "Alexandria", "Alexandrine", "Alexandro", "Alexane", "Alexanne", "Alexie", "Alexis", "Alexys", "Alexzander", "Alf", "Alfonso", "Alfonzo", "Alford", "Alfred", "Alfreda", "Alfredo", "Ali", "Alia", "Alice", "Alicia", "Alisa", "Alisha", "Alison", "Alivia", "Aliya", "Aliyah", "Aliza", "Alize", "Allan", "Allen", "Allene", "Allie", "Allison", "Ally", "Alphonso", "Alta", "Althea", "Alva", "Alvah", "Alvena", "Alvera", "Alverta", "Alvina", "Alvis", "Alyce", "Alycia", "Alysa", "Alysha", "Alyson", "Alysson", "Amalia", "Amanda", "Amani", "Amara", "Amari", "Amaya", "Amber", "Ambrose", "Amelia", "Amelie", "Amely", "America", "Americo", "Amie", "Amina", "Amir", "Amira", "Amiya", "Amos", "Amparo", "Amy", "Amya", "Ana", "Anabel", "Anabelle", "Anahi", "Anais", "Anastacio", "Anastasia", "Anderson", "Andre", "Andreane", "Andreanne", "Andres", "Andrew", "Andy", "Angel", "Angela", "Angelica", "Angelina", "Angeline", "Angelita", "Angelo", "Angie", "Angus", "Anibal", "Anika", "Anissa", "Anita", "Aniya", "Aniyah", "Anjali", "Anna", "Annabel", "Annabell", "Annabelle", "Annalise", "Annamae", "Annamarie", "Anne", "Annetta", "Annette", "Annie", "Ansel", "Ansley", "Anthony", "Antoinette", "Antone", "Antonetta", "Antonette", "Antonia", "Antonietta", "Antonina", "Antonio", "Antwan", "Antwon", "Anya", "April", "Ara", "Araceli", "Aracely", "Arch", "Archibald", "Ardella", "Arden", "Ardith", "Arely", "Ari", "Ariane", "Arianna", "Aric", "Ariel", "Arielle", "Arjun", "Arlene", "Arlie", "Arlo", "Armand", "Armando", "Armani", "Arnaldo", "Arne", "Arno", "Arnold", "Arnoldo", "Arnulfo", "Aron", "Art", "Arthur", "Arturo", "Arvel", "Arvid", "Arvilla", "Aryanna", "Asa", "Asha", "Ashlee", "Ashleigh", "Ashley", "Ashly", "Ashlynn", "Ashton", "Ashtyn", "Asia", "Assunta", "Astrid", "Athena", "Aubree", "Aubrey", "Audie", "Audra", "Audreanne", "Audrey", "August", "Augusta", "Augustine", "Augustus", "Aurelia", "Aurelie", "Aurelio", "Aurore", "Austen", "Austin", "Austyn", "Autumn", "Ava", "Avery", "Avis", "Axel", "Ayana", "Ayden", "Ayla", "Aylin", "Baby", "Bailee", "Bailey", "Barbara", "Barney", "Baron", "Barrett", "Barry", "Bart", "Bartholome", "Barton", "Baylee", "Beatrice", "Beau", "Beaulah", "Bell", "Bella", "Belle", "Ben", "Benedict", "Benjamin", "Bennett", "Bennie", "Benny", "Benton", "Berenice", "Bernadette", "Bernadine", "Bernard", "Bernardo", "Berneice", "Bernhard", "Bernice", "Bernie", "Berniece", "Bernita", "Berry", "Bert", "Berta", "Bertha", "Bertram", "Bertrand", "Beryl", "Bessie", "Beth", "Bethany", "Bethel", "Betsy", "Bette", "Bettie", "Betty", "Bettye", "Beulah", "Beverly", "Bianka", "Bill", "Billie", "Billy", "Birdie", "Blair", "Blaise", "Blake", "Blanca", "Blanche", "Blaze", "Bo", "Bobbie", "Bobby", "Bonita", "Bonnie", "Boris", "Boyd", "Brad", "Braden", "Bradford", "Bradley", "Bradly", "Brady", "Braeden", "Brain", "Brandi", "Brando", "Brandon", "Brandt", "Brandy", "Brandyn", "Brannon", "Branson", "Brant", "Braulio", "Braxton", "Brayan", "Breana", "Breanna", "Breanne", "Brenda", "Brendan", "Brenden", "Brendon", "Brenna", "Brennan", "Brennon", "Brent", "Bret", "Brett", "Bria", "Brian", "Briana", "Brianne", "Brice", "Bridget", "Bridgette", "Bridie", "Brielle", "Brigitte", "Brionna", "Brisa", "Britney", "Brittany", "Brock", "Broderick", "Brody", "Brook", "Brooke", "Brooklyn", "Brooks", "Brown", "Bruce", "Bryana", "Bryce", "Brycen", "Bryon", "Buck", "Bud", "Buddy", "Buford", "Bulah", "Burdette", "Burley", "Burnice", "Buster", "Cade", "Caden", "Caesar", "Caitlyn", "Cale", "Caleb", "Caleigh", "Cali", "Calista", "Callie", "Camden", "Cameron", "Camila", "Camilla", "Camille", "Camren", "Camron", "Camryn", "Camylle", "Candace", "Candelario", "Candice", "Candida", "Candido", "Cara", "Carey", "Carissa", "Carlee", "Carleton", "Carley", "Carli", "Carlie", "Carlo", "Carlos", "Carlotta", "Carmel", "Carmela", "Carmella", "Carmelo", "Carmen", "Carmine", "Carol", "Carolanne", "Carole", "Carolina", "Caroline", "Carolyn", "Carolyne", "Carrie", "Carroll", "Carson", "Carter", "Cary", "Casandra", "Casey", "Casimer", "Casimir", "Casper", "Cassandra", "Cassandre", "Cassidy", "Cassie", "Catalina", "Caterina", "Catharine", "Catherine", "Cathrine", "Cathryn", "Cathy", "Cayla", "Ceasar", "Cecelia", "Cecil", "Cecile", "Cecilia", "Cedrick", "Celestine", "Celestino", "Celia", "Celine", "Cesar", "Chad", "Chadd", "Chadrick", "Chaim", "Chance", "Chandler", "Chanel", "Chanelle", "Charity", "Charlene", "Charles", "Charley", "Charlie", "Charlotte", "Chase", "Chasity", "Chauncey", "Chaya", "Chaz", "Chelsea", "Chelsey", "Chelsie", "Chesley", "Chester", "Chet", "Cheyanne", "Cheyenne", "Chloe", "Chris", "Christ", "Christa", "Christelle", "Christian", "Christiana", "Christina", "Christine", "Christop", "Christophe", "Christopher", "Christy", "Chyna", "Ciara", "Cicero", "Cielo", "Cierra", "Cindy", "Citlalli", "Clair", "Claire", "Clara", "Clarabelle", "Clare", "Clarissa", "Clark", "Claud", "Claude", "Claudia", "Claudie", "Claudine", "Clay", "Clemens", "Clement", "Clementina", "Clementine", "Clemmie", "Cleo", "Cleora", "Cleta", "Cletus", "Cleve", "Cleveland", "Clifford", "Clifton", "Clint", "Clinton", "Clotilde", "Clovis", "Cloyd", "Clyde", "Coby", "Cody", "Colby", "Cole", "Coleman", "Colin", "Colleen", "Collin", "Colt", "Colten", "Colton", "Columbus", "Concepcion", "Conner", "Connie", "Connor", "Conor", "Conrad", "Constance", "Constantin", "Consuelo", "Cooper", "Cora", "Coralie", "Corbin", "Cordelia", "Cordell", "Cordia", "Cordie", "Corene", "Corine", "Cornelius", "Cornell", "Corrine", "Cortez", "Cortney", "Cory", "Coty", "Courtney", "Coy", "Craig", "Crawford", "Creola", "Cristal", "Cristian", "Cristina", "Cristobal", "Cristopher", "Cruz", "Crystal", "Crystel", "Cullen", "Curt", "Curtis", "Cydney", "Cynthia", "Cyril", "Cyrus", "Dagmar", "Dahlia", "Daija", "Daisha", "Daisy", "Dakota", "Dale", "Dallas", "Dallin", "Dalton", "Damaris", "Dameon", "Damian", "Damien", "Damion", "Damon", "Dan", "Dana", "Dandre", "Dane", "Dangelo", "Dangelo", "Danial", "Daniela", "Daniella", "Danielle", "Danika", "Dannie", "Danny", "Dante", "Danyka", "Daphne", "Daphnee", "Daphney", "Darby", "Daren", "Darian", "Dariana", "Darien", "Dario", "Darion", "Darius", "Darlene", "Daron", "Darrel", "Darrell", "Darren", "Darrick", "Darrin", "Darrion", "Darron", "Darryl", "Darwin", "Daryl", "Dashawn", "Dasia", "Dave", "David", "Davin", "Davion", "Davon", "Davonte", "Dawn", "Dawson", "Dax", "Dayana", "Dayna", "Dayne", "Dayton", "Dean", "Deangelo", "Deanna", "Deborah", "Declan", "Dedric", "Dedrick", "Dee", "Deion", "Deja", "Dejah", "Dejon", "Dejuan", "Delaney", "Delbert", "Delfina", "Delia", "Delilah", "Dell", "Della", "Delmer", "Delores", "Delpha", "Delphia", "Delphine", "Delta", "Demarco", "Demarcus", "Demario", "Demetris", "Demetrius", "Demond", "Dena", "Denis", "Dennis", "Deon", "Deondre", "Deontae", "Deonte", "Dereck", "Derek", "Derick", "Deron", "Derrick", "Deshaun", "Deshawn", "Desiree", "Desmond", "Dessie", "Destany", "Destin", "Destinee", "Destiney", "Destini", "Destiny", "Devan", "Devante", "Deven", "Devin", "Devon", "Devonte", "Devyn", "Dewayne", "Dewitt", "Dexter", "Diamond", "Diana", "Dianna", "Diego", "Dillan", "Dillon", "Dimitri", "Dina", "Dino", "Dion", "Dixie", "Dock", "Dolly", "Dolores", "Domenic", "Domenica", "Domenick", "Domenico", "Domingo", "Dominic", "Dominique", "Don", "Donald", "Donato", "Donavon", "Donna", "Donnell", "Donnie", "Donny", "Dora", "Dorcas", "Dorian", "Doris", "Dorothea", "Dorothy", "Dorris", "Dortha", "Dorthy", "Doug", "Douglas", "Dovie", "Doyle", "Drake", "Drew", "Duane", "Dudley", "Dulce", "Duncan", "Durward", "Dustin", "Dusty", "Dwight", "Dylan", "Earl", "Earlene", "Earline", "Earnest", "Earnestine", "Easter", "Easton", "Ebba", "Ebony", "Ed", "Eda", "Edd", "Eddie", "Eden", "Edgar", "Edgardo", "Edison", "Edmond", "Edmund", "Edna", "Eduardo", "Edward", "Edwardo", "Edwin", "Edwina", "Edyth", "Edythe", "Effie", "Efrain", "Efren", "Eileen", "Einar", "Eino", "Eladio", "Elaina", "Elbert", "Elda", "Eldon", "Eldora", "Eldred", "Eldridge", "Eleanora", "Eleanore", "Eleazar", "Electa", "Elena", "Elenor", "Elenora", "Eleonore", "Elfrieda", "Eli", "Elian", "Eliane", "Elias", "Eliezer", "Elijah", "Elinor", "Elinore", "Elisa", "Elisabeth", "Elise", "Eliseo", "Elisha", "Elissa", "Eliza", "Elizabeth", "Ella", "Ellen", "Ellie", "Elliot", "Elliott", "Ellis", "Ellsworth", "Elmer", "Elmira", "Elmo", "Elmore", "Elna", "Elnora", "Elody", "Eloisa", "Eloise", "Elouise", "Eloy", "Elroy", "Elsa", "Else", "Elsie", "Elta", "Elton", "Elva", "Elvera", "Elvie", "Elvis", "Elwin", "Elwyn", "Elyse", "Elyssa", "Elza", "Emanuel", "Emelia", "Emelie", "Emely", "Emerald", "Emerson", "Emery", "Emie", "Emil", "Emile", "Emilia", "Emiliano", "Emilie", "Emilio", "Emily", "Emma", "Emmalee", "Emmanuel", "Emmanuelle", "Emmet", "Emmett", "Emmie", "Emmitt", "Emmy", "Emory", "Ena", "Enid", "Enoch", "Enola", "Enos", "Enrico", "Enrique", "Ephraim", "Era", "Eriberto", "Eric", "Erica", "Erich", "Erick", "Ericka", "Erik", "Erika", "Erin", "Erling", "Erna", "Ernest", "Ernestina", "Ernestine", "Ernesto", "Ernie", "Ervin", "Erwin", "Eryn", "Esmeralda", "Esperanza", "Esta", "Esteban", "Estefania", "Estel", "Estell", "Estella", "Estelle", "Estevan", "Esther", "Estrella", "Etha", "Ethan", "Ethel", "Ethelyn", "Ethyl", "Ettie", "Eudora", "Eugene", "Eugenia", "Eula", "Eulah", "Eulalia", "Euna", "Eunice", "Eusebio", "Eva", "Evalyn", "Evan", "Evangeline", "Evans", "Eve", "Eveline", "Evelyn", "Everardo", "Everett", "Everette", "Evert", "Evie", "Ewald", "Ewell", "Ezekiel", "Ezequiel", "Ezra", "Fabian", "Fabiola", "Fae", "Fannie", "Fanny", "Fatima", "Faustino", "Fausto", "Favian", "Fay", "Faye", "Federico", "Felicia", "Felicita", "Felicity", "Felipa", "Felipe", "Felix", "Felton", "Fermin", "Fern", "Fernando", "Ferne", "Fidel", "Filiberto", "Filomena", "Finn", "Fiona", "Flavie", "Flavio", "Fleta", "Fletcher", "Flo", "Florence", "Florencio", "Florian", "Florida", "Florine", "Flossie", "Floy", "Floyd", "Ford", "Forest", "Forrest", "Foster", "Frances", "Francesca", "Francesco", "Francis", "Francisca", "Francisco", "Franco", "Frank", "Frankie", "Franz", "Fred", "Freda", "Freddie", "Freddy", "Frederic", "Frederick", "Frederik", "Frederique", "Fredrick", "Fredy", "Freeda", "Freeman", "Freida", "Frida", "Frieda", "Friedrich", "Fritz", "Furman", "Gabe", "Gabriel", "Gabriella", "Gabrielle", "Gaetano", "Gage", "Gail", "Gardner", "Garett", "Garfield", "Garland", "Garnet", "Garnett", "Garret", "Garrett", "Garrick", "Garrison", "Garry", "Garth", "Gaston", "Gavin", "Gay", "Gayle", "Gaylord", "Gene", "General", "Genesis", "Genevieve", "Gennaro", "Genoveva", "Geo", "Geoffrey", "George", "Georgette", "Georgiana", "Georgianna", "Geovanni", "Geovanny", "Geovany", "Gerald", "Geraldine", "Gerard", "Gerardo", "Gerda", "Gerhard", "Germaine", "German", "Gerry", "Gerson", "Gertrude", "Gia", "Gianni", "Gideon", "Gilbert", "Gilberto", "Gilda", "Giles", "Gillian", "Gina", "Gino", "Giovani", "Giovanna", "Giovanni", "Giovanny", "Gisselle", "Giuseppe", "Gladyce", "Gladys", "Glen", "Glenda", "Glenna", "Glennie", "Gloria", "Godfrey", "Golda", "Golden", "Gonzalo", "Gordon", "Grace", "Gracie", "Graciela", "Grady", "Graham", "Grant", "Granville", "Grayce", "Grayson", "Green", "Greg", "Gregg", "Gregoria", "Gregorio", "Gregory", "Greta", "Gretchen", "Greyson", "Griffin", "Grover", "Guadalupe", "Gudrun", "Guido", "Guillermo", "Guiseppe", "Gunnar", "Gunner", "Gus", "Gussie", "Gust", "Gustave", "Guy", "Gwen", "Gwendolyn", "Hadley", "Hailee", "Hailey", "Hailie", "Hal", "Haleigh", "Haley", "Halie", "Halle", "Hallie", "Hank", "Hanna", "Hannah", "Hans", "Hardy", "Harley", "Harmon", "Harmony", "Harold", "Harrison", "Harry", "Harvey", "Haskell", "Hassan", "Hassie", "Hattie", "Haven", "Hayden", "Haylee", "Hayley", "Haylie", "Hazel", "Hazle", "Heath", "Heather", "Heaven", "Heber", "Hector", "Heidi", "Helen", "Helena", "Helene", "Helga", "Hellen", "Helmer", "Heloise", "Henderson", "Henri", "Henriette", "Henry", "Herbert", "Herman", "Hermann", "Hermina", "Herminia", "Herminio", "Hershel", "Herta", "Hertha", "Hester", "Hettie", "Hilario", "Hilbert", "Hilda", "Hildegard", "Hillard", "Hillary", "Hilma", "Hilton", "Hipolito", "Hiram", "Hobart", "Holden", "Hollie", "Hollis", "Holly", "Hope", "Horace", "Horacio", "Hortense", "Hosea", "Houston", "Howard", "Howell", "Hoyt", "Hubert", "Hudson", "Hugh", "Hulda", "Humberto", "Hunter", "Hyman", "Ian", "Ibrahim", "Icie", "Ida", "Idell", "Idella", "Ignacio", "Ignatius", "Ike", "Ila", "Ilene", "Iliana", "Ima", "Imani", "Imelda", "Immanuel", "Imogene", "Ines", "Irma", "Irving", "Irwin", "Isaac", "Isabel", "Isabell", "Isabella", "Isabelle", "Isac", "Isadore", "Isai", "Isaiah", "Isaias", "Isidro", "Ismael", "Isobel", "Isom", "Israel", "Issac", "Itzel", "Iva", "Ivah", "Ivory", "Ivy", "Izabella", "Izaiah", "Jabari", "Jace", "Jacey", "Jacinthe", "Jacinto", "Jack", "Jackeline", "Jackie", "Jacklyn", "Jackson", "Jacky", "Jaclyn", "Jacquelyn", "Jacques", "Jacynthe", "Jada", "Jade", "Jaden", "Jadon", "Jadyn", "Jaeden", "Jaida", "Jaiden", "Jailyn", "Jaime", "Jairo", "Jakayla", "Jake", "Jakob", "Jaleel", "Jalen", "Jalon", "Jalyn", "Jamaal", "Jamal", "Jamar", "Jamarcus", "Jamel", "Jameson", "Jamey", "Jamie", "Jamil", "Jamir", "Jamison", "Jammie", "Jan", "Jana", "Janae", "Jane", "Janelle", "Janessa", "Janet", "Janice", "Janick", "Janie", "Janis", "Janiya", "Jannie", "Jany", "Jaquan", "Jaquelin", "Jaqueline", "Jared", "Jaren", "Jarod", "Jaron", "Jarred", "Jarrell", "Jarret", "Jarrett", "Jarrod", "Jarvis", "Jasen", "Jasmin", "Jason", "Jasper", "Jaunita", "Javier", "Javon", "Javonte", "Jay", "Jayce", "Jaycee", "Jayda", "Jayde", "Jayden", "Jaydon", "Jaylan", "Jaylen", "Jaylin", "Jaylon", "Jayme", "Jayne", "Jayson", "Jazlyn", "Jazmin", "Jazmyn", "Jazmyne", "Jean", "Jeanette", "Jeanie", "Jeanne", "Jed", "Jedediah", "Jedidiah", "Jeff", "Jefferey", "Jeffery", "Jeffrey", "Jeffry", "Jena", "Jenifer", "Jennie", "Jennifer", "Jennings", "Jennyfer", "Jensen", "Jerad", "Jerald", "Jeramie", "Jeramy", "Jerel", "Jeremie", "Jeremy", "Jermain", "Jermaine", "Jermey", "Jerod", "Jerome", "Jeromy", "Jerrell", "Jerrod", "Jerrold", "Jerry", "Jess", "Jesse", "Jessica", "Jessie", "Jessika", "Jessy", "Jessyca", "Jesus", "Jett", "Jettie", "Jevon", "Jewel", "Jewell", "Jillian", "Jimmie", "Jimmy", "Jo", "Joan", "Joana", "Joanie", "Joanne", "Joannie", "Joanny", "Joany", "Joaquin", "Jocelyn", "Jodie", "Jody", "Joe", "Joel", "Joelle", "Joesph", "Joey", "Johan", "Johann", "Johanna", "Johathan", "John", "Johnathan", "Johnathon", "Johnnie", "Johnny", "Johnpaul", "Johnson", "Jolie", "Jon", "Jonas", "Jonatan", "Jonathan", "Jonathon", "Jordan", "Jordane", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Jose", "Josefa", "Josefina", "Joseph", "Josephine", "Josh", "Joshua", "Joshuah", "Josiah", "Josiane", "Josianne", "Josie", "Josue", "Jovan", "Jovani", "Jovanny", "Jovany", "Joy", "Joyce", "Juana", "Juanita", "Judah", "Judd", "Jude", "Judge", "Judson", "Judy", "Jules", "Julia", "Julian", "Juliana", "Julianne", "Julie", "Julien", "Juliet", "Julio", "Julius", "June", "Junior", "Junius", "Justen", "Justice", "Justina", "Justine", "Juston", "Justus", "Justyn", "Juvenal", "Juwan", "Kacey", "Kaci", "Kacie", "Kade", "Kaden", "Kadin", "Kaela", "Kaelyn", "Kaia", "Kailee", "Kailey", "Kailyn", "Kaitlin", "Kaitlyn", "Kale", "Kaleb", "Kaleigh", "Kaley", "Kali", "Kallie", "Kameron", "Kamille", "Kamren", "Kamron", "Kamryn", "Kane", "Kara", "Kareem", "Karelle", "Karen", "Kari", "Kariane", "Karianne", "Karina", "Karine", "Karl", "Karlee", "Karley", "Karli", "Karlie", "Karolann", "Karson", "Kasandra", "Kasey", "Kassandra", "Katarina", "Katelin", "Katelyn", "Katelynn", "Katharina", "Katherine", "Katheryn", "Kathleen", "Kathlyn", "Kathryn", "Kathryne", "Katlyn", "Katlynn", "Katrina", "Katrine", "Kattie", "Kavon", "Kay", "Kaya", "Kaycee", "Kayden", "Kayla", "Kaylah", "Kaylee", "Kayleigh", "Kayley", "Kayli", "Kaylie", "Kaylin", "Keagan", "Keanu", "Keara", "Keaton", "Keegan", "Keeley", "Keely", "Keenan", "Keira", "Keith", "Kellen", "Kelley", "Kelli", "Kellie", "Kelly", "Kelsi", "Kelsie", "Kelton", "Kelvin", "Ken", "Kendall", "Kendra", "Kendrick", "Kenna", "Kennedi", "Kennedy", "Kenneth", "Kennith", "Kenny", "Kenton", "Kenya", "Kenyatta", "Kenyon", "Keon", "Keshaun", "Keshawn", "Keven", "Kevin", "Kevon", "Keyon", "Keyshawn", "Khalid", "Khalil", "Kian", "Kiana", "Kianna", "Kiara", "Kiarra", "Kiel", "Kiera", "Kieran", "Kiley", "Kim", "Kimberly", "King", "Kip", "Kira", "Kirk", "Kirsten", "Kirstin", "Kitty", "Kobe", "Koby", "Kody", "Kolby", "Kole", "Korbin", "Korey", "Kory", "Kraig", "Kris", "Krista", "Kristian", "Kristin", "Kristina", "Kristofer", "Kristoffer", "Kristopher", "Kristy", "Krystal", "Krystel", "Krystina", "Kurt", "Kurtis", "Kyla", "Kyle", "Kylee", "Kyleigh", "Kyler", "Kylie", "Kyra", "Lacey", "Lacy", "Ladarius", "Lafayette", "Laila", "Laisha", "Lamar", "Lambert", "Lamont", "Lance", "Landen", "Lane", "Laney", "Larissa", "Laron", "Larry", "Larue", "Laura", "Laurel", "Lauren", "Laurence", "Lauretta", "Lauriane", "Laurianne", "Laurie", "Laurine", "Laury", "Lauryn", "Lavada", "Lavern", "Laverna", "Laverne", "Lavina", "Lavinia", "Lavon", "Lavonne", "Lawrence", "Lawson", "Layla", "Layne", "Lazaro", "Lea", "Leann", "Leanna", "Leanne", "Leatha", "Leda", "Lee", "Leif", "Leila", "Leilani", "Lela", "Lelah", "Leland", "Lelia", "Lempi", "Lemuel", "Lenna", "Lennie", "Lenny", "Lenora", "Lenore", "Leo", "Leola", "Leon", "Leonard", "Leonardo", "Leone", "Leonel", "Leonie", "Leonor", "Leonora", "Leopold", "Leopoldo", "Leora", "Lera", "Lesley", "Leslie", "Lesly", "Lessie", "Lester", "Leta", "Letha", "Letitia", "Levi", "Lew", "Lewis", "Lexi", "Lexie", "Lexus", "Lia", "Liam", "Liana", "Libbie", "Libby", "Lila", "Lilian", "Liliana", "Liliane", "Lilla", "Lillian", "Lilliana", "Lillie", "Lilly", "Lily", "Lilyan", "Lina", "Lincoln", "Linda", "Lindsay", "Lindsey", "Linnea", "Linnie", "Linwood", "Lionel", "Lisa", "Lisandro", "Lisette", "Litzy", "Liza", "Lizeth", "Lizzie", "Llewellyn", "Lloyd", "Logan", "Lois", "Lola", "Lolita", "Loma", "Lon", "London", "Lonie", "Lonnie", "Lonny", "Lonzo", "Lora", "Loraine", "Loren", "Lorena", "Lorenz", "Lorenza", "Lorenzo", "Lori", "Lorine", "Lorna", "Lottie", "Lou", "Louie", "Louisa", "Lourdes", "Louvenia", "Lowell", "Loy", "Loyal", "Loyce", "Lucas", "Luciano", "Lucie", "Lucienne", "Lucile", "Lucinda", "Lucio", "Lucious", "Lucius", "Lucy", "Ludie", "Ludwig", "Lue", "Luella", "Luigi", "Luis", "Luisa", "Lukas", "Lula", "Lulu", "Luna", "Lupe", "Lura", "Lurline", "Luther", "Luz", "Lyda", "Lydia", "Lyla", "Lynn", "Lyric", "Lysanne", "Mabel", "Mabelle", "Mable", "Mac", "Macey", "Maci", "Macie", "Mack", "Mackenzie", "Macy", "Madaline", "Madalyn", "Maddison", "Madeline", "Madelyn", "Madelynn", "Madge", "Madie", "Madilyn", "Madisen", "Madison", "Madisyn", "Madonna", "Madyson", "Mae", "Maegan", "Maeve", "Mafalda", "Magali", "Magdalen", "Magdalena", "Maggie", "Magnolia", "Magnus", "Maia", "Maida", "Maiya", "Major", "Makayla", "Makenna", "Makenzie", "Malachi", "Malcolm", "Malika", "Malinda", "Mallie", "Mallory", "Malvina", "Mandy", "Manley", "Manuel", "Manuela", "Mara", "Marc", "Marcel", "Marcelina", "Marcelino", "Marcella", "Marcelle", "Marcellus", "Marcelo", "Marcia", "Marco", "Marcos", "Marcus", "Margaret", "Margarete", "Margarett", "Margaretta", "Margarette", "Margarita", "Marge", "Margie", "Margot", "Margret", "Marguerite", "Maria", "Mariah", "Mariam", "Marian", "Mariana", "Mariane", "Marianna", "Marianne", "Mariano", "Maribel", "Marie", "Mariela", "Marielle", "Marietta", "Marilie", "Marilou", "Marilyne", "Marina", "Mario", "Marion", "Marisa", "Marisol", "Maritza", "Marjolaine", "Marjorie", "Marjory", "Mark", "Markus", "Marlee", "Marlen", "Marlene", "Marley", "Marlin", "Marlon", "Marques", "Marquis", "Marquise", "Marshall", "Marta", "Martin", "Martina", "Martine", "Marty", "Marvin", "Mary", "Maryam", "Maryjane", "Maryse", "Mason", "Mateo", "Mathew", "Mathias", "Mathilde", "Matilda", "Matilde", "Matt", "Matteo", "Mattie", "Maud", "Maude", "Maudie", "Maureen", "Maurice", "Mauricio", "Maurine", "Maverick", "Mavis", "Max", "Maxie", "Maxime", "Maximilian", "Maximillia", "Maximillian", "Maximo", "Maximus", "Maxine", "Maxwell", "May", "Maya", "Maybell", "Maybelle", "Maye", "Maymie", "Maynard", "Mayra", "Mazie", "Mckayla", "Mckenna", "Mckenzie", "Meagan", "Meaghan", "Meda", "Megane", "Meggie", "Meghan", "Mekhi", "Melany", "Melba", "Melisa", "Melissa", "Mellie", "Melody", "Melvin", "Melvina", "Melyna", "Melyssa", "Mercedes", "Meredith", "Merl", "Merle", "Merlin", "Merritt", "Mertie", "Mervin", "Meta", "Mia", "Micaela", "Micah", "Michael", "Michaela", "Michale", "Micheal", "Michel", "Michele", "Michelle", "Miguel", "Mikayla", "Mike", "Mikel", "Milan", "Miles", "Milford", "Miller", "Millie", "Milo", "Milton", "Mina", "Minerva", "Minnie", "Miracle", "Mireille", "Mireya", "Misael", "Missouri", "Misty", "Mitchel", "Mitchell", "Mittie", "Modesta", "Modesto", "Mohamed", "Mohammad", "Mohammed", "Moises", "Mollie", "Molly", "Mona", "Monica", "Monique", "Monroe", "Monserrat", "Monserrate", "Montana", "Monte", "Monty", "Morgan", "Moriah", "Morris", "Mortimer", "Morton", "Mose", "Moses", "Moshe", "Mossie", "Mozell", "Mozelle", "Muhammad", "Muriel", "Murl", "Murphy", "Murray", "Mustafa", "Mya", "Myah", "Mylene", "Myles", "Myra", "Myriam", "Myrl", "Myrna", "Myron", "Myrtice", "Myrtie", "Myrtis", "Myrtle", "Nadia", "Nakia", "Name", "Nannie", "Naomi", "Naomie", "Napoleon", "Narciso", "Nash", "Nasir", "Nat", "Natalia", "Natalie", "Natasha", "Nathan", "Nathanael", "Nathanial", "Nathaniel", "Nathen", "Nayeli", "Neal", "Ned", "Nedra", "Neha", "Neil", "Nelda", "Nella", "Nelle", "Nellie", "Nels", "Nelson", "Neoma", "Nestor", "Nettie", "Neva", "Newell", "Newton", "Nia", "Nicholas", "Nicholaus", "Nichole", "Nick", "Nicklaus", "Nickolas", "Nico", "Nicola", "Nicolas", "Nicole", "Nicolette", "Nigel", "Nikita", "Nikki", "Nikko", "Niko", "Nikolas", "Nils", "Nina", "Noah", "Noble", "Noe", "Noel", "Noelia", "Noemi", "Noemie", "Noemy", "Nola", "Nolan", "Nona", "Nora", "Norbert", "Norberto", "Norene", "Norma", "Norris", "Norval", "Norwood", "Nova", "Novella", "Nya", "Nyah", "Nyasia", "Obie", "Oceane", "Ocie", "Octavia", "Oda", "Odell", "Odessa", "Odie", "Ofelia", "Okey", "Ola", "Olaf", "Ole", "Olen", "Oleta", "Olga", "Olin", "Oliver", "Ollie", "Oma", "Omari", "Omer", "Ona", "Onie", "Opal", "Ophelia", "Ora", "Oral", "Oran", "Oren", "Orie", "Orin", "Orion", "Orland", "Orlando", "Orlo", "Orpha", "Orrin", "Orval", "Orville", "Osbaldo", "Osborne", "Oscar", "Osvaldo", "Oswald", "Oswaldo", "Otha", "Otho", "Otilia", "Otis", "Ottilie", "Ottis", "Otto", "Ova", "Owen", "Ozella", "Pablo", "Paige", "Palma", "Pamela", "Pansy", "Paolo", "Paris", "Parker", "Pascale", "Pasquale", "Pat", "Patience", "Patricia", "Patrick", "Patsy", "Pattie", "Paul", "Paula", "Pauline", "Paxton", "Payton", "Pearl", "Pearlie", "Pearline", "Pedro", "Peggie", "Penelope", "Percival", "Percy", "Perry", "Pete", "Peter", "Petra", "Peyton", "Philip", "Phoebe", "Phyllis", "Pierce", "Pierre", "Pietro", "Pink", "Pinkie", "Piper", "Polly", "Porter", "Precious", "Presley", "Preston", "Price", "Prince", "Princess", "Priscilla", "Providenci", "Prudence", "Queen", "Queenie", "Quentin", "Quincy", "Quinn", "Quinten", "Quinton", "Rachael", "Rachel", "Rachelle", "Rae", "Raegan", "Rafael", "Rafaela", "Raheem", "Rahsaan", "Rahul", "Raina", "Raleigh", "Ralph", "Ramiro", "Ramon", "Ramona", "Randal", "Randall", "Randi", "Randy", "Ransom", "Raoul", "Raphael", "Raphaelle", "Raquel", "Rashad", "Rashawn", "Rasheed", "Raul", "Raven", "Ray", "Raymond", "Raymundo", "Reagan", "Reanna", "Reba", "Rebeca", "Rebecca", "Rebeka", "Rebekah", "Reece", "Reed", "Reese", "Regan", "Reggie", "Reginald", "Reid", "Reilly", "Reina", "Reinhold", "Remington", "Rene", "Renee", "Ressie", "Reta", "Retha", "Retta", "Reuben", "Reva", "Rex", "Rey", "Reyes", "Reymundo", "Reyna", "Reynold", "Rhea", "Rhett", "Rhianna", "Rhiannon", "Rhoda", "Ricardo", "Richard", "Richie", "Richmond", "Rick", "Rickey", "Rickie", "Ricky", "Rico", "Rigoberto", "Riley", "Rita", "River", "Robb", "Robbie", "Robert", "Roberta", "Roberto", "Robin", "Robyn", "Rocio", "Rocky", "Rod", "Roderick", "Rodger", "Rodolfo", "Rodrick", "Rodrigo", "Roel", "Rogelio", "Roger", "Rogers", "Rolando", "Rollin", "Roma", "Romaine", "Roman", "Ron", "Ronaldo", "Ronny", "Roosevelt", "Rory", "Rosa", "Rosalee", "Rosalia", "Rosalind", "Rosalinda", "Rosalyn", "Rosamond", "Rosanna", "Rosario", "Roscoe", "Rose", "Rosella", "Roselyn", "Rosemarie", "Rosemary", "Rosendo", "Rosetta", "Rosie", "Rosina", "Roslyn", "Ross", "Rossie", "Rowan", "Rowena", "Rowland", "Roxane", "Roxanne", "Roy", "Royal", "Royce", "Rozella", "Ruben", "Rubie", "Ruby", "Rubye", "Rudolph", "Rudy", "Rupert", "Russ", "Russel", "Russell", "Rusty", "Ruth", "Ruthe", "Ruthie", "Ryan", "Ryann", "Ryder", "Rylan", "Rylee", "Ryleigh", "Ryley", "Sabina", "Sabrina", "Sabryna", "Sadie", "Sadye", "Sage", "Saige", "Sallie", "Sally", "Salma", "Salvador", "Salvatore", "Sam", "Samanta", "Samantha", "Samara", "Samir", "Sammie", "Sammy", "Samson", "Sandra", "Sandrine", "Sandy", "Sanford", "Santa", "Santiago", "Santina", "Santino", "Santos", "Sarah", "Sarai", "Sarina", "Sasha", "Saul", "Savanah", "Savanna", "Savannah", "Savion", "Scarlett", "Schuyler", "Scot", "Scottie", "Scotty", "Seamus", "Sean", "Sebastian", "Sedrick", "Selena", "Selina", "Selmer", "Serena", "Serenity", "Seth", "Shad", "Shaina", "Shakira", "Shana", "Shane", "Shanel", "Shanelle", "Shania", "Shanie", "Shaniya", "Shanna", "Shannon", "Shanny", "Shanon", "Shany", "Sharon", "Shaun", "Shawn", "Shawna", "Shaylee", "Shayna", "Shayne", "Shea", "Sheila", "Sheldon", "Shemar", "Sheridan", "Sherman", "Sherwood", "Shirley", "Shyann", "Shyanne", "Sibyl", "Sid", "Sidney", "Sienna", "Sierra", "Sigmund", "Sigrid", "Sigurd", "Silas", "Sim", "Simeon", "Simone", "Sincere", "Sister", "Skye", "Skyla", "Skylar", "Sofia", "Soledad", "Solon", "Sonia", "Sonny", "Sonya", "Sophia", "Sophie", "Spencer", "Stacey", "Stacy", "Stan", "Stanford", "Stanley", "Stanton", "Stefan", "Stefanie", "Stella", "Stephan", "Stephania", "Stephanie", "Stephany", "Stephen", "Stephon", "Sterling", "Steve", "Stevie", "Stewart", "Stone", "Stuart", "Summer", "Sunny", "Susan", "Susana", "Susanna", "Susie", "Suzanne", "Sven", "Syble", "Sydnee", "Sydney", "Sydni", "Sydnie", "Sylvan", "Sylvester", "Sylvia", "Tabitha", "Tad", "Talia", "Talon", "Tamara", "Tamia", "Tania", "Tanner", "Tanya", "Tara", "Taryn", "Tate", "Tatum", "Tatyana", "Taurean", "Tavares", "Taya", "Taylor", "Teagan", "Ted", "Telly", "Terence", "Teresa", "Terrance", "Terrell", "Terrence", "Terrill", "Terry", "Tess", "Tessie", "Tevin", "Thad", "Thaddeus", "Thalia", "Thea", "Thelma", "Theo", "Theodora", "Theodore", "Theresa", "Therese", "Theresia", "Theron", "Thomas", "Thora", "Thurman", "Tia", "Tiana", "Tianna", "Tiara", "Tierra", "Tiffany", "Tillman", "Timmothy", "Timmy", "Timothy", "Tina", "Tito", "Titus", "Tobin", "Toby", "Tod", "Tom", "Tomas", "Tomasa", "Tommie", "Toney", "Toni", "Tony", "Torey", "Torrance", "Torrey", "Toy", "Trace", "Tracey", "Tracy", "Travis", "Travon", "Tre", "Tremaine", "Tremayne", "Trent", "Trenton", "Tressa", "Tressie", "Treva", "Trever", "Trevion", "Trevor", "Trey", "Trinity", "Trisha", "Tristian", "Tristin", "Triston", "Troy", "Trudie", "Trycia", "Trystan", "Turner", "Twila", "Tyler", "Tyra", "Tyree", "Tyreek", "Tyrel", "Tyrell", "Tyrese", "Tyrique", "Tyshawn", "Tyson", "Ubaldo", "Ulices", "Ulises", "Una", "Unique", "Urban", "Uriah", "Uriel", "Ursula", "Vada", "Valentin", "Valentina", "Valentine", "Valerie", "Vallie", "Van", "Vance", "Vanessa", "Vaughn", "Veda", "Velda", "Vella", "Velma", "Velva", "Vena", "Verda", "Verdie", "Vergie", "Verla", "Verlie", "Vern", "Verna", "Verner", "Vernice", "Vernie", "Vernon", "Verona", "Veronica", "Vesta", "Vicenta", "Vicente", "Vickie", "Vicky", "Victor", "Victoria", "Vida", "Vidal", "Vilma", "Vince", "Vincent", "Vincenza", "Vincenzo", "Vinnie", "Viola", "Violet", "Violette", "Virgie", "Virgil", "Virginia", "Virginie", "Vita", "Vito", "Viva", "Vivian", "Viviane", "Vivianne", "Vivien", "Vivienne", "Vladimir", "Wade", "Waino", "Waldo", "Walker", "Wallace", "Walter", "Walton", "Wanda", "Ward", "Warren", "Watson", "Wava", "Waylon", "Wayne", "Webster", "Weldon", "Wellington", "Wendell", "Wendy", "Werner", "Westley", "Weston", "Whitney", "Wilber", "Wilbert", "Wilburn", "Wiley", "Wilford", "Wilfred", "Wilfredo", "Wilfrid", "Wilhelm", "Wilhelmine", "Will", "Willa", "Willard", "William", "Willie", "Willis", "Willow", "Willy", "Wilma", "Wilmer", "Wilson", "Wilton", "Winfield", "Winifred", "Winnifred", "Winona", "Winston", "Woodrow", "Wyatt", "Wyman", "Xander", "Xavier", "Xzavier", "Yadira", "Yasmeen", "Yasmin", "Yasmine", "Yazmin", "Yesenia", "Yessenia", "Yolanda", "Yoshiko", "Yvette", "Yvonne", "Zachariah", "Zachary", "Zachery", "Zack", "Zackary", "Zackery", "Zakary", "Zander", "Zane", "Zaria", "Zechariah", "Zelda", "Zella", "Zelma", "Zena", "Zetta", "Zion", "Zita", "Zoe", "Zoey", "Zoie", "Zoila", "Zola", "Zora", "Zula"}, - "middle": {"Abdul", "Abdullah", "Abigail", "Ada", "Adam", "Adelaide", "Adele", "Adelina", "Adrian", "Adriana", "Agnes", "Agnolo", "Ahmed", "Aida", "Aileen", "Aimee", "Akilesh", "Akio", "Alan", "Alana", "Alejandro", "Alex", "Ali", "Alice", "Alicia", "Alina", "Alison", "Alita", "Allegretta", "Alonzo", "Alyssa", "Aman", "Amara", "Amelda", "Amelia", "Amenra", "Amina", "Amir", "Amitabh", "Amy", "Ana", "Anastasia", "André", "Andrea", "Andrei", "Andrew", "Andy", "Angel", "Angela", "Anita", "Ann", "Anna", "Anne", "Annette", "Anthony", "Antioco", "Antonio", "Arduino", "Aria", "Ariana", "Ariel", "Aris", "Arjun", "Armando", "Asha", "Ashton", "Asong", "Athena", "Audrey", "August", "Aura", "Aurelia", "Austen", "Ava", "Avery", "Avril", "Badru", "Bailey", "Bakul", "Baldwin", "Bao", "Barack", "Bear", "Beatrice", "Beau", "Belinda", "Bella", "Belle", "Ben", "Benjamin", "Bertha", "Beverly", "Bharati", "Bhoja", "Bhuma", "Bianca", "Bird", "Birdie", "Bishvajit", "Bjorn", "Blair", "Blake", "Blanca", "Bliss", "Blue", "Bo", "Bobbie", "Bonnie", "Boris", "Bradley", "Brandt", "Braulia", "Breck", "Bree", "Brett", "Brianna", "Bridget", "Brie", "Brielle", "Brittany", "Brizio", "Brook", "Brooke", "Brooks", "Bruce", "Bryce", "Bryn", "Brynn", "Burke", "Cajetan", "Calvin", "Cameron", "Camilla", "Candice", "Carla", "Carlos", "Carmen", "Caroline", "Carson", "Casey", "Cash", "Cassandra", "Cassidy", "Catherine", "Cecelia", "Cecilia", "Cedric", "Celeste", "Celia", "Celso", "Chahna", "Chance", "Chander", "Chandler", "Chang", "Charles", "Charlie", "Charlotte", "Chen", "Chintak", "Chloe", "Chris", "Christine", "Chung", "Cimeron", "Cindy", "Ciprianna", "Ciro", "Claire", "Clara", "Clarissa", "Clark", "Clarke", "Claude", "Claudia", "Clay", "Clementine", "Clint", "Cody", "Cole", "Colette", "Cora", "Cordelia", "Corey", "Corinne", "Cory", "Cosme", "Courtney", "Cree", "Crew", "Cynthia", "Cyprienne", "Cyrus", "Daan", "Dada", "Daisy", "Dakota", "Dale", "Damodar", "Dan", "Dana", "Dane", "Daniel", "Danielle", "Danveer", "Daphne", "Darla", "David", "Davide", "Dawn", "Dax", "Dean", "Deborah", "Delilah", "Denise", "Denver", "Deshal", "Deshawn", "Dev", "Devin", "Dhavala", "Diana", "Diane", "Diego", "Dmitri", "Dolores", "Dolorita", "Donato", "Dong", "Donna", "Donte", "Donya", "Dora", "Doris", "Dorothy", "Drake", "Drew", "Dru", "Dylan", "Ean", "Edith", "Eduardo", "Edward", "Eila", "Eileen", "Elaine", "Elda", "Eleanor", "Elena", "Eliana", "Elias", "Elise", "Eliza", "Elizabeth", "Ella", "Elle", "Ellen", "Ellie", "Ellis", "Eloise", "Elsa", "Elsie", "Em", "Emerson", "Emery", "Emilie", "Emilio", "Emily", "Emma", "Emmett", "Enrico", "Enrique", "Epifania", "Erica", "Erik", "Erin", "Eroica", "Esperanza", "Estelle", "Esther", "Etta", "Ettore", "Eva", "Evan", "Eve", "Evelyn", "Everett", "Faith", "Farid", "Faye", "Federico", "Felicity", "Felipe", "Felix", "Fern", "Fernando", "Finley", "Finn", "Fiona", "Fitz", "Flint", "Flora", "Florence", "Flynn", "Folke", "Fonzo", "Fox", "Frances", "Francis", "Francisco", "Francois", "François", "Frank", "Frankie", "Freya", "Fumio", "Fynn", "Gabriel", "Gabriella", "Gael", "Gage", "Gail", "Gemma", "Genevieve", "George", "Georgia", "Geraldine", "Giannino", "Ginetta", "Gioia", "Giselle", "Giuseppe", "Giustino", "Glenn", "Gloria", "Glory", "Grace", "Grant", "Gray", "Greer", "Greta", "Guido", "Guillermo", "Gulshan", "Gus", "Gwen", "Gyula", "Hank", "Hannah", "Hans", "Harley", "Harper", "Harriet", "Harrison", "Harshad", "Haruki", "Hayden", "Hayes", "Haze", "Hazel", "Heath", "Heather", "Hector", "Helen", "Helena", "Henry", "Hideki", "Hidetoshi", "Himesh", "Hiro", "Hiroaki", "Hirofumi", "Hirokazu", "Hiroshi", "Hiroto", "Hiroyuki", "Holly", "Honor", "Hope", "Hugh", "Hugo", "Hunter", "Ida", "Ignacio", "Imogen", "Ingrid", "Irene", "Iris", "Isaac", "Isabel", "Isabella", "Isabelle", "Ivan", "Ivy", "Jace", "Jack", "Jacqueline", "Jade", "Jaden", "Jae", "Jai", "Jaime", "Jamal", "James", "Jamie", "Jan", "Janak", "Jane", "Janet", "Janice", "Jasmine", "Jasper", "Javier", "Jax", "Jay", "Jayden", "Jayne", "Jean", "Jeanne", "Jed", "Jenna", "Jennifer", "Jesse", "Jessica", "Jill", "Jin", "Joan", "Joanna", "João", "Jocelyn", "Jodi", "Jody", "Joe", "Joey", "Johanna", "Johar", "John", "Jolene", "Jordan", "Jorge", "Jose", "José", "Joseph", "Josephine", "Josie", "Joy", "Joyce", "Juan", "Juanita", "Judd", "Jude", "Judith", "Jules", "Julia", "Julian", "Juliana", "Julianne", "Julie", "June", "Justine", "Kael", "Kai", "Kane", "Karen", "Kate", "Katherine", "Kathleen", "Kathryn", "Katie", "Katrina", "Kay", "Kayla", "Kazuki", "Keira", "Kelly", "Kelsey", "Kendall", "Kendra", "Kennedy", "Kent", "Kenta", "Kerry", "Khaled", "Khloe", "Kiara", "Kim", "Kimberly", "Kit", "Kiyoshi", "Klaus", "Knight", "Knox", "Koen", "Koi", "Koichi", "Koji", "Kolt", "Kristen", "Kristina", "Kurt", "Kwame", "Kye", "Kylie", "Lacey", "Laine", "Lake", "Lakshman", "Lalika", "Lane", "Lark", "Lars", "Laurel", "Layne", "Lee", "Leif", "Lennon", "Leo", "Leon", "Leslie", "Liam", "Liberty", "Lilian", "Lillian", "Lillie", "Link", "Liz", "Locke", "Logan", "Lona", "Lorena", "Lorenzo", "Lou", "Louise", "Love", "Lucia", "Lucy", "Luis", "Luiz", "Luke", "Lupita", "Lux", "Luz", "Lydia", "Lynn", "Mabel", "Mac", "Mack", "Mackenzie", "Madeline", "Madison", "Madona", "Mae", "Mael", "Makoto", "Manuel", "Manuela", "Maple", "Marc", "Marco", "Margaret", "Margo", "Margot", "Maria", "Mariano", "Maricela", "Marilyn", "Mario", "Mark", "Marley", "Mars", "Marti", "Mary", "Mason", "Matthew", "Mavis", "Max", "May", "Mazie", "Mei", "Melody", "Mercy", "Merle", "Micah", "Michael", "Miguel", "Mina", "Ming", "Mohamed", "Mollie", "Monroe", "Morgan", "Muhammad", "Musetta", "Myra", "Nadine", "Naomi", "Nardo", "Nat", "Natalie", "Neal", "Neil", "Nellie", "Nerola", "Nevada", "Neve", "Nikolai", "Niles", "Noel", "Nola", "Nora", "Nuru", "Oakley", "Olive", "Oliver", "Opal", "Orazio", "Ortensa", "Ortensia", "Osamu", "Oscar", "Otto", "Pablo", "Paige", "Pancho", "Paris", "Parker", "Pat", "Patrick", "Paul", "Pauli", "Pax", "Peace", "Pearl", "Pedro", "Penelope", "Penn", "Penny", "Peter", "Petra", "Peyton", "Phoenix", "Pierce", "Pierre", "Pilar", "Porter", "Praise", "Pratap", "Presley", "Priscilla", "Quinn", "Rachanna", "Radames", "Rae", "Rafael", "Rain", "Raine", "Ramiro", "Ramon", "Ramona", "Raphael", "Raul", "Ravi", "Ray", "Rayne", "Reagan", "Reece", "Reed", "Reese", "Rei", "Reid", "Reilly", "Remy", "Ren", "Reyes", "Rhodes", "Ricardo", "Richard", "Riley", "Rita", "River", "Rivera", "Roan", "Robert", "Roberto", "Robin", "Robt", "Rodrigo", "Roma", "Romelia", "Rory", "Rosa", "Rosalee", "Rosalie", "Rosalynn", "Rosario", "Rose", "Ross", "Rowan", "Ruben", "Ruby", "Rue", "Rush", "Russell", "Ruth", "Ryan", "Saad", "Saariq", "Sade", "Sadie", "Sagara", "Sage", "Saige", "Saint", "Salvadora", "Sam", "Samir", "Samuel", "Sante", "Santiago", "Sara", "Sasha", "Satoshi", "Scott", "Sean", "Sebastian", "Sergei", "Sergio", "Seth", "Shae", "Shai", "Shane", "Shannon", "Shashi", "Shaun", "Shawn", "Shawnee", "Shay", "Shea", "Shelby", "Shin", "Sidney", "Simon", "Sky", "Skye", "Skyler", "Sol", "Sophie", "Spencer", "Star", "Starr", "Stella", "Steve", "Stevie", "Storm", "Susan", "Sven", "Sybil", "Sydney", "Tahj", "Takashi", "Takeshi", "Taryn", "Tatum", "Taylor", "Teagan", "Terry", "Tess", "Thea", "Theodore", "Thomas", "Tilly", "Timothy", "Tosca", "Trent", "Tripp", "Tristan", "Truth", "Tyler", "Tyrone", "Uberto", "Ursus", "Val", "Vandelia", "Vaughn", "Vera", "Vernon", "Verona", "Vianna", "Victoria", "Vida", "Vieda", "Vince", "Vincent", "Violet", "Virginia", "Vivian", "Vladimir", "Wade", "Wayne", "Wes", "Wesley", "West", "Whitney", "Will", "Willa", "William", "Willie", "Winston", "Winter", "Wolf", "Wren", "Wynn", "Xavier", "Yasuo", "Yoel", "Yolanda", "Yoshi", "Yoshiaki", "Yoshihiro", "Yoshiki", "Yoshinori", "Yoshio", "Yusuf", "Yutaka", "Zain", "Zane", "Zayd", "Zelda", "Zeus", "Zev", "Zhang", "Zhen", "Zola", "Zora", "Zuni"}, - "last": {"Abbott", "Abernathy", "Abshire", "Adams", "Altenwerth", "Anderson", "Ankunding", "Armstrong", "Auer", "Aufderhar", "Bahringer", "Bailey", "Balistreri", "Barrows", "Bartell", "Bartoletti", "Barton", "Bashirian", "Batz", "Bauch", "Baumbach", "Bayer", "Beahan", "Beatty", "Bechtelar", "Becker", "Bednar", "Beer", "Beier", "Berge", "Bergnaum", "Bergstrom", "Bernhard", "Bernier", "Bins", "Blanda", "Blick", "Block", "Bode", "Boehm", "Bogan", "Bogisich", "Borer", "Bosco", "Botsford", "Boyer", "Boyle", "Bradtke", "Brakus", "Braun", "Breitenberg", "Brekke", "Brown", "Bruen", "Buckridge", "Carroll", "Carter", "Cartwright", "Casper", "Cassin", "Champlin", "Christiansen", "Cole", "Collier", "Collins", "Conn", "Connelly", "Conroy", "Considine", "Corkery", "Cormier", "Corwin", "Cremin", "Crist", "Crona", "Cronin", "Crooks", "Cruickshank", "Cummerata", "Cummings", "Dach", "Damore", "Daniel", "Dare", "Daugherty", "Davis", "Deckow", "Denesik", "Dibbert", "Dickens", "Dicki", "Dickinson", "Dietrich", "Donnelly", "Dooley", "Douglas", "Doyle", "DuBuque", "Durgan", "Ebert", "Effertz", "Eichmann", "Emard", "Emmerich", "Erdman", "Ernser", "Fadel", "Fahey", "Farrell", "Fay", "Feeney", "Feest", "Feil", "Ferry", "Fisher", "Flatley", "Frami", "Franecki", "Friesen", "Fritsch", "Funk", "Gaylord", "Gerhold", "Gerlach", "Gibson", "Gislason", "Gleason", "Gleichner", "Glover", "Goldner", "Goodwin", "Gorczany", "Gottlieb", "Goyette", "Grady", "Graham", "Grant", "Green", "Greenfelder", "Greenholt", "Grimes", "Gulgowski", "Gusikowski", "Gutkowski", "Gutmann", "Haag", "Hackett", "Hagenes", "Hahn", "Haley", "Halvorson", "Hamill", "Hammes", "Hand", "Hane", "Hansen", "Harber", "Harris", "Hartmann", "Harvey", "Hauck", "Hayes", "Heaney", "Heathcote", "Hegmann", "Heidenreich", "Heller", "Herman", "Hermann", "Hermiston", "Herzog", "Hessel", "Hettinger", "Hickle", "Hilll", "Hills", "Hilpert", "Hintz", "Hirthe", "Hodkiewicz", "Hoeger", "Homenick", "Hoppe", "Howe", "Howell", "Hudson", "Huel", "Huels", "Hyatt", "Jacobi", "Jacobs", "Jacobson", "Jakubowski", "Jaskolski", "Jast", "Jenkins", "Jerde", "Jewess", "Johns", "Johnson", "Johnston", "Jones", "Kassulke", "Kautzer", "Keebler", "Keeling", "Kemmer", "Kerluke", "Kertzmann", "Kessler", "Kiehn", "Kihn", "Kilback", "King", "Kirlin", "Klein", "Kling", "Klocko", "Koch", "Koelpin", "Koepp", "Kohler", "Konopelski", "Koss", "Kovacek", "Kozey", "Krajcik", "Kreiger", "Kris", "Kshlerin", "Kub", "Kuhic", "Kuhlman", "Kuhn", "Kulas", "Kunde", "Kunze", "Kuphal", "Kutch", "Kuvalis", "Labadie", "Lakin", "Lang", "Langosh", "Langworth", "Larkin", "Larson", "Leannon", "Lebsack", "Ledner", "Leffler", "Legros", "Lehner", "Lemke", "Lesch", "Leuschke", "Lind", "Lindgren", "Littel", "Little", "Lockman", "Lowe", "Lubowitz", "Lueilwitz", "Luettgen", "Lynch", "Macejkovic", "Maggio", "Mann", "Mante", "Marks", "Marquardt", "Marvin", "Mayer", "Mayert", "McClure", "McCullough", "McDermott", "McGlynn", "McKenzie", "McLaughlin", "Medhurst", "Mertz", "Metz", "Miller", "Mills", "Mitchell", "Moen", "Mohr", "Monahan", "Moore", "Morar", "Morissette", "Mosciski", "Mraz", "Mueller", "Muller", "Murazik", "Murphy", "Murray", "Nader", "Nicolas", "Nienow", "Nikolaus", "Nitzsche", "Nolan", "Oberbrunner", "Okuneva", "Olson", "Ondricka", "OReilly", "Orn", "Ortiz", "Osinski", "Pacocha", "Padberg", "Pagac", "Parisian", "Parker", "Paucek", "Pfannerstill", "Pfeffer", "Pollich", "Pouros", "Powlowski", "Predovic", "Price", "Prohaska", "Prosacco", "Purdy", "Quigley", "Quitzon", "Rath", "Ratke", "Rau", "Raynor", "Reichel", "Reichert", "Reilly", "Reinger", "Rempel", "Renner", "Reynolds", "Rice", "Rippin", "Ritchie", "Robel", "Roberts", "Rodriguez", "Rogahn", "Rohan", "Rolfson", "Romaguera", "Roob", "Rosenbaum", "Rowe", "Ruecker", "Runolfsdottir", "Runolfsson", "Runte", "Russel", "Rutherford", "Ryan", "Sanford", "Satterfield", "Sauer", "Sawayn", "Schaden", "Schaefer", "Schamberger", "Schiller", "Schimmel", "Schinner", "Schmeler", "Schmidt", "Schmitt", "Schneider", "Schoen", "Schowalter", "Schroeder", "Schulist", "Schultz", "Schumm", "Schuppe", "Schuster", "Senger", "Shanahan", "Shields", "Simonis", "Sipes", "Skiles", "Smith", "Smitham", "Spencer", "Spinka", "Sporer", "Stamm", "Stanton", "Stark", "Stehr", "Steuber", "Stiedemann", "Stokes", "Stoltenberg", "Stracke", "Streich", "Stroman", "Strosin", "Swaniawski", "Swift", "Terry", "Thiel", "Thompson", "Tillman", "Torp", "Torphy", "Towne", "Toy", "Trantow", "Tremblay", "Treutel", "Tromp", "Turcotte", "Turner", "Ullrich", "Upton", "Vandervort", "Veum", "Volkman", "Von", "VonRueden", "Waelchi", "Walker", "Walsh", "Walter", "Ward", "Waters", "Watsica", "Weber", "Wehner", "Weimann", "Weissnat", "Welch", "West", "White", "Wiegand", "Wilderman", "Wilkinson", "Will", "Williamson", "Willms", "Windler", "Wintheiser", "Wisoky", "Wisozk", "Witting", "Wiza", "Wolf", "Wolff", "Wuckert", "Wunsch", "Wyman", "Yost", "Yundt", "Zboncak", "Zemlak", "Ziemann", "Zieme", "Zulauf"}, - "hobby": {"3D printing", "Acrobatics", "Acting", "Amateur radio", "Animation", "Aquascaping", "Astrology", "Astronomy", "Baking", "Baton twirling", "Blogging", "Building", "Board/tabletop games", "Book discussion clubs", "Book restoration", "Bowling", "Brazilian jiu-jitsu", "Breadmaking", "Bullet journaling", "Cabaret", "Calligraphy", "Candle making", "Candy making", "Car fixing & building", "Card games", "Cheesemaking", "Cleaning", "Clothesmaking", "Coffee roasting", "Collecting", "Coloring", "Computer programming", "Confectionery", "Cooking", "Cosplaying", "Couponing", "Craft", "Creative writing", "Crocheting", "Cross-stitch", "Crossword puzzles", "Cryptography", "Cue sports", "Dance", "Digital arts", "Distro Hopping", "DJing", "Do it yourself", "Drama", "Drawing", "Drink mixing", "Drinking", "Electronic games", "Electronics", "Embroidery", "Experimenting", "Fantasy sports", "Fashion", "Fashion design", "Fishkeeping", "Filmmaking", "Flower arranging", "Fly tying", "Foreign language learning", "Furniture building", "Gaming", "Genealogy", "Gingerbread house making", "Glassblowing", "Graphic design", "Gunsmithing", "Gymnastics", "Hacking", "Herp keeping", "Home improvement", "Homebrewing", "Houseplant care", "Hula hooping", "Humor", "Hydroponics", "Ice skating", "Jewelry making", "Jigsaw puzzles", "Journaling", "Juggling", "Karaoke", "Karate", "Kendama", "Knife making", "Knitting", "Knot tying", "Kombucha brewing", "Lace making", "Lapidary", "Leather crafting", "Lego building", "Lock picking", "Listening to music", "Listening to podcasts", "Machining", "Macrame", "Magic", "Makeup", "Mazes (indoor/outdoor)", "Metalworking", "Model building", "Model engineering", "Nail art", "Needlepoint", "Origami", "Painting", "Palmistry", "Pet adoption & fostering", "Philately", "Photography", "Practical jokes", "Pressed flower craft", "Playing musical instruments", "Poi", "Pottery", "Powerlifting", "Puzzles", "Quilling", "Quilting", "Quizzes", "Radio-controlled model", "Rail transport modeling", "Rapping", "Reading", "Refinishing", "Reiki", "Robot combat", "Rubik's Cube", "Scrapbooking", "Sculpting", "Sewing", "Shoemaking", "Singing", "Sketching", "Skipping rope", "Slot car", "Soapmaking", "Social media", "Spreadsheets", "Stand-up comedy", "Stamp collecting", "Table tennis", "Tarot", "Taxidermy", "Thrifting", "Video editing", "Video game developing", "Video gaming", "Watching movies", "Watching television", "Videography", "Virtual reality", "Waxing", "Weaving", "Weight training", "Welding", "Whittling", "Wikipedia editing", "Winemaking", "Wood carving", "Woodworking", "Worldbuilding", "Writing", "Word searches", "Yo-yoing", "Yoga", "Zumba", "Amusement park visiting", "Air sports", "Airsoft", "Amateur geology", "Archery", "Astronomy", "Backpacking", "Badminton", "BASE jumping", "Baseball", "Basketball", "Beekeeping", "Birdwatching", "Blacksmithing", "BMX", "Board sports", "Bodybuilding", "Bonsai", "Butterfly watching", "Bus riding", "Camping", "Canoeing", "Canyoning", "Car riding", "Caving", "Composting", "Cycling", "Dowsing", "Driving", "Farming", "Fishing", "Flag football", "Flower growing", "Flying", "Flying disc", "Foraging", "Fossicking", "Freestyle football", "Gardening", "Geocaching", "Ghost hunting", "Gold prospecting", "Graffiti", "Handball", "Herbalism", "Herping", "High-power rocketry", "Hiking", "Hobby horsing", "Hobby tunneling", "Hooping", "Horseback riding", "Hunting", "Inline skating", "Jogging", "Jumping rope", "Kayaking", "Kite flying", "Kitesurfing", "Lacrosse", "LARPing", "Letterboxing", "Longboarding", "Martial arts", "Metal detecting", "Meteorology", "Motor sports", "Mountain biking", "Mountaineering", "Museum visiting", "Mushroom hunting", "Netball", "Nordic skating", "Orienteering", "Paintball", "Parkour", "Photography", "Podcast hosting", "Polo", "Public transport riding", "Rafting", "Railway journeys", "Rappelling", "Road biking", "Rock climbing", "Roller skating", "Rugby", "Running", "Radio-controlled model", "Sailing", "Sand art", "Scouting", "Scuba diving", "Sculling", "Shooting", "Shopping", "Shuffleboard", "Skateboarding", "Skiing", "Skimboarding", "Skydiving", "Slacklining", "Snowboarding", "Snowmobiling", "Snowshoeing", "Soccer", "Stone skipping", "Sun bathing", "Surfing", "Survivalism", "Swimming", "Taekwondo", "Tai chi", "Tennis", "Topiary", "Tourism", "Thru-hiking", "Trade fair visiting", "Travel", "Urban exploration", "Vacation", "Vegetable farming", "Videography", "Vehicle restoration", "Walking", "Water sports", "Astronomy", "Biology", "Chemistry", "Electrochemistry", "Physics", "Psychology", "Sports science", "Geography", "History", "Mathematics", "Railway studies", "Action figure", "Antiquing", "Ant-keeping", "Art collecting", "Book collecting", "Button collecting", "Cartophily", "Coin collecting", "Comic book collecting", "Deltiology", "Die-cast toy", "Digital hoarding", "Dolls", "Element collecting", "Ephemera collecting", "Fusilately", "Knife collecting", "Lotology", "Movie and movie memorabilia collecting", "Fingerprint collecting", "Perfume", "Phillumeny", "Radio-controlled model", "Rail transport modelling", "Record collecting", "Rock tumbling", "Scutelliphily", "Shoes", "Slot car", "Sports memorabilia", "Stamp collecting", "Stuffed toy collecting", "Tea bag collecting", "Ticket collecting", "Toys", "Transit map collecting", "Video game collecting", "Vintage cars", "Vintage clothing", "Vinyl Records", "Antiquities", "Auto audiophilia", "Flower collecting and pressing", "Fossil hunting", "Insect collecting", "Magnet fishing", "Metal detecting", "Mineral collecting", "Rock balancing", "Sea glass collecting", "Seashell collecting", "Stone collecting", "Animal fancy", "Axe throwing", "Backgammon", "Badminton", "Baton twirling", "Beauty pageants", "Billiards", "Bowling", "Boxing", "Bridge", "Checkers (draughts)", "Cheerleading", "Chess", "Color guard", "Cribbage", "Curling", "Dancing", "Darts", "Debate", "Dominoes", "Eating", "Esports", "Fencing", "Go", "Gymnastics", "Ice hockey", "Ice skating", "Judo", "Jujitsu", "Kabaddi", "Knowledge/word games", "Laser tag", "Longboarding", "Mahjong", "Marbles", "Martial arts", "Model United Nations", "Poker", "Pool", "Role-playing games", "Shogi", "Slot car racing", "Speedcubing", "Sport stacking", "Table football", "Table tennis", "Volleyball", "Weightlifting", "Wrestling", "Airsoft", "Archery", "Association football", "Australian rules football", "Auto racing", "Baseball", "Beach volleyball", "Breakdancing", "Climbing", "Cricket", "Croquet", "Cycling", "Disc golf", "Dog sport", "Equestrianism", "Exhibition drill", "Field hockey", "Figure skating", "Fishing", "Footbag", "Frisbee", "Golfing", "Handball", "Horseback riding", "Horseshoes", "Iceboat racing", "Jukskei", "Kart racing", "Knife throwing", "Lacrosse", "Longboarding", "Long-distance running", "Marching band", "Model aircraft", "Orienteering", "Pickleball", "Quidditch", "Race walking", "Racquetball", "Radio-controlled car racing", "Roller derby", "Rugby league football", "Sculling", "Shooting sport", "Skateboarding", "Skiing", "Sled dog racing", "Softball", "Speed skating", "Squash", "Surfing", "Swimming", "Table tennis", "Tennis", "Tennis polo", "Tether car", "Tour skating", "Tourism", "Trapshooting", "Triathlon", "Ultimate frisbee", "Volleyball", "Water polo", "Fishkeeping", "Learning", "Meditation", "Microscopy", "Reading", "Research", "Shortwave listening", "Audiophile", "Aircraft spotting", "Amateur astronomy", "Birdwatching", "Bus spotting", "Geocaching", "Gongoozling", "Herping", "Hiking", "Meteorology", "Photography", "Satellite watching", "Trainspotting", "Whale watching"}, - "phone": {"###-###-####", "(###)###-####", "1-###-###-####", "###.###.####"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/school.go b/vendor/github.com/brianvoe/gofakeit/v6/data/school.go deleted file mode 100644 index a9772d634fd..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/school.go +++ /dev/null @@ -1,56 +0,0 @@ -package data - -// School type and names -var School = map[string][]string{ - "type": {"Elementary School", "Middle School", "University", "High School", "Kindergarten", "Academy", "College", "Institute"}, - "isPrivate": {"Private", "State"}, - "name": {"Maplewood", - "Pineville", - "Riverside", - "Willowbrook", - "Crestwood", - "Sunset", - "Greenfield", - "Oakwood", - "Willowbrook", - "Hawthorn", - "Brookside", - "Pleasant View", - "Crescent Valley", - "Sycamore", - "Springfield", - "Meadowbrook", - "Greenwood", - "Riverbend", - "Valley Forge", - "Ridgeview", - "Cottonwood", - "Cedarwood", - "Golden Oak", - "Stonebridge", - "Harborview", - "Windsor", - "Northbrook", - "Sunset", - "Redwood Valley", - "Liberty", - "Washington Central", - "Franklin", - "Jefferson", - "Lincoln Park", - "Madison", - "Roosevelt", - "Westwood", - "Central Lakeside", - "Fairview", - "Heritage Hills", - "Kingsbridge", - "Harrisonville", - "Valley View", - "Hillside", - "Northridge", - "Brooklyn Heights", - "Oakridge", - "Countryside", - }, -} \ No newline at end of file diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/sentence.go b/vendor/github.com/brianvoe/gofakeit/v6/data/sentence.go deleted file mode 100644 index e12319d824a..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/sentence.go +++ /dev/null @@ -1,5 +0,0 @@ -package data - -var Sentence = map[string][]string{ - "phrase": {"what's yer poison", "time will tell", "I'm good", "nice to meet you", "spring forward, fall back", "what's your job", "once or twice", "you could have fooled me", "what's your name", "why not Zoidberg", "time you got a watch", "I'm Hindu", "fair play", "what's your phone number", "after the jump", "cease fire", "as ever", "I'm hot", "best of", "get well soon", "what's your poison", "when is closing time", "yes and amen", "you don't dip your pen in the company inkwell", "I'm hungry", "short of", "what's yours", "duces tecum", "after you", "yes and no", "I'm in love with you", "the pants off", "I'm Jewish", "few sandwiches short of a picnic", "shut the front door", "does a bear shit in the woods", "the party is over", "tomayto tomahto", "I'm looking for a grocery store", "does anyone here speak English", "heads I win, tails you lose", "I'm looking for a job", "stick a fork in it", "the penny drops", "I'm lost", "shut up and take my money", "mind you", "I'm married", "isn't it so", "wham-bam-thank-you-ma'am", "does not compute", "hold your fire", "pardon me", "mind your own beeswax", "I'm mute", "does someone look like", "I'm not being funny", "leave me alone", "going once, going twice, sold", "you get that", "I'm not interested", "talk about", "here be dragons", "always a bridesmaid, never a bride", "the plot thickens", "close, but no cigar", "I'm not religious", "ultra vires", "bound to", "always the bridesmaid, never the bride", "the plural of anecdote is not data", "I'm pregnant", "comedy equals tragedy plus time", "get you", "heads will roll", "all to the better", "I'm rubber, you're glue", "going to", "when push comes to shove", "you had to be there", "I'm scared", "you have beautiful eyes", "enjoy your meal", "I'm sick", "doesn't have both oars in the water", "you have the advantage of me", "here lies", "check is in the mail", "I'm single", "stick 'em up", "when the chips are down", "you just had to", "that'll be the day", "I'm sorry", "very good", "lather, rinse, repeat", "you kiss your mother with that mouth", "that'll do", "the rabbit died", "I'm straight", "in order for", "when the going gets weird, the weird turn pro", "I'm thirsty", "the rest is history", "it depends", "I'm tired", "in order to", "monkeys might fly out of my butt", "oh my life", "do want", "would it hurt", "you know what", "here you are", "all wool and a yard wide", "hit it", "pound for pound", "bottom falls out", "OK yah", "would it kill someone", "you know what I mean", "here you go", "alone in a crowd", "me neither", "chin up", "to be continued", "I'm twenty years old", "such is life", "off with someone's head", "Lord knows", "case closed", "you know what they say", "you've got to laugh", "ten points to Gryffindor", "that's a relief", "I'm worried", "kill the rabbit", "live and learn", "would not throw someone out of bed", "catch you later", "that's a wrap", "the rubber meets the road", "to be honest", "I'm your huckleberry", "off with their head", "you learn something new every day", "catch you on the flip side", "all your base are belong to us", "that's all", "horses for courses", "to be named later", "good night", "would you mind putting on your seat belt", "easy does it", "that's all she wrote", "me too", "oh noes", "that's for me to know and you to find out", "to be truthful", "still got one's communion money", "do you accept American dollars", "winner, winner, chicken dinner", "workers of the world, unite", "speak of the devil", "you must be fun at parties", "that's it", "hit me", "how about that", "ding, ding, ding, we have a winner", "do you accept credit cards", "word has it", "woulda, coulda, shoulda", "you must be new here", "how are you", "do you believe in God", "woulda, shoulda, coulda", "that's life", "safety in numbers", "how are you doing", "do you come here often", "worm has turned", "you never know", "that's my", "how are you getting along", "leave well enough alone", "do you have a boyfriend", "that's saying something", "the shoe is on the other foot", "this is someone", "do you have a girlfriend", "Lord only knows", "that's that", "check yourself before you wreck yourself", "this is the life", "how can you sleep at night", "wake up and die right", "do you have a menu in English", "that's the bunny", "the show must go on", "this is where we came in", "nod's as good as a wink to a blind bat", "wake up and smell the ashes", "on the huh", "do you have any brothers or sisters", "dogs bark", "worm turns", "that's the spirit", "this just in", "how did he die", "more like", "do you have any pets", "alright me babber", "Elvis has left the building", "this means war", "how do", "she could be his mother", "do you have children", "alright me lover", "that's the ticket", "how do I get to", "shoulda, coulda, woulda", "nome sane", "guess what", "whenever one turns around", "do you have Wi-Fi", "alright my babber", "the story goes", "how do I get to the airport", "shoulda, woulda, coulda", "do you kiss your mother with that mouth", "Lord willing and the creek don't rise", "you said it", "alright my lover", "how do I get to the bus station", "ask me one on sport", "need I say more", "sounds like a plan", "put that in your pipe and smoke it", "do you know", "take a picture, it will last longer", "the streets are paved with gold", "how do I get to the train station", "ask my arse", "stop the car", "do you know who I am", "wouldn't you know", "you shouldn't have", "how do ye do", "fans are slans", "use one's coconut", "bit by a barn mouse", "stick that in your pipe and smoke it", "do you mind", "but for the grace of God", "wouldn't you know it", "head in the sand", "the terrorists will have won", "how do you do", "please excuse my dear Aunt Sally", "much of a muchness", "bless someone's cotton socks", "do you need help", "or else", "dress for the slide, not the ride", "that's wassup", "the thick plottens", "much to be said", "bless someone's heart", "a blessing and a curse", "do you speak English", "you think", "that's what I'm talking about", "how do you like that", "art imitates life", "please help me", "five will get you ten", "do you think you can walk", "or so", "that's what she said", "the thing is", "how do you like them apples", "please pass the salt", "I've been robbed", "nature calls", "a boon and a bane", "but me no buts", "or something", "you welcome", "that's what's up", "how do you pronounce this word", "fare thee well", "please repeat after me", "I've been shot", "pot, meet kettle", "a boon or a bane", "where are the snows of yesteryear", "or what", "rolling in it", "the toilet is clogged", "how do you say...in English", "circle gets the square", "more than someone has had hot dinners", "please say that again", "I've burned myself", "different strokes", "where are the toilets", "or words to that effect", "you win", "how do you spell this word", "to hell with", "in virtue of which", "please sit down", "where are we", "out to", "am I right", "please speak more slowly", "I've lost my keys", "where are we going", "but who's counting", "you wish", "am I right or am I right", "how goes it", "methinks the lady doth protest too much", "please turn left", "could be written on the back of a postage stamp", "I've never heard it called that before", "where are you", "you wish, jellyfish", "am I under arrest", "methinks thou dost protest too much", "please turn right", "bang to rights", "gimme a break", "where are you from", "revenge is sweet", "'tis the season", "pull the other one", "where are your parents", "out with it", "have a good one", "how long is a piece of string", "ay up me duck", "before you can say Jack Robinson", "pull the other one, it's got bells on", "where away", "only time will tell", "could fit on the back of a postage stamp", "before you can say knife", "pull the other one, it's got brass bells on", "where can I find a hotel", "the wheels came off", "angel passes", "how many languages do you speak", "could go all day", "sleep tight", "nature vs nurture", "practice, practice, practice", "where do I sign up", "help is on the way", "many thanks", "the wheels came off the bus", "mercy bucket", "how many siblings do you have", "pleased to meet you", "could have fooled me", "where do you live", "the wheels came off the wagon", "mercy buckets", "where do you live at", "you'd better believe it", "than a bygod", "the wheels fell off", "could have, would have, should have", "where does it hurt", "hell if I know", "you'd complain if you were hung with a new rope", "the wheels fell off the bus", "every good boy deserves fudge", "could I see the menu, please", "where does this bus go", "help wanted", "the wheels fell off the wagon", "how much do I owe you", "where does this train go", "how much do you charge", "steady as she goes", "put the same shoe on every foot", "where have you been", "temper temper", "how much does it cost", "coulda, shoulda, woulda", "give credit where credit is due", "boom goes the dynamite", "where is the toilet", "how much is it", "in your dreams", "coulda, woulda, shoulda", "what a lovely day", "to save one's life", "exsqueeze me", "like a martin to his gourd", "what a pity", "you'll be late for your own funeral", "every man for himself", "size matters"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/word.go b/vendor/github.com/brianvoe/gofakeit/v6/data/word.go deleted file mode 100644 index 38ba25472a1..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/word.go +++ /dev/null @@ -1,79 +0,0 @@ -package data - -import ( - "sort" -) - -var WordKeys []string - -func init() { - // Loop through Word and put togther a list of keys - for key := range Word { - WordKeys = append(WordKeys, key) - } - - // Sort the keys - sort.Strings(WordKeys) -} - -// Word consists of common english words -var Word = map[string][]string{ - // Nouns - "noun_common": {"time", "person", "year", "way", "day", "thing", "man", "world", "life", "hand", "part", "child", "eye", "woman", "place", "work", "week", "case", "point", "government", "company", "number", "group", "problem", "fact"}, - "noun_concrete": {"apple", "air", "conditioner", "airport", "ambulance", "aircraft", "apartment", "arrow", "antlers", "apro", "alligator", "architect", "ankle", "armchair", "aunt", "ball", "bermudas", "beans", "balloon", "bear", "blouse", "bed", "bow", "bread", "black", "board", "bones", "bill", "bitterness", "boxers", "belt", "brain", "buffalo", "bird", "baby", "book", "back", "butter", "bulb", "buckles", "bat", "bank", "bag", "bra", "boots", "blazer", "bikini", "bookcase", "bookstore", "bus stop", "brass", "brother", "boy", "blender", "bucket", "bakery", "bow", "bridge", "boat", "car", "cow", "cap", "cooker", "cheeks", "cheese", "credenza", "carpet", "crow", "crest", "chest", "chair", "candy", "cabinet", "cat", "coffee", "children", "cookware", "chaise longue", "chicken", "casino", "cabin", "castle", "church", "cafe", "cinema", "choker", "cravat", "cane", "costume", "cardigan", "chocolate", "crib", "couch", "cello", "cashier", "composer", "cave", "country", "computer", "canoe", "clock", "dog", "deer", "donkey", "desk", "desktop", "dress", "dolphin", "doctor", "dentist", "drum", "dresser", "designer", "detective", "daughter", "egg", "elephant", "earrings", "ears", "eyes", "estate", "finger", "fox", "frock", "frog", "fan", "freezer", "fish", "film", "foot", "flag", "factory", "father", "farm", "forest", "flower", "fruit", "fork", "grapes", "goat", "gown", "garlic", "ginger", "giraffe", "gauva", "grains", "gas station", "garage", "gloves", "glasses", "gift", "galaxy", "guitar", "grandmother", "grandfather", "governor", "girl", "guest", "hamburger", "hand", "head", "hair", "heart", "house", "horse", "hen", "horn", "hat", "hammer", "hostel", "hospital", "hotel", "heels", "herbs", "host", "jacket", "jersey", "jewelry", "jaw", "jumper", "judge", "juicer", "keyboard", "kid", "kangaroo", "koala", "knife", "lemon", "lion", "leggings", "leg", "laptop", "library", "lamb", "london", "lips", "lung", "lighter", "luggage", "lamp", "lawyer", "mouse", "monkey", "mouth", "mango", "mobile", "milk", "music", "mirror", "musician", "mother", "man", "model", "mall", "museum", "market", "moonlight", "medicine", "microscope", "newspaper", "nose", "notebook", "neck", "noodles", "nurse", "necklace", "noise", "ocean", "ostrich", "oil", "orange", "onion", "oven", "owl", "paper", "panda", "pants", "palm", "pasta", "pumpkin", "pharmacist", "potato", "parfume", "panther", "pad", "pencil", "pipe", "police", "pen", "pharmacy", "police station", "parrot", "plane", "pigeon", "phone", "peacock", "pencil", "pig", "pouch", "pagoda", "pyramid", "purse", "pancake", "popcorn", "piano", "physician", "photographer", "professor", "painter", "park", "plant", "parfume", "radio", "razor", "ribs", "rainbow", "ring", "rabbit", "rice", "refrigerator", "remote", "restaurant", "road", "surgeon", "scale", "shampoo", "sink", "salt", "shark", "sandals", "shoulder", "spoon", "soap", "sand", "sheep", "sari", "stomach", "stairs", "soup", "shoes", "scissors", "sparrow", "shirt", "suitcase", "stove", "stairs", "snowman", "shower", "swan", "suit", "sweater", "smoke", "skirt", "sofa", "socks", "stadium", "skyscraper", "school", "sunglasses", "sandals", "slippers", "shorts", "sandwich", "strawberry", "spaghetti", "shrimp", "saxophone", "sister", "son", "singer", "senator", "street", "supermarket", "swimming pool", "star", "sky", "sun", "spoon", "ship", "smile", "table", "turkey", "tie", "toes", "truck", "train", "taxi", "tiger", "trousers", "tongue", "television", "teacher", "turtle", "tablet", "train station", "toothpaste", "tail", "theater", "trench coat", "tea", "tomato", "teen", "tunnel", "temple", "town", "toothbrush", "tree", "toy", "tissue", "telephone", "underwear", "uncle", "umbrella", "vest", "voice", "veterinarian", "villa", "violin", "village", "vehicle", "vase", "wallet", "wolf", "waist", "wrist", "water melon", "whale", "water", "wings", "whisker", "watch", "woman", "washing machine", "wheelchair", "waiter", "wound", "xylophone", "zebra", "zoo"}, - "noun_abstract": {"fiction", "horror", "dream", "luck", "movement", "right", "clarity", "joy", "care", "trend", "belief", "sorrow", "joy", "failure", "slavery", "riches", "fashion", "envy", "success", "fear", "union", "luxury", "freedom", "generosity", "wit", "peace", "hatred", "thrill", "brilliance", "care", "wealth", "religion", "divorce", "goal", "stupidity", "friendship", "goodness", "rhythm", "timing", "infancy", "disregard", "riches", "appetite", "loneliness", "pleasure", "love", "beauty", "annoyance", "kindness", "nap", "gain", "talent", "religion", "lie", "truth", "solitude", "justice", "bravery", "calm", "childhood", "confusion", "ability", "loss", "thought", "growth", "cleverness", "anger", "horror", "marriage", "delay", "philosophy", "generation", "wisdom", "dishonesty", "happiness", "coldness", "poverty", "brilliance", "luxuty", "sleep", "awareness", "idea", "disregard", "slavery", "growth", "company", "irritation", "advantage", "mercy", "speed", "pain", "gossip", "crime", "comfort", "frailty", "life", "patience", "omen", "deceit", "elegance"}, - "noun_collective_people": {"band", "troupe", "dynasty", "group", "bevy", "staff", "crowd", "party", "board", "regiment", "crew", "tribe", "body", "patrol", "congregation", "pack", "bunch", "company", "team", "mob", "caravan", "line", "troop", "choir", "host", "posse", "class", "gang", "horde"}, - "noun_collective_animal": {"cackle", "mustering", "mob", "wisp", "pod", "bale", "murder", "muster", "brace", "exaltation", "party", "flock", "cast", "sedge", "stand", "scold", "team", "covey", "trip", "army", "school", "nest", "leap", "host", "troop"}, - "noun_collective_thing": {"wad", "pair", "album", "string", "anthology", "reel", "outfit", "fleet", "comb", "archipelago", "quiver", "bale", "packet", "hedge", "basket", "orchard", "batch", "library", "battery", "set", "harvest", "block", "forest", "book", "group", "bouquet", "collection", "bowl", "stack", "bunch", "hand", "bundle", "catalog", "shower", "ream", "chest", "heap", "range", "cluster", "pack", "hail", "cloud", "galaxy", "sheaf", "clump"}, - "noun_countable": {"camp", "hospital", "shirt", "sock", "plant", "cup", "fork", "spoon", "plate", "straw", "town", "box", "bird", "father", "answer", "egg", "purse", "mirror", "mistake", "toilet", "toothbrush", "shower", "towel", "pool", "corner", "card", "lawn", "city", "egg", "yard", "burger", "kilometer", "mile", "father", "film", "actor", "issue", "machine", "liter", "room", "station", "journey", "castle", "hour", "finger", "boy", "book", "year", "second", "son", "month", "group", "hall", "cat", "week", "picture", "day", "village", "effect", "baby", "weekend", "class", "meal", "river", "grade", "bush", "desk", "stream", "method", "brother", "sister", "factory", "aunt", "bush", "program", "uncle", "ball", "cousin", "wall", "grandmother", "cup", "grandfather", "week", "school", "shirt", "child", "king", "road", "judge", "bridge", "car", "line", "book", "eye", "teacher", "foot", "party", "face", "day", "chest", "handle", "week", "hotel", "eye", "animal", "doctor", "adult", "village", "key", "bird", "bank", "program", "idea", "gun", "card", "brother", "dress", "room", "door", "mouth", "club", "game", "ring", "project", "sister", "road", "coat", "account", "group", "cigarette", "farm", "river", "college", "computer", "walk", "corner", "cat", "head", "street", "election", "country", "chair", "crowd", "cup", "plant", "farm", "handle", "model", "book", "message", "battle", "pen", "pencil", "elephant", "carrot", "onion", "garden", "country", "engine", "bill", "apple", "noun", "club", "crowd", "window", "field", "friend", "verb", "class", "flower", "seed", "lake", "plant", "animal", "ocean", "whale", "fish", "stream", "cloud", "couch", "steak", "problem", "light", "door", "room", "painting", "shop", "apartment", "candle", "adult", "building", "plan", "page", "ball", "game", "animal", "apartment", "box", "thought", "walk", "lady", "bottle", "article", "game", "kettle", "car", "house", "hoses", "orange", "phone", "app", "window", "door", "dollar", "foot", "cent", "library", "cat", "bed", "pound", "gate", "tomatoes", "gun", "holiday", "woman", "job", "shock", "salary", "tax", "coat", "scooter", "dog", "problem", "field", "answer", "ear", "camp", "case", "road", "woman", "product", "bridge", "man", "dream", "idea", "scheme", "invention", "cigarette", "mother", "friend", "chapter", "computer", "dream", "father", "child", "motor", "deskpath", "factory", "park", "newspaper", "hat", "dream", "table", "kitchen", "student", "captain", "doctor", "bus", "neck", "class", "list", "member", "chest", "valley", "product", "horse", "captain", "star", "hour", "page", "bus", "girl", "month", "child", "house", "boy", "bill", "kitchen", "chapter", "boat", "hand", "dress", "table", "wall", "chair", "train", "minute", "magazine", "bus", "party", "bird", "lake", "job", "nation", "bike", "election", "hand", "box", "beach", "address", "project", "task", "park", "face", "college", "bell", "plane", "store", "hall", "accident", "daughter", "ship", "candy", "smile", "city", "island", "case", "spot", "film", "husband", "artist", "tour", "bag", "boat", "driver", "office", "chair", "path", "dog", "bag", "finger", "apartment", "garden", "heart", "year", "engine", "girl", "day", "castle", "plane", "ring", "brother", "edge", "picture", "meeting", "tent", "dog", "hat", "head", "bottle", "hill"}, - "noun_uncountable": {"accommodation", "advertising", "air", "aid", "advice", "anger", "art", "assistance", "bread", "business", "butter", "calm", "cash", "chaos", "cheese", "childhood", "clothing", "coffee", "content", "corruption", "courage", "currency", "damage", "danger", "darkness", "data", "determination", "economics", "education", "electricity", "employment", "energy", "entertainment", "enthusiasm", "equipment", "evidence", "failure", "fame", "fire", "flour", "food", "freedom", "friendship", "fuel", "furniture", "fun", "genetics", "gold", "grammar", "guilt", "hair", "happiness", "harm", "health", "heat", "help", "homework", "honesty", "hospitality", "housework", "humour", "imagination", "importance", "information", "innocence", "intelligence", "jealousy", "juice", "justice", "kindness", "knowledge", "labour", "lack", "laughter", "leisure", "literature", "litter", "logic", "love", "luck", "magic", "management", "metal", "milk", "money", "motherhood", "motivation", "music", "nature", "news", "nutrition", "obesity", "oil", "old age", "oxygen", "paper", "patience", "permission", "pollution", "poverty", "power", "pride", "production", "progress", "pronunciation", "publicity", "punctuation", "quality", "quantity", "racism", "rain", "relaxation", "research", "respect", "rice", "room (space)", "rubbish", "safety", "salt", "sand", "seafood", "shopping", "silence", "smoke", "snow", "software", "soup", "speed", "spelling", "stress", "sugar", "sunshine", "tea", "tennis", "time", "tolerance", "trade", "traffic", "transportation", "travel", "trust", "understanding", "unemployment", "usage", "violence", "vision", "warmth", "water", "wealth", "weather", "weight", "welfare", "wheat", "width", "wildlife", "wisdom", "wood", "work", "yoga", "youth"}, - //"noun_proper": {}, // This refers to an actual person(John Doe), place(Chipotle, Tennessee) - - // Verbs - "verb_action": {"ride", "sit", "stand", "fight", "laugh", "read", "play", "listen", "cry", "think", "sing", "watch", "dance", "turn", "win", "fly", "cut", "throw", "sleep", "close", "open", "write", "give", "jump", "eat", "drink", "cook", "wash", "wait", "climb", "talk", "crawl", "dream", "dig", "clap", "knit", "sew", "smell", "kiss", "hug", "snore", "bathe", "bow", "paint", "dive", "ski", "stack", "buy", "shake"}, - "verb_transitive": {"accept", "acknowledge", "admit", "aggravate", "answer", "ask", "avoid", "beat", "bend", "bless", "bother", "break", "brush", "build", "cancel", "capture", "carry", "catch", "change", "chase", "chastise", "clean", "collect", "comfort", "contradict", "convert", "crack", "dazzle", "deceive", "define", "describe", "destroy", "discover", "distinguish", "drag", "dress", "dunk", "edify", "embarrass", "embrace", "enable", "encourage", "enlist", "entertain", "execute", "fascinate", "finish", "flick", "follow", "forget", "forgive", "freeze", "frighten", "furnish", "gather", "grab", "grasp", "grease", "grip", "handle", "hang", "head", "help", "highlight", "honour", "hurry", "hurt", "imitate", "impress", "indulge", "insert", "inspect", "interest", "interrupt", "intimidate", "involve", "irritate", "join", "judge", "keep", "key", "kill", "kiss", "knock", "lag", "lay", "lead", "lean", "leave", "lighten", "limit", "link", "load", "love", "lower", "maintain", "marry", "massage", "melt", "mock", "munch", "murder", "notice", "number", "offend", "order", "page", "paralyze", "persuade", "petrify", "pierce", "place", "please", "poison", "possess", "prepare", "promise", "protect", "punch", "purchase", "puzzle", "question", "quit", "raise", "reassure", "recognise", "refill", "remind", "remove", "repel", "research", "retard", "ring", "run", "satisfy", "scold", "select", "slap", "smell", "soften", "specify", "spell", "spit", "spread", "strike", "surprise", "swallow", "switch", "taste", "teach", "tickle", "tighten", "toast", "toss", "transform", "try", "turn", "tweak", "twist", "understand", "understimate", "unload", "unlock", "untie", "upgrade", "use", "vacate", "videotape", "vilify", "viplate", "wake", "want", "warm", "warn", "wash", "watch", "wear", "weep", "widen", "win", "wipe", "wrack", "wrap", "wreck"}, - "verb_intransitive": {"agree", "appear", "arrive", "become", "belong", "collapse", "consist", "cost", "cough", "cry", "depend", "die", "disappear", "emerge", "exist", "explode", "fade", "fall", "fast", "float", "fly", "gallop", "go", "grow", "happen", "have", "hiccup", "inquire", "jump", "kneel", "knock", "last", "laugh", "lead", "lean", "leap", "learn", "left", "lie", "limp", "listen", "live", "look", "march", "mourn", "move", "occur", "panic", "party", "pause", "peep", "pose", "pounce", "pout", "pray", "preen", "read", "recline", "relax", "relent", "remain", "respond", "result", "revolt", "rise", "roll", "run", "rush", "sail", "scream", "shake", "shout", "sigh", "sit", "skip", "sleep", "slide", "smell", "smile", "snarl", "sneeze", "soak", "spin", "spit", "sprint", "squeak", "stagger", "stand", "stay", "swim", "swing", "twist", "vanish", "vomit", "wade", "wait", "wake", "walk", "wander", "wave", "whirl", "wiggle", "work", "yell"}, - "verb_linking": {"am", "is", "was", "are", "were", "being", "been", "be", "have", "has", "had", "do", "does", "did", "shall", "will", "should", "would", "may", "might", "must", "can", "could"}, - "verb_helping": {"is", "can", "be", "do", "may", "had", "should", "was", "has", "could", "are", "will", "been", "did", "might", "were", "does", "must", "have", "would", "am", "shall", "being"}, - - // Adverbs - "adverb_manner": {"accidentally", "angrily", "anxiously", "awkwardly", "badly", "beautifully", "blindly", "boldly", "bravely", "brightly", "busily", "calmly", "carefully", "carelessly", "cautiously", "cheerfully", "clearly", "closely", "correctly", "courageously", "cruelly", "daringly", "deliberately", "doubtfully", "eagerly", "easily", "elegantly", "enormously", "enthusiastically", "equally", "eventually", "exactly", "faithfully", "fast", "fatally", "fiercely", "fondly", "foolishly", "fortunately", "frankly", "frantically", "generously", "gently", "gladly", "gracefully", "greedily", "happily", "hard", "hastily", "healthily", "honestly", "hungrily", "hurriedly", "inadequately", "ingeniously", "innocently", "inquisitively", "irritably", "joyously", "justly", "kindly", "lazily", "loosely", "loudly", "madly", "mortally", "mysteriously", "neatly", "nervously", "noisily", "obediently", "openly", "painfully", "patiently", "perfectly", "politely", "poorly", "powerfully", "promptly", "punctually", "quickly", "quietly", "rapidly", "rarely", "really", "recklessly", "regularly", "reluctantly", "repeatedly", "rightfully", "roughly", "rudely", "sadly", "safely", "selfishly", "sensibly", "seriously", "sharply", "shyly", "silently", "sleepily", "slowly", "smoothly", "so", "softly", "solemnly", "speedily", "stealthily", "sternly", "straight", "stupidly", "successfully", "suddenly", "suspiciously", "swiftly", "tenderly", "tensely", "thoughtfully", "tightly", "truthfully", "unexpectedly", "victoriously", "violently", "vivaciously", "warmly", "weakly", "wearily", "well", "wildly", "wisely"}, - "adverb_degree": {"almost", "absolutely", "awfully", "badly", "barely", "completely", "decidedly", "deeply", "enough", "enormously", "entirely", "extremely", "fairly", "far", "fully", "greatly", "hardly", "highly", "how", "incredibly", "indeed", "intensely", "just", "least", "less", "little", "lots", "most", "much", "nearly", "perfectly", "positively", "practically", "pretty", "purely", "quite", "rather", "really", "scarcely", "simply", "so", "somewhat", "strongly", "terribly", "thoroughly", "too", "totally", "utterly", "very", "virtually", "well"}, - "adverb_place": {"about", "above", "abroad", "anywhere", "away", "back", "backwards", "behind", "below", "down", "downstairs", "east", "elsewhere", "far", "here", "in", "indoors", "inside", "near", "nearby", "off", "on", "out", "outside", "over", "there", "towards", "under", "up", "upstairs", "where"}, - "adverb_time_definite": {"now", "then", "today", "tomorrow", "tonight", "yesterday"}, - "adverb_time_indefinite": {"already", "before", "early", "earlier", "eventually", "finally", "first", "formerly", "just", "last", "late", "later", "lately", "next", "previously", "recently", "since", "soon", "still", "yet"}, - "adverb_frequency_definite": {"annually", "daily", "fortnightly", "hourly", "monthly", "nightly", "quarterly", "weekly", "yearly"}, - "adverb_frequency_indefinite": {"always", "constantly", "ever", "frequently", "generally", "infrequently", "never", "normally", "occasionally", "often", "rarely", "regularly", "seldom", "sometimes", "regularly", "usually"}, - - // Prepositions - "preposition_simple": {"at", "by", "as", "but", "from", "for", "into", "in", "than", "of", "off", "on", "out", "over", "till", "to", "up", "upon", "with", "under", "down"}, - "preposition_double": {"outside of", "out of", "upon", "within", "inside", "without", "onto", "from behind", "because of", "out of", "throughout", "up to", "before", "due to", "according to", "from beneath", "next to", "from above"}, - "preposition_compound": {"according to", "as to", "onto", "across", "after", "beyond", "without", "opposite to", "away from", "aside from", "in favor of", "in front of", "because of", "as for", "near to", "behind", "along", "outside", "on account of", "on behalf of", "but for", "ahead of", "close to", "despite", "depending on", "due to", "in addition to", "next to", "in between", "in case of", "owing to", "along with", "around", "between", "apart from", "in return for", "out of", "instead of", "outside of", "other than", "together with", "up to", "above", "about"}, - - // Adjectives - "adjective_descriptive": {"adorable", "adventurous", "agreeable", "alive", "aloof", "amused", "angry", "annoying", "anxious", "arrogant", "ashamed", "attractive", "auspicious", "awful", "bad", "beautiful", "black", "blue", "blushing", "bored", "brave", "bright", "brown", "busy", "calm", "careful", "cautious", "charming", "cheerful", "clean", "clear", "clever", "clumsy", "colorful", "comfortable", "concerning", "condemned", "confusing", "cooperative", "courageous", "creepy", "crowded", "cruel", "curios", "cute", "dangerous", "dark", "defiant", "delightful", "difficult", "disgusting", "distinct", "disturbed", "dizzying", "drab", "dull", "eager", "easy", "elated", "elegant", "embarrassed", "enchanted", "encouraging", "energetic", "enthusiastic", "envious", "evil", "exciting", "expensive", "exuberant", "faithful", "famous", "fancy", "fantastic", "fierce", "filthy", "fine", "foolish", "fragile", "frail", "frantic", "friendly", "frightening", "funny", "gentle", "gifted", "glamorous", "gleaming", "glorious", "good", "gorgeous", "graceful", "green", "grieving", "grumpy", "handsome", "happy", "healthy", "helpful", "helpless", "hilarious", "homeless", "horrible", "hungry", "hurt", "ill", "important", "impossible", "impromptu", "improvised", "inexpensive", "innocent", "inquiring", "itchy", "jealous", "jittery", "joyous", "kind", "knightly", "lazy", "lemony", "light", "lingering", "lively", "lonely", "long", "lovely", "lucky", "magnificent", "modern", "motionless", "muddy", "mushy", "mysterious", "naughty", "niche", "nervous", "nice", "nutty", "obedient", "obnoxious", "odd", "open", "orange", "outrageous", "outstanding", "panicked", "perfect", "pink", "plain", "pleasant", "poised", "poor", "powerless", "precious", "prickling", "proud", "purple", "puzzled", "quaint", "queer", "quizzical", "realistic", "red", "relieved", "repelling", "repulsive", "rich", "scary", "scenic", "selfish", "shiny", "shy", "silly", "sleepy", "smiling", "smoggy", "sore", "sparkly", "splendid", "spotted", "stormy", "strange", "stupid", "successful", "super", "talented", "tame", "tasty", "tender", "tense", "terse", "terrible", "thankful", "thoughtful", "tired", "tough", "troubling", "ugly", "uninterested", "unusual", "upset", "uptight", "varied", "vast", "victorious", "wandering", "weary", "white", "wicked", "wide", "wild", "witty", "worrisome", "wrong", "yellow", "young", "zealous"}, - "adjective_quantitative": {"a little", "a little bit", "a lot", "abundant", "all", "any", "couple", "double", "each", "either", "empty", "enough", "enough of", "every", "few", "full", "great", "half", "heavily", "heavy", "huge", "hundred", "hundreds", "insufficient", "light", "little", "lots of", "many", "most", "much", "neither", "no", "numerous", "plenty of", "several", "significant", "single", "so few", "some", "sparse", "substantial", "sufficient", "too", "whole"}, - "adjective_proper": {"Afghan", "African", "Alaskan", "Alpine", "Amazonian", "American", "Antarctic", "Aristotelian", "Asian", "Atlantean", "Atlantic", "Bahamian", "Bahrainean", "Balinese", "Bangladeshi", "Barbadian", "Barcelonian", "Beethovenian", "Belgian", "Beninese", "Bismarckian", "Brazilian", "British", "Buddhist", "Burkinese", "Burmese", "Caesarian", "Californian", "Cambodian", "Canadian", "Chinese", "Christian", "Colombian", "Confucian", "Congolese", "Cormoran", "Costa Rican", "Cypriot", "Danish", "Darwinian", "Diabolical", "Dutch", "Ecuadorian", "Egyptian", "Einsteinian", "Elizabethan", "English", "Finnish", "French", "Freudian", "Gabonese", "Gaussian", "German", "Greek", "Guyanese", "Himalayan", "Hindu", "Hitlerian", "Honduran", "Icelandic", "Indian", "Indonesian", "Intelligent", "Iranian", "Iraqi", "Italian", "Japanese", "Jungian", "Kazakh", "Korean", "kuban", "Kyrgyz", "Laotian", "Lebanese", "Lilliputian", "Lincolnian", "Machiavellian", "Madagascan", "Malagasy", "Marxist", "Mayan", "Mexican", "Middle Eastern", "Monacan", "Mozartian", "Muscovite", "Nepalese", "Newtonian", "Norwegian", "Orwellian", "Pacific", "Parisian", "Peruvian", "Philippine", "Plutonian", "Polish", "Polynesian", "Portuguese", "Putinist", "Roman", "Romanian", "Rooseveltian", "Russian", "Salvadorean", "Sammarinese", "Senegalese", "Shakespearean", "Slovak", "Somali", "South American", "Spanish", "Spanish", "Sri-Lankan", "Sudanese", "Swazi", "Swiss", "Taiwanese", "Thai", "Thatcherite", "Tibetan", "Torontonian", "Turkish", "Turkishish", "Turkmen", "Uzbek", "Victorian", "Viennese", "Vietnamese", "Welsh"}, - "adjective_demonstrative": {"this", "that", "these", "those", "it", "here", "there", "over there"}, - "adjective_possessive": {"my", "your", "his", "her", "its", "our", "their"}, - "adjective_interrogative": {"what", "whose", "where", "why", "how", "which"}, - "adjective_indefinite": {"all", "any", "anything", "everyone", "few", "nobody", "one", "some", "someone", "everybody", "anyone", "each", "everything", "many", "none", "several", "somebody"}, - - // Pronouns - "pronoun_personal": {"I", "we", "you", "he", "she", "it", "they"}, - "pronoun_object": {"me", "us", "you", "her", "him", "it", "them"}, - "pronoun_possessive": {"mine", "ours", "yours", "hers", "his", "theirs"}, - "pronoun_reflective": {"myself", "yourself", "herself", "himself", "itself", "ourselves", "yourselves", "themselves"}, - "pronoun_indefinite": {"all", "another", "any", "anybody", "anyone", "anything", "both", "each", "either", "everybody", "everyone", "everything", "few", "many", "most", "neither", "nobody", "none", "no one", "nothing", "one", "other", "others", "several", "some", "somebody", "someone", "something", "such"}, - "pronoun_demonstrative": {"this", "that", "these", "those"}, - "pronoun_interrogative": {"who", "whom", "which", "what", "whose", "where", "when", "why", "how"}, - "pronoun_relative": {"as", "that", "what", "whatever", "which", "whichever", "who", "whoever", "whom", "whomever", "whose"}, - - // Connectives - "connective_time": {"after a while", "afterwards", "at once", "at this moment", "at this point", "before that", "finally", "first", "here", "in the end", "lastly", "later on", "meanwhile", "next", "next time", "now", "on another occasion", "previously", "since", "soon", "straightaway", "then", "until then", "when", "whenever", "while"}, - "connective_comparative": {"additionally", "also", "as well", "even", "furthermore", "in addition", "indeed", "let alone", "moreover", "not only", "alternatively", "anyway", "but", "by contrast", "differs from", "elsewhere", "even so", "however", "in contrast", "in fact", "in other respects", "in spite of this", "in that respect", "instead", "nevertheless", "on the contrary", "on the other hand", "rather", "though", "whereas", "yet", "after all", "anyway", "besides", "moreover"}, - "connective_complaint": {"besides", "e.g.", "for example", "for instance", "i.e.", "in other words", "in that", "that is to say"}, - "connective_listing": {"firstly", "secondly", "first of all", "finally", "lastly", "for one thing", "for another", "in the first place", "to begin with", "next", "in summation", "to conclude"}, - "connective_casual": {"accordingly", "all the same", "an effect of", "an outcome of", "an upshot of", "as a consequence of", "as a result of", "because", "caused by", "consequently", "despite this", "even though", "hence", "however", "in that case", "moreover", "nevertheless", "otherwise", "so", "so as", "stemmed from", "still", "then", "therefore", "though", "under the circumstances", "yet"}, - "connective_examplify": {"accordingly", "as a result", "as exemplified by", "consequently", "for example", "for instance", "for one thing", "including", "provided that", "since", "so", "such as", "then", "therefore", "these include", "through", "unless", "without"}, -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/doc.go b/vendor/github.com/brianvoe/gofakeit/v6/doc.go deleted file mode 100644 index dc06a1bfe70..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package gofakeit provides a set of functions that generate random data -*/ -package gofakeit diff --git a/vendor/github.com/brianvoe/gofakeit/v6/emoji.go b/vendor/github.com/brianvoe/gofakeit/v6/emoji.go deleted file mode 100644 index 3c4b21eab90..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/emoji.go +++ /dev/null @@ -1,100 +0,0 @@ -package gofakeit - -import "math/rand" - -// Emoji will return a random fun emoji -func Emoji() string { return emoji(globalFaker.Rand) } - -// Emoji will return a random fun emoji -func (f *Faker) Emoji() string { return emoji(f.Rand) } - -func emoji(r *rand.Rand) string { return getRandValue(r, []string{"emoji", "emoji"}) } - -// EmojiDescription will return a random fun emoji description -func EmojiDescription() string { return emojiDescription(globalFaker.Rand) } - -// EmojiDescription will return a random fun emoji description -func (f *Faker) EmojiDescription() string { return emojiDescription(f.Rand) } - -func emojiDescription(r *rand.Rand) string { return getRandValue(r, []string{"emoji", "description"}) } - -// EmojiCategory will return a random fun emoji category -func EmojiCategory() string { return emojiCategory(globalFaker.Rand) } - -// EmojiCategory will return a random fun emoji category -func (f *Faker) EmojiCategory() string { return emojiCategory(f.Rand) } - -func emojiCategory(r *rand.Rand) string { return getRandValue(r, []string{"emoji", "category"}) } - -// EmojiAlias will return a random fun emoji alias -func EmojiAlias() string { return emojiAlias(globalFaker.Rand) } - -// EmojiAlias will return a random fun emoji alias -func (f *Faker) EmojiAlias() string { return emojiAlias(f.Rand) } - -func emojiAlias(r *rand.Rand) string { return getRandValue(r, []string{"emoji", "alias"}) } - -// EmojiTag will return a random fun emoji tag -func EmojiTag() string { return emojiTag(globalFaker.Rand) } - -// EmojiTag will return a random fun emoji tag -func (f *Faker) EmojiTag() string { return emojiTag(f.Rand) } - -func emojiTag(r *rand.Rand) string { return getRandValue(r, []string{"emoji", "tag"}) } - -func addEmojiLookup() { - AddFuncLookup("emoji", Info{ - Display: "Emoji", - Category: "emoji", - Description: "Random emoji", - Example: "🤣", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return emoji(r), nil - }, - }) - - AddFuncLookup("emojidescription", Info{ - Display: "Emoji Description", - Category: "emoji", - Description: "Random emoji description", - Example: "face vomiting", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return emojiDescription(r), nil - }, - }) - - AddFuncLookup("emojicategory", Info{ - Display: "Emoji Category", - Category: "emoji", - Description: "Random emoji category", - Example: "Smileys & Emotion", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return emojiCategory(r), nil - }, - }) - - AddFuncLookup("emojialias", Info{ - Display: "Emoji Alias", - Category: "emoji", - Description: "Random emoji alias", - Example: "smile", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return emojiAlias(r), nil - }, - }) - - AddFuncLookup("emojitag", Info{ - Display: "Emoji Tag", - Category: "emoji", - Description: "Random emoji tag", - Example: "happy", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return emojiTag(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/error.go b/vendor/github.com/brianvoe/gofakeit/v6/error.go deleted file mode 100644 index c10f564b95a..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/error.go +++ /dev/null @@ -1,233 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" -) - -// Error will return a random generic error -func Error() error { - return err(globalFaker.Rand) -} - -// Error will return a random generic error -func (f *Faker) Error() error { - return err(f.Rand) -} - -func err(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "generic"}))) -} - -// ErrorObject will return a random error object word -func ErrorObject() error { - return errorObject(globalFaker.Rand) -} - -// ErrorObject will return a random error object word -func (f *Faker) ErrorObject() error { - return errorObject(f.Rand) -} - -func errorObject(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "object"}))) -} - -// ErrorDatabase will return a random database error -func ErrorDatabase() error { - return errorDatabase(globalFaker.Rand) -} - -// ErrorDatabase will return a random database error -func (f *Faker) ErrorDatabase() error { - return errorDatabase(f.Rand) -} - -func errorDatabase(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "database"}))) -} - -// ErrorGRPC will return a random gRPC error -func ErrorGRPC() error { - return errorGRPC(globalFaker.Rand) -} - -// ErrorGRPC will return a random gRPC error -func (f *Faker) ErrorGRPC() error { - return errorGRPC(f.Rand) -} - -func errorGRPC(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "grpc"}))) -} - -// ErrorHTTP will return a random HTTP error -func ErrorHTTP() error { - return errorHTTP(globalFaker.Rand) -} - -// ErrorHTTP will return a random HTTP error -func (f *Faker) ErrorHTTP() error { - return errorHTTP(f.Rand) -} - -func errorHTTP(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "http"}))) -} - -// ErrorHTTPClient will return a random HTTP client error response (400-418) -func ErrorHTTPClient() error { - return errorHTTPClient(globalFaker.Rand) -} - -// ErrorHTTPClient will return a random HTTP client error response (400-418) -func (f *Faker) ErrorHTTPClient() error { - return errorHTTPClient(f.Rand) -} - -func errorHTTPClient(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "http_client"}))) -} - -// ErrorHTTPServer will return a random HTTP server error response (500-511) -func ErrorHTTPServer() error { - return errorHTTPServer(globalFaker.Rand) -} - -// ErrorHTTPServer will return a random HTTP server error response (500-511) -func (f *Faker) ErrorHTTPServer() error { - return errorHTTPServer(f.Rand) -} - -func errorHTTPServer(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "http_server"}))) -} - -// ErrorRuntime will return a random runtime error -func ErrorRuntime() error { - return errorRuntime(globalFaker.Rand) -} - -// ErrorRuntime will return a random runtime error -func (f *Faker) ErrorRuntime() error { - return errorRuntime(f.Rand) -} - -func errorRuntime(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "runtime"}))) -} - -// ErrorValidation will return a random validation error -func ErrorValidation() error { - return errorValidation(globalFaker.Rand) -} - -// ErrorValidation will return a random validation error -func (f *Faker) ErrorValidation() error { - return errorValidation(f.Rand) -} - -func errorValidation(r *rand.Rand) error { - return errors.New(generate(r, getRandValue(r, []string{"error", "validation"}))) -} - -func addErrorLookup() { - AddFuncLookup("error", Info{ - Display: "Error", - Category: "error", - Description: "Random error message", - Example: "syntax error", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return err(r), nil - }, - }) - - AddFuncLookup("errorobject", Info{ - Display: "Error object word", - Category: "error", - Description: "Random error object word", - Example: "protocol", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorObject(r), nil - }, - }) - - AddFuncLookup("errordatabase", Info{ - Display: "Database error", - Category: "error", - Description: "Random database error message", - Example: "sql error", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorDatabase(r), nil - }, - }) - - AddFuncLookup("errorgrpc", Info{ - Display: "gRPC error", - Category: "error", - Description: "Random gRPC error message", - Example: "client protocol error", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorGRPC(r), nil - }, - }) - - AddFuncLookup("errorhttp", Info{ - Display: "HTTP error", - Category: "error", - Description: "Random HTTP error message", - Example: "invalid method", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorHTTP(r), nil - }, - }) - - AddFuncLookup("errorhttpclient", Info{ - Display: "HTTP client error", - Category: "error", - Description: "Random HTTP client error message", - Example: "request timeout", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorHTTPClient(r), nil - }, - }) - - AddFuncLookup("errorhttpserver", Info{ - Display: "HTTP server error", - Category: "error", - Description: "Random HTTP server error message", - Example: "internal server error", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorHTTPServer(r), nil - }, - }) - - AddFuncLookup("errorruntime", Info{ - Display: "Runtime error", - Category: "error", - Description: "Random runtime error message", - Example: "address out of bounds", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorRuntime(r), nil - }, - }) - - AddFuncLookup("errorvalidation", Info{ - Display: "Validation error", - Category: "error", - Description: "Random validation error message", - Example: "missing required field", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return errorValidation(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/fakeable.go b/vendor/github.com/brianvoe/gofakeit/v6/fakeable.go deleted file mode 100644 index 1089fc38049..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/fakeable.go +++ /dev/null @@ -1,83 +0,0 @@ -package gofakeit - -import ( - "errors" - "fmt" - "reflect" -) - -// Fakeable is an interface that can be implemented by a type to provide a custom fake value. -type Fakeable interface { - // Fake returns a fake value for the type. - Fake(faker *Faker) (any, error) -} - -func isFakeable(t reflect.Type) bool { - fakeableTyp := reflect.TypeOf((*Fakeable)(nil)).Elem() - - return t.Implements(fakeableTyp) || reflect.PtrTo(t).Implements(fakeableTyp) -} - -func callFake(faker *Faker, v reflect.Value, possibleKinds ...reflect.Kind) (any, error) { - f, ok := v.Addr().Interface().(Fakeable) - if !ok { - return nil, errors.New("not a Fakeable type") - } - - fakedValue, err := f.Fake(faker) - if err != nil { - return nil, fmt.Errorf("error calling Fake: %w", err) - } - k := reflect.TypeOf(fakedValue).Kind() - if !containsKind(possibleKinds, k) { - return nil, fmt.Errorf("returned value kind %q is not amongst the valid ones: %v", k, possibleKinds) - } - - switch k { - case reflect.String: - return reflect.ValueOf(fakedValue).String(), nil - case reflect.Bool: - return reflect.ValueOf(fakedValue).Bool(), nil - case reflect.Int: - return int(reflect.ValueOf(fakedValue).Int()), nil - case reflect.Int8: - return int8(reflect.ValueOf(fakedValue).Int()), nil - case reflect.Int16: - return int16(reflect.ValueOf(fakedValue).Int()), nil - case reflect.Int32: - return int32(reflect.ValueOf(fakedValue).Int()), nil - case reflect.Int64: - return int64(reflect.ValueOf(fakedValue).Int()), nil - case reflect.Uint: - return uint(reflect.ValueOf(fakedValue).Uint()), nil - case reflect.Uint8: - return uint8(reflect.ValueOf(fakedValue).Uint()), nil - case reflect.Uint16: - return uint16(reflect.ValueOf(fakedValue).Uint()), nil - case reflect.Uint32: - return uint32(reflect.ValueOf(fakedValue).Uint()), nil - case reflect.Uint64: - return uint64(reflect.ValueOf(fakedValue).Uint()), nil - case reflect.Float32: - return float32(reflect.ValueOf(fakedValue).Float()), nil - case reflect.Float64: - return float64(reflect.ValueOf(fakedValue).Float()), nil - case reflect.Slice: - return reflect.ValueOf(fakedValue).Interface(), nil - case reflect.Map: - return reflect.ValueOf(fakedValue).Interface(), nil - case reflect.Struct: - return reflect.ValueOf(fakedValue).Interface(), nil - default: - return nil, fmt.Errorf("unsupported type %q", k) - } -} - -func containsKind(possibleKinds []reflect.Kind, kind reflect.Kind) bool { - for _, k := range possibleKinds { - if k == kind { - return true - } - } - return false -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/faker.go b/vendor/github.com/brianvoe/gofakeit/v6/faker.go deleted file mode 100644 index 715c67caee8..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/faker.go +++ /dev/null @@ -1,103 +0,0 @@ -package gofakeit - -import ( - crand "crypto/rand" - "encoding/binary" - "math/rand" - "sync" -) - -// Create global variable to deal with global function call. -var globalFaker *Faker = New(0) - -// Faker struct is the primary struct for using localized. -type Faker struct { - Rand *rand.Rand -} - -type lockedSource struct { - lk sync.Mutex - src rand.Source64 -} - -func (r *lockedSource) Int63() (n int64) { - r.lk.Lock() - n = r.src.Int63() - r.lk.Unlock() - - return -} - -func (r *lockedSource) Uint64() (n uint64) { - r.lk.Lock() - n = r.src.Uint64() - r.lk.Unlock() - return -} - -func (r *lockedSource) Seed(seed int64) { - r.lk.Lock() - r.src.Seed(seed) - r.lk.Unlock() -} - -type cryptoRand struct { - sync.Mutex - buf []byte -} - -func (c *cryptoRand) Seed(seed int64) {} - -func (c *cryptoRand) Uint64() uint64 { - // Lock to make reading thread safe - c.Lock() - defer c.Unlock() - - crand.Read(c.buf) - return binary.BigEndian.Uint64(c.buf) -} - -func (c *cryptoRand) Int63() int64 { - return int64(c.Uint64() & ^uint64(1<<63)) -} - -// New will utilize math/rand for concurrent random usage. -// Setting seed to 0 will use crypto/rand for the initial seed number. -func New(seed int64) *Faker { - // If passing 0 create crypto safe int64 for initial seed number - if seed == 0 { - binary.Read(crand.Reader, binary.BigEndian, &seed) - } - - return &Faker{Rand: rand.New(&lockedSource{src: rand.NewSource(seed).(rand.Source64)})} -} - -// NewUnlocked will utilize math/rand for non concurrent safe random usage. -// Setting seed to 0 will use crypto/rand for the initial seed number. -// NewUnlocked is more performant but not safe to run concurrently. -func NewUnlocked(seed int64) *Faker { - // If passing 0 create crypto safe int64 for initial seed number - if seed == 0 { - binary.Read(crand.Reader, binary.BigEndian, &seed) - } - - return &Faker{Rand: rand.New(rand.NewSource(seed))} -} - -// NewCrypto will utilize crypto/rand for concurrent random usage. -func NewCrypto() *Faker { - return &Faker{Rand: rand.New(&cryptoRand{ - buf: make([]byte, 8), - })} -} - -// NewCustom will utilize a custom rand.Source64 for concurrent random usage -// See https://golang.org/src/math/rand/rand.go for required interface methods -func NewCustom(source rand.Source64) *Faker { - return &Faker{Rand: rand.New(source)} -} - -// SetGlobalFaker will allow you to set what type of faker is globally used. Defailt is math/rand -func SetGlobalFaker(faker *Faker) { - globalFaker = faker -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/file.go b/vendor/github.com/brianvoe/gofakeit/v6/file.go deleted file mode 100644 index 6efddf38626..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/file.go +++ /dev/null @@ -1,43 +0,0 @@ -package gofakeit - -import "math/rand" - -// FileExtension will generate a random file extension -func FileExtension() string { return fileExtension(globalFaker.Rand) } - -// FileExtension will generate a random file extension -func (f *Faker) FileExtension() string { return fileExtension(f.Rand) } - -func fileExtension(r *rand.Rand) string { return getRandValue(r, []string{"file", "extension"}) } - -// FileMimeType will generate a random mime file type -func FileMimeType() string { return fileMimeType(globalFaker.Rand) } - -// FileMimeType will generate a random mime file type -func (f *Faker) FileMimeType() string { return fileMimeType(f.Rand) } - -func fileMimeType(r *rand.Rand) string { return getRandValue(r, []string{"file", "mime_type"}) } - -func addFileLookup() { - AddFuncLookup("fileextension", Info{ - Display: "File Extension", - Category: "file", - Description: "Random file extension", - Example: "nes", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return fileExtension(r), nil - }, - }) - - AddFuncLookup("filemimetype", Info{ - Display: "File Mime Type", - Category: "file", - Description: "Random file mime type", - Example: "application/json", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return fileMimeType(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/finance.go b/vendor/github.com/brianvoe/gofakeit/v6/finance.go deleted file mode 100644 index 8e32b2e3809..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/finance.go +++ /dev/null @@ -1,128 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strconv" - "unicode" -) - -const cusipStr = upperStr + numericStr - -// CUSIP -func Cusip() string { - return cusip(globalFaker.Rand) -} - -func (f *Faker) Cusip() string { - return cusip(f.Rand) -} - -func cusip(r *rand.Rand) string { - cusipBytes := make([]byte, 8) - for i := 0; i < len(cusipBytes); i++ { - cusipBytes[i] = byte(cusipStr[r.Intn(len(cusipStr))]) - } - - baseCusip := string(cusipBytes) - - chkDigit := cusipChecksumDigit(baseCusip) - return baseCusip + chkDigit -} - -// ISIN -func Isin() string { - return isin(globalFaker.Rand) -} - -func (f *Faker) Isin() string { - return isin(f.Rand) -} - -func isin(r *rand.Rand) string { - countryCode := CountryAbr() - nsin := cusip(r) - isinChkDig := isinChecksumDigit(countryCode + nsin) - return countryCode + nsin + isinChkDig -} - -// cusipChecksumDigit returns the checksum digit for a CUSIP -func cusipChecksumDigit(cusip string) string { - sum := 0 - for i, c := range cusip { - v := 0 - if unicode.IsDigit(c) { - v = int(c - '0') - } - if unicode.IsLetter(c) { - //0-indexed ordinal position of Letter + 10 - v = int(c-'A') + 10 - } - if i%2 != 0 { - // Multiply odd digits by two - v = v * 2 - } - - sum = sum + int(v/10) + v%10 - } - - return strconv.Itoa((10 - (sum % 10)) % 10) -} - -// isinChecksumDigit returns the checksum digit for an ISIN -func isinChecksumDigit(isin string) string { - isinDigits := make([]int, 0) - for _, c := range isin { - if unicode.IsLetter(c) { - letterVal := int(c) - 55 - // Each digit is added as a separate value - isinDigits = append(isinDigits, letterVal/10) - isinDigits = append(isinDigits, letterVal%10) - } - if unicode.IsDigit(c) { - isinDigits = append(isinDigits, int(c-'0')) - } - } - - oddSum := 0 - evenSum := 0 - - // Take the per digit sum of the digitized ISIN, doubling even indexed digits - for i, d := range isinDigits { - if i%2 == 0 { - elem := 2 * d - if elem > 9 { - // If the element now has two digits, sum those digits - elem = (elem % 10) + (elem / 10) - } - evenSum += elem - } else { - oddSum += d - } - } - - return strconv.Itoa((10 - (oddSum+evenSum)%10) % 10) -} - -// Lookup Adds -func addFinanceLookup() { - AddFuncLookup("cusip", Info{ - Display: "CUSIP", - Category: "finance", - Description: "Random CUSIP", - Example: "38259P508", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return cusip(r), nil - }, - }) - AddFuncLookup("isin", Info{ - Display: "ISIN", - Category: "finance", - Description: "Random ISIN", - Example: "", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return isin(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/food.go b/vendor/github.com/brianvoe/gofakeit/v6/food.go deleted file mode 100644 index 03232b1decd..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/food.go +++ /dev/null @@ -1,178 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strings" -) - -// Fruit will return a random fruit name -func Fruit() string { return fruit(globalFaker.Rand) } - -// Fruit will return a random fruit name -func (f *Faker) Fruit() string { return fruit(f.Rand) } - -func fruit(r *rand.Rand) string { return getRandValue(r, []string{"food", "fruit"}) } - -// Vegetable will return a random vegetable name -func Vegetable() string { return vegetable(globalFaker.Rand) } - -// Vegetable will return a random vegetable name -func (f *Faker) Vegetable() string { return vegetable(f.Rand) } - -func vegetable(r *rand.Rand) string { return getRandValue(r, []string{"food", "vegetable"}) } - -// Breakfast will return a random breakfast name -func Breakfast() string { return breakfast(globalFaker.Rand) } - -// Breakfast will return a random breakfast name -func (f *Faker) Breakfast() string { return breakfast(f.Rand) } - -func breakfast(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "breakfast"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -// Lunch will return a random lunch name -func Lunch() string { return lunch(globalFaker.Rand) } - -// Lunch will return a random lunch name -func (f *Faker) Lunch() string { return lunch(f.Rand) } - -func lunch(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "lunch"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -// Dinner will return a random dinner name -func Dinner() string { return dinner(globalFaker.Rand) } - -// Dinner will return a random dinner name -func (f *Faker) Dinner() string { return dinner(f.Rand) } - -func dinner(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "dinner"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -// Drink will return a random drink name -func Drink() string { return drink(globalFaker.Rand) } - -// Drink will return a random drink name -func (f *Faker) Drink() string { return drink(f.Rand) } - -func drink(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "drink"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -// Snack will return a random snack name -func Snack() string { return snack(globalFaker.Rand) } - -// Snack will return a random snack name -func (f *Faker) Snack() string { return snack(f.Rand) } - -func snack(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "snack"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -// Dessert will return a random dessert name -func Dessert() string { return dessert(globalFaker.Rand) } - -// Dessert will return a random dessert name -func (f *Faker) Dessert() string { return dessert(f.Rand) } - -func dessert(r *rand.Rand) string { - v := getRandValue(r, []string{"food", "dessert"}) - return strings.ToUpper(v[:1]) + v[1:] -} - -func addFoodLookup() { - AddFuncLookup("fruit", Info{ - Display: "Fruit", - Category: "food", - Description: "Random fruit", - Example: "Peach", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return fruit(r), nil - }, - }) - - AddFuncLookup("vegetable", Info{ - Display: "Vegetable", - Category: "food", - Description: "Random vegetable", - Example: "Amaranth Leaves", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return vegetable(r), nil - }, - }) - - AddFuncLookup("breakfast", Info{ - Display: "Breakfast", - Category: "food", - Description: "Random breakfast", - Example: "Blueberry banana happy face pancakes", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return breakfast(r), nil - }, - }) - - AddFuncLookup("lunch", Info{ - Display: "Lunch", - Category: "food", - Description: "Random lunch", - Example: "No bake hersheys bar pie", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return lunch(r), nil - }, - }) - - AddFuncLookup("dinner", Info{ - Display: "Dinner", - Category: "food", - Description: "Random dinner", - Example: "Wild addicting dip", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return dinner(r), nil - }, - }) - - AddFuncLookup("drink", Info{ - Display: "Drink", - Category: "food", - Description: "Random drink", - Example: "Soda", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return drink(r), nil - }, - }) - - AddFuncLookup("snack", Info{ - Display: "Snack", - Category: "food", - Description: "Random snack", - Example: "Hoisin marinated wing pieces", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return snack(r), nil - }, - }) - - AddFuncLookup("dessert", Info{ - Display: "Dessert", - Category: "food", - Description: "Random dessert", - Example: "French napoleons", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return dessert(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/game.go b/vendor/github.com/brianvoe/gofakeit/v6/game.go deleted file mode 100644 index 72904a4793c..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/game.go +++ /dev/null @@ -1,102 +0,0 @@ -package gofakeit - -import ( - "fmt" - "math/rand" - "strings" -) - -// Gamertag will generate a random video game username -func Gamertag() string { return gamertag(globalFaker.Rand) } - -// Gamertag will generate a random video game username -func (f *Faker) Gamertag() string { return gamertag(f.Rand) } - -func gamertag(r *rand.Rand) string { - str := "" - num := number(r, 1, 4) - switch num { - case 1: - str = fmt.Sprintf("%s%ser", title(nounConcrete(r)), title(verbAction(r))) - case 2: - str = fmt.Sprintf("%s%s", title(adjectiveDescriptive(r)), title(animal(r))) - case 3: - str = fmt.Sprintf("%s%s", title(adjectiveDescriptive(r)), title(nounConcrete(r))) - case 4: - str = fmt.Sprintf("%s%s", title(fruit(r)), title(adjectiveDescriptive(r))) - } - - // Randomly determine if we should add a number - if r.Intn(3) == 1 { - str += digitN(r, uint(number(r, 1, 3))) - } - - // Remove any spaces - str = strings.Replace(str, " ", "", -1) - - return str -} - -// Dice will generate a random set of dice -func Dice(numDice uint, sides []uint) []uint { return dice(globalFaker.Rand, numDice, sides) } - -// Dice will generate a random set of dice -func (f *Faker) Dice(numDice uint, sides []uint) []uint { return dice(f.Rand, numDice, sides) } - -func dice(r *rand.Rand, numDice uint, sides []uint) []uint { - dice := make([]uint, numDice) - - // If we dont have any sides well set the sides to 6 - if len(sides) == 0 { - sides = []uint{6} - } - - for i := range dice { - // If sides[i] doesnt exist use the first side - if len(sides)-1 < i { - dice[i] = uint(number(r, 1, int(sides[0]))) - } else { - dice[i] = uint(number(r, 1, int(sides[i]))) - } - } - - return dice -} - -func addGameLookup() { - AddFuncLookup("gamertag", Info{ - Display: "Gamertag", - Category: "game", - Description: "Random gamertag", - Example: "footinterpret63", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return gamertag(r), nil - }, - }) - - AddFuncLookup("dice", Info{ - Display: "Dice", - Category: "game", - Description: "Random dice outputs", - Example: "footinterpret63", - Output: "[]uint", - Params: []Param{ - {Field: "numdice", Display: "Number of Dice", Type: "uint", Default: "1", Description: "Number of dice to roll"}, - {Field: "sides", Display: "Number of Sides", Type: "[]uint", Default: "[6]", Description: "Number of sides on each dice"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - numDice, err := info.GetUint(m, "numdice") - if err != nil { - return nil, err - } - - sides, err := info.GetUintArray(m, "sides") - if err != nil { - return nil, err - } - - return dice(r, numDice, sides), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/generate.go b/vendor/github.com/brianvoe/gofakeit/v6/generate.go deleted file mode 100644 index 0fccfae28e8..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/generate.go +++ /dev/null @@ -1,585 +0,0 @@ -package gofakeit - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "math/rand" - "regexp/syntax" - "strings" -) - -// Generate fake information from given string. -// Replaceable values should be within {} -// -// Functions -// Ex: {firstname} - billy -// Ex: {sentence:3} - Record river mind. -// Ex: {number:1,10} - 4 -// Ex: {uuid} - 590c1440-9888-45b0-bd51-a817ee07c3f2 -// -// Letters/Numbers -// Ex: ### - 481 - random numbers -// Ex: ??? - fda - random letters -// -// For a complete list of runnable functions use FuncsLookup -func Generate(dataVal string) string { return generate(globalFaker.Rand, dataVal) } - -// Generate fake information from given string. -// Replaceable values should be within {} -// -// Functions -// Ex: {firstname} - billy -// Ex: {sentence:3} - Record river mind. -// Ex: {number:1,10} - 4 -// Ex: {uuid} - 590c1440-9888-45b0-bd51-a817ee07c3f2 -// -// Letters/Numbers -// Ex: ### - 481 - random numbers -// Ex: ??? - fda - random letters -// -// For a complete list of runnable functions use FuncsLookup -func (f *Faker) Generate(dataVal string) string { return generate(f.Rand, dataVal) } - -func generate(r *rand.Rand, dataVal string) string { - // Replace # with numbers and ? with letters - dataVal = replaceWithNumbers(r, dataVal) - dataVal = replaceWithLetters(r, dataVal) - - // Check if string has any replaceable values - if !strings.Contains(dataVal, "{") && !strings.Contains(dataVal, "}") { - return dataVal - } - - // Variables to identify the index in which it exists - startCurly := -1 - startCurlyIgnore := []int{} - endCurly := -1 - endCurlyIgnore := []int{} - - // Loop through string characters - for i := 0; i < len(dataVal); i++ { - // Check for ignores if equal skip - shouldSkip := false - for _, igs := range startCurlyIgnore { - if i == igs { - shouldSkip = true - } - } - for _, ige := range endCurlyIgnore { - if i == ige { - shouldSkip = true - } - } - if shouldSkip { - continue - } - - // Identify items between brackets. Ex: {firstname} - if string(dataVal[i]) == "{" { - startCurly = i - continue - } - if startCurly != -1 && string(dataVal[i]) == "}" { - endCurly = i - } - if startCurly == -1 || endCurly == -1 { - continue - } - - // Get the value between brackets - fParts := dataVal[startCurly+1 : endCurly] - - // Check if has params separated by : - fNameSplit := strings.SplitN(fParts, ":", 2) - fName := "" - fParams := "" - if len(fNameSplit) >= 1 { - fName = fNameSplit[0] - } - if len(fNameSplit) >= 2 { - fParams = fNameSplit[1] - } - - // Check to see if its a replaceable lookup function - if info := GetFuncLookup(fName); info != nil { - // Get parameters, make sure params and the split both have values - mapParams := NewMapParams() - paramsLen := len(info.Params) - - // If just one param and its a string simply just pass it - if paramsLen == 1 && info.Params[0].Type == "string" { - mapParams.Add(info.Params[0].Field, fParams) - } else if paramsLen > 0 && fParams != "" { - splitVals := funcLookupSplit(fParams) - mapParams = addSplitValsToMapParams(splitVals, info, mapParams) - } - if mapParams.Size() == 0 { - mapParams = nil - } - - // Call function - fValue, err := info.Generate(r, mapParams, info) - if err != nil { - // If we came across an error just dont replace value - dataVal = strings.Replace(dataVal, "{"+fParts+"}", err.Error(), 1) - } else { - // Successfully found, run replace with new value - dataVal = strings.Replace(dataVal, "{"+fParts+"}", fmt.Sprintf("%v", fValue), 1) - } - - // Reset the curly index back to -1 and reset ignores - startCurly = -1 - startCurlyIgnore = []int{} - endCurly = -1 - endCurlyIgnore = []int{} - i = -1 // Reset back to the start of the string - continue - } - - // Couldnt find anything - mark curly brackets to skip and rerun - startCurlyIgnore = append(startCurlyIgnore, startCurly) - endCurlyIgnore = append(endCurlyIgnore, endCurly) - - // Reset the curly index back to -1 - startCurly = -1 - endCurly = -1 - i = -1 // Reset back to the start of the string - continue - } - - return dataVal -} - -// FixedWidthOptions defines values needed for csv generation -type FixedWidthOptions struct { - RowCount int `json:"row_count" xml:"row_count" fake:"{number:1,10}"` - Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` -} - -// FixedWidth generates an table of random data in fixed width format -// A nil FixedWidthOptions returns a randomly structured FixedWidth. -func FixedWidth(co *FixedWidthOptions) (string, error) { return fixeWidthFunc(globalFaker.Rand, co) } - -// FixedWidth generates an table of random data in fixed width format -// A nil FixedWidthOptions returns a randomly structured FixedWidth. -func (f *Faker) FixedWidth(co *FixedWidthOptions) (string, error) { return fixeWidthFunc(f.Rand, co) } - -// Function to generate a fixed width document -func fixeWidthFunc(r *rand.Rand, co *FixedWidthOptions) (string, error) { - // If we didn't get FixedWidthOptions, create a new random one - if co == nil { - co = &FixedWidthOptions{} - } - - // Make sure you set a row count - if co.RowCount <= 0 { - co.RowCount = r.Intn(10) + 1 - } - - // Check fields - if len(co.Fields) <= 0 { - // Create random fields - co.Fields = []Field{ - {Name: "Name", Function: "{firstname} {lastname}"}, - {Name: "Email", Function: "email"}, - {Name: "Password", Function: "password", Params: MapParams{"special": {"false"}, "space": {"false"}}}, - } - } - - data := [][]string{} - hasHeader := false - - // Loop through fields, generate data and add to data array - for _, field := range co.Fields { - // Start new row - row := []string{} - - // Add name to first value - if field.Name != "" { - hasHeader = true - } - row = append(row, field.Name) - - // Get function - funcInfo := GetFuncLookup(field.Function) - var value any - if funcInfo == nil { - // Try to run the function through generate - for i := 0; i < co.RowCount; i++ { - row = append(row, generate(r, field.Function)) - } - } else { - // Generate function value - var err error - for i := 0; i < co.RowCount; i++ { - value, err = funcInfo.Generate(r, &field.Params, funcInfo) - if err != nil { - value = "" - } - - // Add value to row - row = append(row, anyToString(value)) - } - } - - // Add row to data - data = append(data, row) - } - - var result strings.Builder - - // Calculate column widths - colWidths := make([]int, len(data)) - for i, row := range data { - for _, value := range row { - width := len(value) + 5 - if width > colWidths[i] { - colWidths[i] = width - } - } - } - - // Append table rows to the string, excluding the entire row if the first value is empty - for i := 0; i < len(data[0]); i++ { - if !hasHeader && i == 0 { - continue // Skip the entire column if the first value is empty - } - - var resultRow strings.Builder - for j, row := range data { - resultRow.WriteString(fmt.Sprintf("%-*s", colWidths[j], row[i])) - } - - // Trim trailing spaces - result.WriteString(strings.TrimRight(resultRow.String(), " ")) - - // Only add new line if not the last row - if i != len(data[0])-1 { - result.WriteString("\n") - } - } - - return result.String(), nil -} - -// Regex will generate a string based upon a RE2 syntax -func Regex(regexStr string) string { return regex(globalFaker.Rand, regexStr) } - -// Regex will generate a string based upon a RE2 syntax -func (f *Faker) Regex(regexStr string) string { return regex(f.Rand, regexStr) } - -func regex(r *rand.Rand, regexStr string) (gen string) { - re, err := syntax.Parse(regexStr, syntax.Perl) - if err != nil { - return "Could not parse regex string" - } - - // Panic catch - defer func() { - if r := recover(); r != nil { - gen = fmt.Sprint(r) - return - - } - }() - - return regexGenerate(r, re, len(regexStr)*100) -} - -func regexGenerate(ra *rand.Rand, re *syntax.Regexp, limit int) string { - if limit <= 0 { - panic("Length limit reached when generating output") - } - - op := re.Op - switch op { - case syntax.OpNoMatch: // matches no strings - // Do Nothing - case syntax.OpEmptyMatch: // matches empty string - return "" - case syntax.OpLiteral: // matches Runes sequence - var b strings.Builder - for _, ru := range re.Rune { - b.WriteRune(ru) - } - return b.String() - case syntax.OpCharClass: // matches Runes interpreted as range pair list - // number of possible chars - sum := 0 - for i := 0; i < len(re.Rune); i += 2 { - sum += int(re.Rune[i+1]-re.Rune[i]) + 1 - if re.Rune[i+1] == 0x10ffff { // rune range end - sum = -1 - break - } - } - - // pick random char in range (inverse match group) - if sum == -1 { - chars := []uint8{} - for j := 0; j < len(allStr); j++ { - c := allStr[j] - - // Check c in range - for i := 0; i < len(re.Rune); i += 2 { - if rune(c) >= re.Rune[i] && rune(c) <= re.Rune[i+1] { - chars = append(chars, c) - break - } - } - } - if len(chars) > 0 { - return string([]byte{chars[ra.Intn(len(chars))]}) - } - } - - r := ra.Intn(int(sum)) - var ru rune - sum = 0 - for i := 0; i < len(re.Rune); i += 2 { - gap := int(re.Rune[i+1]-re.Rune[i]) + 1 - if sum+gap > r { - ru = re.Rune[i] + rune(r-sum) - break - } - sum += gap - } - - return string(ru) - case syntax.OpAnyCharNotNL, syntax.OpAnyChar: // matches any character(and except newline) - return randCharacter(ra, allStr) - case syntax.OpBeginLine: // matches empty string at beginning of line - case syntax.OpEndLine: // matches empty string at end of line - case syntax.OpBeginText: // matches empty string at beginning of text - case syntax.OpEndText: // matches empty string at end of text - case syntax.OpWordBoundary: // matches word boundary `\b` - case syntax.OpNoWordBoundary: // matches word non-boundary `\B` - case syntax.OpCapture: // capturing subexpression with index Cap, optional name Name - return regexGenerate(ra, re.Sub0[0], limit) - case syntax.OpStar: // matches Sub[0] zero or more times - var b strings.Builder - for i := 0; i < number(ra, 0, 10); i++ { - for _, rs := range re.Sub { - b.WriteString(regexGenerate(ra, rs, limit-b.Len())) - } - } - return b.String() - case syntax.OpPlus: // matches Sub[0] one or more times - var b strings.Builder - for i := 0; i < number(ra, 1, 10); i++ { - for _, rs := range re.Sub { - b.WriteString(regexGenerate(ra, rs, limit-b.Len())) - } - } - return b.String() - case syntax.OpQuest: // matches Sub[0] zero or one times - var b strings.Builder - for i := 0; i < number(ra, 0, 1); i++ { - for _, rs := range re.Sub { - b.WriteString(regexGenerate(ra, rs, limit-b.Len())) - } - } - return b.String() - case syntax.OpRepeat: // matches Sub[0] at least Min times, at most Max (Max == -1 is no limit) - var b strings.Builder - count := 0 - re.Max = int(math.Min(float64(re.Max), float64(10))) - if re.Max > re.Min { - count = ra.Intn(re.Max - re.Min + 1) - } - for i := 0; i < re.Min || i < (re.Min+count); i++ { - for _, rs := range re.Sub { - b.WriteString(regexGenerate(ra, rs, limit-b.Len())) - } - } - return b.String() - case syntax.OpConcat: // matches concatenation of Subs - var b strings.Builder - for _, rs := range re.Sub { - b.WriteString(regexGenerate(ra, rs, limit-b.Len())) - } - return b.String() - case syntax.OpAlternate: // matches alternation of Subs - return regexGenerate(ra, re.Sub[number(ra, 0, len(re.Sub)-1)], limit) - } - - return "" -} - -// Map will generate a random set of map data -func Map() map[string]any { return mapFunc(globalFaker.Rand) } - -// Map will generate a random set of map data -func (f *Faker) Map() map[string]any { return mapFunc(f.Rand) } - -func mapFunc(r *rand.Rand) map[string]any { - m := map[string]any{} - - randWordType := func() string { - s := randomString(r, []string{"lorem", "bs", "job", "name", "address"}) - switch s { - case "bs": - return bs(r) - case "job": - return jobTitle(r) - case "name": - return name(r) - case "address": - return street(r) + ", " + city(r) + ", " + state(r) + " " + zip(r) - } - return word(r) - } - - randSlice := func() []string { - var sl []string - for ii := 0; ii < number(r, 3, 10); ii++ { - sl = append(sl, word(r)) - } - return sl - } - - for i := 0; i < number(r, 3, 10); i++ { - t := randomString(r, []string{"string", "int", "float", "slice", "map"}) - switch t { - case "string": - m[word(r)] = randWordType() - case "int": - m[word(r)] = number(r, 1, 10000000) - case "float": - m[word(r)] = float32Range(r, 1, 1000000) - case "slice": - m[word(r)] = randSlice() - case "map": - mm := map[string]any{} - tt := randomString(r, []string{"string", "int", "float", "slice"}) - switch tt { - case "string": - mm[word(r)] = randWordType() - case "int": - mm[word(r)] = number(r, 1, 10000000) - case "float": - mm[word(r)] = float32Range(r, 1, 1000000) - case "slice": - mm[word(r)] = randSlice() - } - m[word(r)] = mm - } - } - - return m -} - -func addGenerateLookup() { - AddFuncLookup("generate", Info{ - Display: "Generate", - Category: "generate", - Description: "Random string generated from string value based upon available data sets", - Example: "{firstname} {lastname} {email} - Markus Moen markusmoen@pagac.net", - Output: "string", - Params: []Param{ - {Field: "str", Display: "String", Type: "string", Description: "String value to generate from"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - str, err := info.GetString(m, "str") - if err != nil { - return nil, err - } - - // Limit the length of the string passed - if len(str) > 1000 { - return nil, errors.New("string length is too large. limit to 1000 characters") - } - - return generate(r, str), nil - }, - }) - - AddFuncLookup("fixed_width", Info{ - Display: "Fixed Width", - Category: "generate", - Description: "Generates fixed width output", - Example: ` - Name Email Password Age - Markus Moen sylvanmraz@murphy.net 6VlvH6qqXc7g 13 - Alayna Wuckert santinostanton@carroll.biz g7sLrS0gEwLO 46 - Lura Lockman zacherykuhic@feil.name S8gV7Z64KlHG 12 - `, - Output: "[]byte", - ContentType: "text/plain", - Params: []Param{ - {Field: "rowcount", Display: "Row Count", Type: "int", Default: "10", Description: "Number of rows"}, - {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields name, function and params"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - co := FixedWidthOptions{} - - rowCount, err := info.GetInt(m, "rowcount") - if err != nil { - return nil, err - } - - co.RowCount = rowCount - - fields, _ := info.GetStringArray(m, "fields") - - // Check to make sure fields has length - if len(fields) > 0 { - co.Fields = make([]Field, len(fields)) - for i, f := range fields { - // Unmarshal fields string into fields array - err = json.Unmarshal([]byte(f), &co.Fields[i]) - if err != nil { - return nil, err - } - } - } else { - return nil, errors.New("missing fields") - } - - out, err := fixeWidthFunc(r, &co) - if err != nil { - return nil, err - } - - return out, nil - }, - }) - - AddFuncLookup("regex", Info{ - Display: "Regex", - Category: "generate", - Description: "Random string generated from regex RE2 syntax string", - Example: "[abcdef]{5} - affec", - Output: "string", - Params: []Param{ - {Field: "str", Display: "String", Type: "string", Description: "Regex RE2 syntax string"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - str, err := info.GetString(m, "str") - if err != nil { - return nil, err - } - - // Limit the length of the string passed - if len(str) > 500 { - return nil, errors.New("string length is too large. limit to 500 characters") - } - - return regex(r, str), nil - }, - }) - - AddFuncLookup("map", Info{ - Display: "Map", - Category: "generate", - Description: "Random map of generated data", - Example: `map[consult:respond context:9285735]`, - Output: "map[string]any", - ContentType: "application/json", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return mapFunc(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/hacker.go b/vendor/github.com/brianvoe/gofakeit/v6/hacker.go deleted file mode 100644 index 890d6aa328d..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/hacker.go +++ /dev/null @@ -1,136 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strings" -) - -// HackerPhrase will return a random hacker sentence -func HackerPhrase() string { return hackerPhrase(globalFaker.Rand) } - -// HackerPhrase will return a random hacker sentence -func (f *Faker) HackerPhrase() string { return hackerPhrase(f.Rand) } - -func hackerPhrase(r *rand.Rand) string { - words := strings.Split(generate(r, getRandValue(r, []string{"hacker", "phrase"})), " ") - words[0] = strings.ToUpper(words[0][0:1]) + words[0][1:] - return strings.Join(words, " ") -} - -// HackerAbbreviation will return a random hacker abbreviation -func HackerAbbreviation() string { return hackerAbbreviation(globalFaker.Rand) } - -// HackerAbbreviation will return a random hacker abbreviation -func (f *Faker) HackerAbbreviation() string { return hackerAbbreviation(f.Rand) } - -func hackerAbbreviation(r *rand.Rand) string { - return getRandValue(r, []string{"hacker", "abbreviation"}) -} - -// HackerAdjective will return a random hacker adjective -func HackerAdjective() string { return hackerAdjective(globalFaker.Rand) } - -// HackerAdjective will return a random hacker adjective -func (f *Faker) HackerAdjective() string { return hackerAdjective(f.Rand) } - -func hackerAdjective(r *rand.Rand) string { - return getRandValue(r, []string{"hacker", "adjective"}) -} - -// HackerNoun will return a random hacker noun -func HackerNoun() string { return hackerNoun(globalFaker.Rand) } - -// HackerNoun will return a random hacker noun -func (f *Faker) HackerNoun() string { return hackerNoun(f.Rand) } - -func hackerNoun(r *rand.Rand) string { - return getRandValue(r, []string{"hacker", "noun"}) -} - -// HackerVerb will return a random hacker verb -func HackerVerb() string { return hackerVerb(globalFaker.Rand) } - -// HackerVerb will return a random hacker verb -func (f *Faker) HackerVerb() string { return hackerVerb(f.Rand) } - -func hackerVerb(r *rand.Rand) string { - return getRandValue(r, []string{"hacker", "verb"}) -} - -// HackeringVerb will return a random hacker ingverb -func HackeringVerb() string { return hackeringVerb(globalFaker.Rand) } - -// HackeringVerb will return a random hacker ingverb -func (f *Faker) HackeringVerb() string { return hackeringVerb(f.Rand) } - -func hackeringVerb(r *rand.Rand) string { - return getRandValue(r, []string{"hacker", "ingverb"}) -} - -func addHackerLookup() { - AddFuncLookup("hackerphrase", Info{ - Display: "Hacker Phrase", - Category: "hacker", - Description: "Random hacker phrase", - Example: "If we calculate the program, we can get to the AI pixel through the redundant XSS matrix!", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackerPhrase(r), nil - }, - }) - - AddFuncLookup("hackerabbreviation", Info{ - Display: "Hacker Abbreviation", - Category: "hacker", - Description: "Random hacker abbreviation", - Example: "ADP", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackerAbbreviation(r), nil - }, - }) - - AddFuncLookup("hackeradjective", Info{ - Display: "Hacker Adjective", - Category: "hacker", - Description: "Random hacker adjective", - Example: "wireless", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackerAdjective(r), nil - }, - }) - - AddFuncLookup("hackernoun", Info{ - Display: "Hacker Noun", - Category: "hacker", - Description: "Random hacker noun", - Example: "driver", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackerNoun(r), nil - }, - }) - - AddFuncLookup("hackerverb", Info{ - Display: "Hacker Verb", - Category: "hacker", - Description: "Random hacker verb", - Example: "synthesize", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackerVerb(r), nil - }, - }) - - AddFuncLookup("hackeringverb", Info{ - Display: "Hackering Verb", - Category: "hacker", - Description: "Random hackering verb", - Example: "connecting", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hackeringVerb(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/helpers.go b/vendor/github.com/brianvoe/gofakeit/v6/helpers.go deleted file mode 100644 index 278874d8183..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/helpers.go +++ /dev/null @@ -1,399 +0,0 @@ -package gofakeit - -import ( - crand "crypto/rand" - "encoding/binary" - "encoding/json" - "fmt" - "math" - "math/rand" - "reflect" - "strings" - "unicode" - - "github.com/brianvoe/gofakeit/v6/data" -) - -const lowerStr = "abcdefghijklmnopqrstuvwxyz" -const upperStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -const numericStr = "0123456789" -const specialStr = "!@#$%&*+-_=?:;,.|(){}<>" -const spaceStr = " " -const allStr = lowerStr + upperStr + numericStr + specialStr + spaceStr -const vowels = "aeiou" -const hashtag = '#' -const questionmark = '?' -const dash = '-' -const base58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" -const minUint = 0 -const maxUint = ^uint(0) -const minInt = -maxInt - 1 -const maxInt = int(^uint(0) >> 1) - -// Seed will set the global random value. Setting seed to 0 will use crypto/rand -func Seed(seed int64) { - if seed == 0 { - binary.Read(crand.Reader, binary.BigEndian, &seed) - globalFaker.Rand.Seed(seed) - } else { - globalFaker.Rand.Seed(seed) - } -} - -// Check if in lib -func dataCheck(dataVal []string) bool { - var checkOk bool - - if len(dataVal) == 2 { - _, checkOk = data.Data[dataVal[0]] - if checkOk { - _, checkOk = data.Data[dataVal[0]][dataVal[1]] - } - } - - return checkOk -} - -// Get Random Value -func getRandValue(r *rand.Rand, dataVal []string) string { - if !dataCheck(dataVal) { - return "" - } - return data.Data[dataVal[0]][dataVal[1]][r.Intn(len(data.Data[dataVal[0]][dataVal[1]]))] -} - -// Replace # with numbers -func replaceWithNumbers(r *rand.Rand, str string) string { - if str == "" { - return str - } - bytestr := []byte(str) - for i := 0; i < len(bytestr); i++ { - if bytestr[i] == hashtag { - bytestr[i] = byte(randDigit(r)) - } - } - if bytestr[0] == '0' { - bytestr[0] = byte(r.Intn(8)+1) + '0' - } - - return string(bytestr) -} - -// Replace ? with ASCII lowercase letters -func replaceWithLetters(r *rand.Rand, str string) string { - if str == "" { - return str - } - bytestr := []byte(str) - for i := 0; i < len(bytestr); i++ { - if bytestr[i] == questionmark { - bytestr[i] = byte(randLetter(r)) - } - } - - return string(bytestr) -} - -// Replace ? with ASCII lowercase letters between a and f -func replaceWithHexLetters(r *rand.Rand, str string) string { - if str == "" { - return str - } - bytestr := []byte(str) - for i := 0; i < len(bytestr); i++ { - if bytestr[i] == questionmark { - bytestr[i] = byte(randHexLetter(r)) - } - } - - return string(bytestr) -} - -// Generate random lowercase ASCII letter -func randLetter(r *rand.Rand) rune { - allLetters := upperStr + lowerStr - return rune(allLetters[r.Intn(len(allLetters))]) -} - -func randCharacter(r *rand.Rand, s string) string { - return string(s[r.Int63()%int64(len(s))]) -} - -// Generate random lowercase ASCII letter between a and f -func randHexLetter(r *rand.Rand) rune { - return rune(byte(r.Intn(6)) + 'a') -} - -// Generate random ASCII digit -func randDigit(r *rand.Rand) rune { - return rune(byte(r.Intn(10)) + '0') -} - -// Generate random integer between min and max -func randIntRange(r *rand.Rand, min, max int) int { - // If they pass in the same number, just return that number - if min == max { - return min - } - - // If they pass in a min that is bigger than max, swap them - if min > max { - ogmin := min - min = max - max = ogmin - } - - // Figure out if the min/max numbers calculation - // would cause a panic in the Int63() function. - if max-min+1 > 0 { - return min + int(r.Int63n(int64(max-min+1))) - } - - // Loop through the range until we find a number that fits - for { - v := int(r.Uint64()) - if (v >= min) && (v <= max) { - return v - } - } -} - -// Generate random uint between min and max -func randUintRange(r *rand.Rand, min, max uint) uint { - // If they pass in the same number, just return that number - if min == max { - return min - } - - // If they pass in a min that is bigger than max, swap them - if min > max { - ogmin := min - min = max - max = ogmin - } - - // Figure out if the min/max numbers calculation - // would cause a panic in the Int63() function. - if int(max)-int(min)+1 > 0 { - return uint(r.Intn(int(max)-int(min)+1) + int(min)) - } - - // Loop through the range until we find a number that fits - for { - v := uint(r.Uint64()) - if (v >= min) && (v <= max) { - return v - } - } -} - -func toFixed(num float64, precision int) float64 { - output := math.Pow(10, float64(precision)) - return float64(math.Floor(num*output)) / output -} - -func equalSliceString(a, b []string) bool { - sizeA, sizeB := len(a), len(b) - if sizeA != sizeB { - return false - } - - for i, va := range a { - vb := b[i] - - if va != vb { - return false - } - } - return true -} - -func equalSliceInt(a, b []int) bool { - sizeA, sizeB := len(a), len(b) - if sizeA != sizeB { - return false - } - - for i, va := range a { - vb := b[i] - - if va != vb { - return false - } - } - return true -} - -func equalSliceInterface(a, b []any) bool { - sizeA, sizeB := len(a), len(b) - if sizeA != sizeB { - return false - } - - for i, va := range a { - if !reflect.DeepEqual(va, b[i]) { - return false - } - } - return true -} - -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -func anyToString(a any) string { - if a == nil { - return "" - } - - // If it's a slice of bytes or struct, unmarshal it into an interface - if bytes, ok := a.([]byte); ok { - return string(bytes) - } - - // If it's a struct, map, or slice, convert to JSON - switch reflect.TypeOf(a).Kind() { - case reflect.Struct, reflect.Map, reflect.Slice: - b, err := json.Marshal(a) - if err == nil { - return string(b) - } - } - - return fmt.Sprintf("%v", a) -} - -// Title returns a copy of the string s with all Unicode letters that begin words -// mapped to their Unicode title case -func title(s string) string { - // isSeparator reports whether the rune could mark a word boundary - isSeparator := func(r rune) bool { - // ASCII alphanumerics and underscore are not separators - if r <= 0x7F { - switch { - case '0' <= r && r <= '9': - return false - case 'a' <= r && r <= 'z': - return false - case 'A' <= r && r <= 'Z': - return false - case r == '_': - return false - } - return true - } - - // Letters and digits are not separators - if unicode.IsLetter(r) || unicode.IsDigit(r) { - return false - } - - // Otherwise, all we can do for now is treat spaces as separators. - return unicode.IsSpace(r) - } - - prev := ' ' - return strings.Map( - func(r rune) rune { - if isSeparator(prev) { - prev = r - return unicode.ToTitle(r) - } - prev = r - return r - }, - s) -} - -func funcLookupSplit(str string) []string { - out := []string{} - for str != "" { - if strings.HasPrefix(str, "[") { - startIndex := strings.Index(str, "[") - endIndex := strings.Index(str, "]") - val := str[(startIndex) : endIndex+1] - out = append(out, strings.TrimSpace(val)) - str = strings.Replace(str, val, "", 1) - - // Trim off comma if it has it - if strings.HasPrefix(str, ",") { - str = strings.Replace(str, ",", "", 1) - } - } else { - strSplit := strings.SplitN(str, ",", 2) - strSplitLen := len(strSplit) - if strSplitLen >= 1 { - out = append(out, strings.TrimSpace(strSplit[0])) - } - if strSplitLen >= 2 { - str = strSplit[1] - } else { - str = "" - } - } - } - - return out -} - -// Used for parsing the tag in a struct -func parseNameAndParamsFromTag(tag string) (string, string) { - // Trim the curly on the beginning and end - tag = strings.TrimLeft(tag, "{") - tag = strings.TrimRight(tag, "}") - // Check if has params separated by : - fNameSplit := strings.SplitN(tag, ":", 2) - fName := "" - fParams := "" - if len(fNameSplit) >= 1 { - fName = fNameSplit[0] - } - if len(fNameSplit) >= 2 { - fParams = fNameSplit[1] - } - return fName, fParams -} - -// Used for parsing map params -func parseMapParams(info *Info, fParams string) *MapParams { - // Get parameters, make sure params and the split both have values - mapParams := NewMapParams() - paramsLen := len(info.Params) - - // If just one param and its a string simply just pass it - if paramsLen == 1 && info.Params[0].Type == "string" { - mapParams.Add(info.Params[0].Field, fParams) - } else if paramsLen > 0 && fParams != "" { - splitVals := funcLookupSplit(fParams) - mapParams = addSplitValsToMapParams(splitVals, info, mapParams) - } - if mapParams.Size() > 0 { - return mapParams - } else { - return nil - } -} - -// Used for splitting the values -func addSplitValsToMapParams(splitVals []string, info *Info, mapParams *MapParams) *MapParams { - for ii := 0; ii < len(splitVals); ii++ { - if len(info.Params)-1 >= ii { - if strings.HasPrefix(splitVals[ii], "[") { - lookupSplits := funcLookupSplit(strings.TrimRight(strings.TrimLeft(splitVals[ii], "["), "]")) - for _, v := range lookupSplits { - mapParams.Add(info.Params[ii].Field, v) - } - } else { - mapParams.Add(info.Params[ii].Field, splitVals[ii]) - } - } - } - return mapParams -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/hipster.go b/vendor/github.com/brianvoe/gofakeit/v6/hipster.go deleted file mode 100644 index 661dd381d79..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/hipster.go +++ /dev/null @@ -1,127 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" -) - -// HipsterWord will return a single hipster word -func HipsterWord() string { return hipsterWord(globalFaker.Rand) } - -// HipsterWord will return a single hipster word -func (f *Faker) HipsterWord() string { return hipsterWord(f.Rand) } - -func hipsterWord(r *rand.Rand) string { return getRandValue(r, []string{"hipster", "word"}) } - -// HipsterSentence will generate a random sentence -func HipsterSentence(wordCount int) string { return hipsterSentence(globalFaker.Rand, wordCount) } - -// HipsterSentence will generate a random sentence -func (f *Faker) HipsterSentence(wordCount int) string { return hipsterSentence(f.Rand, wordCount) } - -func hipsterSentence(r *rand.Rand, wordCount int) string { - return sentenceGen(r, wordCount, hipsterWord) -} - -// HipsterParagraph will generate a random paragraphGenerator -// Set Paragraph Count -// Set Sentence Count -// Set Word Count -// Set Paragraph Separator -func HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return hipsterParagraph(globalFaker.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -// HipsterParagraph will generate a random paragraphGenerator -// Set Paragraph Count -// Set Sentence Count -// Set Word Count -// Set Paragraph Separator -func (f *Faker) HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return hipsterParagraph(f.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -func hipsterParagraph(r *rand.Rand, paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return paragraphGen(r, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, hipsterSentence) -} - -func addHipsterLookup() { - AddFuncLookup("hipsterword", Info{ - Display: "Hipster Word", - Category: "hipster", - Description: "Random hipster word", - Example: "microdosing", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hipsterWord(r), nil - }, - }) - - AddFuncLookup("hipstersentence", Info{ - Display: "Hipster Sentence", - Category: "hipster", - Description: "Random hipster sentence", - Example: "Microdosing roof chia echo pickled.", - Output: "string", - Params: []Param{ - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - return hipsterSentence(r, wordCount), nil - }, - }) - - AddFuncLookup("hipsterparagraph", Info{ - Display: "Hipster Paragraph", - Category: "hipster", - Description: "Random hipster paragraph", - Example: "Microdosing roof chia echo pickled meditation cold-pressed raw denim fingerstache normcore sriracha pork belly. Wolf try-hard pop-up blog tilde hashtag health butcher waistcoat paleo portland vinegar. Microdosing sartorial blue bottle slow-carb freegan five dollar toast you probably haven't heard of them asymmetrical chia farm-to-table narwhal banjo. Gluten-free blog authentic literally synth vinyl meh ethical health fixie banh mi Yuccie. Try-hard drinking squid seitan cray VHS echo chillwave hammock kombucha food truck sustainable.
Pug bushwick hella tote bag cliche direct trade waistcoat yr waistcoat knausgaard pour-over master. Pitchfork jean shorts franzen flexitarian distillery hella meggings austin knausgaard crucifix wolf heirloom. Crucifix food truck you probably haven't heard of them trust fund fixie gentrify pitchfork stumptown mlkshk umami chambray blue bottle. 3 wolf moon swag +1 biodiesel knausgaard semiotics taxidermy meh artisan hoodie +1 blue bottle. Fashion axe forage mixtape Thundercats pork belly whatever 90's beard selfies chambray cred mlkshk.
Shabby chic typewriter VHS readymade lo-fi bitters PBR&B gentrify lomo raw denim freegan put a bird on it. Raw denim cliche dreamcatcher pug fixie park trust fund migas fingerstache sriracha +1 mustache. Tilde shoreditch kickstarter franzen dreamcatcher green juice mustache neutra polaroid stumptown organic schlitz. Flexitarian ramps chicharrones kogi lo-fi mustache tilde forage street church-key williamsburg taxidermy. Chia mustache plaid mumblecore squid slow-carb disrupt Thundercats goth shoreditch master direct trade.", - Output: "string", - Params: []Param{ - {Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"}, - {Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"}, - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - {Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "
", Description: "String value to add between paragraphs"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - paragraphCount, err := info.GetInt(m, "paragraphcount") - if err != nil { - return nil, err - } - if paragraphCount <= 0 || paragraphCount > 20 { - return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20") - } - - sentenceCount, err := info.GetInt(m, "sentencecount") - if err != nil { - return nil, err - } - if sentenceCount <= 0 || sentenceCount > 20 { - return nil, errors.New("invalid sentence count, must be greater than 0, less than 20") - } - - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - paragraphSeparator, err := info.GetString(m, "paragraphseparator") - if err != nil { - return nil, err - } - - return hipsterParagraph(r, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/html.go b/vendor/github.com/brianvoe/gofakeit/v6/html.go deleted file mode 100644 index a613baab333..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/html.go +++ /dev/null @@ -1,172 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" - "strconv" - "strings" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// InputName will return a random input field name -func InputName() string { - return inputName(globalFaker.Rand) -} - -// InputName will return a random input field name -func (f *Faker) InputName() string { - return inputName(f.Rand) -} - -func inputName(r *rand.Rand) string { - return getRandValue(r, []string{"html", "input_name"}) -} - -type SVGOptions struct { - Height int - Width int - Type string - Colors []string -} - -// Generate a random svg generator -func Svg(options *SVGOptions) string { return svg(globalFaker.Rand, options) } - -// Generate a random svg generator -func (f *Faker) Svg(options *SVGOptions) string { return svg(f.Rand, options) } - -func svg(r *rand.Rand, options *SVGOptions) string { - // If options is nil, set it to empty struct - if options == nil { - options = &SVGOptions{} - } - - // If options height and weight is not set, set it to random number between 100 and 500 - if options.Width == 0 { - options.Width = number(r, 100, 500) - } - widthStr := strconv.Itoa(options.Width) - if options.Height == 0 { - options.Height = number(r, 100, 500) - } - heightStr := strconv.Itoa(options.Height) - - // Check if type is set, if not set to random type - if options.Type == "" { - options.Type = randomString(r, data.GetSubData("html", "svg")) - } - - // If the colors are not set, set it to a set of nice colors - if len(options.Colors) == 0 { - options.Colors = niceColors(r) - } - - // Start svg string - svgStr := `` - - // Add a rect for the background - svgStr += `` - - // Add a random number of shapes - for i := 0; i < number(r, 10, 20); i++ { - // Add a random shape - switch options.Type { - case "rect": - svgStr += `` - case "circle": - svgStr += `` - case "ellipse": - svgStr += `` - case "line": - svgStr += `` - case "polyline": - svgStr += `` - case "polygon": - svgStr += `` - } - } - - // End svg string - svgStr += `` - - return svgStr -} - -func addHtmlLookup() { - AddFuncLookup("inputname", Info{ - Display: "Input Name", - Category: "html", - Description: "Random HTML input field name", - Example: "first_name", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return inputName(r), nil - }, - }) - - AddFuncLookup("svg", Info{ - Display: "Image SVG", - Category: "html", - Description: "Random svg and ", - Example: ``, - Output: "string", - ContentType: "image/svg+xml", - Params: []Param{ - {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Width in px"}, - {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Height in px"}, - {Field: "type", Display: "Type", Type: "string", Optional: true, Options: data.GetSubData("html", "svg"), Description: "Sub child element type"}, - {Field: "colors", Display: "Colors", Type: "[]string", Optional: true, Description: "Hex or RGB array of colors to use"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - // Setup new options - options := SVGOptions{} - var err error - - options.Width, err = info.GetInt(m, "width") - if err != nil { - return nil, err - } - if options.Width < 10 || options.Width >= 1000 { - return nil, errors.New("invalid image width, must be greater than 10, less than 1000") - } - - options.Height, err = info.GetInt(m, "height") - if err != nil { - return nil, err - } - if options.Height < 10 || options.Height >= 1000 { - return nil, errors.New("invalid image height, must be greater than 10, less than 1000") - } - - options.Type, err = info.GetString(m, "type") - svgData := data.GetSubData("html", "svg") - if err != nil { - return nil, err - } - - // If type is empty, set with random type - if options.Type == "" { - options.Type = randomString(r, svgData) - } - - // If not in date html svg type array, return error - if !stringInSlice(options.Type, svgData) { - return nil, errors.New("invalid svg type, must be one of " + strings.Join(svgData, ",")) - } - - // Get colors - options.Colors, err = info.GetStringArray(m, "colors") - if err != nil { - return nil, err - } - - // If colors is empty, set with random colors - if len(options.Colors) == 0 { - options.Colors = niceColors(r) - } - - return svg(r, &options), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/image.go b/vendor/github.com/brianvoe/gofakeit/v6/image.go deleted file mode 100644 index 211090e3f98..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/image.go +++ /dev/null @@ -1,165 +0,0 @@ -package gofakeit - -import ( - "bytes" - "errors" - img "image" - imgCol "image/color" - "image/jpeg" - "image/png" - "math/rand" - "strconv" -) - -// ImageURL will generate a random Image Based Upon Height And Width. https://picsum.photos/ -func ImageURL(width int, height int) string { return imageURL(globalFaker.Rand, width, height) } - -// ImageURL will generate a random Image Based Upon Height And Width. https://picsum.photos/ -func (f *Faker) ImageURL(width int, height int) string { return imageURL(f.Rand, width, height) } - -func imageURL(r *rand.Rand, width int, height int) string { - return "https://picsum.photos/" + strconv.Itoa(width) + "/" + strconv.Itoa(height) -} - -// Image generates a random rgba image -func Image(width int, height int) *img.RGBA { return image(globalFaker.Rand, width, height) } - -// Image generates a random rgba image -func (f *Faker) Image(width int, height int) *img.RGBA { return image(f.Rand, width, height) } - -func image(r *rand.Rand, width int, height int) *img.RGBA { - upLeft := img.Point{0, 0} - lowRight := img.Point{width, height} - - img := img.NewRGBA(img.Rectangle{upLeft, lowRight}) - - // Set color for each pixel - for x := 0; x < width; x++ { - for y := 0; y < height; y++ { - img.Set(x, y, imgCol.RGBA{uint8(number(r, 0, 255)), uint8(number(r, 0, 255)), uint8(number(r, 0, 255)), 0xff}) - } - } - - return img -} - -// ImageJpeg generates a random rgba jpeg image -func ImageJpeg(width int, height int) []byte { return imageJpeg(globalFaker.Rand, width, height) } - -// ImageJpeg generates a random rgba jpeg image -func (f *Faker) ImageJpeg(width int, height int) []byte { return imageJpeg(f.Rand, width, height) } - -func imageJpeg(r *rand.Rand, width int, height int) []byte { - buf := new(bytes.Buffer) - jpeg.Encode(buf, image(r, width, height), nil) - return buf.Bytes() -} - -// ImagePng generates a random rgba png image -func ImagePng(width int, height int) []byte { return imagePng(globalFaker.Rand, width, height) } - -// ImagePng generates a random rgba png image -func (f *Faker) ImagePng(width int, height int) []byte { return imagePng(f.Rand, width, height) } - -func imagePng(r *rand.Rand, width int, height int) []byte { - buf := new(bytes.Buffer) - png.Encode(buf, image(r, width, height)) - return buf.Bytes() -} - -func addImageLookup() { - AddFuncLookup("imageurl", Info{ - Display: "Image URL", - Category: "image", - Description: "Random image url", - Example: "https://picsum.photos/500/500", - Output: "string", - Params: []Param{ - {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"}, - {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - width, err := info.GetInt(m, "width") - if err != nil { - return nil, err - } - if width < 10 || width >= 1000 { - return nil, errors.New("invalid image width, must be greater than 10, less than 1000") - } - - height, err := info.GetInt(m, "height") - if err != nil { - return nil, err - } - if height < 10 || height >= 1000 { - return nil, errors.New("invalid image height, must be greater than 10, less than 1000") - } - - return imageURL(r, width, height), nil - }, - }) - - AddFuncLookup("imagejpeg", Info{ - Display: "Image JPEG", - Category: "image", - Description: "Random jpeg image", - Example: "file.jpeg - bytes", - Output: "[]byte", - ContentType: "image/jpeg", - Params: []Param{ - {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"}, - {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - width, err := info.GetInt(m, "width") - if err != nil { - return nil, err - } - if width < 10 || width >= 1000 { - return nil, errors.New("invalid image width, must be greater than 10, less than 1000") - } - - height, err := info.GetInt(m, "height") - if err != nil { - return nil, err - } - if height < 10 || height >= 1000 { - return nil, errors.New("invalid image height, must be greater than 10, less than 1000") - } - - return imageJpeg(r, width, height), nil - }, - }) - - AddFuncLookup("imagepng", Info{ - Display: "Image PNG", - Category: "image", - Description: "Random png image", - Example: "file.png - bytes", - Output: "[]byte", - ContentType: "image/png", - Params: []Param{ - {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"}, - {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - width, err := info.GetInt(m, "width") - if err != nil { - return nil, err - } - if width < 10 || width >= 1000 { - return nil, errors.New("invalid image width, must be greater than 10, less than 1000") - } - - height, err := info.GetInt(m, "height") - if err != nil { - return nil, err - } - if height < 10 || height >= 1000 { - return nil, errors.New("invalid image height, must be greater than 10, less than 1000") - } - - return imagePng(r, width, height), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/internet.go b/vendor/github.com/brianvoe/gofakeit/v6/internet.go deleted file mode 100644 index b06a319b440..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/internet.go +++ /dev/null @@ -1,441 +0,0 @@ -package gofakeit - -import ( - "fmt" - "math/rand" - "strconv" - "strings" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// DomainName will generate a random url domain name -func DomainName() string { return domainName(globalFaker.Rand) } - -// DomainName will generate a random url domain name -func (f *Faker) DomainName() string { return domainName(f.Rand) } - -func domainName(r *rand.Rand) string { - name := strings.Replace(strings.ToLower(jobDescriptor(r)+bs(r)), " ", "", -1) - - return fmt.Sprintf("%s.%s", name, domainSuffix(r)) -} - -// DomainSuffix will generate a random domain suffix -func DomainSuffix() string { return domainSuffix(globalFaker.Rand) } - -// DomainSuffix will generate a random domain suffix -func (f *Faker) DomainSuffix() string { return domainSuffix(f.Rand) } - -func domainSuffix(r *rand.Rand) string { - return getRandValue(r, []string{"internet", "domain_suffix"}) -} - -// URL will generate a random url string -func URL() string { return url(globalFaker.Rand) } - -// URL will generate a random url string -func (f *Faker) URL() string { return url(f.Rand) } - -func url(r *rand.Rand) string { - // Slugs - num := number(r, 1, 4) - slug := make([]string, num) - for i := 0; i < num; i++ { - slug[i] = bs(r) - } - - scheme := randomString(r, []string{"https", "http"}) - path := strings.ToLower(strings.Join(slug, "/")) - - url := fmt.Sprintf("%s://www.%s/%s", scheme, domainName(r), path) - url = strings.Replace(url, " ", "", -1) - - return url -} - -// HTTPMethod will generate a random http method -func HTTPMethod() string { return httpMethod(globalFaker.Rand) } - -// HTTPMethod will generate a random http method -func (f *Faker) HTTPMethod() string { return httpMethod(f.Rand) } - -func httpMethod(r *rand.Rand) string { - return getRandValue(r, []string{"internet", "http_method"}) -} - -// IPv4Address will generate a random version 4 ip address -func IPv4Address() string { return ipv4Address(globalFaker.Rand) } - -// IPv4Address will generate a random version 4 ip address -func (f *Faker) IPv4Address() string { return ipv4Address(f.Rand) } - -func ipv4Address(r *rand.Rand) string { - num := func() int { return r.Intn(256) } - - return fmt.Sprintf("%d.%d.%d.%d", num(), num(), num(), num()) -} - -// IPv6Address will generate a random version 6 ip address -func IPv6Address() string { return ipv6Address(globalFaker.Rand) } - -// IPv6Address will generate a random version 6 ip address -func (f *Faker) IPv6Address() string { return ipv6Address(f.Rand) } - -func ipv6Address(r *rand.Rand) string { - num := func() int { return r.Intn(65536) } - - return fmt.Sprintf("%x:%x:%x:%x:%x:%x:%x:%x", num(), num(), num(), num(), num(), num(), num(), num()) -} - -// MacAddress will generate a random mac address -func MacAddress() string { return macAddress(globalFaker.Rand) } - -// MacAddress will generate a random mac address -func (f *Faker) MacAddress() string { return macAddress(f.Rand) } - -func macAddress(r *rand.Rand) string { - num := 255 - - return fmt.Sprintf("%02x:%02x:%02x:%02x:%02x:%02x", r.Intn(num), r.Intn(num), r.Intn(num), r.Intn(num), r.Intn(num), r.Intn(num)) -} - -// HTTPStatusCode will generate a random status code -func HTTPStatusCode() int { return httpStatusCode(globalFaker.Rand) } - -// HTTPStatusCode will generate a random status code -func (f *Faker) HTTPStatusCode() int { return httpStatusCode(f.Rand) } - -func httpStatusCode(r *rand.Rand) int { - randInt, _ := strconv.Atoi(getRandValue(r, []string{"internet", "http_status_general"})) - return randInt -} - -// HTTPStatusCodeSimple will generate a random simple status code -func HTTPStatusCodeSimple() int { return httpStatusCodeSimple(globalFaker.Rand) } - -// HTTPStatusCodeSimple will generate a random simple status code -func (f *Faker) HTTPStatusCodeSimple() int { return httpStatusCodeSimple(f.Rand) } - -func httpStatusCodeSimple(r *rand.Rand) int { - randInt, _ := strconv.Atoi(getRandValue(r, []string{"internet", "http_status_simple"})) - return randInt -} - -// LogLevel will generate a random log level -// See data/LogLevels for list of available levels -func LogLevel(logType string) string { return logLevel(globalFaker.Rand, logType) } - -// LogLevel will generate a random log level -// See data/LogLevels for list of available levels -func (f *Faker) LogLevel(logType string) string { return logLevel(f.Rand, logType) } - -func logLevel(r *rand.Rand, logType string) string { - if _, ok := data.LogLevels[logType]; ok { - return getRandValue(r, []string{"log_level", logType}) - } - - return getRandValue(r, []string{"log_level", "general"}) -} - -// UserAgent will generate a random broswer user agent -func UserAgent() string { return userAgent(globalFaker.Rand) } - -// UserAgent will generate a random broswer user agent -func (f *Faker) UserAgent() string { return userAgent(f.Rand) } - -func userAgent(r *rand.Rand) string { - randNum := randIntRange(r, 0, 4) - switch randNum { - case 0: - return chromeUserAgent(r) - case 1: - return firefoxUserAgent(r) - case 2: - return safariUserAgent(r) - case 3: - return operaUserAgent(r) - default: - return chromeUserAgent(r) - } -} - -// ChromeUserAgent will generate a random chrome browser user agent string -func ChromeUserAgent() string { return chromeUserAgent(globalFaker.Rand) } - -// ChromeUserAgent will generate a random chrome browser user agent string -func (f *Faker) ChromeUserAgent() string { return chromeUserAgent(f.Rand) } - -func chromeUserAgent(r *rand.Rand) string { - randNum1 := strconv.Itoa(randIntRange(r, 531, 536)) + strconv.Itoa(randIntRange(r, 0, 2)) - randNum2 := strconv.Itoa(randIntRange(r, 36, 40)) - randNum3 := strconv.Itoa(randIntRange(r, 800, 899)) - return "Mozilla/5.0 " + "(" + randomPlatform(r) + ") AppleWebKit/" + randNum1 + " (KHTML, like Gecko) Chrome/" + randNum2 + ".0." + randNum3 + ".0 Mobile Safari/" + randNum1 -} - -// FirefoxUserAgent will generate a random firefox broswer user agent string -func FirefoxUserAgent() string { return firefoxUserAgent(globalFaker.Rand) } - -// FirefoxUserAgent will generate a random firefox broswer user agent string -func (f *Faker) FirefoxUserAgent() string { return firefoxUserAgent(f.Rand) } - -func firefoxUserAgent(r *rand.Rand) string { - ver := "Gecko/" + date(r).Format("2006-01-02") + " Firefox/" + strconv.Itoa(randIntRange(r, 35, 37)) + ".0" - platforms := []string{ - "(" + windowsPlatformToken(r) + "; " + "en-US" + "; rv:1.9." + strconv.Itoa(randIntRange(r, 0, 3)) + ".20) " + ver, - "(" + linuxPlatformToken(r) + "; rv:" + strconv.Itoa(randIntRange(r, 5, 8)) + ".0) " + ver, - "(" + macPlatformToken(r) + " rv:" + strconv.Itoa(randIntRange(r, 2, 7)) + ".0) " + ver, - } - - return "Mozilla/5.0 " + randomString(r, platforms) -} - -// SafariUserAgent will generate a random safari browser user agent string -func SafariUserAgent() string { return safariUserAgent(globalFaker.Rand) } - -// SafariUserAgent will generate a random safari browser user agent string -func (f *Faker) SafariUserAgent() string { return safariUserAgent(f.Rand) } - -func safariUserAgent(r *rand.Rand) string { - randNum := strconv.Itoa(randIntRange(r, 531, 536)) + "." + strconv.Itoa(randIntRange(r, 1, 51)) + "." + strconv.Itoa(randIntRange(r, 1, 8)) - ver := strconv.Itoa(randIntRange(r, 4, 6)) + "." + strconv.Itoa(randIntRange(r, 0, 2)) - - mobileDevices := []string{ - "iPhone; CPU iPhone OS", - "iPad; CPU OS", - } - - platforms := []string{ - "(Windows; U; " + windowsPlatformToken(r) + ") AppleWebKit/" + randNum + " (KHTML, like Gecko) Version/" + ver + " Safari/" + randNum, - "(" + macPlatformToken(r) + " rv:" + strconv.Itoa(randIntRange(r, 4, 7)) + ".0; en-US) AppleWebKit/" + randNum + " (KHTML, like Gecko) Version/" + ver + " Safari/" + randNum, - "(" + randomString(r, mobileDevices) + " " + strconv.Itoa(randIntRange(r, 7, 9)) + "_" + strconv.Itoa(randIntRange(r, 0, 3)) + "_" + strconv.Itoa(randIntRange(r, 1, 3)) + " like Mac OS X; " + "en-US" + ") AppleWebKit/" + randNum + " (KHTML, like Gecko) Version/" + strconv.Itoa(randIntRange(r, 3, 5)) + ".0.5 Mobile/8B" + strconv.Itoa(randIntRange(r, 111, 120)) + " Safari/6" + randNum, - } - - return "Mozilla/5.0 " + randomString(r, platforms) -} - -// OperaUserAgent will generate a random opera browser user agent string -func OperaUserAgent() string { return operaUserAgent(globalFaker.Rand) } - -// OperaUserAgent will generate a random opera browser user agent string -func (f *Faker) OperaUserAgent() string { return operaUserAgent(f.Rand) } - -func operaUserAgent(r *rand.Rand) string { - platform := "(" + randomPlatform(r) + "; en-US) Presto/2." + strconv.Itoa(randIntRange(r, 8, 13)) + "." + strconv.Itoa(randIntRange(r, 160, 355)) + " Version/" + strconv.Itoa(randIntRange(r, 10, 13)) + ".00" - - return "Opera/" + strconv.Itoa(randIntRange(r, 8, 10)) + "." + strconv.Itoa(randIntRange(r, 10, 99)) + " " + platform -} - -// linuxPlatformToken will generate a random linux platform -func linuxPlatformToken(r *rand.Rand) string { - return "X11; Linux " + getRandValue(r, []string{"computer", "linux_processor"}) -} - -// macPlatformToken will generate a random mac platform -func macPlatformToken(r *rand.Rand) string { - return "Macintosh; " + getRandValue(r, []string{"computer", "mac_processor"}) + " Mac OS X 10_" + strconv.Itoa(randIntRange(r, 5, 9)) + "_" + strconv.Itoa(randIntRange(r, 0, 10)) -} - -// windowsPlatformToken will generate a random windows platform -func windowsPlatformToken(r *rand.Rand) string { - return getRandValue(r, []string{"computer", "windows_platform"}) -} - -// randomPlatform will generate a random platform -func randomPlatform(r *rand.Rand) string { - platforms := []string{ - linuxPlatformToken(r), - macPlatformToken(r), - windowsPlatformToken(r), - } - - return randomString(r, platforms) -} - -// HTTPVersion will generate a random http version -func HTTPVersion() string { return httpVersion(globalFaker.Rand) } - -// HTTPVersion will generate a random http version -func (f *Faker) HTTPVersion() string { return httpVersion(f.Rand) } - -func httpVersion(r *rand.Rand) string { - return getRandValue(r, []string{"internet", "http_version"}) -} - -func addInternetLookup() { - AddFuncLookup("url", Info{ - Display: "URL", - Category: "internet", - Description: "Random url", - Example: "http://www.principalproductize.biz/target", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return url(r), nil - }, - }) - - AddFuncLookup("domainname", Info{ - Display: "Domain Name", - Category: "internet", - Description: "Random domain name", - Example: "centraltarget.biz", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return domainName(r), nil - }, - }) - - AddFuncLookup("domainsuffix", Info{ - Display: "Domain Suffix", - Category: "internet", - Description: "Random domain suffix", - Example: "org", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return domainSuffix(r), nil - }, - }) - - AddFuncLookup("ipv4address", Info{ - Display: "IPv4 Address", - Category: "internet", - Description: "Random ip address v4", - Example: "222.83.191.222", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return ipv4Address(r), nil - }, - }) - - AddFuncLookup("ipv6address", Info{ - Display: "IPv6 Address", - Category: "internet", - Description: "Random ip address v6", - Example: "2001:cafe:8898:ee17:bc35:9064:5866:d019", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return ipv6Address(r), nil - }, - }) - - AddFuncLookup("httpmethod", Info{ - Display: "HTTP Method", - Category: "internet", - Description: "Random http method", - Example: "HEAD", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return httpMethod(r), nil - }, - }) - - AddFuncLookup("loglevel", Info{ - Display: "Log Level", - Category: "internet", - Description: "Random log level", - Example: "error", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return logLevel(r, ""), nil - }, - }) - - AddFuncLookup("useragent", Info{ - Display: "User Agent", - Category: "internet", - Description: "Random browser user agent", - Example: "Mozilla/5.0 (Windows NT 5.0) AppleWebKit/5362 (KHTML, like Gecko) Chrome/37.0.834.0 Mobile Safari/5362", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return userAgent(r), nil - }, - }) - - AddFuncLookup("chromeuseragent", Info{ - Display: "Chrome User Agent", - Category: "internet", - Description: "Random chrome user agent", - Example: "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5312 (KHTML, like Gecko) Chrome/39.0.836.0 Mobile Safari/5312", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return chromeUserAgent(r), nil - }, - }) - - AddFuncLookup("firefoxuseragent", Info{ - Display: "Firefox User Agent", - Category: "internet", - Description: "Random browser user agent", - Example: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_8_3 rv:7.0) Gecko/1900-07-01 Firefox/37.0", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return firefoxUserAgent(r), nil - }, - }) - - AddFuncLookup("operauseragent", Info{ - Display: "Opera User Agent", - Category: "internet", - Description: "Random browser user agent", - Example: "Opera/8.39 (Macintosh; U; PPC Mac OS X 10_8_7; en-US) Presto/2.9.335 Version/10.00", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return operaUserAgent(r), nil - }, - }) - - AddFuncLookup("safariuseragent", Info{ - Display: "Safari User Agent", - Category: "internet", - Description: "Random safari user agent", - Example: "Mozilla/5.0 (iPad; CPU OS 8_3_2 like Mac OS X; en-US) AppleWebKit/531.15.6 (KHTML, like Gecko) Version/4.0.5 Mobile/8B120 Safari/6531.15.6", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return safariUserAgent(r), nil - }, - }) - - AddFuncLookup("httpstatuscode", Info{ - Display: "HTTP Status Code", - Category: "internet", - Description: "Random http status code", - Example: "200", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return httpStatusCode(r), nil - }, - }) - - AddFuncLookup("httpstatuscodesimple", Info{ - Display: "HTTP Status Code Simple", - Category: "internet", - Description: "Random http status code within more general usage codes", - Example: "404", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return httpStatusCodeSimple(r), nil - }, - }) - - AddFuncLookup("httpversion", Info{ - Display: "HTTP Version", - Category: "internet", - Description: "Random http version", - Example: "HTTP/1.1", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return httpVersion(r), nil - }, - }) - - AddFuncLookup("macaddress", Info{ - Display: "MAC Address", - Category: "internet", - Description: "Random MAC address", - Example: "cb:ce:06:94:22:e9", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return macAddress(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/json.go b/vendor/github.com/brianvoe/gofakeit/v6/json.go deleted file mode 100644 index 4c3e68068e7..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/json.go +++ /dev/null @@ -1,335 +0,0 @@ -package gofakeit - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math/rand" - "reflect" - "strconv" -) - -// JSONOptions defines values needed for json generation -type JSONOptions struct { - Type string `json:"type" xml:"type" fake:"{randomstring:[array,object]}"` // array or object - RowCount int `json:"row_count" xml:"row_count" fake:"{number:1,10}"` - Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` - Indent bool `json:"indent" xml:"indent"` -} - -type jsonKeyVal struct { - Key string - Value any -} - -type jsonOrderedKeyVal []*jsonKeyVal - -func (okv jsonOrderedKeyVal) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - - buf.WriteString("{") - for i, kv := range okv { - // Add comma to all except last one - if i != 0 { - buf.WriteString(",") - } - - // Marshal key and write - key, err := json.Marshal(kv.Key) - if err != nil { - return nil, err - } - buf.Write(key) - - // Write colon separator - buf.WriteString(":") - - // Marshal value and write - val, err := json.Marshal(kv.Value) - if err != nil { - return nil, err - } - buf.Write(val) - } - buf.WriteString("}") - - return buf.Bytes(), nil -} - -// JSON generates an object or an array of objects in json format. -// A nil JSONOptions returns a randomly structured JSON. -func JSON(jo *JSONOptions) ([]byte, error) { return jsonFunc(globalFaker, jo) } - -// JSON generates an object or an array of objects in json format. -// A nil JSONOptions returns a randomly structured JSON. -func (f *Faker) JSON(jo *JSONOptions) ([]byte, error) { return jsonFunc(f, jo) } - -// JSON generates an object or an array of objects in json format -func jsonFunc(f *Faker, jo *JSONOptions) ([]byte, error) { - if jo == nil { - // We didn't get a JSONOptions, so create a new random one - err := f.Struct(&jo) - if err != nil { - return nil, err - } - } - - // Check to make sure they passed in a type - if jo.Type != "array" && jo.Type != "object" { - return nil, errors.New("invalid type, must be array or object") - } - - if jo.Fields == nil || len(jo.Fields) <= 0 { - return nil, errors.New("must pass fields in order to build json object(s)") - } - - if jo.Type == "object" { - v := make(jsonOrderedKeyVal, len(jo.Fields)) - - // Loop through fields and add to them to map[string]any - for i, field := range jo.Fields { - if field.Function == "autoincrement" { - // Object only has one - v[i] = &jsonKeyVal{Key: field.Name, Value: 1} - continue - } - - // Get function info - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return nil, errors.New("invalid function, " + field.Function + " does not exist") - } - - // Call function value - value, err := funcInfo.Generate(f.Rand, &field.Params, funcInfo) - if err != nil { - return nil, err - } - - if _, ok := value.([]byte); ok { - // If it's a slice, unmarshal it into an interface - var val any - err := json.Unmarshal(value.([]byte), &val) - if err != nil { - return nil, err - } - value = val - } - - v[i] = &jsonKeyVal{Key: field.Name, Value: value} - - } - - // Marshal into bytes - if jo.Indent { - j, _ := json.MarshalIndent(v, "", " ") - return j, nil - } - - j, _ := json.Marshal(v) - return j, nil - } - - if jo.Type == "array" { - // Make sure you set a row count - if jo.RowCount <= 0 { - return nil, errors.New("must have row count") - } - - v := make([]jsonOrderedKeyVal, jo.RowCount) - - for i := 0; i < int(jo.RowCount); i++ { - vr := make(jsonOrderedKeyVal, len(jo.Fields)) - - // Loop through fields and add to them to map[string]any - for ii, field := range jo.Fields { - if field.Function == "autoincrement" { - vr[ii] = &jsonKeyVal{Key: field.Name, Value: i + 1} // +1 because index starts with 0 - continue - } - - // Get function info - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return nil, errors.New("invalid function, " + field.Function + " does not exist") - } - - // Call function value - value, err := funcInfo.Generate(f.Rand, &field.Params, funcInfo) - if err != nil { - return nil, err - } - - if _, ok := value.([]byte); ok { - // If it's a slice, unmarshal it into an interface - var val any - err := json.Unmarshal(value.([]byte), &val) - if err != nil { - return nil, err - } - value = val - } - - vr[ii] = &jsonKeyVal{Key: field.Name, Value: value} - } - - v[i] = vr - } - - // Marshal into bytes - if jo.Indent { - j, _ := json.MarshalIndent(v, "", " ") - return j, nil - } - - j, _ := json.Marshal(v) - return j, nil - } - - return nil, errors.New("invalid type, must be array or object") -} - -func addFileJSONLookup() { - AddFuncLookup("json", Info{ - Display: "JSON", - Category: "file", - Description: "Generates an object or an array of objects in json format", - Example: `[ - { "id": 1, "first_name": "Markus", "last_name": "Moen" }, - { "id": 2, "first_name": "Alayna", "last_name": "Wuckert" }, - { "id": 3, "first_name": "Lura", "last_name": "Lockman" } - ]`, - Output: "[]byte", - ContentType: "application/json", - Params: []Param{ - {Field: "type", Display: "Type", Type: "string", Default: "object", Options: []string{"object", "array"}, Description: "Type of JSON, object or array"}, - {Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows in JSON array"}, - {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields containing key name and function to run in json format"}, - {Field: "indent", Display: "Indent", Type: "bool", Default: "false", Description: "Whether or not to add indents and newlines"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - jo := JSONOptions{} - - typ, err := info.GetString(m, "type") - if err != nil { - return nil, err - } - jo.Type = typ - - rowcount, err := info.GetInt(m, "rowcount") - if err != nil { - return nil, err - } - jo.RowCount = rowcount - - fieldsStr, err := info.GetStringArray(m, "fields") - if err != nil { - return nil, err - } - - // Check to make sure fields has length - if len(fieldsStr) > 0 { - jo.Fields = make([]Field, len(fieldsStr)) - - for i, f := range fieldsStr { - // Unmarshal fields string into fields array - err = json.Unmarshal([]byte(f), &jo.Fields[i]) - if err != nil { - return nil, err - } - } - } - - indent, err := info.GetBool(m, "indent") - if err != nil { - return nil, err - } - jo.Indent = indent - - f := &Faker{Rand: r} - return jsonFunc(f, &jo) - }, - }) -} - -// encoding/json.RawMessage is a special case of []byte -// it cannot be handled as a reflect.Array/reflect.Slice -// because it needs additional structure in the output -func rJsonRawMessage(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - b, err := f.JSON(nil) - if err != nil { - return err - } - - v.SetBytes(b) - return nil -} - -// encoding/json.Number is a special case of string -// that represents a JSON number literal. -// It cannot be handled as a string because it needs to -// represent an integer or a floating-point number. -func rJsonNumber(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - var ret json.Number - - var numberType string - - if tag == "" { - numberType = f.RandomString([]string{"int", "float"}) - - switch numberType { - case "int": - retInt := f.Int16() - ret = json.Number(strconv.Itoa(int(retInt))) - case "float": - retFloat := f.Float64() - ret = json.Number(strconv.FormatFloat(retFloat, 'f', -1, 64)) - } - } else { - fName, fParams := parseNameAndParamsFromTag(tag) - info := GetFuncLookup(fName) - if info == nil { - return fmt.Errorf("invalid function, %s does not exist", fName) - } - - // Parse map params - mapParams := parseMapParams(info, fParams) - - valueIface, err := info.Generate(f.Rand, mapParams, info) - if err != nil { - return err - } - - switch value := valueIface.(type) { - case int: - ret = json.Number(strconv.FormatInt(int64(value), 10)) - case int8: - ret = json.Number(strconv.FormatInt(int64(value), 10)) - case int16: - ret = json.Number(strconv.FormatInt(int64(value), 10)) - case int32: - ret = json.Number(strconv.FormatInt(int64(value), 10)) - case int64: - ret = json.Number(strconv.FormatInt(int64(value), 10)) - case uint: - ret = json.Number(strconv.FormatUint(uint64(value), 10)) - case uint8: - ret = json.Number(strconv.FormatUint(uint64(value), 10)) - case uint16: - ret = json.Number(strconv.FormatUint(uint64(value), 10)) - case uint32: - ret = json.Number(strconv.FormatUint(uint64(value), 10)) - case uint64: - ret = json.Number(strconv.FormatUint(uint64(value), 10)) - case float32: - ret = json.Number(strconv.FormatFloat(float64(value), 'f', -1, 64)) - case float64: - ret = json.Number(strconv.FormatFloat(float64(value), 'f', -1, 64)) - default: - return fmt.Errorf("invalid type, %s is not a valid type for json.Number", reflect.TypeOf(value)) - } - } - v.Set(reflect.ValueOf(ret)) - return nil -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/languages.go b/vendor/github.com/brianvoe/gofakeit/v6/languages.go deleted file mode 100644 index b3cdfbf179c..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/languages.go +++ /dev/null @@ -1,91 +0,0 @@ -package gofakeit - -import "math/rand" - -// Language will return a random language -func Language() string { return language(globalFaker.Rand) } - -// Language will return a random language -func (f *Faker) Language() string { return language(f.Rand) } - -func language(r *rand.Rand) string { return getRandValue(r, []string{"language", "long"}) } - -// LanguageAbbreviation will return a random language abbreviation -func LanguageAbbreviation() string { return languageAbbreviation(globalFaker.Rand) } - -// LanguageAbbreviation will return a random language abbreviation -func (f *Faker) LanguageAbbreviation() string { return languageAbbreviation(f.Rand) } - -func languageAbbreviation(r *rand.Rand) string { return getRandValue(r, []string{"language", "short"}) } - -// LanguageBCP will return a random language BCP (Best Current Practices) -func LanguageBCP() string { return languageBCP(globalFaker.Rand) } - -// LanguageBCP will return a random language BCP (Best Current Practices) -func (f *Faker) LanguageBCP() string { return languageBCP(f.Rand) } - -func languageBCP(r *rand.Rand) string { return getRandValue(r, []string{"language", "bcp"}) } - -// ProgrammingLanguage will return a random programming language -func ProgrammingLanguage() string { return programmingLanguage(globalFaker.Rand) } - -// ProgrammingLanguage will return a random programming language -func (f *Faker) ProgrammingLanguage() string { return programmingLanguage(f.Rand) } - -func programmingLanguage(r *rand.Rand) string { - return getRandValue(r, []string{"language", "programming"}) -} - -// ProgrammingLanguageBest will return a random programming language -func ProgrammingLanguageBest() string { return programmingLanguageBest(globalFaker.Rand) } - -// ProgrammingLanguageBest will return a random programming language -func (f *Faker) ProgrammingLanguageBest() string { return programmingLanguageBest(f.Rand) } - -func programmingLanguageBest(r *rand.Rand) string { return "Go" } - -func addLanguagesLookup() { - AddFuncLookup("language", Info{ - Display: "Language", - Category: "language", - Description: "Random language", - Example: "Kazakh", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return language(r), nil - }, - }) - - AddFuncLookup("languageabbreviation", Info{ - Display: "Language Abbreviation", - Category: "language", - Description: "Random abbreviated language", - Example: "kk", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return languageAbbreviation(r), nil - }, - }) - - AddFuncLookup("languagebcp", Info{ - Display: "Language BCP", - Category: "language", - Description: "Random language BCP (Best Current Practices)", - Example: "en-US", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return languageBCP(r), nil - }, - }) - - AddFuncLookup("programminglanguage", Info{ - Display: "Programming Language", - Category: "language", - Description: "Random programming language", - Example: "Go", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return programmingLanguage(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/logo.png b/vendor/github.com/brianvoe/gofakeit/v6/logo.png deleted file mode 100644 index 1f40f061a20..00000000000 Binary files a/vendor/github.com/brianvoe/gofakeit/v6/logo.png and /dev/null differ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/lookup.go b/vendor/github.com/brianvoe/gofakeit/v6/lookup.go deleted file mode 100644 index 58698ba88aa..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/lookup.go +++ /dev/null @@ -1,513 +0,0 @@ -package gofakeit - -import ( - "encoding/json" - "fmt" - "math/rand" - "reflect" - "strconv" - "strings" - "sync" -) - -// FuncLookups is the primary map array with mapping to all available data -var FuncLookups map[string]Info -var lockFuncLookups sync.Mutex - -// MapParams is the values to pass into a lookup generate -type MapParams map[string]MapParamsValue - -type MapParamsValue []string - -// Info structures fields to better break down what each one generates -type Info struct { - Display string `json:"display"` - Category string `json:"category"` - Description string `json:"description"` - Example string `json:"example"` - Output string `json:"output"` - ContentType string `json:"content_type"` - Params []Param `json:"params"` - Any any `json:"any"` - Generate func(r *rand.Rand, m *MapParams, info *Info) (any, error) `json:"-"` -} - -// Param is a breakdown of param requirements and type definition -type Param struct { - Field string `json:"field"` - Display string `json:"display"` - Type string `json:"type"` - Optional bool `json:"optional"` - Default string `json:"default"` - Options []string `json:"options"` - Description string `json:"description"` -} - -// Field is used for defining what name and function you to generate for file outuputs -type Field struct { - Name string `json:"name"` - Function string `json:"function"` - Params MapParams `json:"params"` -} - -func init() { initLookup() } - -// init will add all the functions to MapLookups -func initLookup() { - addAddressLookup() - addAnimalLookup() - addAppLookup() - addAuthLookup() - addBeerLookup() - addBookLookup() - addCarLookup() - addCelebrityLookup() - addColorLookup() - addCompanyLookup() - addDatabaseSQLLookup() - addDateTimeLookup() - addEmojiLookup() - addErrorLookup() - addFileCSVLookup() - addFileJSONLookup() - addFileLookup() - addFileXMLLookup() - addFinanceLookup() - addFoodLookup() - addGameLookup() - addGenerateLookup() - addHackerLookup() - addHipsterLookup() - addHtmlLookup() - addImageLookup() - addInternetLookup() - addLanguagesLookup() - addLoremLookup() - addMinecraftLookup() - addMiscLookup() - addMovieLookup() - addNumberLookup() - addPaymentLookup() - addPersonLookup() - addSchoolLookup() - addStringLookup() - addTemplateLookup() - addWeightedLookup() - addWordAdjectiveLookup() - addWordAdverbLookup() - addWordConnectiveLookup() - addWordGeneralLookup() - addWordGrammerLookup() - addWordNounLookup() - addWordPhraseLookup() - addWordPrepositionLookup() - addWordPronounLookup() - addWordSentenceLookup() - addWordVerbLookup() -} - -// internalFuncLookups is the internal map array with mapping to all available data -var internalFuncLookups map[string]Info = map[string]Info{ - "fields": { - Description: "Example fields for generating csv, json, xml, etc", - Output: "gofakeit.Field", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - function, _ := GetRandomSimpleFunc(r) - return Field{ - Name: function, - Function: function, - }, nil - }, - }, -} - -// NewMapParams will create a new MapParams -func NewMapParams() *MapParams { - return &MapParams{} -} - -// Add will take in a field and value and add it to the map params type -func (m *MapParams) Add(field string, value string) { - _, ok := (*m)[field] - if !ok { - (*m)[field] = []string{value} - return - } - - (*m)[field] = append((*m)[field], value) -} - -// Get will return the array of string from the provided field -func (m *MapParams) Get(field string) []string { - return (*m)[field] -} - -// Size will return the total size of the underlying map -func (m *MapParams) Size() int { - size := 0 - for range *m { - size++ - } - return size -} - -// UnmarshalJSON will unmarshal the json into the []string -func (m *MapParamsValue) UnmarshalJSON(data []byte) error { - // check if the data is an array - // if so, marshal it into m - if data[0] == '[' { - var values []any - err := json.Unmarshal(data, &values) - if err != nil { - return err - } - - // convert the values to array of strings - for _, value := range values { - typeOf := reflect.TypeOf(value).Kind().String() - - if typeOf == "map" { - v, err := json.Marshal(value) - if err != nil { - return err - } - *m = append(*m, string(v)) - } else { - *m = append(*m, fmt.Sprintf("%v", value)) - } - } - return nil - } - - // if not, then convert into a string and add it to m - var s any - if err := json.Unmarshal(data, &s); err != nil { - return err - } - - *m = append(*m, fmt.Sprintf("%v", s)) - return nil -} - -func GetRandomSimpleFunc(r *rand.Rand) (string, Info) { - // Loop through all the functions and add them to a slice - var keys []string - for k, info := range FuncLookups { - // Only grab simple functions - if info.Params == nil { - keys = append(keys, k) - } - } - - // Randomly grab a function from the slice - randomKey := randomString(r, keys) - - // Return the function name and info - return randomKey, FuncLookups[randomKey] -} - -// AddFuncLookup takes a field and adds it to map -func AddFuncLookup(functionName string, info Info) { - if FuncLookups == nil { - FuncLookups = make(map[string]Info) - } - - // Check content type - if info.ContentType == "" { - info.ContentType = "text/plain" - } - - lockFuncLookups.Lock() - FuncLookups[functionName] = info - lockFuncLookups.Unlock() -} - -// GetFuncLookup will lookup -func GetFuncLookup(functionName string) *Info { - var info Info - var ok bool - - // Check internal functions first - info, ok = internalFuncLookups[functionName] - if ok { - return &info - } - - info, ok = FuncLookups[functionName] - if ok { - return &info - } - - return nil -} - -// RemoveFuncLookup will remove a function from lookup -func RemoveFuncLookup(functionName string) { - _, ok := FuncLookups[functionName] - if !ok { - return - } - - lockFuncLookups.Lock() - delete(FuncLookups, functionName) - lockFuncLookups.Unlock() -} - -// GetAny will retrieve Any field from Info -func (i *Info) GetAny(m *MapParams, field string) (any, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - var anyValue any - - // Try to convert to int - valueInt, err := strconv.ParseInt(value[0], 10, 64) - if err == nil { - return int(valueInt), nil - } - - // Try to convert to float - valueFloat, err := strconv.ParseFloat(value[0], 64) - if err == nil { - return valueFloat, nil - } - - // Try to convert to boolean - valueBool, err := strconv.ParseBool(value[0]) - if err == nil { - return valueBool, nil - } - - err = json.Unmarshal([]byte(value[0]), &anyValue) - if err == nil { - return valueBool, nil - } - - return value[0], nil - /*if err != nil { - return nil, fmt.Errorf("%s field could not parse to any", field) - }*/ - - //return anyValue, nil -} - -// GetMap will retrieve map[string]interface{} field from data -func (i *Info) GetMap(m *MapParams, field string) (map[string]interface{}, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - var mapValue map[string]interface{} - err = json.Unmarshal([]byte(value[0]), &mapValue) - if err != nil { - return nil, fmt.Errorf("%s field could not parse to map[string]interface{}", field) - } - - return mapValue, nil -} - -// GetField will retrieve field from data -func (i *Info) GetField(m *MapParams, field string) (*Param, []string, error) { - // Get param - var p *Param - for _, param := range i.Params { - if param.Field == field { - p = ¶m - break - } - } - if p == nil { - return nil, nil, fmt.Errorf("could not find param field %s", field) - } - - // Get value from map - if m != nil { - value, ok := (*m)[field] - if !ok { - // If default isnt empty use default - if p.Default != "" { - return p, []string{p.Default}, nil - } - - return nil, nil, fmt.Errorf("could not find field: %s", field) - } - - return p, value, nil - } else if m == nil && p.Default != "" { - // If p.Type is []uint, then we need to convert it to []string - if strings.HasPrefix(p.Default, "[") { - // Remove [] from type - defaultClean := p.Default[1 : len(p.Default)-1] - - // Split on comma - defaultSplit := strings.Split(defaultClean, ",") - - return p, defaultSplit, nil - } - - // If default isnt empty use default - return p, []string{p.Default}, nil - } - - return nil, nil, fmt.Errorf("could not find field: %s", field) -} - -// GetBool will retrieve boolean field from data -func (i *Info) GetBool(m *MapParams, field string) (bool, error) { - p, value, err := i.GetField(m, field) - if err != nil { - return false, err - } - - // Try to convert to boolean - valueBool, err := strconv.ParseBool(value[0]) - if err != nil { - return false, fmt.Errorf("%s field could not parse to bool value", p.Field) - } - - return valueBool, nil -} - -// GetInt will retrieve int field from data -func (i *Info) GetInt(m *MapParams, field string) (int, error) { - p, value, err := i.GetField(m, field) - if err != nil { - return 0, err - } - - // Try to convert to int - valueInt, err := strconv.ParseInt(value[0], 10, 64) - if err != nil { - return 0, fmt.Errorf("%s field could not parse to int value", p.Field) - } - - return int(valueInt), nil -} - -// GetUint will retrieve uint field from data -func (i *Info) GetUint(m *MapParams, field string) (uint, error) { - p, value, err := i.GetField(m, field) - if err != nil { - return 0, err - } - - // Try to convert to int - valueUint, err := strconv.ParseUint(value[0], 10, 64) - if err != nil { - return 0, fmt.Errorf("%s field could not parse to int value", p.Field) - } - - return uint(valueUint), nil -} - -// GetFloat32 will retrieve int field from data -func (i *Info) GetFloat32(m *MapParams, field string) (float32, error) { - p, value, err := i.GetField(m, field) - if err != nil { - return 0, err - } - - // Try to convert to float - valueFloat, err := strconv.ParseFloat(value[0], 32) - if err != nil { - return 0, fmt.Errorf("%s field could not parse to float value", p.Field) - } - - return float32(valueFloat), nil -} - -// GetFloat64 will retrieve int field from data -func (i *Info) GetFloat64(m *MapParams, field string) (float64, error) { - p, value, err := i.GetField(m, field) - if err != nil { - return 0, err - } - - // Try to convert to float - valueFloat, err := strconv.ParseFloat(value[0], 64) - if err != nil { - return 0, fmt.Errorf("%s field could not parse to float value", p.Field) - } - - return valueFloat, nil -} - -// GetString will retrieve string field from data -func (i *Info) GetString(m *MapParams, field string) (string, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return "", err - } - - return value[0], nil -} - -// GetStringArray will retrieve []string field from data -func (i *Info) GetStringArray(m *MapParams, field string) ([]string, error) { - _, values, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - return values, nil -} - -// GetIntArray will retrieve []int field from data -func (i *Info) GetIntArray(m *MapParams, field string) ([]int, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - var ints []int - for i := 0; i < len(value); i++ { - valueInt, err := strconv.ParseInt(value[i], 10, 64) - if err != nil { - return nil, fmt.Errorf("%s value could not parse to int", value[i]) - } - ints = append(ints, int(valueInt)) - } - - return ints, nil -} - -// GetUintArray will retrieve []uint field from data -func (i *Info) GetUintArray(m *MapParams, field string) ([]uint, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - var uints []uint - for i := 0; i < len(value); i++ { - valueUint, err := strconv.ParseUint(value[i], 10, 64) - if err != nil { - return nil, fmt.Errorf("%s value could not parse to uint", value[i]) - } - uints = append(uints, uint(valueUint)) - } - - return uints, nil -} - -// GetFloat32Array will retrieve []float field from data -func (i *Info) GetFloat32Array(m *MapParams, field string) ([]float32, error) { - _, value, err := i.GetField(m, field) - if err != nil { - return nil, err - } - - var floats []float32 - for i := 0; i < len(value); i++ { - valueFloat, err := strconv.ParseFloat(value[i], 32) - if err != nil { - return nil, fmt.Errorf("%s value could not parse to float", value[i]) - } - floats = append(floats, float32(valueFloat)) - } - - return floats, nil -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/lorem.go b/vendor/github.com/brianvoe/gofakeit/v6/lorem.go deleted file mode 100644 index 79a8a5aa826..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/lorem.go +++ /dev/null @@ -1,123 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" -) - -// LoremIpsumWord will generate a random word -func LoremIpsumWord() string { return loremIpsumWord(globalFaker.Rand) } - -// LoremIpsumWord will generate a random word -func (f *Faker) LoremIpsumWord() string { return loremIpsumWord(f.Rand) } - -func loremIpsumWord(r *rand.Rand) string { return getRandValue(r, []string{"lorem", "word"}) } - -// LoremIpsumSentence will generate a random sentence -func LoremIpsumSentence(wordCount int) string { - return loremIpsumSentence(globalFaker.Rand, wordCount) -} - -// LoremIpsumSentence will generate a random sentence -func (f *Faker) LoremIpsumSentence(wordCount int) string { - return loremIpsumSentence(f.Rand, wordCount) -} - -func loremIpsumSentence(r *rand.Rand, wordCount int) string { - return sentenceGen(r, wordCount, loremIpsumWord) -} - -// LoremIpsumParagraph will generate a random paragraphGenerator -func LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return loremIpsumParagraph(globalFaker.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -// LoremIpsumParagraph will generate a random paragraphGenerator -func (f *Faker) LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return loremIpsumParagraph(f.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -func loremIpsumParagraph(r *rand.Rand, paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return paragraphGen(r, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, loremIpsumSentence) -} - -func addLoremLookup() { - AddFuncLookup("loremipsumword", Info{ - Display: "Lorem Ipsum Word", - Category: "word", - Description: "Random lorem ipsum word", - Example: "quia", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return loremIpsumWord(r), nil - }, - }) - - AddFuncLookup("loremipsumsentence", Info{ - Display: "Lorem Ipsum Sentence", - Category: "word", - Description: "Random lorem ipsum sentence", - Example: "Quia quae repellat consequatur quidem.", - Output: "string", - Params: []Param{ - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - return loremIpsumSentence(r, wordCount), nil - }, - }) - - AddFuncLookup("loremipsumparagraph", Info{ - Display: "Lorem Ipsum Paragraph", - Category: "word", - Description: "Random lorem ipsum paragraph", - Example: "Quia quae repellat consequatur quidem nisi quo qui voluptatum accusantium quisquam amet. Quas et ut non dolorem ipsam aut enim assumenda mollitia harum ut. Dicta similique veniam nulla voluptas at excepturi non ad maxime at non. Eaque hic repellat praesentium voluptatem qui consequuntur dolor iusto autem velit aut. Fugit tempore exercitationem harum consequatur voluptatum modi minima aut eaque et et.
Aut ea voluptatem dignissimos expedita odit tempore quod aut beatae ipsam iste. Minus voluptatibus dolorem maiores eius sed nihil vel enim odio voluptatem accusamus. Natus quibusdam temporibus tenetur cumque sint necessitatibus dolorem ex ducimus iusto ex. Voluptatem neque dicta explicabo officiis et ducimus sit ut ut praesentium pariatur. Illum molestias nisi at dolore ut voluptatem accusantium et fugiat et ut.
Explicabo incidunt reprehenderit non quia dignissimos recusandae vitae soluta quia et quia. Aut veniam voluptas consequatur placeat sapiente non eveniet voluptatibus magni velit eum. Nobis vel repellendus sed est qui autem laudantium quidem quam ullam consequatur. Aut iusto ut commodi similique quae voluptatem atque qui fugiat eum aut. Quis distinctio consequatur voluptatem vel aliquid aut laborum facere officiis iure tempora.", - Output: "string", - Params: []Param{ - {Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"}, - {Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"}, - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - {Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "
", Description: "String value to add between paragraphs"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - paragraphCount, err := info.GetInt(m, "paragraphcount") - if err != nil { - return nil, err - } - if paragraphCount <= 0 || paragraphCount > 20 { - return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20") - } - - sentenceCount, err := info.GetInt(m, "sentencecount") - if err != nil { - return nil, err - } - if sentenceCount <= 0 || sentenceCount > 20 { - return nil, errors.New("invalid sentence count, must be greater than 0, less than 20") - } - - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - paragraphSeparator, err := info.GetString(m, "paragraphseparator") - if err != nil { - return nil, err - } - - return loremIpsumParagraph(r, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go b/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go deleted file mode 100644 index fd370cec833..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go +++ /dev/null @@ -1,367 +0,0 @@ -package gofakeit - -import "math/rand" - -// MinecraftOre will generate a random Minecraft ore -func MinecraftOre() string { return minecraftOre(globalFaker.Rand) } - -// MinecraftOre will generate a random Minecraft ore -func (f *Faker) MinecraftOre() string { return minecraftOre(f.Rand) } - -func minecraftOre(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "ore"}) } - -// MinecraftWood will generate a random Minecraft wood -func MinecraftWood() string { return minecraftWood(globalFaker.Rand) } - -// MinecraftWood will generate a random Minecraft wood -func (f *Faker) MinecraftWood() string { return minecraftWood(f.Rand) } - -func minecraftWood(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "wood"}) } - -// MinecraftArmorTier will generate a random Minecraft armor tier -func MinecraftArmorTier() string { return minecraftArmorTier(globalFaker.Rand) } - -// MinecraftArmorTier will generate a random Minecraft armor tier -func (f *Faker) MinecraftArmorTier() string { return minecraftArmorTier(f.Rand) } - -func minecraftArmorTier(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "armortier"}) -} - -// MinecraftArmorPart will generate a random Minecraft armor part -func MinecraftArmorPart() string { return minecraftArmorPart(globalFaker.Rand) } - -// MinecraftArmorPart will generate a random Minecraft armor part -func (f *Faker) MinecraftArmorPart() string { return minecraftArmorPart(f.Rand) } - -func minecraftArmorPart(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "armorpart"}) -} - -// MinecraftWeapon will generate a random Minecraft weapon -func MinecraftWeapon() string { return minecraftWeapon(globalFaker.Rand) } - -// MinecraftWeapon will generate a random Minecraft weapon -func (f *Faker) MinecraftWeapon() string { return minecraftWeapon(f.Rand) } - -func minecraftWeapon(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "weapon"}) } - -// MinecraftTool will generate a random Minecraft tool -func MinecraftTool() string { return minecraftTool(globalFaker.Rand) } - -// MinecraftTool will generate a random Minecraft tool -func (f *Faker) MinecraftTool() string { return minecraftTool(f.Rand) } - -func minecraftTool(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "tool"}) } - -// MinecraftDye will generate a random Minecraft dye -func MinecraftDye() string { return minecraftDye(globalFaker.Rand) } - -// MinecraftDye will generate a random Minecraft dye -func (f *Faker) MinecraftDye() string { return minecraftDye(f.Rand) } - -func minecraftDye(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "dye"}) } - -// MinecraftFood will generate a random Minecraft food -func MinecraftFood() string { return minecraftFood(globalFaker.Rand) } - -// MinecraftFood will generate a random Minecraft food -func (f *Faker) MinecraftFood() string { return minecraftFood(f.Rand) } - -func minecraftFood(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "food"}) } - -// MinecraftAnimal will generate a random Minecraft animal -func MinecraftAnimal() string { return minecraftAnimal(globalFaker.Rand) } - -// MinecraftAnimal will generate a random Minecraft animal -func (f *Faker) MinecraftAnimal() string { return minecraftAnimal(f.Rand) } - -func minecraftAnimal(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "animal"}) -} - -// MinecraftVillagerJob will generate a random Minecraft villager job -func MinecraftVillagerJob() string { return minecraftVillagerJob(globalFaker.Rand) } - -// MinecraftVillagerJob will generate a random Minecraft villager job -func (f *Faker) MinecraftVillagerJob() string { return minecraftVillagerJob(f.Rand) } - -func minecraftVillagerJob(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "villagerjob"}) -} - -// MinecraftVillagerStation will generate a random Minecraft villager station -func MinecraftVillagerStation() string { return minecraftVillagerStation(globalFaker.Rand) } - -// MinecraftVillagerStation will generate a random Minecraft villager station -func (f *Faker) MinecraftVillagerStation() string { return minecraftVillagerStation(f.Rand) } - -func minecraftVillagerStation(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "villagerstation"}) -} - -// MinecraftVillagerLevel will generate a random Minecraft villager level -func MinecraftVillagerLevel() string { return minecraftVillagerLevel(globalFaker.Rand) } - -// MinecraftVillagerLevel will generate a random Minecraft villager level -func (f *Faker) MinecraftVillagerLevel() string { return minecraftVillagerLevel(f.Rand) } - -func minecraftVillagerLevel(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "villagerlevel"}) -} - -// MinecraftMobPassive will generate a random Minecraft mob passive -func MinecraftMobPassive() string { return minecraftMobPassive(globalFaker.Rand) } - -// MinecraftMobPassive will generate a random Minecraft mob passive -func (f *Faker) MinecraftMobPassive() string { return minecraftMobPassive(f.Rand) } - -func minecraftMobPassive(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "mobpassive"}) -} - -// MinecraftMobNeutral will generate a random Minecraft mob neutral -func MinecraftMobNeutral() string { return minecraftMobNeutral(globalFaker.Rand) } - -// MinecraftMobNeutral will generate a random Minecraft mob neutral -func (f *Faker) MinecraftMobNeutral() string { return minecraftMobNeutral(f.Rand) } - -func minecraftMobNeutral(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "mobneutral"}) -} - -// MinecraftMobHostile will generate a random Minecraft mob hostile -func MinecraftMobHostile() string { return minecraftMobHostile(globalFaker.Rand) } - -// MinecraftMobHostile will generate a random Minecraft mob hostile -func (f *Faker) MinecraftMobHostile() string { return minecraftMobHostile(f.Rand) } - -func minecraftMobHostile(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "mobhostile"}) -} - -// MinecraftMobBoss will generate a random Minecraft mob boss -func MinecraftMobBoss() string { return minecraftMobBoss(globalFaker.Rand) } - -// MinecraftMobBoss will generate a random Minecraft mob boss -func (f *Faker) MinecraftMobBoss() string { return minecraftMobBoss(f.Rand) } - -func minecraftMobBoss(r *rand.Rand) string { - return getRandValue(r, []string{"minecraft", "mobboss"}) -} - -// MinecraftBiome will generate a random Minecraft biome -func MinecraftBiome() string { return minecraftBiome(globalFaker.Rand) } - -// MinecraftBiome will generate a random Minecraft biome -func (f *Faker) MinecraftBiome() string { return minecraftBiome(f.Rand) } - -func minecraftBiome(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "biome"}) } - -// MinecraftWeather will generate a random Minecraft weather -func MinecraftWeather() string { return minecraftWeather(globalFaker.Rand) } - -// MinecraftWeather will generate a random Minecraft weather -func (f *Faker) MinecraftWeather() string { return minecraftWeather(f.Rand) } - -func minecraftWeather(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "weather"}) } - -func addMinecraftLookup() { - AddFuncLookup("minecraftore", Info{ - Display: "Minecraft ore", - Category: "minecraft", - Description: "Random Minecraft ore", - Example: "coal", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftOre(r), nil - }, - }) - - AddFuncLookup("minecraftwood", Info{ - Display: "Minecraft wood", - Category: "minecraft", - Description: "Random Minecraft wood", - Example: "oak", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftWood(r), nil - }, - }) - - AddFuncLookup("minecraftarmortier", Info{ - Display: "Minecraft armor tier", - Category: "minecraft", - Description: "Random Minecraft armor tier", - Example: "iron", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftArmorTier(r), nil - }, - }) - - AddFuncLookup("minecraftarmorpart", Info{ - Display: "Minecraft armor part", - Category: "minecraft", - Description: "Random Minecraft armor part", - Example: "helmet", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftArmorPart(r), nil - }, - }) - - AddFuncLookup("minecraftweapon", Info{ - Display: "Minecraft weapon", - Category: "minecraft", - Description: "Random Minecraft weapon", - Example: "bow", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftWeapon(r), nil - }, - }) - - AddFuncLookup("minecrafttool", Info{ - Display: "Minecraft tool", - Category: "minecraft", - Description: "Random Minecraft tool", - Example: "shovel", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftTool(r), nil - }, - }) - - AddFuncLookup("minecraftdye", Info{ - Display: "Minecraft dye", - Category: "minecraft", - Description: "Random Minecraft dye", - Example: "white", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftDye(r), nil - }, - }) - - AddFuncLookup("minecraftfood", Info{ - Display: "Minecraft food", - Category: "minecraft", - Description: "Random Minecraft food", - Example: "apple", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftFood(r), nil - }, - }) - - AddFuncLookup("minecraftanimal", Info{ - Display: "Minecraft animal", - Category: "minecraft", - Description: "Random Minecraft animal", - Example: "chicken", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftAnimal(r), nil - }, - }) - - AddFuncLookup("minecraftvillagerjob", Info{ - Display: "Minecraft villager job", - Category: "minecraft", - Description: "Random Minecraft villager job", - Example: "farmer", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftVillagerJob(r), nil - }, - }) - - AddFuncLookup("minecraftvillagerstation", Info{ - Display: "Minecraft villager station", - Category: "minecraft", - Description: "Random Minecraft villager station", - Example: "furnace", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftVillagerStation(r), nil - }, - }) - - AddFuncLookup("minecraftvillagerlevel", Info{ - Display: "Minecraft villager level", - Category: "minecraft", - Description: "Random Minecraft villager level", - Example: "master", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftVillagerLevel(r), nil - }, - }) - - AddFuncLookup("minecraftmobpassive", Info{ - Display: "Minecraft mob passive", - Category: "minecraft", - Description: "Random Minecraft mob passive", - Example: "cow", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftMobPassive(r), nil - }, - }) - - AddFuncLookup("minecraftmobneutral", Info{ - Display: "Minecraft mob neutral", - Category: "minecraft", - Description: "Random Minecraft mob neutral", - Example: "bee", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftMobNeutral(r), nil - }, - }) - - AddFuncLookup("minecraftmobhostile", Info{ - Display: "Minecraft mob hostile", - Category: "minecraft", - Description: "Random Minecraft mob hostile", - Example: "spider", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftMobHostile(r), nil - }, - }) - - AddFuncLookup("minecraftmobboss", Info{ - Display: "Minecraft mob boss", - Category: "minecraft", - Description: "Random Minecraft mob boss", - Example: "ender dragon", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftMobBoss(r), nil - }, - }) - - AddFuncLookup("minecraftbiome", Info{ - Display: "Minecraft biome", - Category: "minecraft", - Description: "Random Minecraft biome", - Example: "forest", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftBiome(r), nil - }, - }) - - AddFuncLookup("minecraftweather", Info{ - Display: "Minecraft weather", - Category: "minecraft", - Description: "Random Minecraft weather", - Example: "rain", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minecraftWeather(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/misc.go b/vendor/github.com/brianvoe/gofakeit/v6/misc.go deleted file mode 100644 index fcc13c6a69e..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/misc.go +++ /dev/null @@ -1,168 +0,0 @@ -package gofakeit - -import ( - "encoding/hex" - "math/rand" - "reflect" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// Bool will generate a random boolean value -func Bool() bool { return boolFunc(globalFaker.Rand) } - -// Bool will generate a random boolean value -func (f *Faker) Bool() bool { return boolFunc(f.Rand) } - -func boolFunc(r *rand.Rand) bool { return randIntRange(r, 0, 1) == 1 } - -// UUID (version 4) will generate a random unique identifier based upon random numbers -// Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -func UUID() string { return uuid(globalFaker.Rand) } - -// UUID (version 4) will generate a random unique identifier based upon random numbers -// Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 8-4-4-4-12 -func (f *Faker) UUID() string { return uuid(f.Rand) } - -func uuid(r *rand.Rand) string { - version := byte(4) - uuid := make([]byte, 16) - - // Commented out due to io.ReadFull not being race condition safe - // io.ReadFull(r, uuid[:]) - - // Read 16 random bytes - for i := 0; i < 16; i++ { - uuid[i] = byte(r.Intn(256)) - } - - // Set version - uuid[6] = (uuid[6] & 0x0f) | (version << 4) - - // Set variant - uuid[8] = (uuid[8] & 0xbf) | 0x80 - - buf := make([]byte, 36) - hex.Encode(buf[0:8], uuid[0:4]) - buf[8] = dash - hex.Encode(buf[9:13], uuid[4:6]) - buf[13] = dash - hex.Encode(buf[14:18], uuid[6:8]) - buf[18] = dash - hex.Encode(buf[19:23], uuid[8:10]) - buf[23] = dash - hex.Encode(buf[24:], uuid[10:]) - - return string(buf) -} - -// ShuffleAnySlice takes in a slice and outputs it in a random order -func ShuffleAnySlice(v any) { shuffleAnySlice(globalFaker.Rand, v) } - -// ShuffleAnySlice takes in a slice and outputs it in a random order -func (f *Faker) ShuffleAnySlice(v any) { shuffleAnySlice(f.Rand, v) } - -func shuffleAnySlice(r *rand.Rand, v any) { - if v == nil { - return - } - - // Check type of passed in value, if not a slice return with no action taken - typ := reflect.TypeOf(v) - if typ.Kind() != reflect.Slice { - return - } - - s := reflect.ValueOf(v) - n := s.Len() - - if n <= 1 { - return - } - - swap := func(i, j int) { - tmp := reflect.ValueOf(s.Index(i).Interface()) - s.Index(i).Set(s.Index(j)) - s.Index(j).Set(tmp) - } - - //if size is > int32 probably it will never finish, or ran out of entropy - i := n - 1 - for ; i > 0; i-- { - j := int(r.Int31n(int32(i + 1))) - swap(i, j) - } -} - -// FlipACoin will return a random value of Heads or Tails -func FlipACoin() string { return flipACoin(globalFaker.Rand) } - -// FlipACoin will return a random value of Heads or Tails -func (f *Faker) FlipACoin() string { return flipACoin(f.Rand) } - -func flipACoin(r *rand.Rand) string { - if boolFunc(r) { - return "Heads" - } - - return "Tails" -} - -// RandomMapKey will return a random key from a map -func RandomMapKey(mapI any) any { return randomMapKey(globalFaker.Rand, mapI) } - -// RandomMapKey will return a random key from a map -func (f *Faker) RandomMapKey(mapI any) any { return randomMapKey(f.Rand, mapI) } - -func randomMapKey(r *rand.Rand, mapI any) any { - keys := reflect.ValueOf(mapI).MapKeys() - return keys[r.Intn(len(keys))].Interface() -} - -// Categories will return a map string array of available data categories and sub categories -func Categories() map[string][]string { - types := make(map[string][]string) - for category, subCategoriesMap := range data.Data { - subCategories := make([]string, 0) - for subType := range subCategoriesMap { - subCategories = append(subCategories, subType) - } - types[category] = subCategories - } - return types -} - -func addMiscLookup() { - AddFuncLookup("uuid", Info{ - Display: "UUID", - Category: "misc", - Description: "Random uuid", - Example: "590c1440-9888-45b0-bd51-a817ee07c3f2", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return uuid(r), nil - }, - }) - - AddFuncLookup("bool", Info{ - Display: "Boolean", - Category: "misc", - Description: "Random boolean", - Example: "true", - Output: "bool", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return boolFunc(r), nil - }, - }) - - AddFuncLookup("flipacoin", Info{ - Display: "Flip A Coin", - Category: "misc", - Description: "Random Heads or Tails outcome", - Example: "Tails", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return flipACoin(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/movie.go b/vendor/github.com/brianvoe/gofakeit/v6/movie.go deleted file mode 100644 index 635c8588257..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/movie.go +++ /dev/null @@ -1,66 +0,0 @@ -package gofakeit - -import "math/rand" - -func MovieName() string { return movieName(globalFaker.Rand) } - -func (f *Faker) MovieName() string { return movieName(f.Rand) } - -func movieName(r *rand.Rand) string { return getRandValue(r, []string{"movie", "name"}) } - -func MovieGenre() string { return movieGenre(globalFaker.Rand) } - -func (f *Faker) MovieGenre() string { return movieGenre(f.Rand) } - -func movieGenre(r *rand.Rand) string { return getRandValue(r, []string{"movie", "genre"}) } - -type MovieInfo struct { - Name string `json:"name" xml:"name"` - Genre string `json:"genre" xml:"genre"` -} - -func Movie() *MovieInfo { return movie(globalFaker.Rand) } - -func (f *Faker) Movie() *MovieInfo { return movie(f.Rand) } - -func movie(r *rand.Rand) *MovieInfo { - return &MovieInfo{ - Name: movieName(r), - Genre: movieGenre(r), - } -} - -func addMovieLookup() { - AddFuncLookup("movie", Info{ - Display: "Movie", - Category: "movie", - Description: "Random Movie data set", - Example: `{name: "The Matrix", genre: "Action"}`, - Output: "map[string]string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return movie(r), nil - }, - }) - - AddFuncLookup("moviename", Info{ - Display: "Movie Name", - Category: "movie", - Description: "Random movie name", - Example: "The Matrix", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return movieName(r), nil - }, - }) - - AddFuncLookup("moviegenre", Info{ - Display: "Genre", - Category: "movie", - Description: "Random movie genre", - Example: "Action", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return movieGenre(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/number.go b/vendor/github.com/brianvoe/gofakeit/v6/number.go deleted file mode 100644 index 345df523108..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/number.go +++ /dev/null @@ -1,612 +0,0 @@ -package gofakeit - -import ( - "math" - "math/rand" -) - -// Number will generate a random number between given min And max -func Number(min int, max int) int { return number(globalFaker.Rand, min, max) } - -// Number will generate a random number between given min And max -func (f *Faker) Number(min int, max int) int { return number(f.Rand, min, max) } - -func number(r *rand.Rand, min int, max int) int { return randIntRange(r, min, max) } - -// Uint8 will generate a random uint8 value -func Uint8() uint8 { return uint8Func(globalFaker.Rand) } - -// Uint8 will generate a random uint8 value -func (f *Faker) Uint8() uint8 { return uint8Func(f.Rand) } - -func uint8Func(r *rand.Rand) uint8 { return uint8(randUintRange(r, minUint, math.MaxUint8)) } - -// Uint16 will generate a random uint16 value -func Uint16() uint16 { return uint16Func(globalFaker.Rand) } - -// Uint16 will generate a random uint16 value -func (f *Faker) Uint16() uint16 { return uint16Func(f.Rand) } - -func uint16Func(r *rand.Rand) uint16 { return uint16(randUintRange(r, minUint, math.MaxUint16)) } - -// Uint32 will generate a random uint32 value -func Uint32() uint32 { return uint32Func(globalFaker.Rand) } - -// Uint32 will generate a random uint32 value -func (f *Faker) Uint32() uint32 { return uint32Func(f.Rand) } - -func uint32Func(r *rand.Rand) uint32 { return uint32(randUintRange(r, minUint, math.MaxUint32)) } - -// Uint64 will generate a random uint64 value -func Uint64() uint64 { return uint64Func(globalFaker.Rand) } - -// Uint64 will generate a random uint64 value -func (f *Faker) Uint64() uint64 { return uint64Func(f.Rand) } - -func uint64Func(r *rand.Rand) uint64 { return uint64(randUintRange(r, minUint, maxUint)) } - -// UintRange will generate a random uint value between min and max -func UintRange(min, max uint) uint { return uintRangeFunc(globalFaker.Rand, min, max) } - -// UintRange will generate a random uint value between min and max -func (f *Faker) UintRange(min, max uint) uint { return uintRangeFunc(f.Rand, min, max) } - -func uintRangeFunc(r *rand.Rand, min, max uint) uint { return randUintRange(r, min, max) } - -// Int8 will generate a random Int8 value -func Int8() int8 { return int8Func(globalFaker.Rand) } - -// Int8 will generate a random Int8 value -func (f *Faker) Int8() int8 { return int8Func(f.Rand) } - -func int8Func(r *rand.Rand) int8 { return int8(randIntRange(r, math.MinInt8, math.MaxInt8)) } - -// Int16 will generate a random int16 value -func Int16() int16 { return int16Func(globalFaker.Rand) } - -// Int16 will generate a random int16 value -func (f *Faker) Int16() int16 { return int16Func(f.Rand) } - -func int16Func(r *rand.Rand) int16 { return int16(randIntRange(r, math.MinInt16, math.MaxInt16)) } - -// Int32 will generate a random int32 value -func Int32() int32 { return int32Func(globalFaker.Rand) } - -// Int32 will generate a random int32 value -func (f *Faker) Int32() int32 { return int32Func(f.Rand) } - -func int32Func(r *rand.Rand) int32 { return int32(randIntRange(r, math.MinInt32, math.MaxInt32)) } - -// Int64 will generate a random int64 value -func Int64() int64 { return int64Func(globalFaker.Rand) } - -// Int64 will generate a random int64 value -func (f *Faker) Int64() int64 { return int64Func(f.Rand) } - -func int64Func(r *rand.Rand) int64 { return int64(randIntRange(r, minInt, maxInt)) } - -// IntRange will generate a random int value between min and max -func IntRange(min, max int) int { return intRangeFunc(globalFaker.Rand, min, max) } - -// IntRange will generate a random int value between min and max -func (f *Faker) IntRange(min, max int) int { return intRangeFunc(f.Rand, min, max) } - -func intRangeFunc(r *rand.Rand, min, max int) int { return randIntRange(r, min, max) } - -// Float32 will generate a random float32 value -func Float32() float32 { return float32Func(globalFaker.Rand) } - -// Float32 will generate a random float32 value -func (f *Faker) Float32() float32 { return float32Func(f.Rand) } - -func float32Func(r *rand.Rand) float32 { - return float32Range(r, math.SmallestNonzeroFloat32, math.MaxFloat32) -} - -// Float32Range will generate a random float32 value between min and max -func Float32Range(min, max float32) float32 { - return float32Range(globalFaker.Rand, min, max) -} - -// Float32Range will generate a random float32 value between min and max -func (f *Faker) Float32Range(min, max float32) float32 { - return float32Range(f.Rand, min, max) -} - -func float32Range(r *rand.Rand, min, max float32) float32 { - if min == max { - return min - } - return r.Float32()*(max-min) + min -} - -// Float64 will generate a random float64 value -func Float64() float64 { - return float64Func(globalFaker.Rand) -} - -// Float64 will generate a random float64 value -func (f *Faker) Float64() float64 { - return float64Func(f.Rand) -} - -func float64Func(r *rand.Rand) float64 { - return float64Range(r, math.SmallestNonzeroFloat64, math.MaxFloat64) -} - -// Float64Range will generate a random float64 value between min and max -func Float64Range(min, max float64) float64 { - return float64Range(globalFaker.Rand, min, max) -} - -// Float64Range will generate a random float64 value between min and max -func (f *Faker) Float64Range(min, max float64) float64 { - return float64Range(f.Rand, min, max) -} - -func float64Range(r *rand.Rand, min, max float64) float64 { - if min == max { - return min - } - return r.Float64()*(max-min) + min -} - -// ShuffleInts will randomize a slice of ints -func ShuffleInts(a []int) { shuffleInts(globalFaker.Rand, a) } - -// ShuffleInts will randomize a slice of ints -func (f *Faker) ShuffleInts(a []int) { shuffleInts(f.Rand, a) } - -func shuffleInts(r *rand.Rand, a []int) { - for i := range a { - j := r.Intn(i + 1) - a[i], a[j] = a[j], a[i] - } -} - -// RandomInt will take in a slice of int and return a randomly selected value -func RandomInt(i []int) int { return randomInt(globalFaker.Rand, i) } - -// RandomInt will take in a slice of int and return a randomly selected value -func (f *Faker) RandomInt(i []int) int { return randomInt(f.Rand, i) } - -func randomInt(r *rand.Rand, i []int) int { - size := len(i) - if size == 0 { - return 0 - } - if size == 1 { - return i[0] - } - return i[r.Intn(size)] -} - -// RandomUint will take in a slice of uint and return a randomly selected value -func RandomUint(u []uint) uint { return randomUint(globalFaker.Rand, u) } - -// RandomUint will take in a slice of uint and return a randomly selected value -func (f *Faker) RandomUint(u []uint) uint { return randomUint(f.Rand, u) } - -func randomUint(r *rand.Rand, u []uint) uint { - size := len(u) - if size == 0 { - return 0 - } - if size == 1 { - return u[0] - } - return u[r.Intn(size)] -} - -// HexUint8 will generate a random uint8 hex value with "0x" prefix -func HexUint8() string { return hexUint(globalFaker.Rand, 8) } - -// HexUint8 will generate a random uint8 hex value with "0x" prefix -func (f *Faker) HexUint8() string { return hexUint(f.Rand, 8) } - -// HexUint16 will generate a random uint16 hex value with "0x" prefix -func HexUint16() string { return hexUint(globalFaker.Rand, 16) } - -// HexUint16 will generate a random uint16 hex value with "0x" prefix -func (f *Faker) HexUint16() string { return hexUint(f.Rand, 16) } - -// HexUint32 will generate a random uint32 hex value with "0x" prefix -func HexUint32() string { return hexUint(globalFaker.Rand, 32) } - -// HexUint32 will generate a random uint32 hex value with "0x" prefix -func (f *Faker) HexUint32() string { return hexUint(f.Rand, 32) } - -// HexUint64 will generate a random uint64 hex value with "0x" prefix -func HexUint64() string { return hexUint(globalFaker.Rand, 64) } - -// HexUint64 will generate a random uint64 hex value with "0x" prefix -func (f *Faker) HexUint64() string { return hexUint(f.Rand, 64) } - -// HexUint128 will generate a random uint128 hex value with "0x" prefix -func HexUint128() string { return hexUint(globalFaker.Rand, 128) } - -// HexUint128 will generate a random uint128 hex value with "0x" prefix -func (f *Faker) HexUint128() string { return hexUint(f.Rand, 128) } - -// HexUint256 will generate a random uint256 hex value with "0x" prefix -func HexUint256() string { return hexUint(globalFaker.Rand, 256) } - -// HexUint256 will generate a random uint256 hex value with "0x" prefix -func (f *Faker) HexUint256() string { return hexUint(f.Rand, 256) } - -func hexUint(r *rand.Rand, bitSize int) string { - digits := []byte("0123456789abcdef") - hexLen := (bitSize >> 2) + 2 - if hexLen <= 2 { - return "0x" - } - - s := make([]byte, hexLen) - s[0], s[1] = '0', 'x' - for i := 2; i < hexLen; i++ { - s[i] = digits[r.Intn(16)] - } - return string(s) -} - -func addNumberLookup() { - AddFuncLookup("number", Info{ - Display: "Number", - Category: "number", - Description: "Random number between given range", - Example: "14866", - Output: "int", - Params: []Param{ - {Field: "min", Display: "Min", Type: "int", Default: "-2147483648", Description: "Minimum integer value"}, - {Field: "max", Display: "Max", Type: "int", Default: "2147483647", Description: "Maximum integer value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetInt(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetInt(m, "max") - if err != nil { - return nil, err - } - - return number(r, min, max), nil - }, - }) - - AddFuncLookup("uint8", Info{ - Display: "Uint8", - Category: "number", - Description: "Random uint8 value", - Example: "152", - Output: "uint8", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return uint8Func(r), nil - }, - }) - - AddFuncLookup("uint16", Info{ - Display: "Uint16", - Category: "number", - Description: "Random uint16 value", - Example: "34968", - Output: "uint16", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return uint16Func(r), nil - }, - }) - - AddFuncLookup("uint32", Info{ - Display: "Uint32", - Category: "number", - Description: "Random uint32 value", - Example: "1075055705", - Output: "uint32", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return uint32Func(r), nil - }, - }) - - AddFuncLookup("uint64", Info{ - Display: "Uint64", - Category: "number", - Description: "Random uint64 value", - Example: "843730692693298265", - Output: "uint64", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return uint64Func(r), nil - }, - }) - - AddFuncLookup("uintrange", Info{ - Display: "UintRange", - Category: "number", - Description: "Random uint value between given range", - Example: "1075055705", - Output: "uint", - Params: []Param{ - {Field: "min", Display: "Min", Type: "uint", Default: "0", Description: "Minimum uint value"}, - {Field: "max", Display: "Max", Type: "uint", Default: "4294967295", Description: "Maximum uint value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetUint(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetUint(m, "max") - if err != nil { - return nil, err - } - - return uintRangeFunc(r, min, max), nil - }, - }) - - AddFuncLookup("int8", Info{ - Display: "Int8", - Category: "number", - Description: "Random int8 value", - Example: "24", - Output: "int8", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return int8Func(r), nil - }, - }) - - AddFuncLookup("int16", Info{ - Display: "Int16", - Category: "number", - Description: "Random int16 value", - Example: "2200", - Output: "int16", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return int16Func(r), nil - }, - }) - - AddFuncLookup("int32", Info{ - Display: "Int32", - Category: "number", - Description: "Random int32 value", - Example: "-1072427943", - Output: "int32", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return int32Func(r), nil - }, - }) - - AddFuncLookup("int64", Info{ - Display: "Int64", - Category: "number", - Description: "Random int64 value", - Example: "-8379641344161477543", - Output: "int64", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return int64Func(r), nil - }, - }) - - AddFuncLookup("intrange", Info{ - Display: "IntRange", - Category: "number", - Description: "Random int value between min and max", - Example: "-8379477543", - Output: "int", - Params: []Param{ - {Field: "min", Display: "Min", Type: "int", Description: "Minimum int value"}, - {Field: "max", Display: "Max", Type: "int", Description: "Maximum int value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetInt(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetInt(m, "max") - if err != nil { - return nil, err - } - - return intRangeFunc(r, min, max), nil - }, - }) - - AddFuncLookup("float32", Info{ - Display: "Float32", - Category: "number", - Description: "Random float32 value", - Example: "3.1128167e+37", - Output: "float32", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return float32Func(r), nil - }, - }) - - AddFuncLookup("float32range", Info{ - Display: "Float32 Range", - Category: "number", - Description: "Random float32 between given range", - Example: "914774.6", - Output: "float32", - Params: []Param{ - {Field: "min", Display: "Min", Type: "float", Description: "Minimum float32 value"}, - {Field: "max", Display: "Max", Type: "float", Description: "Maximum float32 value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetFloat32(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetFloat32(m, "max") - if err != nil { - return nil, err - } - - return float32Range(r, min, max), nil - }, - }) - - AddFuncLookup("float64", Info{ - Display: "Float64", - Category: "number", - Description: "Random float64 value", - Example: "1.644484108270445e+307", - Output: "float64", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return float64Func(r), nil - }, - }) - - AddFuncLookup("float64range", Info{ - Display: "Float64 Range", - Category: "number", - Description: "Random float64 between given range", - Example: "914774.5585333086", - Output: "float64", - Params: []Param{ - {Field: "min", Display: "Min", Type: "float", Description: "Minimum float64 value"}, - {Field: "max", Display: "Max", Type: "float", Description: "Maximum float64 value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetFloat64(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetFloat64(m, "max") - if err != nil { - return nil, err - } - - return float64Range(r, min, max), nil - }, - }) - - AddFuncLookup("shuffleints", Info{ - Display: "Shuffle Ints", - Category: "number", - Description: "Shuffle an array of ints", - Example: "1,2,3,4 => 3,1,4,2", - Output: "[]int", - Params: []Param{ - {Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - ints, err := info.GetIntArray(m, "ints") - if err != nil { - return nil, err - } - - shuffleInts(r, ints) - - return ints, nil - }, - }) - - AddFuncLookup("randomint", Info{ - Display: "Random Int", - Category: "number", - Description: "Randomly selected value from a slice of int", - Example: "-1,2,-3,4 => -3", - Output: "int", - Params: []Param{ - {Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) { - ints, err := info.GetIntArray(m, "ints") - if err != nil { - return nil, err - } - - return randomInt(r, ints), nil - }, - }) - - AddFuncLookup("randomuint", Info{ - Display: "Random Uint", - Category: "number", - Description: "Randomly selected value from a slice of uint", - Example: "1,2,3,4 => 4", - Output: "uint", - Params: []Param{ - {Field: "uints", Display: "Unsigned Integers", Type: "[]uint", Description: "Delimited separated unsigned integers"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) { - uints, err := info.GetUintArray(m, "uints") - if err != nil { - return nil, err - } - - return randomUint(r, uints), nil - }, - }) - - AddFuncLookup("hexuint8", Info{ - Display: "HexUint8", - Category: "number", - Description: "Random uint8 hex value", - Example: "0x87", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 8), nil - }, - }) - - AddFuncLookup("hexuint16", Info{ - Display: "HexUint16", - Category: "number", - Description: "Random uint16 hex value", - Example: "0x8754", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 16), nil - }, - }) - - AddFuncLookup("hexuint32", Info{ - Display: "HexUint32", - Category: "number", - Description: "Random uint32 hex value", - Example: "0x87546957", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 32), nil - }, - }) - - AddFuncLookup("hexuint64", Info{ - Display: "HexUint64", - Category: "number", - Description: "Random uint64 hex value", - Example: "0x875469578e51b5e5", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 64), nil - }, - }) - - AddFuncLookup("hexuint128", Info{ - Display: "HexUint128", - Category: "number", - Description: "Random uint128 hex value", - Example: "0x875469578e51b5e56c95b64681d147a1", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 128), nil - }, - }) - - AddFuncLookup("hexuint256", Info{ - Display: "HexUint256", - Category: "number", - Description: "Random uint256 hex value", - Example: "0x875469578e51b5e56c95b64681d147a12cde48a4f417231b0c486abbc263e48d", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hexUint(r, 256), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/payment.go b/vendor/github.com/brianvoe/gofakeit/v6/payment.go deleted file mode 100644 index ead89c1421f..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/payment.go +++ /dev/null @@ -1,433 +0,0 @@ -package gofakeit - -import ( - "math" - "math/rand" - "strconv" - "strings" - "time" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// CurrencyInfo is a struct of currency information -type CurrencyInfo struct { - Short string `json:"short" xml:"short"` - Long string `json:"long" xml:"long"` -} - -// Currency will generate a struct with random currency information -func Currency() *CurrencyInfo { return currency(globalFaker.Rand) } - -// Currency will generate a struct with random currency information -func (f *Faker) Currency() *CurrencyInfo { return currency(f.Rand) } - -func currency(r *rand.Rand) *CurrencyInfo { - index := r.Intn(len(data.Data["currency"]["short"])) - return &CurrencyInfo{ - Short: data.Data["currency"]["short"][index], - Long: data.Data["currency"]["long"][index], - } -} - -// CurrencyShort will generate a random short currency value -func CurrencyShort() string { return currencyShort(globalFaker.Rand) } - -// CurrencyShort will generate a random short currency value -func (f *Faker) CurrencyShort() string { return currencyShort(f.Rand) } - -func currencyShort(r *rand.Rand) string { return getRandValue(r, []string{"currency", "short"}) } - -// CurrencyLong will generate a random long currency name -func CurrencyLong() string { return currencyLong(globalFaker.Rand) } - -// CurrencyLong will generate a random long currency name -func (f *Faker) CurrencyLong() string { return currencyLong(f.Rand) } - -func currencyLong(r *rand.Rand) string { return getRandValue(r, []string{"currency", "long"}) } - -// Price will take in a min and max value and return a formatted price -func Price(min, max float64) float64 { return price(globalFaker.Rand, min, max) } - -// Price will take in a min and max value and return a formatted price -func (f *Faker) Price(min, max float64) float64 { return price(f.Rand, min, max) } - -func price(r *rand.Rand, min, max float64) float64 { - return math.Floor(float64Range(r, min, max)*100) / 100 -} - -// CreditCardInfo is a struct containing credit variables -type CreditCardInfo struct { - Type string `json:"type" xml:"type"` - Number string `json:"number" xml:"number"` - Exp string `json:"exp" xml:"exp"` - Cvv string `json:"cvv" xml:"cvv"` -} - -// CreditCard will generate a struct full of credit card information -func CreditCard() *CreditCardInfo { return creditCard(globalFaker.Rand) } - -// CreditCard will generate a struct full of credit card information -func (f *Faker) CreditCard() *CreditCardInfo { return creditCard(f.Rand) } - -func creditCard(r *rand.Rand) *CreditCardInfo { - ccType := randomString(r, data.CreditCardTypes) - return &CreditCardInfo{ - Type: data.CreditCards[randomString(r, data.CreditCardTypes)].Display, - Number: creditCardNumber(r, &CreditCardOptions{Types: []string{ccType}}), - Exp: creditCardExp(r), - Cvv: generate(r, strings.Repeat("#", int(data.CreditCards[randomString(r, data.CreditCardTypes)].Code.Size))), - } -} - -// CreditCardType will generate a random credit card type string -func CreditCardType() string { return creditCardType(globalFaker.Rand) } - -// CreditCardType will generate a random credit card type string -func (f *Faker) CreditCardType() string { return creditCardType(f.Rand) } - -func creditCardType(r *rand.Rand) string { - return data.CreditCards[randomString(r, data.CreditCardTypes)].Display -} - -// CreditCardOptions is the options for credit card number -type CreditCardOptions struct { - Types []string `json:"types"` - Bins []string `json:"bins"` // optional parameter of prepended numbers - Gaps bool `json:"gaps"` -} - -// CreditCardNumber will generate a random luhn credit card number -func CreditCardNumber(cco *CreditCardOptions) string { return creditCardNumber(globalFaker.Rand, cco) } - -// CreditCardNumber will generate a random luhn credit card number -func (f *Faker) CreditCardNumber(cco *CreditCardOptions) string { return creditCardNumber(f.Rand, cco) } - -func creditCardNumber(r *rand.Rand, cco *CreditCardOptions) string { - if cco == nil { - cco = &CreditCardOptions{} - } - if cco.Types == nil || len(cco.Types) == 0 { - cco.Types = data.CreditCardTypes - } - ccType := randomString(r, cco.Types) - - // Get Card info - var cardInfo data.CreditCardInfo - if info, ok := data.CreditCards[ccType]; ok { - cardInfo = info - } else { - ccType = randomString(r, data.CreditCardTypes) - cardInfo = data.CreditCards[ccType] - } - - // Get length and pattern - length := randomUint(r, cardInfo.Lengths) - numStr := "" - if len(cco.Bins) >= 1 { - numStr = randomString(r, cco.Bins) - } else { - numStr = strconv.FormatUint(uint64(randomUint(r, cardInfo.Patterns)), 10) - } - numStr += strings.Repeat("#", int(length)-len(numStr)) - numStr = numerify(r, numStr) - ui, _ := strconv.ParseUint(numStr, 10, 64) - - // Loop through until its a valid luhn - for { - valid := isLuhn(strconv.FormatUint(ui, 10)) - if valid { - break - } - ui++ - } - numStr = strconv.FormatUint(ui, 10) - - // Add gaps to number - if cco.Gaps { - for i, spot := range cardInfo.Gaps { - numStr = numStr[:(int(spot)+i)] + " " + numStr[(int(spot)+i):] - } - } - - return numStr -} - -// CreditCardExp will generate a random credit card expiration date string -// Exp date will always be a future date -func CreditCardExp() string { return creditCardExp(globalFaker.Rand) } - -// CreditCardExp will generate a random credit card expiration date string -// Exp date will always be a future date -func (f *Faker) CreditCardExp() string { return creditCardExp(f.Rand) } - -func creditCardExp(r *rand.Rand) string { - month := strconv.Itoa(randIntRange(r, 1, 12)) - if len(month) == 1 { - month = "0" + month - } - - var currentYear = time.Now().Year() - 2000 - return month + "/" + strconv.Itoa(randIntRange(r, currentYear+1, currentYear+10)) -} - -// CreditCardCvv will generate a random CVV number -// Its a string because you could have 017 as an exp date -func CreditCardCvv() string { return creditCardCvv(globalFaker.Rand) } - -// CreditCardCvv will generate a random CVV number -// Its a string because you could have 017 as an exp date -func (f *Faker) CreditCardCvv() string { return creditCardCvv(f.Rand) } - -func creditCardCvv(r *rand.Rand) string { return numerify(r, "###") } - -// isLuhn check is used for checking if credit card is a valid luhn card -func isLuhn(s string) bool { - var t = [...]int{0, 2, 4, 6, 8, 1, 3, 5, 7, 9} - odd := len(s) & 1 - var sum int - for i, c := range s { - if c < '0' || c > '9' { - return false - } - if i&1 == odd { - sum += t[c-'0'] - } else { - sum += int(c - '0') - } - } - return sum%10 == 0 -} - -// AchRouting will generate a 9 digit routing number -func AchRouting() string { return achRouting(globalFaker.Rand) } - -// AchRouting will generate a 9 digit routing number -func (f *Faker) AchRouting() string { return achRouting(f.Rand) } - -func achRouting(r *rand.Rand) string { return numerify(r, "#########") } - -// AchAccount will generate a 12 digit account number -func AchAccount() string { return achAccount(globalFaker.Rand) } - -// AchAccount will generate a 12 digit account number -func (f *Faker) AchAccount() string { return achAccount(f.Rand) } - -func achAccount(r *rand.Rand) string { return numerify(r, "############") } - -// BitcoinAddress will generate a random bitcoin address consisting of numbers, upper and lower characters -func BitcoinAddress() string { return bitcoinAddress(globalFaker.Rand) } - -// BitcoinAddress will generate a random bitcoin address consisting of numbers, upper and lower characters -func (f *Faker) BitcoinAddress() string { return bitcoinAddress(f.Rand) } - -func bitcoinAddress(r *rand.Rand) string { - return randomString(r, []string{"1", "3"}) + password(r, true, true, true, false, false, number(r, 25, 34)) -} - -// BitcoinPrivateKey will generate a random bitcoin private key base58 consisting of numbers, upper and lower characters -func BitcoinPrivateKey() string { return bitcoinPrivateKey(globalFaker.Rand) } - -// BitcoinPrivateKey will generate a random bitcoin private key base58 consisting of numbers, upper and lower characters -func (f *Faker) BitcoinPrivateKey() string { return bitcoinPrivateKey(f.Rand) } - -func bitcoinPrivateKey(r *rand.Rand) string { - var b strings.Builder - for i := 0; i < 49; i++ { - b.WriteString(randCharacter(r, base58)) - } - return "5" + randomString(r, []string{"H", "J", "K"}) + b.String() -} - -func addPaymentLookup() { - AddFuncLookup("currency", Info{ - Display: "Currency", - Category: "payment", - Description: "Random currency data set", - Example: `{short: "USD", long: "United States Dollar"}`, - Output: "map[string]string", - ContentType: "application/json", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return currency(r), nil - }, - }) - - AddFuncLookup("currencyshort", Info{ - Display: "Currency Short", - Category: "payment", - Description: "Random currency abbreviated", - Example: "USD", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return currencyShort(r), nil - }, - }) - - AddFuncLookup("currencylong", Info{ - Display: "Currency Long", - Category: "payment", - Description: "Random currency", - Example: "United States Dollar", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return currencyLong(r), nil - }, - }) - - AddFuncLookup("price", Info{ - Display: "Price", - Category: "payment", - Description: "Random monitary price", - Example: "92.26", - Output: "float64", - Params: []Param{ - {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum price value"}, - {Field: "max", Display: "Max", Type: "float", Default: "1000", Description: "Maximum price value"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - min, err := info.GetFloat64(m, "min") - if err != nil { - return nil, err - } - - max, err := info.GetFloat64(m, "max") - if err != nil { - return nil, err - } - - return price(r, min, max), nil - }, - }) - - AddFuncLookup("creditcard", Info{ - Display: "Credit Card", - Category: "payment", - Description: "Random credit card data set", - Example: `{type: "Visa", number: "4136459948995369", exp: "01/21", cvv: "513"}`, - Output: "map[string]interface", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return creditCard(r), nil - }, - }) - - AddFuncLookup("creditcardtype", Info{ - Display: "Credit Card Type", - Category: "payment", - Description: "Random credit card type", - Example: "Visa", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return creditCardType(r), nil - }, - }) - - AddFuncLookup("creditcardnumber", Info{ - Display: "Credit Card Number", - Category: "payment", - Description: "Random credit card number", - Example: "4136459948995369", - Output: "int", - Params: []Param{ - { - Field: "types", Display: "Types", Type: "[]string", Default: "all", - Options: []string{"visa", "mastercard", "american-express", "diners-club", "discover", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard"}, - Description: "A select number of types you want to use when generating a credit card number", - }, - {Field: "bins", Display: "Bins", Type: "[]string", Optional: true, Description: "Optional list of prepended bin numbers to pick from"}, - {Field: "gaps", Display: "Gaps", Type: "bool", Default: "false", Description: "Whether or not to have gaps in number"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - types, err := info.GetStringArray(m, "types") - if err != nil { - return nil, err - } - if len(types) == 1 && types[0] == "all" { - types = []string{} - } - - bins, _ := info.GetStringArray(m, "bins") - - gaps, err := info.GetBool(m, "gaps") - if err != nil { - return nil, err - } - - options := CreditCardOptions{ - Types: types, - Gaps: gaps, - } - - if len(bins) >= 1 { - options.Bins = bins - } - - return creditCardNumber(r, &options), nil - }, - }) - - AddFuncLookup("creditcardexp", Info{ - Display: "Credit Card Exp", - Category: "payment", - Description: "Random credit card expiraction date", - Example: "01/21", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return creditCardExp(r), nil - }, - }) - - AddFuncLookup("creditcardcvv", Info{ - Display: "Credit Card CVV", - Category: "payment", - Description: "Random credit card number", - Example: "513", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return creditCardCvv(r), nil - }, - }) - - AddFuncLookup("achrouting", Info{ - Display: "ACH Routing Number", - Category: "payment", - Description: "Random 9 digit ach routing number", - Example: "513715684", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return achRouting(r), nil - }, - }) - - AddFuncLookup("achaccount", Info{ - Display: "ACH Account Number", - Category: "payment", - Description: "Random 12 digit ach account number", - Example: "491527954328", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return achAccount(r), nil - }, - }) - - AddFuncLookup("bitcoinaddress", Info{ - Display: "Bitcoin Address", - Category: "payment", - Description: "Random 26-35 characters representing a bitcoin address", - Example: "1lWLbxojXq6BqWX7X60VkcDIvYA", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bitcoinAddress(r), nil - }, - }) - - AddFuncLookup("bitcoinprivatekey", Info{ - Display: "Bitcoin Private Key", - Category: "payment", - Description: "Random 51 characters representing a bitcoin private key", - Example: "5vrbXTADWJ6sQBSYd6lLkG97jljNc0X9VPBvbVqsIH9lWOLcoqg", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return bitcoinPrivateKey(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/person.go b/vendor/github.com/brianvoe/gofakeit/v6/person.go deleted file mode 100644 index da835a0bae9..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/person.go +++ /dev/null @@ -1,410 +0,0 @@ -package gofakeit - -import ( - "math" - "math/rand" - "strconv" - "strings" -) - -// PersonInfo is a struct of person information -type PersonInfo struct { - FirstName string `json:"first_name" xml:"first_name"` - LastName string `json:"last_name" xml:"last_name"` - Gender string `json:"gender" xml:"gender"` - SSN string `json:"ssn" xml:"ssn"` - Image string `json:"image" xml:"image"` - Hobby string `json:"hobby" xml:"hobby"` - Job *JobInfo `json:"job" xml:"job"` - Address *AddressInfo `json:"address" xml:"address"` - Contact *ContactInfo `json:"contact" xml:"contact"` - CreditCard *CreditCardInfo `json:"credit_card" xml:"credit_card"` -} - -// Person will generate a struct with person information -func Person() *PersonInfo { return person(globalFaker.Rand) } - -// Person will generate a struct with person information -func (f *Faker) Person() *PersonInfo { return person(f.Rand) } - -func person(r *rand.Rand) *PersonInfo { - return &PersonInfo{ - FirstName: firstName(r), - LastName: lastName(r), - Gender: gender(r), - SSN: ssn(r), - Image: imageURL(r, number(r, 100, 500), number(r, 100, 500)), - Hobby: hobby(r), - Job: job(r), - Address: address(r), - Contact: contact(r), - CreditCard: creditCard(r), - } -} - -// Name will generate a random First and Last Name -func Name() string { return name(globalFaker.Rand) } - -// Name will generate a random First and Last Name -func (f *Faker) Name() string { return name(f.Rand) } - -func name(r *rand.Rand) string { - return getRandValue(r, []string{"person", "first"}) + " " + getRandValue(r, []string{"person", "last"}) -} - -// FirstName will generate a random first name -func FirstName() string { return firstName(globalFaker.Rand) } - -// FirstName will generate a random first name -func (f *Faker) FirstName() string { return firstName(f.Rand) } - -func firstName(r *rand.Rand) string { return getRandValue(r, []string{"person", "first"}) } - -// MiddleName will generate a random middle name -func MiddleName() string { return middleName(globalFaker.Rand) } - -// MiddleName will generate a random middle name -func (f *Faker) MiddleName() string { return middleName(f.Rand) } - -func middleName(r *rand.Rand) string { return getRandValue(r, []string{"person", "middle"}) } - -// LastName will generate a random last name -func LastName() string { return lastName(globalFaker.Rand) } - -// LastName will generate a random last name -func (f *Faker) LastName() string { return lastName(f.Rand) } - -func lastName(r *rand.Rand) string { return getRandValue(r, []string{"person", "last"}) } - -// NamePrefix will generate a random name prefix -func NamePrefix() string { return namePrefix(globalFaker.Rand) } - -// NamePrefix will generate a random name prefix -func (f *Faker) NamePrefix() string { return namePrefix(f.Rand) } - -func namePrefix(r *rand.Rand) string { return getRandValue(r, []string{"person", "prefix"}) } - -// NameSuffix will generate a random name suffix -func NameSuffix() string { return nameSuffix(globalFaker.Rand) } - -// NameSuffix will generate a random name suffix -func (f *Faker) NameSuffix() string { return nameSuffix(f.Rand) } - -func nameSuffix(r *rand.Rand) string { return getRandValue(r, []string{"person", "suffix"}) } - -// SSN will generate a random Social Security Number -func SSN() string { return ssn(globalFaker.Rand) } - -// SSN will generate a random Social Security Number -func (f *Faker) SSN() string { return ssn(f.Rand) } - -func ssn(r *rand.Rand) string { return strconv.Itoa(randIntRange(r, 100000000, 999999999)) } - -// Gender will generate a random gender string -func Gender() string { return gender(globalFaker.Rand) } - -// Gender will generate a random gender string -func (f *Faker) Gender() string { return gender(f.Rand) } - -func gender(r *rand.Rand) string { - if boolFunc(r) { - return "male" - } - - return "female" -} - -// Hobby will generate a random hobby string -func Hobby() string { return hobby(globalFaker.Rand) } - -// Hobby will generate a random hobby string -func (f *Faker) Hobby() string { return hobby(f.Rand) } - -func hobby(r *rand.Rand) string { return getRandValue(r, []string{"person", "hobby"}) } - -// ContactInfo struct full of contact info -type ContactInfo struct { - Phone string `json:"phone" xml:"phone"` - Email string `json:"email" xml:"email"` -} - -// Contact will generate a struct with information randomly populated contact information -func Contact() *ContactInfo { return contact(globalFaker.Rand) } - -// Contact will generate a struct with information randomly populated contact information -func (f *Faker) Contact() *ContactInfo { return contact(f.Rand) } - -func contact(r *rand.Rand) *ContactInfo { - return &ContactInfo{ - Phone: phone(r), - Email: email(r), - } -} - -// Phone will generate a random phone number string -func Phone() string { return phone(globalFaker.Rand) } - -// Phone will generate a random phone number string -func (f *Faker) Phone() string { return phone(f.Rand) } - -func phone(r *rand.Rand) string { return replaceWithNumbers(r, "##########") } - -// PhoneFormatted will generate a random phone number string -func PhoneFormatted() string { return phoneFormatted(globalFaker.Rand) } - -// PhoneFormatted will generate a random phone number string -func (f *Faker) PhoneFormatted() string { return phoneFormatted(f.Rand) } - -func phoneFormatted(r *rand.Rand) string { - return replaceWithNumbers(r, getRandValue(r, []string{"person", "phone"})) -} - -// Email will generate a random email string -func Email() string { return email(globalFaker.Rand) } - -// Email will generate a random email string -func (f *Faker) Email() string { return email(f.Rand) } - -func email(r *rand.Rand) string { - email := getRandValue(r, []string{"person", "first"}) + getRandValue(r, []string{"person", "last"}) - email += "@" - email += getRandValue(r, []string{"person", "last"}) + "." + getRandValue(r, []string{"internet", "domain_suffix"}) - - return strings.ToLower(email) -} - -// Teams takes in an array of people and team names and randomly places the people into teams as evenly as possible -func Teams(peopleArray []string, teamsArray []string) map[string][]string { - return teams(globalFaker.Rand, peopleArray, teamsArray) -} - -// Teams takes in an array of people and team names and randomly places the people into teams as evenly as possible -func (f *Faker) Teams(peopleArray []string, teamsArray []string) map[string][]string { - return teams(f.Rand, peopleArray, teamsArray) -} - -func teams(r *rand.Rand, people []string, teams []string) map[string][]string { - // Shuffle the people if more than 1 - if len(people) > 1 { - shuffleStrings(r, people) - } - - peopleIndex := 0 - teamsOutput := make(map[string][]string) - numPer := math.Ceil(float64(len(people)) / float64(len(teams))) - for _, team := range teams { - teamsOutput[team] = []string{} - for i := 0.00; i < numPer; i++ { - if peopleIndex < len(people) { - teamsOutput[team] = append(teamsOutput[team], people[peopleIndex]) - peopleIndex++ - } - } - } - - return teamsOutput -} - -func addPersonLookup() { - AddFuncLookup("person", Info{ - Display: "Person", - Category: "person", - Description: "Random set of person info", - Example: `{ - first_name: "Markus", - last_name: "Moen", - gender: "male", - ssn: "420776036", - image: "https://picsum.photos/300/300/people", - hobby: "Swimming", - job: { - company: "Lockman and Sons", - title: "Developer", - descriptor: "Global", - level: "Brand" - }, - address: { - address: "5369 Streamville, Rossieview, Hawaii 42591", - street: "5369 Streamville", - city: "Rossieview", - state: "Hawaii", - zip: "42591", - country: "Burkina Faso", - latitude: "-6.662594491850811", - longitude: "23.921575244414612" - }, - contact: { - phone: "6136459948", - email: "carolecarroll@bosco.com" - }, - credit_card: { - type: "Visa", - number: "6536459948995369", - exp: "03/27", - cvv: "353" - } - }`, - Output: "map[string]interface", - ContentType: "application/json", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return person(r), nil - }, - }) - - AddFuncLookup("name", Info{ - Display: "Name", - Category: "person", - Description: "Random name", - Example: "Markus Moen", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return name(r), nil - }, - }) - - AddFuncLookup("nameprefix", Info{ - Display: "Name Prefix", - Category: "person", - Description: "Random name prefix", - Example: "Mr.", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return namePrefix(r), nil - }, - }) - - AddFuncLookup("namesuffix", Info{ - Display: "Name Suffix", - Category: "person", - Description: "Random name suffix", - Example: "Jr.", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nameSuffix(r), nil - }, - }) - - AddFuncLookup("firstname", Info{ - Display: "First Name", - Category: "person", - Description: "Random first name", - Example: "Markus", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return firstName(r), nil - }, - }) - - AddFuncLookup("middlename", Info{ - Display: "Middle Name", - Category: "person", - Description: "Random middle name", - Example: "Belinda", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return middleName(r), nil - }, - }) - - AddFuncLookup("lastname", Info{ - Display: "Last Name", - Category: "person", - Description: "Random last name", - Example: "Daniel", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return lastName(r), nil - }, - }) - - AddFuncLookup("gender", Info{ - Display: "Gender", - Category: "person", - Description: "Random gender", - Example: "male", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return gender(r), nil - }, - }) - - AddFuncLookup("ssn", Info{ - Display: "SSN", - Category: "person", - Description: "Random social security number", - Example: "296446360", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return ssn(r), nil - }, - }) - - AddFuncLookup("hobby", Info{ - Display: "Hobby", - Category: "person", - Description: "Random hobby activity", - Example: "Swimming", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hobby(r), nil - }, - }) - - AddFuncLookup("email", Info{ - Display: "Email", - Category: "person", - Description: "Random email", - Example: "markusmoen@pagac.net", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return email(r), nil - }, - }) - - AddFuncLookup("phone", Info{ - Display: "Phone", - Category: "person", - Description: "Random phone number", - Example: "6136459948", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phone(r), nil - }, - }) - - AddFuncLookup("phoneformatted", Info{ - Display: "Phone Formatted", - Category: "person", - Description: "Random formatted phone number", - Example: "136-459-9489", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phoneFormatted(r), nil - }, - }) - - AddFuncLookup("teams", Info{ - Display: "Teams", - Category: "person", - Description: "Randomly split people into teams", - Example: `{"Team 1": ["Sharon","Jeff"], "Team 2": ["Billy","Connor"]}`, - Output: "map[string][]string", - Params: []Param{ - {Field: "people", Display: "Strings", Type: "[]string", Description: "Array of people"}, - {Field: "teams", Display: "Strings", Type: "[]string", Description: "Array of teams"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - people, err := info.GetStringArray(m, "people") - if err != nil { - return nil, err - } - - teamsArray, err := info.GetStringArray(m, "teams") - if err != nil { - return nil, err - } - - return teams(r, people, teamsArray), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/school.go b/vendor/github.com/brianvoe/gofakeit/v6/school.go deleted file mode 100644 index fb62c7f81cd..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/school.go +++ /dev/null @@ -1,28 +0,0 @@ -package gofakeit - -import "math/rand" - -// School will generate a random School type -func School() string { return school(globalFaker.Rand) } - -func (f *Faker) School() string { return school(f.Rand) } - -func school(r *rand.Rand) string { - return getRandValue( - r, []string{"school", "name"}) + " " + - getRandValue(r, []string{"school", "isPrivate"}) + " " + - getRandValue(r, []string{"school", "type"}) -} - -func addSchoolLookup() { - AddFuncLookup("school", Info{ - Display: "School", - Category: "school", - Description: "School names, education places. Such as uni, High School etc.", - Example: `Harborview State Academy`, - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return school(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/slice.go b/vendor/github.com/brianvoe/gofakeit/v6/slice.go deleted file mode 100644 index eec5e43d9d1..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/slice.go +++ /dev/null @@ -1,15 +0,0 @@ -package gofakeit - -import ( - "reflect" -) - -// Slice fills built-in types and exported fields of a struct with random data. -func Slice(v any) { sliceFunc(globalFaker, v) } - -// Slice fills built-in types and exported fields of a struct with random data. -func (f *Faker) Slice(v any) { sliceFunc(f, v) } - -func sliceFunc(f *Faker, v any) { - r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", -1) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/sql.go b/vendor/github.com/brianvoe/gofakeit/v6/sql.go deleted file mode 100644 index 1394240b788..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/sql.go +++ /dev/null @@ -1,157 +0,0 @@ -package gofakeit - -import ( - "encoding/json" - "errors" - "fmt" - "math/rand" - "strings" -) - -type SQLOptions struct { - Table string `json:"table" xml:"table"` // Table name we are inserting into - Count int `json:"count" xml:"count"` // How many entries (tuples) we're generating - Fields []Field `json:"fields" xml:"fields"` // The fields to be generated -} - -func SQL(so *SQLOptions) (string, error) { return sqlFunc(globalFaker.Rand, so) } - -func (f *Faker) SQL(so *SQLOptions) (string, error) { return sqlFunc(f.Rand, so) } - -func sqlFunc(r *rand.Rand, so *SQLOptions) (string, error) { - if so.Table == "" { - return "", errors.New("must provide table name to generate SQL") - } - if so.Fields == nil || len(so.Fields) <= 0 { - return "", errors.New(("must pass fields in order to generate SQL queries")) - } - if so.Count <= 0 { - return "", errors.New("must have entry count") - } - - var sb strings.Builder - sb.WriteString("INSERT INTO " + so.Table + " ") - - // Loop through each field and put together column names - var cols []string - for _, f := range so.Fields { - cols = append(cols, f.Name) - } - sb.WriteString("(" + strings.Join(cols, ", ") + ")") - - sb.WriteString(" VALUES ") - for i := 0; i < so.Count; i++ { - // Start opening value - sb.WriteString("(") - - // Now, we need to add all of our fields - var endStr string - for ii, field := range so.Fields { - // Set end of value string - endStr = ", " - if ii == len(so.Fields)-1 { - endStr = "" - } - - // If autoincrement, add based upon loop - if field.Function == "autoincrement" { - sb.WriteString(fmt.Sprintf("%d%s", i+1, endStr)) - continue - } - - // Get the function info for the field - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return "", errors.New("invalid function, " + field.Function + " does not exist") - } - - // Generate the value - val, err := funcInfo.Generate(r, &field.Params, funcInfo) - if err != nil { - return "", err - } - - // Convert the output value to the proper SQL type - convertType := sqlConvertType(funcInfo.Output, val) - - // If its the last field, we need to close the value - sb.WriteString(convertType + endStr) - } - - // If its the last value, we need to close the value - if i == so.Count-1 { - sb.WriteString(");") - } else { - sb.WriteString("),") - } - } - - return sb.String(), nil -} - -// sqlConvertType will take in a type and value and convert it to the proper SQL type -func sqlConvertType(t string, val any) string { - switch t { - case "string": - return `'` + fmt.Sprintf("%v", val) + `'` - case "[]byte": - return `'` + fmt.Sprintf("%s", val) + `'` - default: - return fmt.Sprintf("%v", val) - } -} - -func addDatabaseSQLLookup() { - AddFuncLookup("sql", Info{ - Display: "SQL", - Category: "database", - Description: "Generates an object or an array of objects in json format", - Example: `INSERT INTO people - (id, first_name, price, age, created_at) - VALUES - (1, 'Markus', 804.92, 21, '1937-01-30 07:58:01'), - (2, 'Santino', 235.13, 40, '1964-07-07 22:25:40');`, - Output: "string", - ContentType: "application/sql", - Params: []Param{ - {Field: "table", Display: "Table", Type: "string", Description: "Name of the table to insert into"}, - {Field: "count", Display: "Count", Type: "int", Default: "100", Description: "Number of inserts to generate"}, - {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields containing key name and function to run in json format"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - so := SQLOptions{} - - table, err := info.GetString(m, "table") - if err != nil { - return nil, err - } - so.Table = table - - count, err := info.GetInt(m, "count") - if err != nil { - return nil, err - } - so.Count = count - - fieldsStr, err := info.GetStringArray(m, "fields") - if err != nil { - return nil, err - } - - // Check to make sure fields has length - if len(fieldsStr) > 0 { - so.Fields = make([]Field, len(fieldsStr)) - - for i, f := range fieldsStr { - // Unmarshal fields string into fields array - err = json.Unmarshal([]byte(f), &so.Fields[i]) - if err != nil { - return nil, err - } - } - } - - return sqlFunc(r, &so) - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/string.go b/vendor/github.com/brianvoe/gofakeit/v6/string.go deleted file mode 100644 index 53c44e29a37..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/string.go +++ /dev/null @@ -1,272 +0,0 @@ -package gofakeit - -import "math/rand" - -// Letter will generate a single random lower case ASCII letter -func Letter() string { return letter(globalFaker.Rand) } - -// Letter will generate a single random lower case ASCII letter -func (f *Faker) Letter() string { return letter(f.Rand) } - -func letter(r *rand.Rand) string { return string(randLetter(r)) } - -// LetterN will generate a random ASCII string with length N. Note that this function returns a string with a length of 1 when 0 is passed. -func LetterN(n uint) string { return letterN(globalFaker.Rand, n) } - -// LetterN will generate a random ASCII string with length N. Note that this function returns a string with a length of 1 when 0 is passed. -func (f *Faker) LetterN(n uint) string { return letterN(f.Rand, n) } - -func letterN(r *rand.Rand, n uint) string { - // Make sure we dont use 0 - if n == 0 { - n = 1 - } - out := make([]rune, n) - for i := 0; i < int(n); i++ { - out[i] = randLetter(r) - } - return string(out) -} - -// Vowel will generate a single random lower case vowel -func Vowel() string { return vowel(globalFaker.Rand) } - -// Vowel will generate a single random lower case vowel -func (f *Faker) Vowel() string { return vowel(f.Rand) } - -func vowel(r *rand.Rand) string { return string(randCharacter(r, vowels)) } - -// Digit will generate a single ASCII digit -func Digit() string { return digit(globalFaker.Rand) } - -// Digit will generate a single ASCII digit -func (f *Faker) Digit() string { return digit(f.Rand) } - -func digit(r *rand.Rand) string { return string(randDigit(r)) } - -// DigitN will generate a random string of length N consists of ASCII digits. Note that the string generated can start with 0 and this function returns a string with a length of 1 when 0 is passed. -func DigitN(n uint) string { return digitN(globalFaker.Rand, n) } - -// DigitN will generate a random string of length N consists of ASCII digits. Note that the string generated can start with 0 and this function returns a string with a length of 1 when 0 is passed. -func (f *Faker) DigitN(n uint) string { return digitN(f.Rand, n) } - -func digitN(r *rand.Rand, n uint) string { - // Make sure we dont use 0 - if n == 0 { - n = 1 - } - out := make([]rune, n) - for i := 0; i < int(n); i++ { - out[i] = randDigit(r) - } - return string(out) -} - -// Numerify will replace # with random numerical values -func Numerify(str string) string { return numerify(globalFaker.Rand, str) } - -// Numerify will replace # with random numerical values -func (f *Faker) Numerify(str string) string { return numerify(f.Rand, str) } - -func numerify(r *rand.Rand, str string) string { return replaceWithNumbers(r, str) } - -// Lexify will replace ? with random generated letters -func Lexify(str string) string { return lexify(globalFaker.Rand, str) } - -// Lexify will replace ? with random generated letters -func (f *Faker) Lexify(str string) string { return lexify(f.Rand, str) } - -func lexify(r *rand.Rand, str string) string { return replaceWithLetters(r, str) } - -// ShuffleStrings will randomize a slice of strings -func ShuffleStrings(a []string) { shuffleStrings(globalFaker.Rand, a) } - -// ShuffleStrings will randomize a slice of strings -func (f *Faker) ShuffleStrings(a []string) { shuffleStrings(f.Rand, a) } - -func shuffleStrings(r *rand.Rand, a []string) { - swap := func(i, j int) { - a[i], a[j] = a[j], a[i] - } - //to avoid upgrading to 1.10 I copied the algorithm - n := len(a) - if n <= 1 { - return - } - - //if size is > int32 probably it will never finish, or ran out of entropy - i := n - 1 - for ; i > 0; i-- { - j := int(r.Int31n(int32(i + 1))) - swap(i, j) - } -} - -// RandomString will take in a slice of string and return a randomly selected value -func RandomString(a []string) string { return randomString(globalFaker.Rand, a) } - -// RandomString will take in a slice of string and return a randomly selected value -func (f *Faker) RandomString(a []string) string { return randomString(f.Rand, a) } - -func randomString(r *rand.Rand, a []string) string { - size := len(a) - if size == 0 { - return "" - } - if size == 1 { - return a[0] - } - return a[r.Intn(size)] -} - -func addStringLookup() { - AddFuncLookup("letter", Info{ - Display: "Letter", - Category: "string", - Description: "Generate a single random lower case ASCII letter", - Example: "g", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return letter(r), nil - }, - }) - - AddFuncLookup("lettern", Info{ - Display: "LetterN", - Category: "string", - Description: "Generate a random ASCII string with length N", - Example: "gbRMaRxHki", - Output: "string", - Params: []Param{ - {Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - ui, err := info.GetUint(m, "count") - if err != nil { - return nil, err - } - - return letterN(r, ui), nil - }, - }) - - AddFuncLookup("vowel", Info{ - Display: "Vowel", - Category: "string", - Description: "Generate a single random lower case vowel", - Example: "a", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return vowel(r), nil - }, - }) - - AddFuncLookup("digit", Info{ - Display: "Digit", - Category: "string", - Description: "Generate a single ASCII digit", - Example: "0", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return digit(r), nil - }, - }) - - AddFuncLookup("digitn", Info{ - Display: "DigitN", - Category: "string", - Description: "Generate a random string of length N consists of ASCII digits", - Example: "0136459948", - Output: "string", - Params: []Param{ - {Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - ui, err := info.GetUint(m, "count") - if err != nil { - return nil, err - } - - return digitN(r, ui), nil - }, - }) - - AddFuncLookup("numerify", Info{ - Display: "Numerify", - Category: "string", - Description: "Replace # with random numerical values", - Example: "(###)###-#### => (555)867-5309", - Output: "string", - Params: []Param{ - {Field: "str", Display: "String", Type: "string", Description: "String value to replace #'s"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - str, err := info.GetString(m, "str") - if err != nil { - return nil, err - } - - return numerify(r, str), nil - }, - }) - - AddFuncLookup("lexify", Info{ - Display: "Lexify", - Category: "string", - Description: "Replace ? with random generated letters", - Example: "?????@??????.com => billy@mister.com", - Output: "string", - Params: []Param{ - {Field: "str", Display: "String", Type: "string", Description: "String value to replace ?'s"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - str, err := info.GetString(m, "str") - if err != nil { - return nil, err - } - - return lexify(r, str), nil - }, - }) - - AddFuncLookup("shufflestrings", Info{ - Display: "Shuffle Strings", - Category: "string", - Description: "Shuffle an array of strings", - Example: "hello,world,whats,up => whats,world,hello,up", - Output: "[]string", - ContentType: "application/json", - Params: []Param{ - {Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - strs, err := info.GetStringArray(m, "strs") - if err != nil { - return nil, err - } - - shuffleStrings(r, strs) - - return strs, nil - }, - }) - - AddFuncLookup("randomstring", Info{ - Display: "Random String", - Category: "string", - Description: "Randomly grab one string from array", - Example: "hello,world,whats,up => world", - Output: "[]string", - Params: []Param{ - {Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - strs, err := info.GetStringArray(m, "strs") - if err != nil { - return nil, err - } - - return randomString(r, strs), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/struct.go b/vendor/github.com/brianvoe/gofakeit/v6/struct.go deleted file mode 100644 index c587ca17dff..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/struct.go +++ /dev/null @@ -1,583 +0,0 @@ -package gofakeit - -import ( - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "time" -) - -// Struct fills in exported fields of a struct with random data -// based on the value of `fake` tag of exported fields -// or with the result of a call to the Fake() method -// if the field type implements `Fakeable`. -// Use `fake:"skip"` to explicitly skip an element. -// All built-in types are supported, with templating support -// for string types. -func Struct(v any) error { return structFunc(globalFaker, v) } - -// Struct fills in exported fields of a struct with random data -// based on the value of `fake` tag of exported fields. -// Use `fake:"skip"` to explicitly skip an element. -// All built-in types are supported, with templating support -// for string types. -func (f *Faker) Struct(v any) error { return structFunc(f, v) } - -func structFunc(f *Faker, v any) error { - return r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", 0) -} - -func r(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - // Handle special types - - if t.PkgPath() == "encoding/json" { - // encoding/json has two special types: - // - RawMessage - // - Number - - switch t.Name() { - case "RawMessage": - return rJsonRawMessage(f, t, v, tag, size) - case "Number": - return rJsonNumber(f, t, v, tag, size) - default: - return errors.New("unknown encoding/json type: " + t.Name()) - } - } - - // Handle generic types - switch t.Kind() { - case reflect.Ptr: - return rPointer(f, t, v, tag, size) - case reflect.Struct: - return rStruct(f, t, v, tag) - case reflect.String: - return rString(f, t, v, tag) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return rUint(f, t, v, tag) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return rInt(f, t, v, tag) - case reflect.Float32, reflect.Float64: - return rFloat(f, t, v, tag) - case reflect.Bool: - return rBool(f, t, v, tag) - case reflect.Array, reflect.Slice: - return rSlice(f, t, v, tag, size) - case reflect.Map: - return rMap(f, t, v, tag, size) - } - - return nil -} - -func rCustom(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - // If tag is empty return error - if tag == "" { - return errors.New("tag is empty") - } - - fName, fParams := parseNameAndParamsFromTag(tag) - info := GetFuncLookup(fName) - - // Check to see if it's a replaceable lookup function - if info == nil { - return fmt.Errorf("function %q not found", tag) - } - - // Parse map params - mapParams := parseMapParams(info, fParams) - - // Call function - fValue, err := info.Generate(f.Rand, mapParams, info) - if err != nil { - return err - } - - // Create new element of expected type - field := reflect.New(reflect.TypeOf(fValue)) - field.Elem().Set(reflect.ValueOf(fValue)) - - // Check if element is pointer if so - // grab the underlying value - fieldElem := field.Elem() - if fieldElem.Kind() == reflect.Ptr { - fieldElem = fieldElem.Elem() - } - - // Check if field kind is the same as the expected type - if fieldElem.Kind() != v.Kind() { - // return error saying the field and kinds that do not match - return errors.New("field kind " + fieldElem.Kind().String() + " does not match expected kind " + v.Kind().String()) - } - - // Set the value - v.Set(fieldElem.Convert(v.Type())) - - // If a function is called to set the struct - // stop from going through sub fields - return nil -} - -func rStruct(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - // Check if tag exists, if so run custom function - if t.Name() != "" && tag != "" { - return rCustom(f, t, v, tag) - } - - // Check if struct is fakeable - if isFakeable(t) { - value, err := callFake(f, v, reflect.Struct) - if err != nil { - return err - } - - v.Set(reflect.ValueOf(value)) - return nil - } - - // Loop through all the fields of the struct - n := t.NumField() - for i := 0; i < n; i++ { - elementT := t.Field(i) - elementV := v.Field(i) - fakeTag, ok := elementT.Tag.Lookup("fake") - - // Check whether or not to skip this field - if ok && fakeTag == "skip" || fakeTag == "-" { - // Do nothing, skip it - continue - } - - // Check to make sure you can set it or that it's an embedded(anonymous) field - if !elementV.CanSet() && !elementT.Anonymous { - continue - } - - // Check if reflect type is of values we can specifically set - elemStr := elementT.Type.String() - switch elemStr { - case "time.Time", "*time.Time": - // Check if element is a pointer - elemV := elementV - if elemStr == "*time.Time" { - elemV = reflect.New(elementT.Type.Elem()).Elem() - } - - // Run rTime on the element - err := rTime(f, elementT, elemV, fakeTag) - if err != nil { - return err - } - - if elemStr == "*time.Time" { - elementV.Set(elemV.Addr()) - } - - continue - } - - // Check if fakesize is set - size := -1 // Set to -1 to indicate fakesize was not set - fs, ok := elementT.Tag.Lookup("fakesize") - if ok { - var err error - - // Check if size has params separated by , - if strings.Contains(fs, ",") { - sizeSplit := strings.SplitN(fs, ",", 2) - if len(sizeSplit) == 2 { - var sizeMin int - var sizeMax int - - sizeMin, err = strconv.Atoi(sizeSplit[0]) - if err != nil { - return err - } - sizeMax, err = strconv.Atoi(sizeSplit[1]) - if err != nil { - return err - } - - size = f.Rand.Intn(sizeMax-sizeMin+1) + sizeMin - } - } else { - size, err = strconv.Atoi(fs) - if err != nil { - return err - } - } - } - - // Recursively call r() to fill in the struct - err := r(f, elementT.Type, elementV, fakeTag, size) - if err != nil { - return err - } - } - - return nil -} - -func rPointer(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - elemT := t.Elem() - if v.IsNil() { - nv := reflect.New(elemT).Elem() - err := r(f, elemT, nv, tag, size) - if err != nil { - return err - } - - v.Set(nv.Addr()) - } else { - err := r(f, elemT, v.Elem(), tag, size) - if err != nil { - return err - } - } - - return nil -} - -func rSlice(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - // If you cant even set it dont even try - if !v.CanSet() { - return errors.New("cannot set slice") - } - - // Check if tag exists, if so run custom function - if t.Name() != "" && tag != "" { - // Check to see if custom function works if not continue to normal loop of values - err := rCustom(f, t, v, tag) - if err == nil { - return nil - } - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Slice) - if err != nil { - return err - } - - v.Set(reflect.ValueOf(value)) - return nil - } - - // Grab original size to use if needed for sub arrays - ogSize := size - - // If the value has a len and is less than the size - // use that instead of the requested size - elemLen := v.Len() - if elemLen == 0 && size == -1 { - size = number(f.Rand, 1, 10) - } else if elemLen != 0 && (size == -1 || elemLen < size) { - size = elemLen - } - - // Get the element type - elemT := t.Elem() - - // Loop through the elements length and set based upon the index - for i := 0; i < size; i++ { - nv := reflect.New(elemT) - err := r(f, elemT, nv.Elem(), tag, ogSize) - if err != nil { - return err - } - - // If values are already set fill them up, otherwise append - if elemLen != 0 { - v.Index(i).Set(reflect.Indirect(nv)) - } else { - v.Set(reflect.Append(reflect.Indirect(v), reflect.Indirect(nv))) - } - } - - return nil -} - -func rMap(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { - // If you cant even set it dont even try - if !v.CanSet() { - return errors.New("cannot set slice") - } - - // Check if tag exists, if so run custom function - if tag != "" { - return rCustom(f, t, v, tag) - } else if size > 0 { - // NOOP - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Map) - if err != nil { - return err - } - - v.Set(reflect.ValueOf(value)) - return nil - } - - // Set a size - newSize := size - if newSize == -1 { - newSize = number(f.Rand, 1, 10) - } - - // Create new map based upon map key value type - mapType := reflect.MapOf(t.Key(), t.Elem()) - newMap := reflect.MakeMap(mapType) - - for i := 0; i < newSize; i++ { - // Create new key - mapIndex := reflect.New(t.Key()) - err := r(f, t.Key(), mapIndex.Elem(), "", -1) - if err != nil { - return err - } - - // Create new value - mapValue := reflect.New(t.Elem()) - err = r(f, t.Elem(), mapValue.Elem(), "", -1) - if err != nil { - return err - } - - newMap.SetMapIndex(mapIndex.Elem(), mapValue.Elem()) - } - - // Set newMap into struct field - if t.Kind() == reflect.Ptr { - v.Set(newMap.Elem()) - } else { - v.Set(newMap) - } - - return nil -} - -func rString(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - if tag != "" { - v.SetString(generate(f.Rand, tag)) - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.String) - if err != nil { - return err - } - - valueStr, ok := value.(string) - if !ok { - return errors.New("call to Fake method did not return a string") - } - v.SetString(valueStr) - } else { - v.SetString(generate(f.Rand, strings.Repeat("?", number(f.Rand, 4, 10)))) - } - - return nil -} - -func rInt(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - if tag != "" { - i, err := strconv.ParseInt(generate(f.Rand, tag), 10, 64) - if err != nil { - return err - } - - v.SetInt(i) - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64) - if err != nil { - return err - } - - switch i := value.(type) { - case int: - v.SetInt(int64(i)) - case int8: - v.SetInt(int64(i)) - case int16: - v.SetInt(int64(i)) - case int32: - v.SetInt(int64(i)) - case int64: - v.SetInt(int64(i)) - default: - return errors.New("call to Fake method did not return an integer") - } - } else { - // If no tag or error converting to int, set with random value - switch t.Kind() { - case reflect.Int: - v.SetInt(int64Func(f.Rand)) - case reflect.Int8: - v.SetInt(int64(int8Func(f.Rand))) - case reflect.Int16: - v.SetInt(int64(int16Func(f.Rand))) - case reflect.Int32: - v.SetInt(int64(int32Func(f.Rand))) - case reflect.Int64: - v.SetInt(int64Func(f.Rand)) - } - } - - return nil -} - -func rUint(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - if tag != "" { - u, err := strconv.ParseUint(generate(f.Rand, tag), 10, 64) - if err != nil { - return err - } - - v.SetUint(u) - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64) - if err != nil { - return err - } - - switch i := value.(type) { - case uint: - v.SetUint(uint64(i)) - case uint8: - v.SetUint(uint64(i)) - case uint16: - v.SetUint(uint64(i)) - case uint32: - v.SetUint(uint64(i)) - case uint64: - v.SetUint(uint64(i)) - default: - return errors.New("call to Fake method did not return an unsigned integer") - } - } else { - // If no tag or error converting to uint, set with random value - switch t.Kind() { - case reflect.Uint: - v.SetUint(uint64Func(f.Rand)) - case reflect.Uint8: - v.SetUint(uint64(uint8Func(f.Rand))) - case reflect.Uint16: - v.SetUint(uint64(uint16Func(f.Rand))) - case reflect.Uint32: - v.SetUint(uint64(uint32Func(f.Rand))) - case reflect.Uint64: - v.SetUint(uint64Func(f.Rand)) - } - } - - return nil -} - -func rFloat(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - if tag != "" { - f, err := strconv.ParseFloat(generate(f.Rand, tag), 64) - if err != nil { - return err - } - - v.SetFloat(f) - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Float32, reflect.Float64) - if err != nil { - return err - } - - switch i := value.(type) { - case float32: - v.SetFloat(float64(i)) - case float64: - v.SetFloat(float64(i)) - default: - return errors.New("call to Fake method did not return a float") - } - } else { - // If no tag or error converting to float, set with random value - switch t.Kind() { - case reflect.Float64: - v.SetFloat(float64Func(f.Rand)) - case reflect.Float32: - v.SetFloat(float64(float32Func(f.Rand))) - } - } - - return nil -} - -func rBool(f *Faker, t reflect.Type, v reflect.Value, tag string) error { - if tag != "" { - b, err := strconv.ParseBool(generate(f.Rand, tag)) - if err != nil { - return err - } - - v.SetBool(b) - } else if isFakeable(t) { - value, err := callFake(f, v, reflect.Bool) - if err != nil { - return err - } - - switch i := value.(type) { - case bool: - v.SetBool(bool(i)) - default: - return errors.New("call to Fake method did not return a boolean") - } - } else { - // If no tag or error converting to boolean, set with random value - v.SetBool(boolFunc(f.Rand)) - } - - return nil -} - -// rTime will set a time.Time field the best it can from either the default date tag or from the generate tag -func rTime(f *Faker, t reflect.StructField, v reflect.Value, tag string) error { - if tag != "" { - // Generate time - timeOutput := generate(f.Rand, tag) - - // Check to see if timeOutput has monotonic clock reading - // if so, remove it. This is because time.Parse() does not - // support parsing the monotonic clock reading - if strings.Contains(timeOutput, " m=") { - timeOutput = strings.Split(timeOutput, " m=")[0] - } - - // Check to see if they are passing in a format to parse the time - timeFormat, timeFormatOK := t.Tag.Lookup("format") - if timeFormatOK { - timeFormat = javaDateFormatToGolangDateFormat(timeFormat) - } else { - // If tag == "{date}" use time.RFC3339 - // They are attempting to use the default date lookup - if tag == "{date}" { - timeFormat = time.RFC3339 - } else { - // Default format of time.Now().String() - timeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" - } - } - - // If output is larger than format cut the output - // This helps us avoid errors from time.Parse - if len(timeOutput) > len(timeFormat) { - timeOutput = timeOutput[:len(timeFormat)] - } - - // Attempt to parse the time - timeStruct, err := time.Parse(timeFormat, timeOutput) - if err != nil { - return err - } - - v.Set(reflect.ValueOf(timeStruct)) - return nil - } - - v.Set(reflect.ValueOf(date(f.Rand))) - return nil -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/template.go b/vendor/github.com/brianvoe/gofakeit/v6/template.go deleted file mode 100644 index 2eb02cb473e..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/template.go +++ /dev/null @@ -1,385 +0,0 @@ -package gofakeit - -import ( - "bytes" - "fmt" - "strconv" - "time" - - "math/rand" - "reflect" - "strings" - "text/template" -) - -// TemplateOptions defines values needed for template document generation -type TemplateOptions struct { - Funcs template.FuncMap `fake:"-"` - Data any `json:"data" xml:"data" fake:"-"` -} - -// Template generates an document based on the the supplied template -func Template(template string, co *TemplateOptions) (string, error) { - if co == nil { - co = &TemplateOptions{} - globalFaker.Struct(co) - } - return templateFunc(template, templateFuncMap(globalFaker.Rand, &co.Funcs), co) -} - -// Template generates an document based on the the supplied template -func (f *Faker) Template(template string, co *TemplateOptions) (string, error) { - if co == nil { - co = &TemplateOptions{} - f.Struct(co) - } - return templateFunc(template, templateFuncMap(f.Rand, &co.Funcs), co) -} - -// MarkdownOptions defines values needed for markdown document generation -type MarkdownOptions struct { - SectionsCount int `json:"sections" xml:"sections" fake:"{number:1,10}"` -} - -// Template for Markdown -const templateMarkdown = ` -{{$repo := Gamertag}} -{{$language := RandomString (SliceString "go" "python" "javascript")}} -{{$username := Gamertag}} -{{$weightedSlice := SliceAny "github.com" "gitlab.com" "bitbucket.org"}} -{{$weightedWeights := SliceF32 5 1 1}} -{{$domain := Weighted $weightedSlice $weightedWeights}} -{{$action := RandomString (SliceString "process" "run" "execute" "perform" "handle")}} -{{$usage := RandomString (SliceString "whimsical story" "quirky message" "playful alert" "funny request" "lighthearted command")}} -{{$result := RandomString (SliceString "success" "error" "unknown" "completed" "failed" "finished" "in progress" "terminated")}} - -# {{$repo}} - -*Author: {{FirstName}} {{LastName}}* - -{{Paragraph 2 5 7 "\n\n"}} - -## Table of Contents -- [Installation](#installation) -- [Usage](#usage) -- [License](#license) - -## Installation -{{if eq $language "go"}}'''go -go get {{$domain}}/{{$username}}/{{$repo}} -'''{{else if eq $language "python"}}'''bash -pip install {{$repo}} -'''{{else if eq $language "javascript"}}'''js -npm install {{$repo}} -'''{{end}} - -## Usage -{{if eq $language "go"}}'''go -result := {{$repo}}.{{$action}}("{{ToLower $usage}}") -fmt.Println("{{ToLower $repo}} result:", "{{ToLower $result}}") -'''{{else if eq $language "python"}}'''python -result = {{ToLower $repo}}.{{$action}}("{{ToLower $usage}}") -print("{{ToLower $repo}} result:", "{{ToLower $result}}") -'''{{else if eq $language "javascript"}}'''javascript -const result = {{ToLower $repo}}.{{$action}}("{{ToLower $usage}}"); -console.log("{{ToLower $repo}} result:", "{{ToLower $result}}"); -'''{{end}} - -## License -{{RandomString (SliceString "MIT" "Apache 2.0" "GPL-3.0" "BSD-3-Clause" "ISC")}} -` - -// Markdown will return a single random Markdown template document -func Markdown(co *MarkdownOptions) (string, error) { - if co == nil { - co = &MarkdownOptions{} - globalFaker.Struct(co) - } - return templateFunc(templateMarkdown, templateFuncMap(globalFaker.Rand, nil), co) -} - -// Markdown will return a single random Markdown template document -func (f *Faker) Markdown(co *MarkdownOptions) (string, error) { - if co == nil { - co = &MarkdownOptions{} - f.Struct(co) - } - return templateFunc(templateMarkdown, templateFuncMap(f.Rand, nil), co) -} - -// EmailOptions defines values needed for email document generation -type EmailOptions struct { - SectionsCount int `json:"sections" xml:"sections" fake:"{number:1,10}"` -} - -// Template for email text -const templateEmail = ` -Subject: {{RandomString (SliceString "Greetings" "Hello" "Hi")}} from {{FirstName}}! - -Dear {{LastName}}, - -{{RandomString (SliceString "Greetings!" "Hello there!" "Hi, how are you?")}} {{RandomString (SliceString "How's everything going?" "I hope your day is going well." "Sending positive vibes your way.")}} - -{{RandomString (SliceString "I trust this email finds you well." "I hope you're doing great." "Hoping this message reaches you in good spirits.")}} {{RandomString (SliceString "Wishing you a fantastic day!" "May your week be filled with joy." "Sending good vibes your way.")}} - -{{Paragraph 3 5 10 "\n\n"}} - -{{RandomString (SliceString "I would appreciate your thoughts on" "I'm eager to hear your feedback on" "I'm curious to know what you think about")}} it. If you have a moment, please feel free to check out the project on {{RandomString (SliceString "GitHub" "GitLab" "Bitbucket")}} - -{{RandomString (SliceString "Your insights would be invaluable." "I'm eager to hear what you think." "Feel free to share your opinions with me.")}} {{RandomString (SliceString "Looking forward to your feedback!" "Your perspective is highly valued." "Your thoughts matter to me.")}} - -{{RandomString (SliceString "Thank you for your consideration!" "I appreciate your attention to this matter." "Your support means a lot to me.")}} {{RandomString (SliceString "Wishing you a wonderful day!" "Thanks in advance for your time." "Your feedback is greatly appreciated.")}} - -{{RandomString (SliceString "Warm regards" "Best wishes" "Kind regards" "Sincerely" "With gratitude")}} -{{FirstName}} {{LastName}} -{{Email}} -{{PhoneFormatted}} -` - -// EmailText will return a single random text email template document -func EmailText(co *EmailOptions) (string, error) { - if co == nil { - co = &EmailOptions{} - globalFaker.Struct(co) - } - return templateFunc(templateEmail, templateFuncMap(globalFaker.Rand, nil), co) -} - -// EmailText will return a single random text email template document -func (f *Faker) EmailText(co *EmailOptions) (string, error) { - if co == nil { - co = &EmailOptions{} - f.Struct(co) - } - return templateFunc(templateEmail, templateFuncMap(f.Rand, nil), co) -} - -// functions that wont work with template engine -var templateExclusion = []string{ - "RandomMapKey", - "SQL", - "Template", -} - -// Build the template.FuncMap for the template engine -func templateFuncMap(r *rand.Rand, fm *template.FuncMap) *template.FuncMap { - - // create a new function map - funcMap := template.FuncMap{} - - // build the function map from a faker using their rand - f := &Faker{Rand: r} - - v := reflect.ValueOf(f) - - // loop through the methods - for i := 0; i < v.NumMethod(); i++ { - // check if the method is in the exclusion list - if stringInSlice(v.Type().Method(i).Name, templateExclusion) { - continue - } - - // Check if method has return values - // If not don't add to function map - if v.Type().Method(i).Type.NumOut() == 0 { - continue - } - - // add the method to the function map - funcMap[v.Type().Method(i).Name] = v.Method(i).Interface() - } - - // make string upper case - funcMap["ToUpper"] = strings.ToUpper - - // make string lower case - funcMap["ToLower"] = strings.ToLower - - // make string title case - funcMap["IntRange"] = func(start, end int) []int { - n := end - start + 1 - result := make([]int, n) - for i := 0; i < n; i++ { - result[i] = start + i - } - return result - } - - // enable passing any type to return a string - funcMap["ToInt"] = func(args any) int { - switch v := args.(type) { - case string: - i, err := strconv.Atoi(v) - if err != nil { - return 0 - } - return i - case float64: - return int(v) - case float32: - return int(v) - case int: - return v - - // Anything else return 0 - default: - return 0 - } - } - - // ensable passing any type to return a string - funcMap["ToString"] = func(args any) string { - switch v := args.(type) { - case string: - return v - case float64: - return strconv.FormatFloat(v, 'f', -1, 64) - case float32: - return strconv.FormatFloat(float64(v), 'f', -1, 32) - case int: - return strconv.Itoa(v) - - // Anything else return empty string - default: - return "" - } - } - - // function to convert string to date time - funcMap["ToDate"] = func(dateString string) time.Time { - date, err := time.Parse("2006-01-02", dateString) - if err != nil { - return time.Now() - } - return date - } - - // enable passing slice of interface to functions - funcMap["SliceAny"] = func(args ...any) []any { - return args - } - - // enable passing slice of string to functions - funcMap["SliceString"] = func(args ...string) []string { - return args - } - - // enable passing slice of uint to functions - funcMap["SliceUInt"] = func(args ...uint) []uint { - return args - } - - // enable passing slice of int to functions - funcMap["SliceInt"] = func(args ...int) []int { - return args - } - - // enable passing slice of int to functions - funcMap["SliceF32"] = func(args ...float32) []float32 { - return args - } - - return &funcMap -} - -// function to build the function map for the template engine from the global faker -func templateFunc(temp string, funcs *template.FuncMap, data any) (string, error) { - if temp == "" { - return "", fmt.Errorf("template parameter is empty") - } - - // Create a new template and parse - template_gen, err := template.New("CodeRun").Funcs(*funcs).Parse(temp) - if err != nil { - return "", err - } - - b := &bytes.Buffer{} - err = template_gen.Execute(b, data) - if err != nil { - return "", err - } - - // Return the result - return strings.ReplaceAll(b.String(), "\\n", "\n"), nil - -} - -// addTemplateLookup will add the template functions to the global lookup -func addTemplateLookup() { - AddFuncLookup("template", Info{ - Display: "Template", - Category: "template", - Description: "Generates document from template", - Example: ` - {{Firstname}} {{Lastname}} - - // output - Markus Moen - `, - Output: "string", - ContentType: "text/plain", - Params: []Param{ - {Field: "template", Display: "Template", Type: "string", Description: "Golang template to generate the document from"}, - {Field: "data", Display: "Custom Data", Type: "string", Default: "", Optional: true, Description: "Custom data to pass to the template"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - tpl, err := info.GetString(m, "template") - if err != nil { - return nil, err - } - - data, err := info.GetAny(m, "data") - if err != nil { - return nil, err - } - - templateOut, err := templateFunc(tpl, templateFuncMap(r, nil), &TemplateOptions{Data: data}) - if err != nil { - return nil, err - } - - return templateOut, nil - }, - }) - - AddFuncLookup("markdown", Info{ - Display: "Random markdown document", - Category: "template", - Description: "Generates random markdown document", - Example: "", - Output: "string", - Params: []Param{ - {Field: "sections_count", Display: "Body Sections", Type: "int", Default: "1", Optional: true, Description: "Number of content sections to generate"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - sections, err := info.GetInt(m, "sections_count") - if err != nil { - sections = 1 - } - - template_result, err := templateFunc(templateMarkdown, templateFuncMap(r, nil), &MarkdownOptions{SectionsCount: sections}) - return string(template_result), err - }, - }) - - AddFuncLookup("email_text", Info{ - Display: "Random text email Document", - Category: "template", - Description: "Generates random email document.", - Example: "", - Output: "string", - Params: []Param{ - {Field: "sections_count", Display: "Body Sections", Type: "int", Default: "1", Optional: true, Description: "Number of content sections to generate"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - sections, err := info.GetInt(m, "sections_count") - if err != nil { - sections = 1 - } - - template_result, err := templateFunc(templateEmail, templateFuncMap(r, nil), &EmailOptions{SectionsCount: sections}) - return string(template_result), err - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/time.go b/vendor/github.com/brianvoe/gofakeit/v6/time.go deleted file mode 100644 index 3d580d3ae16..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/time.go +++ /dev/null @@ -1,468 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strconv" - "strings" - "time" -) - -// Date will generate a random time.Time struct -func Date() time.Time { return date(globalFaker.Rand) } - -// Date will generate a random time.Time struct -func (f *Faker) Date() time.Time { return date(f.Rand) } - -func date(r *rand.Rand) time.Time { - return time.Date(year(r), time.Month(month(r)), day(r), hour(r), minute(r), second(r), nanoSecond(r), time.UTC) -} - -// FutureDate will generate a random future time.Time struct -func FutureDate() time.Time { return futureDate(globalFaker.Rand) } - -// FutureDate will generate a random future time.Time struct -func (f *Faker) FutureDate() time.Time { return futureDate(f.Rand) } - -func futureDate(r *rand.Rand) time.Time { - return time.Now().Add(time.Hour * time.Duration(number(r, 1, 12))) -} - -// DateRange will generate a random time.Time struct between a start and end date -func DateRange(start, end time.Time) time.Time { return dateRange(globalFaker.Rand, start, end) } - -// DateRange will generate a random time.Time struct between a start and end date -func (f *Faker) DateRange(start, end time.Time) time.Time { return dateRange(f.Rand, start, end) } - -func dateRange(r *rand.Rand, start time.Time, end time.Time) time.Time { - return time.Unix(0, int64(number(r, int(start.UnixNano()), int(end.UnixNano())))).UTC() -} - -// NanoSecond will generate a random nano second -func NanoSecond() int { return nanoSecond(globalFaker.Rand) } - -// NanoSecond will generate a random nano second -func (f *Faker) NanoSecond() int { return nanoSecond(f.Rand) } - -func nanoSecond(r *rand.Rand) int { return number(r, 0, 999999999) } - -// Second will generate a random second -func Second() int { return second(globalFaker.Rand) } - -// Second will generate a random second -func (f *Faker) Second() int { return second(f.Rand) } - -func second(r *rand.Rand) int { return number(r, 0, 59) } - -// Minute will generate a random minute -func Minute() int { return minute(globalFaker.Rand) } - -// Minute will generate a random minute -func (f *Faker) Minute() int { return minute(f.Rand) } - -func minute(r *rand.Rand) int { return number(r, 0, 59) } - -// Hour will generate a random hour - in military time -func Hour() int { return hour(globalFaker.Rand) } - -// Hour will generate a random hour - in military time -func (f *Faker) Hour() int { return hour(f.Rand) } - -func hour(r *rand.Rand) int { return number(r, 0, 23) } - -// Day will generate a random day between 1 - 31 -func Day() int { return day(globalFaker.Rand) } - -// Day will generate a random day between 1 - 31 -func (f *Faker) Day() int { return day(f.Rand) } - -func day(r *rand.Rand) int { return number(r, 1, 31) } - -// WeekDay will generate a random weekday string (Monday-Sunday) -func WeekDay() string { return weekDay(globalFaker.Rand) } - -// WeekDay will generate a random weekday string (Monday-Sunday) -func (f *Faker) WeekDay() string { return weekDay(f.Rand) } - -func weekDay(r *rand.Rand) string { return time.Weekday(number(r, 0, 6)).String() } - -// Month will generate a random month int -func Month() int { return month(globalFaker.Rand) } - -// Month will generate a random month int -func (f *Faker) Month() int { return month(f.Rand) } - -func month(r *rand.Rand) int { return number(r, 1, 12) } - -// MonthString will generate a random month string -func MonthString() string { return monthString(globalFaker.Rand) } - -// MonthString will generate a random month string -func (f *Faker) MonthString() string { return monthString(f.Rand) } - -func monthString(r *rand.Rand) string { return time.Month(number(r, 1, 12)).String() } - -// Year will generate a random year between 1900 - current year -func Year() int { return year(globalFaker.Rand) } - -// Year will generate a random year between 1900 - current year -func (f *Faker) Year() int { return year(f.Rand) } - -func year(r *rand.Rand) int { return number(r, 1900, time.Now().Year()) } - -// TimeZone will select a random timezone string -func TimeZone() string { return timeZone(globalFaker.Rand) } - -// TimeZone will select a random timezone string -func (f *Faker) TimeZone() string { return timeZone(f.Rand) } - -func timeZone(r *rand.Rand) string { return getRandValue(r, []string{"timezone", "text"}) } - -// TimeZoneFull will select a random full timezone string -func TimeZoneFull() string { return timeZoneFull(globalFaker.Rand) } - -// TimeZoneFull will select a random full timezone string -func (f *Faker) TimeZoneFull() string { return timeZoneFull(f.Rand) } - -func timeZoneFull(r *rand.Rand) string { return getRandValue(r, []string{"timezone", "full"}) } - -// TimeZoneRegion will select a random region style timezone string, e.g. "America/Chicago" -func TimeZoneRegion() string { return timeZoneRegion(globalFaker.Rand) } - -// TimeZoneRegion will select a random region style timezone string, e.g. "America/Chicago" -func (f *Faker) TimeZoneRegion() string { return timeZoneRegion(f.Rand) } - -func timeZoneRegion(r *rand.Rand) string { return getRandValue(r, []string{"timezone", "region"}) } - -// TimeZoneAbv will select a random timezone abbreviation string -func TimeZoneAbv() string { return timeZoneAbv(globalFaker.Rand) } - -// TimeZoneAbv will select a random timezone abbreviation string -func (f *Faker) TimeZoneAbv() string { return timeZoneAbv(f.Rand) } - -func timeZoneAbv(r *rand.Rand) string { return getRandValue(r, []string{"timezone", "abr"}) } - -// TimeZoneOffset will select a random timezone offset -func TimeZoneOffset() float32 { return timeZoneOffset(globalFaker.Rand) } - -// TimeZoneOffset will select a random timezone offset -func (f *Faker) TimeZoneOffset() float32 { return timeZoneOffset(f.Rand) } - -func timeZoneOffset(r *rand.Rand) float32 { - value, _ := strconv.ParseFloat(getRandValue(r, []string{"timezone", "offset"}), 32) - return float32(value) -} - -// javaDateFormatToGolangDateFormat converts java date format into go date format -func javaDateFormatToGolangDateFormat(format string) string { - format = strings.Replace(format, "ddd", "_2", -1) - format = strings.Replace(format, "dd", "02", -1) - format = strings.Replace(format, "d", "2", -1) - - format = strings.Replace(format, "HH", "15", -1) - - format = strings.Replace(format, "hh", "03", -1) - format = strings.Replace(format, "h", "3", -1) - - format = strings.Replace(format, "mm", "04", -1) - format = strings.Replace(format, "m", "4", -1) - - format = strings.Replace(format, "ss", "05", -1) - format = strings.Replace(format, "s", "5", -1) - - format = strings.Replace(format, "yyyy", "2006", -1) - format = strings.Replace(format, "yy", "06", -1) - format = strings.Replace(format, "y", "06", -1) - - format = strings.Replace(format, "SSS", "000", -1) - - format = strings.Replace(format, "a", "pm", -1) - format = strings.Replace(format, "aa", "PM", -1) - - format = strings.Replace(format, "MMMM", "January", -1) - format = strings.Replace(format, "MMM", "Jan", -1) - format = strings.Replace(format, "MM", "01", -1) - format = strings.Replace(format, "M", "1", -1) - - format = strings.Replace(format, "ZZ", "-0700", -1) - - if !strings.Contains(format, "Z07") { - format = strings.Replace(format, "Z", "-07", -1) - } - - format = strings.Replace(format, "zz:zz", "Z07:00", -1) - format = strings.Replace(format, "zzzz", "Z0700", -1) - format = strings.Replace(format, "z", "MST", -1) - - format = strings.Replace(format, "EEEE", "Monday", -1) - format = strings.Replace(format, "E", "Mon", -1) - - return format -} - -func addDateTimeLookup() { - AddFuncLookup("date", Info{ - Display: "Date", - Category: "time", - Description: "Random date", - Example: "2006-01-02T15:04:05Z07:00", - Output: "string", - Params: []Param{ - { - Field: "format", - Display: "Format", - Type: "string", - Default: "RFC3339", - Options: []string{"ANSIC", "UnixDate", "RubyDate", "RFC822", "RFC822Z", "RFC850", "RFC1123", "RFC1123Z", "RFC3339", "RFC3339Nano"}, - Description: "Date time string format output. You may also use golang time format or java time format", - }, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - format, err := info.GetString(m, "format") - if err != nil { - return nil, err - } - - switch format { - case "ANSIC": - return Date().Format(time.ANSIC), nil - case "UnixDate": - return Date().Format(time.UnixDate), nil - case "RubyDate": - return Date().Format(time.RubyDate), nil - case "RFC822": - return Date().Format(time.RFC822), nil - case "RFC822Z": - return Date().Format(time.RFC822Z), nil - case "RFC850": - return Date().Format(time.RFC850), nil - case "RFC1123": - return Date().Format(time.RFC1123), nil - case "RFC1123Z": - return Date().Format(time.RFC1123Z), nil - case "RFC3339": - return Date().Format(time.RFC3339), nil - case "RFC3339Nano": - return Date().Format(time.RFC3339Nano), nil - default: - if format == "" { - return Date().Format(time.RFC3339), nil - } - - return Date().Format(javaDateFormatToGolangDateFormat(format)), nil - } - }, - }) - - AddFuncLookup("daterange", Info{ - Display: "DateRange", - Category: "time", - Description: "Random date between two ranges", - Example: "2006-01-02T15:04:05Z07:00", - Output: "string", - Params: []Param{ - { - Field: "startdate", - Display: "Start Date", - Type: "string", - Default: "1970-01-01", - Description: "Start date time string", - }, - { - Field: "enddate", - Display: "End Date", - Type: "string", - Default: time.Now().Format("2006-01-02"), - Description: "End date time string", - }, - { - Field: "format", - Display: "Format", - Type: "string", - Default: "yyyy-MM-dd", - Description: "Date time string format", - }, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - format, err := info.GetString(m, "format") - if err != nil { - return nil, err - } - format = javaDateFormatToGolangDateFormat(format) - - startdate, err := info.GetString(m, "startdate") - if err != nil { - return nil, err - } - startDateTime, err := time.Parse(format, startdate) - if err != nil { - return nil, err - } - - enddate, err := info.GetString(m, "enddate") - if err != nil { - return nil, err - } - endDateTime, err := time.Parse(format, enddate) - if err != nil { - return nil, err - } - - return DateRange(startDateTime, endDateTime).Format(format), nil - }, - }) - - AddFuncLookup("nanosecond", Info{ - Display: "Nanosecond", - Category: "time", - Description: "Random nanosecond", - Example: "196446360", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nanoSecond(r), nil - }, - }) - - AddFuncLookup("second", Info{ - Display: "Second", - Category: "time", - Description: "Random second", - Example: "43", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return second(r), nil - }, - }) - - AddFuncLookup("minute", Info{ - Display: "Minute", - Category: "time", - Description: "Random minute", - Example: "34", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return minute(r), nil - }, - }) - - AddFuncLookup("hour", Info{ - Display: "Hour", - Category: "time", - Description: "Random hour", - Example: "8", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return hour(r), nil - }, - }) - - AddFuncLookup("day", Info{ - Display: "Day", - Category: "time", - Description: "Random day", - Example: "12", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return day(r), nil - }, - }) - - AddFuncLookup("weekday", Info{ - Display: "Weekday", - Category: "time", - Description: "Random week day", - Example: "Friday", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return weekDay(r), nil - }, - }) - - AddFuncLookup("month", Info{ - Display: "Month", - Category: "time", - Description: "Random month", - Example: "1", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return month(r), nil - }, - }) - - AddFuncLookup("monthstring", Info{ - Display: "Month String", - Category: "time", - Description: "Random month in string output", - Example: "September", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return monthString(r), nil - }, - }) - - AddFuncLookup("year", Info{ - Display: "Year", - Category: "time", - Description: "Random year", - Example: "1900", - Output: "int", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return year(r), nil - }, - }) - - AddFuncLookup("timezone", Info{ - Display: "Timezone", - Category: "time", - Description: "Random timezone", - Example: "Kaliningrad Standard Time", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return timeZone(r), nil - }, - }) - - AddFuncLookup("timezoneabv", Info{ - Display: "Timezone Abbreviation", - Category: "time", - Description: "Random abbreviated timezone", - Example: "KST", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return timeZoneAbv(r), nil - }, - }) - - AddFuncLookup("timezonefull", Info{ - Display: "Timezone Full", - Category: "time", - Description: "Random full timezone", - Example: "(UTC+03:00) Kaliningrad, Minsk", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return timeZoneFull(r), nil - }, - }) - - AddFuncLookup("timezoneoffset", Info{ - Display: "Timezone Offset", - Category: "time", - Description: "Random timezone offset", - Example: "3", - Output: "float32", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return timeZoneOffset(r), nil - }, - }) - - AddFuncLookup("timezoneregion", Info{ - Display: "Timezone Region", - Category: "time", - Description: "Random region timezone", - Example: "America/Alaska", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return timeZoneRegion(r), nil - }, - }) - -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/weighted.go b/vendor/github.com/brianvoe/gofakeit/v6/weighted.go deleted file mode 100644 index c04fa6bd3be..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/weighted.go +++ /dev/null @@ -1,107 +0,0 @@ -package gofakeit - -import ( - "errors" - "math/rand" -) - -// Weighted will take in an array of options and weights and return a random selection based upon its indexed weight -func Weighted(options []any, weights []float32) (any, error) { - return weighted(globalFaker.Rand, options, weights) -} - -// Weighted will take in an array of options and weights and return a random selection based upon its indexed weight -func (f *Faker) Weighted(options []any, weights []float32) (any, error) { - return weighted(f.Rand, options, weights) -} - -// Weighted will take in an array of options and weights and return a random selection based upon its indexed weight -func weighted(r *rand.Rand, options []any, weights []float32) (any, error) { - ol := len(options) - wl := len(weights) - - // If options length is 1 just return it back - if ol == 1 { - return options[0], nil - } - - // Make sure they are passing in options - if ol == 0 { - return nil, errors.New("didnt pass options") - } - - // Make sure they are passing in weights - if wl == 0 { - return nil, errors.New("didnt pass weights") - } - - // Make sure they are passing in the same length - if ol != wl { - return nil, errors.New("options and weights need to be the same length") - } - - // Compute the discrete cumulative density from the sum of the weights - cdf := make([]float32, wl) - var sumOfWeights float32 = 0.0 - for i, weight := range weights { - if i > 0 { - cdf[i] = cdf[i-1] + weight - sumOfWeights += weight - continue - } - - cdf[i] = weight - sumOfWeights += weight - } - - // Get rand value from a multple of sumOfWeights - randSumOfWeights := r.Float32() * sumOfWeights - - var l int = 0 - var h int = wl - 1 - for l <= h { - m := l + (h-l)/2 - if randSumOfWeights <= cdf[m] { - if m == 0 || (m > 0 && randSumOfWeights > cdf[m-1]) { - return options[m], nil - } - h = m - 1 - } else { - l = m + 1 - } - } - - return nil, errors.New("end of function") -} - -func addWeightedLookup() { - AddFuncLookup("weighted", Info{ - Display: "Weighted", - Category: "misc", - Description: "Randomly select a given option based upon an equal amount of weights", - Example: "[hello, 2, 6.9],[1, 2, 3] => 6.9", - Output: "any", - Params: []Param{ - {Field: "options", Display: "Options", Type: "[]string", Description: "Array of any values"}, - {Field: "weights", Display: "Weights", Type: "[]float", Description: "Array of weights"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - options, err := info.GetStringArray(m, "options") - if err != nil { - return nil, err - } - - weights, err := info.GetFloat32Array(m, "weights") - if err != nil { - return nil, err - } - - optionsInterface := make([]any, len(options)) - for i, o := range options { - optionsInterface[i] = o - } - - return weighted(r, optionsInterface, weights) - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go b/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go deleted file mode 100644 index 01f2c503b0a..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go +++ /dev/null @@ -1,182 +0,0 @@ -package gofakeit - -import "math/rand" - -// Adjective will generate a random adjective -func Adjective() string { return adjective(globalFaker.Rand) } - -// Adjective will generate a random adjective -func (f *Faker) Adjective() string { return adjective(f.Rand) } - -func adjective(r *rand.Rand) string { - var adjType = map[int]string{ - 0: "adjective_descriptive", - 1: "adjective_quantitative", - 2: "adjective_proper", - 3: "adjective_demonstrative", - 4: "adjective_possessive", - 5: "adjective_interrogative", - 6: "adjective_indefinite", - } - return getRandValue(r, []string{"word", adjType[number(r, 0, 6)]}) -} - -// AdjectiveDescriptive will generate a random descriptive adjective -func AdjectiveDescriptive() string { return adjectiveDescriptive(globalFaker.Rand) } - -// AdjectiveDescriptive will generate a random descriptive adjective -func (f *Faker) AdjectiveDescriptive() string { return adjectiveDescriptive(f.Rand) } - -func adjectiveDescriptive(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_descriptive"}) -} - -// AdjectiveQuantitative will generate a random quantitative adjective -func AdjectiveQuantitative() string { return adjectiveQuantitative(globalFaker.Rand) } - -// AdjectiveQuantitative will generate a random quantitative adjective -func (f *Faker) AdjectiveQuantitative() string { return adjectiveQuantitative(f.Rand) } - -func adjectiveQuantitative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_quantitative"}) -} - -// AdjectiveProper will generate a random proper adjective -func AdjectiveProper() string { return adjectiveProper(globalFaker.Rand) } - -// AdjectiveProper will generate a random proper adjective -func (f *Faker) AdjectiveProper() string { return adjectiveProper(f.Rand) } - -func adjectiveProper(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_proper"}) -} - -// AdjectiveDemonstrative will generate a random demonstrative adjective -func AdjectiveDemonstrative() string { return adjectiveDemonstrative(globalFaker.Rand) } - -// AdjectiveDemonstrative will generate a random demonstrative adjective -func (f *Faker) AdjectiveDemonstrative() string { return adjectiveDemonstrative(f.Rand) } - -func adjectiveDemonstrative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_demonstrative"}) -} - -// AdjectivePossessive will generate a random possessive adjective -func AdjectivePossessive() string { return adjectivePossessive(globalFaker.Rand) } - -// AdjectivePossessive will generate a random possessive adjective -func (f *Faker) AdjectivePossessive() string { return adjectivePossessive(f.Rand) } - -func adjectivePossessive(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_possessive"}) -} - -// AdjectiveInterrogative will generate a random interrogative adjective -func AdjectiveInterrogative() string { return adjectiveInterrogative(globalFaker.Rand) } - -// AdjectiveInterrogative will generate a random interrogative adjective -func (f *Faker) AdjectiveInterrogative() string { return adjectiveInterrogative(f.Rand) } - -func adjectiveInterrogative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_interrogative"}) -} - -// AdjectiveIndefinite will generate a random indefinite adjective -func AdjectiveIndefinite() string { return adjectiveIndefinite(globalFaker.Rand) } - -// AdjectiveIndefinite will generate a random indefinite adjective -func (f *Faker) AdjectiveIndefinite() string { return adjectiveIndefinite(f.Rand) } - -func adjectiveIndefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adjective_indefinite"}) -} - -func addWordAdjectiveLookup() { - AddFuncLookup("adjective", Info{ - Display: "Adjective", - Category: "word", - Description: "Random adjective", - Example: "genuine", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjective(r), nil - }, - }) - - AddFuncLookup("adjectivedescriptive", Info{ - Display: "Descriptive Adjective", - Category: "word", - Description: "Random descriptive adjective", - Example: "brave", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveDescriptive(r), nil - }, - }) - - AddFuncLookup("adjectivequantitative", Info{ - Display: "Quantitative Adjective", - Category: "word", - Description: "Random quantitative adjective", - Example: "a little", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveQuantitative(r), nil - }, - }) - - AddFuncLookup("adjectiveproper", Info{ - Display: "Proper Adjective", - Category: "word", - Description: "Random proper adjective", - Example: "Afghan", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveProper(r), nil - }, - }) - - AddFuncLookup("adjectivedemonstrative", Info{ - Display: "Demonstrative Adjective", - Category: "word", - Description: "Random demonstrative adjective", - Example: "this", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveDemonstrative(r), nil - }, - }) - - AddFuncLookup("adjectivepossessive", Info{ - Display: "Possessive Adjective", - Category: "word", - Description: "Random possessive adjective", - Example: "my", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectivePossessive(r), nil - }, - }) - - AddFuncLookup("adjectiveinterrogative", Info{ - Display: "Interrogative Adjective", - Category: "word", - Description: "Random interrogative adjective", - Example: "what", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveInterrogative(r), nil - }, - }) - - AddFuncLookup("adjectiveindefinite", Info{ - Display: "Indefinite Adjective", - Category: "word", - Description: "Random indefinite adjective", - Example: "few", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adjectiveIndefinite(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go b/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go deleted file mode 100644 index e5456db991e..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go +++ /dev/null @@ -1,176 +0,0 @@ -package gofakeit - -import "math/rand" - -// Adverb will generate a random adverb -func Adverb() string { return adverb(globalFaker.Rand) } - -// Adverb will generate a random adverb -func (f *Faker) Adverb() string { return adverb(f.Rand) } - -func adverb(r *rand.Rand) string { - var adverbType = map[int]string{ - 0: "adverb_manner", - 1: "adverb_degree", - 2: "adverb_place", - 3: "adverb_time_definite", - 4: "adverb_time_indefinite", - 5: "adverb_frequency_definite", - 6: "adverb_frequency_indefinite", - } - return getRandValue(r, []string{"word", adverbType[number(r, 0, 6)]}) -} - -// AdverbManner will generate a random manner adverb -func AdverbManner() string { return adverbManner(globalFaker.Rand) } - -// AdverbManner will generate a random manner adverb -func (f *Faker) AdverbManner() string { return adverbManner(f.Rand) } - -func adverbManner(r *rand.Rand) string { return getRandValue(r, []string{"word", "adverb_manner"}) } - -// AdverbDegree will generate a random degree adverb -func AdverbDegree() string { return adverbDegree(globalFaker.Rand) } - -// AdverbDegree will generate a random degree adverb -func (f *Faker) AdverbDegree() string { return adverbDegree(f.Rand) } - -func adverbDegree(r *rand.Rand) string { return getRandValue(r, []string{"word", "adverb_degree"}) } - -// AdverbPlace will generate a random place adverb -func AdverbPlace() string { return adverbPlace(globalFaker.Rand) } - -// AdverbPlace will generate a random place adverb -func (f *Faker) AdverbPlace() string { return adverbPlace(f.Rand) } - -func adverbPlace(r *rand.Rand) string { return getRandValue(r, []string{"word", "adverb_place"}) } - -// AdverbTimeDefinite will generate a random time definite adverb -func AdverbTimeDefinite() string { return adverbTimeDefinite(globalFaker.Rand) } - -// AdverbTimeDefinite will generate a random time definite adverb -func (f *Faker) AdverbTimeDefinite() string { return adverbTimeDefinite(f.Rand) } - -func adverbTimeDefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adverb_time_definite"}) -} - -// AdverbTimeIndefinite will generate a random time indefinite adverb -func AdverbTimeIndefinite() string { return adverbTimeIndefinite(globalFaker.Rand) } - -// AdverbTimeIndefinite will generate a random time indefinite adverb -func (f *Faker) AdverbTimeIndefinite() string { return adverbTimeIndefinite(f.Rand) } - -func adverbTimeIndefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adverb_time_indefinite"}) -} - -// AdverbFrequencyDefinite will generate a random frequency definite adverb -func AdverbFrequencyDefinite() string { return adverbFrequencyDefinite(globalFaker.Rand) } - -// AdverbFrequencyDefinite will generate a random frequency definite adverb -func (f *Faker) AdverbFrequencyDefinite() string { return adverbFrequencyDefinite(f.Rand) } - -func adverbFrequencyDefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adverb_frequency_definite"}) -} - -// AdverbFrequencyIndefinite will generate a random frequency indefinite adverb -func AdverbFrequencyIndefinite() string { return adverbFrequencyIndefinite(globalFaker.Rand) } - -// AdverbFrequencyIndefinite will generate a random frequency indefinite adverb -func (f *Faker) AdverbFrequencyIndefinite() string { return adverbFrequencyIndefinite(f.Rand) } - -func adverbFrequencyIndefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "adverb_frequency_indefinite"}) -} - -func addWordAdverbLookup() { - AddFuncLookup("adverb", Info{ - Display: "Adverb", - Category: "word", - Description: "Random adverb", - Example: "smoothly", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverb(r), nil - }, - }) - - AddFuncLookup("adverbmanner", Info{ - Display: "Adverb Manner", - Category: "word", - Description: "Random manner adverb", - Example: "stupidly", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbManner(r), nil - }, - }) - - AddFuncLookup("adverbdegree", Info{ - Display: "Adverb Degree", - Category: "word", - Description: "Random degree adverb", - Example: "intensely", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbDegree(r), nil - }, - }) - - AddFuncLookup("adverbplace", Info{ - Display: "Adverb Place", - Category: "word", - Description: "Random place adverb", - Example: "east", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbPlace(r), nil - }, - }) - - AddFuncLookup("adverbtimedefinite", Info{ - Display: "Adverb Time Definite", - Category: "word", - Description: "Random time definite adverb", - Example: "now", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbTimeDefinite(r), nil - }, - }) - - AddFuncLookup("adverbtimeindefinite", Info{ - Display: "Adverb Time Indefinite", - Category: "word", - Description: "Random time indefinite adverb", - Example: "already", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbTimeIndefinite(r), nil - }, - }) - - AddFuncLookup("adverbfrequencydefinite", Info{ - Display: "Adverb Frequency Definite", - Category: "word", - Description: "Random frequency definite adverb", - Example: "hourly", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbFrequencyDefinite(r), nil - }, - }) - - AddFuncLookup("adverbfrequencyindefinite", Info{ - Display: "Adverb Frequency Indefinite", - Category: "word", - Description: "Random frequency indefinite adverb", - Example: "occasionally", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return adverbFrequencyIndefinite(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go b/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go deleted file mode 100644 index ecfc283671f..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go +++ /dev/null @@ -1,161 +0,0 @@ -package gofakeit - -import "math/rand" - -// Connective will generate a random connective -func Connective() string { return connective(globalFaker.Rand) } - -// Connective will generate a random connective -func (f *Faker) Connective() string { return connective(f.Rand) } - -func connective(r *rand.Rand) string { - var connectiveType = map[int]string{ - 0: "connective_time", - 1: "connective_comparative", - 2: "connective_complaint", - 3: "connective_listing", - 4: "connective_casual", - 5: "connective_examplify", - } - return getRandValue(r, []string{"word", connectiveType[number(r, 0, 5)]}) -} - -// ConnectiveTime will generate a random connective time -func ConnectiveTime() string { return connectiveTime(globalFaker.Rand) } - -// ConnectiveTime will generate a random connective time - -func (f *Faker) ConnectiveTime() string { return connectiveTime(f.Rand) } - -func connectiveTime(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_time"}) -} - -// ConnectiveComparative will generate a random comparative connective -func ConnectiveComparative() string { return connectiveComparative(globalFaker.Rand) } - -// ConnectiveComparative will generate a random comparative connective -func (f *Faker) ConnectiveComparative() string { return connectiveComparative(f.Rand) } - -func connectiveComparative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_comparative"}) -} - -// ConnectiveComplaint will generate a random complaint connective -func ConnectiveComplaint() string { return connectiveComplaint(globalFaker.Rand) } - -// ConnectiveComplaint will generate a random complaint connective -func (f *Faker) ConnectiveComplaint() string { return connectiveComplaint(f.Rand) } - -func connectiveComplaint(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_complaint"}) -} - -// ConnectiveListing will generate a random listing connective -func ConnectiveListing() string { return connectiveListing(globalFaker.Rand) } - -// ConnectiveListing will generate a random listing connective -func (f *Faker) ConnectiveListing() string { return connectiveListing(f.Rand) } - -func connectiveListing(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_listing"}) -} - -// ConnectiveCasual will generate a random casual connective -func ConnectiveCasual() string { return connectiveCasual(globalFaker.Rand) } - -// ConnectiveCasual will generate a random casual connective -func (f *Faker) ConnectiveCasual() string { return connectiveCasual(f.Rand) } - -func connectiveCasual(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_casual"}) -} - -// ConnectiveExamplify will generate a random examplify connective -func ConnectiveExamplify() string { return connectiveExamplify(globalFaker.Rand) } - -// ConnectiveExamplify will generate a random examplify connective -func (f *Faker) ConnectiveExamplify() string { return connectiveExamplify(f.Rand) } - -func connectiveExamplify(r *rand.Rand) string { - return getRandValue(r, []string{"word", "connective_examplify"}) -} - -func addWordConnectiveLookup() { - AddFuncLookup("connective", Info{ - Display: "Connective", - Category: "word", - Description: "Random connective word", - Example: "such as", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connective(r), nil - }, - }) - - AddFuncLookup("connectivetime", Info{ - Display: "Connective Time", - Category: "word", - Description: "Random connective time word", - Example: "finally", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveTime(r), nil - }, - }) - - AddFuncLookup("connectivecomparative", Info{ - Display: "Connective Comparitive", - Category: "word", - Description: "Random connective comparative word", - Example: "in addition", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveComparative(r), nil - }, - }) - - AddFuncLookup("connectivecomplaint", Info{ - Display: "Connective Complaint", - Category: "word", - Description: "Random connective complaint word", - Example: "besides", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveComplaint(r), nil - }, - }) - - AddFuncLookup("connectivelisting", Info{ - Display: "Connective Listing", - Category: "word", - Description: "Random connective listing word", - Example: "firstly", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveListing(r), nil - }, - }) - - AddFuncLookup("connectivecasual", Info{ - Display: "Connective Casual", - Category: "word", - Description: "Random connective casual word", - Example: "an outcome of", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveCasual(r), nil - }, - }) - - AddFuncLookup("connectiveexamplify", Info{ - Display: "Connective Examplify", - Category: "word", - Description: "Random connective examplify word", - Example: "then", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return connectiveExamplify(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_general.go b/vendor/github.com/brianvoe/gofakeit/v6/word_general.go deleted file mode 100644 index db51e4b960d..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_general.go +++ /dev/null @@ -1,38 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strings" - - "github.com/brianvoe/gofakeit/v6/data" -) - -// Word will generate a random word -func Word() string { return word(globalFaker.Rand) } - -// Word will generate a random word -func (f *Faker) Word() string { return word(f.Rand) } - -func word(r *rand.Rand) string { - word := getRandValue(r, []string{"word", randomString(r, data.WordKeys)}) - - // Word may return a couple of words, if so we will split on space and return a random word - if strings.Contains(word, " ") { - return randomString(r, strings.Split(word, " ")) - } - - return word -} - -func addWordGeneralLookup() { - AddFuncLookup("word", Info{ - Display: "Word", - Category: "word", - Description: "Random word", - Example: "man", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return word(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go b/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go deleted file mode 100644 index 48c9aee008d..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go +++ /dev/null @@ -1,35 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "unicode" -) - -// SentenceSimple will generate a random simple sentence -func SentenceSimple() string { return sentenceSimple(globalFaker.Rand) } - -// SentenceSimple will generate a random simple sentence -func (f *Faker) SentenceSimple() string { return sentenceSimple(f.Rand) } - -func sentenceSimple(r *rand.Rand) string { - // simple sentence consists of a noun phrase and a verb phrase - str := phraseNoun(r) + " " + phraseVerb(r) + "." - - // capitalize the first letter - strR := []rune(str) - strR[0] = unicode.ToUpper(strR[0]) - return string(strR) -} - -func addWordGrammerLookup() { - AddFuncLookup("sentencesimple", Info{ - Display: "Simple Sentence", - Category: "word", - Description: "Random simple sentence", - Example: "A tribe fly the lemony kitchen.", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return sentenceSimple(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_helper.go b/vendor/github.com/brianvoe/gofakeit/v6/word_helper.go deleted file mode 100644 index a1655ff59be..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_helper.go +++ /dev/null @@ -1,45 +0,0 @@ -package gofakeit - -import ( - "strings" -) - -// This will look at a few things to determine what kind of article to use for the word -func getArticle(word string) string { - // If nothing is passed return empty - if word == "" { - return "" - } - - word = strings.ToLower(word) - letters := strings.Split(word, "") - firstLetter := "" - secondLetter := "" - if len(letters) > 0 { - firstLetter = letters[0] - } - if len(letters) > 1 { - secondLetter = letters[1] - } - - // If the word starts with a, e, i, o, use an article - if firstLetter == "a" || firstLetter == "e" || firstLetter == "i" || firstLetter == "o" { - return "an" - } - - // If the word starts with a u and n or l, use an article - if firstLetter == "u" { - if secondLetter == "n" || secondLetter == "l" { - return "an" - } - } - - // If the word starts with a vowel, use an article - if firstLetter == "h" { - if secondLetter == "i" { - return "an" - } - } - - return "a" -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go b/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go deleted file mode 100644 index 368ec6cf606..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go +++ /dev/null @@ -1,224 +0,0 @@ -package gofakeit - -import "math/rand" - -// Noun will generate a random noun -func Noun() string { return noun(globalFaker.Rand) } - -// Noun will generate a random noun -func (f *Faker) Noun() string { return noun(f.Rand) } - -func noun(r *rand.Rand) string { - var nounType = map[int]string{ - 0: "noun_common", - 1: "noun_concrete", - 2: "noun_abstract", - 3: "noun_collective_people", - 4: "noun_collective_animal", - 5: "noun_collective_thing", - 6: "noun_countable", - 7: "noun_uncountable", - } - return getRandValue(r, []string{"word", nounType[number(r, 0, 7)]}) -} - -// NounCommon will generate a random common noun -func NounCommon() string { return nounCommon(globalFaker.Rand) } - -// NounCommon will generate a random common noun -func (f *Faker) NounCommon() string { return nounCommon(f.Rand) } - -func nounCommon(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_common"}) } - -// NounConcrete will generate a random concrete noun -func NounConcrete() string { return nounConcrete(globalFaker.Rand) } - -// NounConcrete will generate a random concrete noun -func (f *Faker) NounConcrete() string { return nounConcrete(f.Rand) } - -func nounConcrete(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_concrete"}) } - -// NounAbstract will generate a random abstract noun -func NounAbstract() string { return nounAbstract(globalFaker.Rand) } - -// NounAbstract will generate a random abstract noun -func (f *Faker) NounAbstract() string { return nounAbstract(f.Rand) } - -func nounAbstract(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_abstract"}) } - -// NounCollectivePeople will generate a random collective noun person -func NounCollectivePeople() string { return nounCollectivePeople(globalFaker.Rand) } - -// NounCollectivePeople will generate a random collective noun person -func (f *Faker) NounCollectivePeople() string { return nounCollectivePeople(f.Rand) } - -func nounCollectivePeople(r *rand.Rand) string { - return getRandValue(r, []string{"word", "noun_collective_people"}) -} - -// NounCollectiveAnimal will generate a random collective noun animal -func NounCollectiveAnimal() string { return nounCollectiveAnimal(globalFaker.Rand) } - -// NounCollectiveAnimal will generate a random collective noun animal -func (f *Faker) NounCollectiveAnimal() string { return nounCollectiveAnimal(f.Rand) } - -func nounCollectiveAnimal(r *rand.Rand) string { - return getRandValue(r, []string{"word", "noun_collective_animal"}) -} - -// NounCollectiveThing will generate a random collective noun thing -func NounCollectiveThing() string { return nounCollectiveThing(globalFaker.Rand) } - -// NounCollectiveThing will generate a random collective noun thing -func (f *Faker) NounCollectiveThing() string { return nounCollectiveThing(f.Rand) } - -func nounCollectiveThing(r *rand.Rand) string { - return getRandValue(r, []string{"word", "noun_collective_thing"}) -} - -// NounCountable will generate a random countable noun -func NounCountable() string { return nounCountable(globalFaker.Rand) } - -// NounCountable will generate a random countable noun -func (f *Faker) NounCountable() string { return nounCountable(f.Rand) } - -func nounCountable(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_countable"}) } - -// NounUncountable will generate a random uncountable noun -func NounUncountable() string { return nounUncountable(globalFaker.Rand) } - -// NounUncountable will generate a random uncountable noun -func (f *Faker) NounUncountable() string { return nounUncountable(f.Rand) } - -func nounUncountable(r *rand.Rand) string { - return getRandValue(r, []string{"word", "noun_uncountable"}) -} - -// NounProper will generate a random proper noun -func NounProper() string { return nounProper(globalFaker.Rand) } - -// NounProper will generate a random proper noun -func (f *Faker) NounProper() string { return nounProper(f.Rand) } - -func nounProper(r *rand.Rand) string { - switch randInt := randIntRange(r, 1, 3); randInt { - case 1: - return getRandValue(r, []string{"celebrity", "actor"}) - case 2: - return generate(r, getRandValue(r, []string{"address", "city"})) - } - - return getRandValue(r, []string{"person", "first"}) -} - -func addWordNounLookup() { - AddFuncLookup("noun", Info{ - Display: "Noun", - Category: "word", - Description: "Random noun", - Example: "aunt", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return noun(r), nil - }, - }) - - AddFuncLookup("nouncommon", Info{ - Display: "Noun Common", - Category: "word", - Description: "Random common noun", - Example: "part", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounCommon(r), nil - }, - }) - - AddFuncLookup("nounconcrete", Info{ - Display: "Noun Concrete", - Category: "word", - Description: "Random concrete noun", - Example: "snowman", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounConcrete(r), nil - }, - }) - - AddFuncLookup("nounabstract", Info{ - Display: "Noun Abstract", - Category: "word", - Description: "Random abstract noun", - Example: "confusion", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounAbstract(r), nil - }, - }) - - AddFuncLookup("nouncollectivepeople", Info{ - Display: "Noun Collective People", - Category: "word", - Description: "Random collective noun person", - Example: "body", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounCollectivePeople(r), nil - }, - }) - - AddFuncLookup("nouncollectiveanimal", Info{ - Display: "Noun Collective Animal", - Category: "word", - Description: "Random collective noun animal", - Example: "party", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounCollectiveAnimal(r), nil - }, - }) - - AddFuncLookup("nouncollectivething", Info{ - Display: "Noun Collective Thing", - Category: "word", - Description: "Random collective noun thing", - Example: "hand", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounCollectiveThing(r), nil - }, - }) - - AddFuncLookup("nouncountable", Info{ - Display: "Noun Countable", - Category: "word", - Description: "Random countable noun", - Example: "neck", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounCountable(r), nil - }, - }) - - AddFuncLookup("noununcountable", Info{ - Display: "Noun Uncountable", - Category: "word", - Description: "Random uncountable noun", - Example: "seafood", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounUncountable(r), nil - }, - }) - - AddFuncLookup("nounproper", Info{ - Display: "Noun Proper", - Category: "word", - Description: "Random proper noun", - Example: "John", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return nounProper(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go b/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go deleted file mode 100644 index f3f6a3bc4ba..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go +++ /dev/null @@ -1,163 +0,0 @@ -package gofakeit - -import ( - "math/rand" - "strings" -) - -// Phrase will return a random phrase -func Phrase() string { return phrase(globalFaker.Rand) } - -// Phrase will return a random phrase -func (f *Faker) Phrase() string { return phrase(f.Rand) } - -func phrase(r *rand.Rand) string { return getRandValue(r, []string{"sentence", "phrase"}) } - -// PhraseNoun will return a random noun phrase -func PhraseNoun() string { return phraseNoun(globalFaker.Rand) } - -// PhraseNoun will return a random noun phrase -func (f *Faker) PhraseNoun() string { return phraseNoun(f.Rand) } - -func phraseNoun(r *rand.Rand) string { - str := "" - - // You may also want to add an adjective to describe the noun - if boolFunc(r) { - str = adjectiveDescriptive(r) + " " + noun(r) - } else { - str = noun(r) - } - - // Add determiner from weighted list - prob, _ := weighted(r, []any{1, 2, 3}, []float32{2, 1.5, 1}) - if prob == 1 { - str = getArticle(str) + " " + str - } else if prob == 2 { - str = "the " + str - } - - return str -} - -// PhraseVerb will return a random preposition phrase -func PhraseVerb() string { return phraseVerb(globalFaker.Rand) } - -// PhraseVerb will return a random preposition phrase -func (f *Faker) PhraseVerb() string { return phraseVerb(f.Rand) } - -func phraseVerb(r *rand.Rand) string { - // Put together a string builder - sb := []string{} - - // You may have an adverb phrase - if boolFunc(r) { - sb = append(sb, phraseAdverb(r)) - } - - // Lets add the primary verb - sb = append(sb, verbAction(r)) - - // You may have a noun phrase - if boolFunc(r) { - sb = append(sb, phraseNoun(r)) - } - - // You may have an adverb phrase - if boolFunc(r) { - sb = append(sb, phraseAdverb(r)) - - // You may also have a preposition phrase - if boolFunc(r) { - sb = append(sb, phrasePreposition(r)) - } - - // You may also hae an adverb phrase - if boolFunc(r) { - sb = append(sb, phraseAdverb(r)) - } - } - - return strings.Join(sb, " ") -} - -// PhraseAdverb will return a random adverb phrase -func PhraseAdverb() string { return phraseAdverb(globalFaker.Rand) } - -// PhraseAdverb will return a random adverb phrase -func (f *Faker) PhraseAdverb() string { return phraseAdverb(f.Rand) } - -func phraseAdverb(r *rand.Rand) string { - if boolFunc(r) { - return adverbDegree(r) + " " + adverbManner(r) - } - - return adverbManner(r) -} - -// PhrasePreposition will return a random preposition phrase -func PhrasePreposition() string { return phrasePreposition(globalFaker.Rand) } - -// PhrasePreposition will return a random preposition phrase -func (f *Faker) PhrasePreposition() string { return phrasePreposition(f.Rand) } - -func phrasePreposition(r *rand.Rand) string { - return prepositionSimple(r) + " " + phraseNoun(r) -} - -func addWordPhraseLookup() { - AddFuncLookup("phrase", Info{ - Display: "Phrase", - Category: "word", - Description: "Random phrase", - Example: "time will tell", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phrase(r), nil - }, - }) - - AddFuncLookup("phrasenoun", Info{ - Display: "Noun Phrase", - Category: "word", - Description: "Random noun phrase", - Example: "a tribe", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phraseNoun(r), nil - }, - }) - - AddFuncLookup("phraseverb", Info{ - Display: "Verb Phrase", - Category: "word", - Description: "Random verb phrase", - Example: "a tribe", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phraseVerb(r), nil - }, - }) - - AddFuncLookup("phraseadverb", Info{ - Display: "Adverb Phrase", - Category: "word", - Description: "Random adverb phrase", - Example: "fully gladly", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phraseAdverb(r), nil - }, - }) - - AddFuncLookup("phrasepreposition", Info{ - Display: "Preposition Phrase", - Category: "word", - Description: "Random preposition phrase", - Example: "out the black thing", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return phrasePreposition(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go b/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go deleted file mode 100644 index efc4aabee4d..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go +++ /dev/null @@ -1,94 +0,0 @@ -package gofakeit - -import "math/rand" - -// Preposition will generate a random preposition -func Preposition() string { return preposition(globalFaker.Rand) } - -// Preposition will generate a random preposition -func (f *Faker) Preposition() string { return preposition(f.Rand) } - -func preposition(r *rand.Rand) string { - var prepType = map[int]string{ - 0: "preposition_simple", - 1: "preposition_double", - 2: "preposition_compound", - } - return getRandValue(r, []string{"word", prepType[number(r, 0, 2)]}) -} - -// PrepositionSimple will generate a random simple preposition -func PrepositionSimple() string { return prepositionSimple(globalFaker.Rand) } - -// PrepositionSimple will generate a random simple preposition -func (f *Faker) PrepositionSimple() string { return prepositionSimple(f.Rand) } - -func prepositionSimple(r *rand.Rand) string { - return getRandValue(r, []string{"word", "preposition_simple"}) -} - -// PrepositionDouble will generate a random double preposition -func PrepositionDouble() string { return prepositionDouble(globalFaker.Rand) } - -// PrepositionDouble will generate a random double preposition -func (f *Faker) PrepositionDouble() string { return prepositionDouble(f.Rand) } - -func prepositionDouble(r *rand.Rand) string { - return getRandValue(r, []string{"word", "preposition_double"}) -} - -// PrepositionCompound will generate a random compound preposition -func PrepositionCompound() string { return prepositionCompound(globalFaker.Rand) } - -// PrepositionCompound will generate a random compound preposition -func (f *Faker) PrepositionCompound() string { return prepositionCompound(f.Rand) } - -func prepositionCompound(r *rand.Rand) string { - return getRandValue(r, []string{"word", "preposition_compound"}) -} - -func addWordPrepositionLookup() { - AddFuncLookup("preposition", Info{ - Display: "Preposition", - Category: "word", - Description: "Random preposition", - Example: "other than", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return preposition(r), nil - }, - }) - - AddFuncLookup("prepositionsimple", Info{ - Display: "Preposition Simple", - Category: "word", - Description: "Random simple preposition", - Example: "out", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return prepositionSimple(r), nil - }, - }) - - AddFuncLookup("prepositiondouble", Info{ - Display: "Preposition Double", - Category: "word", - Description: "Random double preposition", - Example: "before", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return prepositionDouble(r), nil - }, - }) - - AddFuncLookup("prepositioncompound", Info{ - Display: "Preposition Compound", - Category: "word", - Description: "Random compound preposition", - Example: "according to", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return prepositionCompound(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go b/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go deleted file mode 100644 index a62d830f23a..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go +++ /dev/null @@ -1,204 +0,0 @@ -package gofakeit - -import "math/rand" - -// Pronoun will generate a random pronoun -func Pronoun() string { return pronoun(globalFaker.Rand) } - -// Pronoun will generate a random pronoun -func (f *Faker) Pronoun() string { return pronoun(f.Rand) } - -func pronoun(r *rand.Rand) string { - var pronounType = map[int]string{ - 0: "pronoun_personal", - 1: "pronoun_object", - 2: "pronoun_possessive", - 3: "pronoun_reflective", - 4: "pronoun_indefinite", - 5: "pronoun_demonstrative", - 6: "pronoun_interrogative", - 7: "pronoun_relative", - } - return getRandValue(r, []string{"word", pronounType[number(r, 0, 7)]}) -} - -// PronounPersonal will generate a random personal pronoun -func PronounPersonal() string { return pronounPersonal(globalFaker.Rand) } - -// PronounPersonal will generate a random personal pronoun -func (f *Faker) PronounPersonal() string { return pronounPersonal(f.Rand) } - -func pronounPersonal(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_personal"}) -} - -// PronounObject will generate a random object pronoun -func PronounObject() string { return pronounObject(globalFaker.Rand) } - -// PronounObject will generate a random object pronoun -func (f *Faker) PronounObject() string { return pronounObject(f.Rand) } - -func pronounObject(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_object"}) -} - -// PronounPossessive will generate a random possessive pronoun -func PronounPossessive() string { return pronounPossessive(globalFaker.Rand) } - -// PronounPossessive will generate a random possessive pronoun -func (f *Faker) PronounPossessive() string { return pronounPossessive(f.Rand) } - -func pronounPossessive(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_possessive"}) -} - -// PronounReflective will generate a random reflective pronoun -func PronounReflective() string { return pronounReflective(globalFaker.Rand) } - -// PronounReflective will generate a random reflective pronoun -func (f *Faker) PronounReflective() string { return pronounReflective(f.Rand) } - -func pronounReflective(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_reflective"}) -} - -// PronounIndefinite will generate a random indefinite pronoun -func PronounIndefinite() string { return pronounIndefinite(globalFaker.Rand) } - -// PronounIndefinite will generate a random indefinite pronoun -func (f *Faker) PronounIndefinite() string { return pronounIndefinite(f.Rand) } - -func pronounIndefinite(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_indefinite"}) -} - -// PronounDemonstrative will generate a random demonstrative pronoun -func PronounDemonstrative() string { return pronounDemonstrative(globalFaker.Rand) } - -// PronounDemonstrative will generate a random demonstrative pronoun -func (f *Faker) PronounDemonstrative() string { return pronounDemonstrative(f.Rand) } - -func pronounDemonstrative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_demonstrative"}) -} - -// PronounInterrogative will generate a random interrogative pronoun -func PronounInterrogative() string { return pronounInterrogative(globalFaker.Rand) } - -// PronounInterrogative will generate a random interrogative pronoun -func (f *Faker) PronounInterrogative() string { return pronounInterrogative(f.Rand) } - -func pronounInterrogative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_interrogative"}) -} - -// PronounRelative will generate a random relative pronoun -func PronounRelative() string { return pronounRelative(globalFaker.Rand) } - -// PronounRelative will generate a random relative pronoun -func (f *Faker) PronounRelative() string { return pronounRelative(f.Rand) } - -func pronounRelative(r *rand.Rand) string { - return getRandValue(r, []string{"word", "pronoun_relative"}) -} - -func addWordPronounLookup() { - AddFuncLookup("pronoun", Info{ - Display: "Pronoun", - Category: "word", - Description: "Generates a random pronoun", - Example: "me", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronoun(r), nil - }, - }) - - AddFuncLookup("pronounpersonal", Info{ - Display: "Pronoun Personal", - Category: "word", - Description: "Generates a random personal pronoun", - Example: "it", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounPersonal(r), nil - }, - }) - - AddFuncLookup("pronounobject", Info{ - Display: "Pronoun Object", - Category: "word", - Description: "Generates a random object pronoun", - Example: "it", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounObject(r), nil - }, - }) - - AddFuncLookup("pronounpossessive", Info{ - Display: "Pronoun Possessive", - Category: "word", - Description: "Generates a random possessive pronoun", - Example: "mine", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounPossessive(r), nil - }, - }) - - AddFuncLookup("pronounreflective", Info{ - Display: "Pronoun Reflective", - Category: "word", - Description: "Generates a random reflective pronoun", - Example: "myself", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounReflective(r), nil - }, - }) - - AddFuncLookup("pronounindefinite", Info{ - Display: "Pronoun Indefinite", - Category: "word", - Description: "Generates a random indefinite pronoun", - Example: "few", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounIndefinite(r), nil - }, - }) - - AddFuncLookup("pronoundemonstrative", Info{ - Display: "Pronoun Demonstrative", - Category: "word", - Description: "Generates a random demonstrative pronoun", - Example: "this", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounDemonstrative(r), nil - }, - }) - - AddFuncLookup("pronouninterrogative", Info{ - Display: "Pronoun Interrogative", - Category: "word", - Description: "Generates a random interrogative pronoun", - Example: "what", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounInterrogative(r), nil - }, - }) - - AddFuncLookup("pronounrelative", Info{ - Display: "Pronoun Relative", - Category: "word", - Description: "Generates a random relative pronoun", - Example: "as", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return pronounRelative(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go b/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go deleted file mode 100644 index 25896b08dc4..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go +++ /dev/null @@ -1,213 +0,0 @@ -package gofakeit - -import ( - "bytes" - "errors" - "math/rand" - "strings" - "unicode" -) - -type paragrapOptions struct { - paragraphCount int - sentenceCount int - wordCount int - separator string -} - -const bytesPerWordEstimation = 6 - -type sentenceGenerator func(r *rand.Rand, wordCount int) string -type wordGenerator func(r *rand.Rand) string - -// Sentence will generate a random sentence -func Sentence(wordCount int) string { return sentence(globalFaker.Rand, wordCount) } - -// Sentence will generate a random sentence -func (f *Faker) Sentence(wordCount int) string { return sentence(f.Rand, wordCount) } - -func sentence(r *rand.Rand, wordCount int) string { - return sentenceGen(r, wordCount, word) -} - -// Paragraph will generate a random paragraphGenerator -func Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return paragraph(globalFaker.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -// Paragraph will generate a random paragraphGenerator -func (f *Faker) Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return paragraph(f.Rand, paragraphCount, sentenceCount, wordCount, separator) -} - -func paragraph(r *rand.Rand, paragraphCount int, sentenceCount int, wordCount int, separator string) string { - return paragraphGen(r, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, sentence) -} - -func sentenceGen(r *rand.Rand, wordCount int, word wordGenerator) string { - if wordCount <= 0 { - return "" - } - - wordSeparator := ' ' - sentence := bytes.Buffer{} - sentence.Grow(wordCount * bytesPerWordEstimation) - - for i := 0; i < wordCount; i++ { - word := word(r) - if i == 0 { - runes := []rune(word) - runes[0] = unicode.ToTitle(runes[0]) - word = string(runes) - } - sentence.WriteString(word) - if i < wordCount-1 { - sentence.WriteRune(wordSeparator) - } - } - sentence.WriteRune('.') - return sentence.String() -} - -func paragraphGen(r *rand.Rand, opts paragrapOptions, sentecer sentenceGenerator) string { - if opts.paragraphCount <= 0 || opts.sentenceCount <= 0 || opts.wordCount <= 0 { - return "" - } - - //to avoid making Go 1.10 dependency, we cannot use strings.Builder - paragraphs := bytes.Buffer{} - //we presume the length - paragraphs.Grow(opts.paragraphCount * opts.sentenceCount * opts.wordCount * bytesPerWordEstimation) - wordSeparator := ' ' - - for i := 0; i < opts.paragraphCount; i++ { - for e := 0; e < opts.sentenceCount; e++ { - paragraphs.WriteString(sentecer(r, opts.wordCount)) - if e < opts.sentenceCount-1 { - paragraphs.WriteRune(wordSeparator) - } - } - - if i < opts.paragraphCount-1 { - paragraphs.WriteString(opts.separator) - } - } - - return paragraphs.String() -} - -// Question will return a random question -func Question() string { - return question(globalFaker.Rand) -} - -// Question will return a random question -func (f *Faker) Question() string { - return question(f.Rand) -} - -func question(r *rand.Rand) string { - return strings.Replace(hipsterSentence(r, number(r, 3, 10)), ".", "?", 1) -} - -// Quote will return a random quote from a random person -func Quote() string { return quote(globalFaker.Rand) } - -// Quote will return a random quote from a random person -func (f *Faker) Quote() string { return quote(f.Rand) } - -func quote(r *rand.Rand) string { - return `"` + hipsterSentence(r, number(r, 3, 10)) + `" - ` + firstName(r) + " " + lastName(r) -} - -func addWordSentenceLookup() { - AddFuncLookup("sentence", Info{ - Display: "Sentence", - Category: "word", - Description: "Random sentence", - Example: "Interpret context record river mind.", - Output: "string", - Params: []Param{ - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - return sentence(r, wordCount), nil - }, - }) - - AddFuncLookup("paragraph", Info{ - Display: "Paragraph", - Category: "word", - Description: "Random paragraph", - Example: "Interpret context record river mind press self should compare property outcome divide. Combine approach sustain consult discover explanation direct address church husband seek army. Begin own act welfare replace press suspect stay link place manchester specialist. Arrive price satisfy sign force application hair train provide basis right pay. Close mark teacher strengthen information attempt head touch aim iron tv take. Handle wait begin look speech trust cancer visit capacity disease chancellor clean. Race aim function gain couple push faith enjoy admit ring attitude develop. Edge game prevent cast mill favour father star live search aim guess. West heart item adopt compete equipment miss output report communicate model cabinet. Seek worker variety step argue air improve give succeed relief artist suffer. Hide finish insist knowledge thatcher make research chance structure proportion husband implement. Town crown restaurant cost material compete lady climb football region discussion order. Place lee market ice like display mind stress compete weather station raise. Democracy college major recall struggle use cut intention accept period generation strike. Benefit defend recommend conclude justify result depend succeed address owner fill interpret.", - Output: "string", - Params: []Param{ - {Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"}, - {Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"}, - {Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, - {Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "
", Description: "String value to add between paragraphs"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - paragraphCount, err := info.GetInt(m, "paragraphcount") - if err != nil { - return nil, err - } - if paragraphCount <= 0 || paragraphCount > 20 { - return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20") - } - - sentenceCount, err := info.GetInt(m, "sentencecount") - if err != nil { - return nil, err - } - if sentenceCount <= 0 || sentenceCount > 20 { - return nil, errors.New("invalid sentence count, must be greater than 0, less than 20") - } - - wordCount, err := info.GetInt(m, "wordcount") - if err != nil { - return nil, err - } - if wordCount <= 0 || wordCount > 50 { - return nil, errors.New("invalid word count, must be greater than 0, less than 50") - } - - paragraphSeparator, err := info.GetString(m, "paragraphseparator") - if err != nil { - return nil, err - } - - return paragraph(r, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil - }, - }) - - AddFuncLookup("question", Info{ - Display: "Question", - Category: "word", - Description: "Random question", - Example: "Roof chia echo?", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return question(r), nil - }, - }) - - AddFuncLookup("quote", Info{ - Display: "Qoute", - Category: "word", - Description: "Random quote", - Example: `"Roof chia echo." - Lura Lockman`, - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return quote(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go b/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go deleted file mode 100644 index a18363bbd50..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go +++ /dev/null @@ -1,128 +0,0 @@ -package gofakeit - -import "math/rand" - -// Verb will generate a random verb -func Verb() string { return verb(globalFaker.Rand) } - -// Verb will generate a random verb -func (f *Faker) Verb() string { return verb(f.Rand) } - -func verb(r *rand.Rand) string { - var verbType = map[int]string{ - 0: "verb_action", - 1: "verb_linking", - 2: "verb_helping", - } - return getRandValue(r, []string{"word", verbType[number(r, 0, 2)]}) -} - -// VerbAction will generate a random action verb -func VerbAction() string { return verbAction(globalFaker.Rand) } - -// VerbAction will generate a random action verb -func (f *Faker) VerbAction() string { return verbAction(f.Rand) } - -func verbAction(r *rand.Rand) string { return getRandValue(r, []string{"word", "verb_action"}) } - -// VerbTransitive will generate a random transitive verb -func VerbTransitive() string { return verbTransitive(globalFaker.Rand) } - -// VerbTransitive will generate a random transitive verb -func (f *Faker) VerbTransitive() string { return verbTransitive(f.Rand) } - -func verbTransitive(r *rand.Rand) string { return getRandValue(r, []string{"word", "verb_transitive"}) } - -// VerbIntransitive will generate a random intransitive verb -func VerbIntransitive() string { return verbIntransitive(globalFaker.Rand) } - -// VerbIntransitive will generate a random intransitive verb -func (f *Faker) VerbIntransitive() string { return verbIntransitive(f.Rand) } - -func verbIntransitive(r *rand.Rand) string { - return getRandValue(r, []string{"word", "verb_intransitive"}) -} - -// VerbLinking will generate a random linking verb -func VerbLinking() string { return verbLinking(globalFaker.Rand) } - -// VerbLinking will generate a random linking verb -func (f *Faker) VerbLinking() string { return verbLinking(f.Rand) } - -func verbLinking(r *rand.Rand) string { return getRandValue(r, []string{"word", "verb_linking"}) } - -// VerbHelping will generate a random helping verb -func VerbHelping() string { return verbHelping(globalFaker.Rand) } - -// VerbHelping will generate a random helping verb -func (f *Faker) VerbHelping() string { return verbHelping(f.Rand) } - -func verbHelping(r *rand.Rand) string { return getRandValue(r, []string{"word", "verb_helping"}) } - -func addWordVerbLookup() { - AddFuncLookup("verb", Info{ - Display: "Verb", - Category: "word", - Description: "Random verb", - Example: "release", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verb(r), nil - }, - }) - - AddFuncLookup("verbaction", Info{ - Display: "Action Verb", - Category: "word", - Description: "Random action verb", - Example: "close", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verbAction(r), nil - }, - }) - - AddFuncLookup("verbtransitive", Info{ - Display: "Transitive Verb", - Category: "word", - Description: "Random transitive verb", - Example: "follow", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verbTransitive(r), nil - }, - }) - - AddFuncLookup("verbintransitive", Info{ - Display: "Intransitive Verb", - Category: "word", - Description: "Random intransitive verb", - Example: "laugh", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verbIntransitive(r), nil - }, - }) - - AddFuncLookup("verblinking", Info{ - Display: "Linking Verb", - Category: "word", - Description: "Random linking verb", - Example: "was", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verbLinking(r), nil - }, - }) - - AddFuncLookup("verbhelping", Info{ - Display: "Helping Verb", - Category: "word", - Description: "Random helping verb", - Example: "be", - Output: "string", - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - return verbHelping(r), nil - }, - }) -} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/xml.go b/vendor/github.com/brianvoe/gofakeit/v6/xml.go deleted file mode 100644 index e851fb864be..00000000000 --- a/vendor/github.com/brianvoe/gofakeit/v6/xml.go +++ /dev/null @@ -1,353 +0,0 @@ -package gofakeit - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "errors" - "math/rand" - "reflect" -) - -// XMLOptions defines values needed for json generation -type XMLOptions struct { - Type string `json:"type" xml:"type" fake:"{randomstring:[array,single]}"` // single or array - RootElement string `json:"root_element" xml:"root_element"` - RecordElement string `json:"record_element" xml:"record_element"` - RowCount int `json:"row_count" xml:"row_count" fake:"{number:1,10}"` - Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` - Indent bool `json:"indent" xml:"indent"` -} - -type xmlArray struct { - XMLName xml.Name - Array []xmlMap -} - -type xmlMap struct { - XMLName xml.Name - KeyOrder []string - Map map[string]any `xml:",chardata"` -} - -type xmlEntry struct { - XMLName xml.Name - Value any `xml:",chardata"` -} - -func (m xmlMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - if len(m.Map) == 0 { - return nil - } - - start.Name = m.XMLName - - err := e.EncodeToken(start) - if err != nil { - return err - } - - err = xmlMapLoop(e, &m) - if err != nil { - return err - } - - return e.EncodeToken(start.End()) -} - -func xmlMapLoop(e *xml.Encoder, m *xmlMap) error { - var err error - - // Check if xmlmap has key order if not create it - // Get key order by order of fields array - if m.KeyOrder == nil { - m.KeyOrder = make([]string, len(m.Map)) - for k := range m.Map { - m.KeyOrder = append(m.KeyOrder, k) - } - } - - for _, key := range m.KeyOrder { - v := reflect.ValueOf(m.Map[key]) - - // Always get underlyning Value of value - if v.Kind() == reflect.Ptr { - v = reflect.Indirect(v) - } - - switch v.Kind() { - case reflect.Bool, - reflect.String, - reflect.Int, reflect.Int8, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - err = e.Encode(xmlEntry{XMLName: xml.Name{Local: key}, Value: m.Map[key]}) - if err != nil { - return err - } - case reflect.Slice: - e.EncodeToken(xml.StartElement{Name: xml.Name{Local: key}}) - for i := 0; i < v.Len(); i++ { - err = e.Encode(xmlEntry{XMLName: xml.Name{Local: "value"}, Value: v.Index(i).String()}) - if err != nil { - return err - } - } - e.EncodeToken(xml.EndElement{Name: xml.Name{Local: key}}) - case reflect.Map: - err = e.Encode(xmlMap{ - XMLName: xml.Name{Local: key}, - Map: m.Map[key].(map[string]any), - }) - if err != nil { - return err - } - case reflect.Struct: - // Convert struct to map[string]any - // So we can rewrap element - var inInterface map[string]any - inrec, _ := json.Marshal(m.Map[key]) - json.Unmarshal(inrec, &inInterface) - - err = e.Encode(xmlMap{ - XMLName: xml.Name{Local: key}, - Map: inInterface, - }) - if err != nil { - return err - } - default: - err = e.Encode(m.Map[key]) - if err != nil { - return err - } - } - } - - return nil -} - -// XML generates an object or an array of objects in json format -// A nil XMLOptions returns a randomly structured XML. -func XML(xo *XMLOptions) ([]byte, error) { return xmlFunc(globalFaker, xo) } - -// XML generates an object or an array of objects in json format -// A nil XMLOptions returns a randomly structured XML. -func (f *Faker) XML(xo *XMLOptions) ([]byte, error) { return xmlFunc(f, xo) } - -func xmlFunc(f *Faker, xo *XMLOptions) ([]byte, error) { - if xo == nil { - // We didn't get a XMLOptions, so create a new random one - err := f.Struct(&xo) - if err != nil { - return nil, err - } - } - - // Check to make sure they passed in a type - if xo.Type != "single" && xo.Type != "array" { - return nil, errors.New("invalid type, must be array or object") - } - - // Check fields length - if xo.Fields == nil || len(xo.Fields) <= 0 { - return nil, errors.New("must pass fields in order to build json object(s)") - } - - // Check root element string - if xo.RootElement == "" { - xo.RecordElement = "xml" - } - - // Check record element string - if xo.RecordElement == "" { - xo.RecordElement = "record" - } - - // Get key order by order of fields array - keyOrder := make([]string, len(xo.Fields)) - for _, f := range xo.Fields { - keyOrder = append(keyOrder, f.Name) - } - - if xo.Type == "single" { - v := xmlMap{ - XMLName: xml.Name{Local: xo.RootElement}, - KeyOrder: keyOrder, - Map: make(map[string]any), - } - - // Loop through fields and add to them to map[string]any - for _, field := range xo.Fields { - // Get function info - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return nil, errors.New("invalid function, " + field.Function + " does not exist") - } - - value, err := funcInfo.Generate(f.Rand, &field.Params, funcInfo) - if err != nil { - return nil, err - } - - v.Map[field.Name] = value - } - - // Marshal into bytes - var b bytes.Buffer - x := xml.NewEncoder(&b) - if xo.Indent { - x.Indent("", " ") - } - err := x.Encode(v) - if err != nil { - return nil, err - } - - return b.Bytes(), nil - } - - if xo.Type == "array" { - // Make sure you set a row count - if xo.RowCount <= 0 { - return nil, errors.New("must have row count") - } - - xa := xmlArray{ - XMLName: xml.Name{Local: xo.RootElement}, - Array: make([]xmlMap, xo.RowCount), - } - - for i := 1; i <= int(xo.RowCount); i++ { - v := xmlMap{ - XMLName: xml.Name{Local: xo.RecordElement}, - KeyOrder: keyOrder, - Map: make(map[string]any), - } - - // Loop through fields and add to them to map[string]any - for _, field := range xo.Fields { - if field.Function == "autoincrement" { - v.Map[field.Name] = i - continue - } - - // Get function info - funcInfo := GetFuncLookup(field.Function) - if funcInfo == nil { - return nil, errors.New("invalid function, " + field.Function + " does not exist") - } - - value, err := funcInfo.Generate(f.Rand, &field.Params, funcInfo) - if err != nil { - return nil, err - } - - v.Map[field.Name] = value - } - - xa.Array = append(xa.Array, v) - } - - // Marshal into bytes - var b bytes.Buffer - x := xml.NewEncoder(&b) - if xo.Indent { - x.Indent("", " ") - } - err := x.Encode(xa) - if err != nil { - return nil, err - } - - return b.Bytes(), nil - } - - return nil, errors.New("invalid type, must be array or object") -} - -func addFileXMLLookup() { - AddFuncLookup("xml", Info{ - Display: "XML", - Category: "file", - Description: "Generates an single or an array of elements in xml format", - Example: ` - - - Markus - Moen - Dc0VYXjkWABx - - - Osborne - Hilll - XPJ9OVNbs5lm - - - `, - Output: "[]byte", - ContentType: "application/xml", - Params: []Param{ - {Field: "type", Display: "Type", Type: "string", Default: "single", Options: []string{"single", "array"}, Description: "Type of XML, single or array"}, - {Field: "rootelement", Display: "Root Element", Type: "string", Default: "xml", Description: "Root element wrapper name"}, - {Field: "recordelement", Display: "Record Element", Type: "string", Default: "record", Description: "Record element for each record row"}, - {Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows in JSON array"}, - {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields containing key name and function to run in json format"}, - {Field: "indent", Display: "Indent", Type: "bool", Default: "false", Description: "Whether or not to add indents and newlines"}, - }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { - xo := XMLOptions{} - - typ, err := info.GetString(m, "type") - if err != nil { - return nil, err - } - xo.Type = typ - - rootElement, err := info.GetString(m, "rootelement") - if err != nil { - return nil, err - } - xo.RootElement = rootElement - - recordElement, err := info.GetString(m, "recordelement") - if err != nil { - return nil, err - } - xo.RecordElement = recordElement - - rowcount, err := info.GetInt(m, "rowcount") - if err != nil { - return nil, err - } - xo.RowCount = rowcount - - fieldsStr, err := info.GetStringArray(m, "fields") - if err != nil { - return nil, err - } - - // Check to make sure fields has length - if len(fieldsStr) > 0 { - xo.Fields = make([]Field, len(fieldsStr)) - - for i, f := range fieldsStr { - // Unmarshal fields string into fields array - err = json.Unmarshal([]byte(f), &xo.Fields[i]) - if err != nil { - return nil, errors.New("unable to decode json string") - } - } - } - - indent, err := info.GetBool(m, "indent") - if err != nil { - return nil, err - } - xo.Indent = indent - - f := &Faker{Rand: r} - return xmlFunc(f, &xo) - }, - }) -} diff --git a/vendor/github.com/evanphx/json-patch/README.md b/vendor/github.com/evanphx/json-patch/README.md index 28e35169375..97e319b21bf 100644 --- a/vendor/github.com/evanphx/json-patch/README.md +++ b/vendor/github.com/evanphx/json-patch/README.md @@ -4,7 +4,7 @@ well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). [![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) -[![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) +[![Build Status](https://github.com/evanphx/json-patch/actions/workflows/go.yml/badge.svg)](https://github.com/evanphx/json-patch/actions/workflows/go.yml) [![Report Card](https://goreportcard.com/badge/github.com/evanphx/json-patch)](https://goreportcard.com/report/github.com/evanphx/json-patch) # Get It! @@ -314,4 +314,4 @@ go test -cover ./... ``` Builds for pull requests are tested automatically -using [TravisCI](https://travis-ci.org/evanphx/json-patch). +using [GitHub Actions](https://github.com/evanphx/json-patch/actions/workflows/go.yml). diff --git a/vendor/github.com/evanphx/json-patch/patch.go b/vendor/github.com/evanphx/json-patch/patch.go index 4bce5936d50..cd0274e1e4a 100644 --- a/vendor/github.com/evanphx/json-patch/patch.go +++ b/vendor/github.com/evanphx/json-patch/patch.go @@ -359,7 +359,7 @@ func findObject(pd *container, path string) (container, string) { next, ok := doc.get(decodePatchKey(part)) - if next == nil || ok != nil { + if next == nil || ok != nil || next.raw == nil { return nil, "" } @@ -568,6 +568,29 @@ func (p Patch) replace(doc *container, op Operation) error { return errors.Wrapf(err, "replace operation failed to decode path") } + if path == "" { + val := op.value() + + if val.which == eRaw { + if !val.tryDoc() { + if !val.tryAry() { + return errors.Wrapf(err, "replace operation value must be object or array") + } + } + } + + switch val.which { + case eAry: + *doc = &val.ary + case eDoc: + *doc = &val.doc + case eRaw: + return errors.Wrapf(err, "replace operation hit impossible case") + } + + return nil + } + con, key := findObject(doc, path) if con == nil { @@ -634,6 +657,25 @@ func (p Patch) test(doc *container, op Operation) error { return errors.Wrapf(err, "test operation failed to decode path") } + if path == "" { + var self lazyNode + + switch sv := (*doc).(type) { + case *partialDoc: + self.doc = *sv + self.which = eDoc + case *partialArray: + self.ary = *sv + self.which = eAry + } + + if self.equal(op.value()) { + return nil + } + + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) + } + con, key := findObject(doc, path) if con == nil { @@ -646,7 +688,7 @@ func (p Patch) test(doc *container, op Operation) error { } if val == nil { - if op.value().raw == nil { + if op.value() == nil || op.value().raw == nil { return nil } return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) diff --git a/vendor/github.com/go-test/deep/.travis.yml b/vendor/github.com/go-test/deep/.travis.yml deleted file mode 100644 index c459ee7b0e8..00000000000 --- a/vendor/github.com/go-test/deep/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - "1.15" - - "1.16" - - "1.17" - -before_install: - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cover - -script: - - $HOME/gopath/bin/goveralls -service=travis-pro -package github.com/go-test/deep diff --git a/vendor/github.com/go-test/deep/CHANGES.md b/vendor/github.com/go-test/deep/CHANGES.md index ade9e79c68f..163d6d5cb51 100644 --- a/vendor/github.com/go-test/deep/CHANGES.md +++ b/vendor/github.com/go-test/deep/CHANGES.md @@ -1,8 +1,25 @@ # go-test/deep Changelog +## v1.1.1 released 2024-06-23 + +* Added `NilPointersAreZero` option: causes a nil pointer to be equal to a zero value (PR #61) (@seveas) +* Updated test matrix to go1.22, go1.21, and go1.20 + +## v1.1.0 released 2022-12-09 + +* Add optional flags: `Equal(a, b, flags..)` and `FLAG_IGNORE_SLICE_ORDER` (issue #28, PR #56) (@alenkacz) + +--- + +## v1.0.9 released 2022-12-09 + +* Fixed issue #45: Panic when comparing errors in unexported fields (PR #54) (@seveas) +* Fixed issue #46: Functions are handled differently from reflect.DeepEqual (PR #55) (@countcb) +* Updated test matrix to go1.17, go1.18, and go1.19 and moved testing to GitHub Actions + ## v1.0.8 released 2021-10-13 -* Updated matrix to go1.15, go1.16, and go1.17 +* Updated test matrix to go1.15, go1.16, and go1.17 * Added SECURITY.md and GitHub code analysis ## v1.0.7 released 2020-07-11 diff --git a/vendor/github.com/go-test/deep/README.md b/vendor/github.com/go-test/deep/README.md index 56770a69b34..08a86070d1a 100644 --- a/vendor/github.com/go-test/deep/README.md +++ b/vendor/github.com/go-test/deep/README.md @@ -1,6 +1,8 @@ # Deep Variable Equality for Humans -[![Go Report Card](https://goreportcard.com/badge/github.com/go-test/deep)](https://goreportcard.com/report/github.com/go-test/deep) [![Build Status](https://app.travis-ci.com/go-test/deep.svg?branch=master)](https://app.travis-ci.com/go-test/deep) [![Coverage Status](https://coveralls.io/repos/github/go-test/deep/badge.svg?branch=master)](https://coveralls.io/github/go-test/deep?branch=master) [![GoDoc](https://godoc.org/github.com/go-test/deep?status.svg)](https://pkg.go.dev/github.com/go-test/deep) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-test/deep)](https://goreportcard.com/report/github.com/go-test/deep) +[![Coverage Status](https://coveralls.io/repos/github/go-test/deep/badge.svg?branch=master)](https://coveralls.io/github/go-test/deep?branch=master) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-test/deep.svg)](https://pkg.go.dev/github.com/go-test/deep) This package provides a single function: `deep.Equal`. It's like [reflect.DeepEqual](http://golang.org/pkg/reflect/#DeepEqual) but much friendlier to humans (or any sentient being) for two reason: diff --git a/vendor/github.com/go-test/deep/SECURITY.md b/vendor/github.com/go-test/deep/SECURITY.md index 845584a9a9e..d007137ad1d 100644 --- a/vendor/github.com/go-test/deep/SECURITY.md +++ b/vendor/github.com/go-test/deep/SECURITY.md @@ -6,7 +6,8 @@ For security patches, the latest release is supported: | Version | Supported | | ------- | ------------------ | -| 1.0.x | :white_check_mark: | +| 1.1.x | Yes | +| 1.0.x | No | ## Reporting a Vulnerability diff --git a/vendor/github.com/go-test/deep/deep.go b/vendor/github.com/go-test/deep/deep.go index dbc89c04bb9..4be3e1f4e6a 100644 --- a/vendor/github.com/go-test/deep/deep.go +++ b/vendor/github.com/go-test/deep/deep.go @@ -27,14 +27,25 @@ var ( LogErrors = false // CompareUnexportedFields causes unexported struct fields, like s in - // T{s int}, to be compared when true. + // T{s int}, to be compared when true. This does not work for comparing + // error or Time types on unexported fields because methods on unexported + // fields cannot be called. CompareUnexportedFields = false + // CompareFunctions compares functions the same as reflect.DeepEqual: + // only two nil functions are equal. Every other combination is not equal. + // This is disabled by default because previous versions of this package + // ignored functions. Enabling it can possibly report new diffs. + CompareFunctions = false + // NilSlicesAreEmpty causes a nil slice to be equal to an empty slice. NilSlicesAreEmpty = false // NilMapsAreEmpty causes a nil map to be equal to an empty map. NilMapsAreEmpty = false + + // NilPointersAreZero causes a nil pointer to be equal to a zero value. + NilPointersAreZero = false ) var ( @@ -48,10 +59,24 @@ var ( ErrNotHandled = errors.New("cannot compare the reflect.Kind") ) +const ( + // FLAG_NONE is a placeholder for default Equal behavior. You don't have to + // pass it to Equal; if you do, it does nothing. + FLAG_NONE byte = iota + + // FLAG_IGNORE_SLICE_ORDER causes Equal to ignore slice order so that + // []int{1, 2} and []int{2, 1} are equal. Only slices of primitive scalars + // like numbers and strings are supported. Slices of complex types, + // like []T where T is a struct, are undefined because Equal does not + // recurse into the slice value when this flag is enabled. + FLAG_IGNORE_SLICE_ORDER +) + type cmp struct { diff []string buff []string floatFormat string + flag map[byte]bool } var errorType = reflect.TypeOf((*error)(nil)).Elem() @@ -66,13 +91,17 @@ var errorType = reflect.TypeOf((*error)(nil)).Elem() // // When comparing a struct, if a field has the tag `deep:"-"` then it will be // ignored. -func Equal(a, b interface{}) []string { +func Equal(a, b interface{}, flags ...interface{}) []string { aVal := reflect.ValueOf(a) bVal := reflect.ValueOf(b) c := &cmp{ diff: []string{}, buff: []string{}, floatFormat: fmt.Sprintf("%%.%df", FloatPrecision), + flag: map[byte]bool{}, + } + for i := range flags { + c.flag[flags[i].(byte)] = true } if a == nil && b == nil { return nil @@ -137,18 +166,23 @@ func (c *cmp) equals(a, b reflect.Value, level int) { bElem := bKind == reflect.Ptr || bKind == reflect.Interface // If both types implement the error interface, compare the error strings. - // This must be done before dereferencing because the interface is on a - // pointer receiver. Re https://github.com/go-test/deep/issues/31, a/b might - // be primitive kinds; see TestErrorPrimitiveKind. - if aType.Implements(errorType) && bType.Implements(errorType) { - if (!aElem || !a.IsNil()) && (!bElem || !b.IsNil()) { - aString := a.MethodByName("Error").Call(nil)[0].String() - bString := b.MethodByName("Error").Call(nil)[0].String() - if aString != bString { - c.saveDiff(aString, bString) - return - } + // This must be done before dereferencing because errors.New() returns a + // pointer to a struct that implements the interface: + // func (e *errorString) Error() string { + // And we check CanInterface as a hack to make sure the underlying method + // is callable because https://github.com/golang/go/issues/32438 + // Issues: + // https://github.com/go-test/deep/issues/31 + // https://github.com/go-test/deep/issues/45 + if (aType.Implements(errorType) && bType.Implements(errorType)) && + ((!aElem || !a.IsNil()) && (!bElem || !b.IsNil())) && + (a.CanInterface() && b.CanInterface()) { + aString := a.MethodByName("Error").Call(nil)[0].String() + bString := b.MethodByName("Error").Call(nil)[0].String() + if aString != bString { + c.saveDiff(aString, bString) } + return } // Dereference pointers and interface{} @@ -159,6 +193,12 @@ func (c *cmp) equals(a, b reflect.Value, level int) { if bElem { b = b.Elem() } + if aElem && NilPointersAreZero && !a.IsValid() && b.IsValid() { + a = reflect.Zero(b.Type()) + } + if bElem && NilPointersAreZero && !b.IsValid() && a.IsValid() { + b = reflect.Zero(a.Type()) + } c.equals(a, b, level+1) return } @@ -326,29 +366,54 @@ func (c *cmp) equals(a, b reflect.Value, level int) { } } + // Equal if same underlying pointer and same length, this latter handles + // foo := []int{1, 2, 3, 4} + // a := foo[0:2] // == {1,2} + // b := foo[2:4] // == {3,4} + // a and b are same pointer but different slices (lengths) of the underlying + // array, so not equal. aLen := a.Len() bLen := b.Len() - if a.Pointer() == b.Pointer() && aLen == bLen { return } - n := aLen - if bLen > aLen { - n = bLen - } - for i := 0; i < n; i++ { - c.push(fmt.Sprintf("slice[%d]", i)) - if i < aLen && i < bLen { - c.equals(a.Index(i), b.Index(i), level+1) - } else if i < aLen { - c.saveDiff(a.Index(i), "") - } else { - c.saveDiff("", b.Index(i)) + if c.flag[FLAG_IGNORE_SLICE_ORDER] { + // Compare slices by value and value count; ignore order. + // Value equality is impliclity established by the maps: + // any value v1 will hash to the same map value if it's equal + // to another value v2. Then equality is determiend by value + // count: presuming v1==v2, then the slics are equal if there + // are equal numbers of v1 in each slice. + am := map[interface{}]int{} + for i := 0; i < a.Len(); i++ { + am[a.Index(i).Interface()] += 1 } - c.pop() - if len(c.diff) >= MaxDiff { - break + bm := map[interface{}]int{} + for i := 0; i < b.Len(); i++ { + bm[b.Index(i).Interface()] += 1 + } + c.cmpMapValueCounts(a, b, am, bm, true) // a cmp b + c.cmpMapValueCounts(b, a, bm, am, false) // b cmp a + } else { + // Compare slices by order + n := aLen + if bLen > aLen { + n = bLen + } + for i := 0; i < n; i++ { + c.push(fmt.Sprintf("slice[%d]", i)) + if i < aLen && i < bLen { + c.equals(a.Index(i), b.Index(i), level+1) + } else if i < aLen { + c.saveDiff(a.Index(i), "") + } else { + c.saveDiff("", b.Index(i)) + } + c.pop() + if len(c.diff) >= MaxDiff { + break + } } } @@ -385,7 +450,19 @@ func (c *cmp) equals(a, b reflect.Value, level int) { if a.String() != b.String() { c.saveDiff(a.String(), b.String()) } - + case reflect.Func: + if CompareFunctions { + if !a.IsNil() || !b.IsNil() { + aVal, bVal := "nil func", "nil func" + if !a.IsNil() { + aVal = "func" + } + if !b.IsNil() { + bVal = "func" + } + c.saveDiff(aVal, bVal) + } + } default: logError(ErrNotHandled) } @@ -410,6 +487,25 @@ func (c *cmp) saveDiff(aval, bval interface{}) { } } +func (c *cmp) cmpMapValueCounts(a, b reflect.Value, am, bm map[interface{}]int, a2b bool) { + for v := range am { + aCount, _ := am[v] + bCount, _ := bm[v] + + if aCount != bCount { + c.push(fmt.Sprintf("(unordered) slice[]=%v: value count", v)) + if a2b { + c.saveDiff(fmt.Sprintf("%d", aCount), fmt.Sprintf("%d", bCount)) + } else { + c.saveDiff(fmt.Sprintf("%d", bCount), fmt.Sprintf("%d", aCount)) + } + c.pop() + } + delete(am, v) + delete(bm, v) + } +} + func logError(err error) { if LogErrors { log.Println(err) diff --git a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json index 433693a69ad..44d4d00202f 100644 --- a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json +++ b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "v2": "2.12.5" + "v2": "2.13.0" } diff --git a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md index b64522dfe05..d63421b71ca 100644 --- a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md +++ b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md @@ -1,5 +1,12 @@ # Changelog +## [2.13.0](https://github.com/googleapis/gax-go/compare/v2.12.5...v2.13.0) (2024-07-22) + + +### Features + +* **iterator:** add package to help work with new iter.Seq types ([#358](https://github.com/googleapis/gax-go/issues/358)) ([6bccdaa](https://github.com/googleapis/gax-go/commit/6bccdaac011fe6fd147e4eb533a8e6520b7d4acc)) + ## [2.12.5](https://github.com/googleapis/gax-go/compare/v2.12.4...v2.12.5) (2024-06-18) diff --git a/vendor/github.com/googleapis/gax-go/v2/internal/version.go b/vendor/github.com/googleapis/gax-go/v2/internal/version.go index 4f780f46395..e12421cf599 100644 --- a/vendor/github.com/googleapis/gax-go/v2/internal/version.go +++ b/vendor/github.com/googleapis/gax-go/v2/internal/version.go @@ -30,4 +30,4 @@ package internal // Version is the current tagged release of the library. -const Version = "2.12.5" +const Version = "2.13.0" diff --git a/vendor/github.com/segmentio/fasthash/fnv1a/hash.go b/vendor/github.com/segmentio/fasthash/fnv1a/hash.go index d2f3c966844..92849b1142b 100644 --- a/vendor/github.com/segmentio/fasthash/fnv1a/hash.go +++ b/vendor/github.com/segmentio/fasthash/fnv1a/hash.go @@ -14,6 +14,11 @@ func HashString64(s string) uint64 { return AddString64(Init64, s) } +// HashBytes64 returns the hash of u. +func HashBytes64(b []byte) uint64 { + return AddBytes64(Init64, b) +} + // HashUint64 returns the hash of u. func HashUint64(u uint64) uint64 { return AddUint64(Init64, u) @@ -34,24 +39,69 @@ func AddString64(h uint64, s string) uint64 { - BenchmarkHash64/hash_function-4 50000000 38.6 ns/op 932.35 MB/s 0 B/op 0 allocs/op */ + for len(s) >= 8 { + h = (h ^ uint64(s[0])) * prime64 + h = (h ^ uint64(s[1])) * prime64 + h = (h ^ uint64(s[2])) * prime64 + h = (h ^ uint64(s[3])) * prime64 + h = (h ^ uint64(s[4])) * prime64 + h = (h ^ uint64(s[5])) * prime64 + h = (h ^ uint64(s[6])) * prime64 + h = (h ^ uint64(s[7])) * prime64 + s = s[8:] + } + + if len(s) >= 4 { + h = (h ^ uint64(s[0])) * prime64 + h = (h ^ uint64(s[1])) * prime64 + h = (h ^ uint64(s[2])) * prime64 + h = (h ^ uint64(s[3])) * prime64 + s = s[4:] + } + + if len(s) >= 2 { + h = (h ^ uint64(s[0])) * prime64 + h = (h ^ uint64(s[1])) * prime64 + s = s[2:] + } + + if len(s) > 0 { + h = (h ^ uint64(s[0])) * prime64 + } + + return h +} + +// AddBytes64 adds the hash of b to the precomputed hash value h. +func AddBytes64(h uint64, b []byte) uint64 { + for len(b) >= 8 { + h = (h ^ uint64(b[0])) * prime64 + h = (h ^ uint64(b[1])) * prime64 + h = (h ^ uint64(b[2])) * prime64 + h = (h ^ uint64(b[3])) * prime64 + h = (h ^ uint64(b[4])) * prime64 + h = (h ^ uint64(b[5])) * prime64 + h = (h ^ uint64(b[6])) * prime64 + h = (h ^ uint64(b[7])) * prime64 + b = b[8:] + } + + if len(b) >= 4 { + h = (h ^ uint64(b[0])) * prime64 + h = (h ^ uint64(b[1])) * prime64 + h = (h ^ uint64(b[2])) * prime64 + h = (h ^ uint64(b[3])) * prime64 + b = b[4:] + } - i := 0 - n := (len(s) / 8) * 8 - - for i != n { - h = (h ^ uint64(s[i])) * prime64 - h = (h ^ uint64(s[i+1])) * prime64 - h = (h ^ uint64(s[i+2])) * prime64 - h = (h ^ uint64(s[i+3])) * prime64 - h = (h ^ uint64(s[i+4])) * prime64 - h = (h ^ uint64(s[i+5])) * prime64 - h = (h ^ uint64(s[i+6])) * prime64 - h = (h ^ uint64(s[i+7])) * prime64 - i += 8 + if len(b) >= 2 { + h = (h ^ uint64(b[0])) * prime64 + h = (h ^ uint64(b[1])) * prime64 + b = b[2:] } - for _, c := range s[i:] { - h = (h ^ uint64(c)) * prime64 + if len(b) > 0 { + h = (h ^ uint64(b[0])) * prime64 } return h diff --git a/vendor/github.com/segmentio/fasthash/fnv1a/hash32.go b/vendor/github.com/segmentio/fasthash/fnv1a/hash32.go index df1f3e5b07f..ac91e247034 100644 --- a/vendor/github.com/segmentio/fasthash/fnv1a/hash32.go +++ b/vendor/github.com/segmentio/fasthash/fnv1a/hash32.go @@ -14,6 +14,11 @@ func HashString32(s string) uint32 { return AddString32(Init32, s) } +// HashBytes32 returns the hash of u. +func HashBytes32(b []byte) uint32 { + return AddBytes32(Init32, b) +} + // HashUint32 returns the hash of u. func HashUint32(u uint32) uint32 { return AddUint32(Init32, u) @@ -21,23 +26,69 @@ func HashUint32(u uint32) uint32 { // AddString32 adds the hash of s to the precomputed hash value h. func AddString32(h uint32, s string) uint32 { - i := 0 - n := (len(s) / 8) * 8 - - for i != n { - h = (h ^ uint32(s[i])) * prime32 - h = (h ^ uint32(s[i+1])) * prime32 - h = (h ^ uint32(s[i+2])) * prime32 - h = (h ^ uint32(s[i+3])) * prime32 - h = (h ^ uint32(s[i+4])) * prime32 - h = (h ^ uint32(s[i+5])) * prime32 - h = (h ^ uint32(s[i+6])) * prime32 - h = (h ^ uint32(s[i+7])) * prime32 - i += 8 - } - - for _, c := range s[i:] { - h = (h ^ uint32(c)) * prime32 + for len(s) >= 8 { + h = (h ^ uint32(s[0])) * prime32 + h = (h ^ uint32(s[1])) * prime32 + h = (h ^ uint32(s[2])) * prime32 + h = (h ^ uint32(s[3])) * prime32 + h = (h ^ uint32(s[4])) * prime32 + h = (h ^ uint32(s[5])) * prime32 + h = (h ^ uint32(s[6])) * prime32 + h = (h ^ uint32(s[7])) * prime32 + s = s[8:] + } + + if len(s) >= 4 { + h = (h ^ uint32(s[0])) * prime32 + h = (h ^ uint32(s[1])) * prime32 + h = (h ^ uint32(s[2])) * prime32 + h = (h ^ uint32(s[3])) * prime32 + s = s[4:] + } + + if len(s) >= 2 { + h = (h ^ uint32(s[0])) * prime32 + h = (h ^ uint32(s[1])) * prime32 + s = s[2:] + } + + if len(s) > 0 { + h = (h ^ uint32(s[0])) * prime32 + } + + return h +} + +// AddBytes32 adds the hash of b to the precomputed hash value h. +func AddBytes32(h uint32, b []byte) uint32 { + for len(b) >= 8 { + h = (h ^ uint32(b[0])) * prime32 + h = (h ^ uint32(b[1])) * prime32 + h = (h ^ uint32(b[2])) * prime32 + h = (h ^ uint32(b[3])) * prime32 + h = (h ^ uint32(b[4])) * prime32 + h = (h ^ uint32(b[5])) * prime32 + h = (h ^ uint32(b[6])) * prime32 + h = (h ^ uint32(b[7])) * prime32 + b = b[8:] + } + + if len(b) >= 4 { + h = (h ^ uint32(b[0])) * prime32 + h = (h ^ uint32(b[1])) * prime32 + h = (h ^ uint32(b[2])) * prime32 + h = (h ^ uint32(b[3])) * prime32 + b = b[4:] + } + + if len(b) >= 2 { + h = (h ^ uint32(b[0])) * prime32 + h = (h ^ uint32(b[1])) * prime32 + b = b[2:] + } + + if len(b) > 0 { + h = (h ^ uint32(b[0])) * prime32 } return h diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/aggregate.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/aggregate.go index 60fbb767252..591ed36ff1a 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/aggregate.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/aggregate.go @@ -26,7 +26,7 @@ type Aggregate struct { Stats []AggregateCellStats `json:"stats"` } -func (rs *Aggregate) Data() any { +func (rs *Aggregate) SerializableData() any { return rs } diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/col_stats.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/col_stats.go index 1b464a78b7b..ea8fe2cb41c 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/col_stats.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/col_stats.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "io" + "strings" "github.com/parquet-go/parquet-go" "github.com/stoewer/parquet-cli/pkg/output" @@ -11,6 +12,19 @@ import ( var ( columnStatHeader = [...]any{ + "Index", + "Name", + "Max Def", + "Max Rep", + "Size", + "Compressed size", + "Pages", + "Rows", + "Values", + "Nulls", + "Path", + } + columnStatHeaderFull = [...]any{ "Index", "Name", "Max Def", @@ -27,59 +41,73 @@ var ( "Nulls", "Page min nulls", "Page max nulls", + "Path", } ) type ColumnStats struct { Index int `json:"index"` Name string `json:"name"` - MaxDef int `json:"maxDef"` - MaxRep int `json:"maxRep"` + MaxDef int `json:"max_def"` + MaxRep int `json:"max_rep"` Size int64 `json:"size"` - CompressedSize int64 `json:"compressedSize"` + CompressedSize int64 `json:"compressed_size"` Pages int `json:"pages"` Rows int64 `json:"rows"` - PageMinRows int64 `json:"pageMinRows"` - PageMaxRows int64 `json:"pageMaxRows"` Values int64 `json:"values"` - PageMinValues int64 `json:"pageMinValues"` - PageMaxValues int64 `json:"pageMaxValues"` Nulls int64 `json:"nulls"` - PageMinNulls int64 `json:"pageMinNulls"` - PageMaxNulls int64 `json:"pageMaxNulls"` + Path string `json:"path"` +} - cells []any +func (rs *ColumnStats) Cells() []any { + return []any{ + rs.Index, + rs.Name, + rs.MaxDef, + rs.MaxRep, + rs.Size, + rs.CompressedSize, + rs.Pages, + rs.Rows, + rs.Values, + rs.Nulls, + rs.Path, + } } -func (rs *ColumnStats) Data() any { - return rs +type ColumnStatsFull struct { + ColumnStats + PageMinRows int64 `json:"page_min_rows"` + PageMaxRows int64 `json:"page_max_rows"` + PageMinValues int64 `json:"page_min_values"` + PageMaxValues int64 `json:"page_max_values"` + PageMinNulls int64 `json:"page_min_nulls"` + PageMaxNulls int64 `json:"page_max_nulls"` } -func (rs *ColumnStats) Cells() []any { - if rs.cells == nil { - rs.cells = []any{ - rs.Index, - rs.Name, - rs.MaxDef, - rs.MaxRep, - rs.Size, - rs.CompressedSize, - rs.Pages, - rs.Rows, - rs.PageMinRows, - rs.PageMaxRows, - rs.Values, - rs.PageMinValues, - rs.PageMaxValues, - rs.Nulls, - rs.PageMinNulls, - rs.PageMaxNulls, - } +func (rs *ColumnStatsFull) Cells() []any { + return []any{ + rs.Index, + rs.Name, + rs.MaxDef, + rs.MaxRep, + rs.Size, + rs.CompressedSize, + rs.Pages, + rs.Rows, + rs.PageMinRows, + rs.PageMaxRows, + rs.Values, + rs.PageMinValues, + rs.PageMaxValues, + rs.Nulls, + rs.PageMinNulls, + rs.PageMaxNulls, + rs.Path, } - return rs.cells } -func NewColStatCalculator(file *parquet.File, selectedCols []int) (*ColStatCalculator, error) { +func NewColStatCalculator(file *parquet.File, selectedCols []int, verbose bool) (*ColStatCalculator, error) { all := LeafColumns(file) var columns []*parquet.Column @@ -95,16 +123,20 @@ func NewColStatCalculator(file *parquet.File, selectedCols []int) (*ColStatCalcu } } - return &ColStatCalculator{file: file, columns: columns}, nil + return &ColStatCalculator{file: file, columns: columns, verbose: verbose}, nil } type ColStatCalculator struct { file *parquet.File + verbose bool columns []*parquet.Column current int } func (cc *ColStatCalculator) Header() []any { + if cc.verbose { + return columnStatHeaderFull[:] + } return columnStatHeader[:] } @@ -115,11 +147,13 @@ func (cc *ColStatCalculator) NextRow() (output.TableRow, error) { col := cc.columns[cc.current] cc.current++ - stats := ColumnStats{ - Index: col.Index(), - Name: col.Name(), - MaxDef: col.MaxDefinitionLevel(), - MaxRep: col.MaxRepetitionLevel(), + stats := ColumnStatsFull{ + ColumnStats: ColumnStats{ + Index: col.Index(), + Name: PathToDisplayName(col.Path()), + MaxDef: col.MaxDefinitionLevel(), + MaxRep: col.MaxRepetitionLevel(), + }, } for _, rg := range cc.file.RowGroups() { @@ -135,26 +169,40 @@ func (cc *ColStatCalculator) NextRow() (output.TableRow, error) { } } + path := strings.Join(col.Path(), ".") + pages := chunk.Pages() page, err := pages.ReadPage() for err == nil { stats.Pages++ stats.Size += page.Size() stats.Rows += page.NumRows() - stats.PageMinRows = min(stats.PageMinRows, page.NumRows()) - stats.PageMaxRows = max(stats.PageMaxRows, page.NumRows()) stats.Values += page.NumValues() - stats.PageMinValues = min(stats.PageMinValues, page.NumRows()) - stats.PageMaxValues = max(stats.PageMaxValues, page.NumRows()) stats.Nulls += page.NumNulls() + stats.PageMinNulls = min(stats.PageMinNulls, page.NumNulls()) stats.PageMaxNulls = max(stats.PageMaxNulls, page.NumNulls()) + stats.PageMinValues = min(stats.PageMinValues, page.NumRows()) + stats.PageMaxValues = max(stats.PageMaxValues, page.NumRows()) + stats.PageMinRows = min(stats.PageMinRows, page.NumRows()) + stats.PageMaxRows = max(stats.PageMaxRows, page.NumRows()) + + stats.Path = path + page, err = pages.ReadPage() } + if !errors.Is(err, io.EOF) { return nil, fmt.Errorf("unable to read page rom column '%s': %w", col.Name(), err) } } - return &stats, nil + if cc.verbose { + return &stats, nil + } + return &stats.ColumnStats, nil +} + +func (cc *ColStatCalculator) NextSerializable() (any, error) { + return cc.NextRow() } diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/file_info.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/file_info.go index ab884aa9bf0..a2b268a239f 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/file_info.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/file_info.go @@ -68,7 +68,7 @@ func (i *FileInfo) Add(k string, v any) { i.keys = append(i.keys, k) } -func (i *FileInfo) Data() any { +func (i *FileInfo) SerializableData() any { return i.elem } diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/inspect.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/inspect.go index c9d2f2a4d8a..af7efe7ea49 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/inspect.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/inspect.go @@ -29,3 +29,15 @@ func LeafColumns(file *parquet.File) []*parquet.Column { sort.SliceStable(leafs, func(i, j int) bool { return leafs[i].Index() < leafs[j].Index() }) return leafs } + +func PathToDisplayName(path []string) string { + l := len(path) + if l > 3 { + if path[l-2] == "list" && path[l-1] == "element" { + return path[l-3] + } else if path[l-2] == "key_value" && (path[l-1] == "key" || path[l-1] == "value") { + return path[l-3] + "." + path[l-1] + } + } + return path[l-1] +} diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_dump.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_dump.go index 895f34646e4..cb1e4df6a4a 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_dump.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_dump.go @@ -12,10 +12,6 @@ type DumpLine struct { Line []*parquet.Value } -func (d *DumpLine) Data() any { - return d.Line -} - func (d *DumpLine) Cells() []any { cells := make([]any, 0, len(d.Line)+1) if d.RowNumber == nil { @@ -27,12 +23,10 @@ func (d *DumpLine) Cells() []any { for _, v := range d.Line { if v == nil { cells = append(cells, "") + } else if v.IsNull() { + cells = append(cells, "null") } else { - if v.IsNull() { - cells = append(cells, fmt.Sprintf("%v %d:%d", v, v.DefinitionLevel(), v.RepetitionLevel())) - } else { - cells = append(cells, fmt.Sprintf("'%v' %d:%d", v, v.DefinitionLevel(), v.RepetitionLevel())) - } + cells = append(cells, v.String()) } } return cells @@ -74,7 +68,7 @@ func NewRowDump(file *parquet.File, options RowDumpOptions) (*RowDump, error) { return nil, fmt.Errorf("unable to create row stats calculator: %w", err) } c.columnIter = append(c.columnIter, it) - c.header = append(c.header, col.Name()+" d:r") + c.header = append(c.header, col.Name()) } return &c, nil diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_stats.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_stats.go index 81b25f525f0..22534cc28bf 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_stats.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/row_stats.go @@ -23,7 +23,7 @@ type RowStats struct { Stats []RowCellStats } -func (rs *RowStats) Data() any { +func (rs *RowStats) SerializableData() any { return rs.Stats } diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/inspect/schema.go b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/schema.go new file mode 100644 index 00000000000..bfed052ac4d --- /dev/null +++ b/vendor/github.com/stoewer/parquet-cli/pkg/inspect/schema.go @@ -0,0 +1,168 @@ +package inspect + +import ( + "fmt" + "io" + "strings" + + "github.com/stoewer/parquet-cli/pkg/output" + + "github.com/parquet-go/parquet-go" +) + +var schemaHeader = [...]any{ + "Index", + "Name", + "Optional", + "Repeated", + "Required", + "Is Leaf", + "Type", + "Go Type", + "Encoding", + "Compression", + "Path", +} + +type Schema struct { + pf *parquet.File + + fields []fieldWithPath + next int +} + +func NewSchema(pf *parquet.File) *Schema { + return &Schema{pf: pf} +} + +func (s *Schema) Text() (string, error) { + textRaw := s.pf.Schema().String() + + var text strings.Builder + for _, r := range textRaw { + if r == '\t' { + text.WriteString(" ") + } else { + text.WriteRune(r) + } + } + + return text.String(), nil +} + +func (s *Schema) Header() []any { + return schemaHeader[:] +} + +func (s *Schema) NextRow() (output.TableRow, error) { + if s.fields == nil { + s.fields = fieldsFromSchema(s.pf.Schema()) + } + if s.next >= len(s.fields) { + return nil, fmt.Errorf("no more fields: %w", io.EOF) + } + + nextField := s.fields[s.next] + s.next++ + return toSchemaNode(&nextField), nil +} + +func (s *Schema) NextSerializable() (any, error) { + return s.NextRow() +} + +func toSchemaNode(n *fieldWithPath) *schemaNode { + sn := &schemaNode{ + Index: n.Index, + Name: n.Name(), + Optional: n.Optional(), + Repeated: n.Repeated(), + Required: n.Required(), + IsLeaf: n.Leaf(), + } + + if n.Leaf() { + sn.Type = n.Type().String() + sn.GoType = n.GoType().String() + if n.Encoding() != nil { + sn.Encoding = n.Encoding().String() + } + if n.Compression() != nil { + sn.Compression = n.Compression().String() + } + } + + if len(n.Path) > 0 { + sn.Path = strings.Join(n.Path, ".") + sn.Name = PathToDisplayName(n.Path) + } + + return sn +} + +type schemaNode struct { + Index int `json:"index,omitempty"` + Name string `json:"name"` + Optional bool `json:"optional"` + Repeated bool `json:"repeated"` + Required bool `json:"required"` + IsLeaf bool `json:"is_leaf"` + Type string `json:"type,omitempty"` + GoType string `json:"go_type,omitempty"` + Encoding string `json:"encoding,omitempty"` + Compression string `json:"compression,omitempty"` + Path string `json:"path,omitempty"` +} + +func (sn *schemaNode) Cells() []any { + return []any{ + sn.Index, + sn.Name, + sn.Optional, + sn.Repeated, + sn.Required, + sn.IsLeaf, + sn.Type, + sn.GoType, + sn.Encoding, + sn.Compression, + sn.Path, + } +} + +type fieldWithPath struct { + parquet.Field + Path []string + Index int +} + +func fieldsFromSchema(schema *parquet.Schema) []fieldWithPath { + result := make([]fieldWithPath, 0) + + for _, field := range schema.Fields() { + result = fieldsFromPathRecursive(field, []string{}, result) + } + + var idx int + for i := range result { + if result[i].Leaf() { + result[i].Index = idx + idx++ + } + } + + return result +} + +func fieldsFromPathRecursive(field parquet.Field, path []string, result []fieldWithPath) []fieldWithPath { + cpy := path[:len(path):len(path)] + path = append(cpy, field.Name()) + + result = append(result, fieldWithPath{Field: field, Path: path}) + + for _, child := range field.Fields() { + result = fieldsFromPathRecursive(child, path, result) + } + + return result +} diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/output/format.go b/vendor/github.com/stoewer/parquet-cli/pkg/output/format.go new file mode 100644 index 00000000000..feef17ebac1 --- /dev/null +++ b/vendor/github.com/stoewer/parquet-cli/pkg/output/format.go @@ -0,0 +1,56 @@ +package output + +import ( + "errors" + "fmt" +) + +// Format describes a printable data representation. +type Format string + +const ( + FormatJSON = "json" + FormatCSV = "csv" + FormatTab = "tab" + FormatText = "text" +) + +func (f *Format) Validate() error { + switch *f { + case FormatJSON, FormatTab, FormatCSV, FormatText: + return nil + default: + return errors.New("output format is expected to be 'json', 'tab', 'text' or 'csv'") + } +} + +func supportedFormats(data any) []Format { + var formats []Format + switch data.(type) { + case Serializable, SerializableIterator: + formats = append(formats, FormatJSON) + case Table, TableIterator: + formats = append(formats, FormatTab, FormatCSV) + case Text: + formats = append(formats, FormatText) + } + return formats +} + +func errUnsupportedFormat(data any, f Format) error { + supported := supportedFormats(data) + + var supportedPretty string + for i, format := range supportedFormats(data) { + if i > 0 { + if i == len(supported)-1 { + supportedPretty += " or " + } else { + supportedPretty += ", " + } + } + supportedPretty += "'" + string(format) + "'" + } + + return fmt.Errorf("format '%s' is not supported must be %s", f, supportedPretty) +} diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/output/interfaces.go b/vendor/github.com/stoewer/parquet-cli/pkg/output/interfaces.go new file mode 100644 index 00000000000..fd6b7867378 --- /dev/null +++ b/vendor/github.com/stoewer/parquet-cli/pkg/output/interfaces.go @@ -0,0 +1,42 @@ +package output + +// A Table represents a tabular data that can also be printed as CSV. +// Suitable for small tables that fit into memory. +type Table interface { + Header() []string + Rows() []TableRow +} + +// A TableIterator that can efficiently be printed as large table or CSV. +// Suitable for larger tables that do not fit into memory. +type TableIterator interface { + // Header returns the header of the table + Header() []any + // NextRow returns a new TableRow until the error is io.EOF + NextRow() (TableRow, error) +} + +// A TableRow represents all data that belongs to a table row. +type TableRow interface { + // Cells returns all table cells for this row. This is used to + // print tabular formats such csv. The returned slice has the same + // length as the header slice returned by the parent TableIterator. + Cells() []any +} + +// Serializable represents data that can be converted to JSON or YAML. +type Serializable interface { + // SerializableData returns arbitrary data that can be converted to formats like JSON or YAML. + SerializableData() any +} + +// SerializableIterator represents a stream of data that can be converted to JSON or YAML. +type SerializableIterator interface { + NextSerializable() (any, error) +} + +// Text represents a multi line text that can be printed but is not a table or another +// structured format such as JSON or YAML. +type Text interface { + Text() (string, error) +} diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/output/output.go b/vendor/github.com/stoewer/parquet-cli/pkg/output/output.go index 44b490bb523..d668c3ddee2 100644 --- a/vendor/github.com/stoewer/parquet-cli/pkg/output/output.go +++ b/vendor/github.com/stoewer/parquet-cli/pkg/output/output.go @@ -2,61 +2,17 @@ package output import ( "bytes" - "encoding/csv" "encoding/json" "errors" "fmt" "io" - "strings" - "text/tabwriter" ) -// Format describes a printable data representation. -type Format string - -const ( - FormatJSON = "json" - FormatCSV = "csv" - FormatTab = "tab" -) - -func (f *Format) Validate() error { - switch *f { - case FormatJSON, FormatTab, FormatCSV: - return nil - default: - return errors.New("output format is expected to be 'json', 'tab', or 'csv'") - } -} - -// A Table that can be printed / encoded in different output formats. -type Table interface { - // Header returns the header of the table - Header() []any - // NextRow returns a new TableRow until the error is io.EOF - NextRow() (TableRow, error) -} - -// SerializableData represents table data that can be converted to JSON. -type SerializableData interface { - // Data returns the table data suitable for structured data formats - // such as json. - Data() any -} - -// A TableRow represents all data that belongs to a table row. -type TableRow interface { - // Cells returns all table cells for this row. This is used to - // print tabular formats such csv. The returned slice has the same - // length as the header slice returned by the parent Table. - Cells() []any -} - -// PrintTable writes the Table data to w using the provided format. -func PrintTable(w io.Writer, f Format, data Table) error { +// PrintTable writes the TableIterator data to w using the provided format. +func PrintTable(w io.Writer, f Format, data TableIterator) error { switch f { case FormatJSON: - return printJSON(w, data) + return printTableToJSON(w, data) case FormatTab: return printTab(w, data) case FormatCSV: @@ -66,73 +22,11 @@ func PrintTable(w io.Writer, f Format, data Table) error { } } -func printTab(w io.Writer, data Table) error { - tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0) - - formatBuilder := strings.Builder{} - for range data.Header() { - formatBuilder.WriteString("%v\t") - } - formatBuilder.WriteRune('\n') - format := formatBuilder.String() - - _, err := fmt.Fprintf(tw, format, data.Header()...) - if err != nil { - return err - } - - row, err := data.NextRow() - for err == nil { - _, err = fmt.Fprintf(tw, format, row.Cells()...) - if err != nil { - return err - } - - row, err = data.NextRow() - } - if err != nil && !errors.Is(err, io.EOF) { - return err - } - - return tw.Flush() -} - -func printCSV(w io.Writer, data Table) error { - cw := csv.NewWriter(w) - cw.Comma = ';' - - header := data.Header() - lineBuffer := make([]string, len(header)) - - line := toStringSlice(header, lineBuffer) - err := cw.Write(line) - if err != nil { - return err - } - - row, err := data.NextRow() - for err == nil { - line = toStringSlice(row.Cells(), lineBuffer) - err = cw.Write(line) - if err != nil { - return err - } - - row, err = data.NextRow() - } - if err != nil && !errors.Is(err, io.EOF) { - return err - } - - cw.Flush() - return cw.Error() -} - -func printJSON(w io.Writer, data Table) error { - if serializable, ok := data.(SerializableData); ok { +func printTableToJSON(w io.Writer, data TableIterator) error { + if serializable, ok := data.(Serializable); ok { enc := json.NewEncoder(w) enc.SetIndent("", " ") - return enc.Encode(serializable.Data()) + return enc.Encode(serializable.SerializableData()) } _, err := fmt.Fprintln(w, "[") @@ -153,13 +47,13 @@ func printJSON(w io.Writer, data Table) error { if err != nil { return err } - serializableRow, ok := row.(SerializableData) + serializableRow, ok := row.(Serializable) if !ok { return errors.New("JSON not supported for sub command") } buf.Reset() - err = json.NewEncoder(buf).Encode(serializableRow.Data()) + err = json.NewEncoder(buf).Encode(serializableRow.SerializableData()) if err != nil { return err } @@ -180,24 +74,3 @@ func printJSON(w io.Writer, data Table) error { _, err = fmt.Println("\n]") return err } - -func toStringSlice(in []any, buf []string) []string { - for i, v := range in { - var s string - switch v := v.(type) { - case string: - s = v - case fmt.Stringer: - s = v.String() - default: - s = fmt.Sprint(v) - } - - if i < len(buf) { - buf[i] = s - } else { - buf = append(buf, s) - } - } - return buf[0:len(in)] -} diff --git a/vendor/github.com/stoewer/parquet-cli/pkg/output/print.go b/vendor/github.com/stoewer/parquet-cli/pkg/output/print.go new file mode 100644 index 00000000000..f902475bdc2 --- /dev/null +++ b/vendor/github.com/stoewer/parquet-cli/pkg/output/print.go @@ -0,0 +1,178 @@ +package output + +import ( + "bytes" + "encoding/csv" + "encoding/json" + "errors" + "fmt" + "io" + "strings" + "text/tabwriter" + "unsafe" +) + +type PrintOptions struct { + Format Format + Color bool +} + +func Print(out io.Writer, data any, opts *PrintOptions) error { + switch opts.Format { + case FormatText: + if text, ok := data.(Text); ok { + return printText(out, text) + } + case FormatTab: + if table, ok := data.(TableIterator); ok { + return printTab(out, table) + } + case FormatCSV: + if table, ok := data.(TableIterator); ok { + return printCSV(out, table) + } + case FormatJSON: + if ser, ok := data.(SerializableIterator); ok { + return printJSON(out, ser) + } + } + return errUnsupportedFormat(data, opts.Format) +} + +func printJSON(w io.Writer, data SerializableIterator) error { + _, err := fmt.Fprintln(w, "[") + if err != nil { + return err + } + + var count int + buf := bytes.NewBuffer(make([]byte, 10240)) + next, err := data.NextSerializable() + + for err == nil { + if count > 0 { + _, err = fmt.Fprint(w, ",\n ") + } else { + _, err = fmt.Fprint(w, " ") + } + if err != nil { + return err + } + + buf.Reset() + err = json.NewEncoder(buf).Encode(next) + if err != nil { + return err + } + buf.Truncate(buf.Len() - 1) // remove the newline + + _, err = fmt.Fprint(w, buf) + if err != nil { + return err + } + + count++ + next, err = data.NextSerializable() + } + if !errors.Is(err, io.EOF) { + return err + } + + _, err = fmt.Println("\n]") + return err +} + +func printTab(w io.Writer, data TableIterator) error { + tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0) + + formatBuilder := strings.Builder{} + for range data.Header() { + formatBuilder.WriteString("%v\t") + } + formatBuilder.WriteRune('\n') + format := formatBuilder.String() + + _, err := fmt.Fprintf(tw, format, data.Header()...) + if err != nil { + return err + } + + row, err := data.NextRow() + for err == nil { + _, err = fmt.Fprintf(tw, format, row.Cells()...) + if err != nil { + return err + } + + row, err = data.NextRow() + } + if !errors.Is(err, io.EOF) { + return err + } + + return tw.Flush() +} + +func printCSV(w io.Writer, data TableIterator) error { + cw := csv.NewWriter(w) + cw.Comma = ';' + + header := data.Header() + lineBuffer := make([]string, len(header)) + + line := toStringSlice(header, lineBuffer) + err := cw.Write(line) + if err != nil { + return err + } + + row, err := data.NextRow() + for err == nil { + line = toStringSlice(row.Cells(), lineBuffer) + err = cw.Write(line) + if err != nil { + return err + } + + row, err = data.NextRow() + } + if !errors.Is(err, io.EOF) { + return err + } + + cw.Flush() + return cw.Error() +} + +func toStringSlice(in []any, buf []string) []string { + for i, v := range in { + var s string + switch v := v.(type) { + case string: + s = v + case fmt.Stringer: + s = v.String() + default: + s = fmt.Sprint(v) + } + + if i < len(buf) { + buf[i] = s + } else { + buf = append(buf, s) + } + } + return buf[0:len(in)] +} + +func printText(out io.Writer, data Text) error { + s, err := data.Text() + if err != nil { + return fmt.Errorf("unable to print text: %w", err) + } + + b := unsafe.Slice(unsafe.StringData(s), len(s)) + + _, err = out.Write(b) + return err +} diff --git a/vendor/go.opentelemetry.io/collector/config/configtls/README.md b/vendor/go.opentelemetry.io/collector/config/configtls/README.md index aecfc284b41..b7ea4e84e76 100644 --- a/vendor/go.opentelemetry.io/collector/config/configtls/README.md +++ b/vendor/go.opentelemetry.io/collector/config/configtls/README.md @@ -11,8 +11,9 @@ Note that mutual TLS (mTLS) is also supported. By default, TLS is enabled: - `insecure` (default = false): whether to enable client transport security for - the exporter's gRPC connection. See - [grpc.WithInsecure()](https://godoc.org/google.golang.org/grpc#WithInsecure). + the exporter's HTTPs or gRPC connection. See + [grpc.WithInsecure()](https://godoc.org/google.golang.org/grpc#WithInsecure) + for gRPC. As a result, the following parameters are also required: @@ -122,6 +123,7 @@ Beyond TLS configuration, the following setting can optionally be configured client certificate. (optional) This sets the ClientCAs and ClientAuth to RequireAndVerifyClientCert in the TLSConfig. Please refer to https://godoc.org/crypto/tls#Config for more information. +- `client_ca_file_reload` (default = false): Reload the ClientCAs file when it is modified. Example: diff --git a/vendor/go.opentelemetry.io/collector/config/configtls/configtls.go b/vendor/go.opentelemetry.io/collector/config/configtls/configtls.go index 569ae606152..2ce0490b16c 100644 --- a/vendor/go.opentelemetry.io/collector/config/configtls/configtls.go +++ b/vendor/go.opentelemetry.io/collector/config/configtls/configtls.go @@ -86,11 +86,9 @@ type ClientConfig struct { // These are config options specific to client connections. - // In gRPC when set to true, this is used to disable the client transport security. - // See https://godoc.org/google.golang.org/grpc#WithInsecure. - // In HTTP, this disables verifying the server's certificate chain and host name - // (InsecureSkipVerify in the tls Config). Please refer to - // https://godoc.org/crypto/tls#Config for more information. + // In gRPC and HTTP when set to true, this is used to disable the client transport security. + // See https://godoc.org/google.golang.org/grpc#WithInsecure for gRPC. + // Please refer to https://godoc.org/crypto/tls#Config for more information. // (optional, default false) Insecure bool `mapstructure:"insecure"` // InsecureSkipVerify will enable TLS but not verify the certificate. diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml index a5f904197fe..d09555506f7 100644 --- a/vendor/go.opentelemetry.io/otel/.golangci.yml +++ b/vendor/go.opentelemetry.io/otel/.golangci.yml @@ -25,6 +25,7 @@ linters: - revive - staticcheck - tenv + - testifylint - typecheck - unconvert - unused @@ -302,3 +303,9 @@ linters-settings: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value - name: waitgroup-by-value disabled: false + testifylint: + enable-all: true + disable: + - float-compare + - go-require + - require-error diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index fb107426e76..4b361d0269c 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -11,6 +11,35 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## [1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11 + +### Added + +- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes `Exemplar`, `Filter`, `TraceBasedFilter`, `AlwaysOnFilter`, `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and `ValueType` types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862) +- Add `WithExportBufferSize` option to log batch processor.(#5877) + +### Changed + +- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778) +- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791) +- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791) +- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847) +- Performance improvements for the trace SDK `SetAttributes` method in `Span`. (#5864) +- Reduce memory allocations for the `Event` and `Link` lists in `Span`. (#5858) +- Performance improvements for the trace SDK `AddEvent`, `AddLink`, `RecordError` and `End` methods in `Span`. (#5874) + +### Deprecated + +- Deprecate all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5854) + +### Fixed + +- The race condition for multiple `FixedSize` exemplar reservoirs identified in #5814 is resolved. (#5819) +- Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803) +- Fix timer channel drain to avoid hanging on Go 1.23. (#5868) +- Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827) +- Change the `reflect.TypeOf` to use a nil pointer to not allocate on the heap unless necessary. (#5827) + ## [1.30.0/0.52.0/0.6.0/0.0.9] 2024-09-09 ### Added @@ -3081,7 +3110,8 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.31.0...HEAD +[1.31.0/0.53.0/0.7.0/0.0.10]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.31.0 [1.30.0/0.52.0/0.6.0/0.0.9]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.30.0 [1.29.0/0.51.0/0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.29.0 [1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS index 5904bb7070e..945a07d2b07 100644 --- a/vendor/go.opentelemetry.io/otel/CODEOWNERS +++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS @@ -12,6 +12,6 @@ # https://help.github.com/en/articles/about-code-owners # -* @MrAlias @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu +* @MrAlias @XSAM @dashpole @pellared @dmathieu -CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole @XSAM @dmathieu +CODEOWNERS @MrAlias @pellared @dashpole @XSAM @dmathieu diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md index 91580725350..bb339655743 100644 --- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -631,11 +631,8 @@ should be canceled. ### Approvers -- [Chester Cheung](https://github.com/hanyuancheung), Tencent - ### Maintainers -- [Aaron Clawson](https://github.com/MadVikingGod), LightStep - [Damien Mathieu](https://github.com/dmathieu), Elastic - [David Ashpole](https://github.com/dashpole), Google - [Robert Pająk](https://github.com/pellared), Splunk @@ -644,11 +641,13 @@ should be canceled. ### Emeritus -- [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb -- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep -- [Josh MacDonald](https://github.com/jmacd), LightStep +- [Aaron Clawson](https://github.com/MadVikingGod), LightStep - [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Chester Cheung](https://github.com/hanyuancheung), Tencent - [Evan Torrie](https://github.com/evantorrie), Yahoo +- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep +- [Josh MacDonald](https://github.com/jmacd), LightStep +- [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb ### Become an Approver or a Maintainer diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index b04695b242f..a1228a21240 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -54,9 +54,6 @@ $(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer PORTO = $(TOOLS)/porto $(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto -GOJQ = $(TOOLS)/gojq -$(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq - GOTMPL = $(TOOLS)/gotmpl $(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl @@ -67,7 +64,7 @@ GOVULNCHECK = $(TOOLS)/govulncheck $(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck .PHONY: tools -tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) +tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) # Virtualized python tools via docker diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md index 9a65707038c..efec278905b 100644 --- a/vendor/go.opentelemetry.io/otel/README.md +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -89,8 +89,8 @@ If you need to extend the telemetry an instrumentation library provides or want to build your own instrumentation for your application directly you will need to use the [Go otel](https://pkg.go.dev/go.opentelemetry.io/otel) -package. The included [examples](./example/) are a good way to see some -practical uses of this process. +package. The [examples](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples) +are a good way to see some practical uses of this process. ### Export diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md index 59992984d42..ffa9b61258a 100644 --- a/vendor/go.opentelemetry.io/otel/RELEASING.md +++ b/vendor/go.opentelemetry.io/otel/RELEASING.md @@ -111,17 +111,6 @@ It is critical you make sure the version you push upstream is correct. Finally create a Release for the new `` on GitHub. The release body should include all the release notes from the Changelog for this release. -## Verify Examples - -After releasing verify that examples build outside of the repository. - -``` -./verify_examples.sh -``` - -The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. -This ensures they build with the published release, not the local copy. - ## Post-Release ### Contrib Repository diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go index bff9c7fdbb9..6cbefceadfe 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/set.go +++ b/vendor/go.opentelemetry.io/otel/attribute/set.go @@ -347,45 +347,25 @@ func computeDistinct(kvs []KeyValue) Distinct { func computeDistinctFixed(kvs []KeyValue) interface{} { switch len(kvs) { case 1: - ptr := new([1]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [1]KeyValue(kvs) case 2: - ptr := new([2]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [2]KeyValue(kvs) case 3: - ptr := new([3]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [3]KeyValue(kvs) case 4: - ptr := new([4]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [4]KeyValue(kvs) case 5: - ptr := new([5]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [5]KeyValue(kvs) case 6: - ptr := new([6]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [6]KeyValue(kvs) case 7: - ptr := new([7]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [7]KeyValue(kvs) case 8: - ptr := new([8]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [8]KeyValue(kvs) case 9: - ptr := new([9]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [9]KeyValue(kvs) case 10: - ptr := new([10]KeyValue) - copy((*ptr)[:], kvs) - return *ptr + return [10]KeyValue(kvs) default: return nil } diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go index f2fc3929b11..e3db438a09f 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -152,14 +152,17 @@ func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) return m.delegate.Int64Counter(name, options...) } - i := &siCounter{name: name, opts: options} cfg := metric.NewInt64CounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*siCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64Counter), nil + } + i := &siCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -172,14 +175,17 @@ func (m *meter) Int64UpDownCounter(name string, options ...metric.Int64UpDownCou return m.delegate.Int64UpDownCounter(name, options...) } - i := &siUpDownCounter{name: name, opts: options} cfg := metric.NewInt64UpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*siUpDownCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64UpDownCounter), nil + } + i := &siUpDownCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -192,14 +198,17 @@ func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOpti return m.delegate.Int64Histogram(name, options...) } - i := &siHistogram{name: name, opts: options} cfg := metric.NewInt64HistogramConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*siHistogram)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64Histogram), nil + } + i := &siHistogram{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -212,14 +221,17 @@ func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (met return m.delegate.Int64Gauge(name, options...) } - i := &siGauge{name: name, opts: options} cfg := metric.NewInt64GaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*siGauge)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64Gauge), nil + } + i := &siGauge{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -232,14 +244,17 @@ func (m *meter) Int64ObservableCounter(name string, options ...metric.Int64Obser return m.delegate.Int64ObservableCounter(name, options...) } - i := &aiCounter{name: name, opts: options} cfg := metric.NewInt64ObservableCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*aiCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64ObservableCounter), nil + } + i := &aiCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -252,14 +267,17 @@ func (m *meter) Int64ObservableUpDownCounter(name string, options ...metric.Int6 return m.delegate.Int64ObservableUpDownCounter(name, options...) } - i := &aiUpDownCounter{name: name, opts: options} cfg := metric.NewInt64ObservableUpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*aiUpDownCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64ObservableUpDownCounter), nil + } + i := &aiUpDownCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -272,14 +290,17 @@ func (m *meter) Int64ObservableGauge(name string, options ...metric.Int64Observa return m.delegate.Int64ObservableGauge(name, options...) } - i := &aiGauge{name: name, opts: options} cfg := metric.NewInt64ObservableGaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*aiGauge)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Int64ObservableGauge), nil + } + i := &aiGauge{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -292,14 +313,17 @@ func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOpti return m.delegate.Float64Counter(name, options...) } - i := &sfCounter{name: name, opts: options} cfg := metric.NewFloat64CounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*sfCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64Counter), nil + } + i := &sfCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -312,14 +336,17 @@ func (m *meter) Float64UpDownCounter(name string, options ...metric.Float64UpDow return m.delegate.Float64UpDownCounter(name, options...) } - i := &sfUpDownCounter{name: name, opts: options} cfg := metric.NewFloat64UpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*sfUpDownCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64UpDownCounter), nil + } + i := &sfUpDownCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -332,14 +359,17 @@ func (m *meter) Float64Histogram(name string, options ...metric.Float64Histogram return m.delegate.Float64Histogram(name, options...) } - i := &sfHistogram{name: name, opts: options} cfg := metric.NewFloat64HistogramConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*sfHistogram)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64Histogram), nil + } + i := &sfHistogram{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -352,14 +382,17 @@ func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) return m.delegate.Float64Gauge(name, options...) } - i := &sfGauge{name: name, opts: options} cfg := metric.NewFloat64GaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*sfGauge)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64Gauge), nil + } + i := &sfGauge{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -372,14 +405,17 @@ func (m *meter) Float64ObservableCounter(name string, options ...metric.Float64O return m.delegate.Float64ObservableCounter(name, options...) } - i := &afCounter{name: name, opts: options} cfg := metric.NewFloat64ObservableCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*afCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64ObservableCounter), nil + } + i := &afCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -392,14 +428,17 @@ func (m *meter) Float64ObservableUpDownCounter(name string, options ...metric.Fl return m.delegate.Float64ObservableUpDownCounter(name, options...) } - i := &afUpDownCounter{name: name, opts: options} cfg := metric.NewFloat64ObservableUpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*afUpDownCounter)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64ObservableUpDownCounter), nil + } + i := &afUpDownCounter{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -412,14 +451,17 @@ func (m *meter) Float64ObservableGauge(name string, options ...metric.Float64Obs return m.delegate.Float64ObservableGauge(name, options...) } - i := &afGauge{name: name, opts: options} cfg := metric.NewFloat64ObservableGaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf(i), + kind: reflect.TypeOf((*afGauge)(nil)), description: cfg.Description(), unit: cfg.Unit(), } + if f, ok := m.instruments[id]; ok { + return f.(metric.Float64ObservableGauge), nil + } + i := &afGauge{name: name, opts: options} m.instruments[id] = i return i, nil } @@ -487,6 +529,7 @@ func (c *registration) setDelegate(m metric.Meter) { reg, err := m.RegisterCallback(c.function, insts...) if err != nil { GetErrorHandler().Handle(err) + return } c.unreg = reg.Unregister diff --git a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go index 9b1da2c02b9..b2fe3e41d3b 100644 --- a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go +++ b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go @@ -20,7 +20,8 @@ func RawToBool(r uint64) bool { } func Int64ToRaw(i int64) uint64 { - return uint64(i) + // Assumes original was a valid int64 (overflow not checked). + return uint64(i) // nolint: gosec } func RawToInt64(r uint64) int64 { diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go index ea52e402331..a535782e1d9 100644 --- a/vendor/go.opentelemetry.io/otel/metric/instrument.go +++ b/vendor/go.opentelemetry.io/otel/metric/instrument.go @@ -351,7 +351,7 @@ func WithAttributeSet(attributes attribute.Set) MeasurementOption { // // cp := make([]attribute.KeyValue, len(attributes)) // copy(cp, attributes) -// WithAttributes(attribute.NewSet(cp...)) +// WithAttributeSet(attribute.NewSet(cp...)) // // [attribute.NewSet] may modify the passed attributes so this will make a copy // of attributes before creating a set in order to ensure this function is diff --git a/vendor/go.opentelemetry.io/otel/renovate.json b/vendor/go.opentelemetry.io/otel/renovate.json index 4d36b98cf48..0a29a2f13d8 100644 --- a/vendor/go.opentelemetry.io/otel/renovate.json +++ b/vendor/go.opentelemetry.io/otel/renovate.json @@ -23,6 +23,10 @@ { "matchPackageNames": ["google.golang.org/genproto/googleapis/**"], "groupName": "googleapis" + }, + { + "matchPackageNames": ["golang.org/x/**"], + "groupName": "golang.org/x" } ] } diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go index f4d1857c4f4..f2cdf3c6518 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go +++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go @@ -4,5 +4,6 @@ package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation" // Library represents the instrumentation library. -// Deprecated: please use Scope instead. +// +// Deprecated: use [Scope] instead. type Library = Scope diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go index 71386e2da4c..3677c83d7da 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go @@ -10,17 +10,16 @@ import ( "golang.org/x/sys/windows/registry" ) -// implements hostIDReader +// implements hostIDReader. type hostIDReaderWindows struct{} -// read reads MachineGuid from the windows registry key: -// SOFTWARE\Microsoft\Cryptography +// read reads MachineGuid from the Windows registry key: +// SOFTWARE\Microsoft\Cryptography. func (*hostIDReaderWindows) read() (string, error) { k, err := registry.OpenKey( registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Cryptography`, registry.QUERY_VALUE|registry.WOW64_64KEY, ) - if err != nil { return "", err } diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go index 5e3d199d785..a6a5a53c0ea 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go @@ -17,7 +17,6 @@ import ( func platformOSDescription() (string, error) { k, err := registry.OpenKey( registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) - if err != nil { return "", err } diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go index 1d399a75db2..4ce757dfd6b 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go @@ -316,7 +316,11 @@ func (bsp *batchSpanProcessor) processQueue() { bsp.batchMutex.Unlock() if shouldExport { if !bsp.timer.Stop() { - <-bsp.timer.C + // Handle both GODEBUG=asynctimerchan=[0|1] properly. + select { + case <-bsp.timer.C: + default: + } } if err := bsp.exportSpans(ctx); err != nil { otel.Handle(err) diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go index 821c83faa1d..8c308dd60a9 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go @@ -12,25 +12,26 @@ import ( // evictedQueue is a FIFO queue with a configurable capacity. type evictedQueue[T any] struct { - queue []T - capacity int - droppedCount int - logDropped func() + queue []T + capacity int + droppedCount int + logDroppedMsg string + logDroppedOnce sync.Once } func newEvictedQueueEvent(capacity int) evictedQueue[Event] { // Do not pre-allocate queue, do this lazily. return evictedQueue[Event]{ - capacity: capacity, - logDropped: sync.OnceFunc(func() { global.Warn("limit reached: dropping trace trace.Event") }), + capacity: capacity, + logDroppedMsg: "limit reached: dropping trace trace.Event", } } func newEvictedQueueLink(capacity int) evictedQueue[Link] { // Do not pre-allocate queue, do this lazily. return evictedQueue[Link]{ - capacity: capacity, - logDropped: sync.OnceFunc(func() { global.Warn("limit reached: dropping trace trace.Link") }), + capacity: capacity, + logDroppedMsg: "limit reached: dropping trace trace.Link", } } @@ -53,6 +54,10 @@ func (eq *evictedQueue[T]) add(value T) { eq.queue = append(eq.queue, value) } +func (eq *evictedQueue[T]) logDropped() { + eq.logDroppedOnce.Do(func() { global.Warn(eq.logDroppedMsg) }) +} + // copy returns a copy of the evictedQueue. func (eq *evictedQueue[T]) copy() []T { return slices.Clone(eq.queue) diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go index 32f862790c7..d511d0f271f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go @@ -99,7 +99,7 @@ func (s snapshot) InstrumentationScope() instrumentation.Scope { // InstrumentationLibrary returns information about the instrumentation // library that created the span. -func (s snapshot) InstrumentationLibrary() instrumentation.Library { +func (s snapshot) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility return s.instrumentationScope } diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go index ac90f1a2600..730fb85c3ef 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go @@ -62,7 +62,7 @@ type ReadOnlySpan interface { // InstrumentationLibrary returns information about the instrumentation // library that created the span. // Deprecated: please use InstrumentationScope instead. - InstrumentationLibrary() instrumentation.Library + InstrumentationLibrary() instrumentation.Library //nolint:staticcheck // This method needs to be define for backwards compatibility // Resource returns information about the entity that produced the span. Resource() *resource.Resource // DroppedAttributes returns the number of attributes dropped by the span @@ -174,6 +174,17 @@ func (s *recordingSpan) IsRecording() bool { s.mu.Lock() defer s.mu.Unlock() + return s.isRecording() +} + +// isRecording returns if this span is being recorded. If this span has ended +// this will return false. +// +// This method assumes s.mu.Lock is held by the caller. +func (s *recordingSpan) isRecording() bool { + if s == nil { + return false + } return s.endTime.IsZero() } @@ -182,11 +193,15 @@ func (s *recordingSpan) IsRecording() bool { // included in the set status when the code is for an error. If this span is // not being recorded than this method does nothing. func (s *recordingSpan) SetStatus(code codes.Code, description string) { - if !s.IsRecording() { + if s == nil { return } + s.mu.Lock() defer s.mu.Unlock() + if !s.isRecording() { + return + } if s.status.Code > code { return } @@ -210,12 +225,15 @@ func (s *recordingSpan) SetStatus(code codes.Code, description string) { // attributes the span is configured to have, the last added attributes will // be dropped. func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { - if !s.IsRecording() { + if s == nil || len(attributes) == 0 { return } s.mu.Lock() defer s.mu.Unlock() + if !s.isRecording() { + return + } limit := s.tracer.provider.spanLimits.AttributeCountLimit if limit == 0 { @@ -233,7 +251,7 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { // Otherwise, add without deduplication. When attributes are read they // will be deduplicated, optimizing the operation. - s.attributes = slices.Grow(s.attributes, len(s.attributes)+len(attributes)) + s.attributes = slices.Grow(s.attributes, len(attributes)) for _, a := range attributes { if !a.Valid() { // Drop all invalid attributes. @@ -280,13 +298,17 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { // Do not set a capacity when creating this map. Benchmark testing has // showed this to only add unused memory allocations in general use. - exists := make(map[attribute.Key]int) - s.dedupeAttrsFromRecord(&exists) + exists := make(map[attribute.Key]int, len(s.attributes)) + s.dedupeAttrsFromRecord(exists) // Now that s.attributes is deduplicated, adding unique attributes up to // the capacity of s will not over allocate s.attributes. - sum := len(attrs) + len(s.attributes) - s.attributes = slices.Grow(s.attributes, min(sum, limit)) + + // max size = limit + maxCap := min(len(attrs)+len(s.attributes), limit) + if cap(s.attributes) < maxCap { + s.attributes = slices.Grow(s.attributes, maxCap-cap(s.attributes)) + } for _, a := range attrs { if !a.Valid() { // Drop all invalid attributes. @@ -296,6 +318,7 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { if idx, ok := exists[a.Key]; ok { // Perform all updates before dropping, even when at capacity. + a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) s.attributes[idx] = a continue } @@ -386,9 +409,10 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) { // the span's duration in case some operation below takes a while. et := monotonicEndTime(s.startTime) - // Do relative expensive check now that we have an end time and see if we - // need to do any more processing. - if !s.IsRecording() { + // Lock the span now that we have an end time and see if we need to do any more processing. + s.mu.Lock() + if !s.isRecording() { + s.mu.Unlock() return } @@ -413,10 +437,11 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) { } if s.executionTracerTaskEnd != nil { + s.mu.Unlock() s.executionTracerTaskEnd() + s.mu.Lock() } - s.mu.Lock() // Setting endTime to non-zero marks the span as ended and not recording. if config.Timestamp().IsZero() { s.endTime = et @@ -450,7 +475,13 @@ func monotonicEndTime(start time.Time) time.Time { // does not change the Span status. If this span is not being recorded or err is nil // than this method does nothing. func (s *recordingSpan) RecordError(err error, opts ...trace.EventOption) { - if s == nil || err == nil || !s.IsRecording() { + if s == nil || err == nil { + return + } + + s.mu.Lock() + defer s.mu.Unlock() + if !s.isRecording() { return } @@ -486,14 +517,23 @@ func recordStackTrace() string { } // AddEvent adds an event with the provided name and options. If this span is -// not being recorded than this method does nothing. +// not being recorded then this method does nothing. func (s *recordingSpan) AddEvent(name string, o ...trace.EventOption) { - if !s.IsRecording() { + if s == nil { + return + } + + s.mu.Lock() + defer s.mu.Unlock() + if !s.isRecording() { return } s.addEvent(name, o...) } +// addEvent adds an event with the provided name and options. +// +// This method assumes s.mu.Lock is held by the caller. func (s *recordingSpan) addEvent(name string, o ...trace.EventOption) { c := trace.NewEventConfig(o...) e := Event{Name: name, Attributes: c.Attributes(), Time: c.Timestamp()} @@ -510,20 +550,21 @@ func (s *recordingSpan) addEvent(name string, o ...trace.EventOption) { e.Attributes = e.Attributes[:limit] } - s.mu.Lock() s.events.add(e) - s.mu.Unlock() } // SetName sets the name of this span. If this span is not being recorded than // this method does nothing. func (s *recordingSpan) SetName(name string) { - if !s.IsRecording() { + if s == nil { return } s.mu.Lock() defer s.mu.Unlock() + if !s.isRecording() { + return + } s.name = name } @@ -579,23 +620,23 @@ func (s *recordingSpan) Attributes() []attribute.KeyValue { func (s *recordingSpan) dedupeAttrs() { // Do not set a capacity when creating this map. Benchmark testing has // showed this to only add unused memory allocations in general use. - exists := make(map[attribute.Key]int) - s.dedupeAttrsFromRecord(&exists) + exists := make(map[attribute.Key]int, len(s.attributes)) + s.dedupeAttrsFromRecord(exists) } // dedupeAttrsFromRecord deduplicates the attributes of s to fit capacity // using record as the record of unique attribute keys to their index. // // This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) dedupeAttrsFromRecord(record *map[attribute.Key]int) { +func (s *recordingSpan) dedupeAttrsFromRecord(record map[attribute.Key]int) { // Use the fact that slices share the same backing array. unique := s.attributes[:0] for _, a := range s.attributes { - if idx, ok := (*record)[a.Key]; ok { + if idx, ok := record[a.Key]; ok { unique[idx] = a } else { unique = append(unique, a) - (*record)[a.Key] = len(unique) - 1 + record[a.Key] = len(unique) - 1 } } // s.attributes have element types of attribute.KeyValue. These types are @@ -642,7 +683,7 @@ func (s *recordingSpan) InstrumentationScope() instrumentation.Scope { // InstrumentationLibrary returns the instrumentation.Library associated with // the Tracer that created this span. -func (s *recordingSpan) InstrumentationLibrary() instrumentation.Library { +func (s *recordingSpan) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility s.mu.Lock() defer s.mu.Unlock() return s.tracer.instrumentationScope @@ -657,7 +698,7 @@ func (s *recordingSpan) Resource() *resource.Resource { } func (s *recordingSpan) AddLink(link trace.Link) { - if !s.IsRecording() { + if s == nil { return } if !link.SpanContext.IsValid() && len(link.Attributes) == 0 && @@ -665,6 +706,12 @@ func (s *recordingSpan) AddLink(link trace.Link) { return } + s.mu.Lock() + defer s.mu.Unlock() + if !s.isRecording() { + return + } + l := Link{SpanContext: link.SpanContext, Attributes: link.Attributes} // Discard attributes over limit. @@ -678,9 +725,7 @@ func (s *recordingSpan) AddLink(link trace.Link) { l.Attributes = l.Attributes[:limit] } - s.mu.Lock() s.links.add(l) - s.mu.Unlock() } // DroppedAttributes returns the number of attributes dropped by the span @@ -755,12 +800,16 @@ func (s *recordingSpan) snapshot() ReadOnlySpan { } func (s *recordingSpan) addChild() { - if !s.IsRecording() { + if s == nil { return } + s.mu.Lock() + defer s.mu.Unlock() + if !s.isRecording() { + return + } s.childSpanCount++ - s.mu.Unlock() } func (*recordingSpan) private() {} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go index 0a641f94889..cd2cc30ca2d 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go @@ -45,22 +45,25 @@ func (s SpanStubs) Snapshots() []tracesdk.ReadOnlySpan { // SpanStub is a stand-in for a Span. type SpanStub struct { - Name string - SpanContext trace.SpanContext - Parent trace.SpanContext - SpanKind trace.SpanKind - StartTime time.Time - EndTime time.Time - Attributes []attribute.KeyValue - Events []tracesdk.Event - Links []tracesdk.Link - Status tracesdk.Status - DroppedAttributes int - DroppedEvents int - DroppedLinks int - ChildSpanCount int - Resource *resource.Resource - InstrumentationLibrary instrumentation.Library + Name string + SpanContext trace.SpanContext + Parent trace.SpanContext + SpanKind trace.SpanKind + StartTime time.Time + EndTime time.Time + Attributes []attribute.KeyValue + Events []tracesdk.Event + Links []tracesdk.Link + Status tracesdk.Status + DroppedAttributes int + DroppedEvents int + DroppedLinks int + ChildSpanCount int + Resource *resource.Resource + InstrumentationScope instrumentation.Scope + + // Deprecated: use InstrumentationScope instead. + InstrumentationLibrary instrumentation.Library //nolint:staticcheck // This method needs to be define for backwards compatibility } // SpanStubFromReadOnlySpan returns a SpanStub populated from ro. @@ -85,12 +88,18 @@ func SpanStubFromReadOnlySpan(ro tracesdk.ReadOnlySpan) SpanStub { DroppedLinks: ro.DroppedLinks(), ChildSpanCount: ro.ChildSpanCount(), Resource: ro.Resource(), + InstrumentationScope: ro.InstrumentationScope(), InstrumentationLibrary: ro.InstrumentationScope(), } } // Snapshot returns a read-only copy of the SpanStub. func (s SpanStub) Snapshot() tracesdk.ReadOnlySpan { + scopeOrLibrary := s.InstrumentationScope + if scopeOrLibrary.Name == "" && scopeOrLibrary.Version == "" && scopeOrLibrary.SchemaURL == "" { + scopeOrLibrary = s.InstrumentationLibrary + } + return spanSnapshot{ name: s.Name, spanContext: s.SpanContext, @@ -107,7 +116,7 @@ func (s SpanStub) Snapshot() tracesdk.ReadOnlySpan { droppedLinks: s.DroppedLinks, childSpanCount: s.ChildSpanCount, resource: s.Resource, - instrumentationScope: s.InstrumentationLibrary, + instrumentationScope: scopeOrLibrary, } } @@ -152,6 +161,6 @@ func (s spanSnapshot) InstrumentationScope() instrumentation.Scope { return s.instrumentationScope } -func (s spanSnapshot) InstrumentationLibrary() instrumentation.Library { +func (s spanSnapshot) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility return s.instrumentationScope } diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go index 33d065a7cb9..dc1eaa8e9d0 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/version.go @@ -5,5 +5,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk" // Version is the current release version of the OpenTelemetry SDK in use. func Version() string { - return "1.28.0" + return "1.31.0" } diff --git a/vendor/go.opentelemetry.io/otel/verify_examples.sh b/vendor/go.opentelemetry.io/otel/verify_examples.sh deleted file mode 100644 index e57bf57fce8..00000000000 --- a/vendor/go.opentelemetry.io/otel/verify_examples.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -set -euo pipefail - -cd $(dirname $0) -TOOLS_DIR=$(pwd)/.tools - -if [ -z "${GOPATH}" ] ; then - printf "GOPATH is not defined.\n" - exit -1 -fi - -if [ ! -d "${GOPATH}" ] ; then - printf "GOPATH ${GOPATH} is invalid \n" - exit -1 -fi - -# Pre-requisites -if ! git diff --quiet; then \ - git status - printf "\n\nError: working tree is not clean\n" - exit -1 -fi - -if [ "$(git tag --contains $(git log -1 --pretty=format:"%H"))" = "" ] ; then - printf "$(git log -1)" - printf "\n\nError: HEAD is not pointing to a tagged version" -fi - -make ${TOOLS_DIR}/gojq - -DIR_TMP="${GOPATH}/src/oteltmp/" -rm -rf $DIR_TMP -mkdir -p $DIR_TMP - -printf "Copy examples to ${DIR_TMP}\n" -cp -a ./example ${DIR_TMP} - -# Update go.mod files -printf "Update go.mod: rename module and remove replace\n" - -PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | egrep 'example' | sed 's/^\.\///' | sort) - -for dir in $PACKAGE_DIRS; do - printf " Update go.mod for $dir\n" - (cd "${DIR_TMP}/${dir}" && \ - # replaces is ("mod1" "mod2" …) - replaces=($(go mod edit -json | ${TOOLS_DIR}/gojq '.Replace[].Old.Path')) && \ - # strip double quotes - replaces=("${replaces[@]%\"}") && \ - replaces=("${replaces[@]#\"}") && \ - # make an array (-dropreplace=mod1 -dropreplace=mod2 …) - dropreplaces=("${replaces[@]/#/-dropreplace=}") && \ - go mod edit -module "oteltmp/${dir}" "${dropreplaces[@]}" && \ - go mod tidy) -done -printf "Update done:\n\n" - -# Build directories that contain main package. These directories are different than -# directories that contain go.mod files. -printf "Build examples:\n" -EXAMPLES=$(./get_main_pkgs.sh ./example) -for ex in $EXAMPLES; do - printf " Build $ex in ${DIR_TMP}/${ex}\n" - (cd "${DIR_TMP}/${ex}" && \ - go build .) -done - -# Cleanup -printf "Remove copied files.\n" -rm -rf $DIR_TMP diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index 78b40f3ed24..6d3c7b1f40e 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.30.0" + return "1.31.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 0c32f4fc46e..cdebdb5eb78 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -3,7 +3,7 @@ module-sets: stable-v1: - version: v1.30.0 + version: v1.31.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -29,12 +29,12 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.52.0 + version: v0.53.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: - version: v0.6.0 + version: v0.7.0 modules: - go.opentelemetry.io/otel/log - go.opentelemetry.io/otel/sdk/log @@ -42,7 +42,7 @@ module-sets: - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - go.opentelemetry.io/otel/exporters/stdout/stdoutlog experimental-schema: - version: v0.0.9 + version: v0.0.10 modules: - go.opentelemetry.io/otel/schema excluded-modules: diff --git a/vendor/modules.txt b/vendor/modules.txt index cf80b900ffe..853fe88c869 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -214,10 +214,6 @@ github.com/bboreham/go-loser # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile -# github.com/brianvoe/gofakeit/v6 v6.25.0 -## explicit; go 1.21 -github.com/brianvoe/gofakeit/v6 -github.com/brianvoe/gofakeit/v6/data # github.com/cenkalti/backoff/v4 v4.3.0 ## explicit; go 1.18 github.com/cenkalti/backoff/v4 @@ -274,7 +270,7 @@ github.com/eapache/queue # github.com/edsrzf/mmap-go v1.1.0 ## explicit; go 1.17 github.com/edsrzf/mmap-go -# github.com/evanphx/json-patch v5.6.0+incompatible +# github.com/evanphx/json-patch v5.9.0+incompatible ## explicit github.com/evanphx/json-patch # github.com/expr-lang/expr v1.16.2 @@ -375,7 +371,7 @@ github.com/go-redis/redis/v8/internal/pool github.com/go-redis/redis/v8/internal/proto github.com/go-redis/redis/v8/internal/rand github.com/go-redis/redis/v8/internal/util -# github.com/go-test/deep v1.0.8 +# github.com/go-test/deep v1.1.1 ## explicit; go 1.16 github.com/go-test/deep # github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 @@ -474,7 +470,7 @@ github.com/google/uuid ## explicit; go 1.19 github.com/googleapis/enterprise-certificate-proxy/client github.com/googleapis/enterprise-certificate-proxy/client/util -# github.com/googleapis/gax-go/v2 v2.12.5 +# github.com/googleapis/gax-go/v2 v2.13.0 ## explicit; go 1.20 github.com/googleapis/gax-go/v2 github.com/googleapis/gax-go/v2/apierror @@ -1158,8 +1154,8 @@ github.com/sagikazarmark/slog-shim # github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 ## explicit github.com/sean-/seed -# github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e -## explicit +# github.com/segmentio/fasthash v1.0.3 +## explicit; go 1.11 github.com/segmentio/fasthash/fnv1a # github.com/sercand/kuberesolver/v5 v5.1.1 ## explicit; go 1.18 @@ -1216,7 +1212,7 @@ github.com/spf13/viper/internal/encoding/json github.com/spf13/viper/internal/encoding/toml github.com/spf13/viper/internal/encoding/yaml github.com/spf13/viper/internal/features -# github.com/stoewer/parquet-cli v0.0.7 +# github.com/stoewer/parquet-cli v0.0.9 ## explicit; go 1.21 github.com/stoewer/parquet-cli/pkg/inspect github.com/stoewer/parquet-cli/pkg/output @@ -1368,8 +1364,8 @@ go.opentelemetry.io/collector/config/confighttp # go.opentelemetry.io/collector/config/confignet v0.102.1 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/confignet -# go.opentelemetry.io/collector/config/configopaque v1.9.0 -## explicit; go 1.21.0 +# go.opentelemetry.io/collector/config/configopaque v1.18.0 +## explicit; go 1.22.0 go.opentelemetry.io/collector/config/configopaque # go.opentelemetry.io/collector/config/configretry v0.102.1 ## explicit; go 1.21.0 @@ -1377,8 +1373,8 @@ go.opentelemetry.io/collector/config/configretry # go.opentelemetry.io/collector/config/configtelemetry v0.102.1 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configtelemetry -# go.opentelemetry.io/collector/config/configtls v0.102.1 -## explicit; go 1.21.0 +# go.opentelemetry.io/collector/config/configtls v1.18.0 +## explicit; go 1.22.0 go.opentelemetry.io/collector/config/configtls # go.opentelemetry.io/collector/config/internal v0.102.1 ## explicit; go 1.21.0 @@ -1530,7 +1526,7 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvut # go.opentelemetry.io/contrib/propagators/b3 v1.27.0 ## explicit; go 1.21 go.opentelemetry.io/contrib/propagators/b3 -# go.opentelemetry.io/otel v1.30.0 +# go.opentelemetry.io/otel v1.31.0 ## explicit; go 1.22 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute @@ -1620,13 +1616,13 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace go.opentelemetry.io/otel/log go.opentelemetry.io/otel/log/embedded go.opentelemetry.io/otel/log/noop -# go.opentelemetry.io/otel/metric v1.30.0 +# go.opentelemetry.io/otel/metric v1.31.0 ## explicit; go 1.22 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded go.opentelemetry.io/otel/metric/noop -# go.opentelemetry.io/otel/sdk v1.28.0 -## explicit; go 1.21 +# go.opentelemetry.io/otel/sdk v1.31.0 +## explicit; go 1.22 go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/sdk/instrumentation go.opentelemetry.io/otel/sdk/internal/env @@ -1645,7 +1641,7 @@ go.opentelemetry.io/otel/sdk/metric/internal/aggregate go.opentelemetry.io/otel/sdk/metric/internal/exemplar go.opentelemetry.io/otel/sdk/metric/internal/x go.opentelemetry.io/otel/sdk/metric/metricdata -# go.opentelemetry.io/otel/trace v1.30.0 +# go.opentelemetry.io/otel/trace v1.31.0 ## explicit; go 1.22 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded @@ -1849,7 +1845,7 @@ google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/api/httpbody -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/errdetails