From 6809d4b1114cc4e2f863ed50cffda26c70e35d42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:02:14 +0000 Subject: [PATCH] Bump github.com/brianvoe/gofakeit/v6 from 6.25.0 to 6.28.0 Bumps [github.com/brianvoe/gofakeit/v6](https://github.com/brianvoe/gofakeit) from 6.25.0 to 6.28.0. - [Release notes](https://github.com/brianvoe/gofakeit/releases) - [Commits](https://github.com/brianvoe/gofakeit/compare/v6.25.0...v6.28.0) --- updated-dependencies: - dependency-name: github.com/brianvoe/gofakeit/v6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../github.com/brianvoe/gofakeit/v6/README.md | 94 +++---- .../brianvoe/gofakeit/v6/address.go | 52 ++-- .../github.com/brianvoe/gofakeit/v6/animal.go | 14 +- vendor/github.com/brianvoe/gofakeit/v6/app.go | 6 +- .../github.com/brianvoe/gofakeit/v6/auth.go | 73 +++-- .../github.com/brianvoe/gofakeit/v6/beer.go | 16 +- .../github.com/brianvoe/gofakeit/v6/book.go | 15 +- vendor/github.com/brianvoe/gofakeit/v6/car.go | 23 +- .../brianvoe/gofakeit/v6/celebrity.go | 6 +- .../github.com/brianvoe/gofakeit/v6/color.go | 18 +- .../brianvoe/gofakeit/v6/company.go | 26 +- vendor/github.com/brianvoe/gofakeit/v6/csv.go | 24 +- .../brianvoe/gofakeit/v6/data/data.go | 1 + .../brianvoe/gofakeit/v6/data/product.go | 64 +++++ .../brianvoe/gofakeit/v6/data/word.go | 4 + .../github.com/brianvoe/gofakeit/v6/emoji.go | 10 +- .../github.com/brianvoe/gofakeit/v6/error.go | 18 +- .../github.com/brianvoe/gofakeit/v6/file.go | 4 +- .../brianvoe/gofakeit/v6/finance.go | 6 +- .../github.com/brianvoe/gofakeit/v6/food.go | 16 +- .../github.com/brianvoe/gofakeit/v6/game.go | 6 +- .../brianvoe/gofakeit/v6/generate.go | 24 +- .../github.com/brianvoe/gofakeit/v6/hacker.go | 12 +- .../brianvoe/gofakeit/v6/helpers.go | 3 +- .../brianvoe/gofakeit/v6/hipster.go | 14 +- .../github.com/brianvoe/gofakeit/v6/html.go | 9 +- .../github.com/brianvoe/gofakeit/v6/image.go | 6 +- .../brianvoe/gofakeit/v6/internet.go | 30 +-- .../github.com/brianvoe/gofakeit/v6/json.go | 24 +- .../brianvoe/gofakeit/v6/languages.go | 8 +- .../github.com/brianvoe/gofakeit/v6/lookup.go | 16 +- .../github.com/brianvoe/gofakeit/v6/lorem.go | 14 +- .../brianvoe/gofakeit/v6/minecraft.go | 36 +-- .../github.com/brianvoe/gofakeit/v6/misc.go | 6 +- .../github.com/brianvoe/gofakeit/v6/movie.go | 12 +- .../github.com/brianvoe/gofakeit/v6/number.go | 48 ++-- .../brianvoe/gofakeit/v6/payment.go | 43 +-- .../github.com/brianvoe/gofakeit/v6/person.go | 112 ++++---- .../brianvoe/gofakeit/v6/product.go | 253 ++++++++++++++++++ .../github.com/brianvoe/gofakeit/v6/school.go | 2 +- vendor/github.com/brianvoe/gofakeit/v6/sql.go | 10 +- .../github.com/brianvoe/gofakeit/v6/string.go | 12 +- .../brianvoe/gofakeit/v6/template.go | 123 ++++++--- .../github.com/brianvoe/gofakeit/v6/time.go | 62 +++-- .../brianvoe/gofakeit/v6/word_adjective.go | 16 +- .../brianvoe/gofakeit/v6/word_adverb.go | 16 +- .../brianvoe/gofakeit/v6/word_comment.go | 73 +++++ .../brianvoe/gofakeit/v6/word_connective.go | 14 +- .../brianvoe/gofakeit/v6/word_general.go | 2 +- .../brianvoe/gofakeit/v6/word_grammar.go | 2 +- .../brianvoe/gofakeit/v6/word_misc.go | 24 ++ .../brianvoe/gofakeit/v6/word_noun.go | 39 ++- .../brianvoe/gofakeit/v6/word_phrase.go | 10 +- .../brianvoe/gofakeit/v6/word_preposition.go | 8 +- .../brianvoe/gofakeit/v6/word_pronoun.go | 18 +- .../brianvoe/gofakeit/v6/word_sentence.go | 12 +- .../brianvoe/gofakeit/v6/word_verb.go | 12 +- vendor/github.com/brianvoe/gofakeit/v6/xml.go | 42 ++- vendor/modules.txt | 2 +- 61 files changed, 1132 insertions(+), 539 deletions(-) create mode 100644 vendor/github.com/brianvoe/gofakeit/v6/data/product.go create mode 100644 vendor/github.com/brianvoe/gofakeit/v6/product.go create mode 100644 vendor/github.com/brianvoe/gofakeit/v6/word_comment.go create mode 100644 vendor/github.com/brianvoe/gofakeit/v6/word_misc.go diff --git a/go.mod b/go.mod index 931f2ba018a..d916c5520ff 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ 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/brianvoe/gofakeit/v6 v6.28.0 github.com/evanphx/json-patch v5.6.0+incompatible github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/googleapis/gax-go/v2 v2.13.0 diff --git a/go.sum b/go.sum index 36244ef174e..edd821823a2 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,8 @@ 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/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= +github.com/brianvoe/gofakeit/v6 v6.28.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= diff --git a/vendor/github.com/brianvoe/gofakeit/v6/README.md b/vendor/github.com/brianvoe/gofakeit/v6/README.md index 2520a8a47af..b42992d1dab 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/README.md +++ b/vendor/github.com/brianvoe/gofakeit/v6/README.md @@ -1,6 +1,6 @@ ![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) +# 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) [![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 @@ -10,7 +10,7 @@ Random data generator written in go ## Features -- [260+ Functions!!!](#functions) +- [310+ Functions!!!](#functions) - [Random Sources](#random-sources) - [Global Rand](#global-rand-set) - [Struct Generator](#struct) @@ -24,7 +24,7 @@ Random data generator written in go ## Contributors -Thanks to everyone who has contributed to Gofakeit! +Thank you to all our Gofakeit contributors! @@ -185,14 +185,14 @@ For example, this is useful when it is not possible to modify the struct that yo // or just return a static value type CustomString string -func (c *CustomString) Fake(faker *gofakeit.Faker) any { +func (c *CustomString) Fake(faker *gofakeit.Faker) (any, error) { 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 { +func (c *CustomTime) Fake(faker *gofakeit.Faker) (any, error) { return CustomTime(time.Now()) } @@ -266,8 +266,6 @@ 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). @@ -280,7 +278,7 @@ Additional Available Functions - 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 +- SpliceAny(args ...any) []any // Build a slice of anys, 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 @@ -355,7 +353,7 @@ 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. +Passing `nil` to `CSV`, `JSON` or `XML` will auto generate data using default values. ```go CSV(co *CSVOptions) ([]byte, error) @@ -365,6 +363,27 @@ FileExtension() string FileMimeType() string ``` +### Template + +Passing `nil` will auto generate data using default values. + +```go +Template(co *TemplateOptions) (string, error) +Markdown(co *MarkdownOptions) (string, error) +EmailText(co *EmailOptions) (string, error) +FixedWidth(co *FixedWidthOptions) (string, error) +``` + +### Product + +```go +Product() *ProductInfo +ProductName() string +ProductDescription() string +ProductCategory() string +ProductFeature() string +ProductMaterial() string +``` ### Person @@ -457,9 +476,8 @@ CarTransmissionType() string ### Words -#### Noun - ```go +// Nouns Noun() string NounCommon() string NounConcrete() string @@ -469,20 +487,14 @@ NounCollectiveAnimal() string NounCollectiveThing() string NounCountable() string NounUncountable() string -``` - -#### Verb -```go +// Verbs Verb() string VerbAction() string VerbLinking() string VerbHelping() string -``` -#### Adverb - -```go +// Adverbs Adverb() string AdverbManner() string AdverbDegree() string @@ -491,20 +503,14 @@ AdverbTimeDefinite() string AdverbTimeIndefinite() string AdverbFrequencyDefinite() string AdverbFrequencyIndefinite() string -``` - -#### Proposition -```go +// Propositions Preposition() string PrepositionSimple() string PrepositionDouble() string PrepositionCompound() string -``` - -#### Adjective -```go +// Adjectives Adjective() string AdjectiveDescriptive() string AdjectiveQuantitative() string @@ -513,11 +519,8 @@ AdjectiveDemonstrative() string AdjectivePossessive() string AdjectiveInterrogative() string AdjectiveIndefinite() string -``` -#### Pronoun - -```go +// Pronouns Pronoun() string PronounPersonal() string PronounObject() string @@ -526,11 +529,8 @@ PronounReflective() string PronounDemonstrative() string PronounInterrogative() string PronounRelative() string -``` -#### Connective - -```go +// Connectives Connective() string ConnectiveTime() string ConnectiveComparative() string @@ -538,17 +538,11 @@ ConnectiveComplaint() string ConnectiveListing() string ConnectiveCasual() string ConnectiveExamplify() string -``` - -#### Word -```go +// Words Word() string -``` - -#### Sentences -```go +// Sentences Sentence(wordCount int) string Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string LoremIpsumWord() string @@ -576,7 +570,7 @@ Dessert() string ```go Bool() bool UUID() string -Weighted(options []any, weights []float32) +Weighted(options []any, weights []float32) (any, error) FlipACoin() string RandomMapKey(mapI any) any ShuffleAnySlice(v any) @@ -633,6 +627,7 @@ Svg(options *SVGOptions) string ```go Date() time.Time +PastDate() time.Time FutureDate() time.Time DateRange(start, end time.Time) time.Time NanoSecond() int @@ -852,14 +847,5 @@ ErrorRuntime() error ### School ```go -school() string +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 index 2923b17baad..3c8bc96feca 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/address.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/address.go @@ -198,18 +198,18 @@ func addAddressLookup() { AddFuncLookup("address", Info{ Display: "Address", Category: "address", - Description: "Random set of address info", + Description: "Residential location including street, city, state, country and postal code", 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", + "address": "364 Unionsville, Norfolk, Ohio 99536", + "street": "364 Unionsville", + "city": "Norfolk", + "state": "Ohio", + "zip": "99536", + "country": "Lesotho", + "latitude": 88.792592, + "longitude": 174.504681 +}`, + Output: "map[string]any", ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return address(r), nil @@ -219,7 +219,7 @@ func addAddressLookup() { AddFuncLookup("city", Info{ Display: "City", Category: "address", - Description: "Random city", + Description: "Part of a country with significant population, often a central hub for culture and commerce", Example: "Marcelside", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -230,7 +230,7 @@ func addAddressLookup() { AddFuncLookup("country", Info{ Display: "Country", Category: "address", - Description: "Random country", + Description: "Nation with its own government and defined territory", Example: "United States of America", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -241,7 +241,7 @@ func addAddressLookup() { AddFuncLookup("countryabr", Info{ Display: "Country Abbreviation", Category: "address", - Description: "Random 2 digit country abbreviation", + Description: "Shortened 2-letter form of a country's name", Example: "US", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -252,7 +252,7 @@ func addAddressLookup() { AddFuncLookup("state", Info{ Display: "State", Category: "address", - Description: "Random state", + Description: "Governmental division within a country, often having its own laws and government", Example: "Illinois", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -263,7 +263,7 @@ func addAddressLookup() { AddFuncLookup("stateabr", Info{ Display: "State Abbreviation", Category: "address", - Description: "Random 2 digit state abbreviation", + Description: "Shortened 2-letter form of a country's state", Example: "IL", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -274,7 +274,7 @@ func addAddressLookup() { AddFuncLookup("street", Info{ Display: "Street", Category: "address", - Description: "Random full street", + Description: "Public road in a city or town, typically with houses and buildings on each side", Example: "364 East Rapidsborough", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -285,7 +285,7 @@ func addAddressLookup() { AddFuncLookup("streetname", Info{ Display: "Street Name", Category: "address", - Description: "Random street name", + Description: "Name given to a specific road or street", Example: "View", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -296,7 +296,7 @@ func addAddressLookup() { AddFuncLookup("streetnumber", Info{ Display: "Street Number", Category: "address", - Description: "Random street number", + Description: "Numerical identifier assigned to a street", Example: "13645", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -307,7 +307,7 @@ func addAddressLookup() { AddFuncLookup("streetprefix", Info{ Display: "Street Prefix", Category: "address", - Description: "Random street prefix", + Description: "Directional or descriptive term preceding a street name, like 'East' or 'Main'", Example: "Lake", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -318,7 +318,7 @@ func addAddressLookup() { AddFuncLookup("streetsuffix", Info{ Display: "Street Suffix", Category: "address", - Description: "Random street suffix", + Description: "Designation at the end of a street name indicating type, like 'Avenue' or 'Street'", Example: "land", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -329,7 +329,7 @@ func addAddressLookup() { AddFuncLookup("zip", Info{ Display: "Zip", Category: "address", - Description: "Random street zip", + Description: "Numerical code for postal address sorting, specific to a geographic area", Example: "13645", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -340,7 +340,7 @@ func addAddressLookup() { AddFuncLookup("latitude", Info{ Display: "Latitude", Category: "address", - Description: "Random latitude", + Description: "Geographic coordinate specifying north-south position on Earth's surface", Example: "-73.534056", Output: "float", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -351,7 +351,7 @@ func addAddressLookup() { AddFuncLookup("latituderange", Info{ Display: "Latitude Range", Category: "address", - Description: "Random latitude between given range", + Description: "Latitude number between the given range (default min=0, max=90)", Example: "22.921026", Output: "float", Params: []Param{ @@ -381,7 +381,7 @@ func addAddressLookup() { AddFuncLookup("longitude", Info{ Display: "Longitude", Category: "address", - Description: "Random longitude", + Description: "Geographic coordinate indicating east-west position on Earth's surface", Example: "-147.068112", Output: "float", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -392,7 +392,7 @@ func addAddressLookup() { AddFuncLookup("longituderange", Info{ Display: "Longitude Range", Category: "address", - Description: "Random longitude between given range", + Description: "Longitude number between the given range (default min=0, max=180)", Example: "-8.170450", Output: "float", Params: []Param{ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/animal.go b/vendor/github.com/brianvoe/gofakeit/v6/animal.go index 2330fdc35fd..56772ea98ce 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/animal.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/animal.go @@ -104,7 +104,7 @@ func addAnimalLookup() { AddFuncLookup("petname", Info{ Display: "Pet Name", Category: "animal", - Description: "Random pet name", + Description: "Affectionate nickname given to a pet", Example: "Ozzy Pawsborne", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -115,7 +115,7 @@ func addAnimalLookup() { AddFuncLookup("animal", Info{ Display: "Animal", Category: "animal", - Description: "Random animal", + Description: "Living creature with the ability to move, eat, and interact with its environment", Example: "elk", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -126,7 +126,7 @@ func addAnimalLookup() { AddFuncLookup("animaltype", Info{ Display: "Animal Type", Category: "animal", - Description: "Random animal type", + Description: "Type of animal, such as mammals, birds, reptiles, etc.", Example: "amphibians", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -137,7 +137,7 @@ func addAnimalLookup() { AddFuncLookup("farmanimal", Info{ Display: "Farm Animal", Category: "animal", - Description: "Random farm animal", + Description: "Animal name commonly found on a farm", Example: "Chicken", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -148,7 +148,7 @@ func addAnimalLookup() { AddFuncLookup("cat", Info{ Display: "Cat", Category: "animal", - Description: "Random cat type", + Description: "Various breeds that define different cats", Example: "Chausie", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -159,7 +159,7 @@ func addAnimalLookup() { AddFuncLookup("dog", Info{ Display: "Dog", Category: "animal", - Description: "Random dog type", + Description: "Various breeds that define different dogs", Example: "Norwich Terrier", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -170,7 +170,7 @@ func addAnimalLookup() { AddFuncLookup("bird", Info{ Display: "Bird", Category: "animal", - Description: "Random bird type", + Description: "Distinct species of birds", Example: "goose", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/app.go b/vendor/github.com/brianvoe/gofakeit/v6/app.go index 3052383dd7b..172c81798b0 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/app.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/app.go @@ -65,7 +65,7 @@ func addAppLookup() { AddFuncLookup("appname", Info{ Display: "App Name", Category: "app", - Description: "Random app name", + Description: "Software program designed for a specific purpose or task on a computer or mobile device", Example: "Parkrespond", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -76,7 +76,7 @@ func addAppLookup() { AddFuncLookup("appversion", Info{ Display: "App Version", Category: "app", - Description: "Random app version", + Description: "Particular release of an application in Semantic Versioning format", Example: "1.12.14", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -87,7 +87,7 @@ func addAppLookup() { AddFuncLookup("appauthor", Info{ Display: "App Author", Category: "app", - Description: "Random app author", + Description: "Person or group creating and developing an application", Example: "Qado Energy, Inc.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/auth.go b/vendor/github.com/brianvoe/gofakeit/v6/auth.go index 30995897680..ae86e3d11e9 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/auth.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/auth.go @@ -33,45 +33,56 @@ func password(r *rand.Rand, lower bool, upper bool, numeric bool, special bool, if num < 5 { num = 5 } - i := 0 - b := make([]byte, num) - var passString string + // Setup weights + items := make([]any, 0) + weights := make([]float32, 0) if lower { - passString += lowerStr - b[i] = lowerStr[r.Int63()%int64(len(lowerStr))] - i++ + items = append(items, "lower") + weights = append(weights, 4) } if upper { - passString += upperStr - b[i] = upperStr[r.Int63()%int64(len(upperStr))] - i++ + items = append(items, "upper") + weights = append(weights, 4) } if numeric { - passString += numericStr - b[i] = numericStr[r.Int63()%int64(len(numericStr))] - i++ + items = append(items, "numeric") + weights = append(weights, 3) } if special { - passString += specialStr - b[i] = specialStr[r.Int63()%int64(len(specialStr))] - i++ + items = append(items, "special") + weights = append(weights, 2) } if space { - passString += spaceStr - b[i] = spaceStr[r.Int63()%int64(len(spaceStr))] - i++ + items = append(items, "space") + weights = append(weights, 1) } - // Set default if empty - if passString == "" { - passString = lowerStr + numericStr + // If no items are selected then default to lower, upper, numeric + if len(items) == 0 { + items = append(items, "lower", "upper", "numeric") + weights = append(weights, 4, 4, 3) } - // Loop through and add it up - for i <= num-1 { - b[i] = passString[r.Int63()%int64(len(passString))] - i++ + // Create byte slice + b := make([]byte, num) + + for i := 0; i <= num-1; i++ { + // Run weighted + weight, _ := weighted(r, items, weights) + + switch weight.(string) { + case "lower": + b[i] = lowerStr[r.Int63()%int64(len(lowerStr))] + case "upper": + b[i] = upperStr[r.Int63()%int64(len(upperStr))] + case "numeric": + b[i] = numericStr[r.Int63()%int64(len(numericStr))] + case "special": + b[i] = specialSafeStr[r.Int63()%int64(len(specialSafeStr))] + case "space": + b[i] = spaceStr[r.Int63()%int64(len(spaceStr))] + } } // Shuffle bytes @@ -80,6 +91,14 @@ func password(r *rand.Rand, lower bool, upper bool, numeric bool, special bool, b[i], b[j] = b[j], b[i] } + // Replace first or last character if it's a space, and other options are available + if b[0] == ' ' { + b[0] = password(r, lower, upper, numeric, special, false, 1)[0] + } + if b[len(b)-1] == ' ' { + b[len(b)-1] = password(r, lower, upper, numeric, special, false, 1)[0] + } + return string(b) } @@ -87,7 +106,7 @@ func addAuthLookup() { AddFuncLookup("username", Info{ Display: "Username", Category: "auth", - Description: "Generates a random username", + Description: "Unique identifier assigned to a user for accessing an account or system", Example: "Daniel1364", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -98,7 +117,7 @@ func addAuthLookup() { AddFuncLookup("password", Info{ Display: "Password", Category: "auth", - Description: "Generates a random password", + Description: "Secret word or phrase used to authenticate access to a system or account", Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e", Output: "string", Params: []Param{ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/beer.go b/vendor/github.com/brianvoe/gofakeit/v6/beer.go index 44a92026bae..292ae680316 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/beer.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/beer.go @@ -121,7 +121,7 @@ func addBeerLookup() { AddFuncLookup("beername", Info{ Display: "Beer Name", Category: "beer", - Description: "Random beer name", + Description: "Specific brand or variety of beer", Example: "Duvel", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -132,7 +132,7 @@ func addBeerLookup() { AddFuncLookup("beerstyle", Info{ Display: "Beer Style", Category: "beer", - Description: "Random beer style", + Description: "Distinct characteristics and flavors of beer", Example: "European Amber Lager", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -143,7 +143,7 @@ func addBeerLookup() { AddFuncLookup("beerhop", Info{ Display: "Beer Hop", Category: "beer", - Description: "Random beer hop type", + Description: "The flower used in brewing to add flavor, aroma, and bitterness to beer", Example: "Glacier", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -154,7 +154,7 @@ func addBeerLookup() { AddFuncLookup("beeryeast", Info{ Display: "Beer Yeast", Category: "beer", - Description: "Random beer yeast value", + Description: "Microorganism used in brewing to ferment sugars, producing alcohol and carbonation in beer", Example: "1388 - Belgian Strong Ale", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -165,7 +165,7 @@ func addBeerLookup() { AddFuncLookup("beermalt", Info{ Display: "Beer Malt", Category: "beer", - Description: "Random beer malt", + Description: "Processed barley or other grains, provides sugars for fermentation and flavor to beer", Example: "Munich", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -176,7 +176,7 @@ func addBeerLookup() { AddFuncLookup("beeralcohol", Info{ Display: "Beer Alcohol", Category: "beer", - Description: "Random alcohol percentage", + Description: "Measures the alcohol content in beer", Example: "2.7%", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -187,7 +187,7 @@ func addBeerLookup() { AddFuncLookup("beeribu", Info{ Display: "Beer IBU", Category: "beer", - Description: "Random beer ibu", + Description: "Scale measuring bitterness of beer from hops", Example: "29 IBU", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -198,7 +198,7 @@ func addBeerLookup() { AddFuncLookup("beerblg", Info{ Display: "Beer BLG", Category: "beer", - Description: "Random beer blg", + Description: "Scale indicating the concentration of extract in worts", Example: "6.4°Blg", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/book.go b/vendor/github.com/brianvoe/gofakeit/v6/book.go index bf08886a097..e2059dcf718 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/book.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/book.go @@ -42,9 +42,14 @@ func addBookLookup() { AddFuncLookup("book", Info{ Display: "Book", Category: "book", - Description: "Random Book data set", - Example: `{title: "Hamlet", author: "Mark Twain", genre: "Adventure"}`, + Description: "Written or printed work consisting of pages bound together, covering various subjects or stories", + Example: `{ + "title": "Anna Karenina", + "author": "Toni Morrison", + "genre": "Thriller" +}`, Output: "map[string]string", + ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return book(r), nil }, @@ -53,7 +58,7 @@ func addBookLookup() { AddFuncLookup("booktitle", Info{ Display: "Title", Category: "book", - Description: "Random Book title", + Description: "The specific name given to a book", Example: "Hamlet", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -64,7 +69,7 @@ func addBookLookup() { AddFuncLookup("bookauthor", Info{ Display: "Author", Category: "book", - Description: "Random Book author", + Description: "The individual who wrote or created the content of a book", Example: "Mark Twain", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -75,7 +80,7 @@ func addBookLookup() { AddFuncLookup("bookgenre", Info{ Display: "Genre", Category: "book", - Description: "Random Book genre", + Description: "Category or type of book defined by its content, style, or form", Example: "Adventure", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/car.go b/vendor/github.com/brianvoe/gofakeit/v6/car.go index 90685bdaaa4..983e2576cc2 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/car.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/car.go @@ -75,10 +75,17 @@ func addCarLookup() { AddFuncLookup("car", Info{ Display: "Car", Category: "car", - Description: "Random car set of data", - Output: "map[string]interface", + Description: "Wheeled motor vehicle used for transportation", + Example: `{ + "type": "Passenger car mini", + "fuel": "Gasoline", + "transmission": "Automatic", + "brand": "Fiat", + "model": "Freestyle Fwd", + "year": 1991 +}`, + Output: "map[string]any", 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 }, @@ -87,7 +94,7 @@ func addCarLookup() { AddFuncLookup("cartype", Info{ Display: "Car Type", Category: "car", - Description: "Random car type", + Description: "Classification of cars based on size, use, or body style", Example: "Passenger car mini", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -98,7 +105,7 @@ func addCarLookup() { AddFuncLookup("carfueltype", Info{ Display: "Car Fuel Type", Category: "car", - Description: "Random car fuel type", + Description: "Type of energy source a car uses", Example: "CNG", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -109,7 +116,7 @@ func addCarLookup() { AddFuncLookup("cartransmissiontype", Info{ Display: "Car Transmission Type", Category: "car", - Description: "Random car transmission type", + Description: "Mechanism a car uses to transmit power from the engine to the wheels", Example: "Manual", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -120,7 +127,7 @@ func addCarLookup() { AddFuncLookup("carmaker", Info{ Display: "Car Maker", Category: "car", - Description: "Random car maker", + Description: "Company or brand that manufactures and designs cars", Example: "Nissan", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -131,7 +138,7 @@ func addCarLookup() { AddFuncLookup("carmodel", Info{ Display: "Car Model", Category: "car", - Description: "Random car model", + Description: "Specific design or version of a car produced by a manufacturer", Example: "Aveo", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go b/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go index 11c026fd4f3..d7400f80a8a 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/celebrity.go @@ -32,7 +32,7 @@ func addCelebrityLookup() { AddFuncLookup("celebrityactor", Info{ Display: "Celebrity Actor", Category: "celebrity", - Description: "Random celebrity actor", + Description: "Famous person known for acting in films, television, or theater", Example: "Brad Pitt", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -43,7 +43,7 @@ func addCelebrityLookup() { AddFuncLookup("celebritybusiness", Info{ Display: "Celebrity Business", Category: "celebrity", - Description: "Random celebrity business person", + Description: "High-profile individual known for significant achievements in business or entrepreneurship", Example: "Elon Musk", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -54,7 +54,7 @@ func addCelebrityLookup() { AddFuncLookup("celebritysport", Info{ Display: "Celebrity Sport", Category: "celebrity", - Description: "Random celebrity sport person", + Description: "Famous athlete known for achievements in a particular sport", Example: "Michael Phelps", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/color.go b/vendor/github.com/brianvoe/gofakeit/v6/color.go index fbd5905c4bb..dce7db5f38c 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/color.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/color.go @@ -62,7 +62,7 @@ func addColorLookup() { AddFuncLookup("color", Info{ Display: "Color", Category: "color", - Description: "Random color", + Description: "Hue seen by the eye, returns the name of the color like red or blue", Example: "MediumOrchid", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -73,9 +73,10 @@ func addColorLookup() { AddFuncLookup("nicecolors", Info{ Display: "Nice Colors", Category: "color", - Description: "Random set of nice colors", - Example: "[#5c323e #a82743 #e15e32 #c0d23e #e5f04c]", + Description: "Attractive and appealing combinations of colors, returns an list of color hex codes", + Example: `["#cfffdd","#b4dec1","#5c5863","#a85163","#ff1f4c"]`, Output: "[]string", + ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return color(r), nil }, @@ -84,7 +85,7 @@ func addColorLookup() { AddFuncLookup("safecolor", Info{ Display: "Safe Color", Category: "color", - Description: "Random safe color", + Description: "Colors displayed consistently on different web browsers and devices", Example: "black", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -95,7 +96,7 @@ func addColorLookup() { AddFuncLookup("hexcolor", Info{ Display: "Hex Color", Category: "color", - Description: "Random hex color", + Description: "Six-digit code representing a color in the color model", Example: "#a99fb4", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -106,9 +107,10 @@ func addColorLookup() { AddFuncLookup("rgbcolor", Info{ Display: "RGB Color", Category: "color", - Description: "Random rgb color", - Example: "[152 23 53]", - Output: "string", + Description: "Color defined by red, green, and blue light values", + Example: "[85, 224, 195]", + Output: "[]int", + ContentType: "application/json", 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 index fb0cdfa4d18..ea8af6ca018 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/company.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/company.go @@ -116,7 +116,7 @@ func addCompanyLookup() { AddFuncLookup("company", Info{ Display: "Company", Category: "company", - Description: "Random company name", + Description: "Designated official name of a business or organization", Example: "Moen, Pagac and Wuckert", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -127,7 +127,7 @@ func addCompanyLookup() { AddFuncLookup("companysuffix", Info{ Display: "Company Suffix", Category: "company", - Description: "Random company name suffix", + Description: "Suffix at the end of a company name, indicating business structure, like 'Inc.' or 'LLC'", Example: "Inc", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -149,7 +149,7 @@ func addCompanyLookup() { AddFuncLookup("blurb", Info{ Display: "Blurb", Category: "company", - Description: "Random company blurb", + Description: "Brief description or summary of a company's purpose, products, or services", Example: "word", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -160,7 +160,7 @@ func addCompanyLookup() { AddFuncLookup("buzzword", Info{ Display: "Buzzword", Category: "company", - Description: "Random company buzzwords", + Description: "Trendy or overused term often used in business to sound impressive", Example: "disintermediate", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -171,9 +171,15 @@ func addCompanyLookup() { AddFuncLookup("job", Info{ Display: "Job", Category: "company", - Description: "Random job data set", - Example: `{company: "Moen, Pagac and Wuckert", title: "Director", descriptor: "Central", level: "Assurance"}`, + Description: "Position or role in employment, involving specific tasks and responsibilities", + Example: `{ + "company": "ClearHealthCosts", + "title": "Agent", + "descriptor": "Future", + "level": "Tactics" +}`, Output: "map[string]string", + ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return job(r), nil }, @@ -182,7 +188,7 @@ func addCompanyLookup() { AddFuncLookup("jobtitle", Info{ Display: "Job Title", Category: "company", - Description: "Random job title", + Description: "Specific title for a position or role within a company or organization", Example: "Director", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -193,7 +199,7 @@ func addCompanyLookup() { AddFuncLookup("jobdescriptor", Info{ Display: "Job Descriptor", Category: "company", - Description: "Random job descriptor", + Description: "Word used to describe the duties, requirements, and nature of a job", Example: "Central", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -214,8 +220,8 @@ func addCompanyLookup() { AddFuncLookup("slogan", Info{ Display: "Slogan", - Category: "comapny", - Description: "Random company slogan", + Category: "company", + Description: "Catchphrase or motto used by a company to represent its brand or values", Example: "Universal seamless Focus, interactive.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/csv.go b/vendor/github.com/brianvoe/gofakeit/v6/csv.go index b050e453455..6a2310ef638 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/csv.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/csv.go @@ -129,22 +129,26 @@ 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 - `, + Description: "Individual lines or data entries within a CSV (Comma-Separated Values) format", + Example: `id,first_name,last_name,password +1,Markus,Moen,Dc0VYXjkWABx +2,Osborne,Hilll,XPJ9OVNbs5lm`, Output: "[]byte", ContentType: "text/csv", Params: []Param{ + {Field: "delimiter", Display: "Delimiter", Type: "string", Default: ",", Description: "Separator in between row values"}, {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{} + delimiter, err := info.GetString(m, "delimiter") + if err != nil { + return nil, err + } + co.Delimiter = delimiter + rowcount, err := info.GetInt(m, "rowcount") if err != nil { return nil, err @@ -169,12 +173,6 @@ func addFileCSVLookup() { } } - 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 { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/data.go b/vendor/github.com/brianvoe/gofakeit/v6/data/data.go index b293b5ad19b..51a4f496bb7 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/data.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/data/data.go @@ -31,6 +31,7 @@ var Data = map[string]map[string][]string{ "book": Books, "movie": Movies, "school": School, + "product": Product, } func List() map[string][]string { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/product.go b/vendor/github.com/brianvoe/gofakeit/v6/data/product.go new file mode 100644 index 00000000000..127d66554f9 --- /dev/null +++ b/vendor/github.com/brianvoe/gofakeit/v6/data/product.go @@ -0,0 +1,64 @@ +package data + +var Product = map[string][]string{ + "category": { + "electronics", "clothing", "home appliances", "furniture", + "automotive parts", "beauty and personal care", "books", "sports equipment", + "toys and games", "outdoor gear", "pet supplies", "kitchenware", + "health and wellness", "tools and hardware", "office supplies", + "baby products", "jewelry", "home decor", "musical instruments", + "fitness equipment", "mobile phones", "computer accessories", "cameras and photography", + "gardening supplies", "bedding and linens", "food and groceries", "party supplies", + "craft and diy supplies", "camping gear", "watches", "luggage and travel accessories", + "board games", "art supplies", "stationery", "bath and shower products", + "sunglasses", "educational toys", "headphones and earbuds", "sneakers and athletic shoes", + "coffee and tea products", "bicycles and accessories", "cookware", "cosmetics", + "home improvement", "pet food", "laptop bags and cases", "home security systems", + "musical accessories", "skincare products", "smart home devices", + }, + + "adjective": { + "bold", "swift", "pure", "smart", "fresh", + "cool", "sharp", "zen", "bright", "quick", + "robust", "sleek", "versatile", "innovative", "compact", + "luxe", "modular", "precision", "stream", + }, + + "name": { + "phone", "laptop", "tablet", "watch", "camera", + "headphones", "speaker", "drone", "car", "bike", + "appliance", "gadget", "tool", "toy", "game", + "computer", "console", "smartwatch", "fitness tracker", "smart home device", + "robot", "router", "television", "smart speaker", "vr headset", + "earbuds", "printer", "mouse", "keyboard", "monitor", + "microwave", "blender", "vacuum", "fan", "toaster", + "clock", "lamp", "shaver", "scale", "thermometer", + "fridge", "oven", "mixer", "iron", "hair dryer", + "fan", "scale", "thermostat", "router", "lightbulb", + }, + + "feature": { + "wireless", "smart", "eco-friendly", "advanced", "compact", + "high-performance", "energy-efficient", "portable", "durable", "stylish", + "touchscreen", "water-resistant", "noise-canceling", "voice-controlled", "ultra-lightweight", + "multi-functional", "user-friendly", "fast-charging", "biometric", "gps-enabled", + }, + + "material": { + "titanium", "carbon", "alloy", "bamboo", "leather", + "glass", "ceramic", "aluminum", "stainless", "wood", + "plastic", "rubber", "silicon", "fabric", "paper", + "gold", "silver", "brass", "copper", "bronze", + "chrome", "marble", "granite", "porcelain", "plexiglass", + "quartz", "felt", "suede", + }, + + "suffix": { + "tech", "pro", "x", "plus", "elite", + "spark", "nexus", "nova", "fusion", "sync", + "edge", "boost", "max", "link", "prime", + "zoom", "pulse", "dash", "connect", "blaze", + "quantum", "spark", "vertex", "core", "flux", + "turbo", "shift", "wave", "matrix", + }, +} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/data/word.go b/vendor/github.com/brianvoe/gofakeit/v6/data/word.go index 38ba25472a1..87b48dc887b 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/data/word.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/data/word.go @@ -27,6 +27,7 @@ var Word = map[string][]string{ "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_determiner": {"the", "a", "an", "this", "that", "these", "those", "my", "your", "his", "her", "its", "our", "their", "some", "any", "each", "every", "certain"}, //"noun_proper": {}, // This refers to an actual person(John Doe), place(Chipotle, Tennessee) // Verbs @@ -76,4 +77,7 @@ var Word = map[string][]string{ "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"}, + + // Misc + "interjection": {"wow", "hey", "oops", "ouch", "yay", "aha", "eek", "huh", "hmm", "whoa", "yikes", "phew", "gee", "alas", "bravo"}, } diff --git a/vendor/github.com/brianvoe/gofakeit/v6/emoji.go b/vendor/github.com/brianvoe/gofakeit/v6/emoji.go index 3c4b21eab90..5eb4372ec47 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/emoji.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/emoji.go @@ -46,7 +46,7 @@ func addEmojiLookup() { AddFuncLookup("emoji", Info{ Display: "Emoji", Category: "emoji", - Description: "Random emoji", + Description: "Digital symbol expressing feelings or ideas in text messages and online chats", Example: "🤣", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -57,7 +57,7 @@ func addEmojiLookup() { AddFuncLookup("emojidescription", Info{ Display: "Emoji Description", Category: "emoji", - Description: "Random emoji description", + Description: "Brief explanation of the meaning or emotion conveyed by an emoji", Example: "face vomiting", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -68,7 +68,7 @@ func addEmojiLookup() { AddFuncLookup("emojicategory", Info{ Display: "Emoji Category", Category: "emoji", - Description: "Random emoji category", + Description: "Group or classification of emojis based on their common theme or use, like 'smileys' or 'animals'", Example: "Smileys & Emotion", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -79,7 +79,7 @@ func addEmojiLookup() { AddFuncLookup("emojialias", Info{ Display: "Emoji Alias", Category: "emoji", - Description: "Random emoji alias", + Description: "Alternative name or keyword used to represent a specific emoji in text or code", Example: "smile", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -90,7 +90,7 @@ func addEmojiLookup() { AddFuncLookup("emojitag", Info{ Display: "Emoji Tag", Category: "emoji", - Description: "Random emoji tag", + Description: "Label or keyword associated with an emoji to categorize or search for it easily", Example: "happy", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/error.go b/vendor/github.com/brianvoe/gofakeit/v6/error.go index c10f564b95a..b31d7725ddd 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/error.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/error.go @@ -135,7 +135,7 @@ func addErrorLookup() { AddFuncLookup("error", Info{ Display: "Error", Category: "error", - Description: "Random error message", + Description: "Message displayed by a computer or software when a problem or mistake is encountered", Example: "syntax error", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -146,7 +146,7 @@ func addErrorLookup() { AddFuncLookup("errorobject", Info{ Display: "Error object word", Category: "error", - Description: "Random error object word", + Description: "Various categories conveying details about encountered errors", Example: "protocol", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -157,7 +157,7 @@ func addErrorLookup() { AddFuncLookup("errordatabase", Info{ Display: "Database error", Category: "error", - Description: "Random database error message", + Description: "A problem or issue encountered while accessing or managing a database", Example: "sql error", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -168,7 +168,7 @@ func addErrorLookup() { AddFuncLookup("errorgrpc", Info{ Display: "gRPC error", Category: "error", - Description: "Random gRPC error message", + Description: "Communication failure in the high-performance, open-source universal RPC framework", Example: "client protocol error", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -179,7 +179,7 @@ func addErrorLookup() { AddFuncLookup("errorhttp", Info{ Display: "HTTP error", Category: "error", - Description: "Random HTTP error message", + Description: "A problem with a web http request", Example: "invalid method", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -190,7 +190,7 @@ func addErrorLookup() { AddFuncLookup("errorhttpclient", Info{ Display: "HTTP client error", Category: "error", - Description: "Random HTTP client error message", + Description: "Failure or issue occurring within a client software that sends requests to web servers", Example: "request timeout", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -201,7 +201,7 @@ func addErrorLookup() { AddFuncLookup("errorhttpserver", Info{ Display: "HTTP server error", Category: "error", - Description: "Random HTTP server error message", + Description: "Failure or issue occurring within a server software that recieves requests from clients", Example: "internal server error", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -212,7 +212,7 @@ func addErrorLookup() { AddFuncLookup("errorruntime", Info{ Display: "Runtime error", Category: "error", - Description: "Random runtime error message", + Description: "Malfunction occuring during program execution, often causing abrupt termination or unexpected behavior", Example: "address out of bounds", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -223,7 +223,7 @@ func addErrorLookup() { AddFuncLookup("errorvalidation", Info{ Display: "Validation error", Category: "error", - Description: "Random validation error message", + Description: "Occurs when input data fails to meet required criteria or format specifications", Example: "missing required field", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/file.go b/vendor/github.com/brianvoe/gofakeit/v6/file.go index 6efddf38626..3812021e196 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/file.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/file.go @@ -22,7 +22,7 @@ func addFileLookup() { AddFuncLookup("fileextension", Info{ Display: "File Extension", Category: "file", - Description: "Random file extension", + Description: "Suffix appended to a filename indicating its format or type", Example: "nes", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -33,7 +33,7 @@ func addFileLookup() { AddFuncLookup("filemimetype", Info{ Display: "File Mime Type", Category: "file", - Description: "Random file mime type", + Description: "Defines file format and nature for browsers and email clients using standardized identifiers", Example: "application/json", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/finance.go b/vendor/github.com/brianvoe/gofakeit/v6/finance.go index 8e32b2e3809..a46907a628d 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/finance.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/finance.go @@ -108,7 +108,7 @@ func addFinanceLookup() { AddFuncLookup("cusip", Info{ Display: "CUSIP", Category: "finance", - Description: "Random CUSIP", + Description: "Unique identifier for securities, especially bonds, in the United States and Canada", Example: "38259P508", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -118,8 +118,8 @@ func addFinanceLookup() { AddFuncLookup("isin", Info{ Display: "ISIN", Category: "finance", - Description: "Random ISIN", - Example: "", + Description: "International standard code for uniquely identifying securities worldwide", + Example: "CVLRQCZBXQ97", 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 index 03232b1decd..ae1bb2fd6a3 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/food.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/food.go @@ -91,7 +91,7 @@ func addFoodLookup() { AddFuncLookup("fruit", Info{ Display: "Fruit", Category: "food", - Description: "Random fruit", + Description: "Edible plant part, typically sweet, enjoyed as a natural snack or dessert", Example: "Peach", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -102,7 +102,7 @@ func addFoodLookup() { AddFuncLookup("vegetable", Info{ Display: "Vegetable", Category: "food", - Description: "Random vegetable", + Description: "Edible plant or part of a plant, often used in savory cooking or salads", Example: "Amaranth Leaves", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -113,7 +113,7 @@ func addFoodLookup() { AddFuncLookup("breakfast", Info{ Display: "Breakfast", Category: "food", - Description: "Random breakfast", + Description: "First meal of the day, typically eaten in the morning", Example: "Blueberry banana happy face pancakes", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -124,7 +124,7 @@ func addFoodLookup() { AddFuncLookup("lunch", Info{ Display: "Lunch", Category: "food", - Description: "Random lunch", + Description: "Midday meal, often lighter than dinner, eaten around noon", Example: "No bake hersheys bar pie", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -135,7 +135,7 @@ func addFoodLookup() { AddFuncLookup("dinner", Info{ Display: "Dinner", Category: "food", - Description: "Random dinner", + Description: "Evening meal, typically the day's main and most substantial meal", Example: "Wild addicting dip", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -146,7 +146,7 @@ func addFoodLookup() { AddFuncLookup("drink", Info{ Display: "Drink", Category: "food", - Description: "Random drink", + Description: "Liquid consumed for hydration, pleasure, or nutritional benefits", Example: "Soda", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -158,7 +158,7 @@ func addFoodLookup() { Display: "Snack", Category: "food", Description: "Random snack", - Example: "Hoisin marinated wing pieces", + Example: "Small, quick food item eaten between meals", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return snack(r), nil @@ -168,7 +168,7 @@ func addFoodLookup() { AddFuncLookup("dessert", Info{ Display: "Dessert", Category: "food", - Description: "Random dessert", + Description: "Sweet treat often enjoyed after a meal", Example: "French napoleons", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/game.go b/vendor/github.com/brianvoe/gofakeit/v6/game.go index 72904a4793c..5c1bc36919d 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/game.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/game.go @@ -67,7 +67,7 @@ func addGameLookup() { AddFuncLookup("gamertag", Info{ Display: "Gamertag", Category: "game", - Description: "Random gamertag", + Description: "User-selected online username or alias used for identification in games", Example: "footinterpret63", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -78,8 +78,8 @@ func addGameLookup() { AddFuncLookup("dice", Info{ Display: "Dice", Category: "game", - Description: "Random dice outputs", - Example: "footinterpret63", + Description: "Small, cube-shaped objects used in games of chance for random outcomes", + Example: "[5, 2, 3]", Output: "[]uint", Params: []Param{ {Field: "numdice", Display: "Number of Dice", Type: "uint", Default: "1", Description: "Number of dice to roll"}, diff --git a/vendor/github.com/brianvoe/gofakeit/v6/generate.go b/vendor/github.com/brianvoe/gofakeit/v6/generate.go index 0fccfae28e8..342a3a594bc 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/generate.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/generate.go @@ -499,13 +499,11 @@ func addGenerateLookup() { 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 - `, + Description: "Fixed width rows of output data based on input fields", + 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{ @@ -550,7 +548,7 @@ func addGenerateLookup() { AddFuncLookup("regex", Info{ Display: "Regex", Category: "generate", - Description: "Random string generated from regex RE2 syntax string", + Description: "Pattern-matching tool used in text processing to search and manipulate strings", Example: "[abcdef]{5} - affec", Output: "string", Params: []Param{ @@ -574,8 +572,14 @@ func addGenerateLookup() { AddFuncLookup("map", Info{ Display: "Map", Category: "generate", - Description: "Random map of generated data", - Example: `map[consult:respond context:9285735]`, + Description: "Data structure that stores key-value pairs", + Example: `{ + "software": 7518355, + "that": ["despite", "pack", "whereas", "recently", "there", "anyone", "time", "read"], + "use": 683598, + "whom": "innovate", + "yourselves": 1987784 +}`, Output: "map[string]any", ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/hacker.go b/vendor/github.com/brianvoe/gofakeit/v6/hacker.go index 890d6aa328d..393c558ec6e 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/hacker.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/hacker.go @@ -71,7 +71,7 @@ func addHackerLookup() { AddFuncLookup("hackerphrase", Info{ Display: "Hacker Phrase", Category: "hacker", - Description: "Random hacker phrase", + Description: "Informal jargon and slang used in the hacking and cybersecurity community", 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) { @@ -82,7 +82,7 @@ func addHackerLookup() { AddFuncLookup("hackerabbreviation", Info{ Display: "Hacker Abbreviation", Category: "hacker", - Description: "Random hacker abbreviation", + Description: "Abbreviations and acronyms commonly used in the hacking and cybersecurity community", Example: "ADP", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -93,7 +93,7 @@ func addHackerLookup() { AddFuncLookup("hackeradjective", Info{ Display: "Hacker Adjective", Category: "hacker", - Description: "Random hacker adjective", + Description: "Adjectives describing terms often associated with hackers and cybersecurity experts", Example: "wireless", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -104,7 +104,7 @@ func addHackerLookup() { AddFuncLookup("hackernoun", Info{ Display: "Hacker Noun", Category: "hacker", - Description: "Random hacker noun", + Description: "Noun representing an element, tool, or concept within the realm of hacking and cybersecurity", Example: "driver", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -115,7 +115,7 @@ func addHackerLookup() { AddFuncLookup("hackerverb", Info{ Display: "Hacker Verb", Category: "hacker", - Description: "Random hacker verb", + Description: "Verbs associated with actions and activities in the field of hacking and cybersecurity", Example: "synthesize", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -126,7 +126,7 @@ func addHackerLookup() { AddFuncLookup("hackeringverb", Info{ Display: "Hackering Verb", Category: "hacker", - Description: "Random hackering verb", + Description: "Verb describing actions and activities related to hacking, often involving computer systems and security", Example: "connecting", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/helpers.go b/vendor/github.com/brianvoe/gofakeit/v6/helpers.go index 278874d8183..3dcf849b76f 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/helpers.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/helpers.go @@ -17,7 +17,8 @@ import ( const lowerStr = "abcdefghijklmnopqrstuvwxyz" const upperStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" const numericStr = "0123456789" -const specialStr = "!@#$%&*+-_=?:;,.|(){}<>" +const specialStr = "@#$%&?|!(){}<>=*+-_:;,." +const specialSafeStr = "@#$&?!-_*." const spaceStr = " " const allStr = lowerStr + upperStr + numericStr + specialStr + spaceStr const vowels = "aeiou" diff --git a/vendor/github.com/brianvoe/gofakeit/v6/hipster.go b/vendor/github.com/brianvoe/gofakeit/v6/hipster.go index 661dd381d79..0369f17e1d8 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/hipster.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/hipster.go @@ -49,7 +49,7 @@ func addHipsterLookup() { AddFuncLookup("hipsterword", Info{ Display: "Hipster Word", Category: "hipster", - Description: "Random hipster word", + Description: "Trendy and unconventional vocabulary used by hipsters to express unique cultural preferences", Example: "microdosing", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -60,7 +60,7 @@ func addHipsterLookup() { AddFuncLookup("hipstersentence", Info{ Display: "Hipster Sentence", Category: "hipster", - Description: "Random hipster sentence", + Description: "Sentence showcasing the use of trendy and unconventional vocabulary associated with hipster culture", Example: "Microdosing roof chia echo pickled.", Output: "string", Params: []Param{ @@ -82,9 +82,13 @@ func addHipsterLookup() { 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", + Description: "Paragraph showcasing the use of trendy and unconventional vocabulary associated with hipster culture", + 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"}, diff --git a/vendor/github.com/brianvoe/gofakeit/v6/html.go b/vendor/github.com/brianvoe/gofakeit/v6/html.go index a613baab333..a047617ab66 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/html.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/html.go @@ -97,7 +97,7 @@ func addHtmlLookup() { AddFuncLookup("inputname", Info{ Display: "Input Name", Category: "html", - Description: "Random HTML input field name", + Description: "Attribute used to define the name of an input element in web forms", Example: "first_name", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -108,8 +108,11 @@ func addHtmlLookup() { AddFuncLookup("svg", Info{ Display: "Image SVG", Category: "html", - Description: "Random svg and ", - Example: ``, + Description: "Scalable Vector Graphics used to display vector images in web content", + Example: ` + + +`, Output: "string", ContentType: "image/svg+xml", Params: []Param{ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/image.go b/vendor/github.com/brianvoe/gofakeit/v6/image.go index 211090e3f98..e7c40dd8730 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/image.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/image.go @@ -71,7 +71,7 @@ func addImageLookup() { AddFuncLookup("imageurl", Info{ Display: "Image URL", Category: "image", - Description: "Random image url", + Description: "Web address pointing to an image file that can be accessed and displayed online", Example: "https://picsum.photos/500/500", Output: "string", Params: []Param{ @@ -102,7 +102,7 @@ func addImageLookup() { AddFuncLookup("imagejpeg", Info{ Display: "Image JPEG", Category: "image", - Description: "Random jpeg image", + Description: "Image file format known for its efficient compression and compatibility", Example: "file.jpeg - bytes", Output: "[]byte", ContentType: "image/jpeg", @@ -134,7 +134,7 @@ func addImageLookup() { AddFuncLookup("imagepng", Info{ Display: "Image PNG", Category: "image", - Description: "Random png image", + Description: "Image file format known for its lossless compression and support for transparency", Example: "file.png - bytes", Output: "[]byte", ContentType: "image/png", diff --git a/vendor/github.com/brianvoe/gofakeit/v6/internet.go b/vendor/github.com/brianvoe/gofakeit/v6/internet.go index b06a319b440..a0fcd9bb4e6 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/internet.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/internet.go @@ -266,7 +266,7 @@ func addInternetLookup() { AddFuncLookup("url", Info{ Display: "URL", Category: "internet", - Description: "Random url", + Description: "Web address that specifies the location of a resource on the internet", Example: "http://www.principalproductize.biz/target", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -277,7 +277,7 @@ func addInternetLookup() { AddFuncLookup("domainname", Info{ Display: "Domain Name", Category: "internet", - Description: "Random domain name", + Description: "Human-readable web address used to identify websites on the internet", Example: "centraltarget.biz", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -288,7 +288,7 @@ func addInternetLookup() { AddFuncLookup("domainsuffix", Info{ Display: "Domain Suffix", Category: "internet", - Description: "Random domain suffix", + Description: "The part of a domain name that comes after the last dot, indicating its type or purpose", Example: "org", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -299,7 +299,7 @@ func addInternetLookup() { AddFuncLookup("ipv4address", Info{ Display: "IPv4 Address", Category: "internet", - Description: "Random ip address v4", + Description: "Numerical label assigned to devices on a network for identification and communication", Example: "222.83.191.222", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -310,7 +310,7 @@ func addInternetLookup() { AddFuncLookup("ipv6address", Info{ Display: "IPv6 Address", Category: "internet", - Description: "Random ip address v6", + Description: "Numerical label assigned to devices on a network, providing a larger address space than IPv4 for internet communication", Example: "2001:cafe:8898:ee17:bc35:9064:5866:d019", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -321,7 +321,7 @@ func addInternetLookup() { AddFuncLookup("httpmethod", Info{ Display: "HTTP Method", Category: "internet", - Description: "Random http method", + Description: "Verb used in HTTP requests to specify the desired action to be performed on a resource", Example: "HEAD", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -332,7 +332,7 @@ func addInternetLookup() { AddFuncLookup("loglevel", Info{ Display: "Log Level", Category: "internet", - Description: "Random log level", + Description: "Classification used in logging to indicate the severity or priority of a log entry", Example: "error", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -343,7 +343,7 @@ func addInternetLookup() { AddFuncLookup("useragent", Info{ Display: "User Agent", Category: "internet", - Description: "Random browser user agent", + Description: "String sent by a web browser to identify itself when requesting web content", 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) { @@ -354,7 +354,7 @@ func addInternetLookup() { AddFuncLookup("chromeuseragent", Info{ Display: "Chrome User Agent", Category: "internet", - Description: "Random chrome user agent", + Description: "The specific identification string sent by the Google Chrome web browser when making requests on the internet", 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) { @@ -365,7 +365,7 @@ func addInternetLookup() { AddFuncLookup("firefoxuseragent", Info{ Display: "Firefox User Agent", Category: "internet", - Description: "Random browser user agent", + Description: "The specific identification string sent by the Firefox web browser when making requests on the internet", 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) { @@ -376,7 +376,7 @@ func addInternetLookup() { AddFuncLookup("operauseragent", Info{ Display: "Opera User Agent", Category: "internet", - Description: "Random browser user agent", + Description: "The specific identification string sent by the Opera web browser when making requests on the internet", 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) { @@ -387,7 +387,7 @@ func addInternetLookup() { AddFuncLookup("safariuseragent", Info{ Display: "Safari User Agent", Category: "internet", - Description: "Random safari user agent", + Description: "The specific identification string sent by the Safari web browser when making requests on the internet", 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) { @@ -409,7 +409,7 @@ func addInternetLookup() { AddFuncLookup("httpstatuscodesimple", Info{ Display: "HTTP Status Code Simple", Category: "internet", - Description: "Random http status code within more general usage codes", + Description: "Three-digit number returned by a web server to indicate the outcome of an HTTP request", Example: "404", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -420,7 +420,7 @@ func addInternetLookup() { AddFuncLookup("httpversion", Info{ Display: "HTTP Version", Category: "internet", - Description: "Random http version", + Description: "Number indicating the version of the HTTP protocol used for communication between a client and a server", Example: "HTTP/1.1", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -431,7 +431,7 @@ func addInternetLookup() { AddFuncLookup("macaddress", Info{ Display: "MAC Address", Category: "internet", - Description: "Random MAC address", + Description: "Unique identifier assigned to network interfaces, often used in Ethernet networks", Example: "cb:ce:06:94:22:e9", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/json.go b/vendor/github.com/brianvoe/gofakeit/v6/json.go index 4c3e68068e7..8edf5b45808 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/json.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/json.go @@ -14,8 +14,8 @@ import ( 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"` + Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` } type jsonKeyVal struct { @@ -194,19 +194,19 @@ func addFileJSONLookup() { AddFuncLookup("json", Info{ Display: "JSON", Category: "file", - Description: "Generates an object or an array of objects in json format", + Description: "Format for structured data interchange used in programming, returns an object or an array of objects", 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" } + { "first_name": "Markus", "last_name": "Moen", "password": "Dc0VYXjkWABx" }, + { "first_name": "Osborne", "last_name": "Hilll", "password": "XPJ9OVNbs5lm" }, + { "first_name": "Mertie", "last_name": "Halvorson", "password": "eyl3bhwfV8wA" } ]`, 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"}, + {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) { jo := JSONOptions{} @@ -223,6 +223,12 @@ func addFileJSONLookup() { } jo.RowCount = rowcount + indent, err := info.GetBool(m, "indent") + if err != nil { + return nil, err + } + jo.Indent = indent + fieldsStr, err := info.GetStringArray(m, "fields") if err != nil { return nil, err @@ -241,12 +247,6 @@ func addFileJSONLookup() { } } - indent, err := info.GetBool(m, "indent") - if err != nil { - return nil, err - } - jo.Indent = indent - f := &Faker{Rand: r} return jsonFunc(f, &jo) }, diff --git a/vendor/github.com/brianvoe/gofakeit/v6/languages.go b/vendor/github.com/brianvoe/gofakeit/v6/languages.go index b3cdfbf179c..43e0b877f5c 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/languages.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/languages.go @@ -48,7 +48,7 @@ func addLanguagesLookup() { AddFuncLookup("language", Info{ Display: "Language", Category: "language", - Description: "Random language", + Description: "System of communication using symbols, words, and grammar to convey meaning between individuals", Example: "Kazakh", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -59,7 +59,7 @@ func addLanguagesLookup() { AddFuncLookup("languageabbreviation", Info{ Display: "Language Abbreviation", Category: "language", - Description: "Random abbreviated language", + Description: "Shortened form of a language's name", Example: "kk", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -70,7 +70,7 @@ func addLanguagesLookup() { AddFuncLookup("languagebcp", Info{ Display: "Language BCP", Category: "language", - Description: "Random language BCP (Best Current Practices)", + Description: "Set of guidelines and standards for identifying and representing languages in computing and internet protocols", Example: "en-US", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -81,7 +81,7 @@ func addLanguagesLookup() { AddFuncLookup("programminglanguage", Info{ Display: "Programming Language", Category: "language", - Description: "Random programming language", + Description: "Formal system of instructions used to create software and perform computational tasks", Example: "Go", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/lookup.go b/vendor/github.com/brianvoe/gofakeit/v6/lookup.go index 58698ba88aa..9bb9e9d823f 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/lookup.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/lookup.go @@ -89,6 +89,7 @@ func initLookup() { addNumberLookup() addPaymentLookup() addPersonLookup() + addProductLookup() addSchoolLookup() addStringLookup() addTemplateLookup() @@ -104,6 +105,8 @@ func initLookup() { addWordPronounLookup() addWordSentenceLookup() addWordVerbLookup() + addWordCommentLookup() + addWordMiscLookup() } // internalFuncLookups is the internal map array with mapping to all available data @@ -286,24 +289,19 @@ func (i *Info) GetAny(m *MapParams, field string) (any, error) { } 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) { +// GetMap will retrieve map[string]any field from data +func (i *Info) GetMap(m *MapParams, field string) (map[string]any, error) { _, value, err := i.GetField(m, field) if err != nil { return nil, err } - var mapValue map[string]interface{} + var mapValue map[string]any 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 nil, fmt.Errorf("%s field could not parse to map[string]any", field) } return mapValue, nil diff --git a/vendor/github.com/brianvoe/gofakeit/v6/lorem.go b/vendor/github.com/brianvoe/gofakeit/v6/lorem.go index 79a8a5aa826..bf11bce7cee 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/lorem.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/lorem.go @@ -45,7 +45,7 @@ func addLoremLookup() { AddFuncLookup("loremipsumword", Info{ Display: "Lorem Ipsum Word", Category: "word", - Description: "Random lorem ipsum word", + Description: "Word of the Lorem Ipsum placeholder text used in design and publishing", Example: "quia", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -56,7 +56,7 @@ func addLoremLookup() { AddFuncLookup("loremipsumsentence", Info{ Display: "Lorem Ipsum Sentence", Category: "word", - Description: "Random lorem ipsum sentence", + Description: "Sentence of the Lorem Ipsum placeholder text used in design and publishing", Example: "Quia quae repellat consequatur quidem.", Output: "string", Params: []Param{ @@ -78,9 +78,13 @@ func addLoremLookup() { 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", + Description: "Paragraph of the Lorem Ipsum placeholder text used in design and publishing", + 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"}, diff --git a/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go b/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go index fd370cec833..1fb740e4297 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/minecraft.go @@ -170,7 +170,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftore", Info{ Display: "Minecraft ore", Category: "minecraft", - Description: "Random Minecraft ore", + Description: "Naturally occurring minerals found in the game Minecraft, used for crafting purposes", Example: "coal", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -181,7 +181,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftwood", Info{ Display: "Minecraft wood", Category: "minecraft", - Description: "Random Minecraft wood", + Description: "Natural resource in Minecraft, used for crafting various items and building structures", Example: "oak", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -192,7 +192,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftarmortier", Info{ Display: "Minecraft armor tier", Category: "minecraft", - Description: "Random Minecraft armor tier", + Description: "Classification system for armor sets in Minecraft, indicating their effectiveness and protection level", Example: "iron", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -203,7 +203,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftarmorpart", Info{ Display: "Minecraft armor part", Category: "minecraft", - Description: "Random Minecraft armor part", + Description: "Component of an armor set in Minecraft, such as a helmet, chestplate, leggings, or boots", Example: "helmet", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -214,7 +214,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftweapon", Info{ Display: "Minecraft weapon", Category: "minecraft", - Description: "Random Minecraft weapon", + Description: "Tools and items used in Minecraft for combat and defeating hostile mobs", Example: "bow", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -225,7 +225,7 @@ func addMinecraftLookup() { AddFuncLookup("minecrafttool", Info{ Display: "Minecraft tool", Category: "minecraft", - Description: "Random Minecraft tool", + Description: "Items in Minecraft designed for specific tasks, including mining, digging, and building", Example: "shovel", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -236,7 +236,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftdye", Info{ Display: "Minecraft dye", Category: "minecraft", - Description: "Random Minecraft dye", + Description: "Items used to change the color of various in-game objects", Example: "white", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -247,7 +247,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftfood", Info{ Display: "Minecraft food", Category: "minecraft", - Description: "Random Minecraft food", + Description: "Consumable items in Minecraft that provide nourishment to the player character", Example: "apple", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -258,7 +258,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftanimal", Info{ Display: "Minecraft animal", Category: "minecraft", - Description: "Random Minecraft animal", + Description: "Non-hostile creatures in Minecraft, often used for resources and farming", Example: "chicken", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -269,7 +269,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftvillagerjob", Info{ Display: "Minecraft villager job", Category: "minecraft", - Description: "Random Minecraft villager job", + Description: "The profession or occupation assigned to a villager character in the game", Example: "farmer", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -280,7 +280,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftvillagerstation", Info{ Display: "Minecraft villager station", Category: "minecraft", - Description: "Random Minecraft villager station", + Description: "Designated area or structure in Minecraft where villagers perform their job-related tasks and trading", Example: "furnace", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -291,7 +291,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftvillagerlevel", Info{ Display: "Minecraft villager level", Category: "minecraft", - Description: "Random Minecraft villager level", + Description: "Measure of a villager's experience and proficiency in their assigned job or profession", Example: "master", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -302,7 +302,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftmobpassive", Info{ Display: "Minecraft mob passive", Category: "minecraft", - Description: "Random Minecraft mob passive", + Description: "Non-aggressive creatures in the game that do not attack players", Example: "cow", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -313,7 +313,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftmobneutral", Info{ Display: "Minecraft mob neutral", Category: "minecraft", - Description: "Random Minecraft mob neutral", + Description: "Creature in the game that only becomes hostile if provoked, typically defending itself when attacked", Example: "bee", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -324,7 +324,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftmobhostile", Info{ Display: "Minecraft mob hostile", Category: "minecraft", - Description: "Random Minecraft mob hostile", + Description: "Aggressive creatures in the game that actively attack players when encountered", Example: "spider", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -335,7 +335,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftmobboss", Info{ Display: "Minecraft mob boss", Category: "minecraft", - Description: "Random Minecraft mob boss", + Description: "Powerful hostile creature in the game, often found in challenging dungeons or structures", Example: "ender dragon", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -346,7 +346,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftbiome", Info{ Display: "Minecraft biome", Category: "minecraft", - Description: "Random Minecraft biome", + Description: "Distinctive environmental regions in the game, characterized by unique terrain, vegetation, and weather", Example: "forest", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -357,7 +357,7 @@ func addMinecraftLookup() { AddFuncLookup("minecraftweather", Info{ Display: "Minecraft weather", Category: "minecraft", - Description: "Random Minecraft weather", + Description: "Atmospheric conditions in the game that include rain, thunderstorms, and clear skies, affecting gameplay and ambiance", Example: "rain", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/misc.go b/vendor/github.com/brianvoe/gofakeit/v6/misc.go index fcc13c6a69e..aa55911e47f 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/misc.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/misc.go @@ -136,7 +136,7 @@ func addMiscLookup() { AddFuncLookup("uuid", Info{ Display: "UUID", Category: "misc", - Description: "Random uuid", + Description: "128-bit identifier used to uniquely identify objects or entities in computer systems", Example: "590c1440-9888-45b0-bd51-a817ee07c3f2", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -147,7 +147,7 @@ func addMiscLookup() { AddFuncLookup("bool", Info{ Display: "Boolean", Category: "misc", - Description: "Random boolean", + Description: "Data type that represents one of two possible values, typically true or false", Example: "true", Output: "bool", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -158,7 +158,7 @@ func addMiscLookup() { AddFuncLookup("flipacoin", Info{ Display: "Flip A Coin", Category: "misc", - Description: "Random Heads or Tails outcome", + Description: "Decision-making method involving the tossing of a coin to determine outcomes", Example: "Tails", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/movie.go b/vendor/github.com/brianvoe/gofakeit/v6/movie.go index 635c8588257..21fcbd73a55 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/movie.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/movie.go @@ -34,9 +34,13 @@ func addMovieLookup() { AddFuncLookup("movie", Info{ Display: "Movie", Category: "movie", - Description: "Random Movie data set", - Example: `{name: "The Matrix", genre: "Action"}`, + Description: "A story told through moving pictures and sound", + Example: `{ + "name": "Psycho", + "genre": "Mystery" +}`, Output: "map[string]string", + ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return movie(r), nil }, @@ -45,7 +49,7 @@ func addMovieLookup() { AddFuncLookup("moviename", Info{ Display: "Movie Name", Category: "movie", - Description: "Random movie name", + Description: "Title or name of a specific film used for identification and reference", Example: "The Matrix", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -56,7 +60,7 @@ func addMovieLookup() { AddFuncLookup("moviegenre", Info{ Display: "Genre", Category: "movie", - Description: "Random movie genre", + Description: "Category that classifies movies based on common themes, styles, and storytelling approaches", Example: "Action", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/number.go b/vendor/github.com/brianvoe/gofakeit/v6/number.go index 345df523108..7200a598863 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/number.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/number.go @@ -253,7 +253,7 @@ func addNumberLookup() { AddFuncLookup("number", Info{ Display: "Number", Category: "number", - Description: "Random number between given range", + Description: "Mathematical concept used for counting, measuring, and expressing quantities or values", Example: "14866", Output: "int", Params: []Param{ @@ -278,7 +278,7 @@ func addNumberLookup() { AddFuncLookup("uint8", Info{ Display: "Uint8", Category: "number", - Description: "Random uint8 value", + Description: "Unsigned 8-bit integer, capable of representing values from 0 to 255", Example: "152", Output: "uint8", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -289,7 +289,7 @@ func addNumberLookup() { AddFuncLookup("uint16", Info{ Display: "Uint16", Category: "number", - Description: "Random uint16 value", + Description: "Unsigned 16-bit integer, capable of representing values from 0 to 65,535", Example: "34968", Output: "uint16", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -300,7 +300,7 @@ func addNumberLookup() { AddFuncLookup("uint32", Info{ Display: "Uint32", Category: "number", - Description: "Random uint32 value", + Description: "Unsigned 32-bit integer, capable of representing values from 0 to 4,294,967,295", Example: "1075055705", Output: "uint32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -311,7 +311,7 @@ func addNumberLookup() { AddFuncLookup("uint64", Info{ Display: "Uint64", Category: "number", - Description: "Random uint64 value", + Description: "Unsigned 64-bit integer, capable of representing values from 0 to 18,446,744,073,709,551,615", Example: "843730692693298265", Output: "uint64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -322,7 +322,7 @@ func addNumberLookup() { AddFuncLookup("uintrange", Info{ Display: "UintRange", Category: "number", - Description: "Random uint value between given range", + Description: "Non-negative integer value between given range", Example: "1075055705", Output: "uint", Params: []Param{ @@ -347,7 +347,7 @@ func addNumberLookup() { AddFuncLookup("int8", Info{ Display: "Int8", Category: "number", - Description: "Random int8 value", + Description: "Signed 8-bit integer, capable of representing values from -128 to 127", Example: "24", Output: "int8", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -358,7 +358,7 @@ func addNumberLookup() { AddFuncLookup("int16", Info{ Display: "Int16", Category: "number", - Description: "Random int16 value", + Description: "Signed 16-bit integer, capable of representing values from 32,768 to 32,767", Example: "2200", Output: "int16", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -369,7 +369,7 @@ func addNumberLookup() { AddFuncLookup("int32", Info{ Display: "Int32", Category: "number", - Description: "Random int32 value", + Description: "Signed 32-bit integer, capable of representing values from -2,147,483,648 to 2,147,483,647", Example: "-1072427943", Output: "int32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -380,7 +380,7 @@ func addNumberLookup() { AddFuncLookup("int64", Info{ Display: "Int64", Category: "number", - Description: "Random int64 value", + Description: "Signed 64-bit integer, capable of representing values from -9,223,372,036,854,775,808 to -9,223,372,036,854,775,807", Example: "-8379641344161477543", Output: "int64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -391,7 +391,7 @@ func addNumberLookup() { AddFuncLookup("intrange", Info{ Display: "IntRange", Category: "number", - Description: "Random int value between min and max", + Description: "Integer value between given range", Example: "-8379477543", Output: "int", Params: []Param{ @@ -416,7 +416,7 @@ func addNumberLookup() { AddFuncLookup("float32", Info{ Display: "Float32", Category: "number", - Description: "Random float32 value", + Description: "Data type representing floating-point numbers with 32 bits of precision in computing", Example: "3.1128167e+37", Output: "float32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -427,7 +427,7 @@ func addNumberLookup() { AddFuncLookup("float32range", Info{ Display: "Float32 Range", Category: "number", - Description: "Random float32 between given range", + Description: "Float32 value between given range", Example: "914774.6", Output: "float32", Params: []Param{ @@ -452,7 +452,7 @@ func addNumberLookup() { AddFuncLookup("float64", Info{ Display: "Float64", Category: "number", - Description: "Random float64 value", + Description: "Data type representing floating-point numbers with 64 bits of precision in computing", Example: "1.644484108270445e+307", Output: "float64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -463,7 +463,7 @@ func addNumberLookup() { AddFuncLookup("float64range", Info{ Display: "Float64 Range", Category: "number", - Description: "Random float64 between given range", + Description: "Float64 value between given range", Example: "914774.5585333086", Output: "float64", Params: []Param{ @@ -488,7 +488,7 @@ func addNumberLookup() { AddFuncLookup("shuffleints", Info{ Display: "Shuffle Ints", Category: "number", - Description: "Shuffle an array of ints", + Description: "Shuffles an array of ints", Example: "1,2,3,4 => 3,1,4,2", Output: "[]int", Params: []Param{ @@ -515,7 +515,7 @@ func addNumberLookup() { Params: []Param{ {Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"}, }, - Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) { + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { ints, err := info.GetIntArray(m, "ints") if err != nil { return nil, err @@ -534,7 +534,7 @@ func addNumberLookup() { 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) { + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { uints, err := info.GetUintArray(m, "uints") if err != nil { return nil, err @@ -547,7 +547,7 @@ func addNumberLookup() { AddFuncLookup("hexuint8", Info{ Display: "HexUint8", Category: "number", - Description: "Random uint8 hex value", + Description: "Hexadecimal representation of an 8-bit unsigned integer", Example: "0x87", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -558,7 +558,7 @@ func addNumberLookup() { AddFuncLookup("hexuint16", Info{ Display: "HexUint16", Category: "number", - Description: "Random uint16 hex value", + Description: "Hexadecimal representation of an 16-bit unsigned integer", Example: "0x8754", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -569,7 +569,7 @@ func addNumberLookup() { AddFuncLookup("hexuint32", Info{ Display: "HexUint32", Category: "number", - Description: "Random uint32 hex value", + Description: "Hexadecimal representation of an 32-bit unsigned integer", Example: "0x87546957", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -580,7 +580,7 @@ func addNumberLookup() { AddFuncLookup("hexuint64", Info{ Display: "HexUint64", Category: "number", - Description: "Random uint64 hex value", + Description: "Hexadecimal representation of an 64-bit unsigned integer", Example: "0x875469578e51b5e5", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -591,7 +591,7 @@ func addNumberLookup() { AddFuncLookup("hexuint128", Info{ Display: "HexUint128", Category: "number", - Description: "Random uint128 hex value", + Description: "Hexadecimal representation of an 128-bit unsigned integer", Example: "0x875469578e51b5e56c95b64681d147a1", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -602,7 +602,7 @@ func addNumberLookup() { AddFuncLookup("hexuint256", Info{ Display: "HexUint256", Category: "number", - Description: "Random uint256 hex value", + Description: "Hexadecimal representation of an 256-bit unsigned integer", Example: "0x875469578e51b5e56c95b64681d147a12cde48a4f417231b0c486abbc263e48d", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/payment.go b/vendor/github.com/brianvoe/gofakeit/v6/payment.go index ead89c1421f..dc4b0057be4 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/payment.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/payment.go @@ -243,8 +243,11 @@ func addPaymentLookup() { AddFuncLookup("currency", Info{ Display: "Currency", Category: "payment", - Description: "Random currency data set", - Example: `{short: "USD", long: "United States Dollar"}`, + Description: "Medium of exchange, often in the form of paper money or coins, used for trade and transactions", + Example: `{ + "short": "IQD", + "long": "Iraq Dinar" +}`, Output: "map[string]string", ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -255,7 +258,7 @@ func addPaymentLookup() { AddFuncLookup("currencyshort", Info{ Display: "Currency Short", Category: "payment", - Description: "Random currency abbreviated", + Description: "Short 3-letter word used to represent a specific currency", Example: "USD", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -266,7 +269,7 @@ func addPaymentLookup() { AddFuncLookup("currencylong", Info{ Display: "Currency Long", Category: "payment", - Description: "Random currency", + Description: "Complete name of a specific currency used for official identification in financial transactions", Example: "United States Dollar", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -277,7 +280,7 @@ func addPaymentLookup() { AddFuncLookup("price", Info{ Display: "Price", Category: "payment", - Description: "Random monitary price", + Description: "The amount of money or value assigned to a product, service, or asset in a transaction", Example: "92.26", Output: "float64", Params: []Param{ @@ -302,9 +305,15 @@ func addPaymentLookup() { 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", + Description: "Plastic card allowing users to make purchases on credit, with payment due at a later date", + Example: `{ + "type": "UnionPay", + "number": "4364599489953698", + "exp": "02/24", + "cvv": "300" +}`, + Output: "map[string]any", + ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return creditCard(r), nil }, @@ -313,7 +322,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardtype", Info{ Display: "Credit Card Type", Category: "payment", - Description: "Random credit card type", + Description: "Classification of credit cards based on the issuing company", Example: "Visa", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -324,9 +333,9 @@ func addPaymentLookup() { AddFuncLookup("creditcardnumber", Info{ Display: "Credit Card Number", Category: "payment", - Description: "Random credit card number", + Description: "Unique numerical identifier on a credit card used for making electronic payments and transactions", Example: "4136459948995369", - Output: "int", + Output: "string", Params: []Param{ { Field: "types", Display: "Types", Type: "[]string", Default: "all", @@ -368,7 +377,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardexp", Info{ Display: "Credit Card Exp", Category: "payment", - Description: "Random credit card expiraction date", + Description: "Date when a credit card becomes invalid and cannot be used for transactions", Example: "01/21", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -379,7 +388,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardcvv", Info{ Display: "Credit Card CVV", Category: "payment", - Description: "Random credit card number", + Description: "Three or four-digit security code on a credit card used for online and remote transactions", Example: "513", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -390,7 +399,7 @@ func addPaymentLookup() { AddFuncLookup("achrouting", Info{ Display: "ACH Routing Number", Category: "payment", - Description: "Random 9 digit ach routing number", + Description: "Unique nine-digit code used in the U.S. for identifying the bank and processing electronic transactions", Example: "513715684", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -401,7 +410,7 @@ func addPaymentLookup() { AddFuncLookup("achaccount", Info{ Display: "ACH Account Number", Category: "payment", - Description: "Random 12 digit ach account number", + Description: "A bank account number used for Automated Clearing House transactions and electronic transfers", Example: "491527954328", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -412,7 +421,7 @@ func addPaymentLookup() { AddFuncLookup("bitcoinaddress", Info{ Display: "Bitcoin Address", Category: "payment", - Description: "Random 26-35 characters representing a bitcoin address", + Description: "Cryptographic identifier used to receive, store, and send Bitcoin cryptocurrency in a peer-to-peer network", Example: "1lWLbxojXq6BqWX7X60VkcDIvYA", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -423,7 +432,7 @@ func addPaymentLookup() { AddFuncLookup("bitcoinprivatekey", Info{ Display: "Bitcoin Private Key", Category: "payment", - Description: "Random 51 characters representing a bitcoin private key", + Description: "Secret, secure code that allows the owner to access and control their Bitcoin holdings", Example: "5vrbXTADWJ6sQBSYd6lLkG97jljNc0X9VPBvbVqsIH9lWOLcoqg", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/person.go b/vendor/github.com/brianvoe/gofakeit/v6/person.go index da835a0bae9..c1fe99f3348 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/person.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/person.go @@ -209,42 +209,42 @@ func addPersonLookup() { AddFuncLookup("person", Info{ Display: "Person", Category: "person", - Description: "Random set of person info", + Description: "Personal data, like name and contact details, used for identification and communication", 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", + "first_name": "Markus", + "last_name": "Moen", + "gender": "male", + "ssn": "275413589", + "image": "https://picsum.photos/208/500", + "hobby": "Lacrosse", + "job": { + "company": "Intermap Technologies", + "title": "Developer", + "descriptor": "Direct", + "level": "Paradigm" + }, + "address": { + "address": "369 North Cornerbury, Miami, North Dakota 24259", + "street": "369 North Cornerbury", + "city": "Miami", + "state": "North Dakota", + "zip": "24259", + "country": "Ghana", + "latitude": -6.662595, + "longitude": 23.921575 + }, + "contact": { + "phone": "3023202027", + "email": "lamarkoelpin@heaney.biz" + }, + "credit_card": { + "type": "Maestro", + "number": "39800889982276", + "exp": "01/29", + "cvv": "932" + } +}`, + Output: "map[string]any", ContentType: "application/json", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return person(r), nil @@ -254,7 +254,7 @@ func addPersonLookup() { AddFuncLookup("name", Info{ Display: "Name", Category: "person", - Description: "Random name", + Description: "The given and family name of an individual", Example: "Markus Moen", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -265,7 +265,7 @@ func addPersonLookup() { AddFuncLookup("nameprefix", Info{ Display: "Name Prefix", Category: "person", - Description: "Random name prefix", + Description: "A title or honorific added before a person's name", Example: "Mr.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -276,7 +276,7 @@ func addPersonLookup() { AddFuncLookup("namesuffix", Info{ Display: "Name Suffix", Category: "person", - Description: "Random name suffix", + Description: "A title or designation added after a person's name", Example: "Jr.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -287,7 +287,7 @@ func addPersonLookup() { AddFuncLookup("firstname", Info{ Display: "First Name", Category: "person", - Description: "Random first name", + Description: "The name given to a person at birth", Example: "Markus", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -298,7 +298,7 @@ func addPersonLookup() { AddFuncLookup("middlename", Info{ Display: "Middle Name", Category: "person", - Description: "Random middle name", + Description: "Name between a person's first name and last name", Example: "Belinda", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -309,7 +309,7 @@ func addPersonLookup() { AddFuncLookup("lastname", Info{ Display: "Last Name", Category: "person", - Description: "Random last name", + Description: "The family name or surname of an individual", Example: "Daniel", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -320,7 +320,7 @@ func addPersonLookup() { AddFuncLookup("gender", Info{ Display: "Gender", Category: "person", - Description: "Random gender", + Description: "Classification based on social and cultural norms that identifies an individual", Example: "male", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -331,7 +331,7 @@ func addPersonLookup() { AddFuncLookup("ssn", Info{ Display: "SSN", Category: "person", - Description: "Random social security number", + Description: "Unique nine-digit identifier used for government and financial purposes in the United States", Example: "296446360", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -342,7 +342,7 @@ func addPersonLookup() { AddFuncLookup("hobby", Info{ Display: "Hobby", Category: "person", - Description: "Random hobby activity", + Description: "An activity pursued for leisure and pleasure", Example: "Swimming", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -353,7 +353,7 @@ func addPersonLookup() { AddFuncLookup("email", Info{ Display: "Email", Category: "person", - Description: "Random email", + Description: "Electronic mail used for sending digital messages and communication over the internet", Example: "markusmoen@pagac.net", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -364,7 +364,7 @@ func addPersonLookup() { AddFuncLookup("phone", Info{ Display: "Phone", Category: "person", - Description: "Random phone number", + Description: "Numerical sequence used to contact individuals via telephone or mobile devices", Example: "6136459948", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -375,7 +375,7 @@ func addPersonLookup() { AddFuncLookup("phoneformatted", Info{ Display: "Phone Formatted", Category: "person", - Description: "Random formatted phone number", + Description: "Formatted phone number of a person", Example: "136-459-9489", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -387,8 +387,24 @@ func addPersonLookup() { Display: "Teams", Category: "person", Description: "Randomly split people into teams", - Example: `{"Team 1": ["Sharon","Jeff"], "Team 2": ["Billy","Connor"]}`, + Example: `{ + "Team 1": [ + "Justin", + "Connor", + "Jeff" + ], + "Team 2": [ + "Sharon", + "Fabian", + "Billy" + ], + "Team 3": [ + "Steve", + "Robert" + ] +}`, Output: "map[string][]string", + ContentType: "application/json", Params: []Param{ {Field: "people", Display: "Strings", Type: "[]string", Description: "Array of people"}, {Field: "teams", Display: "Strings", Type: "[]string", Description: "Array of teams"}, diff --git a/vendor/github.com/brianvoe/gofakeit/v6/product.go b/vendor/github.com/brianvoe/gofakeit/v6/product.go new file mode 100644 index 00000000000..7483ecbec8c --- /dev/null +++ b/vendor/github.com/brianvoe/gofakeit/v6/product.go @@ -0,0 +1,253 @@ +package gofakeit + +import ( + "fmt" + "math/rand" + "strings" +) + +type ProductInfo struct { + Name string `json:"name" xml:"name"` + Description string `json:"description" xml:"description"` + Categories []string `json:"categories" xml:"categories"` + Price float64 `json:"price" xml:"price"` + Features []string `json:"features" xml:"features"` + Color string `json:"color" xml:"color"` + Material string `json:"material" xml:"material"` + UPC string `json:"upc" xml:"upc"` +} + +// Product will generate a random set of product information +func Product() *ProductInfo { return product(globalFaker.Rand) } + +// Product will generate a random set of product information +func (f *Faker) Product() *ProductInfo { return product(f.Rand) } + +func product(r *rand.Rand) *ProductInfo { + // Categories + categories := []string{} + weightedCategory, _ := weighted(r, []any{1, 2, 3, 4}, []float32{1, 4, 3, 4}) + + for i := 0; i < weightedCategory.(int); i++ { + categories = append(categories, productCategory(r)) + } + + // Features + features := []string{} + for i := 0; i < number(r, 1, 5); i++ { + features = append(features, productFeature(r)) + } + + product := &ProductInfo{ + Name: productName(r), + Description: productDescription(r), + Categories: categories, + Price: price(r, 3.00, 100.00), + UPC: productUPC(r), + Features: features, + Color: safeColor(r), + Material: productMaterial(r), + } + + return product +} + +// ProductName will generate a random product name +func ProductName() string { return productName(globalFaker.Rand) } + +// ProductName will generate a random product name +func (f *Faker) ProductName() string { return productName(f.Rand) } + +func productName(r *rand.Rand) string { + name := getRandValue(r, []string{"product", "name"}) + switch number(r, 0, 9) { + case 1: + // Name + Adjective + Feature + return title(fmt.Sprintf("%s %s %s", name, getRandValue(r, []string{"product", "adjective"}), productFeature(r))) + case 2: + // Adjective + Material + Name + return title(fmt.Sprintf("%s %s %s", getRandValue(r, []string{"product", "adjective"}), productMaterial(r), name)) + case 3: + // Color + Name + Suffix + return title(fmt.Sprintf("%s %s %s", safeColor(r), name, getRandValue(r, []string{"product", "suffix"}))) + case 4: + // Feature + Name + Adjective + return title(fmt.Sprintf("%s %s %s", productFeature(r), name, getRandValue(r, []string{"product", "adjective"}))) + case 5: + // Material + Color + Name + return title(fmt.Sprintf("%s %s %s", productMaterial(r), safeColor(r), name)) + case 6: + // Name + Suffix + Material + return title(fmt.Sprintf("%s %s %s", name, getRandValue(r, []string{"product", "suffix"}), productMaterial(r))) + case 7: + // Adjective + Feature + Name + return title(fmt.Sprintf("%s %s %s", getRandValue(r, []string{"product", "adjective"}), productFeature(r), name)) + case 8: + // Color + Material + Name + return title(fmt.Sprintf("%s %s %s", safeColor(r), productMaterial(r), name)) + case 9: + // Suffix + Adjective + Name + return title(fmt.Sprintf("%s %s %s", getRandValue(r, []string{"product", "suffix"}), getRandValue(r, []string{"product", "adjective"}), name)) + } + + // case: 0 - Adjective + Name + Suffix + return title(fmt.Sprintf("%s %s %s", getRandValue(r, []string{"product", "adjective"}), name, getRandValue(r, []string{"product", "suffix"}))) +} + +// ProductDescription will generate a random product description +func ProductDescription() string { return productDescription(globalFaker.Rand) } + +// ProductDescription will generate a random product description +func (f *Faker) ProductDescription() string { return productDescription(f.Rand) } + +func productDescription(r *rand.Rand) string { + desc := []string{} + for i := 0; i < number(r, 1, 3); i++ { + desc = append(desc, sentence(r, number(r, 5, 15))) + } + + return strings.Join(desc, " ") +} + +// ProductCategory will generate a random product category +func ProductCategory() string { return productCategory(globalFaker.Rand) } + +// ProductCategory will generate a random product category +func (f *Faker) ProductCategory() string { return productCategory(f.Rand) } + +func productCategory(r *rand.Rand) string { + return getRandValue(r, []string{"product", "category"}) +} + +// ProductFeature will generate a random product feature +func ProductFeature() string { return productFeature(globalFaker.Rand) } + +// ProductFeature will generate a random product feature +func (f *Faker) ProductFeature() string { return productFeature(f.Rand) } + +func productFeature(r *rand.Rand) string { + return getRandValue(r, []string{"product", "feature"}) +} + +// ProductMaterial will generate a random product material +func ProductMaterial() string { return productMaterial(globalFaker.Rand) } + +// ProductMaterial will generate a random product material +func (f *Faker) ProductMaterial() string { return productMaterial(f.Rand) } + +func productMaterial(r *rand.Rand) string { + return getRandValue(r, []string{"product", "material"}) +} + +// ProductUPC will generate a random product UPC +func ProductUPC() string { return productUPC(globalFaker.Rand) } + +// ProductUPC will generate a random product UPC +func (f *Faker) ProductUPC() string { return productUPC(f.Rand) } + +func productUPC(r *rand.Rand) string { + // The first digit of a UPC is a fixed digit (usually 0) + upc := "0" + + // Generate the remaining 11 digits randomly + for i := 1; i < 12; i++ { + digit := number(r, 0, 9) + upc += fmt.Sprintf("%d", digit) + } + + return upc +} + +func addProductLookup() { + AddFuncLookup("product", Info{ + Display: "Product", + Category: "product", + Description: "An item created for sale or use", + Example: `{ + "name": "olive copper monitor", + "description": "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.", + "categories": [ + "clothing", + "tools and hardware" + ], + "price": 7.61, + "features": [ + "ultra-lightweight" + ], + "color": "navy", + "material": "brass", + "upc": "012780949980" +}`, + Output: "map[string]any", + ContentType: "application/json", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return product(r), nil + }, + }) + + AddFuncLookup("productname", Info{ + Display: "Product Name", + Category: "product", + Description: "Distinctive title or label assigned to a product for identification and marketing", + Example: "olive copper monitor", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productName(r), nil + }, + }) + + AddFuncLookup("productdescription", Info{ + Display: "Product Description", + Category: "product", + Description: "Explanation detailing the features and characteristics of a product", + Example: "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productDescription(r), nil + }, + }) + + AddFuncLookup("productcategory", Info{ + Display: "Product Category", + Category: "product", + Description: "Classification grouping similar products based on shared characteristics or functions", + Example: "clothing", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productCategory(r), nil + }, + }) + + AddFuncLookup("productfeature", Info{ + Display: "Product Feature", + Category: "product", + Description: "Specific characteristic of a product that distinguishes it from others products", + Example: "ultra-lightweight", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productFeature(r), nil + }, + }) + + AddFuncLookup("productmaterial", Info{ + Display: "Product Material", + Category: "product", + Description: "The substance from which a product is made, influencing its appearance, durability, and properties", + Example: "brass", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productMaterial(r), nil + }, + }) + + AddFuncLookup("productupc", Info{ + Display: "Product UPC", + Category: "product", + Description: "Standardized barcode used for product identification and tracking in retail and commerce", + Example: "012780949980", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return productUPC(r), nil + }, + }) +} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/school.go b/vendor/github.com/brianvoe/gofakeit/v6/school.go index fb62c7f81cd..f90daef5086 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/school.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/school.go @@ -18,7 +18,7 @@ func addSchoolLookup() { AddFuncLookup("school", Info{ Display: "School", Category: "school", - Description: "School names, education places. Such as uni, High School etc.", + Description: "An institution for formal education and learning", Example: `Harborview State Academy`, Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/sql.go b/vendor/github.com/brianvoe/gofakeit/v6/sql.go index 1394240b788..b9918b23aa7 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/sql.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/sql.go @@ -105,12 +105,12 @@ func addDatabaseSQLLookup() { AddFuncLookup("sql", Info{ Display: "SQL", Category: "database", - Description: "Generates an object or an array of objects in json format", + Description: "Command in SQL used to add new data records into a database table", 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');`, + (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{ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/string.go b/vendor/github.com/brianvoe/gofakeit/v6/string.go index 53c44e29a37..778772bc07c 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/string.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/string.go @@ -123,7 +123,7 @@ func addStringLookup() { AddFuncLookup("letter", Info{ Display: "Letter", Category: "string", - Description: "Generate a single random lower case ASCII letter", + Description: "Character or symbol from the American Standard Code for Information Interchange (ASCII) character set", Example: "g", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -134,7 +134,7 @@ func addStringLookup() { AddFuncLookup("lettern", Info{ Display: "LetterN", Category: "string", - Description: "Generate a random ASCII string with length N", + Description: "ASCII string with length N", Example: "gbRMaRxHki", Output: "string", Params: []Param{ @@ -153,7 +153,7 @@ func addStringLookup() { AddFuncLookup("vowel", Info{ Display: "Vowel", Category: "string", - Description: "Generate a single random lower case vowel", + Description: "Speech sound produced with an open vocal tract", Example: "a", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -164,7 +164,7 @@ func addStringLookup() { AddFuncLookup("digit", Info{ Display: "Digit", Category: "string", - Description: "Generate a single ASCII digit", + Description: "Numerical symbol used to represent numbers", Example: "0", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -175,7 +175,7 @@ func addStringLookup() { AddFuncLookup("digitn", Info{ Display: "DigitN", Category: "string", - Description: "Generate a random string of length N consists of ASCII digits", + Description: "string of length N consisting of ASCII digits", Example: "0136459948", Output: "string", Params: []Param{ @@ -254,7 +254,7 @@ func addStringLookup() { AddFuncLookup("randomstring", Info{ Display: "Random String", Category: "string", - Description: "Randomly grab one string from array", + Description: "Return a random string from a string array", Example: "hello,world,whats,up => world", Output: "[]string", Params: []Param{ diff --git a/vendor/github.com/brianvoe/gofakeit/v6/template.go b/vendor/github.com/brianvoe/gofakeit/v6/template.go index 2eb02cb473e..329d6f78e4f 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/template.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/template.go @@ -38,7 +38,6 @@ func (f *Faker) Template(template string, co *TemplateOptions) (string, error) { // MarkdownOptions defines values needed for markdown document generation type MarkdownOptions struct { - SectionsCount int `json:"sections" xml:"sections" fake:"{number:1,10}"` } // Template for Markdown @@ -109,7 +108,6 @@ func (f *Faker) Markdown(co *MarkdownOptions) (string, error) { // 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 @@ -213,6 +211,7 @@ func templateFuncMap(r *rand.Rand, fm *template.FuncMap) *template.FuncMap { if err != nil { return 0 } + return i case float64: return int(v) @@ -227,6 +226,29 @@ func templateFuncMap(r *rand.Rand, fm *template.FuncMap) *template.FuncMap { } } + // enable passing any type to return a float64 + funcMap["ToFloat"] = func(args any) float64 { + switch v := args.(type) { + case string: + i, err := strconv.ParseFloat(v, 64) + if err != nil { + return 0 + } + + return i + case float64: + return v + case float32: + return float64(v) + case int: + return float64(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) { @@ -279,6 +301,13 @@ func templateFuncMap(r *rand.Rand, fm *template.FuncMap) *template.FuncMap { return args } + // Add passed in function map to the function map + if fm != nil { + for k, v := range *fm { + funcMap[k] = v + } + } + return &funcMap } @@ -311,12 +340,10 @@ func addTemplateLookup() { Display: "Template", Category: "template", Description: "Generates document from template", - Example: ` - {{Firstname}} {{Lastname}} - - // output - Markus Moen - `, + Example: `{{Firstname}} {{Lastname}} + +// output +Markus Moen`, Output: "string", ContentType: "text/plain", Params: []Param{ @@ -346,19 +373,36 @@ func addTemplateLookup() { 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 - } + Description: "Lightweight markup language used for formatting plain text", + Example: `# PurpleSheep5 + +*Author: Amie Feil* - template_result, err := templateFunc(templateMarkdown, templateFuncMap(r, nil), &MarkdownOptions{SectionsCount: sections}) +Quarterly without week it hungry thing someone. Him regularly today whomever this revolt hence. From his timing as quantity us these. Yours live these frantic not may another. How this ours his them those whose. + +Them batch its Iraqi most that few. Abroad cheese this whereas next how there. Gorgeous genetics time choir fiction therefore yourselves. Am those infrequently heap software quarterly rather. Punctuation yellow where several his orchard to. + +## Table of Contents +- [Installation](#installation) +- [Usage](#usage) +- [License](#license) + +## Installation +'''bash +pip install PurpleSheep5 +''' + +## Usage +'''python +result = purplesheep5.process("funny request") +print("purplesheep5 result:", "in progress") +''' + +## License +MIT`, + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + template_result, err := templateFunc(templateMarkdown, templateFuncMap(r, nil), &MarkdownOptions{}) return string(template_result), err }, }) @@ -366,19 +410,34 @@ func addTemplateLookup() { 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 - } + Description: "Written content of an email message, including the sender's message to the recipient", + Example: `Subject: Greetings from Marcel! + +Dear Pagac, + +Hello there! Sending positive vibes your way. + +I hope you're doing great. May your week be filled with joy. - template_result, err := templateFunc(templateEmail, templateFuncMap(r, nil), &EmailOptions{SectionsCount: sections}) +Virtually woman where team late quarterly without week it hungry. Thing someone him regularly today whomever this revolt hence from. His timing as quantity us these yours live these frantic. Not may another how this ours his them those whose. Them batch its Iraqi most that few abroad cheese this. + +Whereas next how there gorgeous genetics time choir fiction therefore. Yourselves am those infrequently heap software quarterly rather punctuation yellow. Where several his orchard to frequently hence victorious boxers each. Does auspicious yourselves first soup tomorrow this that must conclude. Anyway some yearly who cough laugh himself both yet rarely. + +Me dolphin intensely block would leap plane us first then. Down them eager would hundred super throughout animal yet themselves. Been group flock shake part purchase up usually it her. None it hers boat what their there Turkmen moreover one. Lebanese to brace these shower in it everybody should whatever. + +I'm curious to know what you think about it. If you have a moment, please feel free to check out the project on Bitbucket + +I'm eager to hear what you think. Looking forward to your feedback! + +Thank you for your consideration! Thanks in advance for your time. + +Kind regards +Milford Johnston +jamelhaag@king.org +(507)096-3058`, + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + template_result, err := templateFunc(templateEmail, templateFuncMap(r, nil), &EmailOptions{}) 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 index 3d580d3ae16..ecd0c1cac70 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/time.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/time.go @@ -17,6 +17,16 @@ 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 past time.Time struct +func PastDate() time.Time { return pastDate(globalFaker.Rand) } + +// FutureDate will generate a random past time.Time struct +func (f *Faker) PastDate() time.Time { return pastDate(f.Rand) } + +func pastDate(r *rand.Rand) time.Time { + return time.Now().Add(time.Hour * -time.Duration(number(r, 1, 12))) +} + // FutureDate will generate a random future time.Time struct func FutureDate() time.Time { return futureDate(globalFaker.Rand) } @@ -203,7 +213,7 @@ func addDateTimeLookup() { AddFuncLookup("date", Info{ Display: "Date", Category: "time", - Description: "Random date", + Description: "Representation of a specific day, month, and year, often used for chronological reference", Example: "2006-01-02T15:04:05Z07:00", Output: "string", Params: []Param{ @@ -311,10 +321,32 @@ func addDateTimeLookup() { }, }) + AddFuncLookup("pasttime", Info{ + Display: "PastTime", + Category: "time", + Description: "Date that has occurred before the current moment in time", + Example: "2007-01-24 13:00:35.820738079 +0000 UTC", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return pastDate(r), nil + }, + }) + + AddFuncLookup("futuretime", Info{ + Display: "FutureTime", + Category: "time", + Description: "Date that has occurred after the current moment in time", + Example: "2107-01-24 13:00:35.820738079 +0000 UTC", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return futureDate(r), nil + }, + }) + AddFuncLookup("nanosecond", Info{ Display: "Nanosecond", Category: "time", - Description: "Random nanosecond", + Description: "Unit of time equal to One billionth (10^-9) of a second", Example: "196446360", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -325,7 +357,7 @@ func addDateTimeLookup() { AddFuncLookup("second", Info{ Display: "Second", Category: "time", - Description: "Random second", + Description: "Unit of time equal to 1/60th of a minute", Example: "43", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -336,7 +368,7 @@ func addDateTimeLookup() { AddFuncLookup("minute", Info{ Display: "Minute", Category: "time", - Description: "Random minute", + Description: "Unit of time equal to 60 seconds", Example: "34", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -347,7 +379,7 @@ func addDateTimeLookup() { AddFuncLookup("hour", Info{ Display: "Hour", Category: "time", - Description: "Random hour", + Description: "Unit of time equal to 60 minutes", Example: "8", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -358,7 +390,7 @@ func addDateTimeLookup() { AddFuncLookup("day", Info{ Display: "Day", Category: "time", - Description: "Random day", + Description: "24-hour period equivalent to one rotation of Earth on its axis", Example: "12", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -369,7 +401,7 @@ func addDateTimeLookup() { AddFuncLookup("weekday", Info{ Display: "Weekday", Category: "time", - Description: "Random week day", + Description: "Day of the week excluding the weekend", Example: "Friday", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -380,7 +412,7 @@ func addDateTimeLookup() { AddFuncLookup("month", Info{ Display: "Month", Category: "time", - Description: "Random month", + Description: "Division of the year, typically 30 or 31 days long", Example: "1", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -391,7 +423,7 @@ func addDateTimeLookup() { AddFuncLookup("monthstring", Info{ Display: "Month String", Category: "time", - Description: "Random month in string output", + Description: "String Representation of a month name", Example: "September", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -402,7 +434,7 @@ func addDateTimeLookup() { AddFuncLookup("year", Info{ Display: "Year", Category: "time", - Description: "Random year", + Description: "Period of 365 days, the time Earth takes to orbit the Sun", Example: "1900", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -413,7 +445,7 @@ func addDateTimeLookup() { AddFuncLookup("timezone", Info{ Display: "Timezone", Category: "time", - Description: "Random timezone", + Description: "Region where the same standard time is used, based on longitudinal divisions of the Earth", Example: "Kaliningrad Standard Time", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -424,7 +456,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneabv", Info{ Display: "Timezone Abbreviation", Category: "time", - Description: "Random abbreviated timezone", + Description: "Abbreviated 3-letter word of a timezone", Example: "KST", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -435,7 +467,7 @@ func addDateTimeLookup() { AddFuncLookup("timezonefull", Info{ Display: "Timezone Full", Category: "time", - Description: "Random full timezone", + Description: "Full name of a timezone", Example: "(UTC+03:00) Kaliningrad, Minsk", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -446,7 +478,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneoffset", Info{ Display: "Timezone Offset", Category: "time", - Description: "Random timezone offset", + Description: "The difference in hours from Coordinated Universal Time (UTC) for a specific region", Example: "3", Output: "float32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -457,7 +489,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneregion", Info{ Display: "Timezone Region", Category: "time", - Description: "Random region timezone", + Description: "Geographic area sharing the same standard time", Example: "America/Alaska", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go b/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go index 01f2c503b0a..c9fcbd8ecec 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_adjective.go @@ -95,7 +95,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjective", Info{ Display: "Adjective", Category: "word", - Description: "Random adjective", + Description: "Word describing or modifying a noun", Example: "genuine", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -106,7 +106,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivedescriptive", Info{ Display: "Descriptive Adjective", Category: "word", - Description: "Random descriptive adjective", + Description: "Adjective that provides detailed characteristics about a noun", Example: "brave", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -117,7 +117,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivequantitative", Info{ Display: "Quantitative Adjective", Category: "word", - Description: "Random quantitative adjective", + Description: "Adjective that indicates the quantity or amount of something", Example: "a little", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -128,7 +128,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveproper", Info{ Display: "Proper Adjective", Category: "word", - Description: "Random proper adjective", + Description: "Adjective derived from a proper noun, often used to describe nationality or origin", Example: "Afghan", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -139,7 +139,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivedemonstrative", Info{ Display: "Demonstrative Adjective", Category: "word", - Description: "Random demonstrative adjective", + Description: "Adjective used to point out specific things", Example: "this", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -150,7 +150,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivepossessive", Info{ Display: "Possessive Adjective", Category: "word", - Description: "Random possessive adjective", + Description: "Adjective indicating ownership or possession", Example: "my", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -161,7 +161,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveinterrogative", Info{ Display: "Interrogative Adjective", Category: "word", - Description: "Random interrogative adjective", + Description: "Adjective used to ask questions", Example: "what", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -172,7 +172,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveindefinite", Info{ Display: "Indefinite Adjective", Category: "word", - Description: "Random indefinite adjective", + Description: "Adjective describing a non-specific noun", Example: "few", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go b/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go index e5456db991e..b148bf8d3d5 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_adverb.go @@ -89,7 +89,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverb", Info{ Display: "Adverb", Category: "word", - Description: "Random adverb", + Description: "Word that modifies verbs, adjectives, or other adverbs", Example: "smoothly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -100,7 +100,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbmanner", Info{ Display: "Adverb Manner", Category: "word", - Description: "Random manner adverb", + Description: "Adverb that describes how an action is performed", Example: "stupidly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -111,7 +111,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbdegree", Info{ Display: "Adverb Degree", Category: "word", - Description: "Random degree adverb", + Description: "Adverb that indicates the degree or intensity of an action or adjective", Example: "intensely", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -122,7 +122,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbplace", Info{ Display: "Adverb Place", Category: "word", - Description: "Random place adverb", + Description: "Adverb that indicates the location or direction of an action", Example: "east", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -133,7 +133,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbtimedefinite", Info{ Display: "Adverb Time Definite", Category: "word", - Description: "Random time definite adverb", + Description: "Adverb that specifies the exact time an action occurs", Example: "now", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -144,7 +144,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbtimeindefinite", Info{ Display: "Adverb Time Indefinite", Category: "word", - Description: "Random time indefinite adverb", + Description: "Adverb that gives a general or unspecified time frame", Example: "already", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -155,7 +155,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbfrequencydefinite", Info{ Display: "Adverb Frequency Definite", Category: "word", - Description: "Random frequency definite adverb", + Description: "Adverb that specifies how often an action occurs with a clear frequency", Example: "hourly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -166,7 +166,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbfrequencyindefinite", Info{ Display: "Adverb Frequency Indefinite", Category: "word", - Description: "Random frequency indefinite adverb", + Description: "Adverb that specifies how often an action occurs without specifying a particular frequency", Example: "occasionally", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_comment.go b/vendor/github.com/brianvoe/gofakeit/v6/word_comment.go new file mode 100644 index 00000000000..3f5d3e41962 --- /dev/null +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_comment.go @@ -0,0 +1,73 @@ +package gofakeit + +import ( + "math/rand" + "strings" +) + +// Comment will generate a random statement or remark expressing an opinion, observation, or reaction +func Comment() string { return comment(globalFaker.Rand) } + +// Comment will generate a random statement or remark expressing an opinion, observation, or reaction +func (f *Faker) Comment() string { return comment(f.Rand) } + +func comment(r *rand.Rand) string { + structures := [][]string{ + {"interjection", "adjective", "noun", "verb", "adverb"}, + {"noun", "verb", "preposition", "determiner", "adjective", "noun"}, + {"noun", "verb", "adverb"}, + {"adjective", "noun", "verb"}, + {"noun", "verb", "preposition", "noun"}, + } + + // Randomly select a structure + structure := structures[number(r, 0, len(structures)-1)] + + // Build the sentence + var commentParts []string + for _, wordType := range structure { + switch wordType { + case "noun": + commentParts = append(commentParts, noun(r)) + case "verb": + commentParts = append(commentParts, verb(r)) + case "adjective": + commentParts = append(commentParts, adjective(r)) + case "adverb": + commentParts = append(commentParts, adverb(r)) + case "interjection": + commentParts = append(commentParts, interjection(r)) + case "preposition": + commentParts = append(commentParts, preposition(r)) + case "determiner": + commentParts = append(commentParts, nounDeterminer(r)) + default: + // Should never hit + panic("Invalid word type") + } + } + + // Combine the words into a sentence + sentence := strings.Join(commentParts, " ") + + // Capitalize the first letter + sentence = title(sentence) + + // Add a period to the end of the sentence + sentence = sentence + "." + + return sentence +} + +func addWordCommentLookup() { + AddFuncLookup("comment", Info{ + Display: "Comment", + Category: "word", + Description: "Statement or remark expressing an opinion, observation, or reaction", + Example: "wow", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return interjection(r), nil + }, + }) +} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go b/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go index ecfc283671f..5be26166c9d 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_connective.go @@ -85,7 +85,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connective", Info{ Display: "Connective", Category: "word", - Description: "Random connective word", + Description: "Word used to connect words or sentences", Example: "such as", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -96,7 +96,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivetime", Info{ Display: "Connective Time", Category: "word", - Description: "Random connective time word", + Description: "Connective word used to indicate a temporal relationship between events or actions", Example: "finally", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -107,7 +107,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecomparative", Info{ Display: "Connective Comparitive", Category: "word", - Description: "Random connective comparative word", + Description: "Connective word used to indicate a comparison between two or more things", Example: "in addition", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -118,7 +118,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecomplaint", Info{ Display: "Connective Complaint", Category: "word", - Description: "Random connective complaint word", + Description: "Connective word used to express dissatisfaction or complaints about a situation", Example: "besides", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -129,7 +129,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivelisting", Info{ Display: "Connective Listing", Category: "word", - Description: "Random connective listing word", + Description: "Connective word used to list or enumerate items or examples", Example: "firstly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -140,7 +140,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecasual", Info{ Display: "Connective Casual", Category: "word", - Description: "Random connective casual word", + Description: "Connective word used to indicate a cause-and-effect relationship between events or actions", Example: "an outcome of", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -151,7 +151,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectiveexamplify", Info{ Display: "Connective Examplify", Category: "word", - Description: "Random connective examplify word", + Description: "Connective word used to provide examples or illustrations of a concept or idea", Example: "then", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_general.go b/vendor/github.com/brianvoe/gofakeit/v6/word_general.go index db51e4b960d..d2a84f9201b 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_general.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_general.go @@ -28,7 +28,7 @@ func addWordGeneralLookup() { AddFuncLookup("word", Info{ Display: "Word", Category: "word", - Description: "Random word", + Description: "Basic unit of language representing a concept or thing, consisting of letters and having meaning", Example: "man", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go b/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go index 48c9aee008d..77722d76c33 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_grammar.go @@ -25,7 +25,7 @@ func addWordGrammerLookup() { AddFuncLookup("sentencesimple", Info{ Display: "Simple Sentence", Category: "word", - Description: "Random simple sentence", + Description: "Group of words that expresses a complete thought", Example: "A tribe fly the lemony kitchen.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_misc.go b/vendor/github.com/brianvoe/gofakeit/v6/word_misc.go new file mode 100644 index 00000000000..59d47e59fb2 --- /dev/null +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_misc.go @@ -0,0 +1,24 @@ +package gofakeit + +import "math/rand" + +// Interjection will generate a random word expressing emotion +func Interjection() string { return interjection(globalFaker.Rand) } + +// Interjection will generate a random word expressing emotion +func (f *Faker) Interjection() string { return interjection(f.Rand) } + +func interjection(r *rand.Rand) string { return getRandValue(r, []string{"word", "interjection"}) } + +func addWordMiscLookup() { + AddFuncLookup("interjection", Info{ + Display: "Interjection", + Category: "word", + Description: "Word expressing emotion", + Example: "wow", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return interjection(r), nil + }, + }) +} diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go b/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go index 368ec6cf606..fbf9e806ed9 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_noun.go @@ -111,11 +111,19 @@ func nounProper(r *rand.Rand) string { return getRandValue(r, []string{"person", "first"}) } +// NounDeterminer will generate a random noun determiner +func NounDeterminer() string { return nounDeterminer(globalFaker.Rand) } + +// NounDeterminer will generate a random noun determiner +func (f *Faker) NounDeterminer() string { return nounDeterminer(f.Rand) } + +func nounDeterminer(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_determiner"}) } + func addWordNounLookup() { AddFuncLookup("noun", Info{ Display: "Noun", Category: "word", - Description: "Random noun", + Description: "Person, place, thing, or idea, named or referred to in a sentence", Example: "aunt", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -126,7 +134,7 @@ func addWordNounLookup() { AddFuncLookup("nouncommon", Info{ Display: "Noun Common", Category: "word", - Description: "Random common noun", + Description: "General name for people, places, or things, not specific or unique", Example: "part", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -137,7 +145,7 @@ func addWordNounLookup() { AddFuncLookup("nounconcrete", Info{ Display: "Noun Concrete", Category: "word", - Description: "Random concrete noun", + Description: "Names for physical entities experienced through senses like sight, touch, smell, or taste", Example: "snowman", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -148,7 +156,7 @@ func addWordNounLookup() { AddFuncLookup("nounabstract", Info{ Display: "Noun Abstract", Category: "word", - Description: "Random abstract noun", + Description: "Ideas, qualities, or states that cannot be perceived with the five senses", Example: "confusion", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -159,7 +167,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectivepeople", Info{ Display: "Noun Collective People", Category: "word", - Description: "Random collective noun person", + Description: "Group of people or things regarded as a unit", Example: "body", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -170,7 +178,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectiveanimal", Info{ Display: "Noun Collective Animal", Category: "word", - Description: "Random collective noun animal", + Description: "Group of animals, like a 'pack' of wolves or a 'flock' of birds", Example: "party", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -181,7 +189,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectivething", Info{ Display: "Noun Collective Thing", Category: "word", - Description: "Random collective noun thing", + Description: "Group of objects or items, such as a 'bundle' of sticks or a 'cluster' of grapes", Example: "hand", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -192,7 +200,7 @@ func addWordNounLookup() { AddFuncLookup("nouncountable", Info{ Display: "Noun Countable", Category: "word", - Description: "Random countable noun", + Description: "Items that can be counted individually", Example: "neck", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -203,7 +211,7 @@ func addWordNounLookup() { AddFuncLookup("noununcountable", Info{ Display: "Noun Uncountable", Category: "word", - Description: "Random uncountable noun", + Description: "Items that can't be counted individually", Example: "seafood", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -214,11 +222,22 @@ func addWordNounLookup() { AddFuncLookup("nounproper", Info{ Display: "Noun Proper", Category: "word", - Description: "Random proper noun", + Description: "Specific name for a particular person, place, or organization", Example: "John", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return nounProper(r), nil }, }) + + AddFuncLookup("noundeterminer", Info{ + Display: "Noun Determiner", + Category: "word", + Description: "Word that introduces a noun and identifies it as a noun", + Example: "your", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return nounDeterminer(r), nil + }, + }) } diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go b/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go index f3f6a3bc4ba..1432f1730cf 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_phrase.go @@ -109,7 +109,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrase", Info{ Display: "Phrase", Category: "word", - Description: "Random phrase", + Description: "A small group of words standing together", Example: "time will tell", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -120,7 +120,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrasenoun", Info{ Display: "Noun Phrase", Category: "word", - Description: "Random noun phrase", + Description: "Phrase with a noun as its head, functions within sentence like a noun", Example: "a tribe", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -131,7 +131,7 @@ func addWordPhraseLookup() { AddFuncLookup("phraseverb", Info{ Display: "Verb Phrase", Category: "word", - Description: "Random verb phrase", + Description: "Phrase that Consists of a verb and its modifiers, expressing an action or state", Example: "a tribe", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -142,7 +142,7 @@ func addWordPhraseLookup() { AddFuncLookup("phraseadverb", Info{ Display: "Adverb Phrase", Category: "word", - Description: "Random adverb phrase", + Description: "Phrase that modifies a verb, adjective, or another adverb, providing additional information.", Example: "fully gladly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -153,7 +153,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrasepreposition", Info{ Display: "Preposition Phrase", Category: "word", - Description: "Random preposition phrase", + Description: "Phrase starting with a preposition, showing relation between elements in a sentence.", Example: "out the black thing", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go b/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go index efc4aabee4d..bf1d2f74a75 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_preposition.go @@ -51,7 +51,7 @@ func addWordPrepositionLookup() { AddFuncLookup("preposition", Info{ Display: "Preposition", Category: "word", - Description: "Random preposition", + Description: "Words used to express the relationship of a noun or pronoun to other words in a sentence", Example: "other than", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -62,7 +62,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositionsimple", Info{ Display: "Preposition Simple", Category: "word", - Description: "Random simple preposition", + Description: "Single-word preposition showing relationships between 2 parts of a sentence", Example: "out", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -73,7 +73,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositiondouble", Info{ Display: "Preposition Double", Category: "word", - Description: "Random double preposition", + Description: "Two-word combination preposition, indicating a complex relation", Example: "before", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -84,7 +84,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositioncompound", Info{ Display: "Preposition Compound", Category: "word", - Description: "Random compound preposition", + Description: "Preposition that can be formed by combining two or more prepositions", Example: "according to", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go b/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go index a62d830f23a..00c533104f9 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_pronoun.go @@ -106,7 +106,7 @@ func addWordPronounLookup() { AddFuncLookup("pronoun", Info{ Display: "Pronoun", Category: "word", - Description: "Generates a random pronoun", + Description: "Word used in place of a noun to avoid repetition", Example: "me", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -117,7 +117,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounpersonal", Info{ Display: "Pronoun Personal", Category: "word", - Description: "Generates a random personal pronoun", + Description: "Pronoun referring to a specific persons or things", Example: "it", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -128,7 +128,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounobject", Info{ Display: "Pronoun Object", Category: "word", - Description: "Generates a random object pronoun", + Description: "Pronoun used as the object of a verb or preposition", Example: "it", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -139,7 +139,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounpossessive", Info{ Display: "Pronoun Possessive", Category: "word", - Description: "Generates a random possessive pronoun", + Description: "Pronoun indicating ownership or belonging", Example: "mine", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -150,7 +150,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounreflective", Info{ Display: "Pronoun Reflective", Category: "word", - Description: "Generates a random reflective pronoun", + Description: "Pronoun referring back to the subject of the sentence", Example: "myself", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -161,7 +161,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounindefinite", Info{ Display: "Pronoun Indefinite", Category: "word", - Description: "Generates a random indefinite pronoun", + Description: "Pronoun that does not refer to a specific person or thing", Example: "few", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -172,7 +172,7 @@ func addWordPronounLookup() { AddFuncLookup("pronoundemonstrative", Info{ Display: "Pronoun Demonstrative", Category: "word", - Description: "Generates a random demonstrative pronoun", + Description: "Pronoun that points out specific people or things", Example: "this", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -183,7 +183,7 @@ func addWordPronounLookup() { AddFuncLookup("pronouninterrogative", Info{ Display: "Pronoun Interrogative", Category: "word", - Description: "Generates a random interrogative pronoun", + Description: "Pronoun used to ask questions", Example: "what", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -194,7 +194,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounrelative", Info{ Display: "Pronoun Relative", Category: "word", - Description: "Generates a random relative pronoun", + Description: "Pronoun that introduces a clause, referring back to a noun or pronoun", Example: "as", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go b/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go index 25896b08dc4..de8d41e9eba 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_sentence.go @@ -124,7 +124,7 @@ func addWordSentenceLookup() { AddFuncLookup("sentence", Info{ Display: "Sentence", Category: "word", - Description: "Random sentence", + Description: "Set of words expressing a statement, question, exclamation, or command", Example: "Interpret context record river mind.", Output: "string", Params: []Param{ @@ -146,8 +146,8 @@ func addWordSentenceLookup() { 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.", + Description: "Distinct section of writing covering a single theme, composed of multiple sentences", + 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.", Output: "string", Params: []Param{ {Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"}, @@ -192,7 +192,7 @@ func addWordSentenceLookup() { AddFuncLookup("question", Info{ Display: "Question", Category: "word", - Description: "Random question", + Description: "Statement formulated to inquire or seek clarification", Example: "Roof chia echo?", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -201,9 +201,9 @@ func addWordSentenceLookup() { }) AddFuncLookup("quote", Info{ - Display: "Qoute", + Display: "Quote", Category: "word", - Description: "Random quote", + Description: "Direct repetition of someone else's words", Example: `"Roof chia echo." - Lura Lockman`, Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go b/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go index a18363bbd50..6a5db234740 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/word_verb.go @@ -63,7 +63,7 @@ func addWordVerbLookup() { AddFuncLookup("verb", Info{ Display: "Verb", Category: "word", - Description: "Random verb", + Description: "Word expressing an action, event or state", Example: "release", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -74,7 +74,7 @@ func addWordVerbLookup() { AddFuncLookup("verbaction", Info{ Display: "Action Verb", Category: "word", - Description: "Random action verb", + Description: "Verb Indicating a physical or mental action", Example: "close", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -85,7 +85,7 @@ func addWordVerbLookup() { AddFuncLookup("verbtransitive", Info{ Display: "Transitive Verb", Category: "word", - Description: "Random transitive verb", + Description: "Verb that requires a direct object to complete its meaning", Example: "follow", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -96,7 +96,7 @@ func addWordVerbLookup() { AddFuncLookup("verbintransitive", Info{ Display: "Intransitive Verb", Category: "word", - Description: "Random intransitive verb", + Description: "Verb that does not require a direct object to complete its meaning", Example: "laugh", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -107,7 +107,7 @@ func addWordVerbLookup() { AddFuncLookup("verblinking", Info{ Display: "Linking Verb", Category: "word", - Description: "Random linking verb", + Description: "Verb that Connects the subject of a sentence to a subject complement", Example: "was", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -118,7 +118,7 @@ func addWordVerbLookup() { AddFuncLookup("verbhelping", Info{ Display: "Helping Verb", Category: "word", - Description: "Random helping verb", + Description: "Auxiliary verb that helps the main verb complete the sentence", Example: "be", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/vendor/github.com/brianvoe/gofakeit/v6/xml.go b/vendor/github.com/brianvoe/gofakeit/v6/xml.go index e851fb864be..b922d0defdd 100644 --- a/vendor/github.com/brianvoe/gofakeit/v6/xml.go +++ b/vendor/github.com/brianvoe/gofakeit/v6/xml.go @@ -15,8 +15,8 @@ type XMLOptions struct { 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"` + Fields []Field `json:"fields" xml:"fields" fake:"{fields}"` } type xmlArray struct { @@ -271,20 +271,18 @@ func addFileXMLLookup() { Display: "XML", Category: "file", Description: "Generates an single or an array of elements in xml format", - Example: ` - - - Markus - Moen - Dc0VYXjkWABx - - - Osborne - Hilll - XPJ9OVNbs5lm - - - `, + Example: ` + + Markus + Moen + Dc0VYXjkWABx + + + Osborne + Hilll + XPJ9OVNbs5lm + +`, Output: "[]byte", ContentType: "application/xml", Params: []Param{ @@ -292,8 +290,8 @@ func addFileXMLLookup() { {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"}, + {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) { xo := XMLOptions{} @@ -327,6 +325,12 @@ func addFileXMLLookup() { return nil, err } + indent, err := info.GetBool(m, "indent") + if err != nil { + return nil, err + } + xo.Indent = indent + // Check to make sure fields has length if len(fieldsStr) > 0 { xo.Fields = make([]Field, len(fieldsStr)) @@ -340,12 +344,6 @@ func addFileXMLLookup() { } } - 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/modules.txt b/vendor/modules.txt index 4a0baaf9ef0..7464e5d18d2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -214,7 +214,7 @@ 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 +# github.com/brianvoe/gofakeit/v6 v6.28.0 ## explicit; go 1.21 github.com/brianvoe/gofakeit/v6 github.com/brianvoe/gofakeit/v6/data