MCPcopy Index your code

hub / github.com/allaboutapps/go-starter / functions

Functions1,311 in github.com/allaboutapps/go-starter

↓ 527 callersMethodError
(args ...interface{})
internal/test/testing_mock.go:10
↓ 206 callersMethodErrorf
(format string, args ...interface{})
internal/test/testing_mock.go:11
↓ 205 callersMethodFatal
(args ...interface{})
internal/test/testing_mock.go:15
↓ 163 callersMethodString
()
internal/util/mime/mime.go:9
↓ 155 callersMethodErr
()
internal/util/context.go:25
↓ 122 callersFunctionMustTx
(transactor boil.ContextTransactor, err error)
internal/models/boil_queries_test.go:18
↓ 104 callersMethodCount
Count returns the count of all User records in the query.
internal/models/users.go:325
↓ 90 callersFunctionPerformRequest
(t TestingT, s *api.Server, method string, path string, body GenericPayload, headers http.Header)
internal/test/helper_request.go:90
↓ 72 callersMethodTranslate
Translate your key into a localized string. Translate makes a lookup for the key in the current bundle with the specified language. If a language tra
internal/i18n/i18n.go:90
↓ 71 callersMethodHelper
()
internal/test/testing_mock.go:17
↓ 70 callersFunctionWithTestServer
WithTestServer returns a fully configured server (using the default server config).
internal/test/test_server.go:16
↓ 56 callersFunctionFixtures
Fixtures returns a function wrapping our fixtures, which tests are allowed to manipulate. Each test (which may run concurrently) receives a fresh copy
internal/test/fixtures/fixtures.go:45
↓ 50 callersFunctionUsers
Users retrieves all the records using an executor.
internal/models/users.go:1218
↓ 47 callersMethodSave
Save creates a formatted dump of the given data. It will fail the test if the dump is different from the saved dump. It will also fail if it is the cr
internal/test/helper_snapshot.go:58
↓ 46 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/users.go:1256
↓ 46 callersMethodIs
(expectedMIME string)
internal/util/mime/mime.go:11
↓ 45 callersMethodSkip
(args ...interface{})
internal/test/testing_mock.go:21
↓ 44 callersFunctionLogFromContext
LogFromContext returns a request-specific zerolog instance using the provided context. The returned logger will have the request ID as well as some ot
internal/util/log.go:17
↓ 41 callersFunctionGetEnv
(key string, defaultVal string)
internal/util/env.go:25
↓ 41 callersFunctionGetProjectRootDir
Note that VSCode/gopls currently spawns a "No packages found for open file: [...]" here. This is expected and will go away with gopls v1.0, see https:
internal/util/get_project_root_dir_scripts.go:14
↓ 40 callersMethodReload
Reload refetches the object from the database using the primary keys with an executor.
internal/models/users.go:1680
↓ 39 callersMethodFatalf
(format string, args ...interface{})
internal/test/testing_mock.go:16
↓ 33 callersFunctionGetEnvAsBool
(key string, defaultVal bool)
internal/util/env.go:81
↓ 31 callersMethodEQ
(x bool)
internal/models/users.go:141
↓ 29 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/push_tokens.go:422
↓ 28 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/password_reset_tokens.go:415
↓ 28 callersMethodOne
One returns a single user record from the query.
internal/models/users.go:296
↓ 27 callersMethodAll
All returns all User records from the query.
internal/models/users.go:313
↓ 26 callersFunctionNewQuery
NewQuery initializes a new Query using the passed in QueryMods
internal/models/boil_queries.go:32
↓ 25 callersFunctionDate
(year int, month int, day int, loc *time.Location)
internal/util/time.go:59
↓ 25 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/access_tokens.go:467
↓ 25 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/refresh_tokens.go:408
↓ 25 callersFunctionPushTokens
PushTokens retrieves all the records using an executor.
internal/models/push_tokens.go:384
↓ 24 callersMethodLabel
Label is used to add a suffix to the snapshots golden file.
internal/test/helper_snapshot.go:324
↓ 23 callersFunctionAppUserProfiles
AppUserProfiles retrieves all the records using an executor.
internal/models/app_user_profiles.go:395
↓ 23 callersFunctionHeadersWithAuth
(t TestingT, token string)
internal/test/helper_request.go:120
↓ 23 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
internal/models/app_user_profiles.go:433
↓ 23 callersFunctionPasswordResetTokens
PasswordResetTokens retrieves all the records using an executor.
internal/models/password_reset_tokens.go:377
↓ 23 callersMethodTranslatePlural
TranslatePlural translates a pluralized cldrKey into a localized string. TranslatePlural makes a lookup for the cldrKey (a base key holding CLDR keys
internal/i18n/i18n.go:132
↓ 22 callersFunctionParseResponseAndValidate
(t TestingT, res *httptest.ResponseRecorder, v runtime.Validatable)
internal/test/helper_request.go:110
↓ 21 callersFunctionAccessTokens
AccessTokens retrieves all the records using an executor.
internal/models/access_tokens.go:429
↓ 21 callersFunctionDefaultServiceConfigFromEnv
DefaultServiceConfigFromEnv returns the server config as parsed from environment variables and their respective defaults defined below. We don't expec
internal/config/server_config.go:119
↓ 21 callersMethodDone
()
internal/util/context.go:24
↓ 21 callersFunctionRefreshTokens
RefreshTokens retrieves all the records using an executor.
internal/models/refresh_tokens.go:370
↓ 21 callersFunctionRequireHTTPError
(t *testing.T, res *httptest.ResponseRecorder, httpError *httperrors.HTTPError)
internal/test/helper_compare.go:80
↓ 19 callersMethodTags
Tags returns the parsed and priority ordered []language.Tag (your config.DefaultLanguage will be on position 0)
internal/i18n/i18n.go:209
↓ 18 callersMethodContextValidate
ContextValidate validate this nullables based on the context it is used
internal/types/nullables.go:466
↓ 18 callersFunctionGetEnvAsInt
(key string, defaultVal int)
internal/util/env.go:51
↓ 18 callersFunctionGetFieldsImplementing
GetFieldsImplementing returns all fields of a struct implementing a certain interface. Returned fields are pointers to a type or interface objects. P
internal/util/struct.go:14
↓ 18 callersMethodValidate
Validate validates this nullables
internal/types/nullables.go:78
↓ 16 callersFunctionComparePasswordAndHash
(password string, hash string)
internal/util/hashing/argon2.go:42
↓ 16 callersMethodDeleteAll
DeleteAll deletes all matching rows.
internal/models/users.go:1625
↓ 15 callersMethodName
()
internal/test/testing_mock.go:20
↓ 15 callersFunctionNew
New returns a new Service struct holding bundle and matcher with the settings of the given config Note that Service is typically created and owned by
internal/i18n/i18n.go:39
↓ 15 callersFunctionNewHTTPError
(code int, errorType string, title string)
internal/api/httperrors/error.go:34
↓ 14 callersFunctionContainsAllString
ContainsAllString checks whether the given string slice contains all strings provided.
internal/util/slice.go:4
↓ 14 callersFunctionWithTestDatabase
WithTestDatabase returns an isolated test database based on the current migrations and fixtures.
internal/test/test_database.go:53
↓ 12 callersMethodInsert
(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns)
internal/test/fixtures/fixtures.go:21
↓ 12 callersMethodPushTokens
PushTokens retrieves all the push_token's PushTokens with an executor.
internal/models/users.go:395
↓ 12 callersFunctionmakeCacheKey
(cols boil.Columns, nzDefaults []string)
internal/models/boil_types.go:34
↓ 11 callersMethodApply
Apply applies the query mods to the query provided
internal/util/db/query_mods.go:15
↓ 11 callersFunctionBindAndValidateBody
BindAndValidateBody binds the request, parsing **only** its body (depending on the `Content-Type` request header) and performs validation as enforced
internal/util/http.go:35
↓ 11 callersMethodUpdate
Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update doe
internal/models/users.go:1342
↓ 11 callersFunctionWithTransaction
(ctx context.Context, db *sql.DB, fn TxFn)
internal/util/db/db.go:15
↓ 10 callersFunctionGetEnvAsStringArr
GetEnvAsStringArr reads ENV and returns the values split by separator.
internal/util/env.go:92
↓ 10 callersMethodLoadUser
LoadUser allows an eager lookup of values, cached into the loaded structs of the objects. This is for an N-1 relationship.
internal/models/push_tokens.go:226
↓ 10 callersFunctionLocalUserToDTO
(user *models.User)
internal/data/mapper/users.go:16
↓ 10 callersMethodLocation
Location is used to save the golden file to a different location.
internal/test/helper_snapshot.go:337
↓ 10 callersMethodLogf
(format string, args ...interface{})
internal/test/testing_mock.go:19
↓ 10 callersFunctionWithTestDatabaseFromDump
WithTestDatabaseFromDump returns an isolated test database based on a dump file.
internal/test/test_database.go:107
↓ 9 callersFunctionNewFromEcho
(e *echo.HTTPError)
internal/api/httperrors/error.go:55
↓ 9 callersMethodPasswordResetTokens
PasswordResetTokens retrieves all the password_reset_token's PasswordResetTokens with an executor.
internal/models/users.go:381
↓ 8 callersMethodAccessTokens
AccessTokens retrieves all the access_token's AccessTokens with an executor.
internal/models/users.go:367
↓ 8 callersMethodExists
Exists checks if the User row exists.
internal/models/users.go:1740
↓ 8 callersFunctionGetLastSentMail
(t *testing.T, m *mailer.Mailer)
internal/test/test_mailer.go:54
↓ 8 callersFunctionLogFromEchoContext
LogFromEchoContext returns a request-specific zerolog instance using the echo.Context of the request. The returned logger will have the request ID as
internal/util/log.go:30
↓ 8 callersMethodParseLang
ParseLang parses the string as language tag and returns the best matched language using the matcher.
internal/i18n/i18n.go:197
↓ 8 callersMethodPtr
()
internal/data/dto/users.go:34
↓ 8 callersMethodRefreshTokens
RefreshTokens retrieves all the refresh_token's RefreshTokens with an executor.
internal/models/users.go:409
↓ 8 callersFunctionValidateAndReturn
ValidateAndReturn returns the provided data as a JSON response with the given HTTP status code after performing payload validation as enforced by the
internal/util/http.go:151
↓ 8 callersFunctionWithTestServerConfigurable
WithTestServerConfigurable returns a fully configured server, allowing for configuration using the provided server config.
internal/test/test_server.go:30
↓ 7 callersMethodConnectionString
ConnectionString generates a connection string to be passed to sql.Open or equivalents, assuming Postgres syntax
internal/config/db_config.go:35
↓ 7 callersFunctionContainsAll
ContainsAll returns true if a string (str) contains all substrings (sub)
internal/util/string.go:154
↓ 7 callersFunctionFileNameAndExtension
FileNameAndExtension returns the name of the file referenced by the provided path as well as its extension as separated strings. The function accepts
internal/util/path.go:31
↓ 7 callersFunctionFileNameWithoutExtension
FileNameWithoutExtension returns the name of the file referenced by the provided path without the file's extension. The function accepts a full (local
internal/util/path.go:14
↓ 7 callersFunctionGetEnvAsUint32
(key string, defaultVal uint32)
internal/util/env.go:61
↓ 7 callersMethodLog
(args ...interface{})
internal/test/testing_mock.go:18
↓ 7 callersMethodParseAcceptLanguage
ParseAcceptLanguage takes the value of the Accept-Language header and returns the best matched language using the matcher.
internal/i18n/i18n.go:181
↓ 7 callersFunctionPerformRequestWithRawBody
(t TestingT, s *api.Server, method string, path string, body io.Reader, headers http.Header, queryParams map[s
internal/test/helper_request.go:62
↓ 7 callersMethodRead
(p []byte)
internal/util/struct_test.go:16
↓ 7 callersMethodValue
(key interface{})
internal/util/context.go:26
↓ 7 callersFunctionWaitTimeout
WaitTimeout waits for the waitgroup for the specified max timeout. Returns nil on completion or ErrWaitTimeout if waiting timed out. See https://stack
internal/util/wait_group.go:17
↓ 7 callersFunctionvalidatePayload
(c echo.Context, v runtime.Validatable)
internal/util/http.go:261
↓ 6 callersFunctionDotEnvTryLoad
DotEnvTryLoad forcefully overrides ENV variables through **a maybe available** .env file. This function will always remain silent if a .env file does
internal/config/dot_env.go:28
↓ 6 callersFunctionGenerateRandomString
GenerateRandomString returns a string with n random bytes securely generated using the system's default CSPRNG. The characters within the generated st
internal/util/string.go:77
↓ 6 callersFunctionGetEnvEnum
(key string, defaultVal string, allowedValues []string)
internal/util/env.go:33
↓ 6 callersFunctionGetSentMails
(t *testing.T, m *mailer.Mailer)
internal/test/test_mailer.go:61
↓ 6 callersMethodHasDirective
(dir CacheControlDirective)
internal/util/cache_control.go:15
↓ 6 callersFunctionSearchStringToTSQuery
SearchStringToTSQuery returns a TSQuery string from user input. The resulting query will match if every word matches a beginning of a word in the row.
internal/util/db/ts_vector.go:17
↓ 6 callersMethodSendPasswordReset
(ctx context.Context, to string, passwordResetLink string)
internal/mailer/mailer.go:61
next →1–100 of 1,311, ranked by callers