MCPcopy Create free account

hub / github.com/amp-labs/connectors / functions

Functions8,532 in github.com/amp-labs/connectors

↓ 1,487 callersFunctionResponse
Response is used to configure server response with HTTP status and body data. Data is optional.
test/utils/mockutils/mockserver/handlers.go:48
↓ 1,379 callersMethodServer
Server creates mock server.
test/utils/mockutils/mockserver/fixed.go:19
↓ 1,343 callersFunctionContentJSON
ContentJSON is a setup handler, which configures server to use JSON.
test/utils/mockutils/mockserver/handlers.go:6
↓ 1,133 callersFunctionPath
Path returns a check expecting request URL path to match the template.
test/utils/mockutils/mockcond/request.go:8
↓ 1,026 callersFunctionDataFromFile
DataFromFile is used for server mocking. Files must be located under ./test directory relative to the test runner.
test/utils/testutils/fileReader.go:16
↓ 1,005 callersMethodFields
()
providers/hubspot/metadata.go:670
↓ 980 callersMethodString
()
common/xml.go:123
↓ 811 callersMethodError
()
test/utils/testutils/checks.go:29
↓ 802 callersFunctionFail
Fail logs the message and exits with code 1.
test/utils/fail.go:10
↓ 732 callersFunctionDummy
Dummy server only talks about having a cup of tea. Acknowledges requests and does nothing else.
test/utils/mockutils/mockserver/dummy.go:10
↓ 688 callersMethodRun
(t *testing.T, builder testconn.ConnectorBuilder[*Connector])
providers/hubspot/search_test.go:452
↓ 609 callersMethodGet
Get retrieves a single record by its ID for the specified object type. Parameters: - objectName: The type of object to retrieve (e.g., "contact", "ac
memstore/storage.go:87
↓ 601 callersMethodWrite
(ctx context.Context, params common.WriteParams)
test/utils/testconn/connector.go:54
↓ 565 callersMethodWithQueryParam
(name, value string)
common/urlbuilder/url.go:95
↓ 550 callersFunctionNew
New constructs query searching for key. Extra keys are preceding forming a zoom path.
internal/jsonquery/queries.go:81
↓ 537 callersFunctionDumpJSON
DumpJSON dumps the given value as JSON to the given writer.
test/utils/dump.go:11
↓ 530 callersFunctionNew
New URL will be constructed given valid full url which may have query params.
common/urlbuilder/url.go:31
↓ 431 callersFunctionSetupLogging
SetupLogging sets up logging for the test suite.
test/utils/logging.go:9
↓ 415 callersFunctionQueryParam
(key string, value ...string)
test/utils/mockutils/mockcond/queries.go:8
↓ 368 callersMethodRead
(ctx context.Context, params common.ReadParams)
test/utils/testconn/connector.go:49
↓ 351 callersMethodModule
()
internal/components/provider.go:65
↓ 339 callersFunctionMethodPOST
()
test/utils/mockutils/mockcond/request.go:27
↓ 339 callersMethodProviderInfo
()
internal/components/provider.go:57
↓ 305 callersMethodHas
(objectName string)
providers/aws/internal/core/object.go:50
↓ 263 callersMethodError
()
common/types.go:610
↓ 250 callersMethodAdd
Add objects into the named list. If the list didn't exist it will create it.
internal/datautils/lists.go:15
↓ 243 callersFunctionNewSet
NewSet creates a set from multiple values.
internal/datautils/set.go:16
↓ 235 callersFunctionSetInfo
SetInfo sets the information for a specific provider in the catalog. This is useful to enable experimental providers or to override the default provid
providers/utils.go:103
↓ 216 callersMethodContains
Contains checks whether a given timestamp falls within the Since/Until range defined in params, respecting the current TimeBoundary mode. If both Sin
common/readhelper/time.go:65
↓ 214 callersFunctionMustBeNil
MustBeNil - panics on non-empty error.
internal/goutils/utils.go:4
↓ 190 callersMethodBody
Body returns JSON node. If it is empty the flag will indicate so. Empty response body is a special case and should be handled explicitly.
common/json.go:52
↓ 181 callersMethodObjectToMap
(node *ajson.Node)
internal/jsonquery/converters.go:54
↓ 173 callersFunctionStringError
StringError creates a StrError from a plain string. Instead of asserting exact error identity, the testing utilities will allow message-based compari
test/utils/testutils/checks.go:37
↓ 171 callersMethodListObjectMetadata
(ctx context.Context, objectNames []string)
test/salesforce/metadata/delete/main.go:97
↓ 165 callersMethodValidateParams
()
common/paramsbuilder/params.go:12
↓ 163 callersMethodAssert
Assert compares two data structures using github.com/go-test/deep.Equal and records a formatted mismatch report for the specified data name. Returns t
test/utils/testutils/comparison.go:84
↓ 150 callersFunctionResponseString
(status int, data string)
test/utils/mockutils/mockserver/handlers.go:63
↓ 149 callersFunctionParseResult
ParseResult parses the response from a provider into a ReadResult. A 2xx return type is assumed. The sizeFunc returns the total number of records in t
common/parse.go:65
↓ 148 callersMethodRun
(t *testing.T, builder testconn.ConnectorBuilder[*Connector])
providers/salesforce/bulk-read_test.go:97
↓ 145 callersMethodAddPath
AddPath appends one or more path segments to the URL. Each provided string is treated as a path segment and joined to the underlying URL using url.UR
common/urlbuilder/url.go:207
↓ 143 callersFunctionwrapper
(input inputConstructorFunc[T])
connector/new.go:310
↓ 141 callersMethodRun
Run executes the OAuth flow to get a token.
scripts/oauth/token.go:201
↓ 138 callersFunctionLoadPath
LoadPath will give path to creds.json. For provider called `dynamicsCRM` the file location will either be * value of DYNAMICS_CRM_CRED_FILE env var, o
common/scanning/credscanning/path.go:20
↓ 126 callersFunctionMustCreateProvCredJSON
(filePath string, withRequiredAccessToken bool, customFields ...credscanning.Field, )
test/utils/creds.go:13
↓ 124 callersFunctionInitialize
Initialize initializes a connector with the given provider and parameters by using Connector as a base type. It runs the constructor with the connecto
internal/components/connector.go:57
↓ 123 callersMethodSet
(objectName, fieldName, label, machineFld string)
providers/apollo/connector.go:29
↓ 122 callersMethodHTTPClient
()
providers/kit/client.go:10
↓ 121 callersFunctionBody
Body returns a check that expects the request body to match the provided template text. The body is compared as plain text, JSON, or XML. When JSON c
test/utils/mockutils/mockcond/body.go:43
↓ 118 callersMethodAwait
Await blocks until the future completes and returns the result. This is the primary way to retrieve the result of an async computation. Behavior: -
internal/future/future.go:236
↓ 117 callersMethodAdd
(displayName, url string)
tools/scrapper/models.go:42
↓ 112 callersFunctionNewEmptyEndpointRegistry
()
internal/components/support.go:41
↓ 111 callersFunctionLogger
Logger returns a logger. nolint:contextcheck,cyclop
common/logging/logging.go:85
↓ 111 callersFunctionNewHTTPReader
( client common.AuthenticatedHTTPClient, registry *components.EndpointRegistry, module common.ModuleID, li
internal/components/reader/http.go:22
↓ 106 callersFunctionNewClient
NewClient returns a new instance of an HTTP client. Using the shared http.DefaultClient in mock tests may cause CloseIdleConnections errors.
test/utils/mockutils/connector.go:24
↓ 105 callersFunctionMethodGET
()
test/utils/mockutils/mockcond/request.go:23
↓ 105 callersFunctionNewHTTPWriter
( client common.AuthenticatedHTTPClient, registry *components.EndpointRegistry, module common.ModuleID, li
internal/components/writer/http.go:21
↓ 97 callersMethodStrWithDefault
(key string, defaultValue string)
internal/jsonquery/defaults.go:21
↓ 95 callersMethodUnix
Unix returns the string representing the number of seconds elapsed since January 1, 1970.
internal/datautils/timing.go:32
↓ 94 callersFunctionMethodDELETE
()
test/utils/mockutils/mockcond/request.go:39
↓ 93 callersFunctionGo
Go creates a new Future and executes the given function in a new goroutine. This is the most common way to create a future. It's a convenience wrappe
internal/future/future.go:132
↓ 93 callersFunctionNewFaultyResponder
NewFaultyResponder creates error responder that will be used when provider responds with erroneous payload. - FormatSwitch will be used to select the
common/interpreter/responder.go:27
↓ 92 callersMethodName
()
providers/keap/read.go:154
↓ 92 callersFunctionReplaceURLOrigin
(baseURL, mockServerOrigin string)
test/utils/mockutils/connector.go:12
↓ 89 callersFunctionNewDefaultMap
(dict Map[K, V], fallback func(K) V)
internal/datautils/maps.go:127
↓ 88 callersFunctionHeader
(header http.Header)
test/utils/mockutils/mockcond/header.go:13
↓ 85 callersMethodIs
Is matches common.ErrAccessToken so the server's existing auth-invalidated path handles claim challenges. Deliberately does NOT match ErrRetryable.
providers/microsoft/errors.go:192
↓ 82 callersFunctionReadThroughPages
ReadThroughPages reads records from a connector page by page. It continues advancing pagination until no more pages remain. This is useful in tests to
test/utils/testscenario/read-all.go:16
↓ 78 callersMethodMustLoadSchemas
MustLoadSchemas parses static schema file and returns Metadata for deep connector.
internal/staticschema/files.go:40
↓ 72 callersFunctionExtractRecordsFromPath
(jsonPath string, nestedPath ...string)
common/parse.go:298
↓ 71 callersMethodArrayOptional
ArrayOptional returns the array at key if present. Examples: ArrayOptional("") // current node ArrayOptional("items") // dire
internal/jsonquery/queries.go:338
↓ 71 callersMethodWrite
(ctx context.Context, params WriteParams)
connectors.go:101
↓ 70 callersFunctionNewEndpointRegistry
(es EndpointRegistryInput)
internal/components/support.go:33
↓ 68 callersMethodList
List retrieves records for the specified object type, optionally filtered by a time range based on the object's updated timestamp field. This method
memstore/storage.go:137
↓ 66 callersFunctionMethodPUT
()
test/utils/mockutils/mockcond/request.go:31
↓ 66 callersFunctionNewSiblingFileLocator
NewSiblingFileLocator creates locator, which is capable of resolving full path to files located under the same directory where this constructor was ca
tools/fileconv/files.go:28
↓ 63 callersFunctionNewMetadataFileManager
NewMetadataFileManager allows reading and writing schema.json. Use dedicated instances of NewReader or NewWriter. Deprecated.
tools/scrapper/files.go:32
↓ 60 callersFunctionCapitalizeFirstLetterEveryWord
(text string)
common/naming/formatting.go:11
↓ 59 callersMethodObjectOptional
ObjectOptional returns the object at key if present. Examples: ObjectOptional("") // current node ObjectOptional("user") // di
internal/jsonquery/queries.go:99
↓ 58 callersFunctionApply
Apply will apply options to construct a ready to go set of parameters. This is a generalized constructor of parameters used to initialize any connecto
common/paramsbuilder/params.go:22
↓ 58 callersMethodGetExplorer
(opts ...Option)
tools/fileconv/api3/manager.go:20
↓ 58 callersFunctionNewHTTPDeleter
( client common.AuthenticatedHTTPClient, registry *components.EndpointRegistry, module common.ModuleID, li
internal/components/deleter/http.go:20
↓ 58 callersFunctionNewObjectSchemaProvider
( client common.AuthenticatedHTTPClient, fetchType string, list operations.SingleObjectMetadataHandlers, )
internal/components/schema/object.go:31
↓ 56 callersFunctionNewFormatSwitch
(templates ...FormatTemplate)
common/interpreter/formatSwitch.go:19
↓ 55 callersMethodAddDiff
AddDiff marks the comparison as failed and appends a custom failure message. This is the primary way to report simple failures like row count mismatc
test/utils/testutils/comparison.go:57
↓ 55 callersMethodDelete
(ctx context.Context, params common.DeleteParams)
test/utils/testconn/connector.go:59
↓ 52 callersMethodPost
Post makes a POST request to the given URL and returns the response & response body. If the response is not a 2xx, an error is returned. If the respon
common/http.go:213
↓ 52 callersMethodStringOptional
StringOptional returns the string at key if present. Examples: StringOptional("") // current node StringOptional("name") // di
internal/jsonquery/queries.go:220
↓ 51 callersFunctionWithDisplayNamePostProcessors
WithDisplayNamePostProcessors will apply processors in the given order.
tools/fileconv/api3/parameters.go:191
↓ 50 callersMethodGetOauthToken
GetOauthToken constructs Token group from creds file. Some connectors may implement Refresh tokens, when it happens expiry must be provided alongside.
common/scanning/credscanning/tokens.go:12
↓ 50 callersFunctionMethod
Method returns a check expecting HTTP method name to match the template.
test/utils/mockutils/mockcond/request.go:17
↓ 49 callersFunctionNewOpenAPISchemaProvider
( module common.ModuleID, schemas *staticschema.Metadata[F, C], )
internal/components/schema/openapi.go:16
↓ 47 callersFunctionMethodPATCH
()
test/utils/mockutils/mockcond/request.go:35
↓ 47 callersMethodModuleInfo
()
internal/components/provider.go:61
↓ 47 callersFunctionNewConnector
NewConnector creates a new memstore connector instance. nolint:cyclop // Complexity inherent to initialization logic with multiple configuration path
memstore/connector.go:76
↓ 47 callersFunctionNewMetadata
NewMetadata constructs empty Metadata. To populate it with data use Metadata.Add method.
internal/staticschema/core.go:12
↓ 47 callersFunctionReadInfo
ReadInfo reads the information from the catalog for specific provider. It also performs string substitution on the values in the config that are surro
providers/utils.go:116
↓ 47 callersMethodStringRequired
StringRequired returns the string at key. Examples: StringRequired("") // current node StringRequired("name") // direct lookup New(node,
internal/jsonquery/queries.go:237
↓ 46 callersMethodError
Error returns any accumulated errors from hash operations. Returns nil if no errors occurred, a single error if only one occurred, or a joined error c
memstore/hashing.go:217
↓ 46 callersFunctionNewSingularString
(str string)
common/naming/singular.go:23
↓ 46 callersMethodReadObjectsGet
ReadObjectsGet is the same as ReadObjectsGet but retrieves schemas for endpoints that perform reading via GET. If you need schemas located under GET a
tools/fileconv/api3/queries.go:36
next →1–100 of 8,532, ranked by callers