Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GoogleCloudPlatform/buildpacks
/ functions
Functions
3,416 in github.com/GoogleCloudPlatform/buildpacks
⨍
Functions
3,416
◇
Types & classes
435
↳
Endpoints
60
↓ 280 callers
Method
Logf
Logf emits a structured logging line.
pkg/gcpbuildpack/gcpbuildpack.go:380
↓ 181 callers
Method
Exec
Exec runs the given command (with args) under the default configuration, allowing the caller to handle the error.
pkg/gcpbuildpack/exec.go:126
↓ 173 callers
Method
FileExists
FileExists returns true if a file exists at the path joined by elem
pkg/gcpbuildpack/os.go:68
↓ 139 callers
Method
TempDir
TempDir creates a directory with the provided name in the buildpack temp layer and returns its path
pkg/gcpbuildpack/ioutil.go:27
↓ 122 callers
Method
ApplicationRoot
ApplicationRoot returns the root folder of the application code.
pkg/gcpbuildpack/gcpbuildpack.go:237
↓ 119 callers
Method
Setenv
Setenv is a pass through for os.Setenv(...) and returns any error with proper user / system attribution Note: this only sets an env var for the curren
pkg/gcpbuildpack/os.go:91
↓ 104 callers
Method
Warnf
Warnf emits a structured logging line for warnings.
pkg/gcpbuildpack/gcpbuildpack.go:393
↓ 99 callers
Function
New
New mocks the behavior of a shell command executed by a ctx.Exec call. `commandRegex` is the command to mock; the regex must match the full command th
internal/mockprocess/mockprocess.go:50
↓ 98 callers
Function
MustGetPath
MustGetPath returns the absolute path of a testdata file. The reason to have this function is blaze runs all tests from the runfiles directory and we
pkg/testdata/testdata.go:35
↓ 97 callers
Method
WriteFile
WriteFile is a pass through for ioutil.WriteFile(...) and returns any error with proper user / system attribution
pkg/gcpbuildpack/ioutil.go:40
↓ 95 callers
Method
ReadFile
ReadFile is a pass through for ioutil.ReadFile(...) and returns any error with proper user / system attribution
pkg/gcpbuildpack/ioutil.go:48
↓ 93 callers
Method
Layer
Layer returns a layer, creating its directory.
pkg/gcpbuildpack/layer.go:83
↓ 85 callers
Method
String
()
pkg/buildererror/status.go:47
↓ 81 callers
Method
Main
(string[] args)
builders/testdata/dotnet/generic/simple/Program.cs:14
↓ 74 callers
Function
ProvisionImages
ProvisionImages provisions the builder, build, and run images necessary for running a test. The 'builderName' return value is the name of the builder
internal/acceptance/acceptance.go:618
↓ 71 callers
Function
WithStdout
WithStdout configures what a mocked command prints to stdout.
internal/mockprocess/mockprocess.go:70
↓ 67 callers
Method
MkdirAll
MkdirAll is a pass through for os.Create(...) and returns any error with proper user / system attribution
pkg/gcpbuildpack/os.go:43
↓ 66 callers
Method
RemoveAll
RemoveAll is a pass through for os.RemoveAll(...) and returns any error with proper user / system attribution
pkg/gcpbuildpack/os.go:51
↓ 57 callers
Method
mapToBase
(path)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3991
↓ 57 callers
Method
mapToBase
(path)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:3863
↓ 54 callers
Function
TestDetect
TestDetect is a helper for testing a buildpack's implementation of /bin/detect. This MUST be called from a test function with the name `func TestDetec
internal/buildpacktest/buildpacktest.go:183
↓ 49 callers
Method
SetValue
SetValue sets the Metadata value with MetadataID id.
pkg/buildermetadata/buildermetadata.go:91
↓ 48 callers
Method
Name
Name is the name of the layer.
pkg/gcpbuildpack/layer.go:117
↓ 47 callers
Function
TestApp
TestApp builds and a single application and verifies that it runs and handles requests.
internal/acceptance/acceptance.go:259
↓ 47 callers
Method
write
(...args)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:5095
↓ 44 callers
Function
newDescriptor
newDescriptor creates a new Descriptor.
pkg/buildermetrics/descriptor.go:49
↓ 39 callers
Method
resolve
(p)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:2848
↓ 38 callers
Function
DefineFlags
DefineFlags sets up flags that control the behavior of the test runner.
internal/acceptance/acceptance.go:96
↓ 38 callers
Method
makeCallback
(resolve, reject)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:2458
↓ 38 callers
Method
makeCallback
(resolve, reject)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:1380
↓ 37 callers
Function
NewContext
NewContext creates a context.
pkg/gcpbuildpack/gcpbuildpack.go:178
↓ 36 callers
Method
resolve
(p)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:1766
↓ 35 callers
Method
GetCounter
GetCounter returns the Counter with MetricID m, or creates it
pkg/buildermetrics/buildermetrics.go:43
↓ 34 callers
Method
AddWebProcess
AddWebProcess adds the given command as the web start process, overwriting any previous web start process.
pkg/gcpbuildpack/gcpbuildpack.go:443
↓ 34 callers
Function
Errorf
Errorf constructs an Error.
pkg/buildererror/error.go:52
↓ 33 callers
Function
FilterTests
FilterTests returns a new slice with only tests that should be run. Tests are filtered out if their VersionInclusionConstraint does not match the `-ru
internal/acceptance/acceptance.go:1456
↓ 33 callers
Function
New
New creates and starts a test server with the provided configurations and returns its URL.
internal/testserver/testserver.go:71
↓ 32 callers
Method
SetMetadata
SetMetadata sets metadata on the layer.
pkg/gcpbuildpack/layer.go:134
↓ 32 callers
Method
makeCallSync
(p, discard, accept, { requireSubpath = true } = {})
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:4787
↓ 32 callers
Method
makeCallSync
(p, discard, accept, { requireSubpath = true } = {})
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:3705
↓ 31 callers
Method
Debugf
Debugf emits a structured logging line if the debug flag is set.
pkg/gcpbuildpack/gcpbuildpack.go:385
↓ 31 callers
Function
GlobalBuilderMetrics
GlobalBuilderMetrics returns a pointer to the BuilderMetrics singleton
pkg/buildermetrics/buildermetrics.go:81
↓ 30 callers
Function
GlobalBuilderMetadata
GlobalBuilderMetadata returns a pointer to the BuilderMetadata singleton
pkg/buildermetadata/buildermetadata.go:111
↓ 30 callers
Method
Increment
Increment increases the value of a Counter by addend
pkg/buildermetrics/counter.go:28
↓ 29 callers
Method
Capability
Capability returns a capability from Context. This is used to retrieve injected dependencies/strategies, allowing buildpacks to behave differently dep
pkg/gcpbuildpack/gcpbuildpack.go:232
↓ 27 callers
Function
TestBuildFailure
TestBuildFailure runs a build and ensures that it fails. Additionally, it ensures the emitted logs match mustMatch regexps.
internal/acceptance/acceptance.go:340
↓ 27 callers
Method
makeCallPromise
(p, discard, accept, { requireSubpath = true } = {})
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:4776
↓ 27 callers
Method
makeCallPromise
(p, discard, accept, { requireSubpath = true } = {})
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:3694
↓ 26 callers
Method
ClearLayer
ClearLayer erases the existing layer, and re-creates the directory.
pkg/gcpbuildpack/layer.go:122
↓ 25 callers
Function
WithMockURL
WithMockURL stubs the provided URL to point to this test server for the duration of a unit test.
internal/testserver/testserver.go:57
↓ 25 callers
Function
runOutput
runOutput runs the given command and returns its stdout or an error.
internal/acceptance/acceptance.go:560
↓ 24 callers
Method
makeLibzipError
(error)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:2748
↓ 24 callers
Method
makeLibzipError
(error)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:1670
↓ 22 callers
Method
GetMetadata
GetMetadata gets metadata from the layer.
pkg/gcpbuildpack/layer.go:139
↓ 22 callers
Function
WithStatus
WithStatus sets the http response code to return.
internal/testserver/testserver.go:36
↓ 22 callers
Method
existsSync
(p)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3002
↓ 22 callers
Method
resolveFilename
(reason, p, resolveLastComponent = true, throwIfNoEntry = true)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3176
↓ 22 callers
Method
resolveFilename
(reason, p, resolveLastComponent = true, throwIfNoEntry = true)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:2094
↓ 20 callers
Function
WithExitCode
WithExitCode configures what a mocked command uses as the exit code.
internal/mockprocess/mockprocess.go:84
↓ 20 callers
Function
WithJSON
WithJSON sets the JSON payload the server send in the response body.
internal/testserver/testserver.go:43
↓ 20 callers
Function
abort
(what)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:5788
↓ 20 callers
Function
abort
(what)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:4692
↓ 20 callers
Method
isFile
()
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:1216
↓ 20 callers
Method
isFile
()
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:139
↓ 20 callers
Function
makeError
(pnpCode, message, data = {}, code)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:9729
↓ 20 callers
Function
makeError
(pnpCode, message, data = {}, code)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:8633
↓ 19 callers
Method
CommandExecuted
CommandExecuted returns true if the command was executed using ctx.Exec, otherwise returns false.
internal/buildpacktest/buildpacktest.go:103
↓ 19 callers
Function
EBADF
(reason)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:1614
↓ 19 callers
Function
EBADF
(reason)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:536
↓ 19 callers
Method
Error
()
pkg/buildererror/error.go:43
↓ 19 callers
Function
IsPresentAndTrue
IsPresentAndTrue returns true if the environment variable evaluates to True.
pkg/env/env.go:296
↓ 19 callers
Function
WithFiles
WithFiles returns a cache option that hashes contents of the files. Callers can detect if a file did not exist by checking returned error values again
pkg/cache/cache.go:42
↓ 19 callers
Method
existsSync
(p)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:1920
↓ 18 callers
Method
CacheHit
CacheHit records a cache hit debug message. This is used in acceptance test validation.
pkg/gcpbuildpack/gcpbuildpack.go:407
↓ 18 callers
Method
CacheMiss
CacheMiss records a cache miss debug message. This is used in acceptance test validation.
pkg/gcpbuildpack/gcpbuildpack.go:412
↓ 18 callers
Function
NewBuilderMetrics
NewBuilderMetrics returns a new, empty BuilderMetrics For testing use only
pkg/buildermetrics/buildermetrics.go:38
↓ 18 callers
Method
Symlink
Symlink is a pass through for os.Symlink(...) and returns any error with proper user / system attribution
pkg/gcpbuildpack/os.go:60
↓ 18 callers
Function
WithStrings
WithStrings returns a cache option for string values.
pkg/cache/cache.go:33
↓ 18 callers
Method
create
(fakeFs, path, opts)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:2485
↓ 18 callers
Method
statSync
(p, opts = { bigint: false, throwIfNoEntry: true })
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3035
↓ 18 callers
Method
statSync
(p, opts = { bigint: false, throwIfNoEntry: true })
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:1953
↓ 17 callers
Method
BuildpackRoot
BuildpackRoot returns the root folder of the buildpack.
pkg/gcpbuildpack/gcpbuildpack.go:242
↓ 17 callers
Method
Glob
Glob is a pass through for filepath.Glob(...). It returns any error with proper user / system attribution.
pkg/gcpbuildpack/filepath.go:27
↓ 17 callers
Method
Write
Write writes the config to the default config file in a new layer.
pkg/appstart/appstart.go:66
↓ 17 callers
Method
write
(...args)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:3999
↓ 16 callers
Function
IsGAE
IsGAE returns true if the buildpack target platform is gae.
pkg/env/env.go:245
↓ 16 callers
Function
ReadPackageJSONIfExists
ReadPackageJSONIfExists returns deserialized package.json from the given dir. If the provided dir does not contain a package.json file it returns nil.
pkg/nodejs/nodejs.go:196
↓ 16 callers
Method
readFileSync
(p, encoding)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3609
↓ 16 callers
Method
readFileSync
(p, encoding)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:2527
↓ 16 callers
Method
writeFileSync
(p, content, opts)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:3452
↓ 16 callers
Method
writeFileSync
(p, content, opts)
builders/testdata/nodejs/appengine/yarn_two_pnp/.pnp.cjs:2370
↓ 15 callers
Method
Build
(ctx *gcp.Context, outBin, buildable, workdir, gocache string, flags []string)
pkg/golang/golang.go:70
↓ 15 callers
Function
NewBuilderMetadata
NewBuilderMetadata returns a new, empty BuilderMetadata
pkg/buildermetadata/buildermetadata.go:35
↓ 15 callers
Method
Value
Value retrieves the value of a Counter
pkg/buildermetrics/counter.go:33
↓ 14 callers
Function
InternalErrorf
InternalErrorf constructs an Error with status StatusInternal (Google-attributed SLO).
pkg/buildererror/error.go:64
↓ 14 callers
Function
IsDevSync
IsDevSync indicates that the builder is running in Dev Sync mode.
pkg/env/env.go:281
↓ 13 callers
Method
Add
Add increases the value of a FloatDP by addend. Not threadsafe.
pkg/buildermetrics/floatdp.go:30
↓ 13 callers
Function
AddFrameworkVersionLabel
AddFrameworkVersionLabel sets the google.functions-framework-version label on the image.
pkg/cloudfunctions/labels.go:30
↓ 13 callers
Function
CheckOverride
CheckOverride returns a Detect result or nil based on the GOOGLE_RUNTIME environment variable value. o If the GOOGLE_RUNTIME environment variable i
pkg/runtime/runtime.go:46
↓ 13 callers
Function
EROFS
(reason)
builders/testdata/nodejs/functions/yarn_two_pnp/.pnp.cjs:1629
next →
1–100 of 3,416, ranked by callers