MCPcopy Create free account

hub / github.com/coder/envbuilder / functions

Functions257 in github.com/coder/envbuilder

↓ 205 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/ebutil/mock_mounter_test.go:41
↓ 168 callersFunctionenvbuilderEnv
(env string, value string)
integration/integration_test.go:2909
↓ 89 callersMethodError
()
internal/ebutil/giturls.go:15
↓ 72 callersMethodClose
()
git/git.go:383
↓ 70 callersMethodStat
Stat wraps os.Stat
internal/ebutil/remount.go:166
↓ 64 callersFunctionrunEnvbuilder
runEnvbuilder starts the envbuilder container with the given environment variables and returns the container ID.
integration/integration_test.go:2772
↓ 61 callersMethodJoin
Join returns the result of filepath.Join([m.Path, paths...]).
internal/workingdir/workingdir.go:51
↓ 59 callersFunctionWithEnvPrefix
(str string)
options/options.go:533
↓ 53 callersFunctionCreateGitServer
CreateGitServer creates a git repository with an in-memory filesystem and serves it over HTTP using a httptest.Server.
testutil/gittest/gittest.go:44
↓ 47 callersMethodMkdirAll
MkdirAll wraps os.MkdirAll
internal/ebutil/remount.go:168
↓ 39 callersFunctionexecContainer
execContainer executes the given command in the given container and returns the output.
integration/integration_test.go:2848
↓ 32 callersMethodImage
Image is a file that is created in the image when envbuilder has already been run. This is used to skip the destructive initial build step when 'resum
internal/workingdir/workingdir.go:76
↓ 29 callersFunctionremount
(m mounter, src, dest, libDir string, libsSymlinks map[string][]string)
internal/ebutil/remount.go:113
↓ 27 callersMethodOpenFile
OpenFile wraps os.OpenFile
internal/ebutil/remount.go:170
↓ 24 callersMethodMount
Mount wraps syscall.Mount
internal/ebutil/remount.go:172
↓ 23 callersMethodGetMounts
GetMounts wraps procfs.GetMounts
internal/ebutil/remount.go:164
↓ 23 callersMethodReadDir
ReadDir wraps os.ReadDir
internal/ebutil/remount.go:176
↓ 22 callersMethodUnmount
Unmount wraps syscall.Unmount
internal/ebutil/remount.go:174
↓ 22 callersFunctiontempRemount
(m mounter, logf log.Func, base string, ignorePrefixes ...string)
internal/ebutil/remount.go:42
↓ 21 callersFunctionNewMockmounter
NewMockmounter creates a new mock instance.
internal/ebutil/mock_mounter_test.go:34
↓ 21 callersFunctionfakeLog
(t *testing.T)
internal/ebutil/remount_internal_test.go:656
↓ 20 callersFunctionfakeMounts
convenience function for generating a slice of *procfs.MountInfo
internal/ebutil/remount_internal_test.go:642
↓ 17 callersFunctionSetupRepoAuth
SetupRepoAuth determines the desired AuthMethod based on options.GitURL: | Git URL format | GIT_USERNAME | GIT_PASSWORD | Auth Method | | --
git/git.go:249
↓ 17 callersMethodWrite
(p []byte)
envbuilder.go:1854
↓ 16 callersMethodPath
String returns the string representation of the WorkingDir.
internal/workingdir/workingdir.go:56
↓ 15 callersFunctionCommit
Commit is a test helper for committing a single file to a repo.
testutil/gittest/gittest.go:234
↓ 14 callersMethodName
()
internal/ebutil/remount_internal_test.go:668
↓ 12 callersMethodEvalSymlinks
EvalSymlinks wraps filepath.EvalSymlinks
internal/ebutil/remount.go:178
↓ 12 callersFunctionNew
New starts a new Docker registry listening on localhost. It will automatically shut down when the test finishes. It will store data in memory.
testutil/registrytest/registrytest.go:35
↓ 12 callersFunctionNewRepo
NewRepo returns a new Git repository.
testutil/gittest/gittest.go:256
↓ 12 callersFunctionsetupInMemoryRegistry
(t *testing.T, opts setupInMemoryRegistryOpts)
integration/integration_test.go:2595
↓ 11 callersMethodRename
Rename wraps os.Rename
internal/ebutil/remount.go:180
↓ 11 callersFunctionWriteContainer
WriteContainer uploads a container to the registry server. It returns the reference to the uploaded container.
testutil/registrytest/registrytest.go:50
↓ 10 callersFunctionfindDevcontainerJSON
(workspaceFolder string, options options.Options)
envbuilder.go:1501
↓ 10 callersFunctionnewColor
(value ...color.Attribute)
envbuilder.go:1495
↓ 10 callersFunctionpushImage
(t *testing.T, ref name.Reference, remoteOpt remote.Option, env ...string)
integration/integration_test.go:2669
↓ 9 callersFunctionCloneRepo
CloneRepo will clone the repository at the given URL into the given path. If a repository is already initialized at the given path, it will not be clo
git/git.go:51
↓ 8 callersFunctionrcvCtx
(ctx context.Context, t *testing.T, ch <-chan T)
log/logrus_test.go:102
↓ 8 callersFunctionrunCLI
()
options/options_test.go:183
↓ 7 callersFunctionBasicAuthMW
(username, password string)
testutil/mwtest/auth_basic.go:5
↓ 7 callersFunctionCoder
Coder establishes a connection to the Coder instance located at coderURL and authenticates using token. It then establishes a dRPC connection to the A
log/coder.go:38
↓ 7 callersMethodCompile
Compile returns the build parameters for the workspace. devcontainerDir is the path to the directory where the devcontainer.json file is located. scra
devcontainer/devcontainer.go:140
↓ 7 callersFunctionNewServer
NewServer returns a http.Handler that serves a git repository. It's expected that the repository is already initialized by the caller.
testutil/gittest/gittest.go:63
↓ 7 callersFunctiongetCachedImage
(ctx context.Context, t *testing.T, cli *client.Client, env ...string)
integration/integration_test.go:2704
↓ 7 callersFunctionwriteTestPrivateKey
(t *testing.T)
git/git_test.go:556
↓ 6 callersMethodCLI
Generate CLI options for the envbuilder command.
options/options.go:190
↓ 6 callersFunctionExtract
Extract unpacks the feature from the image and returns the parsed specification.
devcontainer/features/features.go:95
↓ 6 callersMethodIsEmpty
()
devcontainer/script.go:21
↓ 6 callersFunctionstartContainerFromRef
(ctx context.Context, t *testing.T, cli *client.Client, ref name.Reference)
integration/integration_test.go:2725
↓ 5 callersMethodBuilt
Built is a file that is created in the workspace when envbuilder has already been run. This is used to skip building when a container is restarting. e
internal/workingdir/workingdir.go:68
↓ 5 callersMethodCompile
Extract unpacks the feature from the image and returns a set of lines that should be appended to a Dockerfile to install the feature.
devcontainer/features/features.go:195
↓ 5 callersFunctionHijackLogrus
HijackLogrus hijacks the logrus logger and calls the callback for each log entry. This is an abuse of logrus, the package that Kaniko uses, but it exp
log/logrus.go:12
↓ 5 callersMethodIsDir
()
internal/ebutil/remount_internal_test.go:672
↓ 5 callersFunctionNewServerSSH
(t *testing.T, fs billy.Filesystem, pubkeys ...gossh.PublicKey)
testutil/gittest/gittest.go:138
↓ 5 callersFunctionParse
Parse parses a devcontainer.json file.
devcontainer/devcontainer.go:25
↓ 5 callersFunctionmustRead
(t *testing.T, fs billy.Filesystem, path string)
git/git_test.go:527
↓ 5 callersFunctionrandKeygen
generates a random ed25519 private key
git/git_test.go:537
↓ 5 callersFunctionstreamContainerLogs
(t *testing.T, cli *client.Client, containerID string)
integration/integration_test.go:2870
↓ 4 callersFunctionAt
At returns a WorkingDir rooted at filepath.Join(paths...)
internal/workingdir/workingdir.go:43
↓ 4 callersFunctionCloneOptionsFromOptions
(logf func(string, ...any), options options.Options)
git/git.go:350
↓ 4 callersFunctionImageFromDockerfile
ImageFromDockerfile inspects the contents of a provided Dockerfile and returns the image that will be used to run the container.
devcontainer/devcontainer.go:429
↓ 4 callersFunctionProgressWriter
(write func(line string, args ...any))
git/git.go:393
↓ 4 callersFunctionShallowCloneRepo
ShallowCloneRepo will clone the repository at the given URL into the given path with a depth of 1. If the destination folder exists and is not empty,
git/git.go:143
↓ 4 callersFunctionUnsetEnv
UnsetEnv unsets all environment variables that are used to configure the options.
options/options.go:619
↓ 4 callersFunctionUserFromDockerfile
UserFromDockerfile inspects the contents of a provided Dockerfile and returns the user that will be used to run the container.
devcontainer/devcontainer.go:322
↓ 4 callersFunctionWriter
Writer returns an io.Writer that logs all writes in a separate goroutine. It is the responsibility of the caller to call the returned function to stop
log/log.go:53
↓ 4 callersFunctionexecOneLifecycleScript
( ctx context.Context, logf func(level log.Level, format string, args ...any), s devcontainer.LifecycleScri
envbuilder.go:1417
↓ 4 callersFunctionfileExists
(fs billy.Filesystem, path string)
envbuilder.go:1598
↓ 3 callersMethodConfigFile
()
devcontainer/devcontainer_test.go:435
↓ 3 callersFunctionDefaultWorkspaceFolder
DefaultWorkspaceFolder returns the default workspace folder for a given repository URL.
options/defaults.go:17
↓ 3 callersMethodInfo
()
internal/ebutil/remount_internal_test.go:686
↓ 3 callersFunctionNew
New logs to the provided io.Writer.
log/log.go:26
↓ 3 callersFunctionParseRepoURL
ParseRepoURL parses the given repository URL into its components. We used to use chainguard-dev/git-urls for this, but its behaviour diverges from the
internal/ebutil/giturls.go:34
↓ 3 callersMethodType
()
internal/ebutil/remount_internal_test.go:685
↓ 3 callersFunctionsendLogsV2
sendLogsV2 uses the v2 agent API to send logs. Only compatibile with coder versions >= 2.9.
log/coder.go:146
↓ 3 callersFunctionsetupPassthroughRegistry
(t *testing.T, image string, opts *setupPassthroughRegistryOptions)
integration/integration_test.go:1497
↓ 2 callersFunctionBuildArgsMap
BuildArgsMap converts a slice of "KEY=VALUE" strings to a map.
devcontainer/devcontainer.go:310
↓ 2 callersMethodChmod
(name string, mode os.FileMode)
internal/chmodfs/chmodfs.go:19
↓ 2 callersMethodFormat
(entry *logrus.Entry)
log/logrus.go:26
↓ 2 callersFunctionFromLogrus
(lvl logrus.Level)
log/logrus.go:48
↓ 2 callersMethodHasDockerfile
HasDockerfile returns true if the devcontainer.json specifies the path to a Dockerfile.
devcontainer/devcontainer.go:132
↓ 2 callersMethodHasImage
HasImage returns true if the devcontainer.json specifies an image.
devcontainer/devcontainer.go:126
↓ 2 callersFunctionLogHostKeyCallback
LogHostKeyCallback is a HostKeyCallback that just logs host keys and does nothing else.
git/git.go:210
↓ 2 callersFunctionNew
(fs billy.Filesystem)
internal/chmodfs/chmodfs.go:9
↓ 2 callersMethodSetDefaults
()
options/defaults.go:40
↓ 2 callersFunctionSubstituteVars
(s string, workspaceFolder string, lookupEnv func(string) (string, bool))
devcontainer/devcontainer.go:78
↓ 2 callersFunctionUserFromImage
UserFromImage inspects the remote reference and returns the user that will be used to run the container.
devcontainer/devcontainer.go:483
↓ 2 callersFunctionVersion
Version returns the semantic version of the build. Use golang.org/x/mod/semver to compare versions.
buildinfo/version.go:50
↓ 2 callersFunctionargsFromUntypedSlice
(args []any)
devcontainer/script.go:68
↓ 2 callersFunctioncopyFile
(fs billy.Filesystem, src, dst string, mode fs.FileMode)
envbuilder.go:1617
↓ 2 callersFunctiondecodeV1Logs
(t *testing.T, w http.ResponseWriter, r *http.Request)
log/coder_internal_test.go:309
↓ 2 callersFunctiongetUser
(username string)
envbuilder.go:1375
↓ 2 callersFunctioninitDockerConfigOverride
initDockerConfigOverride sets the DOCKER_CONFIG environment variable to a path within the working directory. If a base64 encoded Docker config is prov
envbuilder.go:1705
↓ 2 callersFunctionlibraryDirectoryPath
libraryDirectoryPath returns the library directory. It returns a multiarch directory if the distribution is Debian or a derivative. Based on https://
internal/ebutil/libs.go:28
↓ 2 callersFunctionnewCoderLogger
(ctx context.Context, t *testing.T, us string, token string)
log/coder_internal_test.go:320
↓ 2 callersFunctionnewWriteLogger
(logf log.Func, level log.Level)
envbuilder.go:1850
↓ 2 callersFunctiononceErrFunc
(f func() error)
envbuilder.go:1834
↓ 2 callersFunctionserveLocalRegistry
Allows quick testing of layer caching using a local directory!
envbuilder.go:1863
↓ 2 callersFunctionwaitForCommand
(desc string, pid int)
devcontainer/script.go:127
↓ 2 callersFunctionwriteMagicImageFile
(fs billy.Filesystem, path string, v any)
envbuilder.go:1656
next →1–100 of 257, ranked by callers